/* ============================================================
   SwissDnaCode — V1 / MVP Prototype
   Shared design tokens + base components.
   Distinct from EMATA: warm off-white, Swiss-medical palette,
   Fraunces (display) + Inter (UI), no shared EMATA chrome.
   ============================================================ */

:root {
  /* ── Surface ───────────────────────────────────────────────── */
  --bg:          #faf8f5;   /* warm off-white, alpine calm */
  --bg-2:        #f3efe8;   /* slightly deeper surface */
  --bg-3:        #e8e3d9;   /* contrast surface */
  --paper:       #ffffff;   /* card / dialog */
  --border:      #e3ddd1;
  --border-2:    #cfc7b8;

  /* ── Type ──────────────────────────────────────────────────── */
  --text:        #1c2b3a;   /* swiss night sky */
  --text-2:      #5a6470;
  --text-3:      #98948a;

  /* ── Brand & status ────────────────────────────────────────── */
  --primary:     #1c4e6e;   /* deep ocean — Swiss medical authority */
  --primary-bg:  #eef4f8;
  --primary-bd:  #c4d8e6;
  --primary-dk:  #143a52;

  --health:      #2d6a4f;   /* sage green — OK / approved */
  --health-bg:   #eaf3ee;
  --health-bd:   #b0d2bf;

  --warn:        #b8973e;   /* amber — pending / attention */
  --warn-bg:     #fbf3e0;
  --warn-bd:     #e5d2a3;

  --danger:      #a8513a;   /* warm terracotta — block / required */
  --danger-bg:   #f8ebe5;
  --danger-bd:   #e3c0b1;

  --accent:      #5c3d7a;   /* indigo — used sparingly for AI/intelligence */
  --accent-bg:   #f0eaf6;
  --accent-bd:   #d4c3e3;

  /* ── Vision accent — gold/amber — distinguishes Vision prototype
     from V1 (which uses no extra accent). Used on the brand mark,
     the Vision sash, and the `.is-vision` badge that marks every
     feature added on top of V1. */
  --vision:      #b8973e;
  --vision-bg:   #fdf8ee;
  --vision-bd:   #e8d49a;
  --vision-text: #7a611f;

  /* ── Therapist accent — Vision-only role. Coral/clay — warm,
     coaching/intervention vocabulary, distinct from doctor's indigo
     and admin's green. */
  --therapist:    #a8513a;
  --therapist-bg: #fbf0eb;
  --therapist-bd: #e8c3b0;

  /* ── Type tokens ───────────────────────────────────────────── */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-ui:      'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* ── Geometry ──────────────────────────────────────────────── */
  --radius-sm:   6px;
  --radius:      10px;
  --radius-lg:   16px;
  --radius-xl:   22px;

  --shadow-1:    0 1px 2px rgba(28, 43, 58, 0.04),
                 0 2px 6px rgba(28, 43, 58, 0.04);
  --shadow-2:    0 1px 2px rgba(28, 43, 58, 0.05),
                 0 8px 24px rgba(28, 43, 58, 0.08);
  --shadow-3:    0 4px 16px rgba(28, 43, 58, 0.10),
                 0 24px 60px rgba(28, 43, 58, 0.12);

  --space-1:     4px;
  --space-2:     8px;
  --space-3:     12px;
  --space-4:     16px;
  --space-5:     24px;
  --space-6:     32px;
  --space-7:     48px;
  --space-8:     64px;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* Faint paper grain — only on desktop, very subtle */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.018;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Typography helpers ────────────────────────────────────── */
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.015em; }
.display em {
  font-style: italic;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.mono { font-family: var(--font-mono); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 500;
}
.muted { color: var(--text-2); }
.dim   { color: var(--text-3); }

/* ── Brand mark ────────────────────────────────────────────── */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
}
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.02em;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(28, 78, 110, 0.25);
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.brand-name em { font-style: italic; color: var(--text-2); font-weight: 400; }
.brand-tagline {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-top: 2px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: background 0.15s, color 0.15s, border-color 0.15s,
              transform 0.1s, box-shadow 0.2s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 1px 0 rgba(255,255,255,0.12) inset,
              0 4px 14px rgba(28, 78, 110, 0.25);
}
.btn-primary:hover { background: var(--primary-dk); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-2);
}
.btn-ghost:hover { background: var(--bg-2); border-color: var(--text-3); }

.btn-quiet {
  background: transparent;
  color: var(--text-2);
}
.btn-quiet:hover { color: var(--text); background: var(--bg-2); }

.btn-sm { padding: 6px 12px; font-size: 12.5px; gap: 6px; border-radius: var(--radius-sm); }
.btn-lg { padding: 13px 24px; font-size: 14.5px; }

.btn .ti { font-size: 17px; }
.btn-sm .ti { font-size: 14px; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-1);
}
.card-tight   { padding: 14px 16px; }
.card-spacious{ padding: 24px 28px; }

.card-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
.card-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -0.005em;
  flex: 1;
  display: inline-flex; align-items: center; gap: 8px;
}
.card-title .ti { color: var(--primary); font-size: 18px; }

/* ── Pills / chips ─────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--bg-2);
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 4px 10px;
  font-weight: 500;
  line-height: 1.4;
}
.chip .ti { font-size: 12px; }

.chip-primary { background: var(--primary-bg); border-color: var(--primary-bd); color: var(--primary); }
.chip-health  { background: var(--health-bg);  border-color: var(--health-bd);  color: var(--health); }
.chip-warn    { background: var(--warn-bg);    border-color: var(--warn-bd);    color: var(--warn); }
.chip-danger  { background: var(--danger-bg);  border-color: var(--danger-bd);  color: var(--danger); }
.chip-accent  { background: var(--accent-bg);  border-color: var(--accent-bd);  color: var(--accent); }

/* Deactivated user row */
.list-row.is-deactivated { opacity: 0.55; background: var(--bg-2); }
.list-row.is-deactivated .list-name { text-decoration: line-through; color: var(--text-3); }

/* Save-button confirmation flash */
.btn.is-saved { background: var(--health) !important; color: white !important; border-color: var(--health) !important; pointer-events: none; animation: btnSavedIn 0.2s ease; }
@keyframes btnSavedIn { from { transform: scale(0.98); } to { transform: scale(1); } }

/* iOS-style pill switch */
.settings-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; cursor: pointer; }
.settings-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.settings-switch-track { position: absolute; inset: 0; background: var(--bg-2); border: 1px solid var(--border); border-radius: 99px; transition: background 0.2s, border-color 0.2s; }
.settings-switch-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: var(--paper); border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.15); transition: transform 0.2s; }
.settings-switch input:checked + .settings-switch-track { background: var(--health); border-color: var(--health); }
.settings-switch input:checked + .settings-switch-track::after { transform: translateX(18px); background: white; }

/* Language picker option rows */
.lang-option { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 12px 14px; background: var(--paper); border: 1px solid var(--border); border-radius: 10px; font-size: 14px; color: var(--text); cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.lang-option:hover { background: var(--bg-2); }
.lang-option.is-active { border-color: var(--primary); background: var(--primary-bg); font-weight: 600; }

.chip-solid {
  background: var(--primary);
  color: white;
  border-color: transparent;
}

/* ── Inputs ───────────────────────────────────────────────── */
.input, .select, .textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(28, 78, 110, 0.1);
}
.textarea { resize: vertical; min-height: 80px; line-height: 1.5; }

.search-wrap {
  position: relative;
  width: 100%;
}
.search-wrap .ti {
  position: absolute;
  left: 14px;
  top: 50%; transform: translateY(-50%);
  color: var(--text-3);
  font-size: 17px;
  pointer-events: none;
}
.search-wrap .input { padding-left: 40px; }

.field { display: block; }
.field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 6px;
}
.field-hint {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 4px;
  line-height: 1.5;
}

/* ── Demo role chip (page-flow control) ────────────────────────
   Lives in the top-right of each role surface. Positioned absolutely
   inside its host so it scrolls AWAY with the page when the user
   scrolls down — that way it never hovers over content the user is
   trying to read. Opaque background (no blur), so on first paint
   nothing ghosts through it. */
.role-chip {
  position: absolute;
  top: 14px; right: 16px;
  z-index: 50;
  display: inline-flex; align-items: center; gap: 0;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 3px;
  box-shadow: var(--shadow-2);
  font-family: var(--font-mono);
}
.role-chip .role-label {
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 0 10px 0 12px;
  border-right: 1px solid var(--border);
  font-weight: 500;
  white-space: nowrap;
}
.role-chip a {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 11px;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  text-decoration: none;
  border-radius: 99px;
  transition: color 0.15s, background 0.15s;
  font-weight: 500;
  white-space: nowrap;
}
.role-chip a:hover { color: var(--text); background: var(--bg-2); }
.role-chip a.is-active {
  background: var(--primary);
  color: white;
}
.role-chip a .ti { font-size: 12px; }

/* Small screens: drop the long label and show only icons in pills */
@media (max-width: 640px) {
  .role-chip { top: 10px; right: 12px; }
  .role-chip .role-label { display: none; }
  .role-chip a span:not(.ti) { display: none; }
  .role-chip a { padding: 6px 9px; }
  .role-chip a .ti { font-size: 14px; }
}

/* ── Variant switcher — V1 / Vision toggle (sibling of lang-chip).
   Lets you flip the same role between prototype variants without
   going through the role landing. Position is set at runtime by
   positionChips() so it never collides with role-chip / lang-chip. */
.variant-chip {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 50;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 3px;
  box-shadow: var(--shadow-2);
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 0;
}
.variant-chip .variant-label {
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 0 10px 0 12px;
  border-right: 1px solid var(--border);
  font-weight: 500;
  white-space: nowrap;
}
.variant-chip a {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 11px;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  text-decoration: none;
  border-radius: 99px;
  transition: color 0.15s, background 0.15s;
  font-weight: 600;
  white-space: nowrap;
}
.variant-chip a:hover:not(.is-active) { color: var(--text); background: var(--bg-2); }
.variant-chip a.is-active { cursor: default; }
.variant-chip a.is-active[data-variant="v1"]     { background: var(--primary); color: white; }
.variant-chip a.is-active[data-variant="vision"] { background: #b8973e;        color: white; }
.variant-chip a .ti { font-size: 12px; }
@media (max-width: 640px) {
  .variant-chip { top: 10px; padding: 2px; }
  .variant-chip .variant-label { display: none; }
  .variant-chip a { padding: 4px 7px; font-size: 0.58rem; }
}

/* ── Language switcher — DE / EN toggle */
.lang-chip {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 50;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 3px;
  box-shadow: var(--shadow-2);
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.lang-chip button {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px;
  padding: 5px 10px;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  background: transparent;
  border: none;
  border-radius: 99px;
  cursor: pointer;
  font-weight: 600;
  transition: color 0.15s, background 0.15s;
  font-family: inherit;
}
.lang-chip button:hover { color: var(--text); }
.lang-chip button.is-active { background: var(--primary); color: white; }
/* The right offset is set by positionLangChip() in app.js — it
   measures the role-chip's rendered width so the two never overlap
   regardless of how many roles are listed. */
@media (max-width: 640px) {
  .lang-chip { top: 10px; padding: 2px; }
  .lang-chip button { padding: 4px 7px; font-size: 0.58rem; min-width: 26px; }
}

/* ── Back-to-workspace link — symmetric partner of .role-chip
   on the top-left of every prototype surface. Docks into
   .workspace / .phone-stage / .landing via renderBackHome(). */
.back-home {
  position: absolute;
  top: 14px; left: 16px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 10px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  text-decoration: none;
  box-shadow: var(--shadow-1);
  transition: transform 0.18s, color 0.18s, border-color 0.18s;
  white-space: nowrap;
}
.back-home:hover {
  color: var(--text);
  border-color: var(--text-3);
  transform: translateX(-2px);
}
.back-home .ti { font-size: 16px; }
@media (max-width: 640px) {
  .back-home { top: 10px; left: 12px; font-size: 10.5px; padding: 7px 12px 7px 9px; }
  .back-home span:not(.ti) { display: none; }      /* icon-only on tight screens */
  .back-home { padding: 7px 9px; gap: 0; }
}

/* ── Phone frame (client surface, desktop) ────────────────── */
.phone-stage {
  position: relative;             /* anchors the .role-chip */
  min-height: 100vh;
  padding: 56px 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.phone-stage-label {
  text-align: center;
  max-width: 460px;
}
.phone-stage-label h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.phone-stage-label p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
}
.phone {
  width: 392px;
  height: 800px;
  background: var(--paper);
  border-radius: 44px;
  padding: 12px;
  box-shadow: var(--shadow-3),
              0 0 0 1px rgba(0,0,0,0.05) inset;
  position: relative;
  flex-shrink: 0;
}
.phone-screen {
  width: 100%; height: 100%;
  background: var(--bg);
  border-radius: 32px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}
.phone-notch {
  position: absolute;
  top: 22px; left: 50%; transform: translateX(-50%);
  width: 100px; height: 24px;
  background: #0a0a0a;
  border-radius: 99px;
  z-index: 10;
}

@media (max-width: 480px) {
  .phone-stage { padding: 0; gap: 0; }
  .phone-stage-label { display: none; }
  .phone {
    width: 100vw; height: 100vh;
    border-radius: 0; padding: 0;
    box-shadow: none;
  }
  .phone-screen { border-radius: 0; }
  .phone-notch { display: none; }
}

/* App screens stacked inside the phone */
.client-screens {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.client-screen {
  position: absolute; inset: 0;
  overflow-y: auto;
  padding: 36px 18px 90px;
  display: none;
  background: var(--bg);
}
.client-screen.is-active { display: block; }

/* ── Client status bar (mocked iOS-style top status) ──────── */
.status-bar {
  height: 36px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}
.status-bar-right {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text);
  font-size: 12px;
}
.status-bar-right .ti { font-size: 14px; }

/* ── Client top app bar (in-screen) ─────────────────────── */
.client-topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 0 18px 14px;
  flex-shrink: 0;
}
.client-topbar h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  flex: 1;
  margin: 0;
}
/* Signature detail — the first name in the greeting gets a soft
   highlighter stroke and a light italic so the app feels signed,
   not template-generated. */
.client-topbar h1 .name-mark {
  font-style: italic;
  background-image: linear-gradient(180deg,
    transparent 62%,
    rgba(212, 165, 116, 0.32) 62%,
    rgba(212, 165, 116, 0.32) 92%,
    transparent 92%);
  background-repeat: no-repeat;
  padding: 0 3px;
  color: inherit;
}
.client-topbar .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-3);
}
.client-topbar .eyebrow-mark {
  width: 14px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  display: inline-block;
}
.client-topbar .ti {
  font-size: 22px;
  color: var(--text-2);
}

/* ── Client bottom nav ──────────────────────────────────── */
.bottom-nav {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 76px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 5;
}
/* 6-slot variant — tighter column spacing so 6 items fit the phone
   width without truncation. */
.bottom-nav.bottom-nav-6 { grid-template-columns: repeat(6, 1fr); }
.bottom-nav.bottom-nav-6 .bottom-nav-item { font-size: 9px; letter-spacing: 0; }
.bottom-nav.bottom-nav-6 .bottom-nav-item .ti { font-size: 20px; }
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px;
  color: var(--text-3);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  font-family: var(--font-ui);
  padding-top: 8px;
  cursor: pointer;
  transition: color 0.15s;
  background: transparent;
}
.bottom-nav-item .ti { font-size: 22px; }
.bottom-nav-item:hover { color: var(--text-2); }
.bottom-nav-item.is-active { color: var(--primary); }
.bottom-nav-item.is-active .ti { color: var(--primary); }

/* ── Tiles / cells (client) ─────────────────────────────── */
.tile {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  display: block;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}
a.tile:hover, button.tile:hover {
  box-shadow: 0 6px 20px -8px rgba(28, 78, 110, 0.18);
  border-color: var(--primary-bd);
}
.tile-row {
  display: flex; align-items: center; gap: 12px;
}
.tile-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--primary-bg);
  color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}
.tile-body { flex: 1; min-width: 0; }
.tile-title {
  font-weight: 500; font-size: 14px;
  color: var(--text);
  margin-bottom: 2px;
}
.tile-sub {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.5;
}
.tile-arrow {
  color: var(--text-3);
  font-size: 18px;
  flex-shrink: 0;
}

/* ── Chat (DNA assistant) ───────────────────────────────── */
.chat-stack {
  display: flex; flex-direction: column;
  gap: 12px;
  padding-bottom: 12px;
}
.bubble {
  max-width: 82%;
  padding: 11px 14px;
  font-size: 13.5px;
  line-height: 1.55;
  border-radius: 16px;
  word-wrap: break-word;
}
.bubble-bot {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 16px 16px 16px 4px;
  align-self: flex-start;
  color: var(--text);
}
.bubble-user {
  background: var(--primary);
  color: white;
  border-radius: 16px 16px 4px 16px;
  align-self: flex-end;
}
.bubble-meta {
  font-size: 10.5px;
  color: var(--text-3);
  align-self: flex-start;
  padding-left: 4px;
}
.bubble-user + .bubble-meta { align-self: flex-end; padding-right: 4px; padding-left: 0; }
.bubble-disclaimer {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--warn-bg);
  border: 1px solid var(--warn-bd);
  color: var(--warn);
  font-size: 11px;
  font-style: italic;
  padding: 4px 10px;
  border-radius: 99px;
  align-self: flex-start;
  margin-top: -6px;
}
.bubble-disclaimer .ti { font-size: 13px; }

/* Chat safety-tier UI — badge above the bot bubble, colour hint on
   the bubble border, emergency variant is red + attention-grabbing. */
.chat-tier {
  display: inline-flex; align-items: center; gap: 6px;
  align-self: flex-start;
  font-size: 10.5px; font-family: var(--font-mono); font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-3);
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  margin-top: 4px;
}
.chat-tier-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.chat-tier.chat-tier-green     { color: var(--health);  border-color: var(--health-bd);  background: var(--health-bg); }
.chat-tier.chat-tier-green .chat-tier-dot { background: var(--health); }
.chat-tier.chat-tier-yellow    { color: var(--warn);    border-color: var(--warn-bd);    background: var(--warn-bg); }
.chat-tier.chat-tier-yellow .chat-tier-dot { background: var(--warn); }
.chat-tier.chat-tier-red       { color: var(--accent);  border-color: var(--accent-bd);  background: var(--accent-bg); }
.chat-tier.chat-tier-red .chat-tier-dot { background: var(--accent); }
.chat-tier.chat-tier-emergency { color: var(--danger);  border-color: var(--danger-bd);  background: var(--danger-bg); animation: chatTierPulse 1.2s ease-in-out 0s 2; }
.chat-tier.chat-tier-emergency .chat-tier-dot { background: var(--danger); }
@keyframes chatTierPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }

.bubble.chat-tier-yellow { border-left: 3px solid var(--warn); }
.bubble.chat-tier-red    { border-left: 3px solid var(--accent); }
.bubble.bubble-emergency {
  background: var(--danger-bg);
  border: 1px solid var(--danger);
  color: var(--danger);
  font-weight: 500;
}
.bubble.bubble-emergency b { color: var(--danger); }

/* Welcome banner — a distinct first-bubble style so the intro reads
   as system context, not as a reply. */
.bubble.chat-welcome {
  background: linear-gradient(150deg, var(--primary-bg), var(--accent-bg));
  border: 1px solid var(--primary-bd);
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.55;
  font-style: normal;
}

.memory-callout {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-bd);
  color: var(--accent);
  font-size: 11.5px;
  padding: 5px 12px;
  border-radius: 99px;
  align-self: center;
  margin: 4px 0;
}
.memory-callout .ti { font-size: 13px; }

.suggestions {
  display: flex; flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 8px;
}
.suggestion {
  font-size: 12px;
  padding: 6px 12px;
  border: 1px solid var(--border-2);
  border-radius: 99px;
  background: var(--paper);
  color: var(--text-2);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.suggestion:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-bg);
}
/* Tier-preset suggestions — small colour dot on each so the demo
   viewer can see which safety tier a given prompt will trigger. */
.suggestions-eyebrow {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 8px 4px 2px;
}
.suggestion .suggestion-tier-dot {
  display: inline-block;
  width: 8px; height: 8px; border-radius: 50%;
  margin-right: 4px; vertical-align: middle;
  background: currentColor;
}
.suggestion.suggestion-green  { border-color: var(--health-bd);  color: var(--health);  background: var(--health-bg); }
.suggestion.suggestion-green:hover  { border-color: var(--health);  color: var(--health);  background: var(--health-bg); filter: brightness(0.97); }
.suggestion.suggestion-yellow { border-color: var(--warn-bd);    color: var(--warn);    background: var(--warn-bg); }
.suggestion.suggestion-yellow:hover { border-color: var(--warn);    color: var(--warn);    background: var(--warn-bg);   filter: brightness(0.97); }
.suggestion.suggestion-red    { border-color: var(--accent-bd);  color: var(--accent);  background: var(--accent-bg); }
.suggestion.suggestion-red:hover    { border-color: var(--accent);  color: var(--accent);  background: var(--accent-bg); filter: brightness(0.97); }

.chat-input {
  position: sticky;
  bottom: 0;
  background: var(--bg);
  padding-top: 8px;
  display: flex; align-items: flex-end;
  gap: 8px;
}
.chat-input .input-wrap {
  flex: 1;
  display: flex; align-items: center;
  background: var(--paper);
  border: 1px solid var(--border-2);
  border-radius: 22px;
  padding: 8px 14px;
  gap: 8px;
}
.chat-input input {
  flex: 1; border: none; outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--text);
}
.chat-input .icon-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center;
}
.chat-input .send-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.chat-input .send-btn:hover { background: var(--primary-dk); }
.chat-input .ti { font-size: 18px; }

/* ── Onboarding (First Steps) ────────────────────────────── */
.steps {
  display: flex; flex-direction: column; gap: 14px;
}
.step {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex; align-items: flex-start;
  gap: 14px;
}
.step.is-done {
  background: var(--health-bg);
  border-color: var(--health-bd);
}
.step.is-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(28, 78, 110, 0.08);
}
.step-marker {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  flex-shrink: 0;
  border: 1px solid transparent;
}
.step.is-done .step-marker { background: var(--health); color: white; }
.step.is-active .step-marker { background: var(--primary); color: white; }
.step:not(.is-done):not(.is-active) .step-marker {
  background: var(--bg-2);
  border-color: var(--border);
  color: var(--text-3);
}
/* min-width:0 prevents the flex item from blowing past its parent when
   its own children (e.g. a .row of nowrap buttons) are wider than the
   available column. Without this, .step-body forces .step wider than
   the phone screen and the content gets clipped at the rounded edge. */
.step-body { flex: 1; min-width: 0; }
.step-title { font-weight: 500; font-size: 14px; margin-bottom: 4px; }
.step-desc { font-size: 12.5px; color: var(--text-2); line-height: 1.55; }

/* Mandatory consent statement (NOT a question — a binding statement) */
.consent {
  background: var(--paper);
  border: 1px solid var(--primary-bd);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}
.consent::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary), var(--health));
}
.consent-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 8px;
  display: inline-flex; align-items: center; gap: 8px;
}
.consent-eyebrow::before {
  content: '';
  width: 18px; height: 1px; background: var(--primary); opacity: 0.6;
}
.consent-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: -0.005em;
  margin-bottom: 10px;
}
.consent-text {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 14px;
}
.consent-text b { color: var(--text); font-weight: 500; }
.consent-note {
  font-size: 11.5px;
  color: var(--text-3);
  font-style: italic;
  margin-top: 4px;
}

/* ── Workspace (doctor + admin) ─────────────────────────── */
/* padding-top creates a dedicated strip above the topbar where the
   absolute-positioned .role-chip lives — it never overlaps the
   topbar's action buttons (Nutzer einladen, Termin anlegen…). */
.workspace {
  position: relative;             /* anchors the .role-chip */
  min-height: 100vh;
  padding-top: 56px;
  display: grid;
  grid-template-columns: 240px 1fr;
}
@media (max-width: 640px) {
  .workspace { padding-top: 48px; }
}
.ws-nav {
  background: var(--paper);
  border-right: 1px solid var(--border);
  padding: 20px 16px;
  display: flex; flex-direction: column;
  gap: 24px;
  position: sticky; top: 0;
  height: 100vh;
}
.ws-nav-section { display: flex; flex-direction: column; gap: 2px; }
.ws-nav-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 600;
  padding: 0 8px 4px;
}
.ws-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius);
  font-size: 13.5px;
  color: var(--text-2);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.ws-nav-item .ti { font-size: 18px; color: var(--text-3); }
.ws-nav-item:hover { background: var(--bg-2); color: var(--text); }
.ws-nav-item.is-active {
  background: var(--primary-bg);
  color: var(--primary);
  font-weight: 500;
}
.ws-nav-item.is-active .ti { color: var(--primary); }

.ws-user {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.ws-user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary-bg);
  color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}
.ws-user-name {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}
.ws-user-role {
  font-size: 11px;
  color: var(--text-3);
}

.ws-main {
  display: flex; flex-direction: column;
  min-width: 0;
}
.ws-topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 32px;
  background: var(--paper);
  border-bottom: 1px solid var(--border);
}
.ws-topbar h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin: 0;
  flex: 1;
}
.ws-topbar-sub {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 2px;
}
.ws-body {
  padding: 28px 32px;
  flex: 1;
}

/* ── Table-ish list (patients, users) ───────────────────── */
.list {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.list-row {
  display: grid;
  grid-template-columns: 38px 1.5fr 1fr 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  transition: background 0.12s;
  cursor: pointer;
}
.list-row:first-child { border-top: none; }
.list-row:hover { background: var(--bg-2); }
.list-row.is-header {
  background: var(--bg-2);
  cursor: default;
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 600;
}
.list-row.is-header:hover { background: var(--bg-2); }

/* Orders list — 7 columns with per-column alignment so header labels
   and data line up visually. Numeric total is right-aligned, status
   chip and article chip are centered, chevron column is compact. */
.list-orders .list-row {
  grid-template-columns: 70px 1.4fr 1.6fr 1fr 100px 160px 36px;
  gap: 14px;
}
.list-orders .list-row > div:nth-child(1) { text-align: left; }
.list-orders .list-row > div:nth-child(2) { text-align: left; }
.list-orders .list-row > div:nth-child(3) { text-align: center; }
.list-orders .list-row > div:nth-child(4) { text-align: center; }
.list-orders .list-row > div:nth-child(5) { text-align: right; font-variant-numeric: tabular-nums; }
.list-orders .list-row > div:nth-child(6) { text-align: center; }
.list-orders .list-row > div:nth-child(7) { text-align: right; }
.list-orders .list-row > div .chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
/* Chips in the Artikel column get consistent max-width so they don't
   stretch when the label is short. */
.list-orders .list-row > div:nth-child(3) .chip {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary-bg);
  color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600;
  font-size: 11.5px;
}
.list-name { font-weight: 500; color: var(--text); }
.list-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

/* ── Patient detail = "one universe" ─────────────────────── */
.patient-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  margin-top: 4px;
}
@media (max-width: 1100px) {
  .patient-grid { grid-template-columns: 1fr; }
}
.patient-header {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
}
.patient-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
}
.patient-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.patient-meta {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-2);
}
.patient-meta .ti { font-size: 14px; vertical-align: -2px; color: var(--text-3); }

.patient-section {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 16px;
}
.patient-section h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  margin: 0 0 12px;
  display: flex; align-items: center; gap: 8px;
}
.patient-section h2 .ti { color: var(--primary); font-size: 18px; }

.finding {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--bg-3);
}
.finding:first-of-type { border-top: none; padding-top: 0; }
.finding-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--primary-bg);
  color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.finding-title { font-weight: 500; font-size: 13.5px; }
.finding-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ── Sensitive finding — visually distinct, elevated access ──
   Applied to findings that require doctor-bot mediation and
   must never be shown directly to the client. */
.finding.is-sensitive {
  position: relative;
  border-top: none !important;
  border: 1px solid var(--danger-bd);
  border-left: 4px solid var(--danger);
  background: linear-gradient(135deg, var(--paper) 0%, var(--danger-bg) 100%);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 10px 0;
  box-shadow: 0 1px 2px rgba(168, 81, 58, 0.06), 0 4px 10px -6px rgba(168, 81, 58, 0.12);
  transition: box-shadow 0.15s, transform 0.12s;
}
.finding.is-sensitive:hover {
  box-shadow: 0 2px 6px rgba(168, 81, 58, 0.1), 0 8px 20px -10px rgba(168, 81, 58, 0.2);
  transform: translateY(-1px);
}
/* Small lock badge overlaid on the icon tile */
.finding-lock {
  position: absolute;
  bottom: -3px; right: -3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--danger);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  box-shadow: 0 0 0 2px var(--paper);
}
.finding-lock .ti { font-size: 9px; }
.finding.is-sensitive .finding-icon { position: relative; }

/* "Nur über Arzt-Bot besprechbar" note — a warning strip separated
   from the sub-line with a soft border-top. */
.finding-sensitive-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--danger-bd);
  border-radius: 99px;
  font-size: 11px;
  color: var(--danger);
  font-weight: 500;
  line-height: 1.4;
}
.finding-sensitive-note .ti { font-size: 12px; flex-shrink: 0; }
.finding-sensitive-note b { color: var(--danger); font-weight: 700; }

/* Open button on sensitive findings — signals elevated access */
.finding-open-sensitive {
  background: var(--paper);
  color: var(--danger);
  border: 1px solid var(--danger-bd);
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}
.finding-open-sensitive:hover {
  background: var(--danger-bg);
  border-color: var(--danger);
}
.finding-open-sensitive i { color: inherit; }

/* Embedded doctor bot inside patient detail — styled like a compact
   mobile chat app so it works well in the narrow right rail and,
   when expanded, still reads as a chat UI. */
.doctor-bot {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column;
  height: 640px;
  position: sticky;
  top: 24px;
  overflow: hidden;
  min-width: 0;                       /* let flex children shrink instead of forcing overflow */
}
.doctor-bot-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--paper) 0%, var(--bg) 100%);
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;                    /* buttons drop below title on narrow widths */
  min-width: 0;
}
.doctor-bot-head h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  flex: 1 1 120px;
  min-width: 0;
  margin: 0;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doctor-bot-head > .ti { color: var(--accent); font-size: 20px; flex-shrink: 0; }
.doctor-bot-head .chip { flex-shrink: 0; }
.doctor-bot-head .btn { min-width: 30px; padding: 4px 8px; flex-shrink: 0; }
.doctor-bot-head .btn .ti { font-size: 14px; }
.doctor-bot-body {
  flex: 1;
  padding: 14px 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column;
  gap: 10px;
  background: var(--bg);              /* subtle chat-app tint behind bubbles */
}
.doctor-bot-body .bubble { max-width: 100% !important; }
.doctor-bot-foot {
  border-top: 1px solid var(--border);
  padding: 0;
  display: flex;
  flex-direction: column;             /* stack quick-actions ABOVE the input row */
  gap: 0;
  background: var(--paper);
}
.doctor-bot-quick {
  display: flex;
  gap: 6px;
  padding: 8px 12px 4px;
  overflow-x: auto;                   /* horizontal scroll on narrow widths — mobile chip strip */
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.doctor-bot-quick::-webkit-scrollbar { display: none; }
.doctor-bot-quick .suggestion {
  flex-shrink: 0;                     /* pills don't squish, they scroll instead */
  font-size: 11px;
  padding: 5px 12px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--primary-bg);      /* soft primary tint — reads on paper foot */
  border: 1px solid var(--primary-bd);
  color: var(--primary);              /* full-contrast primary text */
  font-weight: 600;
}
.doctor-bot-quick .suggestion .ti {
  font-size: 12px;
  color: var(--primary);
}
.doctor-bot-quick .suggestion:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.doctor-bot-quick .suggestion:hover .ti { color: white; }
.doctor-bot-input {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px 10px;
  border-top: 1px solid var(--border);
  background: var(--paper);
}
.doctor-bot-input input {
  border: 1px solid var(--border);
  outline: none;
  flex: 1;
  min-width: 0;
  background: var(--paper);
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 99px;
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.15s;
}
.doctor-bot-input input:focus { border-color: var(--primary); }
.doctor-bot-input .btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.doctor-bot-input .btn .ti { font-size: 15px; }

/* ── Role-assignment matrix (admin) ─────────────────────── */
.matrix {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.matrix table {
  width: 100%;
  border-collapse: collapse;
}
.matrix th, .matrix td {
  padding: 14px 20px;
  text-align: left;
  font-size: 13px;
  border-top: 1px solid var(--border);
}
.matrix thead th {
  background: var(--bg-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 600;
  border-top: none;
}
.matrix .cell-check { color: var(--health); font-size: 18px; }
.matrix .cell-x { color: var(--text-3); font-size: 16px; }
.matrix .role-name {
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
}

/* ── Footer (engagement / Swiss residency reassurance) ─── */
.brand-footer {
  text-align: center;
  padding: 28px 16px 36px;
  font-size: 11.5px;
  color: var(--text-3);
  letter-spacing: 0.04em;
}
.brand-footer .residency {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  background: var(--health-bg);
  color: var(--health);
  border: 1px solid var(--health-bd);
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
}
.brand-footer .residency .ti { font-size: 13px; }

/* ── Banner (status, advisory) ─────────────────────────── */
.banner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  border: 1px solid;
  margin-bottom: 16px;
}
.banner .ti { font-size: 18px; flex-shrink: 0; }
.banner-info   { background: var(--primary-bg); border-color: var(--primary-bd); color: var(--primary); }
.banner-health { background: var(--health-bg);  border-color: var(--health-bd);  color: var(--health); }
.banner-warn   { background: var(--warn-bg);    border-color: var(--warn-bd);    color: var(--warn); }

/* ── Helpers ────────────────────────────────────────────── */
/* flex-wrap:wrap is defensive — most .row usages have icon + label + arrow
   that never need to wrap. But when a .row holds multiple buttons (which
   carry white-space:nowrap), wrapping prevents them from spilling out of
   the phone frame on narrow screens. */
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-tight { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.row-end { justify-content: flex-end; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-tight { display: flex; flex-direction: column; gap: 6px; }
.center { display: flex; align-items: center; justify-content: center; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 720px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }

.divider { height: 1px; background: var(--border); margin: 14px 0; }

.hide-mobile { }
@media (max-width: 640px) { .hide-mobile { display: none; } }

/* ── Modal dialog ──────────────────────────────────────────── */
.sd-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(28, 43, 58, 0.42);
  backdrop-filter: blur(4px);
  z-index: 250;
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
  animation: sdModalFadeIn 0.18s ease;
}
.sd-modal-backdrop.is-open { display: flex; }

/* Phone-scoped modal — used inside .phone-screen so a sheet stays
   inside the device frame rather than escaping to a desktop overlay.
   Slides up as a bottom sheet — native-mobile pattern. */
.sd-phone-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(28, 43, 58, 0.42);
  z-index: 100;
  display: none;
  align-items: flex-end; justify-content: center;
  padding: 0;
  animation: sdModalFadeIn 0.2s ease;
}
.sd-phone-modal-backdrop.is-open { display: flex; }
.sd-phone-modal-backdrop .sd-modal {
  width: 100%;
  max-width: none;
  max-height: 94%;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 28px rgba(28, 43, 58, 0.18);
  animation: sdSheetUp 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.sd-phone-modal-backdrop .sd-modal::before {
  content: '';
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 38px; height: 4px;
  border-radius: 99px;
  background: var(--border);
}
.sd-phone-modal-backdrop .sd-modal-head {
  padding: 22px 14px 12px;      /* extra top makes room for the drag handle */
  gap: 10px;
  min-width: 0;                  /* let title truncate rather than force overflow */
}
.sd-phone-modal-backdrop .sd-modal-head > div { min-width: 0; }
.sd-phone-modal-backdrop .sd-modal-head .ti.head-icon {
  width: 32px; height: 32px;    /* smaller icon leaves room for title on ~336px */
  font-size: 16px;
  border-radius: 8px;
}
.sd-phone-modal-backdrop .sd-modal-head h2 {
  font-size: 1rem;
  line-height: 1.3;
  overflow-wrap: anywhere;       /* long words wrap instead of overflowing */
}
.sd-phone-modal-backdrop .sd-modal-sub { font-size: 11.5px; }
.sd-phone-modal-backdrop .sd-modal-close {
  width: 36px; height: 36px;    /* touch-friendly target */
  flex-shrink: 0;
}
.sd-phone-modal-backdrop .sd-modal-body {
  padding: 12px 16px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;  /* scrolling the modal body doesn't scroll the page under it */
}
.sd-phone-modal-backdrop .sd-modal-foot {
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  flex-wrap: wrap;               /* buttons + notes fit on narrow phones */
  gap: 8px;
  justify-content: stretch;
}
.sd-phone-modal-backdrop .sd-modal-foot .btn {
  min-height: 40px;              /* touch-target minimum */
  flex: 1 1 120px;               /* stretch to share width evenly */
  justify-content: center;
  min-width: 0;
}
.sd-phone-modal-backdrop .sd-modal-foot > span {
  flex: 1 1 100%;                /* meta text (e.g. "Inhalt von Memberspot") takes its own line */
  margin: 0 !important;          /* override inline margin-right: auto */
  font-size: 11px;
  color: var(--text-3);
  order: -1;                     /* show meta above the button row */
}
@keyframes sdSheetUp {
  from { transform: translateY(40px); opacity: 0.6; }
  to   { transform: none; opacity: 1; }
}

@keyframes sdModalFadeIn {
  from { background: rgba(28, 43, 58, 0); backdrop-filter: blur(0); }
  to   { background: rgba(28, 43, 58, 0.42); backdrop-filter: blur(4px); }
}
.sd-modal {
  background: var(--paper);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-3);
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow: hidden;
  display: flex; flex-direction: column;
  animation: sdModalIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.sd-modal.is-wide { max-width: 720px; }
.sd-modal.is-video { max-width: 760px; }
@keyframes sdModalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}
.sd-modal-head {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--border);
}
.sd-modal-head .ti.head-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--primary-bg);
  color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.sd-modal-head h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  flex: 1;
  margin: 0;
  line-height: 1.3;
}
.sd-modal-sub {
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 2px;
}
.sd-modal-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-3);
  font-size: 18px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.sd-modal-close:hover { background: var(--bg-2); color: var(--text); }
.sd-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}
.sd-modal-foot {
  padding: 14px 24px 18px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  justify-content: flex-end;
}

/* Video player surface (inside modal) */
.video-stage {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
}
.video-stage::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(255,255,255,0.08), transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,0.06), transparent 50%);
}
.video-play-shell {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--primary);
  font-size: 32px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.25);
  cursor: pointer;
  position: relative;
  z-index: 1;
}
.video-progress {
  position: absolute;
  left: 16px; right: 16px; bottom: 16px;
  height: 4px;
  background: rgba(255,255,255,0.25);
  border-radius: 2px;
  overflow: hidden;
}
.video-progress > div {
  height: 100%; width: 0%;
  background: white;
  border-radius: 2px;
  transition: width 0.2s linear;
}
.video-meta {
  position: absolute;
  top: 12px; right: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  background: rgba(0,0,0,0.45);
  color: white;
  padding: 3px 8px;
  border-radius: 6px;
}

/* Q&A (Anamnese) block — used in patient detail */
.qa-list { display: flex; flex-direction: column; gap: 14px; }
.qa-row {
  padding: 10px 0;
  border-top: 1px solid var(--bg-3);
}
.qa-row:first-child { border-top: none; padding-top: 0; }
.qa-q {
  font-size: 11.5px;
  color: var(--text-3);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.qa-a { font-size: 13.5px; color: var(--text); line-height: 1.55; }

/* Doctor's private notes */
.note-thread { display: flex; flex-direction: column; gap: 12px; }
.note-card {
  background: linear-gradient(180deg, #fefcf6 0%, #fbf6e8 100%);
  border: 1px solid #ebdca6;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13px;
  color: #5a4a1f;
  line-height: 1.55;
}
.note-card-meta {
  display: flex; gap: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #997a2a;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.note-input {
  background: var(--bg-2);
  border: 1px dashed var(--border-2);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex; gap: 10px; align-items: flex-end;
}
.note-input textarea {
  flex: 1;
  border: none; outline: none;
  background: transparent;
  font-family: inherit; font-size: 13px;
  resize: vertical; min-height: 40px;
  color: var(--text);
}

/* Conversation history chips (client DNA-Assistent) */
.conv-cat {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 99px;
  font-weight: 600;
}
.conv-cat.sleep      { background: #eef0fb; color: #4a4f8a; }
.conv-cat.nutrition  { background: #eaf3ee; color: #2d6a4f; }
.conv-cat.fitness    { background: #f8ebe5; color: #a8513a; }
.conv-cat.stress     { background: #fbf3e0; color: #b8973e; }

.conv-toggle {
  display: inline-flex; align-items: center;
  border: 1px solid var(--border);
  background: var(--paper);
  border-radius: 99px;
  padding: 3px;
  font-family: var(--font-mono);
  margin-bottom: 12px;
}
.conv-toggle button {
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 99px;
  color: var(--text-3);
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.conv-toggle button.is-active { background: var(--primary); color: white; }

/* ════════════════════════════════════════════════════════════════
   VISION-ONLY components
   Layered on top of the V1 design system. Anything marked here
   exists ONLY in the Vision prototype, not in V1.
   ════════════════════════════════════════════════════════════════ */

/* The `.is-vision` badge — drop on any feature that is new vs V1.
   A small gold pill with a sparkle icon. Read at a glance. */
.is-vision {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 6px;
  background: var(--vision-bg);
  color: var(--vision-text);
  border: 1px solid var(--vision-bd);
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
  vertical-align: middle;
}
.is-vision .ti { font-size: 11px; }
/* Vision marker icon removed — the hardcoded glyph rendered as a stray
   symbol in this font version. Content badges keep the "Vision" text
   label; the sidebar's per-item Vision markers are dropped entirely
   (the header's V1/Vision toggle already signals the variant). */

.ws-nav-item .is-vision { display: none !important; }

/* Vision sash — sits at the top of pages to signal "this is the Vision
   prototype, not V1". Subtle, not a banner — just a marker strip. */
.vision-sash {
  position: relative;
  padding: 8px 16px;
  background: linear-gradient(90deg, var(--vision-bg) 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--vision-bd);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vision-text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 30;
}
.vision-sash .ti { font-size: 14px; }
.vision-sash b { color: var(--vision); font-weight: 600; letter-spacing: 0.16em; }
.vision-sash a {
  color: var(--vision-text);
  text-decoration: underline;
  text-decoration-color: var(--vision-bd);
  text-underline-offset: 3px;
  margin-left: 4px;
}
.vision-sash a:hover { color: var(--vision); }

/* Therapist accent — used on the new role card, role chip, and
   therapist workspace surfaces. Mirrors the doctor/admin colour
   slots. */
.chip-therapist {
  background: var(--therapist-bg);
  border-color: var(--therapist-bd);
  color: var(--therapist);
}
.role-card.therapist { --accent-color: var(--therapist); }
.role-card.therapist .role-icon {
  background: var(--therapist-bg);
  color: var(--therapist);
}

/* Native-app affordance — used in client.html to signal that
   Vision ships as a true native app. A small home-indicator bar
   inside the phone, status-chip in the topbar. */
.app-shell-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--vision-bg);
  color: var(--vision-text);
  border: 1px solid var(--vision-bd);
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}
.app-shell-badge .ti { font-size: 12px; }

.home-indicator {
  position: absolute;
  bottom: 8px; left: 50%;
  transform: translateX(-50%);
  width: 134px; height: 5px;
  border-radius: 99px;
  background: var(--text);
  opacity: 0.85;
  z-index: 12;
}

/* Category dropdown — Vision client navigation. Replaces the
   horizontal pill-strip pattern in environments where horizontal
   scroll is awkward (e.g. the phone-stage on desktop). Trigger
   button shows the active category; click opens an inline menu. */
.cat-dropdown {
  position: relative;
  margin-bottom: 14px;
}
.cat-dropdown-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, border-radius 0.15s;
}
.cat-dropdown-trigger:hover { border-color: var(--text-3); }
.cat-dropdown-trigger.is-open {
  border-color: var(--primary);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.cat-dropdown-trigger .cat-icon {
  font-size: 18px;
  color: var(--primary);
}
.cat-dropdown-trigger .cat-dropdown-label {
  flex: 1;
  text-align: left;
}
.cat-dropdown-trigger .cat-chevron {
  font-size: 14px;
  color: var(--text-3);
  transition: transform 0.2s;
}
.cat-dropdown-trigger.is-open .cat-chevron { transform: rotate(180deg); }

.cat-dropdown-menu {
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  right: 0;
  z-index: 80;
  background: var(--paper);
  border: 1px solid var(--primary);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 8px 20px rgba(28, 43, 58, 0.10);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.22s ease;
}
.cat-dropdown-menu.is-open {
  max-height: 320px;
  overflow: auto;
}
.cat-dropdown-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  background: none;
  border: none;
  font-family: var(--font-ui);
  font-size: 13.5px;
  color: var(--text-2);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, color 0.12s;
  border-bottom: 1px solid var(--border);
}
.cat-dropdown-menu button:last-child { border-bottom: none; }
.cat-dropdown-menu button:hover { background: var(--bg-2); color: var(--text); }
.cat-dropdown-menu button.is-active {
  background: var(--primary);
  color: white;
}
.cat-dropdown-menu button.is-active .ti { color: white; }
.cat-dropdown-menu button .ti {
  font-size: 16px;
  color: var(--text-3);
}
.cat-dropdown-menu button .ti-check {
  margin-left: auto;
  font-size: 14px;
  color: white;
  display: none;
}
.cat-dropdown-menu button.is-active .ti-check { display: inline-flex; }

/* Category strip — Schlaf / Ernährung / Fitness / Supplemente.
   Vision-only navigation surface in the client app. Horizontally
   scrollable, pill-shaped tabs. */
.category-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 8px;
  margin: 0 -16px 14px;
  padding-left: 16px; padding-right: 16px;
  scrollbar-width: none;
}
.category-strip::-webkit-scrollbar { display: none; }
.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.category-pill:hover { color: var(--text); }
.category-pill.is-active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.category-pill .ti { font-size: 14px; }

/* Shop tile — affiliate product card */
.shop-tile {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  align-items: center;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.18s;
}
.shop-tile:hover {
  border-color: var(--text-3);
  transform: translateY(-1px);
  box-shadow: var(--shadow-1);
}
.shop-tile-thumb {
  width: 64px; height: 64px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--vision-bg), var(--accent-bg));
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  color: var(--vision);
}
.shop-tile-body { min-width: 0; }
.shop-tile-title { font-weight: 500; font-size: 13.5px; }
.shop-tile-sub { font-size: 11.5px; color: var(--text-2); margin-top: 2px; }
.shop-tile-price {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  font-weight: 600;
  text-align: right;
}
.shop-tile-price-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Shop product detail + checkout wizard ─────────────────── */
.shop-hero { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--bg-2); border-radius: 12px; }
.shop-hero-thumb { width: 56px; height: 56px; border-radius: 12px; background: var(--vision-bg); color: var(--vision); display: flex; align-items: center; justify-content: center; }
.shop-hero-thumb .ti { font-size: 26px; }
.shop-hero-price { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--text); }
.shop-hero-unit { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 2px; }
.shop-info-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: 12.5px; color: var(--text-2); border-top: 1px solid var(--border); }
.shop-info-row:first-of-type { border-top: none; }
.shop-info-row .ti { color: var(--vision); font-size: 15px; flex-shrink: 0; }

.qty-picker { display: inline-flex; align-items: center; gap: 4px; }
.qty-picker button { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); background: var(--paper); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.qty-picker button:hover { background: var(--bg-2); }
.qty-picker span { min-width: 40px; text-align: center; font-family: var(--font-mono); font-weight: 700; font-size: 15px; }

/* Checkout modal */
.sd-modal-checkout { max-width: 520px; }
.co-stepper { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 12px 16px; background: var(--bg-2); border-bottom: 1px solid var(--border); }
.co-step { display: flex; flex-direction: column; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 9.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.co-step-dot { width: 24px; height: 24px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; color: var(--text-3); }
.co-step.is-active .co-step-dot { background: var(--primary); color: white; border-color: var(--primary); }
.co-step.is-active .co-step-label { color: var(--primary); font-weight: 700; }
.co-step.is-done .co-step-dot { background: var(--health); border-color: var(--health); color: white; }
.co-step.is-done .co-step-label { color: var(--health); }

.co-option { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px; margin-bottom: 8px; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.co-option:hover { background: var(--bg-2); }
.co-option.is-active { border-color: var(--primary); background: var(--primary-bg); }
.co-option input { margin: 0; accent-color: var(--primary); }
.co-option-icon { font-size: 22px; color: var(--vision); }
.co-option-body { flex: 1; min-width: 0; }
.co-option-label { font-size: 13.5px; font-weight: 600; color: var(--text); }
.co-option-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.co-option-price { font-family: var(--font-mono); font-weight: 700; font-size: 13px; color: var(--text); flex-shrink: 0; }

.co-review-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--bg-2); border-radius: 10px; margin-bottom: 12px; }
.co-review-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--vision-bg); color: var(--vision); display: inline-flex; align-items: center; justify-content: center; }
.co-review-icon .ti { font-size: 22px; }
.co-review-title { font-size: 13.5px; font-weight: 600; }
.co-review-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.co-review-price { font-family: var(--font-mono); font-weight: 700; }
.co-review-block { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; }
.co-review-block-title { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.co-review-block-body { font-size: 12.5px; color: var(--text-2); line-height: 1.55; }
.co-review-totals { margin-top: 12px; padding: 12px 14px; background: var(--primary-bg); border-radius: 10px; }
.co-review-line { display: flex; justify-content: space-between; font-size: 12.5px; padding: 2px 0; color: var(--text-2); }
.co-review-line b { font-family: var(--font-mono); }
.co-review-total { padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--primary-bd); font-size: 14px; color: var(--primary); }
.co-review-total b { font-size: 16px; font-weight: 700; color: var(--primary); }

.co-done { text-align: center; padding: 12px 0 6px; }
.co-done-ring { width: 84px; height: 84px; border-radius: 50%; background: var(--health-bg); color: var(--health); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; animation: coDonePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.co-done-ring .ti { font-size: 44px; }
@keyframes coDonePop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.co-done-title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; color: var(--text); }
.co-done-sub { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); margin-top: 6px; }
.co-done-text { font-size: 13px; color: var(--text-2); line-height: 1.55; margin-top: 14px; max-width: 42ch; margin-left: auto; margin-right: auto; }

/* Client-side "Meine Bestellungen" card list */
.client-order-card { background: var(--paper); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.client-order-head { display: flex; align-items: center; gap: 12px; }
.client-order-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--vision-bg); color: var(--vision); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.client-order-icon .ti { font-size: 20px; }
.client-order-title { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.client-order-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.client-order-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--text-2); }
.client-order-meta > div { display: flex; align-items: center; gap: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-order-meta .ti { color: var(--text-3); font-size: 12px; flex-shrink: 0; }
.client-order-foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }

/* Cohort/analytics widget — doctor-side Vision feature */
.cohort-stat {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.cohort-stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.cohort-stat-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  margin-top: 4px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.cohort-stat-delta {
  font-family: var(--font-mono);
  font-size: 11px;
  margin-top: 4px;
  color: var(--health);
}
.cohort-stat-delta.down { color: var(--danger); }
.cohort-stat-delta .ti { font-size: 12px; }

/* Audit log row — admin-side Vision feature */
.audit-row {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  align-items: center;
}
.audit-row:last-child { border-bottom: 0; }
.audit-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}
.audit-actor { color: var(--text); font-weight: 500; }
.audit-action { color: var(--text-2); }
.audit-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--bg-2);
  padding: 3px 8px;
  border-radius: 99px;
}
.audit-tag.severity-info  { background: var(--primary-bg); color: var(--primary); }
.audit-tag.severity-warn  { background: var(--warn-bg);    color: var(--warn); }
.audit-tag.severity-error { background: var(--danger-bg);  color: var(--danger); }

/* ── AI trust indicators — Vision-only Arzt-Bot UX
   Workshop-2-Hauptsorge: Halluzinationen. Vision macht sichtbar,
   woher eine Antwort kommt + wie sicher das LLM ist + wann eine
   Frage durch den Negativ-Prompt-Layer blockiert wurde. */
.bot-trust-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-top: 6px;
}
.bot-confidence {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  background: var(--health-bg);
  color: var(--health);
}
.bot-confidence .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--health);
}
.bot-confidence.medium { background: var(--warn-bg);   color: var(--warn); }
.bot-confidence.medium .dot { background: var(--warn); }
.bot-confidence.low    { background: var(--danger-bg); color: var(--danger); }
.bot-confidence.low .dot { background: var(--danger); }

.bot-cite {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--bg-2);
  color: var(--text-2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.bot-cite:hover { background: var(--paper); color: var(--text); }
.bot-cite .ti { font-size: 10px; }

.bubble-refused {
  background: var(--danger-bg) !important;
  border: 1px solid var(--danger-bd);
  color: var(--danger);
}
.bubble-refused::before {
  content: '\f658';   /* ti-shield-x */
  font-family: 'tabler-icons';
  margin-right: 6px;
  font-size: 14px;
}

/* ── DNA sample tracker — Vision client widget
   Shows the workshop's sample flow: order → ship → lab → result.
   Visual progress bar with stages. */
.sample-tracker {
  background: var(--paper);
  border: 1px solid var(--vision-bd);
  border-radius: var(--radius);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}
.sample-tracker::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--vision) 0%, var(--primary) 100%);
}
.sample-tracker-head {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 14px;
  margin-bottom: 14px;
}
.sample-tracker-head .ti { color: var(--vision); font-size: 18px; }
.sample-tracker-stages {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  position: relative;
}
.sample-stage {
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  text-align: center;
  position: relative;
}
.sample-stage-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--text-3);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
  border: 2px solid var(--border);
  z-index: 2;
  transition: all 0.2s;
}
.sample-stage.done .sample-stage-dot {
  background: var(--health);
  border-color: var(--health);
  color: white;
}
.sample-stage.active .sample-stage-dot {
  background: var(--vision);
  border-color: var(--vision);
  color: white;
  box-shadow: 0 0 0 4px var(--vision-bg);
}
.sample-stage-label {
  font-size: 10px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 500;
}
.sample-stage.done .sample-stage-label,
.sample-stage.active .sample-stage-label { color: var(--text); }
.sample-stage-when {
  font-size: 10px;
  color: var(--text-3);
  margin-top: -2px;
}
/* Connector line behind dots */
.sample-tracker-stages::before {
  content: '';
  position: absolute;
  top: 13px; left: 12.5%; right: 12.5%;
  height: 2px;
  background: var(--border);
  z-index: 1;
}
.sample-tracker-progress {
  position: absolute;
  top: 13px; left: 12.5%;
  height: 2px;
  background: linear-gradient(90deg, var(--health), var(--vision));
  z-index: 1;
  transition: width 0.3s;
}

/* ── Doctor-bot quick access on patient list rows ─────────── */
.quick-bot-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  font-family: inherit;
  flex-shrink: 0;
}
.quick-bot-btn:hover {
  background: var(--accent-bg);
  border-color: var(--accent);
}
.quick-bot-btn i { font-size: 15px; }

/* Doctor-bot expand & fullscreen modes (Vision) */
.doctor-bot.is-expanded,
aside.is-expanded {
  grid-column: 1 / -1;
}
.doctor-bot.is-expanded {
  border: 1px solid var(--accent-bd, var(--border));
  box-shadow: 0 12px 40px -20px rgba(28, 43, 58, 0.18);
}
.doctor-bot.is-fullscreen,
aside.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 500;
  margin: 0;
  border-radius: 0;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  padding: 20px 28px;
  overflow: hidden;
}
.doctor-bot.is-fullscreen .doctor-bot-body {
  flex: 1;
  overflow-y: auto;
  max-height: none;
}
aside.is-fullscreen .doctor-bot {
  flex: 1;
  border: none;
  box-shadow: none;
  padding: 0;
}
aside.is-fullscreen .doctor-bot-body {
  flex: 1;
  overflow-y: auto;
  max-height: none;
}

/* ══════════════════════════════════════════════════════════════════
   Onboarding wizard — swissDNAcode profile setup (client)
   ══════════════════════════════════════════════════════════════════ */
.ob-shell { display: flex; flex-direction: column; gap: 14px; padding-bottom: 20px; }
.ob-progress-row { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.ob-progress-meta { display: inline-flex; align-items: baseline; gap: 6px; font-family: var(--font-mono); min-width: 88px; }
.ob-progress-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }
.ob-progress-count { font-size: 11px; font-weight: 600; color: var(--text); }

/* Wizard sticky head — pins progress row + dots to the top of the scroll area */
.ob-sticky-head { position: sticky; top: 0; z-index: 20; background: var(--bg); margin: 0 -18px; padding: 10px 18px 12px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--border); box-shadow: 0 4px 8px -6px rgba(0, 0, 0, 0.08); }

/* Post-100 % Profile view */
.ob-profile { display: flex; flex-direction: column; gap: 14px; padding-bottom: 24px; }
.ob-profile-head { display: flex; flex-direction: column; gap: 4px; padding: 0 4px; }
.ob-profile-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ob-profile-title h2 { margin: 0; font-family: var(--font-serif); font-size: 22px; font-weight: 600; }
.ob-profile-status { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 99px; }
.ob-profile-status.is-complete { background: var(--health-bg); color: var(--health); }
.ob-profile-status.is-partial { background: var(--warn-bg); color: var(--warn); }
.ob-profile-status .ti { font-size: 13px; }
.ob-profile-updated { font-size: 11px; color: var(--text-3); font-family: var(--font-mono); }
.ob-profile-sections { display: flex; flex-direction: column; gap: 8px; }
.ob-profile-section { border: 1px solid var(--border); border-radius: 14px; background: var(--paper); overflow: hidden; transition: box-shadow 0.15s, opacity 0.15s; }
.ob-profile-section.is-dimmed { opacity: 0.45; pointer-events: none; }
.ob-profile-section.is-editing { border-color: var(--primary); box-shadow: 0 2px 12px -6px var(--primary); }
.ob-profile-section-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px; cursor: pointer; user-select: none; }
.ob-profile-section.is-editing .ob-profile-section-head { cursor: default; }
.ob-profile-section-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--bg-2); color: var(--text-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ob-profile-section-icon .ti { font-size: 18px; }
.ob-profile-section-title { flex: 1; min-width: 0; }
.ob-profile-section-name { font-size: 13px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 6px; }
.ob-profile-section-preview { font-size: 11px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ob-profile-warn { display: inline-flex; align-items: center; gap: 3px; background: var(--warn-bg); color: var(--warn); font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 99px; }
.ob-profile-warn .ti { font-size: 11px; }
.ob-profile-edit { border: none; background: var(--bg-2); color: var(--text-2); width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: background 0.15s, color 0.15s; }
.ob-profile-edit:hover:not([disabled]) { background: var(--primary); color: white; }
.ob-profile-edit[disabled] { opacity: 0.35; cursor: not-allowed; }
.ob-profile-edit .ti { font-size: 15px; }
.ob-profile-chev { color: var(--text-3); font-size: 18px; flex-shrink: 0; }
.ob-profile-body { padding: 4px 14px 14px 14px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.ob-profile-field { display: flex; flex-direction: column; gap: 2px; padding-top: 8px; }
.ob-profile-field-label { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.ob-profile-field-value { font-size: 13px; color: var(--text); word-break: break-word; }
.ob-profile-field.is-missing .ob-profile-field-value { color: var(--warn); }
.ob-profile-empty { color: var(--text-3); font-style: italic; }
.ob-profile-consent-warn { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; background: var(--warn-bg); color: var(--warn); border-radius: 10px; font-size: 12px; line-height: 1.4; margin-top: 8px; }
.ob-profile-consent-warn .ti { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.ob-profile-edit-foot { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 8px; padding: 10px 0 4px 0; margin-top: 6px; background: linear-gradient(to bottom, transparent, var(--paper) 40%); }
.ob-profile-edit-foot .btn { flex: 1; justify-content: center; }
.ob-profile-foot { display: flex; justify-content: center; padding-top: 12px; }

/* Celebration overlay */
.ob-celebrate-backdrop { position: absolute; inset: 0; background: linear-gradient(180deg, var(--primary), var(--accent)); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 500; animation: obCelebFade 0.35s ease; }
@keyframes obCelebFade { from { opacity: 0; } to { opacity: 1; } }
.ob-celebrate { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; color: white; max-width: 300px; }
.ob-celebrate-ring { width: 92px; height: 92px; border-radius: 50%; background: rgba(255,255,255,0.18); border: 3px solid rgba(255,255,255,0.5); display: flex; align-items: center; justify-content: center; animation: obCelebPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.ob-celebrate-ring .ti { font-size: 46px; color: white; }
@keyframes obCelebPop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.ob-celebrate-eyebrow { font-family: var(--font-mono); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; opacity: 0.85; }
.ob-celebrate-num { font-family: var(--font-serif); font-size: 48px; font-weight: 700; line-height: 1; }
.ob-celebrate-sub { font-size: 13px; line-height: 1.5; opacity: 0.9; }
.ob-celebrate .btn { background: white; color: var(--primary); font-weight: 700; margin-top: 8px; }
.ob-celebrate .btn:hover { background: rgba(255,255,255,0.9); }

/* Dashboard tile progress bar — used by DNA-Profil vervollständigen */
.tile-progress-card { display: block; }
.tile-progress-card .tile-progress { display: flex; align-items: center; gap: 8px; margin: 8px 12px 12px 12px; }
.tile-progress-track { flex: 1; height: 6px; background: var(--bg-2); border-radius: 99px; overflow: hidden; }
.tile-progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 99px; transition: width 0.35s ease; }
.tile-progress-num { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--text-2); min-width: 34px; text-align: right; }
.tile-progress-card.is-complete .tile-progress-num { color: var(--health); }
.tile-progress-card.is-complete .tile-progress-fill { background: var(--health); }

.ob-progress-track { flex: 1; height: 6px; background: var(--bg-2); border-radius: 99px; overflow: hidden; }
.ob-progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 99px; transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.ob-progress-num { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--primary); min-width: 32px; text-align: right; }
.ob-dots-row { display: flex; gap: 6px; justify-content: space-between; padding: 4px; background: var(--bg-2); border-radius: 99px; }
.ob-dot { flex: 1; min-width: 0; padding: 5px 4px; border: none; background: transparent; border-radius: 99px; cursor: pointer; font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--text-3); transition: background 0.15s, color 0.15s; }
.ob-dot:hover { color: var(--text); }
.ob-dot.is-done { color: var(--health); }
.ob-dot.is-active { background: var(--primary); color: white; }
.ob-block-head { padding: 8px 4px 4px; }
.ob-block-eyebrow { font-family: var(--font-mono); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--primary); margin-bottom: 6px; }
.ob-eyebrow-mand { color: var(--health); background: var(--health-bg); padding: 1px 6px; border-radius: 99px; margin-left: 2px; }
.ob-block-head h2 { font-family: var(--font-display); font-weight: 500; font-size: 1.2rem; color: var(--text); margin: 0; line-height: 1.25; }
.ob-block-sub { font-size: 12.5px; color: var(--text-2); margin-top: 4px; line-height: 1.5; }
.ob-body { display: flex; flex-direction: column; gap: 12px; }
.ob-group { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px; }
.ob-group:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.ob-group-title { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); margin-bottom: 8px; }
.ob-field { padding: 12px 14px; background: var(--paper); border: 1px solid var(--border); border-radius: 10px; transition: border-color 0.15s, box-shadow 0.15s; }
.ob-field.is-answered { border-color: var(--health-bd); background: linear-gradient(180deg, var(--paper) 0%, rgba(74, 125, 90, 0.03) 100%); }
/* Required + still empty */
.ob-field.is-missing { border-color: var(--warn-bd); background: linear-gradient(180deg, var(--paper) 0%, var(--warn-bg) 100%); }
.ob-field.is-missing .ob-field-label::after { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); margin-left: 6px; vertical-align: middle; }
.ob-field.is-jump-target { animation: obJump 1.6s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 0 0 3px rgba(214, 158, 46, 0.28); }
@keyframes obJump { 0% { box-shadow: 0 0 0 0 rgba(214, 158, 46, 0.65); } 30% { box-shadow: 0 0 0 8px rgba(214, 158, 46, 0.35); } 100% { box-shadow: 0 0 0 3px rgba(214, 158, 46, 0); } }

/* Missing-required summary card */
.ob-missing-summary { background: linear-gradient(150deg, var(--warn-bg) 0%, var(--paper) 100%); border: 1px solid var(--warn-bd); border-left: 4px solid var(--warn); border-radius: 12px; padding: 14px 14px 10px; margin-bottom: 6px; }
.ob-missing-summary.is-almost { background: linear-gradient(150deg, var(--accent-bg) 0%, var(--paper) 100%); border-color: var(--accent-bd, var(--accent)); border-left-color: var(--accent); }
.ob-missing-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.ob-missing-head > .ti { color: var(--warn); font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.ob-missing-summary.is-almost .ob-missing-head > .ti { color: var(--accent); }
.ob-missing-title { font-family: var(--font-display); font-weight: 500; font-size: 14px; color: var(--text); line-height: 1.25; }
.ob-missing-sub { font-size: 11.5px; color: var(--text-2); line-height: 1.5; margin-top: 3px; }
.ob-missing-list { display: flex; flex-direction: column; gap: 6px; }
.ob-missing-item { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 12px; background: var(--paper); border: 1px solid var(--border); border-radius: 8px; font-family: inherit; cursor: pointer; text-align: left; transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s; }
.ob-missing-item:hover, .ob-missing-item:active { border-color: var(--warn); transform: translateY(-1px); box-shadow: 0 3px 10px -6px rgba(214, 158, 46, 0.35); }
.ob-missing-block { font-family: var(--font-mono); font-size: 10px; font-weight: 600; color: var(--warn); background: var(--warn-bg); padding: 2px 8px; border-radius: 99px; text-transform: uppercase; letter-spacing: 0.06em; }
.ob-missing-label { font-size: 12.5px; color: var(--text); line-height: 1.4; overflow-wrap: anywhere; }
.ob-missing-item .ti { color: var(--text-3); font-size: 14px; }
.ob-missing-more { font-size: 11px; color: var(--text-3); padding: 4px 12px; }
.ob-field-label { font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.4; margin-bottom: 4px; }
.ob-req { color: var(--danger); margin-left: 2px; font-weight: 700; }
.ob-field-hint { font-size: 11px; color: var(--text-3); margin-bottom: 8px; line-height: 1.4; }
.ob-input-wrap { position: relative; display: flex; align-items: center; }
.ob-field input[type="text"], .ob-field input[type="email"], .ob-field input[type="tel"], .ob-field input[type="date"], .ob-field input[type="time"], .ob-field input[type="number"], .ob-field select { flex: 1; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13.5px; font-family: inherit; color: var(--text); background: var(--paper); transition: border-color 0.15s, box-shadow 0.15s; width: 100%; box-sizing: border-box; }
.ob-field input:focus, .ob-field select:focus, .ob-field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,58,138,0.10); }
.ob-unit { position: absolute; right: 12px; color: var(--text-3); font-size: 12px; font-family: var(--font-mono); pointer-events: none; }
.ob-choice-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.ob-choice { padding: 6px 12px; border: 1px solid var(--border); background: var(--paper); color: var(--text-2); border-radius: 99px; font-size: 12px; font-family: inherit; cursor: pointer; transition: border-color 0.15s, background 0.15s, color 0.15s; }
.ob-choice:hover { border-color: var(--primary-bd); color: var(--text); }
.ob-choice.is-active { background: var(--primary); color: white; border-color: var(--primary); }
/* Locked when a "none/no" answer is selected — mutually exclusive with the rest */
.ob-choice.is-locked { opacity: 0.38; pointer-events: none; text-decoration: line-through; }
.ob-freetext-wrap { position: relative; margin-top: 8px; }
.ob-freetext { width: 100%; padding: 8px 40px 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 12.5px; font-family: inherit; color: var(--text); background: var(--bg-2); resize: vertical; min-height: 48px; box-sizing: border-box; }
.ob-mic { position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; border: none; background: var(--paper); border-radius: 50%; color: var(--primary); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.ob-mic:hover { background: var(--primary); color: white; }
.ob-scale, .ob-scale-row { display: flex; align-items: center; gap: 10px; }
.ob-scale-row { padding: 4px 0; }
.ob-scale-row > span:first-child { min-width: 100px; font-size: 12px; color: var(--text-2); }
.ob-scale input[type="range"], .ob-scale-row input[type="range"] { flex: 1; accent-color: var(--primary); }
.ob-scale-val { min-width: 22px; text-align: center; font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--primary); }
.ob-consent { padding: 0; overflow: hidden; }
.ob-consent > label { display: flex; gap: 10px; padding: 12px 14px; cursor: pointer; }
.ob-consent input[type="checkbox"] { margin-top: 3px; accent-color: var(--primary); flex-shrink: 0; width: 16px; height: 16px; }
.ob-consent-title { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3; margin-bottom: 6px; }
.ob-consent-text { font-size: 11.5px; color: var(--text-2); line-height: 1.55; }
.ob-consent-warn { border-color: var(--warn-bd); background: linear-gradient(180deg, var(--paper) 0%, var(--warn-bg) 100%); }
.ob-consent-warn .ob-consent-title { color: var(--warn); }
.ob-unlock { display: flex; flex-direction: column; gap: 14px; }
.ob-unlock-hero { text-align: center; padding: 22px 16px; background: linear-gradient(150deg, var(--primary-bg) 0%, var(--accent-bg) 100%); border: 1px solid var(--primary-bd); border-radius: 12px; }
.ob-unlock-hero .ti { font-size: 42px; color: var(--primary); margin-bottom: 8px; display: inline-block; }
.ob-unlock-hero h2 { font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; color: var(--text); margin: 0 0 4px; }
.ob-unlock-hero p { font-size: 12.5px; color: var(--text-2); margin: 0; line-height: 1.55; }
.ob-unlock-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.ob-unlock-tile { display: flex; gap: 10px; padding: 10px 12px; background: var(--paper); border: 1px solid var(--border); border-radius: 10px; font-size: 12px; min-width: 0; }
.ob-unlock-tile > div:last-child { min-width: 0; overflow-wrap: anywhere; }
.ob-unlock-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--primary-bg); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ob-unlock-desc { font-size: 10.5px; color: var(--text-3); margin-top: 2px; line-height: 1.4; }
.ob-unlock-hint { padding: 10px 12px; background: var(--bg-2); border-radius: 8px; font-size: 11.5px; color: var(--text-2); line-height: 1.5; display: flex; gap: 6px; align-items: flex-start; }
.ob-unlock-hint .ti { color: var(--accent); flex-shrink: 0; margin-top: 1px; }
.ob-nav { position: sticky; bottom: 0; padding: 14px 4px 6px; margin-top: 8px; background: var(--bg); display: flex; flex-direction: column; gap: 6px; z-index: 5; }
.ob-nav::before { content: ''; position: absolute; left: 0; right: 0; top: -20px; height: 20px; background: linear-gradient(180deg, transparent, var(--bg)); pointer-events: none; }
.ob-nav-side { display: flex; justify-content: center; }
.ob-nav-side .btn { background: transparent; color: var(--text-3); font-size: 12px; font-weight: 500; padding: 6px 10px; border: none; gap: 5px; }
.ob-nav-side .btn:hover { color: var(--text); background: var(--bg-2); }
.ob-nav-side .btn .ti { font-size: 13px; opacity: 0.7; }
.ob-nav-row { display: flex; gap: 8px; align-items: center; }
.ob-nav-row .btn { flex: 1; justify-content: center; min-width: 0; }
.ob-nav-row .btn:first-child { flex: 0 0 auto; }

/* ══════════════════════════════════════════════════════════════════
   Boot screens — login + DNA-upload intro (client boot flow)
   ══════════════════════════════════════════════════════════════════ */
.boot-screen { padding: 24px 18px 20px; min-height: 100%; display: flex; flex-direction: column; gap: 18px; }
.boot-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 20px 0 8px; }
.boot-brand-sm { flex-direction: row; text-align: left; padding: 0 0 8px; gap: 12px; }
.boot-brand-sm > div { text-align: left; }
.boot-brand-mark { width: 52px; height: 52px; border-radius: 16px; background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 500; font-size: 22px; flex-shrink: 0; box-shadow: 0 6px 20px -8px rgba(30, 58, 138, 0.4); }
.boot-brand-sm .boot-brand-mark { width: 42px; height: 42px; font-size: 18px; border-radius: 12px; }
.boot-brand-name { font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; letter-spacing: -0.01em; color: var(--text); }
.boot-brand-name em { font-style: italic; color: var(--primary); font-weight: 500; }
.boot-brand-tag { font-family: var(--font-mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); }
.boot-form { display: flex; flex-direction: column; gap: 12px; }
.boot-field { display: flex; flex-direction: column; gap: 5px; }
.boot-field label { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.boot-field input { padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; font-family: inherit; color: var(--text); background: var(--paper); transition: border-color 0.15s, box-shadow 0.15s; }
.boot-field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12); }
.boot-primary { margin-top: 6px; padding: 12px 16px; justify-content: center; font-size: 14px; }
.boot-row { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.boot-row a { color: var(--primary); text-decoration: none; font-weight: 500; }
.boot-row a:hover { text-decoration: underline; }
.boot-legal { margin-top: auto; padding: 10px 12px; background: var(--bg-2); border-radius: 8px; font-size: 11px; color: var(--text-3); line-height: 1.5; display: flex; gap: 6px; align-items: flex-start; }
.boot-legal .ti { color: var(--health); flex-shrink: 0; margin-top: 1px; }
.boot-intro { padding: 4px 0; }
.boot-intro h1 { font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; color: var(--text); line-height: 1.25; margin: 0 0 6px; }
.boot-intro p { font-size: 13px; color: var(--text-2); line-height: 1.6; margin: 0; }
.boot-upload-options { display: flex; flex-direction: column; gap: 10px; }
.boot-option { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; background: var(--paper); border: 1px solid var(--border); border-radius: 12px; text-align: left; cursor: pointer; font-family: inherit; transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s; }
.boot-option:hover, .boot-option:active { border-color: var(--primary-bd); transform: translateY(-1px); box-shadow: 0 4px 14px -8px rgba(30, 58, 138, 0.2); }
.boot-option-quiet { background: var(--bg-2); }
.boot-option-icon { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.boot-option-title { font-size: 13.5px; font-weight: 500; color: var(--text); line-height: 1.35; }
.boot-option-sub { font-size: 11.5px; color: var(--text-3); margin-top: 3px; line-height: 1.4; }
.boot-option > .ti { color: var(--text-3); }

/* ══════════════════════════════════════════════════════════════════
   Feature gates — locked state on dashboard tiles + bottom nav.
   Applied via data-gate="<feature>" + .is-locked from sddApplyFeatureGates().
   ══════════════════════════════════════════════════════════════════ */
.tile-lock { display: none; font-size: 16px; color: var(--text-3); margin-left: 4px; }
.tile[data-gate].is-locked { cursor: not-allowed; background: linear-gradient(180deg, var(--paper) 0%, var(--bg-2) 100%); border-color: var(--border); }
.tile[data-gate].is-locked .tile-icon { filter: grayscale(0.6); opacity: 0.65; }
.tile[data-gate].is-locked .tile-title,
.tile[data-gate].is-locked .tile-sub { color: var(--text-3); }
.tile[data-gate].is-locked .tile-arrow { display: none; }
.tile[data-gate].is-locked .tile-lock { display: inline-block; color: var(--text-3); }
.bottom-nav-item[data-gate].is-locked { opacity: 0.42; cursor: not-allowed; }

/* ══════════════════════════════════════════════════════════════════
   Autocomplete typeahead — Geburtsort, Geburtsland, Beruf
   ══════════════════════════════════════════════════════════════════ */
.ob-autocomplete { position: relative; }
.ob-autocomplete input { padding-left: 36px !important; }
.ob-ac-search { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 15px; pointer-events: none; }
.ob-ac-list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--paper); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px -8px rgba(28, 43, 58, 0.18); max-height: 220px; overflow-y: auto; z-index: 30; padding: 4px; display: none; }
.ob-ac-list.is-open { display: block; }
.ob-ac-item { display: block; width: 100%; text-align: left; padding: 8px 10px; border: none; background: transparent; color: var(--text); font-size: 13px; font-family: inherit; border-radius: 6px; cursor: pointer; transition: background 0.12s, color 0.12s; }
.ob-ac-item:hover { background: var(--primary-bg); color: var(--primary); }
.ob-ac-item mark { background: transparent; color: var(--primary); font-weight: 600; }

/* Doc detail — kind-specific content when the user hits "Öffnen" */
.doc-detail-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; color: var(--primary); font-weight: 500; padding: 4px 10px; }
.doc-detail-block { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--paper); margin-bottom: 10px; }
.doc-detail-eyebrow { font-family: var(--font-mono); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 8px; }
.doc-detail-text { font-size: 13px; color: var(--text-2); line-height: 1.6; margin: 0; }
.doc-snp { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--bg-2); font-size: 13px; color: var(--text); }
.doc-snp:last-child { border-bottom: none; }
.doc-snp b { font-weight: 600; }
.doc-snp-tag { padding: 2px 8px; background: var(--bg-2); border-radius: 99px; font-size: 11px; color: var(--text-3); font-weight: 500; }
.doc-blood { width: 100%; border-collapse: collapse; font-size: 13px; }
.doc-blood td { padding: 8px 6px; border-bottom: 1px solid var(--bg-2); color: var(--text); }
.doc-blood tr:last-child td { border-bottom: none; }
.doc-blood-val { font-family: var(--font-mono); font-weight: 600; text-align: right; }
.doc-blood-ref { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.doc-kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--bg-2); font-size: 13px; }
.doc-kv:last-child { border-bottom: none; }
.doc-kv > span:first-child { color: var(--text-3); font-size: 12px; }
.doc-kv b { color: var(--text); font-weight: 500; }
.doc-plan-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; color: var(--text); }
.doc-plan-item .ti { color: var(--health); font-size: 15px; }

/* Add-finding modal — kind selector chips */
.af-kind-chip { cursor: pointer; font-family: inherit; border: 1px solid var(--border); background: var(--paper); color: var(--text-2); transition: color 0.15s, background 0.15s, border-color 0.15s; }
.af-kind-chip:hover:not(.is-active) { color: var(--text); background: var(--bg-2); }
.af-kind-chip.is-active { background: var(--primary); color: white; border-color: var(--primary); }
.af-kind-chip.is-active .ti { color: white; }

/* ── Academy admin (ported from V1) — stats, filter chips, video table, preview modal ── */
/* ── Academy admin — stats + filter chips + video table ──── */
.academy-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.academy-stat-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  min-height: 90px;
}
.academy-stat-label {
  font-size: 12px;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  margin-bottom: 8px;
}
.academy-stat-label .ti { font-size: 14px; color: var(--text-3); }
.academy-stat-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.1;
}
.academy-stat-num.academy-stat-title {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  padding-top: 4px;
}
.academy-stat-sub {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 4px;
}
.academy-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.academy-filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--text-2);
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  font-family: inherit;
}
.academy-filter-chip:hover:not(.is-active) { color: var(--text); background: var(--bg-2); }
.academy-filter-chip.is-active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.academy-table-wrap {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.academy-table-head,
.academy-row {
  display: grid;
  grid-template-columns: minmax(0, 2.4fr) minmax(120px, 1fr) 90px 90px 90px 128px;
  gap: 16px;
  align-items: center;
  padding: 12px 18px;
}
.academy-table-head {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.academy-row {
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
.academy-row:hover { background: var(--bg-2); }
.academy-row:last-child { border-bottom: none; }
.academy-row-video {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.academy-row-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--primary-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  position: relative;
}
.academy-row-star {
  position: absolute;
  top: -4px; right: -4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--warn);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
}
.academy-row-star .ti { font-size: 9px; }
.academy-row-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.academy-row-presenter {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 2px;
}
.academy-row-cell {
  font-size: 13px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.academy-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.academy-icon-btn {
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--paper);
  color: var(--text-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  font-family: inherit;
}
.academy-icon-btn:hover { background: var(--bg-2); }
.academy-icon-btn.preview:hover { color: var(--accent); border-color: var(--accent); }
.academy-icon-btn.edit:hover  { color: var(--primary); border-color: var(--primary); }
.academy-icon-btn.delete { color: var(--danger); border-color: rgba(168,81,58,0.35); }
.academy-icon-btn.delete:hover { background: rgba(168,81,58,0.08); border-color: var(--danger); }

/* Meta tiles inside the desktop preview modal */
.video-meta-tile {
  padding: 10px 12px;
  background: var(--bg-2);
  border-radius: var(--radius);
  min-width: 0;
}
.video-meta-tile-label {
  font-size: 10.5px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 4px;
}
.video-meta-tile-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

/* Desktop preview reuses .video-detail-thumb from client — copy here so admin.html can use it too */
.sd-modal-head .video-detail-thumb {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sd-modal-head .video-detail-emoji { font-size: 22px; }
.academy-empty {
  padding: 40px 18px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}
.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 13px;
  padding: 0;
  font-family: inherit;
  text-decoration: underline;
}
@media (max-width: 900px) {
  .academy-table-head { display: none; }
  .academy-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "video actions"
      "meta  meta";
    gap: 10px 12px;
    padding: 14px 16px;
  }
  .academy-row > *:nth-child(1) { grid-area: video; }
  .academy-row > *:nth-child(6) { grid-area: actions; align-self: start; }
  .academy-row > *:nth-child(2),
  .academy-row > *:nth-child(3),
  .academy-row > *:nth-child(4),
  .academy-row > *:nth-child(5) {
    grid-area: meta;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    color: var(--text-3);
  }
  .academy-row > *:nth-child(2),
  .academy-row > *:nth-child(5) {
    display: inline-flex;
  }
  .academy-row .academy-row-cell::before {
    content: attr(data-label);
    color: var(--text-3);
    margin-right: 4px;
  }
}


/* ===== Patient-file tabs (doctor view · per patient) ===== */
.ptab-bar {
  display: flex; gap: 2px; flex-wrap: wrap;
  margin-bottom: 18px; border-bottom: 1px solid var(--border);
}
.ptab {
  appearance: none; background: transparent; border: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  padding: 9px 15px; font-family: inherit; font-size: 13px; font-weight: 500;
  color: var(--text-2); cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px;
  border-radius: 8px 8px 0 0; transition: color .15s, background .15s, border-color .15s;
}
.ptab i { font-size: 15px; }
.ptab:hover { color: var(--text); background: var(--bg-2); }
.ptab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.ptab-panel { display: none; }
.ptab-panel.active { display: block; animation: sdRowIn .22s cubic-bezier(0.16,1,0.3,1); }
@media (max-width: 640px) {
  .ptab-bar { gap: 0; }
  .ptab { padding: 8px 11px; font-size: 12.5px; }
}
