/* ==========================================================================
   Bloom Women's Health — Page-specific styles
   File: assets/css/5-pages.css
   ========================================================================== */

/* ==========================================================================
   HOME
   ========================================================================== */
.hero {
  position: relative;
  z-index: 1;
  padding-block: clamp(2.5rem, 6vw, 5.5rem) clamp(2rem, 5vw, 4rem);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 980px) { .hero__grid { grid-template-columns: 1fr; } }

.hero-title { font-size: var(--t-hero); line-height: 1.02; letter-spacing: -.03em; }
.hero-typer {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  flex-wrap: wrap;
  margin-top: var(--s-4);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.hero-typer .grad-text { min-height: 1.2em; }
.hero-sub { margin-top: var(--s-5); max-width: 54ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: var(--s-6); }
.hero-trust { display: flex; align-items: center; gap: var(--s-5); flex-wrap: wrap; margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--line); }
@media (max-width: 560px) {
  .hero-cta {
    flex-direction: column;
    width: 100%;
    gap: .65rem;
    margin-top: var(--s-5);
  }
  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }
  .hero-trust {
    gap: var(--s-3);
    margin-top: var(--s-5);
    padding-top: var(--s-4);
  }
}
.hero-trust__item { display: flex; align-items: center; gap: .7rem; }
.hero-trust__num { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--ink); line-height: 1; }
.hero-trust__label { font-size: var(--t-tiny); color: var(--ink-mute); font-weight: 600; }
.avatar-row { display: flex; }
.avatar-row .avatar { border: 2.5px solid var(--bg); margin-left: -12px; }
.avatar-row .avatar:first-child { margin-left: 0; }

.hero__visual { position: relative; }
.hero__card-stack {
  position: relative;
  perspective: 1200px;
}

.hero__3d-wrap {
  position: relative;
  transform-style: preserve-3d;
  transition: transform .45s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

/* Creative 3D Photo Card with Multi-Stage Ambient Shadow & Specular Rim */
.hero__photo-card {
  position: relative;
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 240, 246, 0.8) 100%);
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  transform: translateZ(0);
  transition: box-shadow .45s var(--ease-out), transform .45s var(--ease-out);
  /* Multi-stage 3D ambient shadow with warm rose & deep depth */
  box-shadow:
    0 10px 24px -6px rgba(236, 92, 141, 0.22),
    0 28px 60px -12px rgba(20, 14, 32, 0.26),
    0 55px 95px -20px rgba(236, 92, 141, 0.20),
    0 0 0 1px rgba(255, 255, 255, 0.95) inset;
}

html[data-theme="dark"] .hero__photo-card {
  background: linear-gradient(145deg, rgba(38, 28, 48, 0.95) 0%, rgba(20, 14, 26, 0.9) 100%);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 12px 28px -5px rgba(0, 0, 0, 0.5),
    0 32px 75px -15px rgba(0, 0, 0, 0.75),
    0 0 45px rgba(236, 92, 141, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.hero__card-stack:hover .hero__photo-card {
  box-shadow:
    0 16px 36px -6px rgba(236, 92, 141, 0.32),
    0 38px 85px -10px rgba(20, 14, 32, 0.32),
    0 70px 125px -20px rgba(236, 92, 141, 0.28),
    0 0 0 1px rgba(255, 255, 255, 1) inset;
}

.hero__photo-frame {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: #111;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* Glass Sheen overlay */
.hero__photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.03) 40%, transparent 60%);
  pointer-events: none;
  border-radius: 22px;
}

.hero__photo-img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  object-position: center 50%;
  display: block;
  transform: scale(1.01);
  transition: transform .6s var(--ease-out);
}

.hero__card-stack:hover .hero__photo-img {
  transform: scale(1.03);
}

/* Floating 3D widgets popping out on Z-axis */
.hero__float {
  position: absolute;
  z-index: 5;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 18px 40px -8px rgba(18, 12, 28, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.85);
  padding: .75rem .95rem;
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--ink);
  transform: translateZ(44px);
  transition: transform .3s var(--ease-spring), box-shadow .3s var(--ease-out);
}

html[data-theme="dark"] .hero__float {
  background: rgba(34, 26, 40, .88);
  border-color: rgba(255, 255, 255, .14);
  box-shadow: 0 18px 40px -8px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.hero__float--doctor {
  top: -22px;
  right: 18px;
  z-index: 6;
  padding: .45rem .85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .95);
  border: 1px solid rgba(225, 29, 72, .24);
  transform: translateZ(54px);
}

.hero__float--a {
  top: 22px;
  left: -20px;
  transform: translateZ(48px);
}

.hero__float--b {
  bottom: 24px;
  right: -18px;
  transform: translateZ(48px);
}

.hero__float--c {
  bottom: -16px;
  left: 20px;
  transform: translateZ(46px);
  display: flex !important;
}

@media (max-width: 960px) {
  .hero__float--a { left: 8px; }
  .hero__float--b { right: 8px; }
  .hero__float--c { left: 16px; bottom: 8px; }
}

@media (max-width: 560px) {
  .hero__float--a, .hero__float--b, .hero__float--c { display: none !important; }
  .hero__float--doctor { top: -16px; right: 12px; }
  .hero__photo-img { height: 380px; }
}

.hero__card-stack:has(.showcase) .showcase__hotspots { display: none; }
.hero__card-stack:has(.showcase) .showcase__caption { display: none; }
.hero__card-stack:has(.showcase) .showcase__meta { bottom: .8rem; max-width: calc(100% - 1.8rem); }
.hero__float-icon {
  width: 34px; height: 34px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--rose-600);
  flex-shrink: 0;
}
.hero__float-icon--teal { background: #e3f7f4; color: var(--teal-600); }
.hero__float-icon--gold { background: #fdf3dd; color: var(--gold-500); }
.hero__float svg { width: 17px; height: 17px; }
.hero__float small { display: block; color: var(--ink-mute); font-weight: 550; font-size: .72rem; }

.hero__orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(28px);
  opacity: .75;
  z-index: 0;
}
.hero__orb--1 { width: 300px; height: 300px; background: var(--rose-200); top: -70px; left: -90px; }
.hero__orb--2 { width: 260px; height: 260px; background: #d9d0ff; bottom: -80px; right: -60px; }
.hero__orb--3 { width: 200px; height: 200px; background: #bfeee9; top: 40%; right: 34%; }

/* Brand marquee band */
.band {
  position: relative;
  z-index: 1;
  padding-block: clamp(1.6rem, 3vw, 2.4rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .45);
  backdrop-filter: blur(8px);
}
html[data-theme="dark"] .band { background: rgba(255, 255, 255, .04); }

/* Service tiles with 3D */
.service-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
}
.service-tile__glow {
  position: absolute;
  width: 190px; height: 190px;
  border-radius: 50%;
  right: -70px; top: -70px;
  background: radial-gradient(circle, rgba(236, 92, 141, .28), transparent 68%);
  transition: transform .6s var(--ease-out);
  z-index: -1;
}
.service-tile:hover .service-tile__glow { transform: scale(1.5) translate(-14px, 14px); }
.service-tile ul { margin-top: var(--s-4); }
.service-tile__foot { margin-top: auto; padding-top: var(--s-4); }

/* Journey timeline (scroll-driven) */
.journey { position: relative; display: grid; gap: var(--s-5); }
.journey::before {
  content: "";
  position: absolute;
  left: 27px; top: 12px; bottom: 12px;
  width: 2px;
  background: linear-gradient(var(--rose-300), var(--violet-400), var(--teal-400));
  opacity: .4;
}
.journey__item { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: var(--s-5); align-items: start; }
.journey__dot {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface);
  border: 2px solid var(--rose-200);
  color: var(--rose-600);
  font-family: var(--font-display);
  font-weight: 700;
  z-index: 1;
  box-shadow: var(--sh-2);
  transition: all var(--dur) var(--ease-spring);
}
.journey__item:hover .journey__dot { background: var(--grad-brand); color: #fff; border-color: transparent; transform: scale(1.08) rotate(-6deg); }
.journey__body { padding-top: .4rem; }
@media (max-width: 560px) { .journey__item { grid-template-columns: 44px 1fr; gap: var(--s-4); } .journey__dot { width: 44px; height: 44px; font-size: .9rem; } .journey::before { left: 21px; } }

/* Testimonial slider */
.slider { position: relative; overflow: hidden; border-radius: var(--r-xl); }
.slider__track { display: flex; transition: transform .7s var(--ease-out); }
.slider__slide { min-width: 100%; padding: clamp(1.4rem, 3vw, 2.6rem); }
.slider__nav { display: flex; align-items: center; gap: .6rem; justify-content: center; margin-top: var(--s-5); }
.slider__dots { display: flex; gap: .4rem; }
.slider__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); transition: all var(--dur) var(--ease-out); }
.slider__dot.is-active { width: 26px; border-radius: var(--r-pill); background: var(--grad-brand); }

/* Pricing / membership */
.plan { position: relative; display: flex; flex-direction: column; height: 100%; }
.plan--featured { border-color: var(--rose-300); box-shadow: var(--sh-glow); transform: translateY(-8px); }
.plan__badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); }
.plan__price { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 700; color: var(--ink); line-height: 1; }
.plan__price small { font-size: .95rem; font-family: var(--font-sans); color: var(--ink-mute); font-weight: 500; }

/* FAQ + CTA composite */
.cta-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--grad-ink);
  color: #fff;
  padding: clamp(1.8rem, 5vw, 3.6rem);
  text-align: center;
  isolation: isolate;
}
.cta-panel::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236, 92, 141, .55), transparent 66%);
  z-index: -1;
}
.cta-panel::after {
  content: "";
  position: absolute;
  inset: auto auto -45% -12%;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(70, 191, 178, .45), transparent 66%);
  z-index: -1;
}
.cta-panel h2, .cta-panel h3 { color: #fff; }
.cta-panel p { color: rgba(255, 255, 255, .82); }

/* ==========================================================================
   AUTH (login / register)
   ========================================================================== */
.auth-shell {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  place-items: center;
  padding-block: clamp(1.75rem, 5vw, 4rem);
  overflow-x: clip;
}
/* Prevent background decorative blobs from causing horizontal scroll */
.auth-shell .orn {
  max-width: 100vw;
  pointer-events: none;
}

/* Two-column layout on desktop, stacked cleanly on tablet and mobile */
.auth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  width: 100%;
}

.auth-card {
  width: min(560px, 100%);
  border-radius: var(--r-xl);
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, .75);
  box-shadow: 0 40px 90px -30px rgba(43, 30, 47, .4);
  padding: clamp(1.5rem, 4vw, 2.6rem);
  transform-style: preserve-3d;
  animation: scaleIn .6s var(--ease-out);
}
html[data-theme="dark"] .auth-card { background: rgba(34, 26, 40, .8); border-color: rgba(255, 255, 255, .1); }
.auth-card--wide { width: min(720px, 100%); }
.auth-head { text-align: center; margin-bottom: var(--s-6); }
.auth-head h1 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.auth-head p { margin-top: .6rem; }
.auth-switch { display: flex; gap: .3rem; padding: .32rem; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line); margin-bottom: var(--s-6); }
.auth-switch button {
  flex: 1;
  padding: .68rem 1rem;
  border-radius: var(--r-pill);
  font-weight: 650;
  font-size: .92rem;
  color: var(--ink-soft);
  transition: all var(--dur) var(--ease-out);
}
.auth-switch button.is-active { background: var(--surface); color: var(--rose-600); box-shadow: var(--sh-1); }
.auth-panel[hidden] { display: none; }
.auth-panel { animation: panelIn .5s var(--ease-out); }
.auth-divider { display: flex; align-items: center; gap: var(--s-4); margin-block: var(--s-5); color: var(--ink-mute); font-size: var(--t-tiny); text-transform: uppercase; letter-spacing: .14em; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.oauth-row { display: grid; grid-template-columns: 1fr; gap: .6rem; }
.btn--google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.25rem;
  min-height: 48px;
  border-radius: var(--r-md);
  transition: all var(--dur) var(--ease-out);
  cursor: pointer;
  width: 100%;
}
.btn--google:hover {
  background: var(--surface-2);
  border-color: var(--rose-400);
  box-shadow: var(--sh-1);
  transform: translateY(-1px);
}
.btn--google:active {
  transform: translateY(0);
}
.google-icon {
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}
.google-gis-container {
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
}
.google-badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface-2);
  margin-bottom: 0.35rem;
}
.google-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--line);
  overflow: hidden;
  z-index: 10;
}
.google-progress-inner {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, #4285F4, #34A853, #FBBC05, #EA4335, #4285F4);
  background-size: 200% 100%;
  animation: googleProgressAnim 1.2s ease-in-out infinite;
}
@keyframes googleProgressAnim {
  0% { left: -50%; width: 30%; }
  50% { left: 25%; width: 60%; }
  100% { left: 100%; width: 30%; }
}
.google-account-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-block: 0.85rem;
}
.google-account-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  min-height: 54px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  text-align: left;
  cursor: pointer;
  transition: all var(--dur) var(--ease-out);
  width: 100%;
  color: inherit;
}
.google-account-btn:hover {
  background: var(--surface-2);
  border-color: #4285F4;
  box-shadow: 0 2px 8px rgba(66, 133, 244, 0.15);
  transform: translateY(-1px);
}
.google-account-btn:active {
  transform: scale(0.99);
}
.google-account-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.google-account-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}
.google-account-email {
  font-size: 0.8rem;
  color: var(--muted);
}
.google-account-badge {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  background: rgba(14, 165, 233, 0.12);
  color: #0284c7;
  border-radius: 999px;
  font-weight: 600;
}
.google-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-block;
  border: 3.5px solid rgba(66, 133, 244, 0.18);
  border-top-color: #4285F4;
  border-right-color: #34A853;
  border-bottom-color: #FBBC05;
  border-left-color: #EA4335;
  animation: googleSpin 0.85s linear infinite;
}
@keyframes googleSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.google-account-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.82rem;
}
.btn--google-next {
  background: #1a73e8;
  color: #fff;
  border: none;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--dur) var(--ease-out);
}
.btn--google-next:hover {
  background: #1557b0;
  box-shadow: 0 2px 6px rgba(26, 115, 232, 0.3);
}
.demo-creds {
  margin-top: var(--s-5);
  padding: .95rem 1.1rem;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  font-size: .84rem;
}
.demo-creds strong { display: block; margin-bottom: .35rem; font-size: .88rem; }
.demo-creds code { font-family: var(--font-mono); font-size: .82rem; color: var(--rose-700); }
.demo-creds button { margin-top: .5rem; }
.auth-aside { display: grid; gap: var(--s-4); }

/* Hide floating action buttons on login page so they don't cover inputs/buttons */
body[data-page="login"] .fab-stack { display: none !important; }

/* --------------------------------------------------------------------------
   Mobile & Android Responsive Rules for Auth Page
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .auth-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
  .auth-card,
  .auth-card--wide {
    margin-inline: auto;
    width: 100%;
    max-width: 600px;
  }
  .auth-aside {
    margin-inline: auto;
    width: 100%;
    max-width: 600px;
  }
}

@media (max-width: 580px) {
  .auth-shell {
    padding-block: 1rem 2.5rem;
    overflow-x: hidden;
  }
  .auth-shell .orn {
    opacity: 0.25;
  }
  .auth-card {
    padding: 1.35rem 1.1rem;
    border-radius: var(--r-lg);
    box-shadow: 0 16px 40px -12px rgba(43, 30, 47, .25);
  }
  .auth-head {
    margin-bottom: 1.25rem;
  }
  .auth-head h1 {
    font-size: 1.5rem;
    line-height: 1.25;
  }
  .auth-head .lead {
    font-size: 0.88rem;
    margin-top: 0.4rem;
  }
  .auth-head .brand__mark {
    width: 44px;
    height: 44px;
    margin-bottom: 0.6rem;
  }
  .auth-switch {
    margin-bottom: 1.25rem;
    padding: 0.25rem;
  }
  .auth-switch button {
    padding: 0.6rem 0.4rem;
    font-size: 0.85rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
  }
  .auth-switch button svg {
    width: 16px;
    height: 16px;
  }
  .auth-card .form-grid {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }
  .auth-card .field label {
    font-size: 0.85rem;
  }
  .auth-card .input,
  .auth-card .select,
  .auth-card .textarea {
    font-size: 1rem; /* Android: prevents automatic zoom on focus */
    padding: 0.78rem 0.95rem;
    min-height: 46px;
  }
  .auth-card .input-group .input {
    padding-left: 2.6rem;
  }
  .auth-card .input-group .input-icon {
    left: 0.85rem;
    width: 17px;
    height: 17px;
  }
  .auth-card .input-group .input-suffix {
    width: 38px;
    height: 38px;
    right: 0.35rem;
  }
  .auth-card .btn--lg {
    padding: 0.85rem 1.2rem;
    font-size: 0.98rem;
    min-height: 48px;
  }
  .btn--google {
    padding: 0.8rem 1rem;
    font-size: 0.92rem;
    min-height: 48px;
  }
  .demo-creds {
    padding: 0.85rem 0.95rem;
    font-size: 0.82rem;
  }
  .demo-creds .flex-between {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }
  .demo-creds .flex-between button {
    width: 100%;
    min-height: 40px;
    justify-content: center;
  }
  .auth-aside {
    gap: 1rem;
  }
  .auth-aside .card {
    padding: 1.2rem 1rem;
    border-radius: var(--r-lg);
  }
  .auth-aside h2 {
    font-size: 1.25rem;
    line-height: 1.3;
  }
  .auth-aside .tick-list li {
    font-size: 0.86rem;
    gap: 0.5rem;
  }
  .auth-aside .tick-list svg {
    width: 16px;
    height: 16px;
  }
  /* Google Auth Modal on Android */
  #google-auth-modal .modal__panel {
    padding: 1.35rem 1.1rem 1.1rem;
    max-width: calc(100vw - 1.5rem);
    border-radius: var(--r-xl);
  }
  #google-auth-modal .modal__head h3 {
    font-size: 1.25rem;
  }
  #google-auth-modal .google-account-btn {
    padding: 0.75rem 0.85rem;
    min-height: 52px;
  }
}

/* ==========================================================================
   DASHBOARD
   ========================================================================== */
.dash-grid {
  display: grid;
  grid-template-columns: 268px 1fr;
  gap: var(--s-5);
  align-items: start;
}
@media (max-width: 1020px) { .dash-grid { grid-template-columns: 1fr; } }

.dash-side {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--sh-1);
  padding: var(--s-5) var(--s-4);
  min-width: 0;
  max-width: 100%;
}
@media (max-width: 1020px) { .dash-side { position: static; } }
.dash-side__profile { text-align: center; padding-bottom: var(--s-5); border-bottom: 1px solid var(--line); }
.dash-side__profile .avatar { margin: 0 auto var(--s-3); }
.dash-side__profile h3 { font-size: 1.05rem; }
.dash-side__nav { display: flex; flex-direction: column; gap: .2rem; margin-top: var(--s-4); }
.dash-side__nav button {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .7rem .85rem;
  border-radius: var(--r-md);
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-align: left;
  transition: all var(--dur) var(--ease-out);
}
.dash-side__nav button svg { width: 18px; height: 18px; }
.dash-side__nav button:hover { background: var(--surface-2); color: var(--ink); transform: translateX(3px); }
.dash-side__nav button.is-active { background: var(--grad-brand); color: #fff; box-shadow: var(--sh-glow); }
.dash-side__nav button .count {
  margin-left: auto;
  font-size: var(--t-tiny);
  padding: .1rem .45rem;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-soft);
}
.dash-side__nav button.is-active .count { background: rgba(255, 255, 255, .28); color: #fff; }

@media (max-width: 768px) {
  .dash-side {
    padding: var(--s-3);
    border-radius: var(--r-md);
  }
  .dash-side__profile {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: .15rem .75rem;
    text-align: left;
    padding-bottom: var(--s-3);
  }
  .dash-side__profile .avatar {
    grid-column: 1;
    grid-row: 1 / span 2;
    margin: 0;
    width: 44px;
    height: 44px;
    font-size: 1rem;
    flex-shrink: 0;
  }
  .dash-side__profile h3 {
    grid-column: 2;
    grid-row: 1;
    font-size: .96rem;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .dash-side__profile .tiny {
    grid-column: 2;
    grid-row: 2;
    font-size: .74rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .dash-side__profile .chip {
    grid-column: 3;
    grid-row: 1 / span 2;
    margin: 0 !important;
    font-size: .72rem;
    padding: .25rem .55rem;
  }
  .dash-side__profile .card {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: var(--s-2) !important;
  }
  .dash-side__nav {
    flex-direction: row;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    gap: .4rem;
    padding: 2px 2px 8px;
    margin-top: var(--s-3);
    scrollbar-width: thin;
  }
  .dash-side__nav button {
    flex-shrink: 0;
    padding: .5rem .85rem;
    font-size: .84rem;
    white-space: nowrap;
    border: 1px solid var(--line);
    background: var(--surface-2);
  }
  .dash-side__nav button.is-active {
    border-color: transparent;
  }
  .dash-side__nav button .count {
    margin-left: .4rem;
  }
  .dash-side .divider {
    margin-top: var(--s-2) !important;
    margin-bottom: var(--s-2) !important;
  }
  .dash-side .stack-sm {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: var(--s-2) !important;
  }
  .dash-side .stack-sm a {
    font-size: .78rem;
    padding: .3rem .6rem;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    white-space: nowrap;
  }
}

.dash-main { display: grid; gap: var(--s-5); min-width: 0; }
.dash-panel[hidden] { display: none; }
.dash-panel { animation: panelIn .45s var(--ease-out); }

.next-appt {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--grad-ink);
  color: #fff;
  padding: clamp(1.3rem, 3vw, 2rem);
}
.next-appt::before {
  content: "";
  position: absolute;
  top: -60px; right: -40px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236, 92, 141, .5), transparent 66%);
}
.next-appt > * { position: relative; }
.next-appt h2, .next-appt h3 { color: #fff; }
.next-appt p { color: rgba(255, 255, 255, .8); }
.next-appt__meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--s-4); margin-top: var(--s-5); }
.next-appt__meta div span { display: block; font-size: var(--t-tiny); text-transform: uppercase; letter-spacing: .12em; color: rgba(255, 255, 255, .6); }
.next-appt__meta div strong { font-size: 1.02rem; color: #fff; }

.vitals-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s-4); }
.vital {
  padding: var(--s-4);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: all var(--dur) var(--ease-out);
}
.vital:hover { transform: translateY(-4px); box-shadow: var(--sh-2); border-color: var(--rose-200); }
.vital span { font-size: var(--t-tiny); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-mute); font-weight: 650; }
.vital strong { display: block; font-family: var(--font-display); font-size: 1.5rem; margin-top: .3rem; }

.cycle-ring { position: relative; width: 150px; height: 150px; margin-inline: auto; }
.cycle-ring svg { transform: rotate(-90deg); }
.cycle-ring__label {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  text-align: center;
}
.cycle-ring__label strong { font-family: var(--font-display); font-size: 1.5rem; display: block; }
.cycle-ring__label span { font-size: var(--t-tiny); color: var(--ink-mute); }

.timeline-list { display: flex; flex-direction: column; }
.timeline-list li { display: grid; grid-template-columns: 92px 1fr; gap: var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.timeline-list li:last-child { border-bottom: 0; }
.timeline-list time { font-size: var(--t-small); color: var(--ink-mute); font-weight: 620; }

/* ==========================================================================
   BOOKING
   ========================================================================== */
.booking-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--s-6); align-items: start; }
@media (max-width: 1000px) { .booking-grid { grid-template-columns: 1fr; } }
.booking-panel { border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--sh-1); padding: clamp(1.2rem, 2.6vw, 2rem); }
.booking-step[hidden] { display: none; }
.booking-step { animation: panelIn .45s var(--ease-out); }
.booking-step__foot { display: flex; justify-content: space-between; gap: var(--s-4); margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--line); flex-wrap: wrap; }

.slot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: .55rem; }

/* The static radio grid is the no-JavaScript fallback. Once booking.js has
   taken over it is removed from view entirely. */
#slot-fallback .slot { cursor: pointer; display: grid; place-items: center; }
#slot-fallback .slot input { position: absolute; opacity: 0; pointer-events: none; }
#slot-fallback .slot:has(input:checked) {
  background: var(--grad-brand);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--sh-glow);
}
html.js-booking #slot-fallback { display: none; }
.slot {
  position: relative;
  padding: .68rem .5rem;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  font-size: .86rem;
  font-weight: 640;
  color: var(--ink-soft);
  text-align: center;
  transition: all var(--dur) var(--ease-out);
}
.slot:hover:not(:disabled) { border-color: var(--rose-400); color: var(--rose-700); transform: translateY(-2px); box-shadow: var(--sh-2); }
.slot.is-selected { background: var(--grad-brand); color: #fff; border-color: transparent; box-shadow: var(--sh-glow); }
.slot:disabled { opacity: .38; text-decoration: line-through; cursor: not-allowed; }

.booking-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  width: 100%;
}
.booking-sidebar > * {
  flex-shrink: 0;
  min-height: fit-content;
}
@media (min-width: 1001px) {
  .booking-sidebar {
    position: sticky;
    top: calc(var(--nav-h) + 16px);
    max-height: calc(100vh - var(--nav-h) - 24px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    padding-right: 2px;
  }
}
@media (max-width: 1000px) {
  .booking-sidebar {
    position: static;
    margin-top: var(--s-6);
  }
}

.booking-summary {
  position: relative;
  border-radius: var(--r-lg);
  background: var(--grad-ink);
  color: #fff;
  padding: clamp(1.2rem, 2.6vw, 1.9rem);
  box-shadow: 0 12px 32px rgba(58, 43, 66, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: visible;
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
  min-height: fit-content;
}
.booking-summary h3 {
  color: #fff;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  line-height: 1.25;
  margin-top: .6rem;
  margin-bottom: 1rem;
}
.booking-summary__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--s-3);
  padding: .65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: .9rem;
}
.booking-summary__row:last-of-type {
  border-bottom: 0;
}
.booking-summary__row span {
  color: rgba(255, 255, 255, .72);
  font-size: .86rem;
  flex-shrink: 0;
  min-width: 80px;
  font-weight: 500;
  letter-spacing: .01em;
}
.booking-summary__row strong {
  color: #fff;
  text-align: right;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 72%;
}

.booking-summary .note {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-left: 4px solid var(--rose-300);
  color: rgba(255, 255, 255, 0.92);
  border-radius: var(--r-md);
  padding: .85rem 1rem;
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  font-size: .86rem;
  line-height: 1.45;
  box-sizing: border-box;
}
.booking-summary .note svg {
  color: var(--rose-300);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

.booking-summary .btn--ghost {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  border-radius: var(--r-md);
  padding: .75rem 1rem;
  font-weight: 600;
  transition: all .2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  box-sizing: border-box;
}
.booking-summary .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .booking-summary {
    padding: 1.15rem 1rem;
    border-radius: var(--r-md);
  }
  .booking-summary h3 {
    font-size: 1.25rem;
    margin-bottom: .85rem;
  }
  .booking-summary__row {
    padding: .5rem 0;
    font-size: .86rem;
    gap: .5rem;
  }
  .booking-summary__row span {
    min-width: 72px;
    font-size: .82rem;
  }
  .booking-summary__row strong {
    font-size: .86rem;
    max-width: 70%;
  }
  .booking-summary .note {
    padding: .75rem .85rem;
    font-size: .82rem;
  }
}

@media (max-width: 440px) {
  .booking-summary__row {
    flex-direction: column;
    align-items: flex-start;
    gap: .2rem;
    padding: .5rem 0;
  }
  .booking-summary__row span {
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: rgba(255, 255, 255, 0.6);
    min-width: 0;
  }
  .booking-summary__row strong {
    text-align: left;
    max-width: 100%;
    font-size: .88rem;
  }
}

body[data-page="booking"] .fab:not(.fab--top) {
  display: none !important;
}

.success-mark {
  width: 92px; height: 92px;
  margin: 0 auto var(--s-5);
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--teal-400), var(--teal-600));
  color: #fff;
  box-shadow: var(--sh-glow-teal);
  animation: scaleIn .5s var(--ease-spring);
}
.success-mark svg { width: 46px; height: 46px; }
.success-mark svg path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: dash .8s .25s var(--ease-out) forwards; }

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 940px) { .about-split { grid-template-columns: 1fr; } }

.value-card { position: relative; padding-left: 1.6rem; }
.value-card::before {
  content: "";
  position: absolute;
  left: 0; top: .35rem; bottom: .35rem;
  width: 3px;
  border-radius: 3px;
  background: var(--grad-brand);
  transform: scaleY(.3);
  transform-origin: top;
  transition: transform .6s var(--ease-out);
}
.value-card.is-in::before { transform: scaleY(1); }

.doctor-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; padding: 0; }
.doctor-card__media {
  position: relative;
  aspect-ratio: 4 / 3.4;
  display: grid;
  place-items: center;
  background: var(--grad-brand-soft);
  overflow: hidden;
}
.doctor-card__media .avatar--lg { width: 112px; height: 112px; font-size: 2.2rem; box-shadow: var(--sh-3); }
.doctor-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
  transition: transform 0.4s ease;
}
.doctor-card:hover .doctor-card__media img {
  transform: scale(1.03);
}
.doctor-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(43, 30, 47, .08));
}
.doctor-card__body { padding: clamp(1.1rem, 2.2vw, 1.5rem); display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.doctor-card__role { font-size: var(--t-tiny); text-transform: uppercase; letter-spacing: .12em; color: var(--rose-600); font-weight: 700; }
.doctor-card__tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: auto; padding-top: var(--s-3); }

.timeline-h { position: relative; }
.timeline-h__line { position: absolute; left: 0; right: 0; top: 46px; height: 2px; background: linear-gradient(90deg, var(--rose-300), var(--violet-400), var(--teal-400)); opacity: .35; }
.timeline-h__items { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--s-5); position: relative; }
.timeline-h__item { text-align: center; }
.timeline-h__year {
  display: inline-grid; place-items: center;
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--rose-200);
  color: var(--rose-700);
  font-family: var(--font-display);
  font-weight: 700;
  box-shadow: var(--sh-2);
  margin-bottom: var(--s-3);
  transition: all var(--dur) var(--ease-spring);
}
.timeline-h__item:hover .timeline-h__year { background: var(--grad-brand); color: #fff; border-color: transparent; transform: translateY(-6px) rotate(-6deg); }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--s-4); }
.gallery-tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-lg);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #fff;
  text-align: center;
  padding: var(--s-4);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur);
}
.gallery-tile:hover { transform: scale(1.03) rotate(-1deg); box-shadow: var(--sh-3); }
.gallery-tile svg { width: 40px; height: 40px; margin: 0 auto var(--s-3); }
.gallery-tile span { font-weight: 650; font-size: .92rem; }
.gallery-tile--1 { background: linear-gradient(140deg, #f97fa8, #d43e73); }
.gallery-tile--2 { background: linear-gradient(140deg, #46bfb2, #0e5f58); }
.gallery-tile--3 { background: linear-gradient(140deg, #a48cf0, #523d5c); }
.gallery-tile--4 { background: linear-gradient(140deg, #e5b769, #ab2b5b); }

/* ==========================================================================
   COMMENTS / REVIEWS
   ========================================================================== */
.review-summary {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--s-6);
  align-items: center;
  padding: clamp(1.2rem, 3vw, 2rem);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
}
@media (max-width: 700px) { .review-summary { grid-template-columns: 1fr; text-align: center; } }
.review-summary__score { text-align: center; }
.review-summary__score b { font-family: var(--font-display); font-size: 3.4rem; line-height: 1; display: block; }
.review-bars { display: grid; gap: .45rem; }

.review-card { display: flex; flex-direction: column; gap: var(--s-4); }
.review-card__head { display: flex; align-items: center; gap: .8rem; }
.review-card__head .meta { flex: 1; min-width: 0; }
.review-card__head strong { display: block; font-size: .97rem; }
.review-card__head span { font-size: var(--t-tiny); color: var(--ink-mute); }
.review-card__body { flex: 1; font-size: .95rem; }
.review-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding-top: var(--s-4); border-top: 1px solid var(--line); flex-wrap: wrap; }
.verified-badge { display: inline-flex; align-items: center; gap: .3rem; font-size: var(--t-tiny); color: var(--teal-700); font-weight: 700; }
.verified-badge svg { width: 14px; height: 14px; }
.review-masonry { columns: 3 260px; column-gap: var(--s-5); }
.review-masonry > * { break-inside: avoid; margin-bottom: var(--s-5); display: inline-block; width: 100%; }

.comment-compose textarea { min-height: 110px; }
.char-count { font-size: var(--t-tiny); color: var(--ink-mute); }
.char-count.is-over { color: #c02b3f; font-weight: 700; }

.emoji-row { display: flex; gap: .4rem; flex-wrap: wrap; }
.emoji-btn {
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 1.15rem;
  display: grid; place-items: center;
  transition: all var(--dur) var(--ease-spring);
}
.emoji-btn:hover { transform: translateY(-3px) scale(1.08); border-color: var(--rose-300); }
.emoji-btn.is-active { background: var(--accent-soft); border-color: var(--rose-300); }

/* ==========================================================================
   ADMIN
   ========================================================================== */
.admin-shell { position: relative; z-index: 1; }
.admin-grid { display: grid; grid-template-columns: 250px 1fr; gap: var(--s-5); align-items: start; }
.admin-grid > *,
.dash-side,
.dash-main,
.dash-main > *,
.dash-panel,
[data-admin-view],
[data-dash-panel] {
  min-width: 0;
  max-width: 100%;
}
@media (max-width: 1020px) { .admin-grid { grid-template-columns: 1fr; } }
.admin-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s-4); }
@media (max-width: 560px) {
  .admin-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: var(--s-3);
  }
  .kpi {
    padding: .85rem;
  }
  .kpi__num {
    font-size: 1.55rem;
    margin-top: var(--s-2);
  }
  .kpi__label {
    font-size: .76rem;
  }
  .kpi__delta {
    font-size: .7rem;
  }
}
.kpi {
  position: relative;
  overflow: hidden;
  padding: clamp(1rem, 2vw, 1.4rem);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur);
}
.kpi:hover { transform: translateY(-5px); box-shadow: var(--sh-3); }
.kpi__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.kpi__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--rose-600); }
.kpi__icon svg { width: 19px; height: 19px; }
.kpi__icon--teal { background: #e3f7f4; color: var(--teal-600); }
.kpi__icon--violet { background: #f0ecff; color: var(--violet-500); }
.kpi__icon--gold { background: #fdf3dd; color: var(--gold-500); }
.kpi__num { font-family: var(--font-display); font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 700; line-height: 1; margin-top: var(--s-4); }
.kpi__label { font-size: var(--t-small); color: var(--ink-mute); font-weight: 600; }
.kpi__delta { font-size: var(--t-tiny); font-weight: 700; color: var(--teal-600); }
.kpi__delta.is-down { color: #c02b3f; }

.admin-toolbar { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; justify-content: space-between; }
.admin-search { flex: 1; min-width: 200px; max-width: 340px; }
@media (max-width: 640px) {
  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: var(--s-3);
  }
  .admin-toolbar form {
    width: 100%;
    flex-direction: column;
    align-items: stretch !important;
    gap: var(--s-2);
  }
  .admin-toolbar .field,
  .admin-search {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  .admin-toolbar button,
  .admin-toolbar a {
    width: 100%;
    justify-content: center;
  }
}
.row-actions { display: flex; gap: .35rem; justify-content: flex-end; }
.bulk-bar {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: .7rem 1.1rem;
  border-radius: var(--r-md);
  background: var(--plum-800);
  color: #fff;
  font-size: .88rem;
  animation: fadeUp .35s var(--ease-out);
}
.admin-login {
  width: min(460px, 100%);
  margin-inline: auto;
}
.login-shield {
  width: 68px; height: 68px;
  margin: 0 auto var(--s-4);
  border-radius: 22px;
  display: grid; place-items: center;
  background: var(--grad-ink);
  color: #fff;
  box-shadow: var(--sh-3);
}
.login-shield svg { width: 32px; height: 32px; }

.mod-queue { display: grid; gap: var(--s-4); }
.mod-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-4);
  padding: var(--s-4);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  animation: fadeUp .4s var(--ease-out);
}
@media (max-width: 640px) { .mod-item { grid-template-columns: 1fr; } }
.mod-item__body p { font-size: .93rem; }
.mod-item__actions { display: flex; gap: .4rem; align-items: flex-start; flex-wrap: wrap; }
.mod-item.is-handled { opacity: .62; }
.mod-item.is-approved { border-color: var(--teal-300); }

/* Clinic reply block (admin preview and public reviews) */
.staff-reply {
  padding: .85rem 1rem;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border-left: 3px solid var(--teal-400);
}
.staff-reply strong {
  display: block;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal-700);
  margin-bottom: .35rem;
}
.staff-reply p { font-size: .9rem; margin: 0; }
html[data-theme="dark"] .staff-reply strong { color: var(--teal-300); }

/* ==========================================================================
   LEGAL (privacy policy)
   ========================================================================== */
.legal-grid { display: grid; grid-template-columns: 250px 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.legal-grid > * { min-width: 0; }
@media (max-width: 940px) { .legal-grid { grid-template-columns: 1fr; } }
.legal-toc { position: sticky; top: calc(var(--nav-h) + 16px); min-width: 0; }
@media (max-width: 940px) { .legal-toc { position: static; } }
.legal-toc__list { display: flex; flex-direction: column; gap: .1rem; max-height: 62vh; overflow-y: auto; padding-right: .3rem; }
.legal-toc__list a {
  padding: .5rem .75rem;
  border-radius: var(--r-sm);
  font-size: .86rem;
  color: var(--ink-mute);
  border-left: 2px solid transparent;
  transition: all var(--dur) var(--ease-out);
}
.legal-toc__list a:hover { color: var(--ink); background: var(--surface-2); border-left-color: var(--rose-300); }
.legal-toc__list a.is-active { color: var(--rose-700); border-left-color: var(--rose-500); background: var(--accent-soft); font-weight: 650; }

.legal-body { max-width: 78ch; min-width: 0; }
.legal-body section { scroll-margin-top: calc(var(--nav-h) + 24px); padding-block: var(--s-5); border-bottom: 1px solid var(--line); }
.legal-body section:last-child { border-bottom: 0; }
.legal-body h2 { font-size: clamp(1.3rem, 2.4vw, 1.75rem); margin-bottom: var(--s-4); }
.legal-body h3 { margin-top: var(--s-5); margin-bottom: var(--s-3); font-size: 1.1rem; }
.legal-body p + p, .legal-body ul + p, .legal-body p + ul { margin-top: var(--s-4); }
.legal-body ul { display: flex; flex-direction: column; gap: .55rem; margin-top: var(--s-4); }
.legal-body ul li { position: relative; padding-left: 1.4rem; color: var(--ink-soft); }
.legal-body ul li::before {
  content: "";
  position: absolute;
  left: 0; top: .62em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--grad-brand);
}
.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: var(--t-small);
  color: var(--ink-mute);
}
.legal-meta div strong { display: block; color: var(--ink); font-size: .95rem; }
.legal-highlight {
  padding: var(--s-5);
  border-radius: var(--r-md);
  background: var(--grad-brand-soft);
  border: 1px solid var(--line);
  margin-top: var(--s-5);
}
@media (max-width: 560px) {
  .legal-meta {
    gap: var(--s-3);
    padding: var(--s-3);
    font-size: .8rem;
  }
  .legal-highlight {
    padding: 1.15rem;
  }
}
.data-table td, .data-table th { font-size: .86rem; }

/* Print-friendly legal doc */
@media print {
  .site-header, .site-footer, .fab-stack, #bg3d, #bg3d-fallback, .legal-toc, #scroll-progress { display: none !important; }
  body { background: #fff; }
  .legal-body { max-width: none; }
}

/* ==========================================================================
   ZERON-STYLE CYBER RISK POSTURE & PATIENT TRUST STYLES
   ========================================================================== */

/* Status pulse animation */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.22rem 0.65rem;
  border-radius: var(--r-full);
  font-size: var(--t-tiny);
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(35, 160, 148, 0.12);
  color: var(--teal-600);
  border: 1px solid rgba(35, 160, 148, 0.28);
}
html[data-theme="dark"] .status-pill {
  background: rgba(70, 191, 178, 0.16);
  color: var(--teal-300);
  border-color: rgba(70, 191, 178, 0.35);
}
.status-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal-400);
  box-shadow: 0 0 0 0 rgba(70, 191, 178, 0.7);
  animation: cyberPulse 2s infinite ease-in-out;
}
@keyframes cyberPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(70, 191, 178, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 7px rgba(70, 191, 178, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(70, 191, 178, 0); }
}

/* Patient booking trust components */
.zeron-security-note {
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid rgba(35, 160, 148, 0.25);
  border-left: 4px solid var(--teal-500);
  box-shadow: 0 4px 18px -4px rgba(35, 160, 148, 0.10);
}
.zeron-security-note__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.zeron-trust-card {
  border-top: 3px solid var(--teal-400) !important;
  background: linear-gradient(170deg, var(--surface) 0%, var(--surface-2) 100%);
  position: relative;
  overflow: hidden;
}
.zeron-trust-card::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 110px;
  height: 110px;
  background: radial-gradient(circle, rgba(70, 191, 178, 0.15) 0%, transparent 70%);
  pointer-events: none;
}
.security-trust-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.security-trust-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: var(--t-small);
  line-height: 1.4;
  color: var(--ink-soft);
}
.security-trust-list li svg {
  width: 16px;
  height: 16px;
  color: var(--teal-500);
  flex-shrink: 0;
  margin-top: 2px;
}
.security-chip {
  padding: 0.2rem 0.5rem;
  border-radius: var(--r-sm);
  background: var(--line);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink-mute);
}

/* Admin Console: Cyber Posture Management View */
.card--cyber {
  background: linear-gradient(135deg, rgba(27, 18, 32, 0.98) 0%, rgba(58, 43, 66, 0.96) 100%);
  border: 1px solid rgba(164, 140, 240, 0.25);
  box-shadow: 0 16px 40px -12px rgba(27, 18, 32, 0.35);
  color: #f6f3f8;
  position: relative;
  overflow: hidden;
}
.card--cyber::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal-400), var(--violet-400), var(--rose-500));
}
.card--cyber h2 { color: #ffffff !important; }
.card--cyber .muted { color: rgba(255, 255, 255, 0.72) !important; }

.cyber-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.cyber-header > * { min-width: 0; max-width: 100%; }
.cyber-header .flex { flex-wrap: wrap; }
.cyber-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-300);
  background: rgba(70, 191, 178, 0.15);
  padding: 0.22rem 0.6rem;
  border-radius: var(--r-full);
}
.cyber-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-300);
  animation: cyberPulse 1.8s infinite;
}
.cyber-score-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1.25rem;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}
.cyber-score-circle {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}
.cyber-score-number {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  font-family: var(--font-sans);
  background: linear-gradient(135deg, #7fd9cf, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cyber-score-max {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
}
.cyber-score-label strong {
  display: block;
  font-size: 0.95rem;
  color: #ffffff;
}

.cyber-stats-grid {
  gap: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--s-5);
}
.cyber-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.cyber-stat strong {
  font-size: 1.15rem;
  color: #ffffff;
}
.cyber-stat .eyebrow {
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--teal-300) !important;
}

/* Security controls matrix */
.security-controls-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.security-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface-2);
  transition: transform var(--dur) var(--ease-out), border-color var(--dur);
}
.security-control-row:hover {
  border-color: var(--teal-400);
  transform: translateY(-1px);
}
@media (max-width: 640px) {
  .cyber-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .cyber-score-box {
    width: 100%;
    justify-content: space-between;
  }
  .cyber-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .security-control-row {
    flex-direction: column;
    align-items: flex-start;
    gap: .6rem;
  }
}
.security-control-left {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.security-check-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(35, 160, 148, 0.15);
  color: var(--teal-500);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.security-check-icon svg { width: 14px; height: 14px; stroke-width: 3; }
.security-pill {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  font-family: var(--font-mono);
}
.badge--success {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--r-full);
  background: rgba(35, 160, 148, 0.15);
  color: var(--teal-600);
}
html[data-theme="dark"] .badge--success {
  background: rgba(70, 191, 178, 0.2);
  color: var(--teal-300);
}

/* Telemetry timeline */
.telemetry-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  position: relative;
}
.telemetry-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  position: relative;
}
.telemetry-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}
.telemetry-dot--success { background: var(--teal-500); box-shadow: 0 0 0 3px rgba(35, 160, 148, 0.2); }
.telemetry-dot--info { background: var(--violet-400); box-shadow: 0 0 0 3px rgba(164, 140, 240, 0.2); }
.telemetry-dot--teal { background: var(--teal-400); box-shadow: 0 0 0 3px rgba(70, 191, 178, 0.2); }
.telemetry-content { flex: 1; }
.cyber-endpoint-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.55rem;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--teal-600);
}
html[data-theme="dark"] .cyber-endpoint-tag { color: var(--teal-300); }

/* ==========================================================================
   FULL-SCREEN VISUAL CANVAS + DEVTOOLS INSPECT STUDIO
   ========================================================================== */
.cms-studio {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  background: #0b1120;
  color: #e2e8f0;
  font-family: var(--font-sans);
}
.cms-studio[hidden],
.cms-studio [hidden] {
  display: none !important;
}

.studio-topbar {
  height: 54px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 1rem;
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
  overflow-x: auto;
}
.studio-topbar__group {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}
.studio-page-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.65rem;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  font-size: 0.8rem;
}
.studio-page-badge strong {
  color: #f8fafc;
  max-width: 190px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.studio-page-badge a {
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.studio-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 32px;
  padding: 0 0.75rem;
  border-radius: 7px;
  border: 1px solid transparent;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.studio-btn--ghost {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}
.studio-btn--ghost:hover { background: #334155; color: #fff; }
.studio-btn--inspect {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}
.studio-btn--inspect.is-active {
  background: #0284c7;
  border-color: #38bdf8;
  color: #fff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}
.studio-btn--primary {
  background: linear-gradient(135deg, #ec5c8d, #d9467a);
  color: #fff;
}
.studio-btn--primary:hover { filter: brightness(1.08); }
.studio-btn--danger-ghost {
  background: transparent;
  border-color: rgba(248, 113, 113, 0.35);
  color: #fca5a5;
}
.studio-btn--danger-ghost:hover { background: rgba(239, 68, 68, 0.16); color: #fecaca; }

.studio-device-switch {
  display: inline-flex;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 7px;
  padding: 2px;
}
.studio-device-switch button {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 5px;
  cursor: pointer;
}
.studio-device-switch button.is-active {
  background: #334155;
  color: #fff;
}

.studio-status {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}
.studio-status.is-dirty {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
}

.studio-mobile-pane-btn { display: none; }

/* Main Split Workspace */
.studio-workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
}

/* Left Canvas Stage */
.studio-canvas-stage {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0.75rem;
  background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
  overflow: hidden;
}
.studio-iframe-shell {
  position: relative;
  width: 100%;
  height: 100%;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  border: 1px solid #334155;
  transition: width 0.25s ease;
}
.studio-iframe-shell.is-desktop { width: 100%; }
.studio-iframe-shell.is-tablet { width: 768px; max-width: 100%; }
.studio-iframe-shell.is-mobile { width: 375px; max-width: 100%; border-radius: 22px; border: 6px solid #1e293b; }

.studio-iframe-shell iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #fff;
}
.studio-iframe-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.85);
  color: #e2e8f0;
  font-size: 0.9rem;
  z-index: 3;
}

/* Right Side Inspector Panel */
.studio-inspector {
  display: flex;
  flex-direction: column;
  background: #0f172a;
  border-left: 1px solid #1e293b;
  min-height: 0;
  overflow: hidden;
}
.studio-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #131c31;
  border-bottom: 1px solid #1e293b;
  flex-shrink: 0;
}
.studio-tabs button {
  padding: 0.68rem 0.35rem;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.studio-tabs button:hover { color: #e2e8f0; background: rgba(255, 255, 255, 0.03); }
.studio-tabs button.is-active {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
  background: #0f172a;
}

.studio-pane {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.studio-card {
  background: #162033;
  border: 1px solid #263349;
  border-radius: 10px;
  padding: 0.75rem;
}
.studio-card--grow {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 220px;
}
.studio-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.studio-card__head code {
  color: #38bdf8;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-mono);
  font-weight: 500;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-empty {
  margin-top: 0.5rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: #0f172a;
  border: 1px dashed #334155;
  color: #94a3b8;
  font-size: 0.78rem;
  line-height: 1.45;
}

.studio-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.5rem;
}
.studio-crumb {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  border-radius: 5px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #94a3b8;
  cursor: pointer;
}
.studio-crumb:hover, .studio-crumb.is-current {
  border-color: #38bdf8;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
}

.studio-selector-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-top: 0.55rem;
}
.studio-selector-pill {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  background: #0b1120;
  border: 1px solid #334155;
  color: #f472b6;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.studio-mini-btn {
  padding: 0.22rem 0.5rem;
  border-radius: 5px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #cbd5e1;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
}
.studio-mini-btn:hover:not(:disabled) { background: #334155; color: #fff; }
.studio-mini-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.studio-mini-btn--teal { background: #0f766e; border-color: #14b8a6; color: #fff; }
.studio-mini-btn--danger { border-color: rgba(248, 113, 113, 0.35); color: #fca5a5; }

.studio-mini-grid, .studio-style-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.studio-stack { display: flex; flex-direction: column; gap: 0.65rem; }

.studio-field {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
}
.studio-hint { font-weight: 500; color: #34d399; font-size: 0.68rem; }

.studio-input, .studio-code {
  width: 100%;
  background: #0b1120;
  color: #f8fafc;
  border: 1px solid #334155;
  border-radius: 7px;
  padding: 0.42rem 0.58rem;
  font-size: 0.78rem;
  line-height: 1.4;
}
.studio-code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.5;
  resize: vertical;
  tab-size: 2;
}
.studio-card--grow .studio-code { flex: 1; min-height: 180px; }
.studio-input:focus, .studio-code:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.studio-color-row {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}
.studio-color-row input[type="color"] {
  width: 30px;
  height: 30px;
  padding: 1px;
  border: 1px solid #334155;
  border-radius: 6px;
  background: #0b1120;
  cursor: pointer;
  flex-shrink: 0;
}

.studio-patch-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.45rem;
  max-height: 165px;
  overflow-y: auto;
}
.studio-patch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  background: #0b1120;
  border: 1px solid #263349;
  font-size: 0.72rem;
}
.studio-patch-item code {
  color: #38bdf8;
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-console-log {
  margin: 0.45rem 0 0;
  padding: 0.6rem;
  border-radius: 7px;
  background: #070b14;
  border: 1px solid #1e293b;
  color: #34d399;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.45;
  max-height: 170px;
  overflow-y: auto;
  white-space: pre-wrap;
}

/* Studio Mobile / Narrow Viewports */
@media (max-width: 960px) {
  .studio-device-switch { display: none; }
  .studio-mobile-pane-btn { display: inline-flex; }
  .studio-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
  }
  .studio-workspace:not(.is-editor-pane) .studio-inspector { display: none; }
  .studio-workspace.is-editor-pane .studio-canvas-stage { display: none; }
}

/* API Testing Sandbox */
.api-headers-preview {
  background: var(--surface-2);
  padding: 0.75rem 1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  overflow-x: auto;
  margin: 0;
  line-height: 1.45;
}

.api-response-box {
  background: #110e13;
  color: #79f7a4;
  padding: 1.15rem 1.35rem;
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  min-height: 180px;
  max-height: 420px;
  overflow: auto;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}
.api-response-box pre {
  margin: 0;
  color: inherit;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.badge--warning {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--r-full);
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}
.badge--danger {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--r-full);
  background: rgba(220, 38, 38, 0.15);
  color: #dc2626;
}

/* ==========================================================================
   ADMIN CONSOLE & DASHBOARD MOBILE & ANDROID RESPONSIVENESS ENHANCEMENTS
   ========================================================================== */
.table-wrap {
  position: relative;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  max-width: 100%;
  overflow: hidden;
  box-shadow: var(--sh-1);
}

.table-scroll {
  overflow-x: scroll; /* Force explicit scroll container so Android Chrome renders scroll panel */
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  scrollbar-width: thin;
  scrollbar-color: var(--teal-600) var(--surface-2);
  padding-bottom: 6px;
}

.table-scroll::-webkit-scrollbar {
  height: 8px;
  display: block;
}
.table-scroll::-webkit-scrollbar-track {
  background: var(--surface-2);
  border-radius: 4px;
  margin: 0 4px;
}
.table-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--teal-500), var(--rose-400));
  border-radius: 4px;
  border: 1px solid var(--surface);
}

.mobile-table-hint {
  display: none;
}

@media (max-width: 768px) {
  /* Screen padding optimizations & boundary lock */
  .admin-shell, .dash-shell {
    max-width: 100vw;
    overflow-x: clip;
  }
  .admin-shell .section-tight {
    padding-inline: 0 !important;
  }
  .admin-shell .container,
  .dash-shell .container {
    padding-inline: 0.5rem !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .admin-grid {
    gap: 0.75rem !important;
  }
  .dash-main,
  .dash-main > *,
  [data-admin-view],
  [data-dash-panel],
  .dash-panel,
  .dash-main .card,
  .table-wrap {
    min-width: 0 !important;
    max-width: 100% !important;
  }
  .dash-main .card {
    padding: 0.85rem 0.65rem !important;
    border-radius: var(--r-md) !important;
    overflow: hidden;
  }

  /* Mobile table hint banner */
  .mobile-table-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.75rem;
    background: linear-gradient(90deg, rgba(13, 148, 136, 0.12), rgba(244, 63, 94, 0.08));
    border-bottom: 1px solid var(--line);
    font-size: 0.72rem;
    color: var(--teal-700);
    font-weight: 600;
  }
  html[data-theme="dark"] .mobile-table-hint {
    background: linear-gradient(90deg, rgba(20, 184, 166, 0.18), rgba(251, 113, 133, 0.12));
    color: var(--teal-300);
  }
  .mobile-table-hint .hint-arrow {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    animation: pulse-scroll-hint 1.6s ease-in-out infinite;
  }
  @keyframes pulse-scroll-hint {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
  }

  /* 1. Remove sticky first column on mobile so it doesn't block the screen */
  .table-scroll table.data th:first-child,
  .table-scroll table.data td:first-child {
    position: static !important;
    box-shadow: none !important;
  }

  /* 2. Compact table styling for mobile */
  table.data {
    font-size: 0.78rem;
    min-width: 520px;
    width: 100%;
  }
  table.data thead th {
    padding: 0.5rem 0.55rem;
    font-size: 0.66rem;
    letter-spacing: .04em;
    white-space: nowrap;
  }
  table.data tbody td {
    padding: 0.5rem 0.55rem;
    vertical-align: middle;
  }

  /* 3. Adjust widgets according to their data */
  /* ID / Reference column */
  table.data td:first-child strong.mono,
  table.data td .mono {
    font-size: 0.74rem;
    letter-spacing: -0.02em;
    white-space: nowrap;
  }

  /* Text descriptions (Service summary, reasons, notes) - clamp & limit width */
  table.data td .tiny.muted {
    max-width: 170px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
    font-size: 0.7rem;
  }

  /* Usernames & Emails - wrap gracefully */
  table.data td .tiny.muted,
  table.data td div[title*="@"] {
    word-break: break-all;
    overflow-wrap: anywhere;
  }

  /* Path / URL column in WebPages CMS */
  table.data td code.mono {
    max-width: 140px;
    display: inline-block;
    word-break: break-all;
    overflow-wrap: anywhere;
    font-size: 0.72rem;
  }

  /* Status pills & chips in table cells */
  table.data td .status,
  table.data td .chip {
    padding: 0.2rem 0.45rem;
    font-size: 0.68rem;
    gap: 3px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
  }
  table.data td .chip svg,
  table.data td .status svg {
    width: 12px;
    height: 12px;
  }

  /* Row actions buttons: stack vertically into a compact, touch-friendly column */
  .row-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.3rem !important;
    min-width: 88px;
    align-items: stretch !important;
  }
  .row-actions .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.32rem 0.45rem !important;
    font-size: 0.72rem !important;
    height: auto !important;
    min-height: 28px !important;
    white-space: nowrap !important;
  }
  .row-actions .btn-icon {
    width: 100% !important;
    border-radius: var(--r-sm) !important;
    height: 28px !important;
  }

  /* 4. Prevent horizontal blowout from code/pre/mono and long strings */
  .admin-shell code,
  .admin-shell pre,
  .dash-shell code,
  .dash-shell pre {
    word-break: break-all !important;
    overflow-wrap: anywhere !important;
    white-space: pre-wrap !important;
    max-width: 100% !important;
  }

  /* API Key action row wrapping on mobile */
  .api-key-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .api-key-row .field {
    width: 100% !important;
    min-width: 0 !important;
  }
  .api-key-row .input {
    width: 100% !important;
    font-size: 0.74rem !important;
  }
  .api-key-row .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Filter bar in Queue */
  .queue-filter-form {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .queue-filter-form .field,
  .queue-filter-form .field.admin-search {
    min-width: 0 !important;
    width: 100% !important;
  }
  .queue-filter-form .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Collapse multi-column grids in admin panels */
  .admin-shell .form-grid,
  div[data-admin-view="pages"] .grid-2,
  div[data-admin-view="api"] .grid-2,
  div[data-admin-view="whatsapp-booking"] .grid-2,
  div[data-admin-view="security"] .grid-2 {
    grid-template-columns: 1fr !important;
  }
  
  div[data-admin-view="whatsapp-booking"] .grid-3 {
    grid-template-columns: 1fr !important;
  }

  /* Modals on mobile */
  .modal__dialog {
    max-width: 95vw !important;
    margin: 1.5rem auto !important;
    padding: 1rem !important;
  }
  #rea-inspector-modal .grid-3 {
    grid-template-columns: 1fr !important;
    gap: 0.5rem;
  }
}
