/* ============================================================
   Asthenis — Main Stylesheet
   Accent: #0f766e (teal)
   ============================================================ */

@font-face {
  font-family: "Eras ITC Local";
  src: url("../fonts/ErasITC-Light.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Eras ITC Local";
  src: url("../fonts/ErasITC-Medium.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand */
  --accent:      #0f766e;
  --accent-dark: #115e59;
  --focus-ring:  rgba(15, 118, 110, .18);
  --brand-font:  "Eras ITC Local", "Eras ITC", "Eras Medium ITC", "Eras Demi ITC", "Maven Pro Local", "Trebuchet MS", "Gill Sans MT", "Segoe UI", sans-serif;

  /* Palette */
  --bg:          #f0f2f5;
  --surface:     #ffffff;
  --text:        #111827;
  --text-muted:  #6b7280;
  --border:      #e5e7eb;

  /* Feedback */
  --error:       #dc2626;
  --error-bg:    #fee2e2;
  --success:     #16a34a;
  --success-bg:  #dcfce7;

  /* Tokens */
  --radius:      0.5rem;
  --shadow:      0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:   0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ----- Typography ----- */
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.375rem; font-weight: 600; }
h3 { font-size: 1.125rem; font-weight: 600; }
p  { margin: 0; }
.text-muted { color: var(--text-muted); font-size: 0.875rem; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s;
  text-decoration: none;
}

.btn-primary {
  width: 100%;
  padding: 0.65rem 1.25rem;
  background-color: var(--accent);
  color: #fff;
}
.btn-primary:hover:not(:disabled) { background-color: var(--accent-dark); }
.btn-primary:disabled { opacity: 0.65; cursor: not-allowed; }

.btn-outline {
  background-color: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-outline:hover {
  background-color: var(--accent);
  color: #fff;
}

/* ----- Alerts ----- */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.alert-error   { background-color: var(--error-bg);   color: var(--error); }
.alert-success { background-color: var(--success-bg); color: var(--success); }

/* ----- Forms ----- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 1rem;
}
.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
}
.form-group input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  background-color: var(--surface);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

/* ----- Auth Layout ----- */
.page-login {
  display: flex;
  justify-content: center;
  align-items: center;
}
.auth-container {
  width: 100%;
  max-width: 420px;
  padding: 1.5rem;
}
.auth-card {
  background-color: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2rem;
}
.auth-header {
  text-align: center;
  margin-bottom: 1.75rem;
}
.auth-header h1 {
  color: var(--accent);
  margin-bottom: 0.25rem;
}
.auth-header p { color: var(--text-muted); font-size: 0.9rem; }

/* ----- Navbar ----- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.navbar-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

/* ----- Container ----- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ----- Page Header ----- */
.page-header { margin-bottom: 1.75rem; }

/* ----- Stats Grid ----- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background-color: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  border-left: 4px solid var(--accent);
}
.stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.375rem;
}
.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
}

/* ----- Content Sections ----- */
.content-section {
  background-color: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.content-section h3 {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* ----- Activity List ----- */
.activity-list { display: flex; flex-direction: column; gap: 0.5rem; }
.activity-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.activity-item:last-child { border-bottom: none; }
.activity-text { flex: 1; }
.activity-date {
  color: var(--text-muted);
  font-size: 0.8125rem;
  white-space: nowrap;
  margin-left: 1rem;
}

/* ----- Responsive ----- */
@media (max-width: 480px) {
  .auth-card { padding: 1.5rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .navbar { padding: 0.625rem 1rem; }
  .container { padding: 1.25rem 1rem; }
}

/* ============================================================
   Home page (slide 3) — Site Header
   ============================================================ */
body.page-home {
  background: var(--bg);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.site-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Brand */
.site-header__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.site-header__brand img {
  height: 38px;
  width: auto;
}

.site-header__brand span {
  font-family: var(--brand-font);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.01em;
}

/* Nav */
.site-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.site-nav__list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0;
  margin: 0;
}

.site-nav__list a {
  display: block;
  padding: 0.35rem 0.7rem;
  font-size: 0.875rem;
  color: var(--accent);
  text-decoration: none;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: background .14s, color .14s;
}

.site-nav__list a:hover {
  background: rgba(15, 118, 110, .08);
}

/* Language flags */
.site-header__flags {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.site-header__flags img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity .14s, transform .14s;
}

.site-header__flags img:hover {
  opacity: 1;
  transform: scale(1.1);
}

.site-header__flags img:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  opacity: 1;
}

.site-header__flags img.is-active {
  opacity: 1;
  transform: scale(1.1);
  box-shadow: 0 0 0 2px var(--accent);
}

/* ============================================================
   Home page — Hero
   ============================================================ */
.hero {
  position: relative;
  line-height: 0;      /* collapse gap below img */
  overflow: hidden;
}

.hero__media {
  width: 100%;
}

.hero__media img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 420px;
  object-fit: cover;
  object-position: center 30%;
}

.hero__overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50%;
  display: flex;
  align-items: center;
  padding: 2rem 2.5rem 2rem 1.5rem;
  background: linear-gradient(
    to left,
    rgba(255, 255, 255, .72) 0%,
    rgba(255, 255, 255, .0) 100%
  );
}

.hero__message {
  font-size: clamp(1rem, 2.1vw, 1.35rem);
  color: #003d47;
  line-height: 1.55;
  font-style: italic;
  text-align: right;
  max-width: 420px;
  margin: 0 0 0 auto;
}

/* ============================================================
   Home page — Brand Panel
   ============================================================ */
.brand-panel {
  background: #fff;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(460px, 1.35fr);
  align-items: center;
  gap: 2.5rem;
  padding: 2rem 2.25rem 2.3rem;
  max-width: 100%;
}

.brand-panel__info {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.brand-panel__heading {
  display: flex;
  align-items: flex-end;
  gap: 0.95rem;
  margin-bottom: 0.25rem;
}

.brand-title {
  font-family: var(--brand-font);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--accent);
  margin: 0;
  line-height: 1;
  letter-spacing: 0.01em;
}

.brand-tagline {
  font-family: var(--brand-font);
  font-size: 1rem;
  color: var(--accent);
  font-style: italic;
  margin: 0 0 0.8rem;
}

.brand-stripes {
  display: flex;
  gap: 0.2rem;
  margin-bottom: 0.75rem;
}

.brand-stripes span {
  display: inline-block;
  width: 2.2rem;
  height: 4px;
  border-radius: 2px;
}

.brand-stripes span:nth-child(1) { background: #02A7A3; }
.brand-stripes span:nth-child(2) { background: #006571; }
.brand-stripes span:nth-child(3) { background: #01A89E; }
.brand-stripes span:nth-child(4) { background: #006571; }
.brand-stripes span:nth-child(5) { background: #5B9BD5; }

.brand-url {
  display: inline-block;
  color: #5B9BD5;
  font-size: 0.9rem;
  text-decoration: none;
}

.brand-url:hover { text-decoration: underline; }

.brand-panel__logo img {
  width: 96px;
  height: auto;
  display: block;
}

.brand-panel__message-wrap {
  display: flex;
  align-items: center;
  width: 100%;
}

.brand-panel__message {
  font-family: var(--brand-font);
  font-size: clamp(1.56rem, 2.56vw, 2.4rem);
  font-weight: 400;
  color: #121212;
  line-height: 1.14;
  text-align: left;
  width: 100%;
  margin: 0;
}

.brand-panel__cta .btn-primary {
  width: auto;
  min-width: 200px;
  padding: 0.65rem 1.5rem;
  background: linear-gradient(135deg, #01a89e 0%, #006571 100%);
  border: 0;
  box-shadow: 0 6px 20px rgba(0,101,113,.2);
}

.brand-panel__cta .btn-primary:hover {
  background: linear-gradient(135deg, #01b9af 0%, #00555e 100%);
}

/* ============================================================
   Home page — Responsive
   ============================================================ */
@media (max-width: 1100px) {
  .site-nav__list { gap: 0; }
  .site-nav__list a { padding: 0.35rem 0.5rem; font-size: 0.8125rem; }
}

@media (max-width: 860px) {
  .site-header__inner { height: auto; flex-wrap: wrap; padding: 0.75rem 1rem; gap: 0.75rem; }
  .site-nav { order: 3; flex: 0 0 100%; justify-content: flex-start; }
  .site-nav__list { flex-wrap: wrap; }

  .brand-panel {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.5rem 1.25rem;
  }

  .brand-panel__heading {
    align-items: flex-start;
  }

  .brand-panel__logo img {
    width: 82px;
  }

  .brand-panel__message-wrap {
    justify-content: flex-start;
  }

  .brand-panel__message {
    text-align: left;
    max-width: 100%;
    font-size: 1.35rem;
    line-height: 1.2;
  }

  .brand-panel__cta .btn-primary { width: 100%; }
}

@media (max-width: 480px) {
  .site-nav__list a { font-size: 0.75rem; padding: 0.3rem 0.4rem; }
  .hero__media img { max-height: 240px; }
}

/* ============================================================
   Active nav link (current page indicator)
   ============================================================ */
.site-nav__list a[aria-current="page"] {
  background: rgba(15, 118, 110, .10);
  font-weight: 600;
}

/* ============================================================
   About Us page (slide 4)
   ============================================================ */
.page-about {
  background: var(--bg);
}

.about-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 2.25rem 3.5rem;
}

.about-heading {
  font-family: var(--brand-font);
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 400;
  color: #1a5c77;
  letter-spacing: 0.01em;
  line-height: 1;
  margin-bottom: 0.65rem;
}

.about-main .brand-stripes {
  margin-bottom: 2.25rem;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 0.62fr);
  gap: 3.5rem;
  align-items: start;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.about-para {
  font-family: var(--brand-font);
  font-size: clamp(0.9rem, 1.25vw, 1.05rem);
  color: #333333;
  line-height: 1.75;
  text-align: justify;
  margin: 0;
}

.about-keyword {
  color: #1a5c77;
  font-weight: 700;
  font-style: normal;
}

.about-visual {
  position: sticky;
  top: 84px;
}

.about-visual img {
  width: 100%;
  height: auto;
  display: block;
}

.about-complement {
  margin-top: 2.5rem;
  border-top: 1px solid var(--border);
  width: 100%;
}

.about-complement__photos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  width: 100%;
}

.about-complement__photo {
  margin: 0;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--surface, #f4f4f4);
}

.about-complement__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-complement__photo--placeholder {
  border: 2px dashed var(--border, #ddd);
}

.about-complement__brand {
  display: grid;
  grid-template-columns: auto 90px;
  grid-template-areas:
    "title logo"
    "tagline logo"
    "stripes logo";
  align-items: end;
  column-gap: 0.95rem;
  row-gap: 0.35rem;
  max-width: 560px;
}

.about-complement__title {
  grid-area: title;
  font-family: var(--brand-font);
  font-size: clamp(2rem, 3.8vw, 3rem);
  color: var(--accent);
  line-height: 1;
  margin: 0;
  font-weight: 400;
}

.about-complement__tagline {
  grid-area: tagline;
  font-family: var(--brand-font);
  color: var(--accent);
  font-style: italic;
  margin: 0;
}

.about-complement .brand-stripes {
  grid-area: stripes;
  margin: 0;
}

.about-complement__logo {
  grid-area: logo;
  width: 86px;
  height: auto;
  display: block;
}

/* About — Responsive */
@media (max-width: 860px) {
  .about-content {
    grid-template-columns: 1fr;
  }

  .about-visual {
    position: static;
    order: -1;
    max-width: 320px;
    margin: 0 auto 1.5rem;
  }

  .about-para {
    text-align: left;
  }

  /* tablet: full width, tighter gap */
  .about-complement__photos {
    gap: 0;
  }
}

@media (max-width: 600px) {
  /* mobile: 2-column grid, full width */
  .about-complement__photos {
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
  }
}

@media (max-width: 480px) {
  .about-main { padding: 1.5rem 1rem 2.5rem; }
}

/* ============================================================
   Profile Page Styles
   ============================================================ */
.profile-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem;
}

.profile-section {
  background-color: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.profile-section h2 {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--accent);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.info-item label {
  display: block;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-item p {
  font-size: 1rem;
  color: var(--text);
}

.medication-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.medication-item {
  border-left: 4px solid var(--accent);
  padding-left: 1rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.medication-name {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.medication-details p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.25rem 0;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1rem 0;
}

.timeline-item {
  display: flex;
  gap: 1rem;
  position: relative;
}

.timeline-marker {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #d1d5db;
  flex-shrink: 0;
  margin-top: 0.125rem;
  transition: background-color 0.15s;
}

.timeline-item.completed .timeline-marker {
  background-color: var(--success);
}

.timeline-item.active .timeline-marker {
  background-color: var(--accent);
  box-shadow: 0 0 0 6px rgba(15, 118, 110, 0.1);
}

.timeline-item.pending .timeline-marker {
  background-color: #f3f4f6;
  border: 2px solid #d1d5db;
}

.timeline-content {
  flex: 1;
  padding-top: 0.125rem;
}

.timeline-date {
  font-weight: 500;
  color: var(--text);
}

.profile-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.btn-secondary {
  background-color: #f3f4f6;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background-color: #e5e7eb;
}

/* ============================================================
   Support Page Styles
   ============================================================ */
.support-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.channel-card {
  background-color: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  text-align: center;
  transition: box-shadow 0.15s, transform 0.15s;
}

.channel-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.channel-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.channel-card h2 {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.channel-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.channel-availability,
.channel-sla {
  font-weight: 600;
  color: var(--accent);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.channel-info {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.faq-section {
  background-color: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  margin-bottom: 2rem;
}

.faq-section h2 {
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--accent);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item details {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.faq-item details:last-child {
  border-bottom: none;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
  padding: 0.5rem 0;
  user-select: none;
  transition: color 0.15s;
}

.faq-item summary:hover {
  color: var(--accent-dark);
}

.faq-item p {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.support-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ============================================================
   Adherence Page Styles
   ============================================================ */
.adherence-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
}

.kpi-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.kpi-card {
  background-color: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  text-align: center;
  border-top: 4px solid var(--accent);
}

.kpi-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.kpi-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.kpi-subtext,
.kpi-warning {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.adherence-section {
  background-color: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.adherence-section h2 {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--accent);
}

.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.day-item {
  text-align: center;
}

.day-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.day-status {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  margin: 0 auto;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.day-status.completed {
  background-color: var(--success-bg);
  color: var(--success);
}

.day-status.missed {
  background-color: var(--error-bg);
  color: var(--error);
}

.day-status.pending {
  background-color: #f3f4f6;
  color: #9ca3af;
}

.calendar-legend {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
  justify-content: center;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.status {
  width: 1rem;
  height: 1rem;
  border-radius: 2px;
  display: inline-block;
}

.reminder-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.reminder-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: #f9fafb;
}

.reminder-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
}

.reminder-content {
  flex: 1;
}

.reminder-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.reminder-time {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.btn-toggle {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: #f3f4f6;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
  white-space: nowrap;
  font-weight: 500;
}

.btn-toggle.active {
  background-color: var(--success);
  color: white;
  border-color: var(--success);
}

.tips-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.tip-card {
  background-color: #f9fafb;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.tip-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.tip-card h3 {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.tip-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.adherence-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ============================================================
   Messages/Tickets Page Styles
   ============================================================ */
.messages-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
}

.messages-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-buttons {
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
  font-size: 0.9rem;
  font-weight: 500;
}

.filter-btn.active {
  background-color: var(--accent);
  color: white;
  border-color: var(--accent);
}

.filter-btn:hover:not(.active) {
  border-color: var(--accent);
}

.tickets-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.ticket-item {
  background-color: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  border-left: 4px solid var(--accent);
  transition: box-shadow 0.15s;
}

.ticket-item:hover {
  box-shadow: var(--shadow-md);
}

.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}

.ticket-info {
  flex: 1;
}

.ticket-subject {
  color: var(--text);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.ticket-id {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ticket-status {
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.ticket-status[data-status="open"] {
  background-color: #fef3c7;
  color: #92400e;
}

.ticket-status[data-status="resolved"] {
  background-color: var(--success-bg);
  color: var(--success);
}

.ticket-status[data-status="closed"] {
  background-color: #f3f4f6;
  color: var(--text-muted);
}

.ticket-body {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.ticket-description {
  margin-bottom: 0.75rem;
  color: var(--text);
  line-height: 1.5;
}

.ticket-channel,
.ticket-date {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0.25rem 0;
}

.ticket-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.ticket-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 0.875rem;
}

.priority {
  padding: 0.25rem 0.625rem;
  border-radius: calc(var(--radius) - 0.125rem);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.priority.high {
  background-color: var(--error-bg);
  color: var(--error);
}

.priority.medium {
  background-color: #fef3c7;
  color: #92400e;
}

.priority.low {
  background-color: #e0e7ff;
  color: #3730a3;
}

.responses {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-muted);
}

.btn-sm {
  width: auto;
  padding: 0.375rem 0.75rem !important;
  font-size: 0.8125rem !important;
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background-color: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.messages-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* Responsive adjustments */
@media (max-width: 860px) {
  .messages-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .ticket-header {
    flex-direction: column;
  }

  .ticket-footer {
    justify-content: flex-start;
  }

  .profile-actions,
  .support-actions,
  .adherence-actions,
  .messages-actions {
    flex-direction: column;
  }

  .btn-secondary,
  .btn-primary {
    width: 100% !important;
  }
}

@media (max-width: 600px) {
  .channels-grid,
  .kpi-summary,
  .tips-list,
  .profile-actions,
  .support-actions,
  .adherence-actions,
  .messages-actions {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .calendar-week {
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
  }

  .day-status {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .profile-section,
  .adherence-section,
  .faq-section,
  .ticket-item {
    padding: 1rem;
  }
}
