/* ==========================================================================
   CONMEB — Digital Rehabilitation Platform
   Design system + application styles
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Brand — deep hospital green */
  --brand-50:  #ECF5F1;
  --brand-100: #D5E9E0;
  --brand-200: #A9D2C2;
  --brand-300: #6FB098;
  --brand-500: #0F6B50;
  --brand-600: #0A5440;
  --brand-700: #073E2E;

  /* Aliases kept so every existing rule tracks the brand automatically */
  --blue-50:  var(--brand-50);
  --blue-100: var(--brand-100);
  --blue-200: var(--brand-200);
  --blue-300: var(--brand-300);
  --blue-500: var(--brand-500);
  --blue-600: var(--brand-600);
  --blue-700: var(--brand-700);

  /* Secondary — petrol teal, distinct from the brand green */
  --teal-100: #D8EFF3;
  --teal-500: #0D6E85;
  --teal-600: #0A5568;

  --bg:        #FFFFFF;
  --bg-alt:    #F3F9F6;
  --bg-tint:   #E5F1EC;
  --surface:   #FFFFFF;
  --surface-2: #F5FAF8;
  --border:    #E1ECE7;
  --border-2:  #CEDFD8;

  --ink:    #0D1F1A;
  --ink-2:  #334A43;
  --muted:  #62796F;
  --faint:  #8EA69B;

  --primary:      var(--brand-500);
  --primary-dark: var(--brand-600);
  --on-primary:   #FFFFFF;

  --shadow-brand: 15, 107, 80;

  --green:  #17915F;
  --green-bg: #E2F4EB;
  --amber:  #9E6304;
  --amber-bg: #FBF0DC;
  --red:    #B93526;
  --red-bg: #FAE8E5;
  --violet: #5F44A8;
  --violet-bg: #ECE9F7;
  --slate:  #566C63;
  --slate-bg: #EBF1EE;

  --radius-s: 8px;
  --radius:   14px;
  --radius-l: 20px;
  --radius-xl: 28px;

  --shadow-s: 0 1px 2px rgba(9,31,25,.06), 0 1px 3px rgba(9,31,25,.05);
  --shadow:   0 4px 16px rgba(9,31,25,.07);
  --shadow-l: 0 18px 44px rgba(9,31,25,.12);

  --sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sidebar-w: 248px;
  --topbar-h: 64px;
}

[data-theme="dark"] {
  --brand-50:  #10261E;
  --brand-100: #143126;
  --brand-200: #1B4635;
  --brand-300: #2D6B52;
  --brand-500: #4FBF95;
  --brand-600: #3EA87F;
  --brand-700: #2F8C68;

  --blue-50:  var(--brand-50);
  --blue-100: var(--brand-100);
  --blue-200: var(--brand-200);
  --blue-300: var(--brand-300);
  --blue-500: var(--brand-500);
  --blue-600: var(--brand-600);
  --blue-700: var(--brand-700);

  --teal-100: #0F2E36;
  --teal-500: #45B4C6;
  --teal-600: #3396A7;

  --bg:        #071310;
  --bg-alt:    #0B1A15;
  --bg-tint:   #0E221B;
  --surface:   #10201A;
  --surface-2: #142720;
  --border:    #213A30;
  --border-2:  #2C4B3E;

  --ink:    #E7F2EC;
  --ink-2:  #C0D3C9;
  --muted:  #90A89C;
  --faint:  #6C857A;

  --primary:      var(--brand-500);
  --primary-dark: var(--brand-600);
  --on-primary:   #052016;

  --shadow-brand: 79, 191, 149;

  --green:  #5FDCA8; --green-bg:  #0F3527;
  --amber:  #F0B75E; --amber-bg:  #352814;
  --red:    #F08A7E; --red-bg:    #38201B;
  --violet: #A996EE; --violet-bg: #21203C;
  --slate:  #9CB2A7; --slate-bg:  #1A2C24;

  --shadow-s: 0 1px 2px rgba(0,0,0,.4);
  --shadow:   0 4px 18px rgba(0,0,0,.4);
  --shadow-l: 0 18px 44px rgba(0,0,0,.55);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { max-width: 100%; overflow-x: hidden; touch-action: pan-y; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}
h1,h2,h3,h4,h5 { color: var(--ink); font-weight: 700; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.35rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }
p  { margin: 0 0 1em; }
a  { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul  { margin: 0 0 1em; padding-left: 1.15em; }
li  { margin-bottom: .35em; }
hr  { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--blue-200); color: var(--ink); }

.wrap { width: min(1440px, 100% - 64px); margin-inline: auto; }
.wrap-narrow { width: min(880px, 100% - 40px); margin-inline: auto; }

.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none;
        stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-s { width: 16px; height: 16px; }
.icon-l { width: 24px; height: 24px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue-50); color: var(--primary);
  border: 1px solid var(--blue-100);
  padding: 6px 14px; border-radius: 100px;
  font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  margin-bottom: 16px;
}
.eyebrow::before { content:''; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.lead { font-size: 1.06rem; color: var(--muted); max-width: 62ch; }
.text-muted { color: var(--muted); }
.text-sm { font-size: .85rem; }
.text-xs { font-size: .78rem; }
.mono { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: .85em; letter-spacing: -.01em; }
.center { text-align: center; }
.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mt-4{margin-top:32px}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}
.hide { display: none !important; }

/* ---------- 3. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: inherit; font-size: .92rem; font-weight: 600; line-height: 1;
  padding: 12px 20px; border-radius: 100px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, background .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 6px 18px rgba(var(--shadow-brand),.26); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--primary); color: var(--primary); }
.btn-soft { background: var(--blue-50); color: var(--primary); border-color: var(--blue-100); }
.btn-soft:hover { background: var(--blue-100); }
.btn-teal { background: var(--teal-500); color: #fff; }
.btn-teal:hover { background: var(--teal-600); }
.btn-danger { background: var(--red-bg); color: var(--red); border-color: transparent; }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: .82rem; }
.btn-lg { padding: 15px 26px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-round { padding: 12px; border-radius: 50%; }
.btn-arrow .arrow-dot {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.22); margin-right: -8px;
}
.btn-ghost .arrow-dot { background: var(--blue-50); color: var(--primary); }

/* ---------- 4. Forms ---------- */
.field { margin-bottom: 16px; }
.field > label, .label {
  display: block; font-size: .82rem; font-weight: 600; color: var(--ink);
  margin-bottom: 6px; letter-spacing: .01em;
}
.label .req { color: var(--red); }
.input, .select, .textarea {
  width: 100%; font-family: inherit; font-size: .92rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: var(--radius-s); padding: 11px 13px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.textarea { min-height: 92px; resize: vertical; line-height: 1.55; }
.select { appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2362796F' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--blue-100);
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input.error, .select.error, .textarea.error { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
.field-error { color: var(--red); font-size: .78rem; margin-top: 5px; display: none; }
.field.invalid .field-error { display: block; }
.hint { color: var(--muted); font-size: .78rem; margin-top: 5px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.check {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius-s);
  background: var(--surface); margin-bottom: 8px; font-size: .9rem;
  transition: border-color .15s, background .15s;
}
.check:hover { border-color: var(--blue-300); background: var(--surface-2); }
.check input { margin: 2px 0 0; accent-color: var(--primary); width: 16px; height: 16px; flex: none; }
.check.selected { border-color: var(--primary); background: var(--blue-50); }
.check-plain { border: 0; background: none; padding: 4px 0; }
.check-plain:hover { background: none; border: 0; }
.check strong { display: block; color: var(--ink); font-weight: 600; }
.check small { color: var(--muted); }

/* ---------- 5. Cards, badges, chips ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-s);
}
.card-pad-0 { padding: 0; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.card-head h3, .card-head h4 { margin: 0; font-size: 1rem; }
.card-body { padding: 20px; }
.card-hover { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--blue-200); }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .74rem; font-weight: 700; padding: 4px 10px; border-radius: 100px;
  background: var(--slate-bg); color: var(--slate); letter-spacing: .01em; white-space: nowrap;
}
.badge::before { content:''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-no-dot::before { display: none; }
.badge-green  { background: var(--green-bg);  color: var(--green); }
.badge-amber  { background: var(--amber-bg);  color: var(--amber); }
.badge-red    { background: var(--red-bg);    color: var(--red); }
.badge-blue   { background: var(--blue-50);   color: var(--primary); }
.badge-violet { background: var(--violet-bg); color: var(--violet); }
.badge-teal   { background: var(--teal-100);  color: var(--teal-500); }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: 100px; font-size: .84rem; font-weight: 600;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--border);
  cursor: pointer; transition: all .15s ease;
}
.chip:hover { border-color: var(--blue-300); color: var(--primary); }
.chip.active { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.chip-row { display: flex; flex-wrap: wrap; gap: 9px; }

.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: .82rem;
  color: #fff; letter-spacing: .02em; text-transform: uppercase;
}
.avatar-s { width: 30px; height: 30px; font-size: .68rem; }
.avatar-l { width: 60px; height: 60px; font-size: 1.15rem; }

/* ---------- 6. Public site header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .bar { display: flex; align-items: center; gap: 24px; height: 70px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
}
.logo-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.logo-text { font-weight: 800; font-size: 1.16rem; color: var(--ink); letter-spacing: -.03em; }
.logo-text span { color: var(--primary); }
.logo-sub { display: block; font-size: .6rem; font-weight: 600; color: var(--muted); letter-spacing: .16em; text-transform: uppercase; margin-top: -3px; }
@media (max-width: 480px) {
  /* Frees up enough width to keep the hamburger and theme toggle inside the viewport on narrow phones. */
  .site-header .logo-sub { display: none; }
  .site-header .bar { gap: 12px; }
}

.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a {
  padding: 9px 15px; border-radius: 100px; font-size: .9rem; font-weight: 600;
  color: var(--ink-2); text-decoration: none; transition: all .15s ease;
}
.site-nav a:hover { background: var(--surface-2); color: var(--primary); text-decoration: none; }
.site-nav a.active { color: var(--primary); background: var(--blue-50); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--border); color: var(--ink-2);
  cursor: pointer; transition: all .15s ease; position: relative; flex: none;
}
.icon-btn:hover { background: var(--surface-2); color: var(--primary); border-color: var(--blue-300); }
/* The hamburger is the ONLY entry point to "Join as a therapist" — keep it visible at every width. */
.nav-toggle { display: grid; margin-left: 2px; }
@media (max-width: 1000px) {
  .site-nav { display: none; }
  .header-actions .btn-signin { display: none; }
}
@media (max-width: 1000px) {
  /* The bottom app-nav's FAB already offers Get Started, so drop the duplicate header button;
     the hamburger and a back button stay in the header on every page alongside it. */
  .header-actions .btn-getstarted { display: none; }
  /* Signed-in name/logout is already reachable via the hamburger menu on mobile — don't crowd the bar. */
  #headerAuthArea { display: none; }
}
.back-btn { display: none; }
@media (max-width: 1000px) {
  .back-btn { display: grid; }
}
.mobile-menu {
  position: fixed; inset: 70px 0 0; z-index: 55; background: var(--bg);
  padding: 20px; overflow-y: auto; display: none; animation: slideDown .22s ease;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 4px; font-size: 1.05rem; font-weight: 600; color: var(--ink);
  border-bottom: 1px solid var(--border); text-decoration: none;
}
.mobile-menu .btn { margin-top: 18px; }
.mobile-menu .menu-join { color: var(--primary); }
.mobile-menu .menu-join span { display: flex; align-items: center; gap: 10px; }
#menuAuthArea a, #menuAuthArea button.btn { }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- 7. Hero ---------- */
/* Soft mint banner — fixed colours by design, independent of the light/dark theme toggle. */
.hero {
  background: linear-gradient(165deg, #DDF0E6 0%, #EAF6F0 55%, #FFFFFF 100%);
  border-radius: var(--radius-xl); margin-top: 22px; padding: 60px 48px 0;
  position: relative; overflow: hidden;
}
.hero::after {
  content:''; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(15,107,80,.14), transparent 68%);
  top: -140px; right: -110px; pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.02fr 1fr; gap: 40px; align-items: center; position: relative; z-index: 1; }
.hero-grid-tight { grid-template-columns: 1.1fr 1fr; }
.hero h1 { color: #0D1F1A; font-weight: 800; margin-bottom: 18px; }
.hero h1 em { font-style: normal; color: #0F6B50; }
.hero .lead { color: #62796F; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 30px; }
.hero .search-box input { background: #fff; border-color: transparent; color: #0D1F1A; box-shadow: 0 8px 20px rgba(15,107,80,.1); }
.hero .search-box .icon { color: #0F6B50; }
.hero-trust { display: flex; align-items: center; gap: 14px; padding-bottom: 54px; }
.hero-trust b { color: #0D1F1A; }
.hero-trust .text-muted, .hero-trust .text-sm { color: #62796F; }
.stack-avatars { display: flex; }
.stack-avatars .avatar { margin-right: -10px; border: 2px solid #fff; }
@media (max-width: 940px) {
  .hero { padding: 40px 22px 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-trust { padding-bottom: 34px; }
}

/* Hero photograph — a real, happy person, not a fabricated dashboard mock */
.hero-photo {
  border-radius: var(--radius-l); overflow: hidden; box-shadow: 0 16px 34px rgba(15,107,80,.16);
  aspect-ratio: 4 / 3.2; background: #ECF5F1;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-photo.img-broken { background: linear-gradient(140deg, #D5E9E0, #D8EFF3); }
.hero-photo.img-broken img { display: none; }

/* ---------- 8. Sections ---------- */
.section { padding: 78px 0; }
.section-tint { background: var(--bg-alt); }
.section-head { max-width: 660px; margin-bottom: 40px; }
.section-head.center { margin-inline: auto; }
.section-head h2 { margin-bottom: 12px; }
.split-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.split-head > div { max-width: 620px; }
.split-head h2 { margin-bottom: 8px; }
@media (max-width: 640px) {
  .split-head > div[style*="text-align:right"] { text-align: left !important; }
}

.stat-band { display: grid; grid-template-columns: 1.15fr repeat(3, .7fr); gap: 30px; align-items: center; }
.stat b { display: block; font-size: clamp(2rem, 4vw, 2.9rem); color: var(--ink); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.stat span { font-size: .85rem; color: var(--muted); font-weight: 600; }
@media (max-width: 860px) { .stat-band { grid-template-columns: 1fr 1fr; gap: 24px; } }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 18px; }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; transition: all .2s ease; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--blue-200); }
.feature-card h3 { font-size: 1.02rem; margin-bottom: 7px; }
.feature-card p { font-size: .88rem; color: var(--muted); margin: 0; }

.team-card { text-align: center; }
.team-card-photo {
  width: 92px; height: 92px; border-radius: 50%; overflow: hidden; margin: 0 auto 16px;
  background: var(--bg-tint); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border);
}
.team-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.team-card-role { display: block; font-size: .78rem; font-weight: 700; color: var(--primary); margin-bottom: 10px; }
.f-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--blue-50); color: var(--primary); margin-bottom: 16px;
}
.f-icon.teal { background: var(--teal-100); color: var(--teal-500); }

.flow-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; counter-reset: step; }
.flow-step { position: relative; padding: 22px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.flow-step .num { font-size: .8rem; font-weight: 800; color: var(--primary); letter-spacing: .06em; display: block; margin-bottom: 10px; }
.flow-step h4 { margin-bottom: 5px; font-size: .98rem; }
.flow-step p { font-size: .83rem; color: var(--muted); margin: 0; }
.flow-step::after {
  content:''; position: absolute; right: -11px; top: 50%; width: 8px; height: 8px;
  border-top: 2px solid var(--border-2); border-right: 2px solid var(--border-2);
  transform: translateY(-50%) rotate(45deg); z-index: 2;
}
.flow-step:last-child::after { display: none; }
@media (max-width: 700px) { .flow-step::after { display: none; } }

/* Patient testimonials */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; }
.testimonial-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); padding: 26px; display: flex; flex-direction: column; }
.testimonial-card .rating-stars { margin-bottom: 12px; }
.testimonial-card .quote { color: var(--ink); font-size: .96rem; line-height: 1.6; margin: 0 0 20px; flex: 1; }
.testimonial-person { display: flex; align-items: center; gap: 12px; }
.testimonial-person img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.testimonial-person b { display: block; color: var(--ink); font-size: .88rem; }
.testimonial-person span { font-size: .78rem; color: var(--muted); }

.media-split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.media-split.reverse .media-split-text { order: 2; }
@media (max-width: 900px) { .media-split { grid-template-columns: 1fr; gap: 28px; } .media-split.reverse .media-split-text { order: 0; } }
.photo { border-radius: var(--radius-l); overflow: hidden; background: var(--bg-tint); aspect-ratio: 4/3; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.img-broken { background: linear-gradient(140deg, var(--blue-100), var(--teal-100)); }
.photo.img-broken img { display: none; }
.tick-list { list-style: none; padding: 0; margin: 20px 0 0; }
.tick-list li { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; font-size: .93rem; color: var(--ink-2); }
.tick-list .icon { color: var(--primary); margin-top: 2px; }

.resource-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.res-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all .2s ease; display: block; color: inherit; text-decoration: none; }
.res-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); text-decoration: none; border-color: var(--blue-200); }
.res-art { height: 130px; display: grid; place-items: center; color: #fff; }
.res-card .p { padding: 18px; }
.res-card h4 { margin-bottom: 5px; }
.res-card p { font-size: .84rem; color: var(--muted); margin: 0; }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; }
.blog-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); overflow: hidden; transition: all .2s ease; display: block; color: inherit; text-decoration: none; }
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-l); border-color: var(--blue-200); text-decoration: none; }
.blog-cover { height: 170px; background: var(--bg-tint); overflow: hidden; }
.blog-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-cover.no-img { display: grid; place-items: center; color: var(--faint); }
.blog-card .p { padding: 20px; }
.blog-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.blog-card p.excerpt { font-size: .87rem; color: var(--muted); margin: 0 0 12px; }
.blog-card .blog-date { font-size: .76rem; color: var(--faint); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

.blog-article { max-width: 740px; margin: 0 auto; }
.blog-article .blog-cover { height: 320px; border-radius: var(--radius-l); margin-bottom: 28px; }
.blog-article h1 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); margin-bottom: 10px; }
.blog-article .blog-meta { color: var(--muted); font-size: .88rem; margin-bottom: 28px; }
.blog-article .blog-body { font-size: 1.02rem; line-height: 1.75; color: var(--ink-2); white-space: pre-line; }
.blog-article .blog-body p { margin: 0 0 1.2em; }
@media (max-width: 640px) { .blog-article .blog-cover { height: 200px; } }

.cta-band {
  background: linear-gradient(135deg, var(--teal-500), var(--blue-600));
  border-radius: var(--radius-xl); padding: 52px 48px; color: #fff;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center;
}
.cta-band h2, .cta-band h3 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.86); margin-bottom: 0; }
/* "White" buttons for use on any coloured/gradient surface, not just .cta-band */
.btn-white { background: #fff; color: var(--blue-700); }
.btn-white:hover { background: var(--blue-50); }
.btn-outline-white { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.4); }
.btn-outline-white:hover { background: rgba(255,255,255,.22); }
@media (max-width: 860px) { .cta-band { grid-template-columns: 1fr; padding: 36px 24px; } }

/* ---------- 9. Footer ---------- */
.site-footer { background: #08211A; color: #A6BEB3; padding: 62px 0 26px; margin-top: 70px; }
[data-theme="dark"] .site-footer { background: #04120D; border-top: 1px solid var(--border); }
.site-footer h4 { color: #fff; font-size: .86rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 18px; }
.site-footer a { color: #A6BEB3; font-size: .9rem; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.1); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; }
.site-footer .logo-text { color: #fff; }
.site-footer .logo-sub { color: #7C90A6; }
.social-row { display: flex; gap: 9px; margin-top: 18px; }
.social-row a { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); color: #fff; }
.social-row a:hover { background: var(--blue-500); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; font-size: .82rem; }

/* ---------- 10. Auth pages ---------- */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side {
  position: relative; color: #fff; padding: 48px; display: flex; flex-direction: column;
  background: linear-gradient(160deg, var(--blue-700), var(--teal-600));
}
.auth-side-photo { position: absolute; inset: 0; z-index: 0; }
.auth-side-photo img { width: 100%; height: 100%; object-fit: cover; }
.auth-side-photo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(160deg, color-mix(in srgb, var(--blue-700) 92%, transparent), color-mix(in srgb, var(--teal-600) 88%, transparent));
}
.auth-side > *:not(.auth-side-photo) { position: relative; z-index: 1; }
.auth-side h2 { color: #fff; font-size: 1.9rem; }
.auth-side p { color: rgba(255,255,255,.84); }
.auth-side .tick-list li { color: rgba(255,255,255,.92); }
.auth-side .tick-list .icon { color: #fff; }
.auth-main { padding: 42px; display: flex; flex-direction: column; justify-content: center; align-items: center; background: var(--bg); }
.auth-card { width: min(460px, 100%); }
@media (max-width: 940px) { .auth-page { grid-template-columns: 1fr; } .auth-side { display: none; } .auth-main { padding: 26px 18px; } }
.divider-or { display: flex; align-items: center; gap: 14px; color: var(--faint); font-size: .78rem; margin: 22px 0; }
.divider-or::before, .divider-or::after { content:''; flex: 1; height: 1px; background: var(--border); }
.social-btn { width: 100%; justify-content: center; background: var(--surface); border: 1px solid var(--border-2); color: var(--ink); }
.social-btn:hover { background: var(--surface-2); border-color: var(--blue-300); }

/* Stepper */
.stepper { display: flex; gap: 6px; margin-bottom: 28px; }
.stepper .s { flex: 1; }
.stepper .s .bar { height: 4px; border-radius: 100px; background: var(--border); margin-bottom: 8px; transition: background .25s ease; }
.stepper .s.done .bar, .stepper .s.on .bar { background: var(--primary); }
.stepper .s .t { font-size: .72rem; font-weight: 700; color: var(--faint); letter-spacing: .02em; }
.stepper .s.on .t, .stepper .s.done .t { color: var(--primary); }

/* ---------- 11. App shell ---------- */
.app-body { background: var(--bg-alt); }
.app-shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar-logo { padding: 18px 20px; border-bottom: 1px solid var(--border); }
.side-nav { padding: 14px 12px; overflow-y: auto; flex: 1; }
.side-label { font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 14px 12px 7px; }
.side-link {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px;
  color: var(--ink-2); font-size: .9rem; font-weight: 600; text-decoration: none;
  margin-bottom: 2px; transition: all .14s ease; cursor: pointer; border: 0; background: none;
  width: 100%; font-family: inherit; text-align: left;
}
.side-link:hover { background: var(--surface-2); color: var(--primary); text-decoration: none; }
.side-link.active { background: var(--blue-50); color: var(--primary); }
.side-link .icon { width: 18px; height: 18px; }
.side-link .count { margin-left: auto; font-size: .72rem; font-weight: 700; background: var(--surface-2); color: var(--muted); padding: 2px 8px; border-radius: 100px; }
.side-link.active .count { background: var(--blue-100); color: var(--primary); }
.sidebar-foot { padding: 12px; border-top: 1px solid var(--border); }
.user-pill { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; background: var(--surface-2); }
.user-pill .t { min-width: 0; flex: 1; }
.user-pill b { display: block; font-size: .82rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-pill small { font-size: .7rem; color: var(--muted); }

.app-main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); background: color-mix(in srgb, var(--bg-alt) 90%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; padding: 0 24px;
  position: sticky; top: 0; z-index: 40;
}
.search-box { position: relative; flex: 1; max-width: 440px; }
.search-box .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 17px; height: 17px; }
.search-box input { width: 100%; padding: 10px 14px 10px 40px; border-radius: 100px; border: 1px solid var(--border); background: var(--surface); font-family: inherit; font-size: .88rem; color: var(--ink); }
.search-box input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--blue-100); }
/* iOS/Android auto-zoom on input focus triggers below 16px — keep every field at 16px on small screens. */
@media (max-width: 640px) {
  .input, .select, .textarea, .search-box input { font-size: 16px; }
}
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-l);
  max-height: 400px; overflow-y: auto; z-index: 50; display: none; padding: 8px;
}
.search-results.open { display: block; }
.sr-group { font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); padding: 10px 10px 5px; }
.sr-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; cursor: pointer; color: var(--ink-2); text-decoration: none; }
.sr-item:hover { background: var(--surface-2); text-decoration: none; }
.sr-item b { color: var(--ink); font-size: .88rem; display: block; }
.sr-item small { color: var(--muted); font-size: .74rem; }
.topbar-actions { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.dot-badge { position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); border: 2px solid var(--bg-alt); }

.app-content { padding: 26px 24px 120px; flex: 1; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 1.62rem; margin-bottom: 4px; }
.page-head p { margin: 0; color: var(--muted); font-size: .92rem; }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; }

.menu-panel {
  position: fixed; top: 66px; right: 18px; width: min(360px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-l); z-index: 70; overflow: hidden; display: none;
}
.menu-panel.open { display: block; animation: slideDown .18s ease; }
.menu-panel .card-head { padding: 14px 16px; }
.notif { display: flex; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--border); cursor: pointer; }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: var(--blue-50); }
[data-theme="dark"] .notif.unread { background: var(--surface-2); }
.notif b { display: block; font-size: .86rem; color: var(--ink); }
.notif small { color: var(--muted); font-size: .76rem; }
.notif-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; }

/* Mobile app nav */
.mobile-topbar { display: none; }
.bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  grid-template-columns: repeat(5, 1fr); align-items: center;
}
.bn-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 2px; border: 0; background: none; font-family: inherit;
  font-size: .66rem; font-weight: 700; color: var(--muted); cursor: pointer; text-decoration: none;
}
.bn-item.active { color: var(--primary); }
.bn-item .icon { width: 21px; height: 21px; }
.bn-fab {
  width: 50px; height: 50px; border-radius: 50%; background: var(--primary); color: var(--on-primary);
  display: grid; place-items: center; border: 0; cursor: pointer; margin: -18px auto 0;
  box-shadow: 0 8px 20px rgba(var(--shadow-brand),.4);
}
.bn-fab .icon { width: 25px; height: 25px; stroke-width: 2.4; }
.fab-desktop {
  position: fixed; right: 26px; bottom: 26px; z-index: 55;
  width: 54px; height: 54px; border-radius: 50%; background: var(--primary); color: var(--on-primary);
  border: 0; display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 26px rgba(var(--shadow-brand),.4);
  transition: transform .18s ease;
}
.fab-desktop:hover { transform: scale(1.07); }
.fab-desktop .icon { width: 26px; height: 26px; stroke-width: 2.4; }

/* ---------- Public site floating widgets: back-to-top + talk-to-us ---------- */
.back-to-top {
  position: fixed; right: 24px; bottom: 92px; z-index: 58;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--surface); color: var(--ink-2); border: 1px solid var(--border-2);
  display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s, background .15s ease, color .15s ease;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); transition: opacity .2s ease, transform .2s ease; }
.back-to-top:hover { background: var(--surface-2); color: var(--primary); border-color: var(--blue-300); }
.back-to-top .icon { width: 19px; height: 19px; stroke-width: 2.2; }

.contact-bubble {
  position: fixed; right: 24px; bottom: 24px; z-index: 58;
  display: flex; align-items: center; gap: 9px;
  background: var(--primary); color: var(--on-primary); border: 0; cursor: pointer;
  padding: 13px 20px 13px 14px; border-radius: 100px; font-family: inherit; font-weight: 700; font-size: .88rem;
  box-shadow: 0 10px 26px rgba(var(--shadow-brand),.4);
  transition: transform .18s ease, background .15s ease;
}
.contact-bubble:hover { transform: scale(1.05); background: var(--primary-dark); }
.contact-bubble .icon { width: 21px; height: 21px; stroke-width: 2.1; }
.contact-bubble .dot-badge { top: -2px; right: -2px; }

.contact-pop {
  position: fixed; right: 24px; bottom: 84px; z-index: 59; width: 270px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l);
  box-shadow: var(--shadow-l); overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(10px) scale(.97); transform-origin: bottom right;
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.contact-pop.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); transition: opacity .18s ease, transform .18s ease; }
.contact-pop-head {
  background: linear-gradient(135deg, var(--teal-500), var(--primary)); color: #fff;
  padding: 16px 18px;
}
.contact-pop-head b { display: block; font-size: .96rem; }
.contact-pop-head span { font-size: .78rem; color: rgba(255,255,255,.85); }
.contact-pop a {
  display: flex; align-items: center; gap: 11px; padding: 12px 18px;
  color: var(--ink-2); text-decoration: none; font-size: .87rem; border-bottom: 1px solid var(--border);
}
.contact-pop a:last-child { border-bottom: 0; }
.contact-pop a:hover { background: var(--surface-2); text-decoration: none; }
.contact-pop a .icon { width: 18px; height: 18px; color: var(--primary); flex: none; }
.contact-pop a b { color: var(--ink); font-weight: 600; display: block; }
.contact-pop a small { color: var(--muted); display: block; }

@media (max-width: 1000px) {
  body.has-site-bottom-nav .back-to-top { bottom: 158px; }
  body.has-site-bottom-nav .contact-bubble { bottom: 90px; }
  body.has-site-bottom-nav .contact-pop { bottom: 150px; }
}
@media (max-width: 460px) {
  .contact-bubble span.cb-label { display: none; }
  .contact-bubble { padding: 14px; }
  .contact-pop { width: calc(100vw - 32px); right: 16px; }
}

@media (max-width: 1000px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { display: none; }
  .mobile-topbar {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px;
    background: var(--surface); border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 40;
  }
  .bottom-nav { display: grid; }
  .fab-desktop { display: none; }
  .app-content { padding: 18px 14px 110px; }
  .menu-panel { top: auto; bottom: 76px; right: 12px; left: 12px; width: auto; }
}

/* Mobile app-style bottom nav for the PUBLIC marketing site */
.site-bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  grid-template-columns: repeat(5, 1fr); align-items: center;
  box-shadow: 0 -6px 18px rgba(9,31,25,.05);
}
@media (max-width: 1000px) {
  .site-bottom-nav { display: grid; }
  body.has-site-bottom-nav { padding-bottom: 74px; }
  body.has-site-bottom-nav .site-footer { padding-bottom: 90px; }
  body.has-site-bottom-nav .mobile-menu { inset: 70px 0 68px; }
}

/* ---------- 12. App components ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 17px 18px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.kpi-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--blue-50); color: var(--primary); }
.kpi b { display: block; font-size: 1.8rem; font-weight: 800; color: var(--ink); line-height: 1.05; letter-spacing: -.03em; }
.kpi span { font-size: .82rem; color: var(--muted); font-weight: 600; }
.kpi .delta { font-size: .74rem; font-weight: 700; }
.delta.up { color: var(--green); } .delta.down { color: var(--red); }

@media (max-width: 700px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 13px 14px; }
  .kpi b { font-size: 1.45rem; }
  .kpi .delta, .kpi-top .text-xs { display: none; }
  .page-head h1 { font-size: 1.35rem; }
  .page-actions .btn { flex: 1; }
}
.cols { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; align-items: start; }
.cols-even { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 1050px) { .cols, .cols-even { grid-template-columns: 1fr; } }

.list-row {
  display: flex; align-items: center; gap: 13px; padding: 13px 20px;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: background .14s ease;
  text-decoration: none; color: inherit;
}
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--surface-2); text-decoration: none; }
.list-row .t { flex: 1; min-width: 0; }
.list-row b { display: block; font-size: .92rem; color: var(--ink); font-weight: 600; }
.list-row small { color: var(--muted); font-size: .8rem; }
.list-row .meta { text-align: right; font-size: .78rem; color: var(--muted); flex: none; }

.table-wrap { overflow-x: auto; touch-action: pan-x pan-y; }
table.data { width: 100%; border-collapse: collapse; font-size: .89rem; min-width: 620px; }
table.data th {
  text-align: left; font-size: .7rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  color: var(--faint); padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.data td { padding: 13px 16px; border-bottom: 1px solid var(--border); color: var(--ink-2); vertical-align: middle; }
table.data tbody tr { cursor: pointer; transition: background .14s ease; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td b { color: var(--ink); font-weight: 600; }

.client-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 14px; }

/* Client workspace header */
.ws-head { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.ws-top { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.ws-id { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: .85rem; margin-top: 4px; }
.ws-tabs { display: flex; gap: 4px; overflow-x: auto; touch-action: pan-x pan-y; border-bottom: 1px solid var(--border); margin: 18px -20px -20px; padding: 0 20px; scrollbar-width: none; }
.ws-tabs::-webkit-scrollbar { display: none; }
.ws-tab {
  padding: 12px 14px; font-size: .88rem; font-weight: 600; color: var(--muted);
  border: 0; background: none; cursor: pointer; white-space: nowrap; font-family: inherit;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.ws-tab:hover { color: var(--primary); }
.ws-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.mini-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.mini-head h3 { font-size: .95rem; margin: 0; }
.dl { display: grid; grid-template-columns: 150px 1fr; gap: 9px 18px; font-size: .89rem; }
.dl dt { color: var(--muted); font-weight: 600; }
.dl dd { margin: 0; color: var(--ink); }
@media (max-width: 620px) { .dl { grid-template-columns: 1fr; gap: 2px 0; } .dl dd { margin-bottom: 10px; } }

/* Timeline */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content:''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 20px; }
.tl-item::before {
  content:''; position: absolute; left: -24px; top: 4px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--primary);
}
.tl-item.teal::before { border-color: var(--teal-500); }
.tl-item.green::before { border-color: var(--green); }
.tl-item .d { font-size: .76rem; color: var(--muted); font-weight: 700; letter-spacing: .02em; }
.tl-item b { display: block; color: var(--ink); font-size: .92rem; margin: 2px 0 3px; }
.tl-item p { font-size: .85rem; color: var(--muted); margin: 0; }

/* Progress bars */
.bar-track { height: 8px; border-radius: 100px; background: var(--surface-2); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 100px; background: var(--primary); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.bar-fill.green { background: var(--green); }
.bar-fill.amber { background: var(--amber); }
.bar-fill.teal  { background: var(--teal-500); }
.goal-row { padding: 14px 0; border-bottom: 1px solid var(--border); }
.goal-row:last-child { border-bottom: 0; }

/* Assessment runner */
.q-card { max-width: 720px; }
.q-num { font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); }
.q-text { font-size: 1.22rem; font-weight: 700; color: var(--ink); margin: 8px 0 20px; line-height: 1.35; }
.opt {
  display: flex; align-items: center; gap: 13px; padding: 14px 16px; border-radius: var(--radius-s);
  border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; margin-bottom: 9px;
  transition: all .14s ease; font-size: .94rem;
  width: 100%; text-align: left; font-family: inherit; color: var(--ink);
}
.opt:hover { border-color: var(--blue-300); background: var(--surface-2); }
.opt.selected { border-color: var(--primary); background: var(--blue-50); }
.opt .radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-2); flex: none; display: grid; place-items: center; }
.opt.selected .radio { border-color: var(--primary); }
.opt.selected .radio::after { content:''; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.opt .txt { flex: 1; color: var(--ink); }
.opt .pts { font-size: .76rem; font-weight: 700; color: var(--muted); background: var(--surface-2); padding: 3px 9px; border-radius: 100px; }
.opt.selected .pts { background: var(--blue-100); color: var(--primary); }

.score-ring { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.ring { position: relative; width: 128px; height: 128px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .val { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .val b { font-size: 1.9rem; font-weight: 800; color: var(--ink); line-height: 1; letter-spacing: -.03em; }
.ring .val small { font-size: .72rem; color: var(--muted); font-weight: 600; }

/* Empty / loading / error states */
.empty { text-align: center; padding: 52px 22px; }
.empty .e-icon { width: 62px; height: 62px; border-radius: 18px; background: var(--blue-50); color: var(--primary); display: grid; place-items: center; margin: 0 auto 18px; }
.empty h3 { font-size: 1.06rem; margin-bottom: 7px; }
.empty p { color: var(--muted); font-size: .9rem; max-width: 380px; margin: 0 auto 20px; }
.state-error .e-icon { background: var(--red-bg); color: var(--red); }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.sk-line { height: 12px; margin-bottom: 10px; }
.spinner { width: 20px; height: 20px; border: 2.5px solid var(--blue-100); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 60px 20px; color: var(--muted); font-size: .88rem; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(5,22,17,.58); backdrop-filter: blur(3px);
  z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-backdrop.open { display: flex; animation: fadeIn .16s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface); border-radius: var(--radius-l); width: min(620px, 100%);
  max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow-l);
  animation: popIn .2s cubic-bezier(.2,.9,.3,1.1);
}
.modal-wide { width: min(900px, 100%); }
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.modal-head h3 { margin: 0; font-size: 1.08rem; }
.modal-body { padding: 22px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 22px; border-top: 1px solid var(--border); position: sticky; bottom: 0; background: var(--surface); }
@media (max-width: 620px) { .modal-foot { flex-direction: column-reverse; } .modal-foot .btn { width: 100%; } }

/* Quick actions sheet */
.qa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qa-item {
  display: flex; align-items: center; gap: 12px; padding: 15px; border-radius: var(--radius-s);
  border: 1px solid var(--border); background: var(--surface); cursor: pointer; text-align: left;
  font-family: inherit; font-size: .92rem; font-weight: 600; color: var(--ink); transition: all .15s ease;
}
.qa-item:hover { border-color: var(--primary); background: var(--blue-50); }
.qa-item .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--blue-50); color: var(--primary); display: grid; place-items: center; flex: none; }
.qa-item:hover .ic { background: var(--primary); color: var(--on-primary); }
@media (max-width: 520px) { .qa-grid { grid-template-columns: 1fr; } }

/* Toast */
.toast-stack { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 1000px) { .toast-stack { bottom: 88px; left: 14px; right: 14px; } }
.toast {
  display: flex; align-items: flex-start; gap: 11px; background: var(--surface);
  border: 1px solid var(--border); border-left: 3px solid var(--primary);
  border-radius: var(--radius-s); padding: 13px 16px; box-shadow: var(--shadow-l);
  min-width: 270px; max-width: 380px; animation: toastIn .25s cubic-bezier(.2,.9,.3,1.1);
}
@keyframes toastIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.toast.out { animation: toastOut .2s ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateX(16px); } }
.toast b { display: block; font-size: .88rem; color: var(--ink); }
.toast small { font-size: .8rem; color: var(--muted); }
.toast.success { border-left-color: var(--green); } .toast.success .icon { color: var(--green); }
.toast.error   { border-left-color: var(--red); }   .toast.error .icon { color: var(--red); }
.toast.info .icon { color: var(--primary); }
.toast.warn { border-left-color: var(--amber); } .toast.warn .icon { color: var(--amber); }

/* Offline banner */
.offline-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 150; background: var(--amber);
  color: #2A1D06; font-size: .85rem; font-weight: 600; text-align: center; padding: 9px 16px;
  display: none;
}
.offline-banner.show { display: block; }

/* Prototype ribbon */
.proto-note {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: var(--radius-s);
  background: var(--amber-bg); color: var(--amber); font-size: .82rem; font-weight: 600;
  border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent); margin-bottom: 18px;
}
.proto-note .icon { flex: none; }

/* Report document */
.report-doc {
  background: #fff; color: #0F211B; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 44px; font-size: .9rem; line-height: 1.65; max-width: 820px; margin-inline: auto;
}
[data-theme="dark"] .report-doc { background: #F4FAF7; }
.report-doc h1, .report-doc h2, .report-doc h3, .report-doc h4, .report-doc b, .report-doc strong, .report-doc dt, .report-doc td, .report-doc th { color: #0D1F1A; }
.report-doc .r-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #0F6B50; padding-bottom: 18px; margin-bottom: 26px; }
.report-doc h2 { font-size: 1.4rem; margin: 0 0 4px; }
.report-doc h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: #0F6B50; margin: 28px 0 10px; padding-bottom: 6px; border-bottom: 1px solid #E1ECE7; }
.report-doc table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.report-doc table td, .report-doc table th { padding: 8px 10px; border-bottom: 1px solid #E1ECE7; text-align: left; }
.report-doc .r-sign { margin-top: 40px; padding-top: 18px; border-top: 1px solid #E1ECE7; font-size: .84rem; color: #5F736B; }
@media (max-width: 640px) { .report-doc { padding: 24px 18px; } }

@media print {
  body * { visibility: hidden; }
  .report-doc, .report-doc * { visibility: visible; }
  .report-doc { position: absolute; inset: 0; border: 0; border-radius: 0; padding: 0; max-width: none; }
  .no-print { display: none !important; }
}

/* Charts */
.chart-svg { width: 100%; height: auto; overflow: visible; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .78rem; color: var(--muted); margin-top: 12px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; }

/* Device catalogue */
.device-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.device-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l);
  overflow: hidden; transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column; height: 100%;
}
.device-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-l); }

/* Media area — the product must read clearly, so it gets real height and a real background */
.device-art, .device-media {
  position: relative; height: 210px; flex: none; overflow: hidden;
  background: linear-gradient(155deg, var(--brand-600), var(--teal-600));
  display: grid; place-items: center;
}
.device-art .icon, .device-media .icon { width: 78px; height: 78px; stroke-width: 1.1; color: rgba(255,255,255,.94); }
.device-art-photo img, .device-media.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.device-art-photo.img-broken, .device-media.img-broken { background: linear-gradient(155deg, var(--brand-600), var(--teal-600)); }
.device-art-photo.img-broken img, .device-media.img-broken img { display: none; }

.device-fav {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(8,20,16,.32); border: 1px solid rgba(255,255,255,.5);
  display: grid; place-items: center; color: #fff; cursor: pointer; z-index: 2;
  transition: background .15s ease, transform .15s ease;
}
.device-fav:hover { background: rgba(8,20,16,.5); transform: scale(1.06); }
.device-fav.saved { background: #fff; border-color: #fff; color: var(--red); }
.device-fav .icon { width: 17px; height: 17px; stroke-width: 2; }
.device-fav.saved .icon { fill: currentColor; }

.device-body { padding: 18px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.device-body h4 { font-size: 1.02rem; margin-bottom: 10px; color: var(--ink); line-height: 1.3; }
.device-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 11px; }
.device-tag {
  font-size: .68rem; font-weight: 700; letter-spacing: .02em; padding: 4px 10px;
  border-radius: 100px; border: 1px solid var(--border-2); color: var(--muted); white-space: nowrap;
}
.device-desc {
  font-size: .83rem; color: var(--muted); line-height: 1.55; margin: 0 0 16px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.device-footer {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 10px;
  padding-top: 14px; border-top: 1px solid var(--border);
}
.device-price-label { display: block; font-size: .64rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); margin-bottom: 3px; }
.device-price { font-weight: 800; color: var(--ink); font-size: 1.18rem; letter-spacing: -.01em; }
.device-footer .btn { flex: none; }

/* ---------- Doctor / therapist directory + profile ---------- */
.doctor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.doctor-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l);
  padding: 22px 20px; text-align: center; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.doctor-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-l); border-color: var(--blue-300); }
.doctor-card-photo {
  width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 14px; overflow: hidden;
  border: 3px solid var(--bg-tint); background: var(--surface-2); display: grid; place-items: center;
}
.doctor-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.doctor-card-photo .icon { width: 40px; height: 40px; color: var(--muted); }
.doctor-card h4 { font-size: 1.02rem; margin-bottom: 3px; color: var(--ink); }
.doctor-card .headline { font-size: .82rem; color: var(--primary); font-weight: 600; margin-bottom: 10px; min-height: 1.2em; }
.rating-stars { display: inline-flex; gap: 2px; align-items: center; }
.rating-stars .icon { width: 14px; height: 14px; stroke-width: 0; }
.rating-stars .star-full { fill: #f5a623; color: #f5a623; }
.rating-stars .star-empty { fill: var(--border-2); color: var(--border-2); }
.doctor-card .rating-row { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: .78rem; color: var(--muted); margin-bottom: 12px; }
.doctor-card .tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 14px; min-height: 24px; }

.doctor-hero {
  display: flex; gap: 22px; align-items: center; flex-wrap: wrap;
  background: linear-gradient(155deg, var(--brand-600), var(--teal-600));
  border-radius: var(--radius-xl); padding: 32px; color: #fff; margin-bottom: 26px;
}
.doctor-hero-photo {
  width: 108px; height: 108px; border-radius: 50%; overflow: hidden; flex: none;
  border: 3px solid rgba(255,255,255,.5); background: rgba(255,255,255,.15);
}
.doctor-hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.doctor-hero h1 { color: #fff; font-size: 1.7rem; margin-bottom: 4px; }
.doctor-hero .headline { color: rgba(255,255,255,.88); font-weight: 600; margin-bottom: 10px; }
.doctor-hero .rating-row { justify-content: flex-start; color: rgba(255,255,255,.85); }
.doctor-hero .meta-row { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; font-size: .84rem; color: rgba(255,255,255,.9); }
.doctor-hero .meta-row span { display: flex; align-items: center; gap: 6px; }
.doctor-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.doctor-tabs button {
  padding: 12px 6px; margin-right: 18px; font-weight: 700; font-size: .9rem; color: var(--muted);
  background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; margin-bottom: -1px;
}
.doctor-tabs button.active { color: var(--primary); border-color: var(--primary); }
.review-card { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-s); margin-bottom: 12px; }
.review-card .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.avail-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
.avail-row:last-child { border-bottom: none; }

/* ---------- App-style account screens (wallet-card + list-row language) ---------- */
.account-hero {
  background: linear-gradient(150deg, #052A1F 0%, #0A5440 100%);
  border-radius: var(--radius-xl); padding: 26px 24px; color: #fff; margin-bottom: 18px;
  box-shadow: 0 16px 32px rgba(5,42,31,.22);
}
.account-hero-top { display: flex; align-items: center; gap: 14px; }
.account-hero-top .avatar { width: 52px; height: 52px; font-size: 1.05rem; border: 2px solid rgba(255,255,255,.4); flex: none; }
.account-hero-label { display: block; font-size: .74rem; color: rgba(255,255,255,.7); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin-bottom: 2px; }
.account-hero-top h2 { color: #fff; margin: 0; font-size: 1.3rem; }
.account-stats-row { display: flex; margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.18); }
.account-stats-row > div { flex: 1; text-align: center; border-right: 1px solid rgba(255,255,255,.18); }
.account-stats-row > div:last-child { border-right: none; }
.account-stats-row b { display: block; font-size: 1.3rem; font-weight: 800; }
.account-stats-row span { font-size: .72rem; color: rgba(255,255,255,.72); }

.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 22px; }
.qa-item { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; background: none; border: none; cursor: pointer; font-family: inherit; }
.qa-item:hover { text-decoration: none; }
.qa-icon {
  width: 52px; height: 52px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--primary); transition: transform .15s ease, box-shadow .15s ease;
}
.qa-item:hover .qa-icon { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--blue-300); }
.qa-item span:last-child { font-size: .72rem; font-weight: 600; color: var(--ink-2); }

.section-row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-row-head h3 { margin: 0; font-size: 1.02rem; }
.tx-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); overflow: hidden; }
.tx-row { display: flex; align-items: center; gap: 13px; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.tx-row:last-child { border-bottom: none; }
.tx-icon {
  width: 42px; height: 42px; border-radius: 50%; flex: none; overflow: hidden;
  background: var(--blue-50); color: var(--primary); display: grid; place-items: center;
}
.tx-icon img { width: 100%; height: 100%; object-fit: cover; }
.tx-info { flex: 1; min-width: 0; }
.tx-info b { display: block; color: var(--ink); font-size: .9rem; }
.tx-info span { display: block; font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-trailing { text-align: right; flex: none; }
.tx-trailing small { display: block; font-size: .72rem; color: var(--faint); margin-top: 4px; }

/* Original isometric-style illustration for empty states — flat shapes, brand palette, no traced artwork */
.illustration-empty { text-align: center; padding: 48px 24px; }
.illustration-empty svg { width: 168px; height: 168px; margin: 0 auto 18px; display: block; }
.illustration-empty h3 { margin-bottom: 6px; }
.illustration-empty p { color: var(--muted); max-width: 40ch; margin: 0 auto 18px; }

.detail-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); overflow: hidden; }
.detail-row { display: flex; align-items: center; gap: 13px; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.detail-row:last-child { border-bottom: none; }
.detail-row .d-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--blue-50); color: var(--primary); display: grid; place-items: center; flex: none; }
.detail-row .d-info span { display: block; font-size: .72rem; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.detail-row .d-info b { display: block; color: var(--ink); font-size: .9rem; margin-top: 2px; }
@media (max-width: 640px) {
  .quick-actions { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .qa-icon { width: 46px; height: 46px; border-radius: 14px; }
}

/* Accordion */
.acc { border: 1px solid var(--border); border-radius: var(--radius-s); margin-bottom: 9px; background: var(--surface); overflow: hidden; }
.acc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 17px; cursor: pointer; font-weight: 600; color: var(--ink); font-size: .94rem; }
.acc-head:hover { background: var(--surface-2); }
.acc-body { padding: 0 17px 17px; font-size: .9rem; color: var(--ink-2); display: none; }
.acc.open .acc-body { display: block; }
.acc.open .acc-head .icon { transform: rotate(180deg); }
.acc-head .icon { transition: transform .2s ease; color: var(--muted); }

.scroll-x { overflow-x: auto; touch-action: pan-x pan-y; scrollbar-width: thin; }
.scroll-x::-webkit-scrollbar { height: 6px; }
.scroll-x::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 100px; }
