/* ============================================================
   Pharmacy Compounding - Modern Medical UI
   Complete visual redesign with animations, icons, glassmorphism
   ============================================================ */

/* =========================
   1. DESIGN TOKENS
   ========================= */
:root {
  color-scheme: light dark;

  /* Primary palette */
  --color-primary: #1e40af;
  --color-primary-dark: #1e3a8a;
  --color-primary-light: #3b82f6;
  --color-primary-lighter: #eff6ff;
  --color-accent: #2563eb;
  --color-warm: #f59e0b;

  /* Neutrals */
  --color-text: #1a1a2e;
  --color-text-muted: #64748b;
  --color-text-light: #94a3b8;
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-bg-section: #f1f5f9;
  --color-border: #e2e8f0;
  --color-error: #dc2626;
  --color-success: #059669;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.25rem;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  --spacing-4xl: 6rem;

  /* Borders & Shadows */
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  --gradient-hero: linear-gradient(135deg, #0c1e4a 0%, #1e3a8a 30%, #1e40af 60%, #3b82f6 100%);
  --gradient-accent: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  --gradient-warm: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);

  /* Transitions */
  --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s var(--ease-out);
  --transition-base: 0.3s var(--ease-out);
  --transition-slow: 0.5s var(--ease-out);
}

/* =========================
   2. SKIP NAVIGATION
   ========================= */
.skip-nav {
  position: absolute;
  top: -100%;
  left: var(--spacing-md);
  z-index: 200;
  padding: var(--spacing-sm) var(--spacing-lg);
  background: var(--color-primary-dark);
  color: #fff;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  transition: top var(--transition-fast);
}
.skip-nav:focus {
  top: 0;
  outline: 2px solid var(--color-warm);
  outline-offset: 2px;
  color: #fff;
  text-decoration: none;
}

/* Screen reader only - visually hidden but accessible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================
   3. RESET & BASE
   ========================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  line-height: 1.6;
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-primary-dark); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { line-height: 1.3; letter-spacing: -0.02em; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 var(--spacing-md); }

/* =========================
   3. HEADER & NAVIGATION
   ========================= */
.site-header {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226,232,240,0.5);
  padding: var(--spacing-md) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow var(--transition-base), background var(--transition-base);
}
.site-header.scrolled {
  background: rgba(255,255,255,0.95);
  box-shadow: var(--shadow-md);
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo-img {
  height: 60px;
  width: auto;
  display: block;
}
.logo span {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-left: 0.5rem;
}

/* Account headers */
.site-header-account { background: rgba(255,255,255,0.92); }
.site-header-account .main-nav a {
  padding: 0.5rem 1rem;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}
.site-header-account .main-nav a:hover,
.site-header-account .main-nav a.active {
  background: var(--gradient-primary);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.main-nav { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.main-nav a { color: var(--color-text); font-weight: 500; font-size: var(--text-sm); }
.main-nav a:hover, .main-nav a.active { color: var(--color-primary); text-decoration: none; }
.main-nav .nav-link { padding: 0.4rem 0.6rem; border-radius: var(--radius); transition: color var(--transition-fast), background var(--transition-fast); }
.main-nav .nav-link:hover { background: var(--color-primary-lighter); }
.nav-logout-form { display: inline; margin: 0; padding: 0; }
.nav-logout-btn { background: none; border: none; cursor: pointer; font: inherit; color: inherit; }

/* Nav CTA button (login links) */
.main-nav .nav-cta {
  background: var(--gradient-primary);
  color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--text-sm);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
  box-shadow: var(--shadow-sm);
}
.main-nav .nav-cta:hover {
  box-shadow: 0 4px 12px rgba(30,64,175,0.4);
  transform: translateY(-1px);
}

/* Dropdown nav */
.nav-dropdown { position: relative; }
.nav-dropdown .nav-trigger {
  display: block;
  padding: 0.4rem 0.6rem;
  color: var(--color-text);
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
  font-size: var(--text-sm);
  border-radius: var(--radius);
  transition: color var(--transition-fast), background var(--transition-fast);
}
.nav-dropdown .nav-trigger:hover,
.nav-dropdown.active .nav-trigger { color: var(--color-primary); background: var(--color-primary-lighter); }
.nav-dropdown .nav-menu {
  visibility: hidden;
  pointer-events: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--spacing-xs) var(--spacing-sm) var(--spacing-sm);
  margin-top: 0;
  list-style: none;
  z-index: 200;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
}
.nav-dropdown:hover .nav-menu,
.nav-dropdown:focus-within .nav-menu {
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}
.nav-dropdown .nav-menu li { margin: 0; }
.nav-dropdown .nav-menu a {
  display: block;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  white-space: nowrap;
  font-size: var(--text-sm);
  transition: all var(--transition-fast);
}
.nav-dropdown .nav-menu a:hover { background: var(--color-primary-lighter); text-decoration: none; color: var(--color-primary); }

/* Hamburger menu */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  position: relative;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  margin: 5px auto;
  transition: transform var(--transition-base), opacity var(--transition-fast);
  border-radius: 2px;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-toggle:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: var(--radius); }

/* =========================
   4. HERO SECTION
   ========================= */
.hero {
  background: url('/public/assets/img/hero-bg.jpg') center/cover no-repeat;
  padding: var(--spacing-4xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 85vh;
  display: flex;
  align-items: center;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(6,36,89,0.68) 0%, rgba(16,63,145,0.60) 50%, rgba(5,46,80,0.65) 100%);
  z-index: 1;
}
.hero .container { position: relative; z-index: 2; }
.hero h1 {
  font-size: var(--text-5xl);
  font-weight: 800;
  color: #fff;
  margin-bottom: var(--spacing-lg);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.hero .hero-gradient-text {
  background: linear-gradient(135deg, #fff 0%, #a7f3d0 50%, #6ee7b7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: var(--text-xl);
  color: rgba(255,255,255,0.85);
  max-width: 640px;
  margin: 0 auto var(--spacing-xl);
  line-height: 1.7;
}
.hero .hero-buttons { display: flex; gap: var(--spacing-md); justify-content: center; flex-wrap: wrap; }
.hero .btn { font-size: var(--text-lg); padding: 0.85rem 2rem; }
.hero .hero-buttons .btn:first-child { animation: pulse-glow 2s ease-in-out infinite; }
.hero .hero-buttons .btn:first-child:hover { animation: none; }
.hero .btn-secondary { border-color: rgba(255,255,255,0.5); color: #fff; }
.hero .btn-secondary:hover { background: rgba(255,255,255,0.15); border-color: #fff; }

/* Floating decorative shapes */
.hero-shapes { display: none; }
.hero-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
  background: #fff;
}
.hero-shape-1 { width: 300px; height: 300px; top: 10%; left: -5%; animation: float 8s ease-in-out infinite; }
.hero-shape-2 { width: 200px; height: 200px; top: 60%; right: -3%; animation: float 10s ease-in-out infinite reverse; }
.hero-shape-3 { width: 150px; height: 150px; top: 20%; right: 15%; animation: float 12s ease-in-out infinite 2s; border-radius: 30%; }
.hero-shape-4 { width: 80px; height: 80px; bottom: 20%; left: 20%; animation: float 7s ease-in-out infinite 1s; }

/* Wave divider */
.wave-divider {
  position: relative;
  margin-top: -2px;
  line-height: 0;
}
.wave-divider svg {
  display: block;
  width: 100%;
  height: auto;
}

/* =========================
   5. BUTTONS
   ========================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  background: var(--gradient-primary);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: var(--text-base);
  text-decoration: none;
  transition: all var(--transition-base);
  box-shadow: 0 2px 8px rgba(30,64,175,0.25);
  line-height: 1.5;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(30,64,175,0.35);
  text-decoration: none;
  color: #fff;
}
.btn:active { transform: translateY(0); }
.btn:focus-visible {
  outline: 2px solid var(--color-primary-dark);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(30,64,175,0.3);
}
.btn:disabled, .btn.loading { opacity: 0.6; cursor: not-allowed; pointer-events: none; transform: none; }
.btn.loading::after {
  content: '';
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-left: 0.5em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  box-shadow: none;
}
.btn-secondary:hover {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(30,64,175,0.3);
}
.btn-secondary:focus-visible { outline-color: var(--color-primary); }

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-border);
  box-shadow: none;
}
.btn-outline:hover { border-color: var(--color-primary); background: var(--color-primary-lighter); color: var(--color-primary); }

.btn-danger { background: var(--color-error); box-shadow: 0 2px 8px rgba(220,38,38,0.25); }
.btn-danger:hover { background: #b91c1c; box-shadow: 0 4px 12px rgba(220,38,38,0.35); }
.btn-danger:focus-visible { outline-color: var(--color-error); }

.btn-lg { padding: 0.85rem 2rem; font-size: var(--text-lg); }
.btn-sm { padding: 0.4rem 1rem; font-size: var(--text-sm); }
.btn-icon i { font-size: 1.1em; }

/* =========================
   6. MAIN CONTENT
   ========================= */
.main-content {
  min-height: 0;
  flex: 1;
  padding: var(--spacing-2xl) 0;
  animation: fade-in-up 0.5s ease-out;
}
.page-title {
  font-size: var(--text-3xl);
  font-weight: 800;
  margin-bottom: var(--spacing-lg);
  color: var(--color-primary-dark);
  letter-spacing: -0.03em;
}
.page-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-top: calc(var(--spacing-sm) * -1);
  margin-bottom: var(--spacing-xl);
}

/* Sections */
.section {
  margin-bottom: var(--spacing-3xl);
  padding: var(--spacing-3xl) 0;
}
.section h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  color: var(--color-text);
  letter-spacing: -0.02em;
}
.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-xl);
  max-width: 600px;
}
.section-centered { text-align: center; }
.section-centered .section-subtitle { margin-left: auto; margin-right: auto; }
.section-bg-alt { background: var(--color-bg-section); }
.section-bg-light { background: #f0f7ff; }
.section-bg-blue {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark, #1a5276));
    color: #fff;
}
.section-bg-blue h2,
.section-bg-blue h3,
.section-bg-blue p,
.section-bg-blue .section-subtitle {
    color: #fff;
}
.section-bg-blue .condition-card {
    background: #fff;
}
.section-bg-blue .condition-card,
.section-bg-blue .condition-card h3,
.section-bg-blue .condition-card p {
    color: #333;
}
.section-bg-blue .feature-card {
    background: #fff;
    color: var(--color-text);
}
.section-bg-blue .feature-card h3 {
    color: var(--color-primary);
}
.section-bg-blue .highlight-box {
    background: rgba(255,255,255,0.18);
    color: #fff;
    border-color: rgba(255,255,255,0.35);
    font-size: 1.1rem;
    line-height: 1.6;
    padding: 1.25rem 1.75rem;
}
.section-bg-blue .highlight-box i {
    color: #fff;
    font-size: 1.75rem;
    flex-shrink: 0;
}
.section-bg-blue .highlight-box strong {
    color: #fbbf24;
    font-weight: 800;
    font-size: 1.2em;
    letter-spacing: 0.02em;
}
.section-bg-blue .btn {
    background: #fff;
    color: var(--color-primary);
}
.section-bg-blue .btn:hover {
    background: rgba(255,255,255,0.9);
}
.section-bg-blue .btn-outline {
    background: transparent;
    border-color: #fff;
    color: #fff;
}
.section-bg-blue .btn-outline:hover {
    background: #fff;
    color: var(--color-primary);
}
.section-bg-blue .text-lg {
    color: rgba(255,255,255,0.92);
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Photo banners -- full-width image strips between sections */
.photo-banner {
    width: 100%;
    height: 450px;
    overflow: hidden;
    position: relative;
}
.about-team-photo {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.about-team-photo img {
    width: 100%;
    height: auto;
    display: block;
}
.photo-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    display: block;
}

/* Split section -- text + image side by side */
.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}
.split-text h2 {
    color: #fff;
    margin-bottom: 1.25rem;
}
.split-text .text-lg {
    color: rgba(255,255,255,0.9);
    line-height: 1.8;
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
}
.split-text .highlight-box {
    margin-top: 1.5rem;
    margin-bottom: 0;
}
.split-image {
    border-radius: var(--radius-lg, 12px);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.split-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 360px;
}

/* Button outline variant */
.btn-outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}
.btn-outline:hover {
    background: var(--color-primary);
    color: #fff;
}

.section-bg-gradient {
  background: var(--gradient-dark);
  color: #fff;
}
.section-bg-gradient h2, .section-bg-gradient p { color: #fff; }
.section-bg-gradient .section-subtitle { color: rgba(255,255,255,0.75); }

/* Trust bar */
.trust-bar {
  text-align: center;
  padding: var(--spacing-xl) 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
}
.trust-bar::before, .trust-bar::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 80px;
  height: 1px;
  background: var(--color-border);
}
.trust-bar::before { left: calc(50% - 220px); }
.trust-bar::after { right: calc(50% - 220px); }

/* =========================
   7. CARDS
   ========================= */
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
}
.card:hover { box-shadow: var(--shadow-md); border-color: rgba(30,64,175,0.15); }

/* Feature cards (homepage) */
.feature-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-2xl) var(--spacing-xl);
  text-align: center;
  transition: box-shadow var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
  position: relative;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-lighter);
}
.feature-card .feature-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacing-lg);
  font-size: 1.75rem;
  transition: transform var(--transition-base);
}
.feature-card:hover .feature-icon { transform: scale(1.1); }
.feature-card .feature-icon.icon-primary { background: #dbeafe; color: #1e40af; }
.feature-card .feature-icon.icon-blue { background: #dbeafe; color: #2563eb; }
.feature-card .feature-icon.icon-amber { background: #fef3c7; color: #d97706; }
.feature-card .feature-icon.icon-purple { background: #ede9fe; color: #7c3aed; }
.feature-card .feature-icon.icon-teal { background: #ccfbf1; color: #0d9488; }
.feature-card .feature-icon.icon-rose { background: #ffe4e6; color: #e11d48; }
.feature-card h3 { font-size: var(--text-xl); font-weight: 700; margin: 0 0 var(--spacing-sm); color: var(--color-text); }
.feature-card p { color: var(--color-text-muted); margin: 0; line-height: 1.7; }

/* Condition cards */
.condition-card {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-lg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: box-shadow var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
  text-decoration: none;
  color: var(--color-text);
  border-left: 4px solid var(--color-primary);
}
.condition-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
  text-decoration: none;
  color: var(--color-text);
  border-left-color: var(--color-accent);
}
.condition-card .condition-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-lighter);
  color: var(--color-primary);
  font-size: 1.25rem;
  flex-shrink: 0;
}
.condition-card h3 { margin: 0; font-size: var(--text-base); font-weight: 600; }
.condition-card p { margin: 0.25rem 0 0; font-size: var(--text-sm); color: var(--color-text-muted); }

/* Stat cards (dashboards) */
.stat-card {
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.stat-card h3 { font-size: var(--text-sm); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.9; margin: 0 0 var(--spacing-sm); }
.stat-card .stat-number { font-size: var(--text-4xl); font-weight: 800; line-height: 1.2; margin-bottom: var(--spacing-sm); }
.stat-card a { color: rgba(255,255,255,0.9); text-decoration: underline; font-size: var(--text-sm); font-weight: 500; }
.stat-card a:hover { color: #fff; }
.stat-card > i:first-child {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  font-size: 3rem;
  opacity: 0.15;
}
.stat-card .stat-icon {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  font-size: 3rem;
  opacity: 0.15;
}
.stat-card-content { position: relative; z-index: 1; }
.stat-card .stat-label { font-size: var(--text-sm); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.9; }
.stat-card-link {
  display: inline-block;
  margin-top: var(--spacing-md);
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  position: relative;
  z-index: 1;
}
.stat-card-link:hover { color: #fff; text-decoration: underline; }
.stat-green { background: linear-gradient(135deg, #059669 0%, #10b981 100%); }
.stat-blue { background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%); }
.stat-purple { background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%); }
.stat-amber { background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%); }
.stat-teal { background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%); }
.stat-indigo { background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%); }
.stat-rose { background: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%); }

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--spacing-lg);
}
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* =========================
   8. TIMELINE / STEPS
   ========================= */
.timeline {
  position: relative;
  padding-left: 60px;
  margin: var(--spacing-2xl) 0;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-primary), var(--color-accent));
}
.timeline-step {
  position: relative;
  margin-bottom: var(--spacing-2xl);
  padding-left: var(--spacing-lg);
}
.timeline-step:last-child { margin-bottom: 0; }
.timeline-step .step-number {
  position: absolute;
  left: -60px;
  top: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: var(--text-xl);
  box-shadow: 0 4px 12px rgba(30,64,175,0.3);
  z-index: 1;
}
.timeline-step h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin: 0 0 var(--spacing-sm);
  color: var(--color-text);
}
.timeline-step p { color: var(--color-text-muted); margin: 0; line-height: 1.7; }

/* Inline steps (horizontal) */
.steps-inline {
  display: flex;
  gap: var(--spacing-xl);
  counter-reset: step-counter;
}
.step-inline {
  flex: 1;
  text-align: center;
  position: relative;
}
.step-inline::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 800;
  font-size: var(--text-xl);
  margin: 0 auto var(--spacing-md);
  box-shadow: 0 4px 12px rgba(30,64,175,0.3);
}
.step-inline::after {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(50% + 36px);
  width: calc(100% - 72px);
  height: 2px;
  background: var(--color-border);
}
.step-inline:last-child::after { display: none; }
.step-inline h3 { font-size: var(--text-lg); font-weight: 700; margin: 0 0 var(--spacing-xs); }
.step-inline p { font-size: var(--text-sm); color: var(--color-text-muted); margin: 0; }

/* =========================
   9. FOOTER
   ========================= */
.site-footer {
  background: #0f172a;
  color: rgba(255,255,255,0.8);
  padding: var(--spacing-3xl) 0 0;
  font-size: var(--text-sm);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--spacing-2xl);
  margin-bottom: var(--spacing-2xl);
}
.footer-col h4 {
  color: #fff;
  font-size: var(--text-base);
  font-weight: 700;
  margin: 0 0 var(--spacing-md);
  letter-spacing: -0.01em;
}
.footer-col p { margin: 0 0 var(--spacing-sm); line-height: 1.7; }
.footer-col a {
  color: rgba(255,255,255,0.7);
  display: block;
  padding: 0.2rem 0;
  transition: color var(--transition-fast);
}
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-tagline { font-size: var(--text-base); color: rgba(255,255,255,0.6); margin-top: var(--spacing-sm); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: var(--spacing-lg) 0;
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-size: var(--text-xs);
}
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: #fff; }

/* =========================
   10. FORMS
   ========================= */
.form-group { margin-bottom: var(--spacing-lg); }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  font-size: var(--text-sm);
  color: var(--color-text);
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-size: var(--text-base);
  font-family: var(--font-sans);
  color: var(--color-text);
  background: #fff;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(30,64,175,0.15);
}
::placeholder { color: var(--color-text-light); opacity: 1; }
.form-group .error { color: var(--color-error); font-size: var(--text-sm); margin-top: var(--spacing-xs); }
.form-group .form-hint { display: block; font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--spacing-xs); }
.form-row { display: flex; gap: var(--spacing-md); flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 150px; }

/* Password toggle */
.password-wrapper { position: relative; display: flex; }
.login-card .password-wrapper { max-width: none; }
.password-wrapper input { flex: 1; padding-right: 3.5rem; }
.password-toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-primary);
  cursor: pointer;
  font-size: var(--text-sm);
  padding: 0.25rem 0.5rem;
  font-weight: 500;
}
.password-toggle:hover { color: var(--color-primary-dark); }
.password-toggle:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 1px; border-radius: 3px; }

/* Input error state */
.input-error { border-color: var(--color-error) !important; box-shadow: 0 0 0 3px rgba(220,38,38,0.15) !important; }

/* =========================
   11. TABLES
   ========================= */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); font-size: var(--text-sm); }
th {
  font-weight: 600;
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  text-transform: uppercase;
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
}
tr:last-child td { border-bottom: none; }
tr:hover { background: var(--color-primary-lighter); }
tbody tr { transition: background var(--transition-fast); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}
.badge-draft { background: #f1f5f9; color: #475569; }
.badge-submitted { background: #dbeafe; color: #1e3a8a; }
.badge-fax_sent { background: #dbeafe; color: #1e3a8a; }
.badge-failed { background: #fee2e2; color: #991b1b; }
.badge-completed { background: #d1fae5; color: #065f46; }

/* Portal */
.portal-header { margin-bottom: var(--spacing-xl); }
.portal-nav { display: flex; gap: var(--spacing-md); margin-bottom: var(--spacing-lg); flex-wrap: wrap; }
.portal-nav a {
  padding: 0.5rem 1rem;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  color: var(--color-text);
  transition: all var(--transition-fast);
}
.portal-nav a:hover, .portal-nav a.active { background: var(--gradient-primary); color: #fff; text-decoration: none; }

/* =========================
   12. MODAL
   ========================= */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-content {
  background: #fff;
  padding: var(--spacing-2xl);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  max-width: 440px;
  width: 90%;
  text-align: center;
  animation: fade-in-up 0.3s ease-out;
}
.modal-content h2 { margin: 0 0 var(--spacing-md); color: var(--color-primary-dark); font-size: var(--text-2xl); font-weight: 700; }
.modal-content p { margin: 0 0 var(--spacing-lg); color: var(--color-text); line-height: 1.7; }
.modal-content .btn { margin-top: 0.5rem; }

/* =========================
   13. ALERTS
   ========================= */
.alert {
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-md);
  font-size: var(--text-sm);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* =========================
   14. ACCORDION
   ========================= */
.accordion { margin-bottom: var(--spacing-md); }
.accordion-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-sm);
  overflow: hidden;
  transition: box-shadow var(--transition-base);
}
.accordion-item:hover { box-shadow: var(--shadow-sm); border-left: 3px solid var(--color-primary); }
.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-lg) var(--spacing-xl);
  cursor: pointer;
  background: #fff;
  border: none;
  width: 100%;
  text-align: left;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  font-family: var(--font-sans);
  transition: background var(--transition-fast);
}
.accordion-header:hover { background: var(--color-bg-alt); }
.accordion-header i {
  transition: transform var(--transition-base);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.accordion-item.active .accordion-header i { transform: rotate(180deg); }
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}
.accordion-body-inner {
  padding: 0 var(--spacing-xl) var(--spacing-lg);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* =========================
   15. WIZARD
   ========================= */
.wizard-steps { display: flex; gap: var(--spacing-md); margin-bottom: var(--spacing-xl); flex-wrap: wrap; }
.wizard-step {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
}
.wizard-step.active { background: var(--gradient-primary); color: #fff; box-shadow: 0 2px 8px rgba(30,64,175,0.25); }
.wizard-step.done { background: #dbeafe; color: #1e40af; }
.wizard-panel { display: none; }
.wizard-panel.active { display: block; }
.order-wizard { margin-bottom: var(--spacing-xl); }

/* =========================
   15b. SCHEDULE / CALENDAR
   ========================= */
#schedule-calendar,
#visit-calendar {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
}
.fc-event.available { background: #1e40af; border-color: #1e40af; }
.fc-event.booked { background: #1e40af; border-color: #1e40af; }
.fc { font-size: 0.9rem; }
.fc-event { cursor: pointer; }
.fc-event.selected { box-shadow: 0 0 0 3px var(--color-primary); }
.visit-layout { display: grid; grid-template-columns: 1fr 400px; gap: 2rem; align-items: start; }
.selected-slot { background: var(--color-bg-alt); padding: 0.75rem; border-radius: var(--radius-lg); margin-bottom: 1rem; }
.schedule-holder { margin-top: var(--spacing-lg); }

/* 15c. FORMULA EDIT / SIZES */
.sizes-row { align-items: end; }
.btn-remove-size { background: var(--color-error); color: #fff; border: none; padding: 0.4rem 0.75rem; border-radius: var(--radius); font-size: var(--text-sm); cursor: pointer; }
.btn-remove-size:hover { background: #b91c1c; }

/* 15d. SLOTS FORM GRID */
.slots-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 2rem; align-items: start; }

/* =========================
   16. EMPTY STATE
   ========================= */
.empty-state { text-align: center; padding: var(--spacing-3xl) var(--spacing-lg); color: var(--color-text-muted); }
.empty-state i { font-size: 3rem; margin-bottom: var(--spacing-md); opacity: 0.2; display: block; color: var(--color-primary-light); }
.empty-state p { font-size: var(--text-lg); margin-bottom: var(--spacing-md); }

/* =========================
   17. QUOTE / HIGHLIGHT
   ========================= */
.quote-block {
  border-left: 4px solid var(--color-primary);
  padding: var(--spacing-lg) var(--spacing-xl);
  margin: var(--spacing-xl) 0;
  font-size: var(--text-xl);
  font-style: italic;
  color: var(--color-text);
  line-height: 1.7;
  background: var(--color-primary-lighter);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
.highlight-box {
  background: var(--color-primary-lighter);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg) var(--spacing-xl);
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}
.highlight-box i { font-size: 1.5rem; color: var(--color-primary); }

/* Breadcrumb */
.breadcrumb { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--spacing-sm); }
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-primary); text-decoration: none; }

/* Card with gradient top bar (preserves border-radius) */
.card-gradient-top { position: relative; overflow: hidden; }
.card-gradient-top::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

/* Condition card color variants */
.condition-card.card-rose { border-left-color: #e11d48; }
.condition-card.card-rose .condition-icon { background: #ffe4e6; color: #e11d48; }
.condition-card.card-teal { border-left-color: #0d9488; }
.condition-card.card-teal .condition-icon { background: #ccfbf1; color: #0d9488; }
.condition-card.card-amber { border-left-color: #d97706; }
.condition-card.card-amber .condition-icon { background: #fef3c7; color: #d97706; }
.condition-card.card-purple { border-left-color: #7c3aed; }
.condition-card.card-purple .condition-icon { background: #ede9fe; color: #7c3aed; }
.condition-card.card-blue { border-left-color: #2563eb; }
.condition-card.card-blue .condition-icon { background: #dbeafe; color: #2563eb; }
.condition-card.card-indigo { border-left-color: #4338ca; }
.condition-card.card-indigo .condition-icon { background: #e0e7ff; color: #4338ca; }

/* Team grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}
.team-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    color: #334155;
    transition: box-shadow var(--transition-base), transform var(--transition-base);
    text-align: center;
}
.team-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}
.team-photo {
    width: 100%;
    height: 320px;
    overflow: hidden;
    background: var(--color-bg-section);
}
.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center top;
    display: block;
}
.team-avatar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
}
.team-info {
    padding: 1.5rem;
}
.team-info h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: #1a1a2e;
}
.team-credentials {
    font-weight: 500;
    color: #64748b;
}
.team-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e40af;
    margin: 0 0 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.team-fact {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.6;
    margin: 0;
}
.team-fav {
    font-size: 0.8rem;
    color: #1e40af;
    margin: 0.75rem 0 0;
}
.team-fav-label {
    font-weight: 600;
}
.team-fav em {
    font-style: italic;
}

/* HIPAA compliance bar */
.hipaa-compliance-bar {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}
.hipaa-compliance-bar strong {
    color: #1e3a5f;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.25rem;
}
.hipaa-compliance-bar p {
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}
.compliance-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}
.compliance-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #334155;
}
.compliance-list li:last-child { border-bottom: none; }
.compliance-list li i { color: #059669; margin-top: 0.2rem; flex-shrink: 0; }

/* Cookie consent banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #1e293b;
    border-top: 1px solid #334155;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    padding: 1rem;
}
.cookie-inner {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.cookie-inner p {
    flex: 1;
    min-width: 280px;
    color: #cbd5e1;
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}
.cookie-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}
.cookie-actions .btn { white-space: nowrap; }

/* HIPAA badge */
.hipaa-badge {
    display: block;
    opacity: 0.9;
}

/* Condition folders */
.condition-folder {
    margin-bottom: 3rem;
}
.folder-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
}
.folder-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}
.folder-icon.card-blue { background: #dbeafe; color: #2563eb; }
.folder-icon.card-teal { background: #ccfbf1; color: #0d9488; }
.folder-icon.card-purple { background: #ede9fe; color: #7c3aed; }
.folder-icon.card-amber { background: #fef3c7; color: #d97706; }
.folder-header h2 {
    margin: 0;
    font-size: 1.4rem;
    color: #1a1a2e !important;
}
.folder-count {
    font-size: 0.85rem;
    color: #64748b !important;
    margin-left: auto;
}
.folder-coming-soon {
    color: #94a3b8 !important;
    font-style: italic;
    padding: 2rem;
    text-align: center;
    background: #f8fafc;
    border-radius: var(--radius-lg);
    border: 2px dashed #e2e8f0;
}

/* Education / Study cards */
.education-studies {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.study-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 2rem;
    color: #334155;
    transition: box-shadow var(--transition-base);
}
.study-card:hover {
    box-shadow: var(--shadow-md);
}
.study-topic {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
}
.study-topic.card-rose { background: #ffe4e6; color: #e11d48; }
.study-topic.card-teal { background: #ccfbf1; color: #0d9488; }
.study-topic.card-purple { background: #ede9fe; color: #7c3aed; }
.study-topic.card-blue { background: #dbeafe; color: #2563eb; }
.study-topic.card-amber { background: #fef3c7; color: #d97706; }
.study-card h3 {
    font-size: 1.2rem;
    margin: 0 0 0.5rem;
    color: #1a1a2e;
}
.study-meta {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 1rem;
}
.study-summary {
    font-size: 1rem;
    line-height: 1.7;
    color: #334155;
    margin: 0 0 1.25rem;
}

/* Formulary items */
.formula-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.formula-item:last-child { border-bottom: none; }
.formula-name {
    flex: 1;
    font-weight: 600;
    font-size: 0.95rem;
    color: #1a1a2e;
    min-width: 0;
}
.formula-form {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    background: #f1f5f9;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    vertical-align: middle;
}
.formula-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.formula-size {
    width: 180px;
    padding: 0.4rem 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.85rem;
}
.formula-qty {
    width: 55px;
    padding: 0.4rem 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.85rem;
    text-align: center;
}
.formula-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.formula-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.formula-pricing {
    font-size: 0.85rem;
    color: #475569;
}
.formula-no-price {
    color: #94a3b8;
    font-size: 0.85rem;
}
@media (max-width: 768px) {
    .formula-item { flex-direction: column; align-items: stretch; }
    .formula-controls { flex-wrap: wrap; }
    .formula-size { width: 100%; }
}

/* Provider benefits (for-providers) */
.provider-benefits {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.provider-benefit {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: background var(--transition-base), transform var(--transition-base);
}
.provider-benefit:hover {
    background: rgba(255,255,255,0.18);
    transform: translateX(4px);
}
.benefit-number {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    color: var(--color-primary);
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.benefit-content {
    flex: 1;
}
.benefit-icon {
    font-size: 1.5rem;
    color: #fbbf24;
    margin-bottom: 0.5rem;
}
.benefit-content h3 {
    color: #fff !important;
    font-size: 1.1rem;
    margin: 0 0 0.4rem;
}
.benefit-content p {
    color: rgba(255,255,255,0.85) !important;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* Feature list (for-providers) */
.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-base);
  color: var(--color-text);
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li i { color: var(--color-primary); font-size: var(--text-lg); margin-top: 0.15rem; flex-shrink: 0; }

/* Stats strip */
.stats-strip {
  display: flex;
  justify-content: center;
  gap: var(--spacing-3xl);
  padding: var(--spacing-xl) 0;
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-item .stat-value { font-size: var(--text-3xl); font-weight: 800; color: var(--color-primary); line-height: 1; }
.stat-item .stat-label { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--spacing-xs); }

/* Contact split layout */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--spacing-2xl);
  align-items: start;
}
.contact-info-item {
  display: flex;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}
.contact-info-item i {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--color-primary-lighter);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-info-item h3 { margin: 0 0 0.15rem; font-size: var(--text-sm); font-weight: 600; }
.contact-info-item p { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }

/* Login page */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 30%, #bfdbfe 100%);
  padding: var(--spacing-xl);
  position: relative;
}
.login-page::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(30,64,175,0.08) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(16,185,129,0.06) 0%, transparent 40%);
}
.login-card {
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: var(--spacing-2xl);
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  overflow: hidden;
}
.login-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.login-brand {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}
.login-brand .logo { font-size: var(--text-2xl); display: block; margin-bottom: var(--spacing-xs); }
.login-brand p { color: var(--color-text-muted); font-size: var(--text-sm); margin: 0; }

/* CTA section */
.cta-section {
  background: var(--gradient-primary);
  padding: var(--spacing-3xl) 0;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
}
.cta-section .container { position: relative; z-index: 1; }
.cta-section h2 { font-size: var(--text-3xl); font-weight: 800; color: #fff; margin-bottom: var(--spacing-md); }
.cta-section p { font-size: var(--text-lg); color: rgba(255,255,255,0.85); margin-bottom: var(--spacing-xl); max-width: 500px; margin-left: auto; margin-right: auto; }
.cta-section .btn {
  background: #fff;
  color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.cta-section .btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }

/* Scroll to top */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-base);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-base);
  z-index: 99;
}
.scroll-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { transform: translateY(-3px); box-shadow: var(--shadow-xl); }

/* =========================
   18. ANIMATIONS
   ========================= */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}
@keyframes gradient-shift {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.1); }
  100% { transform: rotate(360deg) scale(1); }
}
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 2px 8px rgba(30,64,175,0.25); }
  50% { box-shadow: 0 4px 20px rgba(30,64,175,0.4); }
}

/* =========================
   19. RESPONSIVE
   ========================= */
@media (max-width: 768px) {
  :root {
    --text-5xl: 2.25rem;
    --text-4xl: 1.75rem;
    --text-3xl: 1.5rem;
  }
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding-top: var(--spacing-md);
    gap: 0.25rem;
  }
  .main-nav.nav-open { display: flex; }
  .main-nav .nav-link, .main-nav a { padding: 0.65rem 0.75rem; }
  .nav-dropdown .nav-menu {
    position: static;
    visibility: hidden;
    pointer-events: none;
    max-height: 0;
    box-shadow: none;
    border: none;
    padding-left: var(--spacing-md);
    opacity: 1;
    transform: none;
    overflow: hidden;
    transition: max-height var(--transition-base), visibility var(--transition-base);
  }
  .nav-dropdown:hover .nav-menu,
  .nav-dropdown:focus-within .nav-menu {
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
  }
  .nav-dropdown.nav-open .nav-menu {
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
    max-height: 500px;
  }

  .hero { min-height: 70vh; padding: var(--spacing-3xl) 0; }
  .hero h1 { font-size: var(--text-3xl); }
  .hero p { font-size: var(--text-base); }
  .hero-shape { display: none; }

  .split-section { grid-template-columns: 1fr; gap: 2rem; }
  .split-image { order: -1; }
  .split-image img { min-height: 240px; }
  .photo-banner { height: 280px; }

  .grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: var(--spacing-xl); }
  .contact-grid { grid-template-columns: 1fr; }
  .visit-layout { grid-template-columns: 1fr; }
  .slots-form-grid { grid-template-columns: 1fr; }
  .steps-inline { flex-direction: column; }
  .step-inline::after { display: none; }
  .timeline { padding-left: 50px; }
  .timeline::before { left: 18px; }
  .timeline-step .step-number { left: -50px; width: 36px; height: 36px; font-size: var(--text-base); }
  .stats-strip { gap: var(--spacing-xl); }
}

@media (max-width: 480px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .hero .hero-buttons { flex-direction: column; align-items: center; }
  .hero .btn { width: 100%; max-width: 280px; justify-content: center; }
  .login-card { padding: var(--spacing-xl) var(--spacing-lg); }
}

/* =========================
   20. REDUCED MOTION
   ========================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero::before { animation: none; }
  .hero-shape { animation: none; }
}

/* =========================
   21. MODERN CSS ENHANCEMENTS
   ========================= */

/* :has() - form group with error child gets a red left border */
@supports selector(:has(*)) {
  .form-group:has(.input-error) {
    border-left: 3px solid var(--color-error);
    padding-left: var(--spacing-sm);
    border-radius: 2px;
  }
  .form-group:has(input:focus, textarea:focus, select:focus) label {
    color: var(--color-primary);
  }
  /* Card with active accordion item gets subtle highlight */
  .accordion-item:has(.accordion-header:focus-visible) {
    box-shadow: 0 0 0 2px var(--color-primary);
  }
}

/* color-mix() - subtle interactive state variations */
@supports (color: color-mix(in srgb, red, blue)) {
  .btn-secondary:hover {
    background: color-mix(in srgb, var(--color-primary) 100%, transparent);
    color: #fff;
  }
  .nav-link:hover {
    background: color-mix(in srgb, var(--color-primary) 8%, transparent);
  }
  .stat-card:hover {
    filter: brightness(1.05);
  }
}

/* Enhanced focus ring - consistent across all interactive elements */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
button:focus-visible,
.btn:focus-visible,
select:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(30,64,175,0.15);
}

/* Active nav links with aria-current */
[aria-current="page"] {
  font-weight: 700;
}

/* =========================
   22. DARK MODE
   ========================= */
@media (prefers-color-scheme: dark) {
  :root {
    --color-text: #e2e8f0;
    --color-text-muted: #94a3b8;
    --color-text-light: #64748b;
    --color-bg: #0f172a;
    --color-bg-alt: #1e293b;
    --color-bg-section: #1a2332;
    --color-border: #334155;
    --color-primary-lighter: rgba(30,64,175,0.15);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.35), 0 2px 4px rgba(0,0,0,0.25);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.4), 0 4px 6px rgba(0,0,0,0.3);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.45), 0 10px 10px rgba(0,0,0,0.25);
    color-scheme: dark;
  }

  body { background: var(--color-bg); color: var(--color-text); }

  /* Header */
  .site-header {
    background: rgba(15,23,42,0.85);
    border-bottom-color: rgba(51,65,85,0.5);
  }
  .site-header.scrolled { background: rgba(15,23,42,0.95); }
  .site-header-account { background: rgba(15,23,42,0.92); }
  .site-header-account .main-nav a { background: var(--color-bg-alt); color: var(--color-text); }

  /* Cards */
  .card { background: var(--color-bg-alt); border-color: var(--color-border); }
  .card:hover { border-color: rgba(59,130,246,0.3); }
  .feature-card { background: var(--color-bg-alt); border-color: var(--color-border); }
  .feature-card:hover { border-color: rgba(59,130,246,0.3); }
  .feature-card h3 { color: var(--color-text); }
  .condition-card { border-color: var(--color-border); color: var(--color-text); }
  .condition-card:hover { color: var(--color-text); }
  .condition-card .condition-icon { background: rgba(30,64,175,0.2); }
  .card-gradient-top { background: var(--color-bg-alt); }

  /* Forms */
  .form-group input,
  .form-group select,
  .form-group textarea {
    background: var(--color-bg);
    border-color: var(--color-border);
    color: var(--color-text);
  }
  .form-group input:focus,
  .form-group textarea:focus,
  .form-group select:focus {
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
  }
  ::placeholder { color: var(--color-text-light); }

  /* Tables */
  th { background: var(--color-bg); color: var(--color-text-muted); }
  tr:hover { background: rgba(30,64,175,0.1); }
  .table-wrap { border-color: var(--color-border); }

  /* Alerts */
  .alert-success { background: rgba(5,150,105,0.15); border-color: rgba(5,150,105,0.3); color: #6ee7b7; }
  .alert-error { background: rgba(220,38,38,0.15); border-color: rgba(220,38,38,0.3); color: #fca5a5; }
  .alert-info { background: rgba(37,99,235,0.15); border-color: rgba(37,99,235,0.3); color: #93c5fd; }

  /* Badges */
  .badge-draft { background: rgba(71,85,105,0.3); color: #94a3b8; }
  .badge-submitted { background: rgba(30,58,138,0.3); color: #93c5fd; }
  .badge-fax_sent { background: rgba(30,58,138,0.3); color: #93c5fd; }
  .badge-failed { background: rgba(153,27,27,0.3); color: #fca5a5; }
  .badge-completed { background: rgba(6,95,70,0.3); color: #6ee7b7; }

  /* Modal */
  .modal-overlay { background: rgba(0,0,0,0.7); }
  .modal-content { background: var(--color-bg-alt); }
  .modal-content h2 { color: var(--color-primary-light); }
  .modal-content p { color: var(--color-text); }

  /* Login page */
  .login-page {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 30%, #1a2332 100%);
  }
  .login-page::before {
    background: radial-gradient(circle at 20% 80%, rgba(59,130,246,0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(16,185,129,0.08) 0%, transparent 40%);
  }
  .login-card { background: var(--color-bg-alt); }
  .login-brand p { color: var(--color-text-muted); }

  /* Navigation */
  .main-nav a { color: var(--color-text); }
  .main-nav a:hover, .main-nav a.active { color: var(--color-primary-light); }
  .main-nav .nav-link:hover { background: rgba(59,130,246,0.1); }
  .nav-dropdown .nav-trigger { color: var(--color-text); }
  .nav-dropdown .nav-trigger:hover { color: var(--color-primary-light); background: rgba(59,130,246,0.1); }
  .nav-dropdown .nav-menu {
    background: var(--color-bg-alt);
    border-color: var(--color-border);
  }
  .nav-dropdown .nav-menu a:hover { background: rgba(59,130,246,0.1); color: var(--color-primary-light); }
  .nav-toggle span { background: var(--color-text); }

  /* Accordion */
  .accordion-item { border-color: var(--color-border); }
  .accordion-header { background: var(--color-bg-alt); color: var(--color-text); }
  .accordion-header:hover { background: var(--color-bg); }

  /* Footer - already dark */
  .site-footer { background: #0a0f1a; }

  /* Section alternating bg */
  .section-bg-alt { background: var(--color-bg-section); }

  /* Highlight box */
  .highlight-box { background: rgba(30,64,175,0.15); border-color: rgba(59,130,246,0.3); }

  /* Quote */
  .quote-block { background: rgba(30,64,175,0.1); color: var(--color-text); }

  /* Wizard */
  .wizard-step { background: var(--color-bg-alt); color: var(--color-text-muted); }
  .wizard-step.done { background: rgba(30,58,138,0.3); color: #93c5fd; }

  /* Password toggle */
  .password-toggle { color: var(--color-primary-light); }
  .password-toggle:hover { color: #60a5fa; }

  /* Breadcrumb */
  .breadcrumb a { color: var(--color-text-muted); }

  /* Scroll to top */
  .scroll-top { box-shadow: var(--shadow-lg); }

  /* Portal nav */
  .portal-nav a { background: var(--color-bg-alt); color: var(--color-text); }

  /* Calendar */
  #schedule-calendar,
  #visit-calendar { background: var(--color-bg-alt); border-color: var(--color-border); }

  /* Feature icon dark mode adjustments */
  .feature-card .feature-icon.icon-blue { background: rgba(37,99,235,0.2); }
  .feature-card .feature-icon.icon-amber { background: rgba(217,119,6,0.2); }
  .feature-card .feature-icon.icon-purple { background: rgba(124,58,237,0.2); }
  .feature-card .feature-icon.icon-teal { background: rgba(13,148,136,0.2); }
  .feature-card .feature-icon.icon-rose { background: rgba(225,29,72,0.2); }
  .feature-card .feature-icon.icon-primary { background: rgba(30,64,175,0.2); }

  /* Contact info */
  .contact-info-item i { background: rgba(30,64,175,0.2); }

  /* Empty state */
  .empty-state i { color: var(--color-primary-light); }

  /* Steps */
  .step-inline::after { background: var(--color-border); }

  /* Team cards */
  .team-card { background: var(--color-bg-alt); border-color: var(--color-border); color: var(--color-text); }
  .team-info h3 { color: #e2e8f0 !important; }
  .team-credentials { color: #94a3b8 !important; }
  .team-title { color: #60a5fa !important; }
  .team-fact { color: #94a3b8 !important; }
  .team-fav { color: #60a5fa !important; }

  /* Study cards */
  .study-card { background: var(--color-bg-alt); border-color: var(--color-border); color: var(--color-text); }
  .study-card h3 { color: #e2e8f0 !important; }
  .study-meta { color: #94a3b8 !important; }
  .study-summary { color: #cbd5e1 !important; }

  /* Condition folder headers */
  .folder-header { border-bottom-color: var(--color-border); }
  .folder-header h2 { color: #e2e8f0 !important; }
  .folder-count { color: #94a3b8 !important; }
  .folder-coming-soon { color: #64748b !important; background: var(--color-bg-section); border-color: var(--color-border); }
  .folder-icon.card-blue { background: rgba(37,99,235,0.2); color: #60a5fa; }
  .folder-icon.card-teal { background: rgba(13,148,136,0.2); color: #2dd4bf; }
  .folder-icon.card-purple { background: rgba(124,58,237,0.2); color: #a78bfa; }
  .folder-icon.card-amber { background: rgba(217,119,6,0.2); color: #fbbf24; }

  /* Condition cards in dark mode */
  .condition-card h3 { color: var(--color-text); }
  .condition-card p { color: var(--color-text-muted); }

  /* Photo banner */
  .photo-banner { opacity: 0.85; }

  /* Split section image */
  .split-image { box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
}

/* =========================
   23. CONTAINER QUERIES
   ========================= */
@supports (container-type: inline-size) {
  .grid { container-type: inline-size; }
  .stat-card { container-type: inline-size; }

  @container (max-width: 300px) {
    .stat-card .stat-number { font-size: var(--text-2xl); }
    .stat-card .stat-label { font-size: var(--text-xs); }
  }
}

/* =========================
   24. LOGICAL PROPERTIES
   ========================= */
@supports (margin-inline-start: 0) {
  .timeline { padding-inline-start: 60px; }
  .timeline::before { inset-inline-start: 24px; }
  .timeline-step { padding-inline-start: var(--spacing-lg); }
  .timeline-step .step-number { inset-inline-start: -60px; }
  .condition-card { border-inline-start: 4px solid var(--color-primary); border-left: unset; }
  .condition-card:hover { border-inline-start-color: var(--color-accent); }
  .accordion-item:hover { border-inline-start: 3px solid var(--color-primary); border-left: unset; }
  .quote-block { border-inline-start: 4px solid var(--color-primary); border-left: unset; padding-inline: var(--spacing-xl); }
  .breadcrumb { margin-block-end: var(--spacing-sm); }
}

/* =========================
   25. TOUCH TARGET SIZING
   ========================= */
@media (pointer: coarse) {
  .nav-link, .main-nav a, .portal-nav a { min-height: 44px; display: inline-flex; align-items: center; }
  .btn-sm { min-height: 44px; }
  .accordion-header { min-height: 48px; }
  .password-toggle { min-height: 44px; min-width: 44px; }
  th, td { padding: 1rem; }
}

/* =========================
   26. TABLE RESPONSIVE CARDS
   ========================= */
@media (max-width: 640px) {
  .table-responsive-cards table,
  .table-responsive-cards thead,
  .table-responsive-cards tbody,
  .table-responsive-cards th,
  .table-responsive-cards td,
  .table-responsive-cards tr {
    display: block;
  }
  .table-responsive-cards thead { position: absolute; clip: rect(0 0 0 0); overflow: hidden; }
  .table-responsive-cards tr {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    margin-bottom: var(--spacing-sm);
    padding: var(--spacing-sm);
  }
  .table-responsive-cards td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--text-sm);
  }
  .table-responsive-cards td:last-child { border-bottom: none; }
  .table-responsive-cards td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-inline-end: var(--spacing-md);
    flex-shrink: 0;
  }
}

/* =========================
   27. ADMIN UTILITIES
   ========================= */

/* Spacing utilities */
.mb-md { margin-bottom: var(--spacing-md); }
.mb-xl { margin-bottom: var(--spacing-xl); }

/* Card descriptive text (muted paragraph inside a .card) */
.card-text {
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-md);
}

/* Card action button row (bottom of .card) */
.card-actions {
  margin-top: var(--spacing-md);
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  align-items: center;
}

/* Font weight utility */
.fw-medium { font-weight: 500; }

/* Inline form (table cell status selects) */
.form-inline { display: inline; }

/* Filter bar - flex container for admin table filters */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}

/* Filter label - compact label above filter controls */
.filter-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* Filter control - shared style for filter inputs and selects */
.filter-control {
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
}

/* Inline button group */
.btn-group-inline {
  display: flex;
  gap: 0.5rem;
}

/* Pagination nav wrapper */
.pagination-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.pagination-nav .btn { font-size: 0.85rem; }
.pagination-nav .page-indicator { font-size: 0.9rem; }

/* Results count line */
.results-count {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

/* Full-width button (login/form CTAs) */
.btn-full {
  width: 100%;
  justify-content: center;
}

/* Auth page logo */
.logo-sm { max-height: 60px; }

/* Text alignment utility */
.text-center { text-align: center; }

/* Margin top */
.mt-lg { margin-top: var(--spacing-lg); }

/* Margin bottom */
.mb-lg { margin-bottom: var(--spacing-lg); }

/* Font size utility */
.text-lg { font-size: var(--text-lg); }

/* Margin top utilities */
.mt-md { margin-top: var(--spacing-md); }
.mt-xl { margin-top: var(--spacing-xl); }
.mt-sm { margin-top: var(--spacing-sm); }

/* Line-height utility */
.lh-relaxed { line-height: 1.8; }

/* Success text color */
.text-success { color: var(--color-success); }

/* OTP / TOTP code input */
.input-otp { max-width: 200px; font-size: 1.3rem; text-align: center; letter-spacing: 0.2em; }

/* 2FA setup page layout */
.setup-container { max-width: 600px; }

/* Monospace code block (backup codes, secrets) */
.code-block {
  background: var(--color-bg-alt, #f5f5f5);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-family: monospace;
  word-break: break-all;
}
.code-block-lg { font-size: 1.1rem; line-height: 2; margin: 1rem 0; }

/* QR code container */
.qr-container { margin: 1.5rem 0; text-align: center; }

/* Inline link-style text (e.g. <summary> in <details>) */
.link-text { cursor: pointer; color: var(--color-primary); font-size: 0.9rem; }

/* Small muted footnote text inside a card or auth page */
.card-footnote { font-size: var(--text-sm); color: var(--color-text-muted); }

/* Auth hint text: centered muted description above a form input */
.auth-helper-text {
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-md);
}

/* Auth page bottom link (e.g. "Don't have an account?", "Return to login") */
.auth-footer-text {
  text-align: center;
  margin-top: var(--spacing-lg);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Forgot password link alignment */
.forgot-password-link {
  text-align: right;
  margin-top: 0.375rem;
  font-size: 0.8125rem;
}

/* Text color muted */
.text-muted { color: var(--color-text-muted); }

/* Narrow container modifier (500px max) */
.container-narrow { max-width: 500px; }

/* Margin-top reset */
.mt-0 { margin-top: 0; }

/* Uniform padding */
.p-md { padding: var(--spacing-md); }

/* Left padding */
.pl-lg { padding-left: var(--spacing-lg); }

/* Filter bar: search input max-width */
.filter-input { max-width: 300px; }

/* Filter bar: compact category select */
.filter-select-sm { max-width: 200px; margin-left: var(--spacing-sm); }

/* Prose block: centered with max-width, suitable for long-form text */
.max-w-prose {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}

/* Table cell utilities */
.cell-max-300 { max-width: 300px; }
.cell-nowrap { white-space: nowrap; }
.cell-min-200 { min-width: 200px; }

/* Compact form controls inside table cells */
.form-compact select { font-size: 0.85rem; padding: 0.25rem 0.4rem; }
.form-compact textarea { width: 100%; padding: 0.4rem; font-size: 0.9rem; }
.form-compact .btn { margin-top: 0.35rem; font-size: 0.85rem; }

/* Appointment slots grid */
.slots-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: var(--spacing-xl); align-items: start; }
.self-end { align-self: end; }
.btn-xs { padding: 0.25rem 0.5rem; font-size: 0.875rem; }

/* Order wizard — review summary */
.review-summary { margin: var(--spacing-md) 0; }
.review-row { display: flex; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border-color, #e5e7eb); }
.review-row:last-child { border-bottom: none; }
.review-row dt { font-weight: 600; min-width: 120px; }
.review-row dd { margin: 0; }
.order-submit-row { display: flex; gap: 0.75rem; margin-top: var(--spacing-md); }
.footer-detail { font-size: 0.85rem; }

/* =========================
   28. PRINT
   ========================= */
@media print {
  .site-header, .site-footer, .main-nav, .portal-nav, .btn, form button, .nav-toggle, .hero-shapes, .scroll-top, .wave-divider { display: none !important; }
  .main-content { padding: 0; min-height: auto; flex: none; animation: none; }
  body { background: #fff; display: block; }
  .card { box-shadow: none; border: 1px solid #ccc; }
  .hero { min-height: auto; padding: var(--spacing-xl) 0; }
}
