/* Fayztoo — Harley Street palette. Deep, warm, premium. Not clinical, not generic-tech. */
:root, [data-theme="dark"] {
  /* Surfaces — deep navy with warmth, not cold blue */
  --bg-0: #0e1622;            /* Window */
  --bg-1: #14202e;            /* Card */
  --bg-2: #1c2c3d;            /* Card-secondary */
  --bg-3: #25394e;            /* Hover */
  --bg-4: #314c66;            /* Selected */

  /* Borders */
  --border: #2a3e54;
  --border-hi: #3f5b78;
  --border-soft: #1f2f42;

  /* Text — warm whites, not pure white */
  --text-0: #f6efe1;          /* Cream — primary */
  --text-1: #d4ccbc;          /* Muted cream */
  --text-2: #8e9aac;          /* Slate */
  --text-3: #5e6a7c;          /* Tertiary */

  /* Brand — brass + sage */
  --brass: #c8a86b;           /* Accent — warm gold-brass */
  --brass-soft: #c8a86b1f;
  --brass-hi: #d9bd83;
  --sage: #7fa897;            /* Secondary — muted sage */
  --sage-soft: #7fa8971f;

  /* Severity */
  --care: #c8a86b;            /* Where the AI calls attention */
  --warning: #e0b970;
  --critical: #c47b7b;        /* Muted red, not alarming */
  --critical-soft: #c47b7b1f;

  /* Pillar colours — each pillar has its own accent */
  --pi-color: #c8a86b;        /* Brass — the lead */
  --mindset-color: #b08fc4;   /* Lavender */
  --physical-color: #7fa897;  /* Sage */
  --connection-color: #d4978a;/* Warm coral */

  --shadow-sm: 0 1px 3px rgba(0,0,0,.5);
  --shadow-md: 0 4px 16px rgba(0,0,0,.55);
  --shadow-lg: 0 12px 48px rgba(0,0,0,.6);
  --radius: 10px;
  --radius-lg: 14px;

  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg-0);
  color: var(--text-0);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brass); text-decoration: none; }
a:hover { color: var(--brass-hi); }

button {
  font-family: inherit; font-size: 14px;
  background: var(--bg-2);
  color: var(--text-0);
  border: 1px solid var(--border);
  padding: 9px 16px;
  border-radius: 7px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
button:hover:not(:disabled) { background: var(--bg-3); border-color: var(--border-hi); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary {
  background: var(--brass); color: #1a1408; border-color: var(--brass);
  font-weight: 600;
}
button.primary:hover:not(:disabled) { background: var(--brass-hi); border-color: var(--brass-hi); }
button.ghost {
  background: transparent; border-color: var(--border);
}
button.ghost:hover:not(:disabled) { background: var(--bg-2); }
.subtle-btn {
  font-size: 12px; padding: 5px 10px; background: transparent;
  border: 1px solid var(--border); color: var(--text-2);
}
.subtle-btn:hover { color: var(--text-0); border-color: var(--border-hi); }

input, textarea, select {
  font-family: inherit; font-size: 14px;
  background: var(--bg-2); color: var(--text-0);
  border: 1px solid var(--border); padding: 11px 14px;
  border-radius: 8px; width: 100%; outline: none;
  transition: border-color .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--brass); }
input::placeholder, textarea::placeholder { color: var(--text-3); }

/* ─── Layout ────────────────────────────────────────────────────────────── */
.app {
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-rows: auto auto 1fr auto;
  grid-template-areas:
    "header header"
    "non-medical non-medical"
    "sidebar main"
    "footer footer";
  min-height: 100vh;
}
.app.no-sidebar {
  grid-template-columns: 1fr;
  grid-template-areas:
    "header"
    "non-medical"
    "main"
    "footer";
}

.header {
  grid-area: header;
  padding: 16px 28px;
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
  border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 10;
}
.brand {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-display);
  font-size: 24px; font-weight: 500; letter-spacing: -0.3px;
  color: var(--text-0);
}
.brand .mark {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brass) 0%, #8e7440 100%);
  display: flex; align-items: center; justify-content: center;
  color: #1a1408; font-weight: 600; font-size: 18px;
  font-family: var(--font-display);
  box-shadow: 0 2px 8px rgba(200, 168, 107, 0.25);
}
.brand .tag {
  font-family: var(--font-body);
  font-size: 11px; color: var(--text-2); font-weight: 500;
  padding: 4px 11px; background: transparent;
  border: 1px solid var(--border); border-radius: 999px;
  letter-spacing: .4px; text-transform: uppercase;
}
.user-chip {
  font-size: 13px; color: var(--text-1);
  background: var(--bg-2); border: 1px solid var(--border);
  padding: 8px 14px; border-radius: 999px;
  display: flex; align-items: center; gap: 8px;
}
.user-chip-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--sage), #5d8576);
  color: #0a1a14; font-weight: 600; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}

/* ─── Non-medical strip ──────────────────────────────────────────────── */
.non-medical-strip {
  grid-area: non-medical;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border-soft);
  padding: 10px 28px;
  font-size: 12px;
  color: var(--text-2);
  text-align: center;
  line-height: 1.5;
}
.non-medical-strip strong { color: var(--brass); margin-right: 6px; font-weight: 600; }
.non-medical-strip a { color: var(--brass); }

/* ─── Sidebar (Wellbeing Team panel) ─────────────────────────────────── */
.sidebar {
  grid-area: sidebar;
  background: var(--bg-1);
  border-right: 1px solid var(--border-soft);
  padding: 28px 20px;
  overflow-y: auto;
}
.sidebar-section {
  margin-bottom: 28px;
}
.sidebar-label {
  font-size: 10.5px; color: var(--text-2);
  text-transform: uppercase; letter-spacing: .8px;
  font-weight: 600; margin-bottom: 14px;
  padding-left: 4px;
}
.sidebar-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; margin-bottom: 4px;
  border-radius: 8px; cursor: pointer;
  font-size: 14px; color: var(--text-1);
  border: 1px solid transparent;
  transition: all .15s;
}
.sidebar-item:hover { background: var(--bg-2); color: var(--text-0); }
.sidebar-item.active {
  background: var(--bg-2); color: var(--text-0);
  border-color: var(--border);
}
.sidebar-item-icon {
  width: 26px; height: 26px; border-radius: 6px;
  background: var(--bg-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
}
.sidebar-item.active .sidebar-item-icon {
  background: var(--brass); color: #1a1408;
}
.sidebar-team {
  margin-top: 8px;
  padding: 16px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--border-soft);
}
.team-companion {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 0; border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
}
.team-companion:last-child { border-bottom: 0; }
.team-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto;
}
.team-dot.pi { background: var(--pi-color); }
.team-dot.mindset { background: var(--mindset-color); }
.team-dot.physical { background: var(--physical-color); }
.team-dot.connection { background: var(--connection-color); }
.team-name { flex: 1; font-weight: 500; color: var(--text-0); }
.team-status {
  font-size: 10px; color: var(--text-2);
  text-transform: uppercase; letter-spacing: .5px; font-weight: 600;
}
.team-status.active { color: var(--brass); }
.team-status.coming { color: var(--text-3); }
.sidebar-cta {
  margin-top: 24px; padding: 14px 16px;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  border-radius: 10px; border: 1px solid var(--border-soft);
  font-size: 12px; line-height: 1.5; color: var(--text-1);
}
.sidebar-cta strong { color: var(--brass); display: block; margin-bottom: 6px; font-size: 12.5px; }

/* ─── Main ───────────────────────────────────────────────────────────── */
.main {
  grid-area: main;
  padding: 36px 44px;
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
}
.page-title {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 500; margin: 0 0 8px;
  letter-spacing: -0.5px;
  color: var(--text-0);
}
.page-subtitle {
  font-size: 15px; color: var(--text-2); margin: 0 0 32px;
  max-width: 640px;
}

.card {
  background: var(--bg-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}
.card h3 {
  margin: 0 0 16px; font-size: 16px; font-weight: 600;
  font-family: var(--font-body);
  color: var(--text-0);
  letter-spacing: -0.1px;
}
.card h3.display {
  font-family: var(--font-display); font-weight: 500;
  font-size: 22px; letter-spacing: -0.2px;
}

/* ─── Assessment ─────────────────────────────────────────────────────── */
.q { margin-bottom: 28px; }
.q-prompt {
  display: block; margin-bottom: 14px;
  font-size: 16px; line-height: 1.55; color: var(--text-0);
  font-weight: 400;
}
.q-aspect-tag {
  display: inline-block; font-size: 10px;
  color: var(--brass); background: var(--brass-soft);
  padding: 3px 10px; border-radius: 999px;
  letter-spacing: .6px; text-transform: uppercase;
  font-weight: 600; margin-bottom: 10px;
}
.likert { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.likert button {
  padding: 12px 6px; font-size: 13px;
  background: var(--bg-2); border-color: var(--border-soft);
}
.likert button.selected {
  background: var(--brass); color: #1a1408;
  border-color: var(--brass); font-weight: 600;
}
.likert-labels {
  display: flex; justify-content: space-between;
  margin-top: 8px; font-size: 11px; color: var(--text-3);
  letter-spacing: .3px;
}

.choice-list { display: flex; flex-direction: column; gap: 8px; }
.choice-btn {
  text-align: left; padding: 14px 16px;
  background: var(--bg-2); border-color: var(--border-soft);
}
.choice-btn.selected {
  background: var(--brass); color: #1a1408;
  border-color: var(--brass); font-weight: 500;
}

/* ─── Insights ───────────────────────────────────────────────────────── */
.insights { display: flex; flex-direction: column; gap: 14px; margin: 20px 0 6px; }
.insight {
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--brass);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  font-size: 14.5px; line-height: 1.65;
  color: var(--text-1);
}
.insight.warning { border-left-color: var(--warning); }
.insight.somatic { border-left-color: var(--mindset-color); }
.insight.pattern { border-left-color: var(--sage); }
.insight.mindset { border-left-color: var(--connection-color); }
.insight strong { color: var(--text-0); font-weight: 600; }
.insight em { color: var(--text-0); font-style: italic; }
.insight .tone-label {
  display: inline-block; font-size: 10px; letter-spacing: .8px;
  text-transform: uppercase; font-weight: 600;
  color: var(--text-3); margin-bottom: 8px;
}

/* ─── Progress + radar ───────────────────────────────────────────────── */
.progress-bar {
  width: 100%; height: 4px; background: var(--bg-2);
  border-radius: 2px; margin-bottom: 24px; overflow: hidden;
}
.progress-fill { height: 100%; background: var(--brass); transition: width .3s; }

.radar-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 18px 0;
}
.radar { width: 320px; height: 320px; }
.radar-grid { stroke: var(--border-soft); stroke-width: 1; fill: none; }
.radar-axis { stroke: var(--border); stroke-width: 1; }
.radar-poly { fill: var(--brass-soft); stroke: var(--brass); stroke-width: 2; }
.radar-dot { fill: var(--brass); }
.radar-label {
  font-family: var(--font-body); font-size: 11px;
  fill: var(--text-1); text-transform: uppercase; letter-spacing: .5px;
  font-weight: 600;
}
.radar-value { font-size: 14px; fill: var(--text-0); font-weight: 600; }

/* ─── Phase row ──────────────────────────────────────────────────────── */
.phase-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.phase-card {
  background: var(--bg-2); border: 1px solid var(--border-soft);
  border-radius: 10px; padding: 16px 14px; text-align: center;
  transition: all .2s;
}
.phase-card.active {
  border-color: var(--brass); background: linear-gradient(180deg, var(--brass-soft), var(--bg-2));
}
.phase-card .phase-name {
  font-size: 11px; color: var(--text-2);
  text-transform: uppercase; letter-spacing: .6px;
  margin-bottom: 10px; min-height: 30px;
  font-weight: 600;
}
.phase-card.active .phase-name { color: var(--brass); }
.phase-card .phase-score {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 500; margin-bottom: 10px;
  color: var(--text-0);
}
.phase-card .phase-bar { width: 100%; height: 3px; background: var(--bg-3); border-radius: 2px; overflow: hidden; }
.phase-card .phase-bar-fill { height: 100%; background: var(--brass); transition: width .4s; }

/* ─── Protocol ───────────────────────────────────────────────────────── */
.protocol { display: flex; flex-direction: column; gap: 12px; }
.protocol-week {
  background: var(--bg-2); border: 1px solid var(--border-soft);
  border-radius: 10px; padding: 16px 20px;
  transition: border-color .15s;
}
.protocol-week:hover { border-color: var(--border-hi); }
.protocol-week-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 12px; }
.protocol-week-num {
  font-size: 11px; color: var(--brass); background: var(--brass-soft);
  padding: 4px 11px; border-radius: 999px; letter-spacing: .5px;
  text-transform: uppercase; font-weight: 600;
}
.protocol-week-title {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 500; color: var(--text-0);
  letter-spacing: -0.1px;
}
.protocol-week ul { margin: 0; padding-left: 20px; }
.protocol-week li {
  margin-bottom: 8px; font-size: 14px;
  line-height: 1.6; color: var(--text-1);
}

/* ─── Chunks ─────────────────────────────────────────────────────────── */
.chunk-list { display: flex; flex-direction: column; gap: 6px; }
.chunk-pill {
  display: flex; gap: 12px; align-items: center;
  padding: 12px 16px; background: var(--bg-2);
  border: 1px solid var(--border-soft); border-radius: 8px;
  font-size: 13.5px;
}
.chunk-pill.real { border-left: 3px solid var(--sage); }
.chunk-pill.synthetic { border-left: 3px solid var(--brass); }
.chunk-pill.stub { border-left: 3px solid var(--warning); }
.chunk-pill code {
  color: var(--brass); font-family: ui-monospace, monospace;
  font-size: 11.5px; background: var(--bg-3);
  padding: 3px 8px; border-radius: 4px; font-weight: 600;
}
.chunk-pill-title { flex: 1; color: var(--text-1); }
.chunk-pill-status {
  font-size: 10px; text-transform: uppercase; letter-spacing: .6px;
  color: var(--text-3); font-weight: 600;
}
.chunk-pill.real .chunk-pill-status { color: var(--sage); }
.chunk-pill.synthetic .chunk-pill-status { color: var(--brass); }
.chunk-pill.stub .chunk-pill-status { color: var(--warning); }

/* ─── Chat ───────────────────────────────────────────────────────────── */
.chat {
  display: flex; flex-direction: column;
  height: calc(100vh - 320px); max-height: 740px;
}
.chat-messages {
  flex: 1; overflow-y: auto;
  padding: 20px 24px;
  background: var(--bg-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border-bottom: none;
}
.msg { margin-bottom: 22px; display: flex; gap: 12px; }
.msg.user { justify-content: flex-end; }
.msg-bubble {
  max-width: 82%; padding: 14px 18px;
  border-radius: 14px; font-size: 14.5px; line-height: 1.65;
}
.msg.assistant .msg-bubble {
  background: var(--bg-2); border: 1px solid var(--border-soft);
  color: var(--text-0);
}
.msg.user .msg-bubble {
  background: var(--brass); color: #1a1408;
  font-weight: 500;
}
.msg-bubble strong { color: var(--text-0); font-weight: 600; }
.msg.user .msg-bubble strong { color: #1a1408; }
.msg-chunks {
  font-size: 11px; color: var(--text-3);
  margin-top: 8px; padding-left: 4px;
  letter-spacing: .3px;
}
.msg-chunks code {
  font-family: ui-monospace, monospace;
  color: var(--brass); background: var(--bg-2);
  padding: 2px 7px; border-radius: 3px; font-size: 10.5px;
  margin-right: 4px;
}

.chat-input {
  display: flex; gap: 10px; padding: 16px 20px;
  background: var(--bg-1); border: 1px solid var(--border-soft);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.chat-input textarea {
  resize: none; min-height: 48px; max-height: 140px;
  border-radius: 8px;
}

.chat-companion-strip {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px;
  background: var(--bg-1);
  border: 1px solid var(--border-soft);
  border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.chat-companion-strip + .chat .chat-messages {
  border-radius: 0;
  border-top: 1px solid var(--border-soft);
}
.chat-companion-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brass), #8e7440);
  display: flex; align-items: center; justify-content: center;
  color: #1a1408; font-weight: 600; font-size: 14px;
  font-family: var(--font-display);
}
.chat-companion-name {
  font-family: var(--font-display); font-size: 18px;
  font-weight: 500; color: var(--text-0); letter-spacing: -0.1px;
}
.chat-companion-role {
  font-size: 12px; color: var(--text-2);
  margin-top: 2px;
}

/* ─── Banners ────────────────────────────────────────────────────────── */
.banner {
  padding: 16px 20px; border-radius: 10px; margin-bottom: 20px;
  font-size: 14px; display: flex; gap: 12px; align-items: flex-start;
  line-height: 1.55;
}
.banner.handoff { background: var(--critical-soft); border: 1px solid var(--critical); color: var(--text-0); }
.banner.handoff strong { color: var(--critical); }
.banner.info { background: var(--brass-soft); border: 1px solid var(--brass); color: var(--text-0); }
.banner.info strong { color: var(--brass); }

.subtle { color: var(--text-2); font-size: 13.5px; }

/* ─── Footer ─────────────────────────────────────────────────────────── */
.footer {
  grid-area: footer;
  padding: 18px 32px; font-size: 11.5px; color: var(--text-3);
  border-top: 1px solid var(--border-soft); background: var(--bg-1);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px;
}

/* ─── Login ──────────────────────────────────────────────────────────── */
.login-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background:
    radial-gradient(ellipse 800px 600px at top, var(--bg-2) 0%, var(--bg-0) 70%),
    var(--bg-0);
}
.login-card {
  background: var(--bg-1); border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg); padding: 44px 48px; max-width: 580px; width: 100%;
  box-shadow: var(--shadow-lg);
}
.login-card h1 {
  margin: 18px 0 10px;
  font-family: var(--font-display);
  font-size: 28px; font-weight: 500; letter-spacing: -0.4px;
  color: var(--text-0);
}
.login-card p {
  margin: 0 0 24px; font-size: 14.5px;
  color: var(--text-1); line-height: 1.7;
}
.login-card form { display: flex; flex-direction: column; gap: 12px; }
.login-card form button { padding: 13px; font-size: 14px; }

.login-divider-label {
  font-size: 11px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .8px;
  font-weight: 600; margin-bottom: 14px;
}
.synthetic-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.synthetic-card {
  padding: 16px 18px; text-align: left;
  background: var(--bg-2);
  border: 1px solid var(--border-soft); border-radius: 10px;
  transition: all .15s; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px;
}
.synthetic-card:hover {
  background: var(--bg-3); border-color: var(--brass);
  transform: translateY(-1px);
}
.synthetic-name {
  font-family: var(--font-display);
  font-weight: 500; font-size: 16px; color: var(--text-0);
}
.synthetic-arch {
  font-size: 10px; color: var(--brass);
  text-transform: uppercase; letter-spacing: .7px; font-weight: 600;
}
.synthetic-role {
  font-size: 12.5px; color: var(--text-2);
  line-height: 1.5;
}

.demo-badge {
  font-size: 10px; letter-spacing: .9px; text-transform: uppercase;
  color: var(--warning); background: rgba(224, 185, 112, 0.12);
  padding: 3px 9px; border-radius: 999px; font-weight: 600;
}

/* ─── Non-medical card on login ──────────────────────────────────────── */
.non-medical-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 22px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-1);
}
.non-medical-card strong {
  color: var(--brass); display: block; margin-bottom: 10px;
  font-size: 13.5px; font-weight: 600;
  letter-spacing: .3px;
}
.non-medical-card ul { margin: 0; padding-left: 20px; }
.non-medical-card li { margin-bottom: 5px; font-size: 13px; color: var(--text-1); }
.non-medical-card li strong { display: inline; color: var(--text-0); margin-right: 0; font-size: 13px; }
.non-medical-consent {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 16px;
  padding-top: 14px; border-top: 1px solid var(--border-soft);
  font-size: 13.5px; color: var(--text-0); cursor: pointer;
}
.non-medical-consent input { width: auto; margin-top: 3px; flex: 0 0 auto; }

/* ─── Admin ──────────────────────────────────────────────────────────── */
.admin-grid { display: grid; grid-template-columns: 280px 1fr; gap: 22px; }
.admin-list { display: flex; flex-direction: column; gap: 4px; max-height: calc(100vh - 240px); overflow-y: auto; }
.admin-list-item {
  text-align: left; padding: 12px 14px; background: var(--bg-1);
  border: 1px solid var(--border-soft); border-radius: 7px;
  display: flex; flex-direction: column; gap: 4px;
}
.admin-list-item:hover { background: var(--bg-2); }
.admin-list-item.active { background: var(--bg-2); border-color: var(--brass); }
.admin-item-id { font-family: ui-monospace, monospace; font-size: 11px; color: var(--brass); font-weight: 600; }
.admin-item-title { font-size: 13px; color: var(--text-0); line-height: 1.4; }
.admin-item-status {
  font-size: 9px; letter-spacing: .6px; font-weight: 700;
  padding: 2px 7px; border-radius: 3px;
  align-self: flex-start;
}
.admin-item-status.practitioner_voice { color: var(--sage); background: var(--sage-soft); }
.admin-item-status.practitioner_voice_synthetic { color: var(--brass); background: var(--brass-soft); }
.admin-item-status.stub_awaiting_sarah { color: var(--warning); background: rgba(224, 185, 112, 0.12); }

.admin-detail {
  background: var(--bg-1); border: 1px solid var(--border-soft);
  border-radius: 10px; padding: 28px 32px;
  max-height: calc(100vh - 240px); overflow-y: auto;
}
.admin-detail h3 {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 500; margin: 0 0 8px;
  letter-spacing: -0.2px;
}
.admin-detail h4 { font-size: 14px; margin: 22px 0 10px; color: var(--text-0); font-weight: 600; }
.admin-meta {
  background: var(--bg-2); border-left: 3px solid var(--brass);
  padding: 12px 16px; margin: 16px 0; border-radius: 0 6px 6px 0;
  font-size: 13px; color: var(--text-1); line-height: 1.6;
}
.admin-meta.escalation { border-left-color: var(--critical); }
.admin-meta-label {
  font-size: 10px; color: var(--text-2);
  text-transform: uppercase; letter-spacing: .7px;
  font-weight: 600; margin-bottom: 5px;
}
.admin-meta.escalation .admin-meta-label { color: var(--critical); }
.admin-body { font-size: 14px; line-height: 1.75; color: var(--text-1); margin-top: 20px; }
.admin-body h3 { font-size: 18px; margin: 24px 0 10px; color: var(--text-0); font-family: var(--font-display); font-weight: 500; }
.admin-body h4 { font-size: 14px; margin: 18px 0 8px; color: var(--brass); font-weight: 600; }
.admin-body strong { color: var(--text-0); }

.escalation-list { display: flex; flex-direction: column; gap: 12px; }
.escalation-item {
  background: var(--bg-2); border: 1px solid var(--border-soft);
  border-left: 3px solid var(--text-3);
  border-radius: 8px; padding: 14px 16px;
}
.escalation-item.sev-high { border-left-color: var(--critical); }
.escalation-item.sev-medium { border-left-color: var(--warning); }
.escalation-item.sev-low { border-left-color: var(--brass); }
.escalation-head {
  display: flex; align-items: baseline; gap: 12px;
  font-size: 12px; margin-bottom: 8px;
}
.escalation-kind {
  font-weight: 600; color: var(--text-0);
  text-transform: uppercase; letter-spacing: .5px;
}
.escalation-sev {
  font-size: 10px; padding: 2px 8px; border-radius: 999px;
  letter-spacing: .6px; text-transform: uppercase; font-weight: 600;
  color: var(--warning); background: rgba(224, 185, 112, 0.12);
}
.escalation-item.sev-high .escalation-sev { color: var(--critical); background: var(--critical-soft); }
.escalation-item.sev-low .escalation-sev { color: var(--brass); background: var(--brass-soft); }
.escalation-date { color: var(--text-3); margin-left: auto; }
.escalation-text { font-size: 13.5px; color: var(--text-1); line-height: 1.55; }

/* ─── Top-nav pills (legacy fallback) ────────────────────────────────── */
.nav-pills { display: flex; gap: 6px; margin-bottom: 24px; flex-wrap: wrap; }
.nav-pill {
  padding: 8px 14px; font-size: 13px; color: var(--text-2);
  background: transparent; border: 1px solid transparent; border-radius: 7px;
  cursor: pointer;
}
.nav-pill:hover { color: var(--text-0); background: var(--bg-2); }
.nav-pill.active { color: var(--brass); background: var(--bg-2); border-color: var(--border); }

/* ─── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .app, .app.no-sidebar {
    grid-template-columns: 1fr;
    grid-template-areas: "header" "non-medical" "main" "footer";
  }
  .sidebar { display: none; }
  .phase-row { grid-template-columns: 1fr 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
  .synthetic-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .main { padding: 24px 18px; }
  .login-card { padding: 32px 24px; }
  .header { padding: 14px 18px; }
  .brand { font-size: 20px; }
  .page-title { font-size: 26px; }
  .likert { gap: 4px; }
  .likert button { padding: 10px 2px; font-size: 12px; }
  .chat { height: calc(100vh - 360px); }
  .non-medical-strip { padding: 8px 16px; font-size: 11.5px; }
}
