/* ============================================
   Bedside Physicians — Theme: Slate & Mint
   Drop-in replacement for styles.css.
   To use: rename this file to "styles.css".
   ============================================ */

:root {
  /* THEME: Slate & Mint — soft, editorial, refined */
  --navy-950: #0a1020;
  --navy-900: #1a2236;
  --navy-800: #283145;
  --navy-700: #3a4358;
  --navy-600: #4d566b;
  --navy-500: #6a7385;

  --teal-50:  #f0fdf9;
  --teal-100: #d5f7ec;
  --teal-200: #aff0db;
  --teal-300: #7ee5c3;
  --teal-400: #4dd3a7;
  --teal-500: #2bb88a;
  --teal-600: #1a9670;
  --teal-700: #15765c;
  --teal-800: #155e4b;
  --teal-900: #134d3f;

  --slate-50:  #fafaf9;
  --slate-100: #f4f4f2;
  --slate-200: #e7e7e3;
  --slate-300: #d1d1cc;
  --slate-400: #a3a39d;
  --slate-500: #71716c;
  --slate-600: #51514c;
  --slate-700: #3a3a36;
  --slate-800: #252523;
  --slate-900: #141413;

  --bg: #fafaf9;
  --bg-soft: #f4f4f2;
  --bg-tint: #f0fdf9;
  --ink: #1a2236;
  --ink-soft: #51514c;
  --line: #e7e7e3;

  /* Status */
  --success: #2bb88a;
  --warning: #d97706;
  --danger:  #dc2626;
  --info:    #475569;

  /* Typography */
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'Geist', 'Inter', system-ui, -apple-system, sans-serif;

  /* Shape & shadow */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(26,34,54,0.04);
  --shadow:    0 4px 12px rgba(26,34,54,0.06), 0 1px 3px rgba(26,34,54,0.03);
  --shadow-md: 0 10px 30px rgba(26,34,54,0.08), 0 2px 6px rgba(26,34,54,0.04);
  --shadow-lg: 0 24px 60px rgba(26,34,54,0.12), 0 4px 12px rgba(26,34,54,0.05);
  --shadow-glow: 0 0 0 4px rgba(125,229,195,0.25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-feature-settings: "ss01", "ss02", "cv11";
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
  line-height: 1.15;
}
h1 { font-size: clamp(2.25rem, 5vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.625rem); }
h4 { font-size: 1.125rem; font-weight: 600; }

p { margin: 0 0 1rem; color: var(--ink-soft); }
a { color: var(--teal-700); text-decoration: none; transition: color .15s; }
a:hover { color: var(--teal-700); }

/* Layout */
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 1.25rem; }
.container-sm { max-width: 880px; margin: 0 auto; padding: 0 1.25rem; }

/* ============================================
   GLOBAL ANNOUNCEMENT BANNER
   ============================================ */
.announce-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, var(--navy-900), var(--navy-700) 60%, var(--teal-700));
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.625rem 2.5rem 0.625rem 1.25rem;
  text-align: center;
  letter-spacing: 0.01em;
}
.announce-banner.is-hidden { display: none; }
.announce-banner .dot,
.announce-banner .msg { position: relative; z-index: 1; }
.announce-banner .msg { display: inline-block; will-change: transform; }
/* The message TEXT moves to catch the eye: it slides in from the right and
   sways, then settles. Only runs while the JS-applied .is-animating class is
   present (first ~5s of a visit); afterwards the text is centered and still. */
.announce-banner.is-animating .msg {
  animation: announceSlide 2.5s ease-in-out infinite;
}
@keyframes announceSlide {
  0%   { transform: translateX(60%); }
  25%  { transform: translateX(0); }
  50%  { transform: translateX(14%); }
  75%  { transform: translateX(-8%); }
  100% { transform: translateX(60%); }
}
.announce-banner .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal-300);
  margin-right: .5rem;
  vertical-align: middle;
}
/* The dot pulses only during the attention window, then holds steady. */
.announce-banner.is-animating .dot {
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.4); }
}
@media (prefers-reduced-motion: reduce) {
  .announce-banner.is-animating .msg { animation: none; transform: none; }
  .announce-banner.is-animating .dot { animation: none; }
}
.announce-banner .close-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.25rem 0.5rem;
}
.announce-banner .close-btn:hover { color: #fff; }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
}
.brand-inline { display: inline-flex; align-items: center; gap: 0.7rem; }
.brand-logo-img { height: 60px; width: auto; display: block; }
.brand-mark { display: block; flex: 0 0 auto; }
.brand-word {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--navy-900);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* ---- Logo pulse: traces itself for ~5s on first visit, then holds static ----
   The dash length (48) comfortably exceeds the path length so a single offset
   sweep draws the whole ECG line, looped a few times over the 5s window. */
.brand-pulse {
  stroke-dasharray: 48;
  stroke-dashoffset: 0;
}
.brand-pulse.is-animating {
  animation: brandPulseDraw 1.25s ease-in-out infinite;
}
.brand-pulse.is-static {
  stroke-dasharray: none;
  stroke-dashoffset: 0;
}
@keyframes brandPulseDraw {
  0%   { stroke-dashoffset: 48; }
  60%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .brand-pulse.is-animating { animation: none; stroke-dasharray: none; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: inline-block;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all .15s;
}
.nav-links a:hover { background: var(--slate-100); color: var(--ink); }
.nav-links a.active {
  background: var(--navy-900);
  color: #fff;
}

/* Dropdown menus */
.nav-has-drop { position: relative; }
/* On desktop the caret is a small inline indicator; hover reveals the dropdown. */
.nav-caret {
  font-size: 0.7em; margin-left: 0.15rem; opacity: 0.6;
  background: none; border: none; padding: 0 0.2rem; cursor: pointer;
  color: inherit; line-height: 1;
}
.nav-drop {
  position: absolute; top: 100%; left: 0; z-index: 60;
  min-width: 250px; margin: 0; padding: 0.4rem;
  list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(10,16,32,0.12);
  opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.nav-has-drop:hover > .nav-drop,
.nav-has-drop:focus-within > .nav-drop { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-drop li { margin: 0; }
.nav-drop a {
  display: block; padding: 0.55rem 0.7rem; border-radius: var(--radius-sm);
  font-size: 0.875rem; color: var(--ink-soft); white-space: nowrap;
}
.nav-drop a:hover { background: var(--teal-50); color: var(--teal-800); }

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  width: 40px; height: 40px;
  cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-toggle span {
  position: relative;
  width: 18px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  display: block;
}
.menu-toggle span::before,
.menu-toggle span::after {
  content: ''; position: absolute; left: 0;
  width: 18px; height: 2px; background: var(--ink); border-radius: 2px;
}
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }

/* ============================================================
   RESPONSIVE NAV SWITCH
   <=1024px: hide the desktop links, show the hamburger. The mobile
   menu is a separate #mobileDrawer component (see .mnav below), so
   none of the desktop .nav-* rules apply to it.
   ============================================================ */
@media (max-width: 1024px) {
  .navbar .nav-links { display: none; }
  .navbar .nav-cta .btn-ghost,
  .navbar .nav-cta .btn-accent,
  .navbar .nav-portal-link,
  .navbar .nav-account { display: none; }
  .menu-toggle { display: inline-flex; order: 99; margin-left: auto; }
  .navbar .nav-cta { margin-left: auto; }

  /* Keep the logo prominent on phones, but a touch smaller so it never crowds
     the hamburger. Still much larger than before. */
  .brand-logo-img { height: 50px; }
  .brand-mark { width: 44px; height: 44px; }
  .brand-word { font-size: 1.45rem; }

  /* Hamburger -> X animation */
  .menu-toggle span,
  .menu-toggle span::before,
  .menu-toggle span::after { transition: transform .25s ease, opacity .2s ease, top .25s ease; }
  .menu-toggle.is-active span { background: transparent; }
  .menu-toggle.is-active span::before { top: 0; transform: rotate(45deg); }
  .menu-toggle.is-active span::after  { top: 0; transform: rotate(-45deg); }
}

@media (min-width: 1025px) {
  .menu-toggle { display: none; }
  /* The mobile drawer never shows on desktop. */
  #mobileDrawer, #mobileScrim { display: none !important; }
}

/* ============================================================
   MOBILE DRAWER (.mnav) — document-root component.
   Own namespace; shares nothing with the desktop nav, so it can't
   inherit desktop dropdown positioning or be trapped by the navbar's
   stacking / containing-block context.
   ============================================================ */
.mnav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(86vw, 360px);
  height: 100%;
  background: #ffffff;                 /* solid: nothing shows through */
  box-shadow: -20px 0 60px rgba(10,16,32,0.22);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  z-index: 1100;                        /* above everything, incl. sticky navbar */
  overflow: hidden;                     /* header/footer fixed, body scrolls */
}
.mnav.is-open { transform: translateX(0); }

/* Scrim behind the drawer */
.mnav-scrim {
  position: fixed;
  inset: 0;
  background: rgba(10, 16, 32, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
  z-index: 1090;                        /* just below the drawer */
}
.mnav-scrim.is-open { opacity: 1; visibility: visible; }
body.mnav-lock { overflow: hidden; }

/* Header */
.mnav-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.mnav-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--navy-900);
  letter-spacing: -0.01em;
}
.mnav-close {
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--slate-50);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background .15s;
}
.mnav-close:hover { background: var(--slate-100); }

/* Scrollable body */
.mnav-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: #fff;
}
.mnav-list {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
}
.mnav-list > li { margin: 0; }

/* Plain top-level links (Home, Events, Blog) */
.mnav-link {
  display: block;
  padding: 0.95rem 1.15rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  transition: background .15s, color .15s;
}
.mnav-link:hover,
.mnav-link:focus { background: var(--slate-50); color: var(--navy-900); }
.mnav-link.is-active { color: var(--teal-700); font-weight: 700; }
.mnav-signout { color: var(--danger); }

/* Section accordion header (button, full width) */
.mnav-sectionbtn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.95rem 1.15rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  background: #fff;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background .15s;
}
.mnav-sectionbtn:hover { background: var(--slate-50); }
.mnav-chevron {
  font-size: 0.8rem;
  opacity: 0.55;
  transition: transform .25s ease;
  margin-left: 0.5rem;
}
.mnav-section.is-open > .mnav-sectionbtn { background: var(--slate-50); color: var(--teal-700); font-weight: 700; }
.mnav-section.is-open > .mnav-sectionbtn .mnav-chevron { transform: rotate(180deg); opacity: 1; }

/* Section sub-list: collapsed by default via max-height */
.mnav-sublist {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  background: var(--slate-50);
  transition: max-height .3s ease;
}
.mnav-section.is-open > .mnav-sublist { max-height: 70vh; }
.mnav-sublist > li { margin: 0; }
.mnav-sublink {
  display: block;
  padding: 0.75rem 1.15rem 0.75rem 1.6rem;
  font-size: 0.92rem;
  color: var(--slate-600);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.mnav-sublink:hover { background: var(--slate-100); color: var(--teal-800); }
.mnav-overview { color: var(--teal-700); font-weight: 600; border-bottom: 1px solid var(--slate-200); }

/* Divider before account items */
.mnav-divider {
  height: 1px;
  margin: 0.4rem 0;
  background: var(--line);
}

/* Footer CTAs pinned to the bottom */
.mnav-foot {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1rem 1.15rem 1.35rem;
  border-top: 1px solid var(--line);
  background: #fff;
}
.mnav-foot .btn { width: 100%; justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  .mnav, .mnav-scrim, .mnav-sublist, .mnav-chevron,
  .menu-toggle span, .menu-toggle span::before, .menu-toggle span::after { transition: none; }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .18s ease;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}
.btn-primary {
  background: var(--navy-900);
  color: #fff;
}
.btn-primary:hover { background: var(--navy-800); transform: translateY(-1px); box-shadow: var(--shadow-md); color: #fff; }

.btn-accent {
  background: var(--teal-700);
  color: #fff;
}
.btn-accent:hover { background: var(--teal-700); transform: translateY(-1px); box-shadow: var(--shadow-md); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--slate-50); border-color: var(--slate-300); }

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}
.btn-outline-light:hover { background: rgba(255,255,255,0.1); color: #fff; }

.btn-sm { padding: 0.5rem 0.875rem; font-size: 0.8rem; }
.btn-lg { padding: 0.95rem 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(20,184,166,0.18), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(11,31,58,0.04), transparent 60%),
    linear-gradient(180deg, #fff, var(--bg-soft));
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(3rem, 7vw, 5rem);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(11,31,58,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,31,58,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: var(--teal-50);
  color: var(--teal-700);
  border: 1px solid var(--teal-200);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.eyebrow .dot {
  width: 6px; height: 6px; background: var(--teal-500);
  border-radius: 50%;
}

/* ============================================
   SECTIONS
   ============================================ */
section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-tight { padding: clamp(2rem, 5vw, 3.5rem) 0; }

.section-header {
  max-width: 720px;
  margin: 0 auto 2.5rem;
  text-align: center;
}
.section-header.left { margin-left: 0; text-align: left; }
.section-header .eyebrow { margin-bottom: 1rem; }
.section-header p { color: var(--ink-soft); font-size: 1.05rem; }

/* ============================================
   CARDS
   ============================================ */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all .2s;
  box-shadow: var(--shadow-sm);
}
.card:hover { border-color: var(--slate-300); box-shadow: var(--shadow-md); }

/* Service card (compact, with expandable detail) */
.service-card {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: all .2s;
}
.service-card:hover { box-shadow: var(--shadow-md); border-color: var(--slate-300); }
.service-card .sc-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--teal-50);
  color: var(--teal-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.service-card .sc-icon svg { width: 22px; height: 22px; }
.service-card .sc-body { padding: 1.5rem; }
.service-card h3 { margin-bottom: 0.5rem; }
.service-card .sc-price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--navy-900);
  font-weight: 600;
  margin-top: 0.5rem;
}
.service-card .sc-price small {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--slate-500);
  font-weight: 500;
  display: block;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}
.service-card .sc-summary {
  color: var(--ink-soft);
  font-size: 0.925rem;
  margin: 0.75rem 0 1.25rem;
}
.service-card .sc-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.sc-readmore {
  background: transparent;
  border: none;
  color: var(--teal-700);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5rem 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.sc-readmore .chev { transition: transform .2s; display: inline-block; }
.sc-readmore.is-open .chev { transform: rotate(180deg); }

.sc-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
  border-top: 1px solid transparent;
  background: var(--slate-50);
}
.sc-detail.is-open {
  max-height: 1600px;
  border-top-color: var(--line);
}
.sc-detail-inner { padding: 1.25rem 1.5rem 1.5rem; font-size: 0.9rem; }
.sc-detail-inner h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-600);
  margin: 1rem 0 0.5rem;
}
.sc-detail-inner h4:first-child { margin-top: 0; }
.sc-detail-inner ul {
  margin: 0; padding-left: 1.1rem;
  color: var(--ink-soft);
}
.sc-detail-inner li { margin-bottom: 0.25rem; }

/* ============================================
   PHASES (timeline for service pages)
   ============================================ */
.phases {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .phases { grid-template-columns: 1fr 1fr; }
}
.phase-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
}
.phase-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal-500), var(--navy-700));
}
.phase-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--navy-900);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 1rem;
}
.phase-card h3 { margin-bottom: 0.75rem; font-size: 1.25rem; }
.phase-card ul { margin: 0; padding-left: 1.1rem; }
.phase-card li { color: var(--ink-soft); margin-bottom: 0.4rem; font-size: 0.925rem; }
.phase-card li strong { color: var(--ink); }

/* ============================================
   BLOG GRID
   ============================================ */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 720px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(3, 1fr); }
}
.blog-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all .2s;
  display: flex;
  flex-direction: column;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.blog-card .img {
  aspect-ratio: 16 / 10;
  background: var(--slate-100);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
.card-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; z-index: 0;
}
.blog-card .img > .tag { position: relative; z-index: 1; }
.article-reader .hero-img .card-photo { border-radius: inherit; }
.blog-card .body { padding: 1.25rem 1.25rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
.blog-card .tag {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--teal-700);
  margin-bottom: 0.5rem;
}
.blog-card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.blog-card p { font-size: 0.9rem; margin-bottom: 1rem; }
.blog-card .meta {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--slate-500);
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

/* ============================================
   EVENTS
   ============================================ */
.events-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .events-grid { grid-template-columns: repeat(2, 1fr); }
}
.event-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all .2s;
  display: flex; flex-direction: column;
}
.event-card:hover { box-shadow: var(--shadow-md); }
.event-flyer {
  aspect-ratio: 16/9;
  position: relative;
  background: linear-gradient(135deg, var(--navy-800), var(--teal-700));
  color: #fff;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  overflow: hidden;
}
.event-flyer::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.18), transparent 50%);
}
.event-flyer .flyer-content { position: relative; z-index: 1; }
.event-flyer .flyer-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; display: block;
}
.event-flyer .flyer-shade {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, rgba(11,31,58,0.12), rgba(11,31,58,0.55));
}
.event-flyer .event-date-badge { z-index: 2; }
.event-date-badge {
  position: absolute;
  top: 1rem; right: 1rem;
  background: rgba(255,255,255,0.95);
  color: var(--navy-900);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  text-align: center;
  min-width: 64px;
  z-index: 1;
}
.event-date-badge .day { display: block; font-size: 1.5rem; font-weight: 700; line-height: 1; font-family: var(--font-display); }
.event-date-badge .mon { display: block; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 0.15rem; color: var(--teal-700); font-weight: 700; }
.event-body { padding: 1.25rem 1.5rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
.event-body h3 { margin-bottom: 0.5rem; }
.event-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--slate-600);
  margin-bottom: 0.75rem;
}
.event-meta span { display: inline-flex; align-items: center; gap: 0.35rem; }
.event-price-tag {
  display: inline-block;
  background: var(--slate-100);
  color: var(--ink);
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.event-price-tag.paid { background: #fef3c7; color: #92400e; }
.event-price-tag.free { background: var(--teal-50); color: var(--teal-700); }
.event-actions { margin-top: auto; padding-top: 1rem; display: flex; gap: 0.5rem; }

/* ============================================
   FORMS
   ============================================ */
.form-group { margin-bottom: 1rem; }
.form-row { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .form-row.cols-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 600px) { .form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; } }

.label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}
.label .req { color: var(--danger); margin-left: 0.15rem; }

.input, .select, .textarea {
  width: 100%;
  padding: 0.7rem 0.875rem;
  background: #fff;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.925rem;
  color: var(--ink);
  transition: all .15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: var(--shadow-glow);
}
/* Shared invalid-field styling used by BP.validate across all forms. */
.input-invalid,
.input.input-invalid {
  border-color: var(--danger);
}
.input-invalid:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14);
}
.bp-field-hint {
  color: var(--danger);
  font-size: 0.8rem;
  line-height: 1.35;
  margin-top: 0.3rem;
}
/* Skeleton loading placeholders (BP.skeleton) */
.bp-skel {
  background: linear-gradient(90deg, var(--slate-100, #f1f5f9) 25%, var(--slate-200, #e2e8f0) 37%, var(--slate-100, #f1f5f9) 63%);
  background-size: 400% 100%;
  animation: bpShimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
  display: block;
}
@keyframes bpShimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.bp-skel-line { height: 0.85rem; margin: 0.5rem 0; }
.bp-skel-card { padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; margin-bottom: 1rem; }
@media (prefers-reduced-motion: reduce) { .bp-skel { animation: none; } }
/* Screen-reader-only utility (visually hidden, still announced) */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.textarea { min-height: 100px; resize: vertical; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2364748b'%3e%3cpath d='M4.5 6L8 9.5 11.5 6h-7z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  padding-right: 2.25rem;
}
.help { font-size: 0.78rem; color: var(--slate-500); margin-top: 0.35rem; }

.checkbox-row, .radio-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.5rem 0;
  font-size: 0.9rem;
}
.checkbox-row input, .radio-row input { margin-top: 0.2rem; accent-color: var(--teal-600); }

/* Insurance picker (highlighted) */
.insurance-block {
  background: linear-gradient(180deg, var(--teal-50), #fff);
  border: 1px solid var(--teal-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  position: relative;
}
.insurance-block::before {
  content: 'INSURANCE';
  position: absolute;
  top: -10px; left: 16px;
  background: var(--teal-600);
  color: #fff;
  padding: 0.2rem 0.55rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  border-radius: 4px;
}

/* ============================================
   SOCIAL LINKS (shared: footer, contact page)
   ============================================ */
.social-links { display: inline-flex; gap: 0.6rem; align-items: center; }
.social-links a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  color: #fff; background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18); transition: background .15s, transform .15s, color .15s;
}
.social-links a:hover { background: var(--teal-600); transform: translateY(-2px); color: #fff; }
.social-links.footer-social { margin-top: 1rem; }
/* On the contact card (light background) the icons use brand colors instead. */
.social-links.contact-social-row a {
  color: var(--teal-700); background: var(--teal-50); border-color: var(--teal-100);
}
.social-links.contact-social-row a:hover { background: var(--teal-600); color: #fff; }

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-layout {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 2rem; align-items: start;
}
@media (max-width: 860px) { .contact-layout { grid-template-columns: 1fr; } }
.contact-info { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-card { padding: 1.75rem; }
.contact-h { font-size: 1.4rem; margin-bottom: 1.25rem; }
.contact-line {
  display: flex; align-items: flex-start; gap: 0.85rem; padding: 0.6rem 0;
  color: var(--ink); text-decoration: none;
}
a.contact-line:hover .contact-value { color: var(--teal-700); text-decoration: underline; }
.contact-ico {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--teal-50); color: var(--teal-700);
}
.contact-label {
  display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--slate-400); margin-bottom: 0.1rem;
}
.contact-value { display: block; font-size: 0.95rem; font-weight: 500; color: var(--ink); }
.contact-social { margin-top: 1rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.contact-social .contact-label { margin-bottom: 0.6rem; }
.contact-map { height: 260px; overflow: hidden; padding: 0; }
.contact-form-wrap { padding: 2rem; }
.contact-form-wrap .req { color: var(--teal-700); }
.contact-privacy { font-size: 0.8rem; margin: 0.25rem 0 1.25rem; }
.form-success {
  display: none; margin-top: 1rem; padding: 0.85rem 1rem; border-radius: 10px;
  background: var(--teal-50); color: var(--teal-800); font-weight: 500; font-size: 0.9rem;
  border: 1px solid var(--teal-100);
}
.form-success.is-visible { display: block; }
.form-success.is-error { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--navy-950);
  color: #cbd5e1;
  padding: 3.5rem 0 1.5rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.3fr; }
}
.footer h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.875rem;
  font-weight: 700;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: 0.4rem; }
.footer a { color: #cbd5e1; font-size: 0.9rem; }
.footer a:hover { color: var(--teal-300); }
.footer .brand-block { font-size: 0.92rem; line-height: 1.7; }
.footer .brand-block img { height: 40px; background: #fff; padding: 4px 8px; border-radius: 6px; margin-bottom: 1rem; }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.8rem;
  color: var(--slate-400);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Newsletter */
.newsletter {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: #fff;
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 5vw, 3rem);
  position: relative;
  overflow: hidden;
}
.newsletter::before {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--teal-500), transparent 60%);
  opacity: 0.35;
  filter: blur(40px);
}
.newsletter-inner { position: relative; z-index: 1; max-width: 720px; }
.newsletter h2 { color: #fff; margin-bottom: 0.5rem; }
.newsletter p { color: rgba(255,255,255,0.78); }
.newsletter-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}
.newsletter-form input {
  flex: 1;
  min-width: 220px;
  padding: 0.85rem 1rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  color: #fff;
  font-size: 0.95rem;
  font-family: var(--font-body);
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.5); }
.newsletter-form input:focus {
  outline: none;
  border-color: var(--teal-400);
  background: rgba(255,255,255,0.15);
}
.newsletter-success {
  margin-top: 1rem;
  background: rgba(20,184,166,0.15);
  border: 1px solid var(--teal-400);
  color: var(--teal-100);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  display: none;
}
.newsletter-success.is-visible { display: block; }

/* ============================================
   STATS / FEATURES
   ============================================ */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
}
@media (min-width: 768px) {
  .stats-strip { grid-template-columns: repeat(4, 1fr); }
}
.stat {
  background: #fff;
  padding: 1.5rem;
  text-align: center;
}
.stat .num {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--navy-900);
  line-height: 1;
}
.stat .lbl {
  font-size: 0.8rem;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.5rem;
  font-weight: 600;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features-grid { grid-template-columns: repeat(4, 1fr); } }
.feature {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all .2s;
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--teal-300); }
.feature .ico {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.feature .ico svg { width: 22px; height: 22px; }
.feature h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.feature p { font-size: 0.9rem; margin: 0; }

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11,31,58,0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
  animation: fadeIn .15s ease;
}
.modal-overlay.is-open { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp .25s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
}
.modal-header h3 { margin: 0; font-size: 1.25rem; }
.modal-close {
  background: transparent; border: none;
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--slate-500);
}
.modal-close:hover { background: var(--slate-100); color: var(--ink); }
.modal-body { padding: 1.5rem; }
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--line);
  display: flex; gap: 0.5rem; justify-content: flex-end;
  background: var(--bg-soft);
  flex-wrap: wrap;
}

/* ============================================
   TOAST
   ============================================ */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 200;
  display: flex; flex-direction: column; gap: 0.5rem;
  max-width: 360px;
}
.toast {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal-500);
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  font-size: 0.9rem;
  animation: slideIn .25s ease;
}
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--info); }
.toast-action {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.toast-action-btn {
  flex-shrink: 0;
  background: var(--teal-700, #15765c); color: #fff; border: none;
  padding: 0.4rem 0.8rem; border-radius: var(--radius-sm); font-size: 0.82rem;
  font-weight: 600; cursor: pointer;
}
.toast-action-btn:hover { background: var(--teal-800, #155e4b); }

/* ============================================
   TABLES (admin/portal)
   ============================================ */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; }
/* Shared pagination footer (BP.paginate) */
.pager {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; padding: 0.75rem 0.25rem 0.25rem; font-size: 0.85rem; color: var(--slate-500);
}
.pager-controls { display: flex; align-items: center; gap: 0.6rem; }
.pager-page { font-variant-numeric: tabular-nums; }
.pager .btn-icon[disabled] { opacity: 0.45; cursor: not-allowed; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.table th, .table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.table th {
  background: var(--bg-soft);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-600);
  font-weight: 700;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--slate-50); }

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--slate-100);
  color: var(--slate-700);
}
.badge.success { background: #d1fae5; color: #065f46; }
.badge.warn { background: #fef3c7; color: #92400e; }
.badge.danger { background: #fee2e2; color: #991b1b; }
.badge.info { background: #dbeafe; color: #1e40af; }
.badge.teal { background: var(--teal-50); color: var(--teal-700); }

/* ============================================
   ADMIN LAYOUT
   ============================================ */
/* Full-bleed admin shell: the layout spans edge-to-edge (no .container gutter)
   so the dark rail runs the full height of the viewport like a real SaaS app. */
.admin-shell { padding: 0; }
.admin-shell > .container { max-width: none; padding: 0; }

.admin-layout {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
  position: relative;
}
@media (min-width: 1024px) {
  .admin-layout { grid-template-columns: 256px 1fr; }
}
.admin-sidebar {
  background: var(--navy-950);
  color: #cbd5e1;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
}
@media (min-width: 1024px) {
  /* Fixed, full-height rail from the very top (admin has no top navbar):
     stays put while the main column scrolls; nav scrolls internally on overflow. */
  .admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
  }
  .admin-sidebar .admin-nav {
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
  }
  .admin-sidebar .admin-nav::-webkit-scrollbar { width: 6px; }
  .admin-sidebar .admin-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 3px; }
}
.admin-sidebar h4 {
  color: rgba(255,255,255,0.5);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0.25rem 0 0.4rem;
  font-family: var(--font-body);
  font-weight: 700;
}
.admin-nav {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 0.15rem;
}
.admin-nav button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: #cbd5e1;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex; align-items: center; gap: 0.65rem;
  transition: all .15s;
}
.admin-nav button:hover { background: rgba(255,255,255,0.06); color: #fff; }
.admin-nav button.active { background: var(--teal-700); color: #fff; box-shadow: inset 3px 0 0 var(--teal-300); }
.admin-nav button svg { width: 16px; height: 16px; }

/* Sidebar footer: signed-in admin identity, pinned to the bottom of the rail. */
.admin-sidebar-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.admin-identity-row { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 0.75rem; }
.admin-identity-avatar {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--teal-700);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
}
.admin-identity-meta { display: flex; flex-direction: column; min-width: 0; }
.admin-identity-name { color: #fff; font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-identity-email { color: rgba(255,255,255,0.5); font-size: 0.76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-identity-signout {
  width: 100%;
  background: rgba(255,255,255,0.06);
  color: #fca5a5;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all .15s;
}
.admin-identity-signout:hover { background: rgba(248,113,113,0.14); border-color: rgba(248,113,113,0.3); color: #fca5a5; }

.admin-main { padding: 2rem 1.5rem; background: var(--bg-soft); }
.admin-section { display: none; }
.admin-section.is-active { display: block; }

/* Sidebar unread badge */
.admin-nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px;
  font-size: 0.72rem; font-weight: 700; border-radius: 999px;
  background: var(--teal-600); color: #fff; vertical-align: middle;
}

/* Contact inbox */
.inbox-toolbar { margin-bottom: 1rem; }
.inbox-filters { display: inline-flex; gap: 0.35rem; flex-wrap: wrap; }
.inbox-filter {
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  padding: 0.4rem 0.85rem; border-radius: 999px; cursor: pointer;
  font-family: var(--font-body); font-size: 0.82rem; font-weight: 600; transition: all .15s;
}
.inbox-filter:hover { border-color: var(--slate-300); }
.inbox-filter.is-active { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }

.inbox-layout { display: grid; grid-template-columns: 340px 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 900px) { .inbox-layout { grid-template-columns: 1fr; } }

.inbox-list { display: flex; flex-direction: column; gap: 0.5rem; max-height: 70vh; overflow-y: auto; }
.inbox-list-empty { color: var(--slate-500); padding: 2rem 1rem; text-align: center; }
.inbox-item {
  position: relative; text-align: left; width: 100%; cursor: pointer;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 0.85rem 0.95rem; font-family: var(--font-body); transition: border-color .15s, box-shadow .15s;
}
.inbox-item:hover { border-color: var(--slate-300); box-shadow: var(--shadow-sm); }
.inbox-item.is-active { border-color: var(--teal-500); box-shadow: 0 0 0 1px var(--teal-500); }
.inbox-item.is-unread { background: var(--teal-50); }
.inbox-item.is-unread .inbox-item-name::before {
  content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--teal-600); margin-right: 6px; vertical-align: middle;
}
.inbox-item-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.inbox-item-name { font-weight: 700; font-size: 0.9rem; color: var(--ink); }
.inbox-item-when { font-size: 0.72rem; color: var(--slate-400); flex-shrink: 0; }
.inbox-item-subject { font-size: 0.82rem; font-weight: 600; color: var(--slate-600); margin-top: 0.15rem; }
.inbox-item-preview { font-size: 0.8rem; color: var(--slate-500); margin-top: 0.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-item-status {
  display: inline-block; margin-top: 0.5rem; font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; padding: 0.1rem 0.45rem; border-radius: 5px;
}
.status-new { background: var(--teal-100); color: var(--teal-800); }
.status-read { background: var(--slate-100); color: var(--slate-600); }
.status-replied { background: #dcfce7; color: #166534; }

.inbox-detail {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.75rem; min-height: 300px;
}
.inbox-empty { color: var(--slate-500); text-align: center; padding: 3rem 1rem; }
.inbox-msg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.inbox-msg-name { font-size: 1.3rem; margin: 0; }
.inbox-msg-meta { font-size: 0.82rem; color: var(--slate-500); margin-top: 0.2rem; }
.inbox-status-pill {
  flex-shrink: 0; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 0.2rem 0.6rem; border-radius: 6px;
}
.inbox-msg-contacts { margin-top: 0.75rem; font-size: 0.9rem; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.inbox-msg-contacts a { color: var(--teal-700); text-decoration: none; }
.inbox-msg-contacts a:hover { text-decoration: underline; }
.inbox-dot { color: var(--slate-300); }
.inbox-msg-subject {
  margin-top: 1.1rem; font-weight: 700; font-size: 1rem; color: var(--ink);
  padding-bottom: 0.6rem; border-bottom: 1px solid var(--line);
}
.inbox-msg-body { margin-top: 1rem; font-size: 0.95rem; line-height: 1.6; color: var(--ink); white-space: pre-wrap; }
.inbox-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.inbox-actions .inbox-delete { margin-left: auto; color: #b91c1c; }
.inbox-actions .inbox-delete:hover { background: #fef2f2; }

/* Admin password-reset credential display */
.resetpw-cred {
  background: var(--teal-50); border: 1px solid var(--teal-100); border-radius: 12px;
  padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: 0.75rem;
}
.resetpw-cred-label {
  display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--slate-500); margin-bottom: 0.15rem;
}
.resetpw-cred-value { display: block; font-size: 1rem; color: var(--ink); font-weight: 500; }
.resetpw-pw {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.15rem;
  font-weight: 700; color: var(--teal-800); letter-spacing: 0.02em; user-select: all;
}

.admin-header {
  display: block;
  margin-bottom: 1.5rem;
}
.admin-header h2 { margin-bottom: 0.25rem; }
.admin-header p { margin: 0; color: var(--slate-500); font-size: 0.92rem; }

/* Greeting strip lives on the SAME line as the section title, not stacked above
   it. It's pinned to the top-right of the main column (absolute, so it takes no
   vertical space of its own); the section title sits at the top-left. This is
   what removes the dead band that appeared when the two were stacked. */
.admin-main { position: relative; }
.admin-topbar {
  position: absolute;
  top: 2rem;                /* aligns with .admin-main's top padding */
  right: 1.5rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.admin-greeting {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  text-align: right;
}
.admin-greeting-hi { font-size: 0.95rem; color: var(--ink); }
.admin-greeting-hi strong { font-weight: 600; }
.admin-greeting-date { font-size: 0.78rem; color: var(--slate-500); }
/* The mobile menu toggle only shows on small screens (desktop has the rail). */
.admin-topbar .admin-menu-toggle { display: none; }
@media (max-width: 1023px) {
  /* On mobile the rail is a drawer, so the toggle returns to normal flow at the
     top-left and the greeting strip goes back to a row. It's STICKY so the
     hamburger menu (and greeting) stay reachable while the admin scrolls —
     navigation is always one tap away. */
  .admin-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    /* Break out of .admin-main's side padding so the bar spans edge-to-edge. */
    margin: -1rem -0.85rem 1rem;
    padding: 0.6rem 0.85rem;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
    justify-content: space-between;
    gap: 0.75rem;
  }
  .admin-topbar .admin-menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
    font-size: 1.2rem; color: var(--ink); cursor: pointer; flex-shrink: 0;
    order: -1;
  }
  .admin-greeting { text-align: left; }
}
.admin-greeting-hi { font-size: 0.95rem; color: var(--ink); }
.admin-greeting-hi strong { font-weight: 600; }
.admin-greeting-date { font-size: 0.78rem; color: var(--slate-500); }

.kpi-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1.5rem;
}
@media (min-width: 768px) { .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.kpi .lbl { font-size: 0.72rem; color: var(--slate-500); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.kpi .num { font-family: var(--font-display); font-size: 1.875rem; font-weight: 600; color: var(--navy-900); margin-top: 0.25rem; line-height: 1; }
.kpi .delta { font-size: 0.78rem; color: var(--success); margin-top: 0.25rem; }
.kpi .delta.down { color: var(--danger); }

/* ============================================
   PATIENT PORTAL
   ============================================ */
.portal-login {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  background:
    radial-gradient(900px 500px at 20% 20%, rgba(20,184,166,0.12), transparent 60%),
    var(--bg-soft);
  padding: 2rem 1rem;
}
.portal-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 2.25rem;
}
.portal-card .lock-icon {
  width: 48px; height: 48px;
  background: var(--teal-50);
  color: var(--teal-700);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.portal-card h2 { margin-bottom: 0.25rem; }
.portal-card .sub { color: var(--slate-500); font-size: 0.9rem; margin-bottom: 1.5rem; }
.portal-card .security-note {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--slate-500);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.portal-dashboard {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 1024px) {
  .portal-dashboard { grid-template-columns: 280px 1fr; }
}
.portal-aside {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  height: fit-content;
}
.portal-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-800), var(--teal-600));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}
.portal-aside .pname { font-family: var(--font-display); font-size: 1.25rem; }
.portal-aside .pid { font-size: 0.8rem; color: var(--slate-500); }
.portal-aside ul { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.88rem; }
.portal-aside ul li {
  display: flex; justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
}
.portal-aside ul li:last-child { border-bottom: none; }
.portal-aside ul li span:last-child { color: var(--ink); font-weight: 600; }

.portal-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.25rem;
  overflow-x: auto;
}
.portal-tabs button {
  background: transparent;
  border: none;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--slate-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.portal-tabs button.active { color: var(--navy-900); border-bottom-color: var(--teal-500); }

.portal-panel { display: none; }
.portal-panel.is-active { display: block; }

/* ============================================
   CHECKOUT STEPPER
   ============================================ */
.stepper {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  position: relative;
}
.stepper::before {
  content: '';
  position: absolute;
  top: 16px; left: 5%; right: 5%;
  height: 2px;
  background: var(--line);
  z-index: 0;
}
.step {
  position: relative;
  z-index: 1;
  text-align: center;
  flex: 1;
}
.step-num {
  width: 32px; height: 32px;
  margin: 0 auto 0.4rem;
  background: #fff;
  border: 2px solid var(--line);
  color: var(--slate-500);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.step.active .step-num { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.step.done .step-num { background: var(--teal-500); color: #fff; border-color: var(--teal-500); }
.step .lbl { font-size: 0.75rem; color: var(--slate-500); font-weight: 600; }
.step.active .lbl { color: var(--navy-900); }

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 968px) { .checkout-grid { grid-template-columns: 1.4fr 1fr; } }
.summary-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 90px;
}
.summary-card h3 { font-size: 1.1rem; margin-bottom: 1rem; }
.summary-row { display: flex; justify-content: space-between; padding: 0.5rem 0; font-size: 0.9rem; color: var(--ink-soft); }
.summary-row.total {
  border-top: 1px solid var(--line);
  margin-top: 0.5rem; padding-top: 1rem;
  font-weight: 700; color: var(--ink); font-size: 1rem;
}

.step-section { display: none; }
.step-section.is-active { display: block; }

/* ============================================
   SUCCESS PAGE
   ============================================ */
.success-state {
  text-align: center;
  padding: 3rem 1rem;
}
.success-state .check {
  width: 80px; height: 80px;
  background: var(--teal-500);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 2.5rem;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.muted { color: var(--slate-500); }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
.flex { display: flex; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.grid { display: grid; }
.hidden { display: none; }

/* Two-column generic */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 880px) {
  .two-col { grid-template-columns: 1.05fr 1fr; gap: 3.5rem; }
}
.two-col.reverse > :first-child { order: 0; }
@media (min-width: 880px) {
  .two-col.reverse > :first-child { order: 1; }
}

.media-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--navy-800), var(--teal-700));
  box-shadow: var(--shadow-lg);
}
.media-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 30%, rgba(255,255,255,0.2), transparent 50%),
    repeating-linear-gradient(45deg, transparent 0, transparent 10px, rgba(255,255,255,0.04) 10px, rgba(255,255,255,0.04) 11px);
}
.media-frame .pulse-svg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 1;
}
.media-frame .media-frame-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; display: block;
}
.media-frame.has-photo::after {
  background: linear-gradient(180deg, rgba(11,31,58,0.10), rgba(11,31,58,0.60));
}
.media-frame.has-photo .pulse-svg { display: none; }

/* Section with dark bg */
.dark-section {
  background: var(--navy-950);
  color: #cbd5e1;
}
.dark-section h1, .dark-section h2, .dark-section h3 { color: #fff; }
.dark-section p { color: rgba(255,255,255,0.7); }

/* Page hero header (for inner pages) */
.page-hero {
  position: relative;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(126,229,195,0.18), transparent 55%),
    radial-gradient(ellipse at 0% 100%, rgba(77,211,167,0.12), transparent 55%),
    linear-gradient(135deg, var(--navy-950) 0%, var(--navy-800) 100%);
  color: #fff;
  padding: clamp(3rem, 6vw, 5rem) 0;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(135deg, transparent 40%, rgba(126,229,195,0.06) 50%, transparent 60%);
}
.page-hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; }
.page-hero p { color: rgba(255,255,255,0.85); max-width: 720px; }
.page-hero .eyebrow {
  background: rgba(255,255,255,0.1);
  color: var(--teal-200);
  border-color: rgba(20,184,166,0.3);
}

/* Cart summary on checkout */
.cart-line {
  display: flex; justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}
.cart-line:last-of-type { border-bottom: none; }
.cart-line .nm { font-weight: 600; font-size: 0.9rem; }
.cart-line .meta { font-size: 0.78rem; color: var(--slate-500); }

/* Article reader */
.article-reader {
  max-width: 720px;
  margin: 0 auto;
}
.article-reader .hero-img {
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}
.article-reader h1 { margin-bottom: 0.75rem; }
.article-reader .meta {
  font-size: 0.85rem;
  color: var(--slate-500);
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.article-reader p, .article-reader li { font-size: 1.05rem; line-height: 1.75; color: var(--ink-soft); }
.article-reader h2 { margin: 2rem 0 0.75rem; font-size: 1.6rem; }
.article-reader h3 { margin: 1.5rem 0 0.5rem; }

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--slate-500);
}
.empty-state svg { opacity: 0.5; margin-bottom: 1rem; }

/* Tooltip-like pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--slate-100);
  color: var(--slate-700);
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
}

/* Print-friendly */
@media print {
  .navbar, .footer, .announce-banner, .modal-overlay { display: none !important; }
}

/* ============================================
   PAGE-LEVEL EXTRAS (for pages built after design system)
   ============================================ */

/* Soft section variant */
.section-soft { background: var(--bg-soft); }

/* Service/lab/feature grids */
.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .service-grid { grid-template-columns: repeat(3, 1fr); } }

/* Light, numbered feature blocks for "How it works" rows */
.features-grid-light {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) { .features-grid-light { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features-grid-light { grid-template-columns: repeat(4, 1fr); } }
.feature-light {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all .2s;
}
.feature-light:hover { border-color: var(--teal-300); box-shadow: var(--shadow-sm); }
.feature-light .feat-num {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--teal-700);
  margin-bottom: 0.5rem;
}
.feature-light h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.feature-light p { font-size: 0.9rem; margin: 0; color: var(--ink-soft); }

/* Aliases used by some pages */
.section-head { max-width: 720px; margin: 0 auto 2.5rem; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.section-head .eyebrow { margin-bottom: 1rem; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }

.eyebrow-pill { /* same as .eyebrow */
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: var(--teal-50);
  color: var(--teal-700);
  border: 1px solid var(--teal-200);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-cta { margin-top: 2rem; display: flex; gap: 1rem; flex-wrap: wrap; }

/* Event grid alias */
.event-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) { .event-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .event-grid { grid-template-columns: repeat(3, 1fr); } }

/* Event card extras */
.flyer-emoji {
  font-size: 2.75rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.flyer-tag {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  color: #fff;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}
.event-foot {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Form field wrapper */
.form-field { margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.form-field label {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.form-field .hint { font-size: 0.78rem; color: var(--slate-500); margin-top: 0.2rem; }

/* Two-column form row */
.form-row.cols-2,
.form-row[class*="cols-"] { /* already handled above; placeholder */ }
.form-row { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 600px) {
  .form-row:not(.cols-1) { grid-template-columns: 1fr 1fr; }
  .form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr !important; }
  .form-row.cols-1 { grid-template-columns: 1fr; }
}

/* Article reader extras */
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--teal-700);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.article-back:hover { color: var(--navy-900); }

/* Lab result row */
.lab-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.lab-row:last-child { border-bottom: none; }
.lab-row .test { font-weight: 600; color: var(--ink); }
.lab-row .range { color: var(--slate-500); font-size: 0.82rem; }
.lab-row.head {
  background: var(--bg-soft);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--slate-600);
  font-weight: 700;
}
.lab-row.head .test { color: var(--slate-600); font-weight: 700; }

/* Action button (small ghost in tables) */
.btn-icon {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all .15s;
}
.btn-icon:hover { background: var(--slate-50); border-color: var(--slate-300); }
.btn-icon.danger { color: #991b1b; border-color: #fecaca; }
.btn-icon.danger:hover { background: #fef2f2; }

/* ============================================================
   Care Team — provider cards (top-tier SaaS refresh)
   ============================================================ */
.prov-roster-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.85rem; }
.prov-count { font-size: 0.82rem; color: var(--slate-500); font-weight: 600; letter-spacing: 0.01em; }

.prov-cards { display: flex; flex-direction: column; gap: 0.85rem; }

.prov-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.prov-card:hover { border-color: var(--slate-300); box-shadow: 0 1px 3px rgba(20,20,19,0.04); }
.prov-card.is-editing { border-color: var(--teal-300); box-shadow: 0 0 0 3px var(--teal-50); }

.prov-card-main { display: flex; align-items: center; gap: 0.85rem; padding: 0.85rem 1rem; }

.prov-avatar {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; letter-spacing: 0.02em;
}
.prov-idblock { flex: 1; min-width: 0; }
.prov-name-input {
  width: 100%; border: 1px solid transparent; background: transparent;
  font-family: var(--font-body); font-size: 1rem; font-weight: 600; color: var(--ink);
  padding: 0.2rem 0.4rem; margin: -0.2rem -0.4rem 0; border-radius: var(--radius-sm);
  transition: background .12s, border-color .12s;
}
.prov-name-input:hover { background: var(--slate-50); }
.prov-name-input:focus { background: #fff; border-color: var(--teal-300); outline: none; box-shadow: 0 0 0 3px var(--teal-50); }
.prov-meta { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.15rem; padding-left: 0.4rem; }
.prov-sched-hint { font-size: 0.8rem; color: var(--slate-500); }
.prov-cal-badge { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.75rem; color: var(--teal-700); font-weight: 600; }
.prov-cal-badge .dot, .prov-cal-provider .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal-500); display: inline-block; }

/* Active / Inactive switch pill */
.prov-status-pill {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 0.4rem;
  border: 1px solid var(--line); background: var(--slate-50); color: var(--slate-500);
  font-family: var(--font-body); font-size: 0.8rem; font-weight: 600;
  padding: 0.35rem 0.7rem; border-radius: 999px; cursor: pointer; transition: all .15s;
}
.prov-status-pill:hover { border-color: var(--slate-300); }
.prov-status-pill .prov-status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--slate-400); transition: background .15s; }
.prov-status-pill.is-active { background: var(--teal-50); color: var(--teal-700); border-color: var(--teal-200); }
.prov-status-pill.is-active .prov-status-dot { background: var(--teal-500); }

.prov-card-actions { display: flex; align-items: center; gap: 0.35rem; flex-shrink: 0; }
.prov-icon-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  border: 1px solid var(--line); background: #fff; color: var(--slate-600);
  font-family: var(--font-body); font-size: 0.82rem; font-weight: 500;
  padding: 0.4rem 0.7rem; border-radius: var(--radius-sm); cursor: pointer; transition: all .15s;
}
.prov-icon-btn:hover { background: var(--slate-50); border-color: var(--slate-300); color: var(--ink); }
.prov-icon-btn svg { width: 15px; height: 15px; }
.prov-icon-danger { color: #b91c1c; }
.prov-icon-danger:hover { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* Expanding schedule editor */
.prov-sched { border-top: 1px solid var(--line); padding: 1.1rem; background: var(--slate-50); border-radius: 0 0 14px 14px; }
.prov-dim { color: var(--slate-500); font-weight: 400; }
.prov-field { display: flex; flex-direction: column; gap: 0.35rem; }
.prov-field-full { margin-top: 0.9rem; }
.prov-field-label { font-size: 0.78rem; font-weight: 600; color: var(--slate-600); }

/* Mode selector: Clinic hours vs Custom hours */
.prov-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 1rem; }
.prov-mode-opt {
  display: flex; flex-direction: column; gap: 0.15rem; text-align: left;
  padding: 0.7rem 0.85rem; border: 1.5px solid var(--line); background: #fff;
  border-radius: 10px; cursor: pointer; transition: all .15s; font-family: var(--font-body);
}
.prov-mode-opt:hover { border-color: var(--slate-300); }
.prov-mode-opt.is-sel { border-color: var(--teal-600); background: var(--teal-50); }
.prov-mode-title { font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.prov-mode-opt.is-sel .prov-mode-title { color: var(--teal-800); }
.prov-mode-sub { font-size: 0.76rem; color: var(--slate-500); }

/* Weekly grid */
.prov-week { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0.4rem 0.9rem 0.9rem; }
.prov-week-hint { font-size: 0.8rem; color: var(--slate-500); margin: 0.6rem 0 0.4rem; }
.prov-day-row {
  display: grid; grid-template-columns: 108px 1fr; gap: 0.75rem; align-items: start;
  padding: 0.7rem 0; border-bottom: 1px solid var(--line);
}
.prov-day-row:last-child { border-bottom: none; }
@media (max-width: 520px) {
  .prov-day-row { grid-template-columns: 1fr; gap: 0.5rem; }
  .prov-mode { grid-template-columns: 1fr; }
  .prov-win-row .prov-time { width: calc(50% - 40px); min-width: 88px; }
}
.prov-day-toggle {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem;
  background: none; border: none; cursor: pointer; padding: 0.35rem 0.5rem; margin: -0.35rem -0.5rem;
  border-radius: var(--radius-sm); font-family: var(--font-body); transition: background .12s; text-align: left;
}
.prov-day-toggle:hover { background: var(--slate-50); }
.prov-day-name { font-size: 0.9rem; font-weight: 600; color: var(--slate-400); transition: color .15s; }
.prov-day-row.is-on .prov-day-name { color: var(--ink); }
.prov-day-state {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--slate-400); display: inline-flex; align-items: center; gap: 0.3rem;
}
.prov-day-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--slate-300); }
.prov-day-row.is-on .prov-day-state { color: var(--teal-700); }
.prov-day-row.is-on .prov-day-state::before { background: var(--teal-500); }

.prov-day-windows { display: flex; flex-direction: column; gap: 0.4rem; align-items: flex-start; }
.prov-win-row { display: flex; align-items: center; gap: 0.4rem; }
.prov-win-row .prov-time { width: 118px; }
.prov-win-dash { font-size: 0.82rem; color: var(--slate-500); }
.prov-win-del {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  border: 1px solid var(--line); background: #fff; border-radius: var(--radius-sm); color: var(--slate-500);
  cursor: pointer; transition: all .12s; flex-shrink: 0;
}
.prov-win-del:hover { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.prov-win-del svg { width: 14px; height: 14px; }
.prov-add-window {
  display: inline-flex; align-items: center; gap: 0.3rem; background: none; border: 1px dashed var(--slate-300);
  color: var(--teal-700); font-family: var(--font-body); font-size: 0.8rem; font-weight: 600;
  padding: 0.35rem 0.6rem; border-radius: var(--radius-sm); cursor: pointer; transition: all .12s;
}
.prov-add-window:hover { background: var(--teal-50); border-color: var(--teal-300); }
.prov-add-window svg { width: 14px; height: 14px; }

/* Buffer + PTO */
.prov-extra { margin-top: 1rem; }
.prov-buffer-wrap { display: flex; align-items: center; gap: 0.4rem; }
.prov-buffer-wrap .input { max-width: 90px; }
.prov-unit { font-size: 0.82rem; color: var(--slate-500); }

.prov-pto { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 0.75rem; }
.prov-pto-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.6rem; }
.prov-pto-empty { font-size: 0.82rem; color: var(--slate-400); }
.prov-pto-chip {
  display: inline-flex; align-items: center; gap: 0.35rem; background: var(--slate-100);
  border: 1px solid var(--line); border-radius: 999px; padding: 0.25rem 0.35rem 0.25rem 0.7rem;
  font-size: 0.8rem; font-weight: 600; color: var(--slate-700);
}
.prov-pto-del {
  display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px;
  border: none; background: var(--slate-200); border-radius: 50%; color: var(--slate-600); cursor: pointer; transition: all .12s;
}
.prov-pto-del:hover { background: #fecaca; color: #b91c1c; }
.prov-pto-del svg { width: 11px; height: 11px; }
.prov-pto-add { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.prov-pto-add .input { max-width: 180px; }

/* Calendar sync block */
.prov-cal-connect { padding: 0.9rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 0.9rem; }
.prov-cal-head { display: flex; flex-direction: column; gap: 0.15rem; margin-bottom: 0.75rem; }
.prov-cal-title { font-size: 0.85rem; font-weight: 700; color: var(--ink); }
.prov-cal-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.prov-cal-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-family: var(--font-body); font-size: 0.85rem; font-weight: 500;
  padding: 0.5rem 0.85rem; border-radius: var(--radius-sm); cursor: pointer; transition: all .15s;
}
.prov-cal-btn:hover { border-color: var(--slate-400); background: var(--slate-50); box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.prov-cal-ic {
  width: 20px; height: 20px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.78rem; background: var(--slate-100); color: var(--slate-700);
}
.prov-cal-connected { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; padding: 0.6rem 0.75rem; background: var(--teal-50); border: 1px solid var(--teal-200); border-radius: var(--radius-sm); }
.prov-cal-provider { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; font-weight: 600; color: var(--teal-800); }

.prov-sched-save { display: flex; justify-content: flex-end; align-items: center; gap: 0.75rem; margin-top: 1rem; }
.prov-save-hint { font-size: 0.82rem; font-weight: 600; color: var(--teal-700); opacity: 0; transition: opacity .2s; display: inline-flex; align-items: center; gap: 0.3rem; }
.prov-save-hint.is-shown { opacity: 1; }
.prov-save-hint::before { content: "✓"; }
.prov-cal-google { background: #fff; color: #4285f4; border: 1px solid var(--line); }
.prov-cal-ms { background: #fff; color: #0078d4; border: 1px solid var(--line); }

/* Empty state */
.prov-empty { text-align: center; padding: 2.5rem 1rem; color: var(--slate-500); }
.prov-empty-ic { display: inline-flex; opacity: 0.4; margin-bottom: 0.5rem; }
.prov-empty-ic svg { width: 32px; height: 32px; }

/* Add-provider bar */
.prov-add-bar { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }

/* Detail list */
.detail-list { display: grid; gap: 0.75rem; }
.detail-list .row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.detail-list .row:last-child { border-bottom: none; }
.detail-list .row .k { color: var(--slate-500); font-weight: 600; }
.detail-list .row .v { color: var(--ink); }

/* ============================================================
   PRODUCTIZED PACKAGES  (added — productize medicine)
   ============================================================ */
.pkg-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 640px) { .pkg-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .pkg-grid { grid-template-columns: repeat(3, 1fr); } }

.pkg-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow .2s, border-color .2s, transform .2s;
  box-shadow: var(--shadow-sm);
}
.pkg-card:hover { box-shadow: var(--shadow-md); border-color: var(--slate-300); transform: translateY(-2px); }
.pkg-card.is-featured {
  border-color: var(--teal-400);
  box-shadow: 0 0 0 1px var(--teal-400), var(--shadow-md);
}

.pkg-media {
  position: relative;
  aspect-ratio: 16 / 7;
  background-size: cover;
  background-position: center;
}
.pkg-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pkg-media-grad { aspect-ratio: 16 / 5; }
.pkg-badge {
  position: absolute;
  top: 0.85rem; left: 0.85rem;
  background: rgba(255,255,255,0.92);
  color: var(--navy-900);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.pkg-badge.teal { background: var(--teal-700); color: #fff; }
.pkg-badge.success { background: var(--success); color: #fff; }
.pkg-badge.warn { background: var(--warning); color: #fff; }
.pkg-badge.danger { background: var(--danger); color: #fff; }
.pkg-badge.info { background: var(--navy-800); color: #fff; }

.pkg-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.pkg-title { margin-bottom: 0.4rem; }
.pkg-desc { color: var(--ink-soft); font-size: 0.925rem; margin: 0 0 1rem; }

.pkg-price {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--navy-900);
  line-height: 1;
  margin-bottom: 1.1rem;
}
.pkg-price small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate-500);
  margin-bottom: 0.35rem;
}
.pkg-price-suffix { font-size: 0.95rem; font-weight: 500; color: var(--slate-500); font-family: var(--font-body); }

.pkg-includes { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.pkg-includes li {
  display: flex; align-items: flex-start; gap: 0.55rem;
  font-size: 0.9rem; color: var(--ink-soft);
  padding: 0.3rem 0;
}
.pkg-check {
  width: 18px; height: 18px; flex-shrink: 0; margin-top: 0.12rem;
  fill: none; stroke: var(--teal-600); stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round;
}

.pkg-how {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin-bottom: 1.25rem;
}
.pkg-how-label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--slate-500); margin-bottom: 0.3rem;
}
.pkg-how p { margin: 0; font-size: 0.875rem; color: var(--ink-soft); }

.pkg-cta { margin-top: auto; }
.pkg-secondary {
  display: block; text-align: center; margin-top: 0.6rem;
  font-size: 0.82rem; color: var(--slate-500);
}
.pkg-secondary:hover { color: var(--teal-700); }

/* Homepage offer cards (image-aware) */
.offers-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.offer-card { overflow: hidden; border-color: var(--slate-200); box-shadow: var(--shadow-sm); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
/* A slim navy→teal accent bar marks the four main offers so they're easy to spot. */
.offer-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--navy-800), var(--teal-500)); opacity: .9; z-index: 2; transition: height .22s ease, opacity .22s ease; }
.offer-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--teal-300); }
.offer-card:hover::before { height: 6px; opacity: 1; }
.offer-media { aspect-ratio: 16/9; background: var(--bg-soft); }
.offer-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.offer-card:hover .offer-media img { transform: scale(1.04); }
.offer-media.no-img { display: none; }
.offer-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 0.5rem; }
.offer-from { font-weight: 600; color: var(--teal-700); font-size: 0.9rem; background: var(--teal-50); padding: .25rem .6rem; border-radius: 999px; }
.offer-card .btn-ghost { transition: background .2s ease, color .2s ease; }
.offer-card:hover .btn-ghost { background: var(--navy-800); color: #fff; }

/* ============================================================
   ADMIN — Offers / Packages / Blog editors  (added)
   ============================================================ */
/* Offers & Packages — grouped master-detail layout */
.offers-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 900px) { .offers-layout { grid-template-columns: 1fr; } }

/* Left navigator */
.offers-nav {
  position: sticky; top: 1rem;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 0.5rem; max-height: calc(100vh - 2rem); overflow-y: auto;
}
@media (max-width: 900px) { .offers-nav { position: static; max-height: none; } }
.offers-nav-group { margin-bottom: 0.4rem; }
.offers-nav-group:last-child { margin-bottom: 0; }
.offers-nav-grouphead {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--slate-400); padding: 0.7rem 0.7rem 0.35rem;
}
.offers-nav-children { display: flex; flex-direction: column; }
.offers-nav-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; width: 100%;
  text-align: left; background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 0.86rem; color: var(--ink);
  padding: 0.5rem 0.7rem; border-radius: 9px; transition: background .12s, color .12s;
}
.offers-nav-children .offers-nav-row { padding-left: 1.3rem; font-size: 0.83rem; color: var(--ink-soft); }
.offers-nav-row:hover { background: var(--slate-50); }
.offers-nav-row.is-active { background: var(--teal-50); color: var(--teal-800); font-weight: 600; }
.offers-nav-row.is-active .offers-nav-count { background: var(--teal-600); color: #fff; }
.offers-nav-row.is-info { cursor: default; color: var(--slate-400); }
.offers-nav-row.is-info:hover { background: none; }
.offers-nav-label { display: inline-flex; align-items: center; gap: 0.4rem; min-width: 0; }
.offers-nav-tag {
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--teal-700); background: var(--teal-50); padding: 0.1rem 0.35rem; border-radius: 4px;
}
.offers-nav-tag.muted { color: var(--slate-500); background: var(--slate-100); }
.offers-nav-count {
  flex-shrink: 0; min-width: 20px; text-align: center; font-size: 0.72rem; font-weight: 700;
  color: var(--slate-600); background: var(--slate-100); padding: 0.1rem 0.4rem; border-radius: 999px;
}
.offers-nav-count.zero { color: var(--slate-400); }
.offers-nav-badge.info {
  flex-shrink: 0; font-size: 0.63rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--slate-400); background: var(--slate-50); border: 1px solid var(--line);
  padding: 0.1rem 0.4rem; border-radius: 5px;
}
.offers-nav-row.is-hidden-offer .offers-nav-label { opacity: 0.6; }
.offers-nav-loading { padding: 1.5rem 1rem; color: var(--slate-400); font-size: 0.85rem; text-align: center; }

/* Right detail header */
.offers-detail-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1rem;
}
.offers-detail-crumb {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--teal-700);
}
.offers-detail-title { font-size: 1.35rem; margin: 0.15rem 0 0; }

.admin-pkg-row {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 1rem; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.85rem 1rem; margin-bottom: 0.75rem;
}
.admin-pkg-thumb {
  width: 64px; height: 48px; border-radius: 8px; background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.1rem;
}
.admin-pkg-meta h4 { margin: 0 0 0.15rem; font-family: var(--font-body); font-size: 0.98rem; font-weight: 600; }
.admin-pkg-meta .sub { font-size: 0.8rem; color: var(--slate-500); }
.admin-pkg-actions { display: flex; gap: 0.35rem; align-items: center; }
.admin-pkg-actions .ord { display: flex; flex-direction: column; }
.admin-pkg-actions .ord button { line-height: 0.8; padding: 0.1rem 0.4rem; }

.includes-editor { display: flex; flex-direction: column; gap: 0.4rem; }
.includes-editor .inc-row { display: flex; gap: 0.4rem; }
.includes-editor .inc-row input { flex: 1; }

.img-drop {
  border: 1.5px dashed var(--slate-300); border-radius: var(--radius);
  padding: 1rem; text-align: center; cursor: pointer; transition: all .15s;
  background: var(--bg-soft); font-size: 0.85rem; color: var(--slate-500);
}
.img-drop:hover { border-color: var(--teal-400); color: var(--teal-700); }
.img-drop.is-drag { border-color: var(--teal-500); background: var(--teal-50, #ecfdf8); color: var(--teal-700); }
.img-drop.is-busy { border-color: var(--teal-500); color: var(--teal-700); opacity: 0.85; cursor: progress; }
.img-preview { width: 100%; max-height: 160px; object-fit: cover; border-radius: var(--radius); margin-top: 0.6rem; display: none; }
.img-preview.show { display: block; }

.gradient-row { display: flex; gap: 0.75rem; align-items: center; }
.gradient-row input[type=color] { width: 44px; height: 38px; border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer; padding: 2px; }

.modal.modal-lg { max-width: 720px; }
.field-help { font-size: 0.78rem; color: var(--slate-500); margin-top: 0.2rem; }

.blog-admin-card {
  display: grid; grid-template-columns: 80px 1fr auto; gap: 1rem; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.85rem 1rem; margin-bottom: 0.75rem;
}
.blog-admin-thumb { width: 80px; height: 56px; border-radius: 8px; background-size: cover; background-position: center; }

/* ---------- Admin auth gate ---------- */
.auth-gate {
  position: fixed; inset: 0; z-index: 1000;
  background: linear-gradient(135deg, var(--navy-900, #0B1F3A), var(--teal-800, #0F766E));
  display: flex; align-items: center; justify-content: center; padding: 1.5rem;
}
.auth-card {
  width: 100%; max-width: 420px; background: #fff;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 2rem;
}
.auth-card .auth-brand {
  font-family: var(--font-display); font-weight: 600; color: var(--teal-700);
  letter-spacing: .02em; margin-bottom: .75rem;
}
.auth-card h1 { font-size: 1.5rem; margin-bottom: .25rem; }
.auth-card .form-field { margin-top: 1rem; }
.auth-error {
  margin-top: 1rem; padding: .7rem .9rem; border-radius: var(--radius-sm);
  background: #fee2e2; color: #991b1b; font-size: .9rem; border: 1px solid #fecaca;
}
.admin-user-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem 1rem; border: 1px solid var(--slate-200); border-radius: var(--radius-md);
  margin-bottom: .6rem;
}
.admin-user-row .badge { white-space: nowrap; }

/* ===================== Booking / checkout flow ===================== */
.step.complete .step-num { background: var(--teal-600, #0D9488); color: #fff; border-color: var(--teal-600, #0D9488); }
.step-actions { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 0.5rem; }

.selection-banner { margin-bottom: 1.5rem; background: linear-gradient(135deg, var(--navy-800, #0F2847), var(--teal-700, #0F766E)); color: #fff; }
.selection-banner .sel-eyebrow { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.85; font-weight: 700; }
.selection-banner .sel-title { font-family: var(--font-display); font-size: 1.5rem; margin: 0.3rem 0; }
.selection-banner .sel-desc { font-size: 0.92rem; color: rgba(255,255,255,0.92); margin: 0.3rem 0 0; }
.selection-banner .sel-price { margin-top: 0.75rem; font-size: 1.15rem; font-weight: 600; }

.sched-label { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.6rem; }
.date-strip { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.4rem; }
.date-pill { flex: 0 0 auto; width: 72px; padding: 0.6rem 0; border: 1px solid var(--line, #e2e8f0); border-radius: var(--radius-md, 12px); background: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 0.15rem; transition: all 0.15s; }
.date-pill:hover { border-color: var(--teal-500, #14b8a6); }
.date-pill.selected { background: var(--teal-700, #0F766E); border-color: var(--teal-700, #0F766E); color: #fff; }
.date-pill .dp-dow { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.8; }
.date-pill .dp-day { font-size: 1.35rem; font-weight: 700; font-family: var(--font-display); line-height: 1; }
.date-pill .dp-mon { font-size: 0.7rem; text-transform: uppercase; opacity: 0.8; }

.time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 0.5rem; }
.time-slot { padding: 0.6rem 0.4rem; border: 1px solid var(--line, #e2e8f0); border-radius: var(--radius-sm, 8px); background: #fff; cursor: pointer; font-size: 0.9rem; font-weight: 500; transition: all 0.15s; }
.time-slot:hover:not(:disabled) { border-color: var(--teal-500, #14b8a6); }
.time-slot.selected { background: var(--teal-700, #0F766E); border-color: var(--teal-700, #0F766E); color: #fff; }
.time-slot.is-taken, .time-slot:disabled { opacity: 0.4; text-decoration: line-through; cursor: not-allowed; }

.sched-summary { margin-top: 1.25rem; padding: 0.85rem 1rem; background: var(--teal-50, #f0fdfa); border: 1px solid var(--teal-200, #99f6e4); border-radius: var(--radius-md, 12px); color: var(--teal-800, #115e59); font-size: 0.92rem; }
.summary-sched { margin-top: 0.85rem; padding-top: 0.85rem; border-top: 1px solid var(--line, #e2e8f0); font-size: 0.9rem; }
.summary-sched .ss-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--slate-500, #64748b); font-weight: 700; margin-bottom: 0.2rem; }

.review-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line, #e2e8f0); }
.review-row:last-child { border-bottom: none; }
.review-row .rk { color: var(--slate-500, #64748b); font-size: 0.9rem; }
.review-row .rv { font-weight: 600; text-align: right; }
.pay-stripe-note { padding: 0.85rem 1rem; background: var(--bg-soft, #f8fafc); border: 1px solid var(--line, #e2e8f0); border-radius: var(--radius-md, 12px); font-size: 0.9rem; color: var(--ink-soft, #475569); }

.confirm-box { background: var(--bg-soft, #f8fafc); padding: 1.25rem; border-radius: var(--radius-lg, 16px); border: 1px solid var(--line, #e2e8f0); max-width: 440px; margin: 0 auto; text-align: left; }
.confirm-line { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; }
.confirm-line span { color: var(--slate-500, #64748b); }
.pay-next-note { margin-top: 1rem; padding: 0.75rem 1rem; background: var(--teal-50, #f0fdfa); border: 1px dashed var(--teal-200, #99f6e4); border-radius: var(--radius-md, 12px); font-size: 0.85rem; color: var(--teal-800, #115e59); }

/* Admin — insurance providers list */
.ins-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.65rem 0.85rem; border: 1px solid var(--line, #e2e8f0); border-radius: var(--radius-sm, 8px); margin-bottom: 0.5rem; background: #fff; }
.ins-row .ins-name { font-weight: 500; }
.ins-row .ins-actions { display: flex; gap: 0.35rem; }

/* Admin — scheduling days */
.sch-days { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.sch-day { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.4rem 0.7rem; border: 1px solid var(--line, #e2e8f0); border-radius: var(--radius-sm, 8px); cursor: pointer; user-select: none; font-size: 0.9rem; }
.sch-day input { margin: 0; }

/* Portal — auth tabs + notes */
.portal-auth-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }
.portal-auth-tab { flex: 1; padding: 0.5rem; border: 1px solid var(--line, #e2e8f0); background: #fff; border-radius: var(--radius-sm, 8px); cursor: pointer; font-weight: 500; font-size: 0.9rem; }
.portal-auth-tab.is-active { background: var(--navy-800, #0F2847); color: #fff; border-color: var(--navy-800, #0F2847); }
.auth-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; padding: 0.6rem 0.8rem; border-radius: var(--radius-sm, 8px); font-size: 0.85rem; margin-bottom: 0.75rem; }
.auth-note { background: var(--teal-50, #f0fdfa); border: 1px solid var(--teal-200, #99f6e4); color: var(--teal-800, #115e59); padding: 0.6rem 0.8rem; border-radius: var(--radius-sm, 8px); font-size: 0.82rem; margin-bottom: 0.75rem; }

/* ============================================================
   PORTAL & ADMIN REFRESH  — elevated dashboard surfaces
   Builds on the existing Slate & Mint tokens. No new palette;
   this adds hierarchy, depth, and polish to the app surfaces.
   ============================================================ */

/* --- Portal greeting header --- */
.portal-greeting {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem;
}
.portal-greeting .hello {
  font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--navy-900); line-height: 1.1; margin: 0;
}
.portal-greeting .sub { color: var(--slate-500); font-size: 0.92rem; margin-top: 0.25rem; }

/* --- Stat cards (richer than the flat .kpi) --- */
.pstat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.9rem; margin-bottom: 1.75rem; }
@media (min-width: 720px) { .pstat-grid { grid-template-columns: repeat(4, 1fr); } }
.pstat {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.1rem 1.2rem; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.pstat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.pstat::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--teal-400), var(--teal-600));
}
.pstat .pstat-ic {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--teal-50); color: var(--teal-700); font-size: 1rem; margin-bottom: 0.6rem;
}
.pstat .pstat-num { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: var(--navy-900); line-height: 1; }
.pstat .pstat-lbl { font-size: 0.76rem; color: var(--slate-500); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; margin-top: 0.3rem; }

/* --- Next-visit hero --- */
.next-visit {
  position: relative; border-radius: var(--radius-xl); overflow: hidden;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-800) 55%, var(--teal-800));
  color: #fff; padding: 1.6rem 1.75rem; margin-bottom: 1.5rem;
}
.next-visit::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(125,229,195,0.25), transparent 70%); pointer-events: none;
}
.next-visit .eyebrow {
  color: var(--teal-300);
  background: rgba(125,229,195,0.12);
  border-color: rgba(125,229,195,0.3);
  margin-bottom: 0.25rem;
}
.next-visit .eyebrow .dot { background: var(--teal-300); }
.next-visit h3 { font-family: var(--font-display); font-size: 1.5rem; margin: 0.5rem 0 0.35rem; color: #fff; }
.next-visit .nv-meta { color: rgba(255,255,255,0.82); font-size: 0.95rem; line-height: 1.5; }
.next-visit .nv-actions { margin-top: 1.1rem; display: flex; gap: 0.6rem; flex-wrap: wrap; }
.next-visit .btn-ghost { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.25); color: #fff; }
.next-visit .btn-ghost:hover { background: rgba(255,255,255,0.2); }

/* --- Quick actions --- */
.quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-bottom: 1.5rem; }
@media (min-width: 720px) { .quick-actions { grid-template-columns: repeat(3, 1fr); } }
.qa {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.9rem 1rem; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-lg); cursor: pointer;
  font-weight: 600; color: var(--navy-900); font-size: 0.92rem; text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.qa:hover { border-color: var(--teal-300); box-shadow: var(--shadow); transform: translateY(-1px); }
.qa .qa-ic { width: 32px; height: 32px; border-radius: 8px; background: var(--teal-50); color: var(--teal-700); display: grid; place-items: center; flex: none; }

/* --- Richer appointment / record cards --- */
.rec-card {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem; margin-bottom: 0.85rem;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.rec-card:hover { border-color: var(--slate-300); box-shadow: var(--shadow-sm); }
.rec-card .rec-title { font-weight: 600; color: var(--navy-900); }
.rec-card .rec-meta { color: var(--ink-soft); font-size: 0.88rem; margin-top: 0.2rem; }
.rec-card .rec-badges { margin-top: 0.45rem; display: flex; gap: 0.35rem; align-items: center; flex-wrap: wrap; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 1rem; }
.section-head h3 { margin: 0; font-family: var(--font-display); font-size: 1.25rem; color: var(--navy-900); }
.section-head .count-chip { font-size: 0.78rem; color: var(--slate-500); background: var(--bg-soft); border: 1px solid var(--line); padding: 0.15rem 0.6rem; border-radius: 999px; }

/* --- Empty states --- */
.empty-state { text-align: center; padding: 2.5rem 1.5rem; color: var(--slate-500); }
.empty-state .es-ic { font-size: 2rem; opacity: 0.5; margin-bottom: 0.5rem; }
.empty-state a { color: var(--teal-700); font-weight: 600; }

/* --- Admin dashboard elevation --- */
.admin-kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 2rem; }
@media (min-width: 900px) { .admin-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.admin-kpi {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.25rem 1.35rem; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.admin-kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.admin-kpi .ak-ic {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  font-size: 1.1rem; margin-bottom: 0.7rem;
}
.admin-kpi .ak-num { font-family: var(--font-display); font-size: 2rem; font-weight: 600; color: var(--navy-900); line-height: 1; }
.admin-kpi .ak-lbl { font-size: 0.76rem; color: var(--slate-500); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; margin-top: 0.35rem; }
.admin-kpi .ak-sub { font-size: 0.8rem; color: var(--slate-400); margin-top: 0.15rem; }
.ak-teal .ak-ic { background: var(--teal-50); color: var(--teal-700); }
.ak-navy .ak-ic { background: #eef1f6; color: var(--navy-800); }
.ak-amber .ak-ic { background: #fef3e2; color: #b45309; }
.ak-green .ak-ic { background: #ecfdf5; color: #059669; }

/* Prefers-reduced-motion: disable lifts/transitions */
@media (prefers-reduced-motion: reduce) {
  .pstat, .qa, .rec-card, .admin-kpi { transition: none; }
  .pstat:hover, .qa:hover, .rec-card:hover, .admin-kpi:hover { transform: none; }
}

/* ============================================================
   MOBILE RESPONSIVENESS  — admin off-canvas nav, tables,
   portal tabs, modals. Desktop layout is unchanged.
   ============================================================ */

/* Admin menu toggle now lives inside the admin navbar (same line as logo+badge).
   Hidden on desktop where the sidebar is always visible. */
.admin-menu-toggle--nav { display: none; }
.admin-sidebar-backdrop { display: none; }

@media (max-width: 1023px) {
  .admin-menu-toggle--nav {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; flex: none;
    background: var(--navy-900); color: #fff; border: none;
    border-radius: var(--radius); font-size: 1.1rem; line-height: 1;
    cursor: pointer; font-family: var(--font-body); margin-right: 0.15rem;
    order: -1;  /* sit at the far left of the nav row, before the brand */
  }
  /* Give the admin nav row room and keep items on one line */
  .navbar--admin .nav-inner { gap: 0.6rem; flex-wrap: nowrap; }
  .navbar--admin .brand { min-width: 0; }
  .navbar--admin .brand .brand-fallback { font-size: 1.05rem; }
  .navbar--admin .nav-cta { margin-left: auto; flex: none; }

  /* Sidebar becomes an off-canvas drawer */
  .admin-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 82%; max-width: 300px;
    z-index: 60; overflow-y: auto;
    transform: translateX(-100%); transition: transform .25s ease;
  }
  .admin-sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .admin-sidebar-backdrop {
    display: block; position: fixed; inset: 0; background: rgba(10,16,32,0.5);
    z-index: 55; opacity: 0; pointer-events: none; transition: opacity .25s ease;
  }
  .admin-sidebar-backdrop.open { opacity: 1; pointer-events: auto; }
  .admin-main { padding: 1rem 0.85rem 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .admin-sidebar, .admin-sidebar-backdrop { transition: none; }
}
@media (max-width: 560px) {
  .navbar--admin .nav-cta { display: none; }  /* "View live site" is in the sidebar too */
}

/* Tables scroll horizontally instead of overflowing the viewport */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 640px) {
  .table-wrap table { min-width: 560px; }  /* keep columns legible; wrapper scrolls */
  .table th, .table td { white-space: nowrap; }
}

/* Portal: tabs scroll horizontally on narrow screens */
@media (max-width: 720px) {
  .portal-tabs {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap; white-space: nowrap;
    scrollbar-width: none;
  }
  .portal-tabs::-webkit-scrollbar { display: none; }
  .portal-tabs button { flex: 0 0 auto; }
  .portal-dashboard { grid-template-columns: 1fr; }
  .portal-aside { margin-bottom: 1.25rem; }
}

/* Portal + admin: stacked form rows on mobile */
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr !important; }
  .next-visit { padding: 1.25rem 1.25rem; }
  .next-visit h3 { font-size: 1.3rem; }
  .portal-greeting .hello { font-size: 1.4rem; }
}

/* Modals: fit small screens, allow internal scroll */
@media (max-width: 640px) {
  .modal, .portal-card { max-width: 100% !important; width: 100% !important; }
  .modal { max-height: 92vh; overflow-y: auto; border-radius: var(--radius-lg); }
  .modal-overlay { padding: 0.5rem; align-items: flex-start; }
}

/* Header nav: keep the top bar usable on small screens */
@media (max-width: 860px) {
  .admin-kpi .ak-num { font-size: 1.6rem; }
  .pstat .pstat-num { font-size: 1.4rem; }
}

/* ============================================================
   OVERFLOW CONTAINMENT  — the real mobile fix.
   ------------------------------------------------------------
   Root cause of horizontal overflow on mobile: grid/flex items
   default to min-width:auto, so an item containing wide content
   (tables, tab rows) refuses to shrink below that content's
   intrinsic width and pushes the whole page wider than the
   viewport. The fix is min-width:0 on those items so they can
   shrink and let their inner scroll containers handle overflow,
   plus a global guard so nothing can ever cause a sideways scroll.
   ============================================================ */

/* Global guard: never allow the page itself to scroll sideways.
   Applied to body only (NOT html) so the sticky navbar keeps working —
   overflow-x on the html/scroll-root would disable position:sticky. */
body { max-width: 100%; overflow-x: hidden; }

/* Media never exceeds its container. Tables are exempted when they live inside
   a .table-wrap, which scrolls them horizontally instead of clamping/clipping. */
img, svg, video, canvas { max-width: 100%; }
table { max-width: 100%; }
.table-wrap > table { max-width: none; }

/* Grid/flex children must be allowed to shrink below content width. */
.portal-dashboard > *,
.admin-layout > .admin-main,
.checkout-grid > *,
main { min-width: 0; }

/* The dashboard main column and its panels can shrink; inner
   wrappers (tables, tab strips) do the horizontal scrolling. */
.portal-panel { min-width: 0; }
.portal-panel table { width: 100%; }

/* Admin main content area: allow shrink, contain its own horizontal overflow.
   Uses `clip` (not `hidden`) so it does NOT become a scroll container — that
   lets the mobile sticky topbar stick to the viewport instead of being trapped
   inside .admin-main. Falls back to hidden where clip is unsupported. */
.admin-main { min-width: 0; overflow-x: hidden; overflow-x: clip; }
.admin-section { min-width: 0; }
/* Cards (and any grid/flex children in admin) must be allowed to shrink below
   their content width so wide tables scroll INSIDE their .table-wrap instead of
   pushing the card past the viewport edge (which admin-main would then clip). */
.admin-main .card { min-width: 0; max-width: 100%; }
.admin-main .card > .table-wrap { max-width: 100%; }

/* Any flex row that might hold wide children shouldn't force width. */
.rec-card, .next-visit, .pstat, .admin-kpi, .qa { max-width: 100%; }

/* Wide inline style blocks (summary headers etc.) wrap instead of pushing. */
.section-head { flex-wrap: wrap; gap: 0.5rem; }

/* ============================================================
   UNIFIED ACCOUNT NAV  — one navigation system across the site,
   portal, and admin. The account menu lives in the shared navbar.
   ============================================================ */
.nav-account { position: relative; }
.nav-account-btn {
  display: inline-flex; align-items: center; gap: 0.2rem;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 0.25rem 0.4rem 0.25rem 0.3rem; cursor: pointer;
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 600; color: var(--navy-900);
  transition: border-color .15s, box-shadow .15s;
}
.nav-account-btn:hover { border-color: var(--teal-300); box-shadow: var(--shadow-sm); }
.nav-account-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--navy-800), var(--teal-600)); color: #fff;
  display: grid; place-items: center; font-family: var(--font-display); font-size: 0.85rem;
}
.nav-account-caret { color: var(--slate-400); font-size: 0.7rem; }
.nav-account-menu {
  position: absolute; right: 0; top: calc(100% + 0.5rem); min-width: 240px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 0.4rem; z-index: 60;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.nav-account-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-account-head { padding: 0.6rem 0.7rem 0.7rem; border-bottom: 1px solid var(--line); margin-bottom: 0.3rem; display: flex; flex-direction: column; gap: 0.1rem; }
.nav-account-head strong { color: var(--navy-900); font-size: 0.92rem; }
.nav-account-head span { color: var(--slate-500); font-size: 0.78rem; word-break: break-all; }
.nav-account-menu a, .nav-account-signout {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 0.6rem 0.7rem; border-radius: var(--radius-sm); color: var(--ink-soft);
  font-family: var(--font-body); font-size: 0.9rem; cursor: pointer; text-decoration: none;
}
.nav-account-menu a:hover, .nav-account-signout:hover { background: var(--slate-100); color: var(--navy-900); }
.nav-account-signout { color: var(--danger); margin-top: 0.2rem; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius-sm) var(--radius-sm); }

/* Admin context badge in the slim admin top bar */
.nav-context-badge {
  display: inline-block; margin-left: 0.6rem; padding: 0.15rem 0.55rem;
  background: var(--navy-900); color: #fff; border-radius: 999px;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  font-family: var(--font-body); vertical-align: middle;
}
.navbar--admin { background: #fff; }

/* Clickable dashboard KPI cards (rendered as <button>) */
.admin-kpi, button.kpi, button.pstat {
  font-family: inherit; text-align: left; width: 100%;
  cursor: pointer; -webkit-appearance: none; appearance: none;
}
button.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.1rem 1.2rem; }
button.admin-kpi:hover, button.kpi:hover, button.pstat:hover { border-color: var(--teal-300); box-shadow: var(--shadow); }
button.admin-kpi:focus-visible, button.kpi:focus-visible, button.pstat:focus-visible { outline: 2px solid var(--teal-500); outline-offset: 2px; }

/* Portal dashboard without the aside — single full-width column.
   Book/Order actions live in the account menu, quick actions, and profile. */
.portal-dashboard--full { grid-template-columns: 1fr !important; }

/* ============================================================
   DATE PICKER (BP.datepicker) — grid calendar with month/year selects
   ============================================================ */
.bp-dp-input { cursor: pointer; background-image: none; }
.bp-dp-pop {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 0.75rem; width: 280px;
  font-family: var(--font-body);
}
.bp-dp-head { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.6rem; }
.bp-dp-nav {
  width: 30px; height: 30px; flex: none; border: 1px solid var(--line); background: #fff;
  border-radius: var(--radius-sm); cursor: pointer; font-size: 1.1rem; line-height: 1;
  color: var(--navy-900); display: grid; place-items: center;
}
.bp-dp-nav:hover { background: var(--slate-100); }
.bp-dp-sel {
  flex: 1; min-width: 0; padding: 0.4rem 0.5rem; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 0.9rem;
  background: #fff; color: var(--navy-900); cursor: pointer;
}
.bp-dp-year { max-width: 90px; }
.bp-dp-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px; }
.bp-dp-dow span { text-align: center; font-size: 0.7rem; font-weight: 700; color: var(--slate-400); text-transform: uppercase; }
.bp-dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.bp-dp-day {
  aspect-ratio: 1 / 1; border: none; background: none; border-radius: var(--radius-sm);
  cursor: pointer; font-family: var(--font-body); font-size: 0.85rem; color: var(--ink);
  display: grid; place-items: center;
}
.bp-dp-day:hover:not(.bp-dp-empty) { background: var(--teal-50); color: var(--teal-800); }
.bp-dp-day.is-sel { background: var(--teal-600); color: #fff; font-weight: 700; }
.bp-dp-empty { cursor: default; }

/* ============================================================
   Service sub-pages (service.html)
   ============================================================ */
.svc-intro { max-width: 720px; }
.svc-intro > p { font-size: 1.1rem; color: var(--ink-soft); line-height: 1.6; }
.svc-points {
  list-style: none; padding: 0; margin: 1.25rem 0 0;
  display: grid; gap: 0.6rem;
}
.svc-points li {
  position: relative; padding-left: 1.75rem; color: var(--ink-soft); line-height: 1.5;
}
.svc-points li::before {
  content: ""; position: absolute; left: 0; top: 0.5em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--teal-500);
}
.offer-head { margin-bottom: 1.25rem; }
.offer-head h2 { margin: 0 0 0.35rem; }
.svc-cta {
  max-width: 640px; text-align: center; padding: 2rem;
  background: linear-gradient(180deg, var(--teal-50), #fff);
  border: 1px solid var(--teal-200);
}
.svc-cta h3 { margin: 0 0 0.5rem; font-size: 1.4rem; }
.svc-cta p { color: var(--ink-soft); margin: 0 0 1.25rem; }
.svc-cta-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
