/* === From style_css.md === */
/* ============================================================
   SwaHealthy — Professional UI v2.0
   Targets your exact class names. 95%+ drop-in accurate.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&family=Sora:wght@600;700&family=Noto+Sans+Bengali:wght@400;500;600&family=Noto+Sans+Devanagari:wght@400;500;600&display=swap');

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  --primary: #8B5CF6;
  --primary-dark: #6D28D9;
  --primary-light: #EDE9FE;
  --accent: #A855F7;
  --accent2: #C084FC;

  --sev-low: #10B981;
  --sev-low-bg: #D1FAE5;
  --sev-med: #F59E0B;
  --sev-med-bg: #FEF3C7;
  --sev-high: #EF4444;
  --sev-high-bg: #FEE2E2;

  --bg: #F8FAFC;
  --surface: rgba(255, 255, 255, 0.7);
  --surface2: rgba(248, 250, 252, 0.6);
  --border: rgba(139, 92, 246, 0.2);
  --border-mid: rgba(139, 92, 246, 0.3);

  --text: #1E293B;
  --text-light: #334155;
  --text-muted: #64748B;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --sh-sm: 0 2px 8px rgba(139, 92, 246, 0.08);
  --sh-md: 0 4px 16px rgba(139, 92, 246, 0.12);
  --sh-lg: 0 10px 32px rgba(139, 92, 246, 0.15);

  --font: 'Plus Jakarta Sans', 'Noto Sans Bengali', 'Noto Sans Devanagari', sans-serif;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  --ease: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

html.app-splash-boot,
html.app-splash-boot body {
  background: #f3f8fb;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(14, 165, 233, 0.08), transparent 25%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.splash-active {
  overflow: hidden;
}

.app-splash {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 2rem;
  opacity: 1;
  visibility: visible;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.92), transparent 28%),
    linear-gradient(155deg, #f8fbff 0%, #eef7ff 42%, #edf6f3 100%);
  transition: opacity 0.52s ease, visibility 0.52s ease, transform 0.52s ease;
}

.app-splash.is-exiting {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.015);
  pointer-events: none;
}

.app-splash[hidden] {
  display: none;
}

.app-splash-bg {
  position: absolute;
  border-radius: 999px;
  filter: blur(14px);
  opacity: 0.9;
  animation: splashFloat 12s ease-in-out infinite alternate;
}

.app-splash-bg-one {
  top: -10%;
  right: -8%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.24), rgba(124, 92, 255, 0.08) 58%, transparent 72%);
}

.app-splash-bg-two {
  bottom: -14%;
  left: -10%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.2), rgba(244, 114, 182, 0.08) 60%, transparent 76%);
  animation-duration: 14s;
  animation-direction: alternate-reverse;
}

.app-splash-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  display: grid;
  justify-items: center;
  gap: 1.15rem;
  text-align: center;
}

.app-splash-mark {
  position: relative;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
}

.app-splash-mark-core {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(145deg, #14b8a6, #0ea5e9);
  box-shadow: 0 16px 34px rgba(14, 165, 233, 0.24);
  color: #fff;
  font-family: 'Sora', var(--font);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.06em;
}

.app-splash-mark-logo {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
}

.app-splash-mark-ring {
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 32px;
  animation: splashPulse 2.2s ease-out infinite;
}

.app-splash-copy {
  display: grid;
  gap: 0.5rem;
}

.app-splash-kicker {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #0f766e;
}

.app-splash-title {
  font-family: 'Sora', var(--font);
  font-size: clamp(2.2rem, 8vw, 3.25rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.07em;
  color: #0f172a;
}

.app-splash-tagline {
  max-width: 30ch;
  font-size: clamp(0.98rem, 3.2vw, 1.08rem);
  line-height: 1.6;
  color: #486076;
}

.app-splash-progress {
  position: relative;
  width: min(100%, 260px);
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.92), 0 8px 20px rgba(56, 189, 248, 0.08);
}

.app-splash-progress-bar {
  position: relative;
  width: 68%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #14b8a6 0%, #38bdf8 52%, #8b5cf6 100%);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.24);
  animation: splashProgress 2.4s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

.app-splash-progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.18) 38%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0.18) 62%, transparent 100%);
  animation: splashShimmer 1.6s linear infinite;
}

.app-splash-status {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #5b7288;
}

@keyframes splashPulse {
  0% {
    opacity: 0.22;
    transform: scale(0.92);
  }
  70% {
    opacity: 0;
    transform: scale(1.14);
  }
  100% {
    opacity: 0;
    transform: scale(1.14);
  }
}

@keyframes splashProgress {
  0% {
    transform: translateX(-85%);
  }
  100% {
    transform: translateX(145%);
  }
}

@keyframes splashShimmer {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}

@keyframes splashFloat {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(10px, 18px, 0) scale(1.06);
  }
}

@media (max-width: 640px) {
  .app-splash {
    padding: 1.5rem;
  }

  .app-splash-shell {
    gap: 1rem;
  }

  .app-splash-mark {
    width: 88px;
    height: 88px;
  }

  .app-splash-mark-core {
    width: 66px;
    height: 66px;
    border-radius: 22px;
    font-size: 1.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-splash,
  .app-splash-bg,
  .app-splash-mark-ring,
  .app-splash-progress-bar {
    animation: none !important;
    transition: none !important;
  }
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
}

/* ============================================================
   NAVBAR  — targets your: .navbar .nav-container .nav-brand
             .nav-controls .lang-toggle .lang-btn .history-link
   ============================================================ */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--sh-sm);
  transition: transform 0.32s cubic-bezier(.4, 0, .2, 1);
  will-change: transform;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.3px;
  text-decoration: none;
  white-space: nowrap;
}

.nav-brand .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent2));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: nowrap;
  overflow-x: auto;
}

/* Language toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-sm);
  padding: 3px 4px;
  gap: 2px;
  margin-right: 0.5rem;
}

.lang-toggle .divider {
  color: var(--border-mid);
  font-size: 0.75rem;
  pointer-events: none;
}

.lang-btn {
  background: none;
  border: none;
  padding: 0.28rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  border-radius: 5px;
  cursor: pointer;
  transition: all var(--ease);
  font-family: var(--font);
  white-space: nowrap;
}

.lang-btn.active,
.lang-btn:hover {
  background: var(--primary);
  color: #fff;
}

/* Nav links (History, Appointments, AI, Profile) */
.history-link {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-light);
  padding: 0.4rem 0.6rem;
  border-radius: var(--r-sm);
  transition: all var(--ease);
  white-space: nowrap;
}

.history-link:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.history-icon {
  font-size: 0.95rem;
}

.nav-controls .history-link {
  display: none;
}

/* Auth links */
.auth-link {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.38rem 0.9rem;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--primary);
  color: var(--primary);
  transition: all var(--ease);
  white-space: nowrap;
}

.auth-link:hover {
  background: var(--primary);
  color: #fff;
}

.logout-link {
  border-color: #ff5252 !important;
  color: #ff5252 !important;
}

.logout-link:hover {
  background: #ff5252 !important;
  color: #fff !important;
}

/* User profile in nav */
.user-profile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.profile-pic {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-mid);
}

.user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  min-height: calc(100vh - 64px);
}

/* ============================================================
   PAGE CONTAINER  — your: .page-container
   ============================================================ */
.page-container {
  max-width: 520px;
  margin: 0 auto;
  padding: 1.5rem 1rem 7rem;
}

/* ============================================================
   PAGE HEADER  — your: .page-header  .subtitle  .title-action  .back-link
   ============================================================ */
.page-header {
  margin-bottom: 1.5rem;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.page-header .subtitle {
  color: var(--text-light);
  margin-top: 0.35rem;
  font-size: 0.92rem;
}

.title-action {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border-mid);
  color: var(--text);
  transition: all var(--ease);
  flex-shrink: 0;
}

.back-link:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

/* ============================================================
   HERO BANNER (index page intro)
   ============================================================ */
.hero-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent2) 100%);
  border-radius: var(--r-xl);
  padding: 1.5rem;
  color: #fff;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -24px;
  right: -24px;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, .08);
  border-radius: 50%;
}

.hero-banner h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.hero-banner p {
  font-size: 0.85rem;
  opacity: .85;
}

/* ============================================================
   GENERIC CARD  — your: .card
   ============================================================ */
.card {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(100, 116, 203, 0.15);
}

/* ============================================================
   SYMPTOM FORM  — your: .symptom-form .symptom-groups
   ============================================================ */
.symptom-groups {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* ============================================================
   GROUP CARD  — your: .group-card .group-header .group-title
                        .group-icon .chevron .group-content.expanded
   ============================================================ */
.group-card {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform var(--ease), box-shadow var(--ease);
}

.group-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.15);
}

.group-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: background var(--ease);
  text-align: left;
}

.group-header:hover {
  background: var(--surface2);
}

.group-header[aria-expanded="true"] {
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.group-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.group-title h2 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.group-icon {
  width: 36px;
  height: 36px;
  background: var(--primary-light);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.chevron {
  color: var(--text-muted);
  transition: transform var(--ease);
  display: flex;
  align-items: center;
}

.group-header[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

/* Collapsible content */
.group-content {
  display: none;
  padding: 0.85rem 1.25rem 1rem;
}

.group-content.expanded {
  display: block;
}

/* ============================================================
   SYMPTOM LIST & ITEMS
   — your: .symptom-list .symptom-item .custom-checkbox
            .checkbox-box .symptom-name
   ============================================================ */
.symptom-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.symptom-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--ease);
  user-select: none;
}

.symptom-item:hover {
  border-color: rgba(13, 148, 136, 0.5);
  background: rgba(255, 255, 255, 0.4);
}

/* Hide native checkbox */
.custom-checkbox {
  display: none;
}

/* Visual checkbox dot */
.checkbox-box {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-mid);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--ease);
  flex-shrink: 0;
  background: var(--surface);
}

.symptom-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  transition: color var(--ease);
}

/* Checked state — CSS only, no JS needed */
.symptom-item:has(.custom-checkbox:checked) {
  background: var(--primary);
  border-color: var(--primary);
}

.symptom-item:has(.custom-checkbox:checked) .checkbox-box {
  background: rgba(255, 255, 255, .25);
  border-color: rgba(255, 255, 255, .7);
}

.symptom-item:has(.custom-checkbox:checked) .checkbox-box::after {
  content: '✓';
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
}

.symptom-item:has(.custom-checkbox:checked) .symptom-name {
  color: #fff;
}

/* ============================================================
   STICKY FOOTER (Submit button area)  — your: .sticky-footer
   ============================================================ */
.sticky-footer {
  position: sticky;
  bottom: 0;
  background: linear-gradient(to top, var(--bg) 80%, transparent);
  padding: 1rem 0 0.5rem;
  margin-top: 0.5rem;
}

/* ============================================================
   HOME PAGE POLISH
   Targets: .home-page .home-hero .home-tabs .home-group-card
            .home-nearby-card .home-wellness-card
   ============================================================ */
.home-page {
  position: relative;
}

.home-page::before {
  content: '';
  position: absolute;
  inset: -40px 0 auto 0;
  width: 100%;
  height: 320px;
  background:
    radial-gradient(circle at 12% 18%, rgba(244, 114, 182, 0.24), transparent 34%),
    radial-gradient(circle at 78% 12%, rgba(59, 130, 246, 0.22), transparent 36%),
    radial-gradient(circle at 62% 52%, rgba(14, 165, 233, 0.18), transparent 32%),
    radial-gradient(circle at 30% 70%, rgba(168, 85, 247, 0.16), transparent 36%);
  filter: blur(10px);
  animation: homeMeshFloat 14s ease-in-out infinite alternate;
  pointer-events: none;
}

.home-hero {
  position: relative;
  overflow: hidden;
  padding: 1.4rem;
  margin-bottom: 1rem;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.96), transparent 30%),
    radial-gradient(circle at 82% 12%, rgba(191, 219, 254, 0.9), transparent 28%),
    radial-gradient(circle at 72% 78%, rgba(224, 231, 255, 0.82), transparent 32%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.94), rgba(239, 246, 255, 0.86) 38%, rgba(238, 242, 255, 0.84) 100%);
  box-shadow: 0 22px 48px rgba(76, 99, 156, 0.14);
}

.home-hero::before,
.home-hero::after {
  content: '';
  position: absolute;
  inset: auto;
  pointer-events: none;
}

.home-hero::before {
  top: -18%;
  right: -6%;
  width: 230px;
  height: 230px;
  border-radius: 42% 58% 64% 36%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.24), rgba(124, 92, 255, 0.06) 58%, transparent 72%);
  animation: homeHeroBlob 16s ease-in-out infinite alternate;
}

.home-hero::after {
  left: -8%;
  bottom: -28%;
  width: 220px;
  height: 220px;
  border-radius: 54% 46% 58% 42%;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.15), rgba(14, 165, 233, 0.06) 56%, transparent 74%);
  animation: homeHeroBlob 13s ease-in-out infinite alternate-reverse;
}

.home-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.8rem;
  margin-bottom: 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(99, 102, 241, 0.16);
  color: #4f46e5;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.1);
}

.home-header {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
}

.home-greeting-bar {
  margin: 0 0 1rem;
  padding: 0.95rem 1rem;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.58));
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 16px 32px rgba(148, 163, 184, 0.1);
  backdrop-filter: blur(14px);
}

.home-greeting-kicker {
  display: inline-block;
  margin-bottom: 0.25rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7c5cff;
}

.home-greeting-title {
  font-size: 1.32rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text);
}

.home-header h1 {
  font-size: clamp(1.9rem, 4vw, 2.3rem);
}

.home-header .subtitle {
  max-width: 28rem;
  font-size: 0.96rem;
  line-height: 1.6;
}

.home-hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.hero-stat {
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.56));
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 10px 22px rgba(148, 163, 184, 0.08);
  backdrop-filter: blur(12px);
}

.hero-stat strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
}

.hero-stat span {
  display: block;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.home-tabs {
  margin-bottom: 1.25rem;
  padding: 5px;
  border-color: rgba(139, 92, 246, 0.14);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 30px rgba(148, 163, 184, 0.12);
}

@media (max-width: 640px) {
  .home-greeting-bar {
    padding: 0.9rem 0.95rem;
    border-radius: 20px;
  }

  .home-greeting-title {
    font-size: 1.45rem;
  }
}

.home-tabs .appt-tab-btn {
  position: relative;
  min-height: 48px;
  font-size: 0.88rem;
}

.home-tabs .appt-tab-btn.active {
  background: linear-gradient(135deg, #7c5cff, #5f8bff);
  box-shadow: 0 10px 22px rgba(110, 108, 255, 0.28);
}

.home-tabs .appt-tab-btn:not(.active) {
  color: #6b7a96;
}

.home-tab-panel {
  animation: fadeSlideIn 0.28s ease;
}

.home-group-card {
  --group-accent: #7c5cff;
  --group-accent-soft: rgba(124, 92, 255, 0.16);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.54));
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.home-group-card::before {
  content: '';
  position: absolute;
  inset: 10px auto 10px 10px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--group-accent), rgba(255, 255, 255, 0.2));
  opacity: 0.9;
}

.home-group-card:hover {
  box-shadow: 0 18px 34px rgba(94, 112, 179, 0.14);
}

.home-group-card .group-header {
  padding: 1.15rem 1.1rem 1.15rem 1.25rem;
}

.home-group-card .group-header:hover,
.home-group-card .group-header[aria-expanded="true"] {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.12), transparent),
    linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.28));
}

.group-copy {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.home-group-card .group-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'Sora', var(--font);
  font-size: clamp(1.1rem, 2.6vw, 1.28rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.035em;
  text-wrap: balance;
  color: var(--group-accent);
}

.home-group-card .group-meta {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-muted);
}

.home-group-card .group-icon {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.5)),
    linear-gradient(135deg, var(--group-accent-soft), rgba(255, 255, 255, 0.24));
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 8px 18px rgba(99, 102, 241, 0.12);
  font-size: 1.4rem;
  color: var(--group-accent);
}

.home-group-card .chevron {
  color: var(--group-accent);
  transform: scale(1.05);
}

.home-group-card .chevron svg {
  width: 22px;
  height: 22px;
}

.home-group-card[data-area="head"] {
  --group-accent: #ec4899;
  --group-accent-soft: rgba(236, 72, 153, 0.18);
}

.home-group-card[data-area="eyes"] {
  --group-accent: #0ea5e9;
  --group-accent-soft: rgba(14, 165, 233, 0.18);
}

.home-group-card[data-area="ears"] {
  --group-accent: #8b5cf6;
  --group-accent-soft: rgba(139, 92, 246, 0.18);
}

.home-group-card[data-area="chest"] {
  --group-accent: #f97316;
  --group-accent-soft: rgba(249, 115, 22, 0.18);
}

.home-group-card[data-area="stomach"] {
  --group-accent: #14b8a6;
  --group-accent-soft: rgba(20, 184, 166, 0.18);
}

.home-group-card[data-area="joints"] {
  --group-accent: #f59e0b;
  --group-accent-soft: rgba(245, 158, 11, 0.18);
}

.home-group-card[data-area="urinary"] {
  --group-accent: #2563eb;
  --group-accent-soft: rgba(37, 99, 235, 0.18);
}

.home-group-card[data-area="women"] {
  --group-accent: #db2777;
  --group-accent-soft: rgba(219, 39, 119, 0.18);
}

.home-group-card[data-area="skin"] {
  --group-accent: #22c55e;
  --group-accent-soft: rgba(34, 197, 94, 0.18);
}

.home-group-card[data-area="general"] {
  --group-accent: #6366f1;
  --group-accent-soft: rgba(99, 102, 241, 0.18);
}

.home-group-card[data-area="mental"] {
  --group-accent: #06b6d4;
  --group-accent-soft: rgba(6, 182, 212, 0.18);
}

.home-group-card .group-content {
  padding-top: 0.15rem;
}

@keyframes homeMeshFloat {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(0, 18px, 0) scale(1.03);
  }
}

@keyframes homeHeroBlob {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
  100% {
    transform: translate3d(8px, 14px, 0) rotate(14deg) scale(1.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page::before,
  .home-hero::before,
  .home-hero::after {
    animation: none;
  }
}

@media (max-width: 640px) {
  .home-group-card .group-header {
    padding: 1.12rem 1rem 1.12rem 1.18rem;
  }

  .home-group-card .group-label {
    font-size: 1.18rem;
  }

  .home-group-card .group-meta {
    font-size: 0.94rem;
  }
}

.home-group-card .symptom-item {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.7);
}

.home-group-card .symptom-item:hover {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(96, 165, 250, 0.3);
  box-shadow: 0 10px 20px rgba(148, 163, 184, 0.12);
}

.home-group-card .symptom-item:has(.custom-checkbox:checked) {
  background: linear-gradient(135deg, #6d5efc, #588af7);
  border-color: transparent;
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.22);
}

.home-sticky-footer {
  padding-top: 1.2rem;
  background: linear-gradient(to top, rgba(248, 250, 252, 0.98) 70%, rgba(248, 250, 252, 0));
}

.home-sticky-footer .btn-primary {
  min-height: 54px;
  border-radius: 18px;
  background: linear-gradient(135deg, #6d5efc, #588af7);
  box-shadow: 0 14px 28px rgba(99, 102, 241, 0.26);
}

.home-nearby-card {
  padding: 1.8rem 1.3rem;
  border-radius: 24px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(231, 244, 255, 0.86));
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 32px rgba(59, 130, 246, 0.09);
  text-align: center;
}

.nearby-illustration {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.18), rgba(16, 185, 129, 0.16));
}

.home-nearby-card h3 {
  margin-bottom: 0.45rem;
  font-size: 1.05rem;
}

.home-nearby-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.nearby-pill-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.home-nearby-status-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.nearby-pill {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(96, 165, 250, 0.16);
  color: #42638f;
  font-size: 0.78rem;
  font-weight: 700;
}

.home-nearby-loading {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.home-facility-list {
  margin-top: 1.1rem;
  text-align: left;
}

.home-facility-list .facility-item {
  padding: 0.9rem 0;
}

.home-wellness-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background:
    linear-gradient(135deg, rgba(237, 233, 254, 0.96), rgba(224, 242, 254, 0.92));
  box-shadow: 0 18px 36px rgba(110, 108, 255, 0.12);
  text-decoration: none;
  transition: transform var(--ease), box-shadow var(--ease);
}

.home-wellness-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px rgba(110, 108, 255, 0.16);
}

.home-wellness-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.55rem;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.home-wellness-copy {
  flex: 1;
}

.home-wellness-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.home-wellness-subtitle {
  font-size: 0.82rem;
  color: var(--text-light);
}

.home-wellness-arrow {
  font-size: 1.2rem;
  color: #5b4db2;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   BUTTONS  — your: .btn .btn-primary .btn-secondary
              .btn-light .btn-block .btn-icon .mt-4
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: var(--r-md);
  padding: 0.8rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--ease);
  font-family: var(--font);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.8), rgba(20, 184, 166, 0.8));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  box-shadow: 0 4px 14px rgba(13, 148, 136, .25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, .45);
  color: #fff;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.4);
  color: var(--primary-dark);
}

.btn-light {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-light:hover {
  background: rgba(255, 255, 255, 0.5);
  color: var(--primary);
  border-color: var(--primary);
}

.btn-block {
  width: 100%;
}

.btn-icon {
  gap: 0.6rem;
}

.mt-4 {
  margin-top: 1.5rem;
}

/* ============================================================
   FAB — SOS  — your: .sos-fab .sos-icon .sos-label
                      + .upload-fab (AI Photo on index)
   ============================================================ */
.sos-fab {
  position: fixed;
  bottom: 5.65rem;
  right: 1rem;
  width: 64px;
  height: 64px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.2), transparent 45%),
    linear-gradient(160deg, #fb7185, #ef4444 58%, #dc2626);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  box-shadow: 0 18px 36px rgba(239, 68, 68, 0.26);
  z-index: 200;
  transition: transform var(--ease), box-shadow var(--ease), filter var(--ease);
  font-family: var(--font);
  text-decoration: none;
  backdrop-filter: blur(14px);
}

.sos-fab:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 42px rgba(239, 68, 68, 0.3);
  filter: saturate(1.05);
}

.brain-fab {
  position: fixed;
  bottom: 10.2rem;
  right: 1rem;
  z-index: 210;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 142px;
  height: 52px;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.22), transparent 48%),
    linear-gradient(135deg, #9b6bff, #d946ef 62%, #ec4899);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 18px 36px rgba(168, 85, 247, 0.24);
  transition: transform var(--ease), box-shadow var(--ease), filter var(--ease);
  font-size: 0;
  backdrop-filter: blur(14px);
}

.brain-fab:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 42px rgba(168, 85, 247, 0.28);
  filter: saturate(1.05);
}

.brain-fab::before {
  content: none !important;
  display: none !important;
}

.brain-label {
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brain-fab::after {
  content: 'MindCare';
  display: block;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

@keyframes brain-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (max-width: 640px) {
  .brain-fab {
    bottom: 9.95rem;
    right: 1rem;
    min-width: 132px;
    height: 48px;
    padding: 0.44rem 0.88rem;
  }

  .brain-fab::before {
    content: none !important;
    display: none !important;
  }

  .brain-label {
    font-size: 0.62rem;
  }

  .brain-fab::after {
    font-size: 0.7rem;
    letter-spacing: 0.11em;
  }
}

.sos-icon {
  font-size: 1.18rem;
  line-height: 1;
}

.sos-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* AI Photo FAB (sits above SOS) */
.upload-fab {
  bottom: 5.5rem;
  background: linear-gradient(135deg, var(--primary), var(--accent2));
}

.upload-fab:hover {
  transform: scale(1.08);
  color: #fff;
}

/* ============================================================
   SOS MODAL  — your: .sos-overlay .sos-card .sos-high-alert
                       .sos-buttons .sos-btn .sos-close-btn
   ============================================================ */
.sos-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(4px);
  z-index: 1002;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}

.sos-overlay.open {
  display: flex;
}

.sos-card {
  background: var(--surface);
  border-radius: var(--r-xl) var(--r-xl) var(--r-lg) var(--r-lg);
  padding: 1.75rem 1.5rem;
  width: 100%;
  max-width: 480px;
  animation: slideUp .3s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sos-card h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.1rem;
  text-align: center;
}

.sos-high-alert {
  background: var(--sev-high-bg);
  border: 1px solid #FECACA;
  border-radius: var(--r-md);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #991B1B;
  font-weight: 500;
  margin-bottom: 1rem;
  text-align: center;
}

.sos-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.sos-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1.1rem;
  background: var(--bg);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--r-md);
  text-decoration: none;
  transition: all var(--ease);
}

.sos-btn:hover {
  background: var(--sev-high-bg);
  border-color: var(--sev-high);
}

.sos-btn .btn-icon {
  font-size: 1.1rem;
}

.sos-btn .btn-label {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.sos-btn .btn-num {
  font-size: 1rem;
  font-weight: 700;
  color: var(--sev-high);
}

.sos-close-btn {
  width: 100%;
  padding: 0.8rem;
  border: 1.5px solid var(--border-mid);
  border-radius: var(--r-md);
  background: none;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--ease);
}

.sos-close-btn:hover {
  background: var(--bg);
  color: var(--text);
}

/* ============================================================
   SEVERITY BADGE  — your: .severity-badge .low .medium .high .mini
   ============================================================ */
.severity-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1rem;
  border-radius: var(--r-md);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
  letter-spacing: 0.4px;
  flex-shrink: 0;
}

.severity-badge.low {
  background: var(--sev-low-bg);
  color: var(--sev-low);
}

.severity-badge.medium {
  background: var(--sev-med-bg);
  color: var(--sev-med);
}

.severity-badge.high {
  background: var(--sev-high-bg);
  color: var(--sev-high);
}

.severity-badge.mini {
  padding: 0.2rem 0.6rem;
  font-size: 0.68rem;
  border-radius: 50px;
}

/* ============================================================
   RESULTS PAGE  — your: .results-page .loading-state .spinner
                          .results-container .result-card
                          .result-header .pre-title .condition-title
   ============================================================ */
.results-page {}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
  gap: 1rem;
  color: var(--text-light);
  font-size: 0.95rem;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.results-container {}

/* Photo card (AI CTA at top of results) */
.photo-card {
  border-left: 4px solid var(--primary) !important;
  text-align: center;
}

.photo-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

/* Result main card */
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 0;
  overflow: hidden;
  box-shadow: var(--sh-md);
  margin-bottom: 1rem;
}

.result-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent2) 100%);
  padding: 1.75rem 1.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.result-header::after {
  content: '⚕';
  position: absolute;
  right: 1rem;
  bottom: -0.5rem;
  font-size: 4rem;
  opacity: .1;
  pointer-events: none;
}

.pre-title {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: rgba(255, 255, 255, .75);
  display: block;
  margin-bottom: 0.35rem;
}

.condition-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
  line-height: 1.2;
  margin: 0;
}

.result-header .severity-badge {
  background: rgba(255, 255, 255, .2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .3);
  backdrop-filter: blur(4px);
  white-space: nowrap;
  margin-top: 0.25rem;
}

.result-description {
  padding: 1rem 1.5rem 0;
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* ============================================================
   ALERT BOXES  — your: .alert-box .doctor-alert .emergency-alert
                         .duration-alert
   ============================================================ */
.alert-box {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem 1.5rem;
  border-left: 4px solid transparent;
}

.alert-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.alert-content strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.alert-content p {
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
}

.doctor-alert {
  background: var(--sev-med-bg);
  border-left-color: var(--sev-med);
}

.doctor-alert .alert-content strong {
  color: #92400E;
}

.doctor-alert .alert-content p {
  color: #78350F;
}

.emergency-alert {
  background: var(--sev-high-bg);
  border-left-color: var(--sev-high);
}

.emergency-alert .alert-content strong {
  color: #991B1B;
}

.emergency-alert .alert-content p {
  color: #7F1D1D;
}

.duration-alert {
  background: #EFF6FF;
  border-left-color: #3B82F6;
}

.duration-alert .alert-content p {
  color: #1E40AF;
  font-weight: 500;
}

/* ============================================================
   FIRST AID  — your: .first-aid-section .first-aid-list .step-list
   ============================================================ */
.first-aid-section {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
}

.first-aid-section h3 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.list-wrapper {}

.first-aid-list,
.step-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0;
}

.first-aid-list li,
.step-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
  counter-increment: step;
}

.first-aid-list li::before,
.step-list li::before {
  content: counter(step);
  min-width: 26px;
  height: 26px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.first-aid-list {
  counter-reset: step;
}

.step-list {
  counter-reset: step;
}

/* ============================================================
   TABS  — your: .med-tab-row .med-tab .tab-content.active
   ============================================================ */
.med-tab-row {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--border);
  background: var(--surface2);
  overflow-x: auto;
}

.med-tab {
  flex: 1;
  padding: 0.75rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  transition: all var(--ease);
  font-family: var(--font);
  white-space: nowrap;
  min-width: 0;
}

.med-tab.active,
.med-tab:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--primary-light);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ============================================================
   FACILITIES  — your: .facilities-card .facilities-header
                        .loc-icon .loc-status .map-container
                        .facility-list .facility-list-wrapper
   ============================================================ */
.facilities-card {
  border-radius: 0 0 var(--r-xl) var(--r-xl) !important;
  margin-bottom: 0 !important;
}

.facilities-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.facilities-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  flex: 1;
}

.loc-icon {
  font-size: 1.1rem;
}

.loc-status {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  border: 1px solid var(--border-mid);
}

.map-container {
  width: 100%;
  height: 220px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 0.85rem;
}

#fac-map {
  width: 100%;
  height: 100%;
}

.facility-list-wrapper {}

.facility-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

.facility-list li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.facility-list li:last-child {
  border-bottom: none;
}

/* ============================================================
   MEDICINES  — your: .medicines-card .medicines-header .med-icon
                       .medicines-subtitle .medicines-count
                       .medicines-list .medicines-empty
   ============================================================ */
.medicines-card,
.medicines-required-card {
  border-radius: 0 0 var(--r-xl) var(--r-xl) !important;
  margin-bottom: 0 !important;
}

.medicines-header,
.medications-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.medicines-header h3,
.medications-head h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

.med-icon {
  font-size: 1.1rem;
}

.medicines-subtitle {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.medicines-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.6rem;
}

.medicines-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.medicines-empty {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  padding: 1.5rem 0;
}

.recommended-meds {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ============================================================
   DOCTOR CTA  — your: #doctor-booking-cta .doctor-cta
                        .cta-icon .cta-text
   ============================================================ */
.doctor-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-light), #E0F2FE);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--r-lg);
  margin: 0 1.5rem 1rem;
  transition: all var(--ease);
  text-decoration: none;
}

.doctor-cta:hover {
  border-color: var(--primary);
  box-shadow: var(--sh-sm);
  transform: translateY(-1px);
}

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

.cta-text strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.cta-text p {
  font-size: 0.8rem;
  color: var(--text-light);
  margin: 0;
}

/* ============================================================
   ALTERNATES  — your: .alternates-section .alternates-list
   ============================================================ */
.alternates-section {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
}

.alternates-section h3 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* ============================================================
   RESULTS PAGE POLISH
   Targets: .results-photo-card .clean-result-card .clean-alert
            .clean-panel-card .clean-action-buttons
   ============================================================ */
.results-loading-state {
  min-height: 50vh;
}

.results-photo-card {
  position: relative;
  overflow: hidden;
  padding: 1.55rem 1.25rem !important;
  border-left: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.72) !important;
  background:
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.16), transparent 32%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.88));
  box-shadow: 0 18px 34px rgba(59, 130, 246, 0.09);
}

.results-photo-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7c5cff, #5fb2ff);
}

.results-photo-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 0.85rem;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #7c5cff, #5fb2ff);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 14px 24px rgba(95, 104, 255, 0.24);
}

.results-photo-copy {
  margin-bottom: 1rem !important;
  color: var(--text-light);
  line-height: 1.6;
}

.results-photo-btn {
  min-width: 170px;
  min-height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #14b8a6, #38bdf8);
  box-shadow: 0 14px 26px rgba(20, 184, 166, 0.22);
}

.clean-result-card {
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.93));
  box-shadow: 0 24px 40px rgba(15, 23, 42, 0.08);
}

.clean-result-header {
  padding: 1.45rem 1.3rem 1.2rem;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.14), transparent 28%),
    linear-gradient(135deg, #7c5cff 0%, #9a63f3 45%, #5f8bff 100%);
}

.clean-result-header::after {
  content: '';
  position: absolute;
  width: 140px;
  height: 140px;
  right: -34px;
  bottom: -58px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 70%);
  pointer-events: none;
}

.result-header-copy {
  position: relative;
  z-index: 1;
}

.clean-result-header .severity-badge {
  position: relative;
  z-index: 1;
  min-height: 44px;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.result-body {
  padding: 0 1rem 1rem;
}

.clean-result-card .result-description {
  padding: 1.1rem 0.2rem 0.25rem;
  font-size: 0.94rem;
  line-height: 1.7;
}

.result-alert-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.clean-alert {
  padding: 1rem 1rem;
  border-left: 0;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.clean-alert .alert-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.clean-alert .alert-icon svg,
.recommended-meds-icon svg,
.clean-panel-card .loc-icon svg,
.clean-panel-card .med-icon svg {
  width: 18px;
  height: 18px;
}

.doctor-alert.clean-alert .alert-icon {
  color: #b45309;
}

.emergency-alert.clean-alert .alert-icon {
  color: #b91c1c;
}

.duration-alert.clean-alert .alert-icon {
  color: #1d4ed8;
}

.clean-first-aid-section {
  margin-top: 1.1rem;
  padding: 1.2rem 0.2rem 0;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.section-heading {
  margin-bottom: 0.9rem;
}

.section-kicker {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.section-subcopy {
  font-size: 0.84rem;
  color: var(--text-light);
  line-height: 1.6;
}

.clean-first-aid-section .first-aid-list li,
.clean-first-aid-section .step-list li {
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 10px 22px rgba(148, 163, 184, 0.08);
}

.clean-first-aid-section .first-aid-list li::before,
.clean-first-aid-section .step-list li::before {
  min-width: 30px;
  height: 30px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.16), rgba(95, 178, 255, 0.18));
  color: #4c1d95;
}

.clean-recommended-widget {
  margin-top: 1.2rem;
  padding: 1rem 0.2rem 0 !important;
  border-top: 1px solid rgba(148, 163, 184, 0.16) !important;
}

.recommended-meds-header {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

.recommended-meds-icon,
.clean-panel-card .loc-icon,
.clean-panel-card .med-icon,
.clean-doctor-cta .cta-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.14), rgba(95, 178, 255, 0.16));
  color: #5b4db2;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.user-location-icon,
.facility-icon {
  background: transparent;
  border: 0;
}

.map-marker {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.92);
}

.map-marker::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 12px;
  height: 12px;
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
  border-right: 2px solid rgba(255, 255, 255, 0.92);
  border-bottom: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 2px;
}

.map-marker svg {
  position: relative;
  z-index: 1;
}

.map-marker-user {
  background: linear-gradient(135deg, #14b8a6, #0ea5e9);
}

.map-marker-aushadhi {
  background: linear-gradient(135deg, #7c5cff, #8b5cf6);
}

.map-marker-facility {
  background: linear-gradient(135deg, #ec4899, #ef4444);
}

.recommended-meds-header h3 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 0.2rem;
}

.recommended-meds-header p {
  font-size: 0.84rem;
  color: #475569;
  line-height: 1.6;
}

.recommended-meds-header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 0.9rem;
}

.recommended-meds-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #4f46e5;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(14, 165, 233, 0.12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.recommended-meds {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.72rem;
}

.clean-recommended-widget {
  position: relative;
  overflow: hidden;
  padding: 1rem 1rem 0.95rem;
  margin-top: 1rem;
  border: 1px solid rgba(129, 140, 248, 0.16);
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.28), transparent 30%),
    linear-gradient(135deg, #eef4ff 0%, #edf7ff 48%, #f4f0ff 100%);
  box-shadow: 0 14px 30px rgba(99, 102, 241, 0.10);
}

.clean-recommended-widget::before {
  content: '';
  position: absolute;
  inset: auto;
  top: -38px;
  right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.14), transparent 68%);
}

.recommended-meds .med-pill,
.med-pills-wrap .med-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  min-height: 34px;
  padding: 0.48rem 0.86rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(99, 102, 241, 0.16);
  color: #4338ca;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.recommended-meds .med-pill {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(99, 102, 241, 0.18);
  color: #4338ca;
}

.recommended-meds {
  align-items: flex-start;
  gap: 0.6rem;
}

.recommended-meds-header {
  position: relative;
  z-index: 1;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.recommended-meds-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(99, 102, 241, 0.12);
  color: #4f46e5;
}

.recommended-meds-header h3 {
  color: #5b21b6;
}

.recommended-meds-header p {
  color: #475569;
}

@media (max-width: 640px) {
  .clean-recommended-widget {
    padding: 0.92rem 0.88rem 0.88rem;
    border-radius: 18px;
  }

  .recommended-meds {
    gap: 0.5rem;
  }

  .recommended-meds .med-pill {
    min-height: 32px;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    font-size: 0.75rem;
  }
}

.clean-med-tab-row {
  margin-top: 1.35rem;
  padding: 0.32rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(241, 245, 249, 0.82);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.3rem;
}

.clean-med-tab-row .med-tab {
  min-height: 46px;
  padding: 0.7rem 0.6rem;
  border-radius: 14px;
  border-bottom: none;
  font-size: 0.81rem;
  line-height: 1.15;
  color: #64748b;
  white-space: normal;
}

.clean-med-tab-row .med-tab.active,
.clean-med-tab-row .med-tab:hover {
  color: #4f46e5;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(99, 102, 241, 0.12);
}

.clean-panel-card {
  margin-top: 0.85rem;
  border-radius: 22px !important;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px rgba(148, 163, 184, 0.08);
}

.clean-panel-card .facilities-header,
.clean-panel-card .medicines-header {
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.panel-heading-copy {
  flex: 1;
}

.panel-heading-copy h3 {
  margin-bottom: 0.2rem;
}

.panel-heading-copy .medicines-subtitle {
  margin-bottom: 0;
}

.clean-panel-card .loc-status {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(148, 163, 184, 0.18);
}

.loc-status-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.45rem;
}

.clean-panel-card .map-container {
  min-height: 300px;
  border-radius: 20px;
  border-color: rgba(148, 163, 184, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.facility-item {
  justify-content: space-between;
  padding: 1rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.94));
  box-shadow: 0 10px 20px rgba(148, 163, 184, 0.08);
}

.fac-name,
.med-fac-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.fac-meta,
.med-fac-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.fac-dist,
.med-fac-dist {
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.1);
  color: #5b4db2;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.medicine-facility-card {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 10px 22px rgba(148, 163, 184, 0.08);
}

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

.med-card-info {
  flex: 1;
}

.med-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.clean-doctor-cta {
  margin: 1.1rem 0.2rem 0;
  padding: 1rem 1rem;
  border: 1px solid rgba(95, 178, 255, 0.16);
  background: linear-gradient(135deg, rgba(237, 233, 254, 0.92), rgba(224, 242, 254, 0.88));
  box-shadow: 0 14px 28px rgba(95, 104, 255, 0.09);
}

.alternates-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.alternate-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.clean-disclaimer-block {
  padding: 1rem 1.1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 10px 22px rgba(148, 163, 184, 0.08);
}

.clean-action-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.clean-action-buttons .btn {
  min-height: 52px;
  border-radius: 18px;
}

@media (max-width: 640px) {
  .clean-result-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .clean-result-header .severity-badge {
    margin-top: 0.5rem;
  }

  .clean-panel-card .facilities-header {
    flex-wrap: wrap;
  }

  .med-card-header,
  .facility-item,
  .alternate-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .clean-action-buttons {
    grid-template-columns: 1fr;
  }
}

.alternates-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Alternate condition card (injected by JS) */
.alternate-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-md);
}

.alternate-card .alt-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
}

/* ============================================================
   ACTION BUTTONS  — your: .action-buttons
   ============================================================ */
.action-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.action-buttons .btn {
  flex: 1;
}

/* ============================================================
   DISCLAIMER  — your: .disclaimer-block .disclaimer-title
                        .disclaimer-text
   ============================================================ */
.disclaimer-block {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 1rem 1.1rem;
  margin-top: 1.25rem;
}

.disclaimer-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.disclaimer-text {
  font-size: 0.78rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* ============================================================
   HISTORY PAGE  — your: .history-header .history-list
                          .history-card .history-meta
                          .history-date .history-condition
                          .history-symptoms .history-footer
                          .history-lang .view-details-link
                          .clear-history-container .clear-btn
   ============================================================ */
.history-header {}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.history-card {
  background: rgba(255, 255, 255, 0.3) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  border-radius: var(--r-lg) !important;
  transition: box-shadow var(--ease), transform var(--ease);
}

.history-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
  transform: translateY(-2px);
}

.history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.history-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.history-condition {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.history-symptoms {
  margin-bottom: 0.75rem;
  padding: 0.6rem 0.85rem;
  background: var(--bg);
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}

.history-sym-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 0.4rem;
}

.history-sym-names {
  font-size: 0.82rem;
  color: var(--text-light);
}

.history-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 0.65rem;
}

.history-lang {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.view-details-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  transition: color var(--ease);
}

.view-details-link:hover {
  color: var(--primary-dark);
}

.clear-history-container {
  margin-top: 0.5rem;
}

.clear-btn {
  border-color: #FECACA !important;
  color: var(--sev-high) !important;
}

.clear-btn:hover {
  background: var(--sev-high) !important;
  color: #fff !important;
  border-color: var(--sev-high) !important;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  color: var(--text-muted);
}

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

.empty-state h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.empty-state p {
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.mt-1 {
  margin-top: 0.5rem
}

.mt-2 {
  margin-top: 1rem
}

.mt-3 {
  margin-top: 1.25rem
}

.mt-4 {
  margin-top: 1.5rem
}

.mb-1 {
  margin-bottom: 0.5rem
}

.mb-2 {
  margin-bottom: 1rem
}

.text-center {
  text-align: center
}

.text-muted {
  color: var(--text-muted)
}

.divider {
  color: var(--border-mid)
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  .nav-controls {
    gap: 0.1rem;
  }

  .history-link span:not(.history-icon) {
    display: none;
  }

  .history-link {
    padding: 0.4rem;
  }

  .user-name {
    display: none;
  }

  .page-container {
    padding: 1.25rem 0.85rem 7rem;
  }

  .result-header {
    padding: 1.25rem 1.1rem;
  }

  .first-aid-section {
    padding: 1rem 1.1rem;
  }

  .alternates-section {
    padding: 1rem 1.1rem;
  }

  .doctor-cta {
    margin: 0 1rem 1rem;
  }

  .action-buttons {
    flex-direction: column;
  }
}

@media (min-width: 768px) {
  .sos-fab {
    bottom: 2rem;
    right: 2rem;
  }

  .upload-fab {
    bottom: 6.5rem;
  }
}

/* === From swahealthy_additions_css.md === */
/* ============================================================
   ADDITIONS v2.1 — Profile, AI Analysis, Appointments
   Paste at the bottom of static/css/style.css
   ============================================================ */

/* ============================================================
   PROFILE PAGE
   Targets: .profile-page-container .profile-card
            .profile-icon-wrapper .gender-options-grid
            .gender-option .option-content .form-control #save-msg
   ============================================================ */
.profile-page-container {
  background: linear-gradient(135deg, var(--bg) 0%, var(--primary-light) 100%) !important;
  margin: 0 !important;
  max-width: 100% !important;
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.profile-card {
  max-width: 460px !important;
  width: 100% !important;
  padding: 2.25rem !important;
  border-radius: var(--r-xl) !important;
  box-shadow: var(--sh-lg) !important;
  border: none !important;
  border-top: 4px solid var(--primary) !important;
  background: var(--surface) !important;
}

.profile-icon-wrapper {
  width: 80px !important;
  height: 80px !important;
  background: var(--primary-light) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto 1.25rem !important;
}

.profile-card h2 {
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  letter-spacing: -0.3px !important;
}

.profile-card p {
  color: var(--text-light) !important;
  font-size: 0.88rem !important;
  margin-top: 0.4rem !important;
}

/* Form labels inside profile */
.profile-card label[data-i18n="age_label"],
.profile-card label[data-i18n="gender_label"] {
  display: block !important;
  margin-bottom: 0.5rem !important;
  font-weight: 600 !important;
  font-size: 0.88rem !important;
  color: var(--text) !important;
}

/* Text inputs */
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border-mid);
  font-size: 0.95rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  transition: all var(--ease);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, .12);
}

/* Gender grid */
.gender-options-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 0.75rem !important;
}

.gender-option {
  cursor: pointer;
}

.option-content {
  background: var(--bg) !important;
  border: 1.5px solid var(--border-mid) !important;
  padding: 0.85rem !important;
  border-radius: var(--r-md) !important;
  text-align: center !important;
  transition: all var(--ease) !important;
  font-weight: 500 !important;
  color: var(--text) !important;
  font-size: 0.9rem !important;
}

.gender-option:hover .option-content {
  border-color: var(--primary) !important;
  background: var(--primary-light) !important;
}

.gender-option input:checked+.option-content {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 12px rgba(13, 148, 136, .3) !important;
}

/* Profile save button override */
.profile-card .btn-primary {
  padding: 1rem !important;
  font-size: 1rem !important;
  border-radius: var(--r-lg) !important;
  margin-top: 0.5rem !important;
}

/* Save success message */
#save-msg {
  text-align: center !important;
  margin-top: 0.85rem !important;
  color: var(--sev-low) !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  background: var(--sev-low-bg) !important;
  border-radius: var(--r-md) !important;
  padding: 0.65rem !important;
}

/* ============================================================
   AI ANALYSIS PAGE
   Targets: .photo-card .upload-area #ai-drop-zone
            #ai-upload-prompt .upload-icon
            #ai-photo-preview-container
            .photo-header .photo-details .photo-rec-box
            .photo-conditions-list .photo-disclaimer
            .remove-photo-btn
   ============================================================ */

.ai-analysis-page {
  max-width: 620px;
}

.ai-analysis-intro {
  position: relative;
  overflow: hidden;
  margin-bottom: 1.25rem;
  padding: 1.35rem 1.2rem 1rem;
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(22, 163, 74, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(240, 249, 255, 0.92));
  border: 1px solid rgba(45, 212, 191, 0.18);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

.ai-analysis-intro::after {
  content: '';
  position: absolute;
  right: -24px;
  bottom: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(45, 212, 191, 0.12);
}

.ai-analysis-intro__copy {
  position: relative;
  z-index: 1;
}

.ai-analysis-intro__eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.55rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.1);
  color: #0f766e;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ai-analysis-intro h2 {
  max-width: 17ch;
  margin-bottom: 0.45rem;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.ai-analysis-intro p {
  max-width: 46ch;
  color: var(--text-light);
  font-size: 0.92rem;
}

.ai-analysis-intro__tips {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.ai-analysis-intro__tips span {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #0f172a;
  font-size: 0.8rem;
  font-weight: 600;
}

#ai-upload-card {
  position: relative;
  max-width: 600px !important;
  margin: 0 auto 1rem !important;
  padding: 1rem !important;
  border: 1px solid rgba(45, 212, 191, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 252, 0.92));
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

#ai-upload-card::before,
#ai-assessment-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #14b8a6, #38bdf8);
}

.upload-area {
  position: relative;
  border: 2px dashed rgba(45, 212, 191, 0.45);
  border-radius: 22px;
  cursor: pointer;
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease), background var(--ease);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(236, 253, 245, 0.85));
}

.upload-area::before {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 18px;
  border: 1px solid rgba(191, 219, 254, 0.55);
  pointer-events: none;
}

.upload-area:hover {
  transform: translateY(-1px);
  border-color: #14b8a6;
  box-shadow: 0 16px 30px rgba(20, 184, 166, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(224, 242, 254, 0.9));
}

#ai-upload-prompt {
  text-align: center;
  padding: 2.9rem 1.5rem 2.5rem;
}

.upload-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  height: 88px;
  margin-bottom: 1rem !important;
  padding: 0 1rem;
  border-radius: 24px;
  background: linear-gradient(135deg, #0f766e, #22c55e);
  color: #fff;
  font-size: 1.1rem !important;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 18px 30px rgba(15, 118, 110, 0.24);
}

#ai-upload-prompt p {
  font-size: 0.96rem;
  color: var(--text);
  line-height: 1.7;
}

#ai-upload-prompt small {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

#ai-photo-preview-container {
  padding: 1rem;
}

.ai-preview-frame {
  padding: 0.8rem;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(224, 231, 255, 0.72));
  box-shadow: inset 0 0 0 1px rgba(165, 180, 252, 0.28);
}

#ai-photo-preview {
  width: 100%;
  max-height: 320px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.12);
}

#ai-action-buttons {
  display: flex !important;
  gap: 0.85rem !important;
  justify-content: center !important;
  padding: 1rem 0 0 !important;
  margin-top: 0 !important;
}

#ai-action-buttons .btn {
  flex: 1;
  min-height: 50px;
  border-radius: 16px;
  font-weight: 700;
  box-shadow: none;
}

.remove-photo-btn {
  background: linear-gradient(180deg, #fff3f0, #ffe3de) !important;
  color: #d1432a !important;
  border: 1px solid rgba(209, 67, 42, 0.16) !important;
}

.remove-photo-btn:hover {
  background: linear-gradient(180deg, #ffe1db, #ffd1c8) !important;
  color: #b62f18 !important;
}

.ai-analyze-btn {
  border: 0 !important;
  background: linear-gradient(135deg, #14b8a6, #38bdf8) !important;
  box-shadow: 0 16px 28px rgba(20, 184, 166, 0.22) !important;
}

.ai-analyze-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(20, 184, 166, 0.28) !important;
}

#ai-loading-state {
  margin: 2rem 0 !important;
  padding: 1.25rem 1rem !important;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

#ai-assessment-card {
  position: relative;
  max-width: 600px !important;
  margin: 0 auto !important;
  padding: 1.1rem 1rem 1rem !important;
  border-left: 0 !important;
  border: 1px solid rgba(56, 189, 248, 0.16) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 252, 0.94)) !important;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.photo-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18) !important;
  padding-bottom: 1rem !important;
  margin-bottom: 1rem !important;
}

.photo-header-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.photo-header h3 {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.02em;
}

.photo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.16), rgba(56, 189, 248, 0.16));
  color: #0f766e;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.photo-details p {
  font-size: 0.96rem;
  color: var(--text);
  line-height: 1.72;
}

.photo-section {
  margin-bottom: 1rem;
}

.photo-section-label {
  margin-bottom: 0.35rem;
}

.photo-observed-text {
  color: var(--text-light) !important;
}

.photo-details strong {
  font-weight: 700;
  color: var(--text);
}

.photo-conditions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.45rem 0 0;
}

.photo-conditions-list span,
.photo-conditions-list div {
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.98), rgba(224, 242, 254, 0.9));
  color: #0f766e;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 999px;
  padding: 0.42rem 0.82rem;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.35;
}

.photo-rec-box {
  margin-top: 1.2rem;
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(236, 253, 245, 0.95)) !important;
  padding: 1rem !important;
  border-radius: 18px !important;
  border: 1px solid rgba(56, 189, 248, 0.16) !important;
  border-left: 0 !important;
  font-size: 0.92rem !important;
  line-height: 1.7 !important;
  color: #0f3f57 !important;
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
}

.rec-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #14b8a6, #38bdf8);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.photo-disclaimer {
  margin-top: 1rem !important;
  text-align: center !important;
}

.photo-disclaimer small {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

.ai-assessment-actions {
  margin-top: 1rem;
  text-align: center;
}

.ai-reset-btn {
  min-height: 48px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

@media (max-width: 640px) {
  .ai-analysis-intro {
    padding: 1.15rem 1rem 0.95rem;
    border-radius: 22px;
  }

  .ai-analysis-intro h2 {
    max-width: none;
    font-size: 1.18rem;
  }

  .upload-icon {
    min-width: 74px;
    height: 74px;
    border-radius: 20px;
    font-size: 0.98rem !important;
  }

  #ai-action-buttons {
    flex-direction: column !important;
  }

  .photo-header {
    flex-direction: column;
    align-items: stretch !important;
  }

  .photo-header-main {
    align-items: center;
  }

  .severity-badge.mini {
    align-self: flex-start;
  }
}

/* ============================================================
   APPOINTMENTS PAGE
   Targets: .appt-page .appt-hero .appt-hero-icon
            .appt-hero-title .appt-hero-sub
            .appt-tabs .appt-tab-btn .appt-tab-pane
            .appt-section .appt-section-title
            .appt-doctor-grid .appt-doc-card .appt-doc-avatar
            .appt-doc-info .appt-doc-name .appt-doc-spec
            .appt-date-input .appt-slots-grid .appt-hint
            .appt-form .appt-form-group .appt-input .appt-textarea
            .appt-my-card .status-badge .btn-cancel
   ============================================================ */
.appt-page {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 1rem 120px !important;
}

/* Hero */
.appt-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent2) 100%);
  border-radius: var(--r-xl);
  padding: 1.5rem;
  margin: 1.25rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.appt-hero::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, .08);
  border-radius: 50%;
}

.appt-hero-icon {
  font-size: 2rem;
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, .2);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.appt-hero-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.2rem;
  letter-spacing: -0.3px;
}

.appt-hero-sub {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, .85);
  margin: 0;
  line-height: 1.4;
}

/* Tabs */
.appt-tabs {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 4px;
  gap: 4px;
  margin-bottom: 1.25rem;
  box-shadow: var(--sh-sm);
}

.appt-tab-btn {
  flex: 1;
  padding: 0.65rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  border: none;
  background: none;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--ease);
  font-family: var(--font);
  white-space: nowrap;
}

.appt-tab-btn.active {
  background: var(--primary);
  color: #fff !important;
  border-bottom: none !important;
  box-shadow: 0 2px 8px rgba(13, 148, 136, .3);
}

.appt-tab-btn:not(.active):hover {
  background: var(--primary-light);
  color: var(--primary);
}

.appt-tab-pane {
  display: none;
}

.appt-tab-pane.active {
  display: block;
}

/* Section */
.appt-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--sh-sm);
}

.appt-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Doctor grid */
.appt-doctor-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.appt-doc-card {
  padding: 1rem;
  border: 1.5px solid var(--border-mid);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--ease);
  background: var(--bg);
}

.appt-doc-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: var(--sh-sm);
}

.appt-doc-card.selected {
  border-color: var(--primary) !important;
  background: var(--primary-light) !important;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, .15) !important;
}

.appt-doc-avatar {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--accent2));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.appt-doc-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.appt-doc-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.appt-doc-spec {
  font-size: 0.78rem;
  color: var(--text-light);
  font-weight: 500;
}

/* Date input */
.appt-date-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border-mid);
  border-radius: var(--r-md);
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  transition: all var(--ease);
  outline: none;
  margin-bottom: 1rem;
}

.appt-date-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, .12);
}

/* Slots */
.appt-slots-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.appt-slot-btn {
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--border-mid);
  border-radius: 50px;
  background: var(--bg);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font);
  transition: all var(--ease);
}

.appt-slot-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.appt-slot-btn.active {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 2px 8px rgba(13, 148, 136, .3);
}

.appt-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0.5rem 0;
  text-align: center;
  width: 100%;
}

/* Booking form */
.appt-form {}

.appt-form-group {
  margin-bottom: 1rem;
}

.appt-form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.appt-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border-mid);
  border-radius: var(--r-md);
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  transition: all var(--ease);
  outline: none;
}

.appt-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, .12);
}

.appt-textarea {
  resize: vertical;
  min-height: 90px;
}

/* My appointments cards */
.appt-my-card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--r-lg) !important;
  padding: 1rem 1.25rem !important;
  margin-bottom: 0.75rem !important;
  box-shadow: var(--sh-sm);
  transition: box-shadow var(--ease);
}

.appt-my-card:hover {
  box-shadow: var(--sh-md);
}

/* Status badges */
.status-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.status-badge.pending {
  background: var(--sev-med-bg);
  color: var(--sev-med);
}

.status-badge.confirmed {
  background: var(--sev-low-bg);
  color: var(--sev-low);
}

.status-badge.cancelled {
  background: var(--sev-high-bg);
  color: var(--sev-high);
}

/* Cancel button */
.btn-cancel {
  background: none;
  border: 1.5px solid var(--sev-high);
  color: var(--sev-high);
  padding: 0.35rem 0.8rem;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font);
  transition: all var(--ease);
}

.btn-cancel:hover {
  background: var(--sev-high);
  color: #fff;
}

/* Step hidden */
.step-hidden {
  display: none !important;
}

/* Success modal reuses .sos-overlay — already styled */

/* === From missing_pages_css.md === */
/* ============================================================
   LOGIN PAGE
   Targets: .login-container .login-card .google-login-btn .google-icon
   ============================================================ */

.login-container {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, var(--bg) 0%, var(--primary-light) 100%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 2.5rem 2rem;
  box-shadow: var(--sh-lg);
  border-top: 4px solid var(--primary);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Decorative background circle */
.login-card::before {
  content: '⚕';
  position: absolute;
  top: -1rem;
  right: -0.5rem;
  font-size: 7rem;
  opacity: 0.04;
  pointer-events: none;
  line-height: 1;
}

.login-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.4px;
  margin-bottom: 0.65rem;
  line-height: 1.25;
}

.login-card p {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.65;
  margin-bottom: 2rem;
  padding: 0 0.5rem;
}

/* Divider line above button */
.login-card::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent2));
  border-radius: 99px;
  margin: 0 auto 1.75rem;
}

.google-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.9rem 1.5rem;
  background: var(--surface);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--r-lg);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font);
  text-decoration: none;
  transition: all var(--ease);
  box-shadow: var(--sh-sm);
  position: relative;
  overflow: hidden;
}

.google-login-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-light), transparent);
  opacity: 0;
  transition: opacity var(--ease);
}

.google-login-btn:hover {
  border-color: var(--primary);
  box-shadow: var(--sh-md);
  transform: translateY(-1px);
  color: var(--text);
}

.google-login-btn:hover::before {
  opacity: 1;
}

.google-login-btn:active {
  transform: translateY(0);
}

.google-icon {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* Trust badge below button */
.login-trust {
  margin-top: 1.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

/* ============================================================
   DURATION PAGE
   Targets: .duration-page-container .duration-card
            .duration-icon-wrapper .duration-options-grid
            .duration-option .option-content .option-text
   ============================================================ */

.duration-page-container {
  background: linear-gradient(135deg, var(--bg) 0%, var(--primary-light) 100%) !important;
  margin: 0 !important;
  max-width: 100% !important;
  min-height: calc(100vh - 64px);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 2rem 1rem !important;
}

.duration-card {
  max-width: 480px !important;
  width: 100% !important;
  padding: 2.25rem !important;
  border-radius: var(--r-xl) !important;
  box-shadow: var(--sh-lg) !important;
  border: none !important;
  border-top: 4px solid var(--primary) !important;
  background: var(--surface) !important;
  transition: none !important;
}

.duration-icon-wrapper {
  width: 72px !important;
  height: 72px !important;
  background: var(--primary-light) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto 1.25rem !important;
  font-size: 2rem !important;
}

.duration-card h2 {
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  letter-spacing: -0.3px !important;
  line-height: 1.3 !important;
}

.duration-card>div>p {
  color: var(--text-light) !important;
  font-size: 0.88rem !important;
  margin-top: 0.4rem !important;
}

/* Duration options grid */
.duration-options-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 0.75rem !important;
  margin-bottom: 1.75rem !important;
}

.duration-option {
  cursor: pointer;
}

/* Override duration's own .option-content
   (profile page shares this class — both get same treatment) */
.duration-option .option-content {
  background: var(--bg) !important;
  border: 1.5px solid var(--border-mid) !important;
  padding: 1rem !important;
  border-radius: var(--r-md) !important;
  text-align: center !important;
  transition: all var(--ease) !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  font-size: 0.9rem !important;
}

.duration-option:hover .option-content {
  border-color: var(--primary) !important;
  background: var(--primary-light) !important;
  transform: translateY(-1px) !important;
}

.duration-option input:checked+.option-content {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3) !important;
  transform: translateY(-1px) !important;
}

.option-text {
  font-size: 0.9rem;
  font-weight: 600;
  display: block;
}

/* Override duration's inline button style to match design system */
.duration-card .btn-primary {
  padding: 1rem !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  border-radius: var(--r-lg) !important;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35) !important;
}

.duration-card .btn-primary:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.45) !important;
}

.pulse-hover:hover {
  transform: translateY(-1px) !important;
  /* Override the scale() from inline — translateY matches design system */
}

/* Responsive */
@media (max-width: 480px) {
  .duration-card {
    padding: 1.5rem !important;
  }

  .duration-options-grid {
    grid-template-columns: 1fr !important;
  }

  .login-card {
    padding: 1.75rem 1.25rem;
  }
}



/* === From gaps_css.md === */
/* ============================================================
   GAPS v1.0 — Everything in original style.css not covered
   by style_css.md. All updated to teal design system.
   ============================================================ */

/* ============================================================
   FONT SWITCHING — body.font-bn / body.font-hi
   ============================================================ */
body.font-bn {
  font-family: 'Noto Sans Bengali', var(--font) !important;
}

body.font-hi {
  font-family: 'Noto Sans Devanagari', var(--font) !important;
}

/* ============================================================
   SOS PULSE ANIMATION
   ============================================================ */
@keyframes sos-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
  }

  70% {
    box-shadow: 0 0 0 14px rgba(220, 38, 38, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
  }
}

.sos-fab {
  animation: sos-pulse 2.2s ease-in-out infinite;
}

/* ============================================================
   FACILITY ITEMS — .facility-item .fac-name .fac-meta .fac-dist
   (used inside .facility-list on results page)
   ============================================================ */
.facility-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.facility-item:last-child {
  padding-bottom: 1rem;
}

.fac-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #4338ca;
  margin-bottom: 0.28rem;
}

.fac-meta {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.5;
}

.fac-dist {
  font-size: 0.75rem;
  font-weight: 700;
  color: #5b21b6;
  background: rgba(124, 92, 255, 0.12);
  padding: 0.42rem 0.72rem;
  border-radius: 50px;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid rgba(124, 92, 255, 0.22);
}

/* ============================================================
   MEDICINE FACILITY CARDS
   .medicine-facility-card .med-card-header .med-card-info
   .med-fac-name .med-fac-meta .med-fac-dist
   .med-pills-wrap .med-pill .medicines-count
   ============================================================ */
.medicine-facility-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.85rem 1rem 0.75rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--sh-sm);
  transition: box-shadow var(--ease);
}

.medicine-facility-card:hover {
  box-shadow: var(--sh-md);
}

.med-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.med-card-info {
  min-width: 0;
  flex: 1;
}

.med-fac-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.med-fac-meta {
  font-size: 0.78rem;
  color: var(--text-light);
  line-height: 1.4;
}

.med-fac-dist {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50px;
  padding: 0.2rem 0.65rem;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid var(--border-mid);
}

.med-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.med-pill {
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 1px solid var(--border-mid);
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
}

/* ============================================================
   ALTERNATE ITEM — .alternate-item
   (old class name alias for .alternate-card)
   ============================================================ */
.alternate-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-md);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
}

/* ============================================================
   AI PHOTO UPLOAD — .photo-upload-card .upload-header
   .upload-desc .optional-tag #upload-prompt
   #photo-preview-container #photo-preview
   .photo-content-grid .photo-preview-thumbnail
   ============================================================ */
.photo-upload-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--sh-sm);
}

.upload-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.4rem;
}

.upload-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.optional-tag {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border-mid);
  padding: 0.1rem 0.5rem;
  border-radius: 50px;
  margin-left: 0.25rem;
}

.upload-desc {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 0.85rem;
}

#upload-prompt {
  text-align: center;
  padding: 1.75rem 1rem;
}

#upload-prompt p {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  margin: 0.5rem 0 0.25rem;
}

#upload-prompt small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

#photo-preview-container {
  position: relative;
  display: inline-block;
  width: 100%;
  text-align: center;
}

#photo-preview {
  max-height: 220px;
  max-width: 100%;
  border-radius: var(--r-md);
  object-fit: contain;
  display: block;
  margin: 0 auto;
  box-shadow: var(--sh-sm);
  border: 1px solid var(--border);
}

.photo-content-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 600px) {
  .photo-content-grid {
    flex-direction: row;
    align-items: flex-start;
  }
}

.photo-preview-thumbnail {
  flex-shrink: 0;
  width: 100%;
  max-width: 130px;
  margin: 0 auto;
}

.photo-preview-thumbnail img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  box-shadow: var(--sh-sm);
}

/* ============================================================
   APPOINTMENTS EXTRAS
   .appt-days .appt-day-chip .appt-select-indicator
   .appt-lookup-row .appt-lookup-btn .appt-submit-btn
   ============================================================ */
.appt-days {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 0.4rem;
}

.appt-day-chip {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 50px;
  border: 1px solid var(--border-mid);
}

.appt-select-indicator {
  font-size: 1.2rem;
  color: var(--border-mid);
  transition: color var(--ease);
  flex-shrink: 0;
}

.appt-doc-card.selected .appt-select-indicator {
  color: var(--primary);
}

.appt-lookup-row {
  display: flex;
  gap: 0.65rem;
  margin: 0.75rem 0 1.25rem;
}

.appt-lookup-row .appt-input {
  flex: 1;
}

.appt-lookup-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  white-space: nowrap;
  transition: all var(--ease);
  flex-shrink: 0;
}

.appt-lookup-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* Appointments submit — alias for btn btn-primary */
.appt-submit-btn {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
  border-radius: var(--r-lg);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--ease);
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
  margin-top: 0.5rem;
}

.appt-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.45);
}

/* ============================================================
   APPOINTMENTS SUCCESS MODAL
   .appt-modal-bg .appt-modal-card .appt-modal-icon
   .appt-modal-title .appt-modal-msg .appt-modal-done-btn
   (separate from SOS overlay)
   ============================================================ */
.appt-modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  /* toggled by JS */
  align-items: center;
  justify-content: center;
  z-index: 1003;
  padding: 1.25rem;
  backdrop-filter: blur(4px);
}

/* JS sets display:flex to show */
.appt-modal-bg[style*="flex"] {
  animation: overlayFadeIn 0.2s ease;
}

@keyframes overlayFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.appt-modal-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 2.25rem 1.75rem;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: var(--sh-lg);
  border-top: 4px solid var(--primary);
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.appt-modal-icon {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 0.75rem;
}

.appt-modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5rem;
  letter-spacing: -0.3px;
}

.appt-modal-msg {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

.appt-modal-done-btn {
  width: 100%;
  padding: 0.95rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
  border-radius: var(--r-lg);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--ease);
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
}

.appt-modal-done-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.45);
}

/* ============================================================
   DURATION RADIO BUTTONS — .duration-btn .btn-text
   (alternative radio style used in duration.html)
   ============================================================ */
.duration-btn {
  display: block;
  cursor: pointer;
  position: relative;
}

.duration-btn input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 0;
  height: 0;
}

.duration-btn .btn-text {
  display: block;
  padding: 0.85rem 1rem;
  text-align: center;
  background: var(--bg);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-light);
  transition: all var(--ease);
}

.duration-btn:hover .btn-text {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.duration-btn input:checked+.btn-text {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

/* ============================================================
   MEDICINES DRAWER & FAB
   ============================================================ */

#medicines-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(4px);
  z-index: 998;
}

#medicines-overlay.open {
  display: block;
}

#medicines-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  /* Solid surface so list text is never washed out over the blurred overlay */
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 1.5rem;
  z-index: 999;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  max-height: 70vh;
  overflow-y: auto;
  color: var(--text);
}

#medicines-drawer h3 {
  color: var(--text);
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

#drawer-medicines-list {
  color: var(--text);
}

.drawer-medicines-empty {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0.5rem 0;
  line-height: 1.5;
}

#medicines-drawer.open {
  transform: translateY(0);
}

.drawer-handle {
  width: 40px;
  height: 4px;
  background: var(--border-mid);
  border-radius: 2px;
  margin: 0 auto 1.25rem;
}

.med-chip {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 50px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.25rem;
}

.drawer-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 1rem;
  font-style: italic;
}

/* ============================================================
   PROFILE DASHBOARD v2
   ============================================================ */

.profile-page-container {
  background: var(--bg) !important;
  padding: 0 !important;
  align-items: flex-start !important;
  min-height: calc(100vh - 64px);
}

.profile-card {
  max-width: 100% !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  background: var(--bg) !important;
  width: 100%;
}

/* Hero */
.profile-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent2) 100%);
  padding: 2rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.profile-hero-deco1 {
  position: absolute;
  top: -30px;
  right: -30px;
  width: 140px;
  height: 140px;
  background: rgba(255, 255, 255, .08);
  border-radius: 50%;
  pointer-events: none;
}

.profile-hero-deco2 {
  position: absolute;
  bottom: -40px;
  left: -20px;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, .05);
  border-radius: 50%;
  pointer-events: none;
}

.profile-avatar-ring {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  border: 3px solid rgba(255, 255, 255, .5);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  backdrop-filter: blur(4px);
  overflow: hidden;
}

.profile-avatar-ring svg {
  width: 54px;
  height: 54px;
}

.profile-hero-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff !important;
  margin: 0 0 0.25rem;
  letter-spacing: -0.3px;
}

.profile-hero-sub {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, .75) !important;
  margin: 0 0 1.25rem;
}

/* Stats row */
.profile-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: rgba(255, 255, 255, .15);
  border-radius: var(--r-lg);
  padding: 0.75rem 1rem;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .2);
  max-width: 280px;
  margin: 0 auto;
}

.profile-stat {
  flex: 1;
  text-align: center;
}

.profile-stat-value {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  margin-bottom: 0.2rem;
}

.profile-stat-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .75);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-stat-divider {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, .25);
  flex-shrink: 0;
}

/* Form section */
.profile-form-section {
  background: var(--surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  margin-top: -1.75rem;
  padding: 1.75rem 1.25rem 6rem;
  position: relative;
  z-index: 1;
  box-shadow: 0 -4px 20px rgba(13, 148, 136, .08);
  min-height: 60vh;
}

.profile-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Field groups */
.profile-field-group {
  margin-bottom: 1.25rem;
}

.profile-field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.profile-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.profile-input-icon {
  position: absolute;
  left: 0.85rem;
  font-size: 1rem;
  pointer-events: none;
}

.profile-input {
  padding-left: 2.5rem !important;
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--border-mid) !important;
  border-radius: var(--r-md) !important;
  font-size: 1rem !important;
  color: var(--text) !important;
  background: var(--bg) !important;
  transition: all var(--ease) !important;
}

.profile-input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, .12) !important;
  background: var(--surface) !important;
  outline: none !important;
}

/* Gender grid */
.gender-options-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 0.65rem !important;
}

.gender-option {
  cursor: pointer;
}

.option-content {
  background: var(--bg) !important;
  border: 1.5px solid var(--border-mid) !important;
  padding: 0.85rem 0.5rem !important;
  border-radius: var(--r-md) !important;
  text-align: center !important;
  transition: all var(--ease) !important;
  font-weight: 600 !important;
  font-size: 0.88rem !important;
  color: var(--text) !important;
  line-height: 1.3 !important;
}

.gender-option:hover .option-content {
  border-color: var(--primary) !important;
  background: var(--primary-light) !important;
}

.gender-option input:checked+.option-content {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(13, 148, 136, .3) !important;
}

/* Save button */
.profile-save-btn {
  padding: 1rem !important;
  font-size: 1rem !important;
  border-radius: var(--r-lg) !important;
  margin-top: 0.5rem !important;
  gap: 0.5rem !important;
}

/* Save message */
#save-msg {
  display: none;
  text-align: center;
  margin-top: 0.85rem;
  color: var(--sev-low);
  font-weight: 600;
  font-size: 0.88rem;
  background: var(--sev-low-bg);
  border-radius: var(--r-md);
  padding: 0.65rem;
}

/* Quick actions grid */
.profile-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.profile-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1rem 0.5rem;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  text-decoration: none;
  transition: all var(--ease);
}

.profile-action-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--sh-sm);
}

.profile-action-icon {
  font-size: 1.5rem;
}

.profile-action-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

/* App info section */
.profile-app-info {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 1rem;
}

.profile-app-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}

.profile-app-info-row:last-child {
  border-bottom: none;
}

.profile-app-info-row span:first-child {
  color: var(--text-light);
  font-weight: 500;
}

.profile-app-info-row span:last-child {
  color: var(--text);
  font-weight: 600;
}

/* Logout button */
.profile-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.9rem;
  margin-top: 0.5rem;
  background: none;
  border: 1.5px solid #FECACA;
  border-radius: var(--r-lg);
  color: var(--sev-high) !important;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--ease);
  text-decoration: none !important;
}

.profile-logout-btn:hover {
  background: var(--sev-high-bg);
  border-color: var(--sev-high);
  transform: translateY(-1px);
}

/* ============================================================
   CONSULTATION FLOATING WIDGET
   Sits above SOS, below AI Photo FAB
   ============================================================ */
.consult-fab {
  position: fixed;
  bottom: 9rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #7C3AED, #A855F7);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1rem 0.6rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(124, 58, 237, .4);
  z-index: 199;
  transition: all var(--ease);
  text-decoration: none;
  letter-spacing: 0.2px;
  animation: consultPulse 3s ease-in-out infinite;
}

.consult-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(124, 58, 237, .5);
  color: #fff;
}

.consult-fab-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.consult-fab-text {
  white-space: nowrap;
}

@keyframes consultPulse {

  0%,
  100% {
    box-shadow: 0 4px 16px rgba(124, 58, 237, .4);
  }

  50% {
    box-shadow: 0 4px 24px rgba(124, 58, 237, .65);
  }
}

/* Stack order on mobile */
@media (max-width: 767px) {
  .consult-fab {
    bottom: 9rem;
    right: 1rem;
  }

  .upload-fab {
    bottom: 12rem !important;
  }
}

@media (min-width: 768px) {
  .consult-fab {
    bottom: 10rem;
    right: 2rem;
  }
}

/* ============================================================
   APPOINTMENTS PAGE — Doctor Cards, Modal, Categories
   ============================================================ */

/* Category filter */
.category-filter-wrap {
  margin-bottom: 1rem;
}

.category-filter {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}

.category-filter::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  flex-shrink: 0;
  padding: 0.45rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--ease);
  border: 1.5px solid var(--border-mid);
  background: var(--surface);
  color: var(--text-light);
}

.cat-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(13, 148, 136, .3);
}

/* DOCTOR GRID AND CARDS */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.doc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.1rem;
  box-shadow: var(--sh-sm);
  transition: all var(--ease);
}

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

.doc-card-top {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.doc-avatar-wrap {
  position: relative;
}

.doc-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #fff;
  font-weight: bold;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc-online-dot {
  width: 10px;
  height: 10px;
  background: #22C55E;
  border-radius: 50%;
  position: absolute;
  bottom: 2px;
  right: 2px;
  border: 2px solid var(--surface);
}

.doc-specialty-pill {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  display: inline-block;
  margin-bottom: 0.25rem;
}

.doc-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.doc-rating .star {
  color: #F59E0B;
}

.doc-rating .rating-val {
  font-weight: 700;
  color: var(--text);
}

.doc-rating .rating-count {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.doc-divider {
  height: 1px;
  background: var(--border);
  margin: 0.75rem 0;
}

.doc-avail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.avail-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.avail-slots {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--sev-low);
}

.doc-book-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--accent2));
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 0.65rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.75rem;
  font-family: var(--font);
  transition: all var(--ease);
}

.doc-book-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(13, 148, 136, .4);
}

/* DATE STRIP */
.doc-date-strip {
  display: flex;
  gap: 0.3rem;
  justify-content: flex-start;
  margin: 0.6rem 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
}

.doc-date-strip::-webkit-scrollbar {
  display: none;
}

.date-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

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

.date-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border-mid);
  cursor: pointer;
  transition: all var(--ease);
}

.date-circle.today {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(13, 148, 136, .35);
}

.date-circle.past {
  color: var(--text-muted);
  border-color: var(--border);
  cursor: default;
  opacity: 0.5;
}

.date-circle.selected {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
  font-weight: 700;
}

/* MODAL STYLES */
#docModal {
  align-items: center;
}

.doc-modal-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 1.5rem 1.25rem;
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  animation: fadeIn .3s ease;
  scrollbar-width: thin;
  scrollbar-color: var(--border-mid) transparent;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.doc-modal-header {
  display: flex;
  flex-direction: row;
  gap: 0.85rem;
  align-items: flex-start;
  position: relative;
}

.doc-modal-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: #fff;
  font-weight: bold;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc-modal-specialty {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 50px;
  padding: 0.2rem 0.65rem;
  display: inline-block;
  margin-bottom: 0.25rem;
}

.doc-modal-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.15rem;
}

.doc-modal-creds {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
}

.doc-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border-mid);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--ease);
}

.doc-stats-row {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}

.doc-stat-pill {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-md);
  padding: 0.65rem 0.5rem;
  text-align: center;
}

.doc-stat-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.doc-stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.doc-modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin: 0.75rem 0 0;
}

.doc-mtab {
  flex: 1;
  padding: 0.65rem 0.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--ease);
}

.doc-mtab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.doc-mtab-content {
  padding: 1rem 0;
}

/* ABOUT TAB */
.about-bio {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* AVAILABILITY TAB */
.avail-pick-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 0.5rem;
}

.slot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.slot-pill {
  padding: 0.45rem 0.9rem;
  border: 1.5px solid var(--border-mid);
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--ease);
}

.slot-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(13, 148, 136, .3);
}

/* FEES TAB */
.fee-boxes-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.fee-box {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-lg);
  padding: 1rem;
  text-align: center;
}

.fee-icon {
  font-size: 1.4rem;
  margin-bottom: 0.35rem;
}

.fee-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.fee-amount {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.fee-note {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.fee-extras-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.fee-extra-pill {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 50px;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
}

/* REVIEWS TAB */
.review-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.9rem 1rem;
  margin-bottom: 0.65rem;
}

.review-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.review-stars {
  color: #F59E0B;
  font-size: 0.78rem;
}

.review-comment {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 0.35rem;
  line-height: 1.55;
}

/* TOAST */
.appt-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--primary);
  color: #fff;
  padding: 0.65rem 1.5rem;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font);
  box-shadow: var(--sh-lg);
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
}

.appt-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   AI ASSISTANT CARD
   ============================================================ */
.assistant-card {
  padding: 0 !important;
  overflow: hidden;
  border: none !important;
  box-shadow: var(--sh-lg) !important;
}

.asst-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent2) 100%);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
}

.asst-hero::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 130px;
  height: 130px;
  background: rgba(255, 255, 255, .08);
  border-radius: 50%;
}

.asst-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.asst-greeting h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.2rem;
}

.asst-greeting p {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, .85);
  margin: 0;
}

.asst-avatar {
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, .2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.daily-tip-pill {
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50px;
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  backdrop-filter: blur(4px);
}

.asst-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  padding: 1rem;
  background: var(--surface);
}

.asst-feature-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 0.75rem;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--ease);
}

.asst-feature-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: var(--sh-sm);
}

.feat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.feat-icon-chat {
  background: #DBEAFE;
}

.feat-icon-photo {
  background: #FEF3C7;
}

.feat-icon-symptoms {
  background: #FCE7F3;
}

.feat-icon-fac {
  background: #D1FAE5;
}

.feat-icon-med {
  background: #EDE9FE;
}

.feat-icon-history {
  background: #FEE2E2;
}

.feat-text strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.feat-text span {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.mood-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-wrap: wrap;
}

.mood-row label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-light);
  flex-shrink: 0;
}

.mood-btn {
  background: var(--bg);
  border: 1.5px solid var(--border-mid);
  border-radius: 50px;
  padding: 0.3rem 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--ease);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font);
  color: var(--text);
}

.mood-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.mood-btn.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.asst-chat-panel {
  border-top: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
}

.chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}

.chat-panel-header h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.chat-close-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.2rem;
}

.chat-messages {
  padding: 0.85rem 1rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.chat-bubble {
  max-width: 85%;
  padding: 0.65rem 0.9rem;
  border-radius: var(--r-lg);
  font-size: 0.87rem;
  line-height: 1.55;
}

.user-bubble {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.asst-bubble {
  align-self: flex-start;
  background: var(--bg);
  border: 1px solid var(--border-mid);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 0.5rem 0.75rem;
}

.typing-dot {
  width: 7px;
  height: 7px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typingBounce 1s infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: .15s
}

.typing-dot:nth-child(3) {
  animation-delay: .3s
}

@keyframes typingBounce {

  0%,
  60%,
  100% {
    transform: translateY(0)
  }

  30% {
    transform: translateY(-6px)
  }
}

.chat-input-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  border: 1.5px solid var(--border-mid);
  border-radius: var(--r-md);
  padding: 0.6rem 0.85rem;
  font-size: 0.88rem;
  font-family: var(--font);
  color: var(--text);
  resize: none;
  min-height: 40px;
  max-height: 100px;
  outline: none;
  background: var(--bg);
  transition: border-color var(--ease);
}

.chat-input:focus {
  border-color: var(--primary);
}

.chat-send-btn {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border: none;
  border-radius: var(--r-md);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--ease);
}

.chat-send-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.chat-disclaimer {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.4rem 1rem 0.75rem;
  font-style: italic;
}

/* ============================================================
   BOTTOM NAV (User Spec)
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: calc(10px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 460px);
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(15, 118, 110, 0.08);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.12);
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0.35rem 0.6rem;
  z-index: 500;
  height: 72px;
  transition: all 0.3s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex: 1;
  gap: 0.08rem;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  background: none;
  border: none;
  cursor: pointer;
  height: 100%;
  padding: 0;
}

.nav-bubble {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  transition: all 0.2s ease;
  background: transparent;
  border: none;
  box-shadow: none;
}

.nav-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #b6b8bd;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.96;
  transition: all 0.2s;
}

.nav-label {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: nowrap;
  border: 0;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #a1a1aa;
  transition: color 0.2s ease, opacity 0.2s ease;
  opacity: 0.95;
}

.nav-item.active .nav-bubble {
  transform: translateY(-1px);
}

.nav-item.active .nav-icon {
  stroke: #1a936f;
  opacity: 1;
}

.nav-item.active .nav-label {
  color: #1a936f;
}

.nav-item:hover .nav-bubble {
  transform: translateY(-1px);
}

.nav-item:hover .nav-icon {
  stroke: #8f949c;
}

.nav-item:hover .nav-label {
  color: #6b7280;
}

.nav-item-center {
  flex: 0 0 76px;
}

.nav-item-center .nav-label {
  color: #1a936f;
  font-weight: 800;
}

.nav-item-center .nav-bubble {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  background: linear-gradient(160deg, #1ea672 0%, #17885f 100%);
  border: 5px solid #f2f4f6;
  box-shadow: 0 12px 26px rgba(20, 125, 87, 0.36);
  transform: translateY(-16px);
}

.nav-item-center .nav-icon {
  width: 30px;
  height: 30px;
  stroke: #f6fffb;
  stroke-width: 1.8;
}

.nav-item-center:hover .nav-bubble {
  transform: translateY(-17px) scale(1.01);
}

/* Page padding to prevent overlap */
.page-container,
.main-content {
  padding-bottom: 108px !important;
}

/* SOS FAB adjustment for bottom nav */
.sos-fab {
  bottom: 108px !important;
}

/* Keep MindCare clearly separated above SOS */
.brain-fab {
  bottom: 192px !important;
}

@media (max-width: 390px) {
  .bottom-nav {
    width: min(95vw, 420px);
  }

  .nav-item-center {
    flex-basis: 70px;
  }

  .nav-item-center .nav-bubble {
    width: 70px;
    height: 70px;
  }
}

.ai-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.ai-sheet-overlay.open {
  display: block;
  opacity: 1;
}

.ai-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 85vh;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(.4, 0, .2, 1);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
}

.ai-sheet.open {
  transform: translateY(0);
}

.sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--border-mid);
  border-radius: 50px;
  margin: 0.75rem auto 0;
}

.page-container {
  padding-bottom: 5.5rem !important;
}

/* ============================================================
   AI SHEET TABS & CONTENT
   ============================================================ */
.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.sheet-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.sheet-clear-btn {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid var(--primary);
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  cursor: pointer;
  margin-left: auto;
  margin-right: 0.75rem;
  transition: all var(--ease);
}

.sheet-clear-btn:hover {
  background: var(--primary);
  color: #fff;
}

.sheet-close-btn {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem;
}

.sheet-tabs {
  display: flex;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 4px 1rem;
  gap: 4px;
}

.sheet-tab {
  flex: 1;
  padding: 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  border: none;
  background: none;
  border-radius: var(--r-md);
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--ease);
}

.sheet-tab.active {
  background: var(--primary);
  color: #fff;
}

.sheet-tab-pane {
  display: none;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.sheet-tab-pane.active {
  display: flex;
  flex-direction: column;
}

#sheet-tab-features.sheet-tab-pane.active {
  display: block;
}

#sheet-tab-chat.sheet-tab-pane.active {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

@media (max-width: 640px) {
  .ai-sheet {
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    box-shadow: none;
  }

  .sheet-handle {
    margin-top: 0.55rem;
    margin-bottom: 0.1rem;
  }

  .sheet-header {
    padding-top: max(0.95rem, env(safe-area-inset-top));
  }

  .sheet-tab-pane,
  #sheet-tab-features.sheet-tab-pane.active,
  #sheet-tab-chat.sheet-tab-pane.active {
    min-height: 0;
    height: 100%;
  }

  #sheet-tab-features.sheet-tab-pane.active {
    overflow-y: auto;
  }

  .assistant-shell {
    min-height: max-content;
    padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
  }
}

.sheet-hero {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: var(--primary-light);
  margin: 0.75rem 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--r-md);
  border-left: 3px solid var(--primary);
}

.sheet-hero-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.sheet-hero p {
  font-size: 0.82rem;
  color: var(--primary-dark);
  margin: 0;
  line-height: 1.5;
}

.sheet-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  padding: 0 1rem 0.75rem;
}

.sheet-feat-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--ease);
}

.sheet-feat-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.sheet-feat-item .feat-icon {
  width: 32px;
  height: 32px;
  font-size: 0.9rem;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sheet-feat-item .feat-text strong {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text);
}

.sheet-feat-item .feat-text span {
  font-size: 0.65rem;
  color: var(--text-muted);
}

#sheet-tab-features > .sheet-hero,
#sheet-tab-features > .sheet-feature-grid,
#sheet-tab-features > .mood-row:not(.assistant-mood-row) {
  display: none;
}

.ai-sheet {
  background:
    radial-gradient(circle at top right, rgba(139, 92, 246, 0.12), transparent 28%),
    linear-gradient(180deg, #fbfbff 0%, #f4f7fb 100%);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.sheet-header {
  padding: 0.95rem 1.25rem 0.85rem;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
}

.sheet-title {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.sheet-clear-btn {
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.22);
  color: #7c3aed;
}

.sheet-close-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
}

.sheet-tabs {
  background: rgba(255, 255, 255, 0.56);
  padding: 0.35rem 1rem 0.55rem;
  border-bottom-color: rgba(148, 163, 184, 0.18);
}

.sheet-tab {
  border-radius: 999px;
  font-weight: 700;
}

.sheet-tab.active {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  box-shadow: 0 12px 24px rgba(109, 40, 217, 0.18);
}

.assistant-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 1rem 1.25rem;
}

.assistant-page-shell {
  padding-top: 1.15rem;
  padding-bottom: 7rem;
}

.assistant-hero-panel,
.assistant-module,
.assistant-quick-actions {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(124, 58, 237, 0.12);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.12);
}

.assistant-hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 1rem;
  padding: 1.2rem;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.14), transparent 28%),
    linear-gradient(145deg, #ffffff 0%, #f5f3ff 48%, #ecfeff 100%);
}

.assistant-kicker,
.assistant-section-kicker,
.body-guide-eyebrow,
.risk-profile-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7c3aed;
}

.assistant-hero-copy h3,
.assistant-section-head h4,
.body-guide-card h5,
.risk-profile-header h5,
.risk-result-copy h5,
.seasonal-alert-card h5 {
  margin: 0;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.assistant-hero-copy h3 {
  margin-top: 0.45rem;
  font-size: 1.62rem;
  line-height: 1.14;
  color: #111827;
}

.assistant-hero-copy p,
.assistant-section-head p,
.risk-profile-placeholder span,
.seasonal-alert-card p,
.body-guide-rule p,
.risk-result-copy p {
  margin: 0;
  color: #1f2937;
  line-height: 1.65;
  font-size: 0.97rem;
}

.assistant-hero-meta {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
}

.assistant-hero-tip {
  display: flex;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(139, 92, 246, 0.14);
}

.assistant-hero-tip .sheet-hero-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.assistant-hero-tip p {
  font-size: 0.98rem;
  color: #111827;
  font-weight: 600;
}

.assistant-hero-chip,
.assistant-section-badge,
.risk-profile-status,
.seasonal-alert-window {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.42rem 0.78rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.assistant-hero-chip,
.assistant-section-badge {
  background: rgba(15, 118, 110, 0.08);
  color: #0f766e;
}

.assistant-quick-actions,
.assistant-module {
  padding: 1rem;
}

.assistant-ai-shortcut-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.95rem 1.02rem;
  border-radius: 20px;
  border: 1px solid rgba(45, 212, 191, 0.24);
  background:
    radial-gradient(circle at 100% 0%, rgba(45, 212, 191, 0.16), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(240, 249, 255, 0.95));
  text-decoration: none;
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.07);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease), background var(--ease);
}

.assistant-ai-shortcut-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  pointer-events: none;
}

.assistant-ai-shortcut-card:hover {
  transform: translateY(-2px);
  border-color: rgba(20, 184, 166, 0.45);
  background:
    radial-gradient(circle at 100% 0%, rgba(45, 212, 191, 0.2), transparent 42%),
    linear-gradient(145deg, #ffffff, rgba(236, 253, 245, 0.94));
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.1);
}

.assistant-ai-shortcut-icon {
  width: 2.7rem;
  height: 2.7rem;
  flex-shrink: 0;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 70%, #2dd4bf 100%);
  color: #ffffff;
  box-shadow: 0 12px 22px rgba(15, 118, 110, 0.28);
}

.assistant-ai-shortcut-copy {
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
  min-width: 0;
}

.assistant-ai-shortcut-copy strong {
  color: #0b1220;
  font-size: 1.03rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.assistant-ai-shortcut-copy span {
  color: #475569;
  font-size: 0.86rem;
  line-height: 1.35;
}

.assistant-ai-shortcut-cta {
  margin-left: auto;
  flex-shrink: 0;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(13, 148, 136, 0.26);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.92));
  color: #0f766e;
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 6px 12px rgba(15, 118, 110, 0.1);
}

.assistant-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.assistant-section-head h4 {
  margin-top: 0.28rem;
  font-size: 1.18rem;
  color: #111827;
}

.assistant-feature-grid-modern,
.risk-profile-form,
.seasonal-alert-grid {
  padding: 0;
}

.assistant-feature-grid-modern {
  gap: 0.7rem;
}

.sheet-feat-item {
  align-items: flex-start;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(248,250,252,0.96) 100%);
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 10px 26px rgba(15, 23, 42, 0.06);
}

.sheet-feat-item:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 58, 237, 0.22);
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.sheet-feat-item .feat-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 14px;
}

.sheet-feat-item .feat-text strong {
  font-size: 1rem;
  margin-bottom: 0.18rem;
  color: #111827;
}

.sheet-feat-item .feat-text span {
  font-size: 0.88rem;
  line-height: 1.4;
  color: #374151;
}

.risk-profile-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.risk-field {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.risk-field span {
  font-size: 0.9rem;
  font-weight: 700;
  color: #111827;
}

.risk-field select {
  width: 100%;
  min-height: 3rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background: #f8fafc;
  color: #0f172a;
  padding: 0.85rem 0.9rem;
  font-size: 1rem;
  font-family: var(--font);
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
  color: #111827;
}

.risk-field select:focus {
  border-color: rgba(124, 58, 237, 0.48);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.08);
  background: #fff;
}

.risk-actions {
  display: flex;
  gap: 0.7rem;
  grid-column: 1 / -1;
}

.assistant-primary-btn,
.assistant-secondary-btn {
  min-height: 3rem;
  border-radius: 14px;
  padding: 0.8rem 1rem;
  border: none;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease);
}

.assistant-primary-btn {
  flex: 1;
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  box-shadow: 0 12px 24px rgba(109, 40, 217, 0.2);
}

.assistant-secondary-btn {
  min-width: 5.75rem;
  background: #eef2ff;
  color: #4338ca;
}

.assistant-primary-btn:hover,
.assistant-secondary-btn:hover {
  transform: translateY(-1px);
}

.risk-profile-card {
  margin-top: 0.95rem;
  border-radius: 22px;
  border: 1px solid rgba(124, 58, 237, 0.12);
  background: linear-gradient(180deg, #fcfcff 0%, #f8fafc 100%);
  padding: 1.15rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.risk-profile-card.empty {
  background: linear-gradient(145deg, rgba(248,250,252,0.95) 0%, rgba(240,249,255,0.95) 100%);
}

.risk-profile-placeholder {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.risk-profile-placeholder strong {
  color: #111827;
  font-size: 1.05rem;
}

.risk-profile-header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.risk-profile-header h5 {
  margin-top: 0.28rem;
  font-size: 1.12rem;
  color: #111827;
}

.risk-profile-status {
  background: rgba(15, 118, 110, 0.12);
  color: #0f766e;
  height: fit-content;
}

.risk-profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.95rem;
}

.risk-profile-tags span {
  padding: 0.38rem 0.65rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #312e81;
  font-size: 0.82rem;
  font-weight: 700;
}

.risk-result-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.risk-result-item {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.85rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.risk-rank {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(139,92,246,0.12) 0%, rgba(15,118,110,0.12) 100%);
  color: #6d28d9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.risk-result-copy h5 {
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
  color: #111827;
}

.risk-result-copy ul {
  margin: 0.45rem 0 0;
  padding-left: 1rem;
  color: #111827;
  font-size: 0.92rem;
  line-height: 1.6;
}

.risk-result-copy li + li {
  margin-top: 0.22rem;
}

.seasonal-alert-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.seasonal-alert-card {
  padding: 1.1rem;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(124, 58, 237, 0.12);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

.seasonal-alert-index {
  display: inline-flex;
  margin-bottom: 0.55rem;
  color: #7c3aed;
  font-size: 0.76rem;
  font-weight: 800;
}

.seasonal-alert-card h5 {
  font-size: 1.03rem;
  margin-bottom: 0.35rem;
  color: #111827;
}

.seasonal-alert-card p {
  font-size: 0.94rem;
  min-height: 4.3em;
  color: #1f2937;
}

.seasonal-alert-window {
  margin-top: 0.75rem;
  background: #ecfeff;
  color: #155e75;
}

.body-guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 0.9rem;
  align-items: stretch;
}

.body-map-panel,
.body-guide-card {
  border-radius: 22px;
  border: 1px solid rgba(124, 58, 237, 0.12);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

.body-map-panel {
  padding: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.body-map-svg {
  width: 100%;
  max-width: 220px;
  overflow: visible;
}

.body-outline {
  fill: rgba(226, 232, 240, 0.68);
  stroke: rgba(148, 163, 184, 0.55);
  stroke-width: 1.6;
}

.body-area-node {
  cursor: pointer;
  outline: none;
}

.body-area-node circle,
.body-area-node rect {
  fill: rgba(255, 255, 255, 0.75);
  stroke: rgba(124, 58, 237, 0.35);
  stroke-width: 1.8;
  transition: fill var(--ease), stroke var(--ease), transform var(--ease);
}

.body-area-node text {
  fill: #111827;
  font-size: 13px;
  font-weight: 700;
  text-anchor: middle;
  pointer-events: none;
}

.body-area-node.active circle,
.body-area-node.active rect,
.body-area-node:hover circle,
.body-area-node:hover rect,
.body-area-node:focus circle,
.body-area-node:focus rect {
  fill: url(#bodyMapGlow);
  stroke: rgba(79, 70, 229, 0.4);
}

.body-area-node.active text,
.body-area-node:hover text,
.body-area-node:focus text {
  fill: #fff;
}

.body-guide-card {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.body-guide-card h5 {
  font-size: 1.18rem;
  line-height: 1.45;
  color: #111827;
}

.body-guide-rule {
  padding: 1rem 1rem;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.body-guide-rule.alert {
  background: #fff7ed;
}

.body-guide-rule strong {
  display: block;
  margin-bottom: 0.3rem;
  color: #111827;
  font-size: 0.94rem;
}

.body-guide-rule p {
  color: #1f2937;
  font-size: 0.96rem;
}

.assistant-mood-row {
  margin-top: -0.15rem;
  border-top: none;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.assistant-mood-row .mood-btn {
  background: #fff;
}

@media (max-width: 640px) {
  .assistant-hero-panel,
  .body-guide-layout,
  .risk-profile-form,
  .seasonal-alert-grid {
    grid-template-columns: 1fr;
  }

  .assistant-shell {
    padding: 0.9rem 0.9rem 1.1rem;
  }

  .assistant-hero-copy h3 {
    font-size: 1.22rem;
  }

  .sheet-feature-grid {
    grid-template-columns: 1fr;
  }

  .assistant-ai-shortcut-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.68rem;
  }

  .assistant-ai-shortcut-cta {
    margin-left: 0;
  }

  .risk-actions {
    flex-direction: column;
  }

  .seasonal-alert-card p {
    min-height: 0;
  }
}

/* ============================================================
   ANIMATIONS & PAGE TRANSITIONS
   ============================================================ */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-container, .main-content {
  animation: pageFadeIn 0.5s var(--ease) forwards;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.skeleton, .skeleton-box, .skeleton-text {
  position: relative;
  overflow: hidden;
  background-color: rgba(255,255,255,0.2) !important;
  border-radius: var(--r-sm);
}

.skeleton::after, .skeleton-box::after, .skeleton-text::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0, rgba(255,255,255,0.4) 20%, rgba(255,255,255,0.6) 60%, rgba(255,255,255,0));
  animation: shimmer 1.5s infinite linear;
}
