/* ═══════════════════════════════════════════════════════════════════════════
   FLORE CLINICAL PORTAL — Design System v6.0.0
   Glass Eleganza · Real Logo Colors · ADA/WCAG 2.1 AA · Premium Clinical
   Consolidated from v5.5 monolith + glass eleganza v3 upgrade
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. DESIGN TOKENS ──────────────────────────────────────────────────── */

:root {
  /* Brand (from real logo) */
  --teal-deep: #0D4F5C;
  --teal: #1A6B7C;
  --teal-light: #2BB8B0;
  --teal-glow: #3ECDC4;
  --coral: #E8A87C;
  --coral-bright: #E07A5F;
  --coral-light: #F4A261;
  --sand: #F5F0EB;
  --sand-dark: #EDE6DB;
  --cream: #FAF8F5;
  --cream-soft: #FFF8E7;
  --charcoal: #1A2B32;
  --slate: #5B7282;
  --teal-text: var(--cream-soft);

  /* Legacy compat */
  --teal-dark: #0D4F5C;
  --teal-darker: #082F38;
  --teal-shine: rgba(43, 184, 176, 0.15);
  --amber: #F59E0B;
  --amber-light: #FEF3C7;
  --amber-dark: #B45309;
  --coral-dark: #DC2626;
  --error: #DC2626;
  --green: #10B981;
  --green-light: #D1FAE5;
  --green-dark: #059669;
  --purple: #8B5CF6;
  --purple-light: #EDE9FE;
  --purple-dark: #6D28D9;

  /* Clinical brand aliases (used in HTML inline styles) */
  --clinical-primary: #1A6B7C;
  --clinical-primary-light: #2BB8B0;
  --clinical-primary-dark: #0D4F5C;
  --clinical-primary-darker: #082F38;
  --brand-dot: #E8A87C;
  --brand-dot-deep: #C97A50;

  /* Semantic surfaces */
  --success: #10B981;
  --success-bg: rgba(16, 185, 129, 0.08);
  --warning: #F59E0B;
  --warning-bg: rgba(245, 158, 11, 0.08);
  --error-bg: rgba(220, 38, 38, 0.08);
  --info-bg: rgba(26, 122, 138, 0.06);
  --coral-bg: rgba(232, 168, 124, 0.08);
  --red: #DC2626;
  --white: #ffffff;
  --light: #F8FAFC;

  /* DTC channel */
  --dtc-plum: #6D28D9;
  --dtc-plum-light: #EDE9FE;
  --dtc-plum-dark: #4C1D95;
  --dtc-plum-bg: rgba(109, 40, 217, 0.06);
  --dtc-honey: #D4A843;
  --dtc-honey-light: #F5E6B8;
  --dtc-honey-dark: #B8922E;
  --dtc-honey-bg: rgba(212, 168, 67, 0.08);

  /* Gray scale */
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  /* UI surfaces */
  --bg: linear-gradient(135deg, var(--cream) 0%, var(--sand) 50%, var(--cream) 100%);
  --bg-pattern: radial-gradient(ellipse 80% 60% at 15% 30%, rgba(59,176,168,0.07) 0%, transparent 50%),
                radial-gradient(ellipse 60% 50% at 85% 75%, rgba(232,168,124,0.05) 0%, transparent 45%);
  --bg-light: #f8fafc;
  --card: rgba(255, 255, 255, 0.98);
  --card-glass: rgba(255, 255, 255, 0.9);
  --card-hover: rgba(255, 255, 255, 1);
  --text: var(--charcoal);
  --text-light: var(--slate);
  --text-muted: #64748B;
  --border: var(--sand-dark);

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-bg-strong: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-shine: linear-gradient(135deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 50%);
  --border-glass: rgba(255, 255, 255, 0.5);
  --border-shine: rgba(255, 255, 255, 0.9);
  --backdrop-blur: blur(20px);
  --backdrop-blur-strong: blur(40px);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(13,79,92,0.03), 0 1px 3px rgba(13,79,92,0.05);
  --shadow: 0 4px 6px -1px rgba(13,79,92,0.05), 0 2px 4px -1px rgba(13,79,92,0.03);
  --shadow-md: 0 10px 25px -5px rgba(13,79,92,0.08), 0 8px 10px -6px rgba(13,79,92,0.04);
  --shadow-lg: 0 25px 50px -12px rgba(13,79,92,0.15), 0 12px 24px -8px rgba(13,79,92,0.08);
  --shadow-xl: 0 35px 60px -15px rgba(13,79,92,0.2), 0 20px 40px -10px rgba(13,79,92,0.1);
  --shadow-glow: 0 0 30px rgba(43,184,176,0.4), 0 0 60px rgba(43,184,176,0.2);
  --shadow-glow-sm: 0 0 15px rgba(43,184,176,0.3);
  --shadow-glow-coral: 0 0 20px rgba(232,168,124,0.35);
  --shadow-card: 0 8px 40px rgba(13,79,92,0.08), 0 2px 8px rgba(13,79,92,0.04);
  --shadow-card-hover: 0 20px 60px rgba(13,79,92,0.15), 0 8px 16px rgba(13,79,92,0.08);
  --shadow-inset: inset 0 2px 4px rgba(13,79,92,0.04);
  --shadow-button: 0 8px 30px rgba(13,79,92,0.35);

  /* Motion */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── 2. RESET & BASE ──────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  font-weight: 400;
}
body::before {
  content: '';
  position: fixed; inset: 0;
  background: var(--bg-pattern);
  pointer-events: none; z-index: 0;
  animation: bgPulse 12s ease-in-out infinite alternate;
}

::selection { background: rgba(43,184,176,0.25); color: var(--teal-dark); }
::-moz-selection { background: rgba(43,184,176,0.25); color: var(--teal-dark); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(241,245,249,0.8); border-radius: 10px; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, rgba(43,184,176,0.5), rgba(43,184,176,0.7)); border-radius: 10px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, rgba(43,184,176,0.7), rgba(43,184,176,0.9)); background-clip: content-box; }
::-webkit-scrollbar-corner { background: transparent; }


/* ── 3. ACCESSIBILITY ──────────────────────────────────────────────────── */

.skip-link { position: absolute; top: -50px; left: 0; background: var(--teal-dark); color: var(--cream-soft); padding: 12px 24px; z-index: 10000; text-decoration: none; border-radius: 0 0 12px 0; }
.skip-link:focus { top: 0; }
*:focus { outline: 3px solid var(--teal); outline-offset: 2px; }
*:focus:not(:focus-visible) { outline: none; }
*:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; box-shadow: var(--shadow-glow-sm); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
#announcer { position: absolute; left: -9999px; }
.hidden { display: none !important; }
.text-center { text-align: center; }

/* Teal background text enforcement */
[style*="background: var(--teal)"],
[style*="background:var(--teal)"],
[style*="background: linear-gradient"][style*="teal"] { color: var(--cream-soft, #FFF8E7) !important; }
[style*="background: var(--teal-light)"],
[style*="background:var(--teal-light)"],
[style*="rgba(43, 184, 176"] { color: var(--charcoal, #1A2B32) !important; }
[style*="background: var(--teal-light)"] h1,
[style*="background: var(--teal-light)"] h2,
[style*="background: var(--teal-light)"] h3,
[style*="background: var(--teal-light)"] h4,
[style*="background: var(--teal-light)"] h5,
[style*="background: var(--teal-light)"] p,
[style*="background: var(--teal-light)"] span,
[style*="background: var(--teal-light)"] label { color: var(--charcoal, #1A2B32) !important; }
[style*="rgba(43, 184, 176"] h1,
[style*="rgba(43, 184, 176"] h2,
[style*="rgba(43, 184, 176"] h3,
[style*="rgba(43, 184, 176"] h4,
[style*="rgba(43, 184, 176"] p { color: var(--teal-dark, #0D4F5C) !important; }

/* ── 4. ANIMATIONS ─────────────────────────────────────────────────────── */

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.8; transform: scale(1.05); } }
@keyframes shimmer { 0% { background-position: -200% center; } 100% { background-position: 200% center; } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 20px rgba(43,184,176,0.3); } 50% { box-shadow: 0 0 40px rgba(43,184,176,0.6); } }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes bgPulse { 0% { opacity: 0.7; } 100% { opacity: 1; } }
@keyframes cardSlideUp { from { opacity: 0; transform: translateY(40px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes modalSlideIn { from { opacity: 0.6; transform: translateY(-12px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
/* pulseGlow removed — replaced by bioFloat in bio-cells */
@keyframes ticker-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes approvalPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.05); opacity: 0.8; } }
@keyframes approvalProgress { 0% { width: 0%; } 100% { width: 100%; } }
@keyframes toastSlideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastProgress { from { width: 100%; } to { width: 0; } }
@keyframes toastLoading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.animate-fadeInUp { animation: fadeInUp 0.8s ease-out forwards; }
.animate-float { animation: float 6s ease-in-out infinite; }
.animate-pulse { animation: pulse 3s ease-in-out infinite; }
.animate-glow { animation: glow 3s ease-in-out infinite; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }


/* ── 5. TYPOGRAPHY ─────────────────────────────────────────────────────── */

h1 { font-size: 2.25rem; font-weight: 600; color: var(--teal-deep); margin-bottom: 28px; letter-spacing: -0.5px; line-height: 1.2; }
h2 { font-size: 1.5rem; font-weight: 600; color: var(--teal-deep); margin-bottom: 18px; letter-spacing: -0.3px; line-height: 1.25; }
h3 { font-size: 1.125rem; font-weight: 600; color: var(--text); margin-bottom: 14px; }
a { color: var(--teal); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--teal-deep); }

/* ── 6. LAYOUT — App Shell ─────────────────────────────────────────────── */

.app { display: flex; min-height: 100vh; position: relative; z-index: 1; }

.sidebar {
  width: 270px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(245,240,235,0.9) 100%);
  backdrop-filter: var(--backdrop-blur);
  padding: 28px 20px;
  position: fixed; height: 100vh;
  display: flex; flex-direction: column;
  box-shadow: 2px 0 20px rgba(13,79,92,0.08), inset -1px 0 0 var(--sand-dark);
  z-index: 100;
  overflow: hidden;
}
.sidebar nav {
  flex: 1; min-height: 0; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--sand-dark) transparent;
}
.sidebar::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.5) 0%, transparent 30%);
  pointer-events: none;
}

/* Logo — Real JPG/PNG from /images/
   Light bg: FLORE-clinical-color.jpg (cream background)
   Dark bg:  FLORE-clinical-color-2X.png (transparent/black, 2x retina)
*/
.logo { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 40px; padding: 0 8px; line-height: 1; flex-shrink: 0; }
.logo img { height: 42px; width: auto; filter: drop-shadow(0 1px 4px rgba(13,79,92,0.06)); }
/* Text logo classes removed — real PNG: /images/FLORE-clinical-color-transparent.png */
.logo span { color: var(--coral); }
.logo::after { content: none; }

/* Nav items */
.nav-item {
  padding: 14px 18px; margin: 4px 0; border-radius: 12px;
  cursor: pointer; display: flex; align-items: center; gap: 12px;
  font-size: 0.9375rem; font-weight: 500;
  border: none; background: transparent;
  color: var(--charcoal); width: 100%; text-align: left;
  transition: var(--transition);
  position: relative; overflow: hidden;
}
.nav-item::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(43,184,176,0.08) 0%, transparent 50%);
  opacity: 0; transition: var(--transition);
}
.nav-item:hover { color: var(--teal-deep); background: var(--sand); transform: translateX(4px); }
.nav-item:hover::before { opacity: 1; }
.nav-item.active {
  color: white;
  background: linear-gradient(135deg, var(--teal-light) 0%, var(--teal-glow) 100%);
  box-shadow: 0 8px 24px rgba(43,184,176,0.4), inset 0 1px 0 rgba(255,255,255,0.25);
}
.nav-item.active::before { opacity: 1; }
/* Coral dot on active nav — echoes logo dot */
.nav-item.active::after {
  content: ''; position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; background: var(--coral); border-radius: 50%;
  box-shadow: 0 0 8px rgba(232,168,124,0.4);
}

.compliance-strip {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; padding: 16px;
  background: rgba(43,184,176,0.05); border-radius: 12px; font-size: 0.6875rem;
  border: 1px solid var(--sand-dark); backdrop-filter: blur(10px);
  flex-shrink: 0;
}
.compliance-strip span { opacity: 0.75; }

.user-box {
  margin-top: 12px; padding: 20px;
  background: linear-gradient(135deg, var(--sand) 0%, white 100%);
  border-radius: 16px; border: 1px solid var(--sand-dark);
  backdrop-filter: blur(10px); position: relative; overflow: hidden;
  flex-shrink: 0;
}
.user-box::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent); }
.user-box .name { font-weight: 600; font-size: 0.9375rem; }
.user-box .clinic { font-size: 0.8125rem; opacity: 1; margin-top: 4px; }

.main { flex: 1; margin-left: 270px; padding: 36px 48px; max-width: 1320px; }

/* ── 7. CARDS — Glass with shine ───────────────────────────────────────── */

.card {
  background: var(--card); border-radius: 24px; padding: 32px; margin-bottom: 24px;
  box-shadow: var(--shadow-card); border: 1px solid var(--sand-dark);
  transition: var(--transition); position: relative;
}
.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--teal-light), var(--teal-glow)); opacity: 0; transition: var(--transition); border-radius: 24px 24px 0 0; }
.card::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--glass-shine); pointer-events: none; opacity: 0.3; border-radius: 24px; }
.card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); border-color: rgba(43,184,176,0.3); }
.card:hover::before { opacity: 1; }
/* Admin tab content: disable transform & overflow:hidden so position:fixed dropdowns escape clipping */
#adminTabContent, #adminTabContent:hover { overflow: visible; transform: none; }


/* ── 8. FORMS ──────────────────────────────────────────────────────────── */

.form-group { margin-bottom: 24px; }
.form-group label { display: block; margin-bottom: 10px; font-weight: 600; font-size: 0.9rem; color: var(--teal-deep); letter-spacing: 0.01em; }
.required { color: var(--coral); }
.form-control {
  width: 100%; padding: 16px 20px; border: 2px solid var(--sand-dark);
  border-radius: 14px; font-size: 1rem; font-family: 'Outfit', sans-serif;
  transition: var(--transition); background: var(--cream); box-shadow: var(--shadow-inset);
}
.form-control:hover { border-color: rgba(43,184,176,0.4); }
.form-control:focus { border-color: var(--teal-light); box-shadow: 0 0 0 4px rgba(43,184,176,0.12), var(--shadow-glow-sm); outline: none; background: white; }
.form-control::placeholder { color: #6B7280; opacity: 1; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%235B7282' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px;
}
.form-select { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.9rem; background: white; }
.form-textarea { width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px; font-size: 0.9rem; font-family: 'Outfit', sans-serif; resize: vertical; }
.form-label { display: block; font-weight: 600; font-size: 0.875rem; color: var(--teal-deep); margin-bottom: 6px; }


/* ── 9. BUTTONS — Glossy with shine ────────────────────────────────────── */

.btn {
  min-height: 48px; padding: 14px 28px; border: none; border-radius: 50px;
  font-size: 0.9375rem; font-weight: 600; font-family: 'Outfit', sans-serif;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: var(--transition); position: relative; overflow: hidden; letter-spacing: 0.02em;
}
.btn::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 50%; background: linear-gradient(180deg, rgba(255,255,255,0.2), rgba(255,255,255,0)); pointer-events: none; border-radius: 50px 50px 0 0; }
.btn::after { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent); transition: 0.5s; pointer-events: none; }
.btn:hover::after { left: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:disabled::after { display: none; }

.btn-primary { background: linear-gradient(135deg, var(--teal-deep), var(--teal)); box-shadow: 0 8px 30px rgba(13,79,92,0.35); color: var(--cream-soft, #FFF8E7); }
.btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, var(--teal), var(--teal-light)); box-shadow: 0 12px 40px rgba(13,79,92,0.45); transform: translateY(-3px); color: var(--cream-soft, #FFF8E7); }
.btn-primary:active:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(13,79,92,0.3); }

.btn-dark { background: linear-gradient(135deg, var(--charcoal), var(--teal-deep)); box-shadow: 0 8px 30px rgba(26,43,50,0.35); color: var(--cream-soft, #FFF8E7); }
.btn-dark:hover:not(:disabled) { background: linear-gradient(135deg, var(--teal-deep), var(--teal)); transform: translateY(-3px); color: var(--cream-soft, #FFF8E7); }

.btn-coral { background: linear-gradient(135deg, var(--coral), var(--coral-bright)); color: white; box-shadow: 0 4px 16px rgba(232,168,124,0.35); }
.btn-coral:hover:not(:disabled) { box-shadow: 0 6px 24px rgba(232,168,124,0.45); transform: translateY(-2px); }

.btn-outline { background: white; border: 2px solid var(--teal-deep); color: var(--teal-deep); box-shadow: 0 4px 15px rgba(13,79,92,0.08); }
.btn-outline:hover:not(:disabled) { background: var(--teal-deep); color: white; box-shadow: 0 8px 30px rgba(13,79,92,0.25); transform: translateY(-2px); }

.btn-ghost { background: transparent; color: var(--teal-deep); }
.btn-ghost:hover { background: var(--sand); }
.btn-ghost::before, .btn-ghost::after { display: none; }

.btn-success { background: linear-gradient(135deg, var(--green), var(--green-dark)); color: white; box-shadow: 0 8px 30px rgba(16,185,129,0.35); }
.btn-success:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(16,185,129,0.45); }

.btn-glass { background: var(--glass-bg); backdrop-filter: blur(12px); color: var(--teal-deep); border: 1px solid var(--glass-border); box-shadow: var(--shadow-sm), var(--shadow-inset); }
.btn-glass:hover { background: rgba(255,255,255,0.9); box-shadow: var(--shadow-md), var(--shadow-inset); }

.btn-secondary { background: var(--sand); color: var(--teal-deep); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--sand-dark); }

.btn-sm { min-height: 40px; padding: 10px 22px; font-size: 0.875rem; }
.btn-lg { min-height: 56px; padding: 16px 40px; font-size: 1.0625rem; }
.btn-mark-paid { background: linear-gradient(135deg, #10b981, #059669); color: white; border: none; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 0.8rem; transition: all 0.2s; }
.btn-mark-paid:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,185,129,0.3); }

/* ── 10. TAGS — Premium Pills ──────────────────────────────────────────── */

.tags { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.tag {
  padding: 12px 24px; background: white; border: 2px solid var(--sand-dark);
  border-radius: 50px; font-size: 0.9rem; font-weight: 500;
  cursor: pointer; transition: var(--transition); color: var(--slate);
  min-height: 46px; display: inline-flex; align-items: center;
  box-shadow: 0 2px 8px rgba(13,79,92,0.04); position: relative; overflow: hidden;
}
.tag:hover { border-color: var(--teal-light); background: var(--sand); color: var(--teal-deep); box-shadow: 0 8px 24px rgba(43,184,176,0.15); transform: translateY(-2px); }
.tag.selected { background: linear-gradient(135deg, var(--teal-deep), var(--teal)); border-color: transparent; color: white; box-shadow: 0 8px 24px rgba(13,79,92,0.3); }
.tag.from-ubiome { border: 2px solid var(--green); background: rgba(46,204,113,0.1); }
.tag.from-ubiome.selected { background: var(--green); color: white; }


/* ── 11. BADGES — Frosted Glass ────────────────────────────────────────── */

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
  backdrop-filter: blur(8px); border: 1px solid transparent;
}
.badge-teal { background: linear-gradient(135deg, rgba(43,184,176,0.15), rgba(43,184,176,0.08)); color: #0D4F5C; border-color: rgba(43,184,176,0.2); }
.badge-green { background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(16,185,129,0.08)); color: #065F46; border-color: rgba(16,185,129,0.2); }
.badge-red { background: linear-gradient(135deg, rgba(248,113,113,0.15), rgba(248,113,113,0.08)); color: #991B1B; border-color: rgba(248,113,113,0.2); }
.badge-amber { background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(245,158,11,0.08)); color: #92400E; border-color: rgba(245,158,11,0.2); }
.badge-coral { background: linear-gradient(135deg, rgba(232,168,124,0.15), rgba(232,168,124,0.08)); color: #C07040; border-color: rgba(232,168,124,0.2); }
.badge-purple { background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(139,92,246,0.08)); color: #5B21B6; border-color: rgba(139,92,246,0.2); }
.badge-blue { background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(59,130,246,0.08)); color: #1D4ED8; border-color: rgba(59,130,246,0.2); }
.badge-peds { background: linear-gradient(135deg, rgba(236,72,153,0.15), rgba(236,72,153,0.08)); color: #BE185D; border-color: rgba(236,72,153,0.2); }


/* ── 12. STATS — Glass Cards ───────────────────────────────────────────── */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,251,0.95));
  backdrop-filter: blur(20px); border-radius: 22px; padding: 32px; text-align: center;
  border: 1px solid rgba(255,255,255,0.95);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255,255,255,0.9);
  transition: var(--transition); position: relative; overflow: hidden;
}
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #40CCC4, var(--teal), #1FA8A0); box-shadow: 0 2px 10px rgba(43,184,176,0.3); }
.stat-card::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--glass-shine); pointer-events: none; opacity: 0.4; }
.stat-card:hover { box-shadow: var(--shadow-card-hover), inset 0 1px 0 rgba(255,255,255,0.95); transform: translateY(-6px); }
.stat-card.floating { animation: float 6s ease-in-out infinite; }
.stat-card.floating:nth-child(2) { animation-delay: -2s; }
.stat-card.floating:nth-child(3) { animation-delay: -4s; }
.stat-value { font-size: 3.25rem; font-weight: 800; line-height: 1; background: linear-gradient(135deg, var(--teal-dark), var(--teal), #1FA8A0); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-label { font-size: 0.9rem; color: var(--text-light); margin-top: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; }


/* ── 13. TABLES ────────────────────────────────────────────────────────── */

.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th, .table td { padding: 18px 22px; text-align: left; }
.table th { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.7px; color: var(--text-muted); border-bottom: 2px solid rgba(226,232,240,0.6); background: linear-gradient(180deg, rgba(248,250,251,0.95), rgba(241,245,249,0.9)); }
.table td { border-bottom: 1px solid rgba(241,245,249,0.8); background: rgba(255,255,255,0.9); }
.table tbody tr { transition: background 0.15s ease; }
.table tbody tr:hover td { background: linear-gradient(135deg, rgba(43,184,176,0.06), rgba(43,184,176,0.1)); }
.table tbody tr:first-child td:first-child { border-top-left-radius: 12px; }
.table tbody tr:first-child td:last-child { border-top-right-radius: 12px; }
.table tbody tr:last-child td:first-child { border-bottom-left-radius: 12px; }
.table tbody tr:last-child td:last-child { border-bottom-right-radius: 12px; }

/* Clinical Conditions Library */
#conditionCardsGrid .condition-card:active { transform: scale(0.98) !important; }
#conditionDetailOverlay { animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }


/* ── 14. STEPS — Formulation Workflow ──────────────────────────────────── */

.steps { display: flex; gap: 12px; margin-bottom: 32px; }
.step {
  flex: 1; padding: 18px 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(248,249,250,0.9));
  backdrop-filter: blur(10px); border-radius: 16px;
  font-size: 0.9rem; font-weight: 600; color: var(--text-light); text-align: center;
  border: 2px solid rgba(226,232,240,0.6); transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.8);
  position: relative;
}
.step::after { content: ''; position: absolute; right: -10px; top: 50%; transform: translateY(-50%); width: 0; height: 0; border-left: 8px solid rgba(226,232,240,0.6); border-top: 8px solid transparent; border-bottom: 8px solid transparent; z-index: 2; }
.step:last-child::after { display: none; }
.step.active { background: linear-gradient(180deg, #40CCC4, var(--teal), #1FA8A0); color: white; border-color: transparent; box-shadow: 0 8px 25px rgba(43,184,176,0.4), inset 0 1px 0 rgba(255,255,255,0.3); text-shadow: 0 1px 2px rgba(0,0,0,0.15); }
.step.active::after { border-left-color: var(--teal); }
.step.done { background: linear-gradient(180deg, #34E4A8, var(--green), #059669); color: white; border-color: transparent; box-shadow: 0 6px 20px rgba(16,185,129,0.35), inset 0 1px 0 rgba(255,255,255,0.25); }
.step.done::after { border-left-color: var(--green); }

/* ── 15. FORMULATION BOX — Dark Glass ──────────────────────────────────── */

.formulation-box {
  background: linear-gradient(135deg, #0F5A6A, var(--teal-dark), #0a3d47, #082F38);
  color: white; border-radius: 28px; padding: 40px; margin: 32px 0;
  box-shadow: 0 25px 60px rgba(13,79,92,0.35), 0 10px 30px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.12);
  position: relative; overflow: hidden;
}
.formulation-box::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 60%; background: linear-gradient(180deg, rgba(255,255,255,0.1), transparent); pointer-events: none; }
.formulation-box::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent 10%, rgba(255,255,255,0.3) 50%, transparent 90%); }
.formulation-box h3 { color: var(--amber); margin-bottom: 24px; font-size: 1.25rem; font-weight: 700; text-shadow: 0 2px 4px rgba(0,0,0,0.2); position: relative; z-index: 1; }
.strain-row { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,0.1); position: relative; z-index: 1; }
.strain-row:last-child { border-bottom: none; }
.strain-name { font-weight: 500; letter-spacing: 0.01em; }
.strain-cfu { opacity: 0.85; font-size: 0.875rem; background: rgba(255,255,255,0.1); padding: 4px 12px; border-radius: 20px; }
.strain-code { display: inline-block; background: linear-gradient(135deg, var(--teal-dark), #0F5A6A, #0a3d47); color: white; padding: 7px 16px; border-radius: 10px; font-family: 'SF Mono', Monaco, 'Courier New', monospace; font-weight: 600; font-size: 0.75rem; letter-spacing: 0.5px; box-shadow: 0 4px 12px rgba(13,79,92,0.3), inset 0 1px 0 rgba(255,255,255,0.15); text-shadow: 0 1px 2px rgba(0,0,0,0.2); }


/* ── 16. METRICS & PRICING ─────────────────────────────────────────────── */

.metrics-panel {
  background: linear-gradient(135deg, rgba(236,253,245,0.95), rgba(209,250,229,0.9), rgba(167,243,208,0.85));
  backdrop-filter: blur(15px); border: 2px solid rgba(16,185,129,0.4);
  border-radius: 24px; padding: 32px; margin: 28px 0;
  box-shadow: 0 12px 40px rgba(16,185,129,0.18), inset 0 1px 0 rgba(255,255,255,0.8);
  position: relative; overflow: hidden;
}
.metrics-panel::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, #34E4A8, var(--green), #059669); box-shadow: 0 2px 10px rgba(16,185,129,0.4); }
.success-rate { font-size: 4rem; font-weight: 800; background: linear-gradient(135deg, var(--green-dark), var(--green), #34D399); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1; }
.confidence-badge { display: inline-block; padding: 10px 20px; border-radius: 50px; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; box-shadow: 0 4px 12px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.5); backdrop-filter: blur(8px); }
.confidence-high { background: linear-gradient(135deg, rgba(198,246,213,0.9), rgba(154,230,180,0.85)); color: #22543d; border: 1px solid rgba(34,84,61,0.15); }
.confidence-moderate { background: linear-gradient(135deg, rgba(254,243,199,0.9), rgba(253,230,138,0.85)); color: #744210; border: 1px solid rgba(116,66,16,0.15); }
.confidence-low { background: linear-gradient(135deg, rgba(254,215,215,0.9), rgba(254,178,178,0.85)); color: #c53030; border: 1px solid rgba(197,48,48,0.15); }

.pricing-box {
  background: linear-gradient(135deg, #FFE066, #FCD34D, var(--amber), #D97706);
  color: var(--teal-darker); border-radius: 24px; padding: 32px; text-align: center;
  box-shadow: 0 15px 40px rgba(245,158,11,0.35), inset 0 1px 0 rgba(255,255,255,0.5);
  position: relative; overflow: hidden;
}
.pricing-box::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 55%; background: linear-gradient(180deg, rgba(255,255,255,0.35), rgba(255,255,255,0)); pointer-events: none; border-radius: 24px 24px 0 0; }
.pricing-box .price { font-size: 3.5rem; font-weight: 800; line-height: 1; text-shadow: 0 2px 4px rgba(255,255,255,0.3); position: relative; z-index: 1; }
.pricing-box .period { font-size: 0.95rem; opacity: 0.85; font-weight: 600; position: relative; z-index: 1; margin-top: 8px; }

/* ── EVIDENCE PANEL (Step 3 hero) ─────────────────────────────────── */
.evidence-panel { margin: 24px 0; position: relative; }
.evidence-heading {
  font-size: 1.125rem; font-weight: 700; color: var(--teal-dark);
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.evidence-heading::before {
  content: ''; width: 4px; height: 24px;
  background: linear-gradient(180deg, var(--green), var(--teal));
  border-radius: 2px; flex-shrink: 0;
}

/* ── AI INSIGHTS ──────────────────────────────────────────────────── */
.ai-insights-container { margin-top: 20px; min-height: 60px; }
.ai-insights-loading {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; background: rgba(20, 80, 94, 0.04);
  border: 1px dashed var(--border); border-radius: 12px;
  color: var(--text-light); font-size: 0.875rem;
}
.ai-insights-content {
  background: linear-gradient(135deg, rgba(236,253,245,0.5), rgba(255,255,255,0.9));
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 16px; padding: 24px;
}
.ai-rationale { font-size: 0.9375rem; line-height: 1.6; color: var(--text); margin-bottom: 16px; }
.ai-strain-insight {
  padding: 10px 14px; background: rgba(0,0,0,0.02);
  border-radius: 8px; margin-bottom: 6px; font-size: 0.8125rem;
}
.ai-strain-insight strong { color: var(--teal-dark); }
.ai-warning {
  padding: 10px 14px; background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid var(--amber); border-radius: 0 8px 8px 0;
  margin-bottom: 6px; font-size: 0.8125rem; color: var(--brand-dot-deep);
}
.ai-synergy {
  padding: 8px 14px; background: rgba(16, 185, 129, 0.06);
  border-radius: 8px; margin-bottom: 4px; font-size: 0.8125rem;
  color: var(--clinical-primary-dark);
}

/* ── ENHANCE YOUR FORMULA heading ─────────────────────────────────── */
.enhance-heading {
  font-size: 1.125rem; font-weight: 700; color: var(--teal-dark);
  display: flex; align-items: center; gap: 8px;
}
.enhance-heading::before {
  content: ''; width: 4px; height: 24px;
  background: linear-gradient(180deg, var(--teal), var(--clinical-primary));
  border-radius: 2px; flex-shrink: 0;
}

/* ── BOOSTER IMPACT PREVIEW ───────────────────────────────────────── */
.booster-impact-preview {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px; margin-bottom: 8px;
}
.booster-impact-chip {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.15); border-radius: 8px;
  font-size: 0.75rem;
}
.booster-impact-chip .boost-value { font-weight: 700; color: var(--green); }

/* ── CHECKOUT DETAILS (de-emphasized) ─────────────────────────────── */
.checkout-details { margin-top: 32px; padding-top: 24px; border-top: 2px solid var(--border); }


/* ── 17. MODALS ────────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(13,50,60,0.78);
  display: none; justify-content: center; align-items: safe center;
  z-index: 1000; padding: 20px;
  overflow-y: auto;
}
.modal-overlay.active { display: flex; }
.modal {
  background: rgba(255,255,255,0.99);
  border-radius: 28px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35), 0 15px 40px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.95);
  animation: modalSlideIn 0.2s ease-out;
  position: relative;
}
.modal::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent 10%, rgba(255,255,255,0.9) 50%, transparent 90%); }
.modal-header {
  padding: 28px 32px; border-bottom: 1px solid rgba(226,232,240,0.6);
  display: flex; justify-content: space-between; align-items: center;
  background: linear-gradient(180deg, white, rgba(248,250,252,0.95));
  border-radius: 28px 28px 0 0; position: relative;
}
.modal-header::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(43,184,176,0.3), transparent); }
.modal-header h2 { margin: 0; font-size: 1.35rem; font-weight: 700; color: var(--teal-dark); }
.modal-body { padding: 32px; overflow-y: auto; }
.modal-footer {
  padding: 24px 32px; border-top: 1px solid rgba(226,232,240,0.6);
  display: flex; justify-content: flex-end; gap: 14px;
  background: linear-gradient(180deg, rgba(248,249,250,0.95), rgba(241,245,249,1));
  border-radius: 0 0 28px 28px;
}
.modal-close {
  width: 46px; height: 46px; border: none;
  background: linear-gradient(180deg, rgba(241,245,249,0.9), rgba(226,232,240,0.9));
  backdrop-filter: blur(10px); border-radius: 14px; font-size: 1.25rem;
  cursor: pointer; color: var(--text-light); transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.8);
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: linear-gradient(180deg, rgba(226,232,240,0.95), rgba(203,213,225,0.95)); color: var(--text); transform: scale(1.08); }
.modal-content { max-width: 560px; width: 100%; max-height: 90vh; overflow-y: auto; background: rgba(255,255,255,0.99); border-radius: 28px; }


/* ── 18. ALERTS ────────────────────────────────────────────────────────── */

.alert { padding: 18px 22px; border-radius: 14px; margin-bottom: 22px; display: flex; align-items: center; gap: 14px; backdrop-filter: blur(8px); border: 1px solid transparent; }
.alert-success { background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(16,185,129,0.06)); color: var(--green-dark); border-color: rgba(16,185,129,0.2); }
.alert-error { background: linear-gradient(135deg, rgba(220,38,38,0.12), rgba(220,38,38,0.06)); color: var(--coral-dark); border-color: rgba(220,38,38,0.2); }
.alert-warning { background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(245,158,11,0.08)); color: var(--amber-dark); border-color: rgba(245,158,11,0.2); }
.alert-info { background: rgba(27,107,124,0.06); color: var(--teal-deep); border-color: rgba(27,107,124,0.12); }

/* ── 19. LOGIN — Glass Welcome ─────────────────────────────────────────── */

.login-page {
  min-height: 100vh; display: flex; justify-content: center; align-items: center;
  background: linear-gradient(135deg, var(--cream), var(--sand), var(--cream));
  padding: 20px; position: relative; overflow: hidden;
}
.login-page::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 180px 180px at 12% 25%, rgba(43,184,176,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 120px 120px at 85% 75%, rgba(232,168,124,0.10) 0%, transparent 70%),
    radial-gradient(ellipse 90px 90px at 45% 85%, rgba(139,92,246,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 200px 200px at 70% 15%, rgba(43,184,176,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 60px 60px at 25% 65%, rgba(232,168,124,0.07) 0%, transparent 70%);
  pointer-events: none; animation: bioFloat 20s ease-in-out infinite alternate;
}
.login-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,251,252,0.95));
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  padding: 60px 52px; border-radius: 32px;
  width: 100%; max-width: 480px;
  box-shadow: 0 25px 80px rgba(13,79,92,0.12), 0 15px 40px rgba(13,79,92,0.08), inset 0 1px 0 rgba(255,255,255,0.9);
  position: relative; animation: cardSlideUp 0.6s var(--ease-out-expo); z-index: 1;
}
/* Teal-to-coral gradient top bar */
.login-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: linear-gradient(90deg, var(--teal-glow), var(--teal), var(--coral)); border-radius: 32px 32px 0 0; box-shadow: 0 2px 15px rgba(43,184,176,0.4); }
.login-card::after { content: ''; position: absolute; top: 5px; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent 10%, rgba(255,255,255,0.9) 50%, transparent 90%); }

/* Login Logo */
.login-logo { text-align: center; margin-bottom: 40px; }
.login-logo img { height: 68px; width: auto; filter: drop-shadow(0 2px 8px rgba(13,79,92,0.08)); }
/* Login text logo classes removed — real PNG used */

.login-accent { width: 36px; height: 3px; background: var(--coral); border-radius: 2px; margin: 16px auto 28px; box-shadow: var(--shadow-glow-coral); }

.compliance-badges { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 32px; }
.compliance-badge { background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(16,185,129,0.06)); color: #22543d; padding: 8px 14px; border-radius: 8px; font-size: 0.75rem; font-weight: 600; border: 1px solid rgba(16,185,129,0.15); backdrop-filter: blur(5px); }
.compliance-row { display: flex; justify-content: center; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.compliance-chip { font-size: 0.6875rem; font-weight: 600; color: var(--slate); background: rgba(245,240,235,0.7); padding: 5px 12px; border-radius: 6px; border: 1px solid rgba(237,230,219,0.8); letter-spacing: 0.3px; }

/* Version footer on login — REQUIRED */
.login-version { position: absolute; bottom: 16px; right: 20px; font-size: 0.6875rem; color: var(--text-muted); letter-spacing: 0.3px; z-index: 2; }


/* ── 20. TOAST NOTIFICATIONS ───────────────────────────────────────────── */

.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 100000; display: flex; flex-direction: column; gap: 8px; max-width: 380px; pointer-events: none; }
.toast { background: white; border-radius: 12px; padding: 12px 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); display: flex; align-items: flex-start; gap: 12px; animation: toastSlideIn 0.3s ease; pointer-events: auto; border-left: 4px solid var(--teal); }
.toast.success { border-left-color: #22c55e; }
.toast.error { border-left-color: #ef4444; }
.toast.warning { border-left-color: #f59e0b; }
.toast.loading { border-left-color: var(--purple); }
.toast-icon { font-size: 1.25rem; flex-shrink: 0; }
.toast-content { flex: 1; }
.toast-title { font-weight: 600; font-size: 0.875rem; color: var(--text); }
.toast-message { font-size: 0.8125rem; color: var(--text-light); margin-top: 2px; }
.toast-close { background: none; border: none; cursor: pointer; font-size: 1.25rem; color: var(--text-light); padding: 0; line-height: 1; }
.toast-close:hover { color: var(--text); }
.toast-progress { height: 3px; background: var(--teal); margin-top: 8px; border-radius: 2px; animation: toastProgress 5s linear forwards; }
.toast.loading .toast-progress { animation: none; background: linear-gradient(90deg, var(--purple), var(--teal), var(--purple)); background-size: 200%; animation: toastLoading 1.5s ease-in-out infinite; }

/* ── 21. LEARNING CENTER ───────────────────────────────────────────────── */

.bacteria-card { background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); border: 2px solid rgba(226,232,240,0.6); border-radius: 18px; padding: 26px; margin-bottom: 18px; transition: var(--transition); box-shadow: var(--shadow-card); position: relative; overflow: hidden; }
.bacteria-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent); }
.bacteria-card:hover { border-color: var(--teal); box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }
.bacteria-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.bacteria-header h3 { color: var(--teal-dark); margin: 0; font-weight: 700; }
.bacteria-desc { color: var(--text-light); font-size: 0.9375rem; margin-bottom: 18px; line-height: 1.6; }
.benefits-list { display: flex; flex-wrap: wrap; gap: 10px; }
.benefit { background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(16,185,129,0.06)); color: var(--green-dark); padding: 8px 14px; border-radius: 8px; font-size: 0.8125rem; font-weight: 600; border: 1px solid rgba(16,185,129,0.15); }
.condition { background: linear-gradient(135deg, rgba(139,92,246,0.12), rgba(139,92,246,0.06)); color: var(--purple-dark); padding: 8px 14px; border-radius: 8px; font-size: 0.8125rem; font-weight: 600; border: 1px solid rgba(139,92,246,0.15); }


/* ── 22. BOOSTERS ──────────────────────────────────────────────────────── */

.booster-card { padding: 16px; border: 2px solid var(--border); border-radius: 12px; cursor: pointer; transition: all 0.2s ease; background: white; margin-bottom: 12px; position: relative; }
.booster-card:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(43,184,176,0.15); }
.booster-card.selected { border-color: var(--teal); background: linear-gradient(135deg, rgba(43,184,176,0.1), rgba(43,184,176,0.05)); }
.booster-card.selected::after { content: '\2713'; position: absolute; top: 8px; right: 12px; color: var(--teal); font-weight: bold; font-size: 1.25rem; }
.booster-card.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; filter: grayscale(50%); }
.booster-card.booster-relevant { border-left: 4px solid var(--green); }
.booster-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.booster-name { font-weight: 600; color: var(--teal-dark); }
.booster-effect { background: var(--green); color: white; padding: 4px 10px; border-radius: 20px; font-size: 0.8125rem; font-weight: 600; }
.booster-desc { font-size: 0.875rem; color: var(--text-light); margin-bottom: 8px; }
.booster-match { font-size: 0.75rem; color: var(--green); font-weight: 500; padding-top: 8px; border-top: 1px dashed var(--border); }
#boosterTags { display: block; }
.boosters-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.boosters-section { margin-bottom: 8px; }
.boosters-extended { padding-top: 16px; border-top: 1px dashed var(--border); }


/* ── 23. OUTCOMES & FOLLOW-UPS ─────────────────────────────────────────── */

.outcome-rating-btn { flex-direction: column; padding: 12px 8px; min-height: 60px; }
.outcome-rating-btn.selected { background: var(--teal); color: white; border-color: var(--teal); }
.outcome-rating-btn[data-rating="excellent"].selected { background: var(--green); border-color: var(--green); }
.outcome-rating-btn[data-rating="good"].selected { background: var(--teal); border-color: var(--teal); }
.outcome-rating-btn[data-rating="partial"].selected { background: var(--amber); border-color: var(--amber); color: var(--teal-dark); }
.outcome-rating-btn[data-rating="none"].selected { background: var(--coral-bright); border-color: var(--coral-bright); }
.outcome-rating-btn[data-rating="worse"].selected { background: #e74c3c; border-color: #e74c3c; }
.outcome-rating-option input:checked + div { border-color: var(--teal) !important; background: rgba(43,184,176,0.1); }
.outcome-symptom { font-size: 0.8125rem; padding: 6px 10px; }
.outcome-symptom.selected { background: var(--teal); color: white; }
.score-btn { width: 40px; height: 40px; border: none; border-radius: 8px; font-weight: 700; font-size: 1rem; cursor: pointer; transition: all 0.2s; opacity: 0.6; }
.score-btn:hover { opacity: 0.9; transform: scale(1.1); }
.score-btn.selected { opacity: 1; transform: scale(1.15); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.follow-up-item { display: flex; justify-content: space-between; align-items: center; padding: 12px; background: var(--bg-light); border-radius: 8px; margin-bottom: 8px; border-left: 4px solid #6366f1; }
.follow-up-item.overdue { border-left-color: #ef4444; background: #fef2f2; }
.follow-up-item.completed { border-left-color: #10b981; background: #f0fdf4; opacity: 0.7; }
.btn-complete-followup { background: #10b981; color: white; border: none; padding: 4px 10px; border-radius: 4px; cursor: pointer; font-size: 0.75rem; }


/* ── 24. TOGGLE SWITCH ─────────────────────────────────────────────────── */

.toggle-switch { position: relative; display: inline-block; width: 60px; height: 34px; cursor: pointer; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background-color: var(--toggle-bg, #ccc); transition: 0.3s; border-radius: 34px; }
.toggle-slider:before { position: absolute; content: ""; height: 26px; width: 26px; left: 4px; bottom: 4px; background-color: var(--charcoal); transition: 0.3s; border-radius: 50%; }
.toggle-switch input:checked + .toggle-slider { background-color: var(--toggle-active, #2BB8B0); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(26px); }


/* ── 25. DOCUMENTS ─────────────────────────────────────────────────────── */

.documents-section { margin-top: 20px; padding: 16px; background: white; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.document-item { display: flex; justify-content: space-between; align-items: center; padding: 12px; background: #f8fafc; border-radius: 8px; margin-bottom: 8px; }
.document-item .doc-info { flex: 1; }
.document-item .doc-title { font-weight: 600; color: #1e293b; }
.document-item .doc-meta { font-size: 0.8rem; color: #64748b; }
.document-item .doc-ai-summary { margin-top: 8px; padding: 8px; background: #eff6ff; border-radius: 6px; font-size: 0.85rem; color: #1e40af; border-left: 3px solid #3b82f6; }
.btn-upload-doc { background: linear-gradient(135deg, #6366f1, #4f46e5); color: white; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.btn-upload-doc:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(99,102,241,0.3); }
.upload-modal-content { padding: 24px; }
.upload-dropzone { border: 2px dashed #cbd5e1; border-radius: 12px; padding: 40px; text-align: center; cursor: pointer; transition: all 0.2s; margin-bottom: 16px; }
.upload-dropzone:hover, .upload-dropzone.dragover { border-color: #6366f1; background: #f5f3ff; }
.upload-dropzone input[type="file"] { display: none; }
.doc-upload-zone { border: 2px dashed #D4956A; border-radius: 16px; padding: 32px; text-align: center; cursor: pointer; transition: all 0.3s; background: linear-gradient(180deg, rgba(212,149,106,0.05), rgba(212,149,106,0.02)); margin-bottom: 24px; }
.doc-upload-zone:hover { border-color: #B87333; background: linear-gradient(180deg, rgba(212,149,106,0.1), rgba(212,149,106,0.05)); transform: translateY(-2px); }
.doc-upload-icon { font-size: 3rem; margin-bottom: 12px; }
.doc-type-grid { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.doc-type-chip { padding: 6px 14px; border-radius: 20px; font-size: 13px; border: 1px solid #E5DDD6; background: white; cursor: pointer; transition: all 0.2s; }
.doc-type-chip:hover, .doc-type-chip.active { background: #5C3D5E; color: white; border-color: #5C3D5E; }
.doc-card { background: white; border-radius: 12px; border: 1px solid #E5DDD6; padding: 16px; margin-bottom: 12px; transition: all 0.2s; }
.doc-card:hover { border-color: #D4956A; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.doc-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.doc-icon.consent { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.doc-icon.clinical_note { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.doc-icon.intake { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.doc-icon.other { background: linear-gradient(135deg, #f3f4f6, #e5e7eb); }
.doc-ai-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: white; font-size: 11px; font-weight: 600; border-radius: 12px; }
.doc-ai-summary { margin-top: 12px; padding: 12px; background: linear-gradient(180deg, #faf5ff, #f3e8ff); border-radius: 8px; border-left: 3px solid #8b5cf6; font-size: 13px; color: #5b21b6; }

/* ── 26. ANNOUNCEMENTS ─────────────────────────────────────────────────── */

.announcement-banner { background: linear-gradient(135deg, var(--teal-dark), #0a4d55); color: var(--cream-soft); padding: 0; margin: -36px -48px 24px -48px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.15); position: relative; }
.announcement-banner.hidden { display: none; }
.announcement-ticker-wrapper { overflow: hidden; position: relative; padding: 12px 0; }
.announcement-ticker-wrapper:hover .announcement-ticker { animation-play-state: paused; }
.announcement-ticker { display: flex; align-items: center; gap: 0; animation: ticker-scroll 30s linear infinite; width: max-content; }
.announcement-ticker-content { display: flex; align-items: center; gap: 32px; padding: 0 16px; }
.announcement-banner::before, .announcement-banner::after { content: ''; position: absolute; top: 0; bottom: 0; width: 60px; z-index: 2; pointer-events: none; }
.announcement-banner::before { left: 0; background: linear-gradient(to right, var(--teal-dark), transparent); }
.announcement-banner::after { right: 0; background: linear-gradient(to left, #0a4d55, transparent); }
.announcement-item { display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: rgba(255,255,255,0.1); border-radius: 8px; cursor: pointer; transition: all 0.2s; white-space: nowrap; flex-shrink: 0; }
.announcement-item:hover { background: rgba(255,255,255,0.25); transform: scale(1.02); }
.announcement-icon { font-size: 18px; }
.announcement-text { font-size: 14px; font-weight: 500; }
.announcement-badge { font-size: 10px; padding: 2px 8px; border-radius: 12px; font-weight: 600; text-transform: uppercase; }
.announcement-badge.new { background: var(--amber); color: #000; }
.announcement-badge.update { background: #3b82f6; color: #fff; }
.announcement-badge.feature { background: #8b5cf6; color: #fff; }
.announcement-badge.info { background: rgba(255,255,255,0.2); color: #fff; }
.announcement-badge.urgent { background: #ef4444; color: #fff; animation: pulse 1.5s infinite; }
.announcement-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 10000; padding: 20px; }
.announcement-modal.hidden { display: none; }
.announcement-modal-content { background: white; border-radius: 16px; max-width: 600px; width: 100%; max-height: 80vh; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.announcement-modal-header { background: linear-gradient(135deg, var(--teal), var(--teal-dark)); color: white; padding: 20px 24px; display: flex; align-items: center; gap: 12px; }
.announcement-modal-header h3 { margin: 0; flex: 1; font-size: 1.25rem; }
.announcement-close { background: rgba(255,255,255,0.2); border: none; color: white; width: 32px; height: 32px; border-radius: 50%; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.announcement-close:hover { background: rgba(255,255,255,0.3); }
.announcement-type-badge { padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 600; text-transform: uppercase; background: rgba(255,255,255,0.2); }
.announcement-modal-body { padding: 24px; max-height: 400px; overflow-y: auto; line-height: 1.7; color: var(--text); }
.announcement-modal-body p { margin: 0 0 16px; }
.announcement-modal-body ul { margin: 0 0 16px; padding-left: 20px; }
.announcement-modal-body li { margin-bottom: 8px; }
.announcement-modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: var(--bg-light); }
.announcement-modal-footer span { font-size: 13px; color: var(--text-muted); }


/* ── 27. PROFILE & DURATION ────────────────────────────────────────────── */

.profile-tab { padding: 8px 16px; border: 1px solid var(--border); border-radius: 8px; background: white; cursor: pointer; font-size: 0.875rem; font-weight: 500; transition: all 0.2s; }
.profile-tab:hover { border-color: var(--teal); background: rgba(43,184,176,0.05); }
.profile-tab.active { background: var(--teal); color: white; border-color: var(--teal); }
.duration-option { display: block; padding: 16px; border: 2px solid var(--border); border-radius: 12px; cursor: pointer; text-align: center; transition: all 0.2s; background: white; }
.duration-option:hover { border-color: var(--teal); background: rgba(43,184,176,0.05); }
.duration-option.selected { border-color: var(--teal); background: rgba(43,184,176,0.1); }
.duration-option input { display: none; }
.duration-months { font-weight: 700; font-size: 1.125rem; color: var(--teal-dark); }
.duration-price { font-size: 1.5rem; font-weight: 700; color: var(--teal); margin: 8px 0; }
.duration-badge { font-size: 0.75rem; padding: 4px 8px; border-radius: 4px; background: var(--bg-light); color: var(--text-light); }
.duration-badge.discount { background: rgba(34,197,94,0.1); color: #166534; }
.patient-profile .card { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 16px; }

/* ── 27b. PATIENT PROFILE MODAL SCROLL PERF ────────────────────────────── */
.modal-overlay.active > .modal { will-change: transform; }
.patient-profile { contain: layout style; }

/* ── 27c. DOCUMENT TAB STYLES (moved from inline <style>) ─────────────── */
.doc-upload-zone {
  border: 2px dashed var(--coral); border-radius: 16px; padding: 32px;
  text-align: center; cursor: pointer; transition: all 0.3s;
  background: linear-gradient(180deg, rgba(212,149,106,0.05) 0%, rgba(212,149,106,0.02) 100%);
  margin-bottom: 24px;
}
.doc-upload-zone:hover { border-color: var(--coral-dark); background: linear-gradient(180deg, rgba(212,149,106,0.1) 0%, rgba(212,149,106,0.05) 100%); transform: translateY(-2px); }
.doc-upload-icon { font-size: 3rem; margin-bottom: 12px; }
.doc-type-grid { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.doc-type-chip { padding: 6px 14px; border-radius: 20px; font-size: 13px; border: 1px solid var(--sand); background: white; cursor: pointer; transition: all 0.2s; }
.doc-type-chip:hover, .doc-type-chip.active { background: var(--clinical-primary); color: white; border-color: var(--clinical-primary); }
.doc-card { background: white; border-radius: 12px; border: 1px solid var(--sand); padding: 16px; margin-bottom: 12px; transition: all 0.2s; }
.doc-card:hover { border-color: var(--coral); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.doc-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.doc-icon.consent { background: linear-gradient(135deg, var(--info-bg), var(--info-bg)); }
.doc-icon.clinical_note { background: linear-gradient(135deg, var(--success-bg), var(--success-bg)); }
.doc-icon.intake { background: linear-gradient(135deg, var(--warning-bg), var(--coral-bg)); }
.doc-icon.other { background: linear-gradient(135deg, var(--gray-100), var(--gray-200)); }
.doc-ai-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; background: linear-gradient(135deg, var(--clinical-primary-light), var(--clinical-primary)); color: white; font-size: 11px; font-weight: 600; border-radius: 12px; }
.doc-ai-summary { margin-top: 12px; padding: 12px; background: linear-gradient(180deg, var(--dtc-plum-bg) 0%, var(--dtc-plum-bg) 100%); border-radius: 8px; border-left: 3px solid var(--clinical-primary-light); font-size: 13px; color: var(--clinical-primary-darker); }

/* ── 28. FAB BUTTON ────────────────────────────────────────────────────── */

.fab-button { position: fixed; bottom: 24px; right: 24px; width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, var(--teal), var(--teal-dark)); color: white; border: none; box-shadow: 0 4px 12px rgba(43,184,176,0.4); cursor: pointer; z-index: 1000; display: flex; align-items: center; justify-content: center; transition: all 0.2s; font-size: 1.5rem; }
.fab-button:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(43,184,176,0.5); }
.quick-patient-item:hover { background: rgba(43,184,176,0.05); border-color: var(--teal); }
.page.hidden ~ #fabNewOrder, #loginPage:not(.hidden) ~ #fabNewOrder { display: none; }


/* ── 29. DTC PAGE ──────────────────────────────────────────────────────── */

.dtc-header { background: linear-gradient(135deg, #5C3D5E, #7A5A7D); border-radius: 16px; padding: 32px; margin-bottom: 24px; color: white; }
.dtc-header h2 { margin: 0 0 8px; font-size: 28px; font-weight: 600; }
.dtc-header p { margin: 0; opacity: 0.9; font-size: 14px; }
.dtc-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.dtc-stat-card { background: white; border-radius: 12px; padding: 24px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.06); border: 1px solid #E5DDD6; transition: transform 0.2s, box-shadow 0.2s; }
.dtc-stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(92,61,94,0.15); }
.dtc-stat-value { font-size: 36px; font-weight: 700; color: #5C3D5E; line-height: 1; }
.dtc-stat-label { font-size: 13px; color: #7A7578; margin-top: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.dtc-stat-card.highlight { background: linear-gradient(135deg, #FEF7F0, #FFF9F5); border-color: #E8B992; }
.dtc-stat-card.highlight .dtc-stat-value { color: #D4956A; }
.dtc-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding: 16px 20px; background: #FAF6F1; border-radius: 12px; }
.dtc-toolbar h3 { margin: 0; font-size: 18px; color: #2C2428; }
.dtc-toolbar-actions { display: flex; gap: 12px; }
.dtc-btn { padding: 10px 20px; border-radius: 8px; font-weight: 500; font-size: 14px; cursor: pointer; transition: all 0.2s; border: none; display: inline-flex; align-items: center; gap: 8px; }
.dtc-btn-primary { background: linear-gradient(135deg, #5C3D5E, #7A5A7D); color: white; }
.dtc-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(92,61,94,0.3); }
.dtc-btn-secondary { background: white; color: #5C3D5E; border: 1px solid #E5DDD6; }
.dtc-btn-secondary:hover { background: #FAF6F1; border-color: #5C3D5E; }
.dtc-table-container { background: white; border-radius: 16px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.06); border: 1px solid #E5DDD6; }
.dtc-table { width: 100%; border-collapse: collapse; }
.dtc-table th { background: #FAF6F1; padding: 16px; text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: #5C3D5E; border-bottom: 2px solid #E5DDD6; }
.dtc-table td { padding: 16px; border-bottom: 1px solid #F0EBE6; vertical-align: middle; }
.dtc-table tr:hover { background: #FDFCFB; }
.dtc-table tr:last-child td { border-bottom: none; }
.dtc-customer-name { font-weight: 600; color: #2C2428; font-size: 15px; }
.dtc-customer-dob { font-size: 12px; color: #7A7578; margin-top: 2px; }
.dtc-customer-email { font-size: 13px; color: #4A4347; }
.dtc-verified-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: #059669; background: #D1FAE5; padding: 2px 8px; border-radius: 12px; margin-top: 4px; }
.dtc-plan-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.dtc-plan-3month { background: #EDE9FE; color: #7C3AED; }
.dtc-plan-6month { background: #FEF3C7; color: #D97706; }
.dtc-plan-12month { background: #D1FAE5; color: #059669; }
.dtc-goal-badge { display: inline-block; padding: 4px 10px; background: #F3F4F6; border-radius: 6px; font-size: 12px; color: #4B5563; }
.dtc-symptom-tag { display: inline-block; padding: 3px 8px; background: #FEE2E2; color: #991B1B; border-radius: 4px; font-size: 11px; margin: 2px; }
.dtc-file-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: #EFF6FF; color: #2563EB; border-radius: 6px; text-decoration: none; font-size: 13px; font-weight: 500; transition: all 0.2s; }
.dtc-file-link:hover { background: #DBEAFE; }
.dtc-no-file { color: #9CA3AF; font-size: 13px; font-style: italic; }
.dtc-actions { display: flex; gap: 8px; }
.dtc-action-btn { padding: 8px 14px; border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.2s; border: none; display: inline-flex; align-items: center; gap: 6px; }
.dtc-action-import { background: linear-gradient(135deg, #5C3D5E, #7A5A7D); color: white; }
.dtc-action-import:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(92,61,94,0.3); }
.dtc-action-view { background: #F3F4F6; color: #374151; }
.dtc-action-view:hover { background: #E5E7EB; }
.dtc-empty-state { text-align: center; padding: 60px 40px; color: #7A7578; }
.dtc-empty-state svg { width: 64px; height: 64px; margin-bottom: 16px; opacity: 0.5; }
.dtc-empty-state h3 { margin: 0 0 8px; color: #4A4347; }

/* ADA: focus styles for DTC interactive elements */
.dtc-action-btn:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; box-shadow: var(--shadow-glow-sm); }
.dtc-file-link:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.dtc-table th:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }

/* ADA: high-contrast mode support for DTC badges */
@media (forced-colors: active) {
  .dtc-plan-badge, .dtc-symptom-tag, .dtc-verified-badge, .dtc-goal-badge { border: 1px solid ButtonText; forced-color-adjust: none; }
  .dtc-action-btn { border: 1px solid ButtonText; }
  .dtc-table th { border-bottom: 2px solid ButtonText; }
}

/* ADA: min touch target for DTC action buttons (44x44px WCAG 2.5.5) */
.dtc-action-btn { min-height: 44px; min-width: 44px; }
.dtc-file-link { min-height: 44px; display: inline-flex; align-items: center; }


/* ── 30. ORGANIZATION ──────────────────────────────────────────────────── */

.org-welcome { max-width: 600px; margin: 40px auto; text-align: center; }
.org-welcome-card { background: white; border-radius: 16px; padding: 48px 40px; box-shadow: 0 4px 24px rgba(0,0,0,0.08); border: 1px solid var(--border); }
.org-welcome-icon { width: 80px; height: 80px; background: linear-gradient(135deg, var(--teal), var(--teal-dark)); border-radius: 20px; display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; font-size: 36px; box-shadow: 0 4px 12px rgba(0,128,128,0.2); }
.org-welcome h2 { margin: 0 0 12px; color: var(--text); font-size: 1.5rem; font-weight: 700; }
.org-welcome p { color: var(--text-muted); margin: 0 0 32px; line-height: 1.6; font-size: 0.95rem; }
.org-btn { padding: 14px 28px; border-radius: 10px; font-weight: 600; font-size: 15px; cursor: pointer; transition: all 0.2s; border: none; display: inline-flex; align-items: center; gap: 10px; margin: 8px; }
.org-btn-primary { background: linear-gradient(135deg, var(--teal), var(--teal-dark)); color: var(--cream-soft, #FFF8E7); box-shadow: 0 4px 12px rgba(0,128,128,0.25); }
.org-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,128,128,0.35); }
.org-btn-secondary { background: var(--bg-light); color: var(--teal-dark); border: 2px solid var(--border); }
.org-btn-secondary:hover { background: var(--teal-light); border-color: var(--teal); }
.org-divider { display: flex; align-items: center; margin: 24px 0; color: var(--text-muted); font-size: 13px; }
.org-divider::before, .org-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.org-divider span { padding: 0 16px; }
.org-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; text-align: left; }
.org-benefit { background: var(--bg-light); padding: 16px; border-radius: 12px; }
.org-benefit-icon { font-size: 24px; margin-bottom: 8px; }
.org-benefit-title { font-weight: 600; color: var(--text); font-size: 0.875rem; margin-bottom: 4px; }
.org-benefit-desc { font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; }
.org-info-box { background: var(--amber-light); border: 1px solid var(--amber); border-radius: 12px; padding: 20px; margin-top: 24px; }
.org-nav-tab { background: transparent !important; border: none !important; color: var(--text-light) !important; font-weight: 500 !important; padding: 12px 16px !important; border-radius: 8px !important; transition: all 0.2s !important; }
.org-nav-tab:hover { background: var(--teal-light) !important; color: var(--teal-dark) !important; }
.org-nav-tab.active { background: var(--teal) !important; color: white !important; }


/* ── 31. PRINT STYLES ──────────────────────────────────────────────────── */

.print-document { font-family: 'Inter', Arial, sans-serif; max-width: 800px; margin: 0 auto; padding: 40px; background: white; color: #333; }
.print-header { text-align: center; border-bottom: 3px solid #2BB8B0; padding-bottom: 20px; margin-bottom: 30px; }
.print-header h1 { color: #0D4F5C; margin: 0 0 8px; font-size: 2rem; }
.print-header .subtitle { color: #666; font-size: 0.875rem; }
.print-section { margin-bottom: 24px; page-break-inside: avoid; }
.print-section h2 { color: #0D4F5C; font-size: 1.125rem; border-bottom: 1px solid #e5e7eb; padding-bottom: 8px; margin-bottom: 12px; }
.print-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.print-table th, .print-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #e5e7eb; }
.print-table th { background: #f8fafc; font-weight: 600; color: #0D4F5C; }
.print-table tr:nth-child(even) { background: #f8fafc; }
.print-footer { margin-top: 40px; padding-top: 20px; border-top: 1px solid #e5e7eb; text-align: center; font-size: 0.75rem; color: #666; }
.print-logo { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: 2rem; font-weight: 500; color: #0D4F5C; letter-spacing: 1px; }
.print-logo span { color: #2BB8B0; }
.print-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.print-badge-teal { background: #d1fae5; color: #065f46; }
.print-badge-amber { background: #fef3c7; color: #92400e; }
.print-total { font-size: 1.5rem; font-weight: 700; color: #059669; }
.print-only { display: none; }

@media print {
  body * { visibility: hidden; }
  #printArea, #printArea * { visibility: visible; }
  #printArea { position: absolute; left: 0; top: 0; width: 100%; padding: 20px; background: white; }
  .no-print { display: none !important; }
  .print-only { display: block !important; }
}


/* ── 32. MOBILE HAMBURGER & RESPONSIVE ─────────────────────────────────── */

.mobile-menu-toggle {
  display: none; position: fixed; top: 12px; right: 12px; z-index: 1001;
  background: var(--teal); color: white; border: none; border-radius: 8px;
  padding: 10px 14px; font-size: 1.25rem; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.mobile-menu-toggle:hover { background: var(--teal-dark); }

@media (max-width: 768px) {
  .mobile-menu-toggle { display: block; }
  .sidebar {
    position: fixed !important; top: 0; left: -280px; width: 280px !important;
    height: 100vh !important; z-index: 1000; transition: left 0.3s ease;
    overflow: hidden; box-shadow: 2px 0 12px rgba(0,0,0,0.15);
  }
  .sidebar.mobile-open { left: 0; }
  .sidebar nav { flex-direction: column; }
  .sidebar .nav-item { width: 100%; text-align: left; padding: 14px 20px; }
  .main { margin-left: 0 !important; padding-top: 60px; }
  .mobile-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); z-index: 999;
  }
  .mobile-overlay.active { display: block; }
  .stats { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .steps { flex-direction: column; }
  .login-floating-stats, .login-floating-partners { display: none; }
  .login-logo h1 { font-size: 3rem; }
  .announcement-banner { margin: -20px -20px 20px -20px; }
  .toast-container { left: 10px; right: 10px; bottom: 10px; max-width: none; }
  .dtc-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .org-benefits { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .sidebar { width: 100% !important; left: -100%; }
  .sidebar.mobile-open { left: 0; }
  .dtc-stats-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}


/* ── 33. LOADING SPINNER ───────────────────────────────────────────────── */

.loading-spinner {
  width: 40px; height: 40px; border: 3px solid var(--sand-dark);
  border-top-color: var(--teal); border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
}
.loading-spinner.sm { width: 20px; height: 20px; border-width: 2px; }
.loading-spinner.lg { width: 60px; height: 60px; border-width: 4px; }
.loading-overlay {
  position: absolute; inset: 0; background: rgba(255,255,255,0.7);
  backdrop-filter: blur(4px); display: flex; align-items: center;
  justify-content: center; z-index: 10; border-radius: inherit;
}


/* ── 34. EMPTY STATE ───────────────────────────────────────────────────── */

.empty-state {
  text-align: center; padding: 60px 40px; color: var(--text-muted);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { margin: 0 0 8px; color: var(--text-light); }
.empty-state p { margin: 0; font-size: 0.9rem; }


/* ── 35. UTILITY CLASSES ───────────────────────────────────────────────── */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }
.mt-0 { margin-top: 0; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.mb-lg { margin-bottom: 24px; }
.p-0 { padding: 0; }
.p-sm { padding: 8px; }
.p-md { padding: 16px; }
.p-lg { padding: 24px; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--text-muted); }
.text-teal { color: var(--teal); }
.text-green { color: var(--green); }
.text-red { color: var(--error); }
.text-amber { color: var(--amber); }
.text-purple { color: var(--purple); }
.text-coral { color: var(--coral); }
.cursor-pointer { cursor: pointer; }
.no-select { user-select: none; }
.opacity-50 { opacity: 0.5; }

/* Page titles — consistent across all sections */
.page-title { color: var(--teal-deep); font-weight: 700; font-size: 1.75rem; margin-bottom: 20px; }
.page-title-inline { color: var(--teal-deep); font-weight: 700; font-size: 1.75rem; margin: 0; }
.page-subtitle { color: var(--slate); font-size: 1rem; margin-bottom: 24px; }

/* Section card headers */
.section-title { color: var(--teal-deep); font-weight: 700; margin: 0; }
.section-desc { color: var(--slate); font-size: 0.9rem; line-height: 1.6; }

/* Action button variants — vibrant */
.btn-coral { background: linear-gradient(135deg, var(--coral), var(--coral-bright)); color: white; font-weight: 600; border: none; box-shadow: 0 4px 16px rgba(232,168,124,0.4); }
.btn-coral:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(232,168,124,0.5); }
.btn-purple { background: linear-gradient(135deg, var(--purple), var(--purple-dark)); color: white; font-weight: 600; border: none; box-shadow: 0 4px 16px rgba(139,92,246,0.35); }
.btn-purple:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(139,92,246,0.45); }
.btn-teal { background: linear-gradient(135deg, var(--teal), var(--teal-deep)); color: white; font-weight: 600; border: none; box-shadow: 0 4px 16px rgba(13,79,92,0.35); }
.btn-teal:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(13,79,92,0.45); }
.btn-amber { background: linear-gradient(135deg, var(--amber), var(--amber-dark)); color: white; font-weight: 600; border: none; box-shadow: 0 4px 16px rgba(245,158,11,0.35); }
.btn-amber:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(245,158,11,0.45); }

/* Feature cards — colored accents */
.card-teal { background: linear-gradient(135deg, rgba(26,122,138,0.06) 0%, rgba(26,122,138,0.02) 100%); border: 2px solid var(--teal); box-shadow: 0 8px 32px rgba(26,122,138,0.1); }
.card-purple { background: linear-gradient(135deg, rgba(139,92,246,0.08) 0%, rgba(139,92,246,0.03) 100%); border: 2px solid var(--purple); box-shadow: 0 8px 32px rgba(139,92,246,0.12); }
.card-coral { background: linear-gradient(135deg, rgba(232,168,124,0.08) 0%, rgba(232,168,124,0.03) 100%); border: 2px solid var(--coral); box-shadow: 0 8px 32px rgba(232,168,124,0.12); }
.card-amber { background: linear-gradient(135deg, rgba(245,158,11,0.08) 0%, rgba(245,158,11,0.03) 100%); border: 2px solid var(--amber); box-shadow: 0 8px 32px rgba(245,158,11,0.1); }
.card-dark { background: linear-gradient(145deg, #082F38 0%, #0D4F5C 40%, #1A6B7C 80%, #2BB8B0 100%); color: white; border: none; border-radius: 20px; box-shadow: 0 16px 48px rgba(8,47,56,0.45); }
.card-dark h2 { color: white; text-shadow: 0 2px 4px rgba(0,0,0,0.25); font-size: 1.4rem; }
.card-dark .btn-glass { background: rgba(255,255,255,0.15); color: white; border: 1.5px solid rgba(255,255,255,0.35); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-radius: 50px; font-weight: 600; transition: all 0.2s; overflow: hidden; isolation: isolate; }
.card-dark .btn-glass:hover { background: rgba(255,255,255,0.28); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(255,255,255,0.15); }
.card-dark::after { opacity: 0; }

/* Stat card color accents */
.stat-card-purple { background: linear-gradient(135deg, rgba(139,92,246,0.1) 0%, rgba(139,92,246,0.04) 100%); border-left: 4px solid var(--purple); }
.stat-card-green { background: linear-gradient(135deg, rgba(16,185,129,0.1) 0%, rgba(16,185,129,0.04) 100%); border-left: 4px solid var(--green); }
.stat-card-amber { background: linear-gradient(135deg, rgba(245,158,11,0.1) 0%, rgba(245,158,11,0.04) 100%); border-left: 4px solid var(--amber); }
.stat-card-teal { background: linear-gradient(135deg, rgba(26,122,138,0.1) 0%, rgba(26,122,138,0.04) 100%); border-left: 4px solid var(--teal); }
.stat-card-coral { background: linear-gradient(135deg, rgba(232,168,124,0.1) 0%, rgba(232,168,124,0.04) 100%); border-left: 4px solid var(--coral); }
.stat-card-red { background: linear-gradient(135deg, rgba(220,38,38,0.08) 0%, rgba(220,38,38,0.03) 100%); border-left: 4px solid var(--error); }
.stat-card-red .stat-value { background: linear-gradient(135deg, #991b1b, #dc2626); -webkit-background-clip: text; background-clip: text; }
.stat-card-plum { background: linear-gradient(135deg, rgba(109,40,217,0.08) 0%, rgba(109,40,217,0.03) 100%); border-left: 4px solid var(--dtc-plum); }
.stat-card-plum .stat-value { background: linear-gradient(135deg, #4C1D95, #7c3aed); -webkit-background-clip: text; background-clip: text; }

/* Admin stats — smaller values to prevent wrapping on dense grids */
.admin-stats .stat-card { padding: 20px 16px; }
.admin-stats .stat-value { font-size: 2.25rem; white-space: nowrap; }

/* Flex layouts */
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-wrap-gap { display: flex; gap: 12px; flex-wrap: wrap; }
.flex-center-gap { display: flex; align-items: center; gap: 12px; }

/* Form row */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* Profile / Admin tabs — vibrant */
.profile-tab {
  padding: 10px 18px; border-radius: 10px; border: 1.5px solid var(--sand-dark);
  background: white; color: var(--slate); font-size: 0.8125rem; font-weight: 500;
  cursor: pointer; transition: var(--transition); white-space: nowrap;
}
.profile-tab:hover { background: rgba(26,122,138,0.06); border-color: var(--teal); color: var(--teal-deep); transform: translateY(-1px); }
.profile-tab.active { background: linear-gradient(135deg, var(--teal), var(--teal-deep)); color: white; border-color: transparent; font-weight: 600; box-shadow: 0 4px 16px rgba(13,79,92,0.3); }

/* DTC Plum tab variant */
.profile-tab-plum { border-color: var(--dtc-plum-light); color: var(--dtc-plum); }
.profile-tab-plum:hover { background: var(--dtc-plum-bg); border-color: var(--dtc-plum); color: var(--dtc-plum-dark); }
.profile-tab-plum.active { background: linear-gradient(135deg, var(--dtc-plum), var(--dtc-plum-dark)); color: white; border-color: transparent; box-shadow: 0 4px 16px rgba(109,40,217,0.3); }

/* Page section color bars — top accent on content cards */
.card-accent-teal { border-top: 4px solid var(--teal); }
.card-accent-coral { border-top: 4px solid var(--coral); }
.card-accent-purple { border-top: 4px solid var(--purple); }
.card-accent-plum { border-top: 4px solid var(--dtc-plum); }
.card-accent-honey { border-top: 4px solid var(--dtc-honey); }

/* DTC Honey button */
.btn-honey { background: linear-gradient(135deg, var(--dtc-honey), var(--dtc-honey-dark)); color: white; font-weight: 600; border: none; box-shadow: 0 4px 16px rgba(212,168,67,0.4); }
.btn-honey:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(212,168,67,0.5); }

/* DTC Plum button */
.btn-plum { background: linear-gradient(135deg, var(--dtc-plum), var(--dtc-plum-dark)); color: white; font-weight: 600; border: none; box-shadow: 0 4px 16px rgba(109,40,217,0.4); }
.btn-plum:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(109,40,217,0.5); }

/* DTC Channel cards */
.card-plum { background: linear-gradient(135deg, rgba(109,40,217,0.08) 0%, rgba(109,40,217,0.03) 100%); border: 2px solid var(--dtc-plum); box-shadow: 0 8px 32px rgba(109,40,217,0.12); }
.card-plum h2 { color: var(--dtc-plum-dark); }
.card-honey { background: linear-gradient(135deg, rgba(212,168,67,0.08) 0%, rgba(212,168,67,0.03) 100%); border: 2px solid var(--dtc-honey); box-shadow: 0 8px 32px rgba(212,168,67,0.12); }
.card-honey h2 { color: var(--dtc-honey-dark); }

/* Stat card honey variant */
.stat-card-honey { background: linear-gradient(135deg, rgba(212,168,67,0.1) 0%, rgba(212,168,67,0.04) 100%); border-left: 4px solid var(--dtc-honey); }
.card-accent-amber { border-top: 4px solid var(--amber); }
.card-accent-green { border-top: 4px solid var(--green); }

/* Table header teal accent */
.table thead { background: linear-gradient(135deg, rgba(26,122,138,0.06), rgba(26,122,138,0.02)); }
.table thead th { color: var(--teal-deep); font-weight: 600; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.5px; padding: 14px 16px; border-bottom: 2px solid var(--teal); }

/* Patients table — colored status badges */
.badge-teal { background: rgba(26,122,138,0.1); color: var(--teal-deep); padding: 4px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; }
.badge-purple { background: var(--dtc-plum-bg); color: var(--dtc-plum); padding: 4px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; }
.badge-coral { background: var(--coral-bg); color: var(--coral-bright); padding: 4px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; }
.badge-green { background: var(--success-bg); color: var(--green-dark); padding: 4px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; }
.badge-amber { background: var(--warning-bg); color: var(--amber-dark); padding: 4px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; }

/* Empty state — more vibrant */
.empty-state { color: var(--slate); padding: 48px 24px; text-align: center; font-size: 1rem; }
.empty-state::before { display: block; font-size: 2.5rem; margin-bottom: 12px; }


/* ── 36. VERSION FOOTER ────────────────────────────────────────────────── */

.version-footer {
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  opacity: 0.7;
}


/* ═══════════════════════════════════════════════════════════════════════════
   MICROBIOME PORTAL IDENTITY — v7 Visual Layer
   Bio-cells · Diversity meter · Welcome motifs · Educational curiosity
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 37. BIO-CELLS — Floating microbiome atmosphere ────────────────────── */

@keyframes cellFloat {
  0%   { opacity: 0; transform: translateY(20px) scale(0.8); }
  15%  { opacity: 1; }
  50%  { transform: translateY(-15px) scale(1.05); }
  85%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(20px) scale(0.8); }
}
@keyframes bioFloat {
  0%   { transform: scale(1) rotate(0deg); }
  100% { transform: scale(1.03) rotate(1deg); }
}

.bio-cell {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: cellFloat 18s ease-in-out infinite;
  pointer-events: none;
}
.bio-cell::before {
  content: '';
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  background: inherit;
  filter: blur(2px);
  opacity: 0.4;
}
.bio-cell:nth-child(1) { width: 80px; height: 80px; background: radial-gradient(circle, rgba(43,184,176,0.15), rgba(43,184,176,0.03)); top: 15%; left: 8%; animation-delay: 0s; animation-duration: 22s; }
.bio-cell:nth-child(2) { width: 50px; height: 50px; background: radial-gradient(circle, rgba(232,168,124,0.12), rgba(232,168,124,0.02)); top: 70%; right: 12%; animation-delay: -4s; animation-duration: 18s; }
.bio-cell:nth-child(3) { width: 35px; height: 35px; background: radial-gradient(circle, rgba(139,92,246,0.10), rgba(139,92,246,0.02)); top: 40%; left: 75%; animation-delay: -8s; animation-duration: 24s; }
.bio-cell:nth-child(4) { width: 100px; height: 100px; background: radial-gradient(circle, rgba(43,184,176,0.08), transparent); bottom: 20%; left: 20%; animation-delay: -12s; animation-duration: 20s; }
.bio-cell:nth-child(5) { width: 45px; height: 45px; background: radial-gradient(circle, rgba(16,185,129,0.10), transparent); top: 25%; right: 30%; animation-delay: -6s; animation-duration: 16s; }

/* Login tagline */
.login-tagline {
  text-align: center;
  font-size: 0.875rem;
  color: var(--slate);
  margin: 20px 0 28px;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.login-tagline em {
  color: var(--teal);
  font-style: normal;
  font-weight: 600;
}


/* ── 38. WELCOME HEADER — Microbiome motif overlay ─────────────────────── */

.welcome-header {
  background: linear-gradient(135deg, var(--teal-deep) 0%, var(--teal) 60%, #1A8A7A 100%);
  border-radius: 24px;
  padding: 36px 40px;
  color: white;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}
/* Microbiome cell-pattern overlay */
.welcome-header::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle 40px at 85% 25%, rgba(255,255,255,0.08) 0%, transparent 70%),
    radial-gradient(circle 25px at 75% 70%, rgba(255,255,255,0.05) 0%, transparent 70%),
    radial-gradient(circle 60px at 15% 60%, rgba(255,255,255,0.04) 0%, transparent 70%),
    radial-gradient(circle 18px at 90% 80%, rgba(232,168,124,0.08) 0%, transparent 70%),
    radial-gradient(circle 30px at 50% 20%, rgba(255,255,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}
/* Glass shine top */
.welcome-header::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), transparent);
  pointer-events: none;
}
.welcome-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
  color: white;
}
.welcome-header p {
  font-size: 0.9rem;
  opacity: 0.85;
  position: relative;
  z-index: 1;
}

/* Bio-insight chip — pulsing coral dot */
.bio-insight {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255,255,255,0.15);
  color: white;
}
.bio-insight .dot {
  width: 6px; height: 6px;
  background: var(--coral);
  border-radius: 50%;
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }


/* ── 39. DIVERSITY METER — Educational microbiome visualization ────────── */

.diversity-meter {
  background: white;
  border-radius: 20px;
  padding: 28px 32px;
  border: 1px solid var(--sand-dark);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 24px;
  transition: var(--transition);
}
.diversity-meter:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}
.diversity-visual {
  display: flex;
  gap: 3px;
  align-items: flex-end;
}
.diversity-bar {
  width: 8px;
  border-radius: 4px;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  animation: barGrow 1.2s ease-out forwards;
  transform-origin: bottom;
}
@keyframes barGrow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}
.diversity-info { flex: 1; }
.diversity-info h3 { font-size: 0.95rem; color: var(--teal-deep); margin-bottom: 4px; }
.diversity-info p { font-size: 0.8rem; color: var(--slate); line-height: 1.5; }
.diversity-score {
  font-size: 2rem;
  font-weight: 800;
  color: var(--green);
}


/* ── 40. SIDEBAR BIO-PATTERN ───────────────────────────────────────────── */

.sidebar::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 200px;
  background:
    radial-gradient(ellipse 60px 60px at 20% 80%, rgba(43,184,176,0.04) 0%, transparent 70%),
    radial-gradient(ellipse 40px 40px at 75% 60%, rgba(232,168,124,0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}


/* ═══════════════════════════════════════════════════════════════════════════
   END OF FLORE CLINICAL DESIGN SYSTEM v7.0.0
   Microbiome Portal Identity · 40 sections · Real logo · Bio-motifs
   ═══════════════════════════════════════════════════════════════════════════ */
