:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --border: #e3e6ea;
  --text: #1c2430;
  --muted: #66707d;
  --accent: #2f5bea;
  --accent-soft: #eaf0ff;
  --green: #16a34a;
  --green-soft: #e7f6ec;
  --amber: #d97706;
  --amber-soft: #fdf1e1;
  --red: #dc2626;
  --red-soft: #fdeaea;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
  --radius: 10px;
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
/* Dark theme — applied on data-theme="dark", or on "system" when the OS prefers dark. Overrides the
   core tokens; most surfaces read these variables so they flip automatically. */
:root[data-theme="dark"] {
  --bg: #0f1216; --surface: #191d24; --border: #2b313b; --text: #e7eaef; --muted: #98a2b2;
  --accent: #6f8dff; --accent-soft: #1c2740;
  --green: #4ade80; --green-soft: #15311f; --amber: #fbbf24; --amber-soft: #38290f;
  --red: #f87171; --red-soft: #3a1d1d;
  --shadow: 0 1px 3px rgba(0,0,0,.5), 0 1px 2px rgba(0,0,0,.4);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --bg: #0f1216; --surface: #191d24; --border: #2b313b; --text: #e7eaef; --muted: #98a2b2;
    --accent: #6f8dff; --accent-soft: #1c2740;
    --green: #4ade80; --green-soft: #15311f; --amber: #fbbf24; --amber-soft: #38290f;
    --red: #f87171; --red-soft: #3a1d1d;
    --shadow: 0 1px 3px rgba(0,0,0,.5), 0 1px 2px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45; }

/* Header */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border);
  display: grid; place-items: center; overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.app-header h1 { font-size: 16px; margin: 0; }
.brand-sub { margin: 0; color: var(--muted); font-size: 12px; }
.header-meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.prototype-badge {
  background: var(--amber-soft); color: var(--amber); padding: 4px 9px; border-radius: 20px;
  font-weight: 600; font-size: 11px;
}

/* Summary KPI bar */
.summary-bar { display: flex; gap: 12px; flex-wrap: wrap; padding: 16px 24px 0; }
.kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px; min-width: 120px; box-shadow: var(--shadow);
  cursor: pointer; transition: border-color .12s, box-shadow .12s;
}
.kpi:hover { border-color: var(--accent); }
.kpi.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.kpi .num { font-size: 22px; font-weight: 700; }
.kpi .lbl { color: var(--muted); font-size: 12px; }
.kpi.green .num { color: var(--green); }
.kpi.amber .num { color: var(--amber); }
.kpi.red .num { color: var(--red); }

/* Toolbar */
.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 24px; flex-wrap: wrap;
}
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar input[type="search"], .toolbar select {
  height: 36px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  padding: 0 12px; font-size: 13px; color: var(--text); outline: none;
}
.toolbar input[type="search"] { min-width: 220px; }
.toolbar input[type="search"]:focus, .toolbar select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.switch { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; cursor: pointer; }

.view-toggle { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.view-toggle button { border: none; background: transparent; padding: 8px 16px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.view-toggle button.active { background: var(--accent); color: #fff; }

main { padding: 0 24px 60px; }
.hidden { display: none !important; }
.empty-state { text-align: center; color: var(--muted); padding: 60px 0; }

/* Table */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
thead th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--border); background: #fafbfc; }
thead th.sortable { cursor: pointer; user-select: none; }
thead th.sortable:hover { color: var(--text); }
thead th.sortable.active { color: var(--text); }
.sort-arrow { display: inline-block; margin-left: 4px; font-size: 9px; }
tbody td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr { cursor: pointer; transition: background 0.12s; }
tbody tr:hover { background: #f7f9fc; }
tbody tr:last-child td { border-bottom: none; }
.client-name { font-weight: 600; }
.client-title { color: var(--muted); font-size: 12px; }

/* Health pill + dot */
.health-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.health-pill.green { background: var(--green-soft); color: var(--green); }
.health-pill.amber { background: var(--amber-soft); color: var(--amber); }
.health-pill.red { background: var(--red-soft); color: var(--red); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.green { background: var(--green); }
.dot.amber { background: var(--amber); }
.dot.red { background: var(--red); }

/* Focus chips */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { background: var(--accent-soft); color: var(--accent); padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.chip.muted { background: #eef1f4; color: var(--muted); }
.chip.draft { background: #fdf2d6; color: #9a6b00; }
.draft-row td { color: var(--muted); }
.board-card.draft-card { border-style: dashed; background: #fffdf5; }
.progress-mini { display: flex; align-items: center; gap: 8px; }
.bar { flex: 1; height: 6px; background: #eef1f4; border-radius: 4px; overflow: hidden; min-width: 60px; }
.bar > span { display: block; height: 100%; background: var(--accent); }
.pct { font-size: 11px; color: var(--muted); width: 30px; }
.outstanding-count { font-weight: 600; }
.next-owner { color: var(--muted); font-size: 12px; }
/* Active-clients table: "My Path" position cell (Phase N · Task X/Y + phase name) + "Last task done". */
.mp-cell-top { font-weight: 600; white-space: nowrap; }
.mp-cell-name { color: var(--muted); font-size: 12px; }
.mp-cell-none { color: var(--muted); }
.coach-avatars { display: inline-flex; }
.avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); margin-left: -6px; }
.avatar:first-child { margin-left: 0; }

/* Board */
.board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; }
.board-col { flex: 0 0 250px; background: #eef1f4; border-radius: var(--radius); padding: 10px; }
.board-col h3 { font-size: 12px; margin: 4px 6px 10px; color: var(--text); display: flex; justify-content: space-between; align-items: center; }
.board-col h3 .count { color: var(--muted); font-weight: 600; }
.draft-bulkbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; margin-bottom: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.board-draft-delall { border: none; background: none; color: var(--red); font-size: 11px; font-weight: 600; cursor: pointer; text-decoration: underline; padding: 0; }
.draft-bulkbar .board-draft-delall { font-size: 13px; }
.board-draft-delall:hover { opacity: .8; }
.board-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; box-shadow: var(--shadow); }
.board-card:hover { border-color: var(--accent); }
.board-card .bc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.board-card .bc-name { font-weight: 600; }
.board-card .bc-meta { color: var(--muted); font-size: 12px; margin-top: 4px; display: flex; justify-content: space-between; align-items: center; }

/* Daily Scrum view */
.scrum-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 16px;
}
.scrum-nav { display: flex; align-items: center; gap: 12px; }
.scrum-arrow {
  border: 1px solid var(--border); background: var(--surface); border-radius: 8px;
  width: 34px; height: 34px; font-size: 18px; line-height: 1; color: var(--text); cursor: pointer;
}
.scrum-arrow:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.scrum-arrow:disabled { opacity: .4; cursor: default; }
.scrum-date { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.scrum-today { font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 999px; }
.scrum-count { font-size: 13px; font-weight: 600; color: var(--muted); }
.scrum-section { margin-bottom: 22px; }
.scrum-h { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 12px; }
.scrum-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.scrum-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.sc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.sc-name { border: none; background: none; padding: 0; font: inherit; font-weight: 700; font-size: 15px; color: var(--text); cursor: pointer; }
.sc-name:hover { color: var(--accent); text-decoration: underline; }
.sc-attended { flex: none; font-size: 11px; font-weight: 700; color: #15803d; background: #dcfce7; padding: 2px 8px; border-radius: 999px; }
.sc-scrum { display: flex; flex-direction: column; gap: 6px; }
.sc-line { margin: 0; font-size: 13px; line-height: 1.45; }
.sc-q { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.sc-blank { color: var(--border); font-style: normal; }
.sc-metrics { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.sc-metrics b { color: var(--text); font-size: 13px; }
.sc-tag { margin-top: 10px; font-size: 12px; color: var(--muted); }
.sc-note { margin-top: 8px; font-size: 13px; background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.scrum-awaiting { display: flex; flex-wrap: wrap; gap: 8px; }
.scrum-await {
  border: 1px dashed var(--border); background: var(--surface); border-radius: 999px;
  padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.scrum-await:hover { border-color: var(--accent); color: var(--accent); border-style: solid; }
.scrum-await.active {
  border-style: solid; border-color: var(--accent); background: var(--accent); color: #fff;
}
.scrum-modal-overlay {
  position: fixed; inset: 0; background: rgba(16, 24, 40, 0.45);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 48px 16px; z-index: 40; overflow-y: auto;
}
.scrum-modal {
  width: 100%; max-width: 520px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface); box-shadow: 0 12px 40px rgba(16, 24, 40, 0.25);
  margin: auto;
}
.scp-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--border);
}
.scp-head b { font-size: 15px; }
.scp-close {
  border: none; background: none; cursor: pointer; font: inherit; font-size: 16px;
  color: var(--muted); line-height: 1; padding: 4px 6px; border-radius: 6px;
}
.scp-close:hover { background: var(--bg); color: var(--text); }
.scrum-capture { padding: 4px 16px 16px; }
.scap-scrum { display: grid; gap: 8px; margin: 12px 0 8px; }
.scap-scrum label { display: grid; gap: 3px; }
.scap-scrum label span { font-size: 11px; font-weight: 600; color: var(--muted); }
.scap-scrum textarea { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font: inherit; resize: vertical; }
.scap-metrics { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 6px; margin: 8px 0; }
.scap-metrics label { display: grid; gap: 3px; text-align: center; }
.scap-metrics input { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 6px; font: inherit; text-align: center; }
.scap-metrics label span { font-size: 10px; color: var(--muted); }
.scap-actions { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.scrum-empty { color: var(--muted); padding: 20px 4px; font-size: 14px; }

/* Detail slide-over */
.overlay { position: fixed; inset: 0; background: rgba(16, 24, 40, 0.35); z-index: 30; }
.detail {
  position: fixed; top: 0; right: 0; height: 100vh; width: 565px; max-width: 92vw;
  background: var(--surface); z-index: 40; box-shadow: -8px 0 30px rgba(16,24,40,0.15);
  overflow-y: auto; animation: slidein 0.18s ease;
}
@keyframes slidein { from { transform: translateX(30px); opacity: 0.6; } to { transform: translateX(0); opacity: 1; } }
.detail-header { position: sticky; top: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 18px 22px; z-index: 2; }
.detail-header .dh-top { display: flex; justify-content: space-between; align-items: flex-start; }
.detail-header h2 { margin: 0 0 2px; font-size: 18px; }
.detail-header .dh-title { color: var(--muted); font-size: 13px; }
.close-btn { border: none; background: #eef1f4; width: 32px; height: 32px; border-radius: 8px; font-size: 18px; cursor: pointer; color: var(--muted); }
.close-btn:hover { background: #e2e6eb; }
.detail-meta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 14px; font-size: 12px; color: var(--muted); }
.detail-meta b { color: var(--text); font-weight: 600; }
.next-action-box { margin: 14px 22px 0; background: var(--accent-soft); border-radius: 8px; padding: 10px 14px; font-size: 13px; }
.next-action-box .na-label { color: var(--accent); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; }

.detail-body { padding: 8px 22px 40px; }
.stage { border: 1px solid var(--border); border-radius: 9px; margin-top: 12px; overflow: hidden; }
.stage-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; cursor: pointer; background: #fafbfc; }
.stage-head:hover { background: #f3f5f8; }
.stage-head .sh-left { display: flex; align-items: center; gap: 10px; }
.stage-num { width: 22px; height: 22px; border-radius: 6px; background: #e6eaf0; color: var(--muted); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.stage.complete .stage-num { background: var(--green); color: #fff; }
.stage.active .stage-num { background: var(--accent); color: #fff; }
.stage-name { font-weight: 600; }
.stage-hidden { font-size: 10px; font-weight: 700; color: #9333ea; background: #f3e8ff; border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
.stage-status { font-size: 11px; color: var(--muted); }
.stage-pct { font-size: 11px; color: var(--muted); }
.stage-body { padding: 6px 14px 12px; display: none; }
.stage.open .stage-body { display: block; }
.checkpoint { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; }
.checkpoint input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.checkpoint label { cursor: pointer; }
.checkpoint .cp-note { color: var(--muted); font-size: 12px; }
.checkpoint .cp-input {
  width: auto; height: 28px; margin-top: -3px; padding: 0 8px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 12px; background: var(--surface); color: var(--text); cursor: pointer;
}
.checkpoint .cp-input.url, .checkpoint .cp-input.text { width: 240px; cursor: text; }
.checkpoint .sla-flag { color: var(--red); font-size: 11px; font-weight: 600; margin-left: 6px; }
/* Who's responsible sits flush to the right edge of the checkpoint row. */
.checkpoint .resp-badge { margin-left: auto; flex: none; align-self: center; }
/* Resume-stage artifacts (shareable URL + PDF upload) shown under their checkpoint. */
.cp-artifacts { margin: 0 0 10px 28px; display: flex; flex-direction: column; gap: 10px; padding: 11px 13px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; }
.cp-art-row { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); }
.cp-art-row input[type="url"], .cp-art-row input[type="text"], .cp-art-row input[type="password"] { width: 100%; font-size: 14px; font-weight: 400; color: var(--text); padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; }
.cp-art-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cp-cred-pass { display: flex; align-items: center; gap: 8px; }
.cp-cred-pass input { flex: 1; }
.cp-cred-toggle { flex: none; font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border: 1px solid transparent; border-radius: 8px; padding: 8px 12px; cursor: pointer; }
.cp-cred-note { margin: 0; font-size: 11px; line-height: 1.4; color: var(--muted); }
.cp-art-file-wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cp-art-file-link { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }
.cp-art-file-link:hover { text-decoration: underline; }
.cp-art-file-wrap input[type="file"] { font-size: 12px; font-weight: 400; color: var(--text); }

/* ---- Coach: Storyteller review + LinkedIn posts authoring ---- */
.detail-muted { color: var(--muted); font-size: 13px; margin: 6px 0; }
.detail-storyteller, .detail-posts { padding: 20px 24px; border-top: 1px solid var(--border); }
.ds-head, .dp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ds-head h3, .dp-head h3 { margin: 0; font-size: 15px; }
.st-status { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; padding: 2px 9px; border-radius: 999px; background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.st-status.st-submitted, .st-status.st-updated { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.st-status.st-feedback { background: var(--accent-soft); color: var(--accent); border-color: #c9d8ff; }
.st-status.st-accepted { background: #ecfdf5; color: #047857; border-color: #bbf7d0; }
.st-parts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.st-part { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface); }
.st-part-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.st-part-text { font-size: 14px; line-height: 1.5; color: var(--text); }
.st-empty { color: var(--muted); }
.st-fb-label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
.st-fb-label textarea { font-size: 14px; font-weight: 400; color: var(--text); padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; font-family: inherit; resize: vertical; }
.st-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.lp-post { border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; margin-bottom: 10px; background: var(--surface); }
.lp-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.lp-num { font-weight: 700; color: var(--muted); font-size: 13px; }
.lp-date { font-size: 13px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px; }
.lp-move { margin-left: auto; display: flex; gap: 4px; }
.lp-content { width: 100%; font-size: 14px; font-family: inherit; color: var(--text); padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; resize: vertical; }
.lp-content:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lp-status { margin-top: 8px; font-size: 12px; }
.lp-decision { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; }
.lp-decision.lp-approved { background: #ecfdf5; color: #047857; }
.lp-decision.lp-rejected { background: #fef2f2; color: #b91c1c; }
.lp-decision.lp-pending { background: var(--bg); color: var(--muted); }
.lp-edited { margin-top: 6px; font-size: 13px; line-height: 1.45; color: var(--text); background: var(--bg); border-radius: 8px; padding: 8px 10px; }

/* ---- Client portal: Storyteller + LinkedIn post review ---- */
.sc-banner { font-size: 13px; font-weight: 600; padding: 9px 12px; border-radius: 10px; margin: 4px 0 12px; }
.sc-banner.sc-submitted, .sc-banner.sc-updated { background: #fef3c7; color: #92400e; }
.sc-banner.sc-feedback { background: var(--accent-soft); color: var(--accent); }
.sc-banner.sc-accepted { background: #ecfdf5; color: #047857; }
.sc-feedback { font-size: 14px; line-height: 1.5; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.sc-parts { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.sc-part { display: flex; flex-direction: column; gap: 5px; }
.sc-part-label { font-size: 14px; font-weight: 700; color: var(--text); }
.sc-part textarea { font-size: 15px; font-family: inherit; color: var(--text); padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); resize: vertical; }
.sc-part textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sc-part textarea:disabled { background: var(--bg); color: var(--muted); }
.sc-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.client-posts .lpc-post { border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 12px; background: var(--surface); }
.lpc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.lpc-num { font-weight: 700; font-size: 14px; color: var(--text); }
.lpc-readonly { font-size: 15px; line-height: 1.55; color: var(--text); white-space: normal; padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; }
.lpc-actions { display: flex; gap: 10px; margin-top: 10px; }
.lpc-fb-label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 10px; }
.lpc-feedback { font-size: 14px; font-weight: 400; font-family: inherit; color: var(--text); padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); resize: vertical; }
.lpc-feedback:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lpc-btn { flex: 1; font-size: 14px; font-weight: 600; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.lpc-approve.on { background: #ecfdf5; color: #047857; border-color: #bbf7d0; }
.lpc-reject.on { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.lpc-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lpc-hint { font-size: 12px; }
.lpc-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.lp-decision.lp-submitted { background: #fef3c7; color: #92400e; }
.lp-src { font-size: 10px; font-weight: 700; letter-spacing: .03em; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 1px 6px; }
.lpc-coachfb { font-size: 14px; line-height: 1.5; background: var(--accent-soft); color: var(--accent); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.lpc-date-f { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.lpc-date-f input { font-size: 14px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; }
.lpc-submit-btn { background: var(--accent); color: #fff; border-color: var(--accent); }
/* AI generator wizard */
.lpc-generator { border: 1px solid var(--border); border-radius: 12px; background: var(--bg); padding: 14px; margin-bottom: 14px; }
.gen-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 14px; margin-bottom: 12px; }
.gen-q { font-size: 15px; font-weight: 600; color: var(--text); margin: 0 0 10px; }
.gen-topic { font-size: 13px; color: var(--muted); margin: -4px 0 10px; }
.gen-themes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.gen-theme { display: flex; flex-direction: column; gap: 3px; text-align: left; width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.gen-theme:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.gt-title { font-size: 14px; font-weight: 700; color: var(--text); }
.gt-desc { font-size: 13px; color: var(--muted); line-height: 1.4; }
.gen-qf { display: flex; flex-direction: column; gap: 5px; font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.gen-qf textarea, .lpc-generator textarea, .gen-tweak input { font-size: 15px; font-weight: 400; font-family: inherit; color: var(--text); padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); resize: vertical; width: 100%; }
.gen-qf textarea:focus, .lpc-generator textarea:focus, .gen-tweak input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.gen-post { font-size: 15px; line-height: 1.6; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 14px; margin-bottom: 10px; white-space: normal; }
.gen-image { font-size: 13px; line-height: 1.5; color: var(--muted); background: var(--accent-soft); border-radius: 10px; padding: 9px 12px; margin-bottom: 12px; }
.gen-image b { color: var(--accent); }
.gen-tweak { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.gen-tweak input { flex: 1; }
.gen-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.gen-nav .primary-btn { margin-left: auto; }
.gen-working { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); padding: 18px 4px; }
.gen-spinner { width: 16px; height: 16px; border: 2px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; animation: gen-spin .7s linear infinite; flex: none; }
@keyframes gen-spin { to { transform: rotate(360deg); } }
.onb-fetching { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--accent); margin: 6px 0 0; }
.onb-fetching .gen-spinner { width: 14px; height: 14px; }
.gen-error { font-size: 14px; color: var(--red); background: var(--red-soft); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.gen-intro-note { margin: -6px 0 12px; line-height: 1.5; }
.gen-data { display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; }
.gd-row { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: 14px; }
.gd-row.gd-missing { background: var(--bg); border-style: dashed; }
.gd-ic { flex: none; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.gd-have .gd-ic { background: #ecfdf5; color: #047857; }
.gd-missing .gd-ic { background: var(--accent-soft); color: var(--accent); }
.gd-label { flex: 1; color: var(--text); }
.gd-missing .gd-label { color: var(--muted); }
.gd-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: #047857; }
.gd-hint { font-size: 12px; color: var(--muted); text-align: right; max-width: 55%; }
.gen-data-foot { margin: 0 0 12px; }
/* Coach: resume text that powers the client's AI generator. */
.lp-resume { border: 1px solid var(--border); border-radius: 10px; background: var(--bg); padding: 10px 12px; margin-bottom: 12px; }
.lp-resume > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text); }
.lp-resume textarea { width: 100%; margin-top: 8px; font-size: 13px; font-family: inherit; color: var(--text); padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); resize: vertical; }
.lp-resume textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.jd-item { border: 1px solid var(--border); border-radius: 9px; background: var(--surface); padding: 10px; margin-top: 8px; display: flex; flex-direction: column; gap: 7px; }
.jd-title, .jd-company, .jd-url, .jd-text { width: 100%; box-sizing: border-box; font-size: 13px; font-family: inherit; color: var(--text); padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.jd-text { resize: vertical; }
.jd-title:focus, .jd-company:focus, .jd-url:focus, .jd-text:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.jd-del { align-self: flex-start; }
.client-jds .jd-title, .client-jds .jd-company, .client-jds .jd-url, .client-jds .jd-text { font-size: 15px; }
.jd-url-err, .jd-err { color: var(--red); font-size: 12px; margin: -4px 0 0; }
.jd-url-err:empty, .jd-err:empty { display: none; }
/* An empty required field (Job title / Company / Job posting URL / description) is flagged red. */
.jd-item .jd-empty { border-color: var(--red); }
/* The new-entry form (top of the card) — accent-tinted so it reads as "add a new one", distinct from the
   saved rows below. Required validation only fires when its Add button is clicked. */
.jd-new { border-color: var(--accent); background: var(--accent-soft); }
.jd-add-btn { align-self: flex-start; }
.jd-list-label { margin: 14px 0 0; font-size: 13px; font-weight: 600; }
.client-jds .cc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.jd-foot { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.client-role .cr-row { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.client-role .cr-row:last-child { border-bottom: none; }
.client-role .cr-k { flex: none; width: 42%; color: var(--muted); font-weight: 600; }
.client-role .cr-v { flex: 1; color: var(--text); }
.client-role .cr-vars { flex-direction: column; align-items: stretch; gap: 8px; }
.client-role .cr-vars .cr-k { width: auto; }
.client-role .cr-vars .cr-v { width: 100%; }
.rv-wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rv-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; background: var(--accent-soft); color: var(--accent); border: 1px solid #c9d8ff; border-radius: 999px; padding: 4px 6px 4px 12px; }
.rv-x { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; border: none; background: rgba(47,91,234,.15); color: var(--accent); font-size: 14px; line-height: 1; cursor: pointer; }
.rv-x:hover { background: var(--accent); color: #fff; }
.rv-add { display: inline-flex; gap: 6px; align-items: center; }
.rv-add input { font-size: 14px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px; min-width: 130px; }
.rv-add input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.rv-add-btn { font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border: 1px solid transparent; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.rv-chip.rv-ro { padding: 4px 12px; }
/* Collapsible role variations (both portals + coach detail) */
.rv-details > summary, .rv-co > summary { cursor: pointer; font-weight: 600; color: var(--accent); list-style: none; }
.rv-details > summary::-webkit-details-marker, .rv-co > summary::-webkit-details-marker { display: none; }
.rv-details > summary::before, .rv-co > summary::before { content: "▸ "; display: inline-block; transition: transform .15s ease; }
.rv-details[open] > summary::before, .rv-co[open] > summary::before { content: "▾ "; }
.rv-details > .rv-wrap, .rv-co > .rv-wrap { margin-top: 8px; }
.rv-co { font-weight: 400; }

/* ---- Resume meeting / resume review / LinkedIn credentials (client focus cards) ---- */
/* Shared meeting block (Attend card, booked card, and each Your-meetings item) */
.rm-row { display: flex; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.rm-k { flex: none; width: 52px; color: var(--muted); font-weight: 600; }
.rm-v { flex: 1; color: var(--text); }
.rm-dur { color: var(--muted); font-weight: 400; }
.rm-join { display: flex; align-items: center; justify-content: center; width: fit-content; max-width: 100%; margin: 14px auto 0; text-decoration: none; }
.rm-nojoin { margin-top: 12px; }
.rm-manage { display: flex; gap: 16px; margin-top: 14px; }
/* My meetings (client manager for all booked meetings) */
.client-meetings .mtg-list { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.client-meetings .mtg-item { position: relative; border: 1px solid var(--border); border-radius: 12px; padding: 6px 16px 16px; background: var(--surface, #fff); }
.client-meetings .mtg-type { margin: 8px 0 2px; font-size: 15px; padding-right: 24px; }
.client-meetings .mtg-remove { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border: none; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; border-radius: 6px; }
.client-meetings .mtg-remove:hover { background: var(--bg, #f1f2f4); color: var(--text); }
/* Inside a Your-meetings item the last row has no divider, and the join button isn't auto-centered */
.client-meetings .mtg-item .rm-row:last-of-type { border-bottom: none; }
.rr-done { font-size: 13px; font-weight: 700; color: var(--green, #18794e); margin-left: 8px; }
.rr-open { display: inline-block; margin: 12px 0; }
.rr-approve { display: block; margin-top: 8px; }
.rr-unapprove { display: inline-block; margin-top: 12px; color: var(--muted); }
/* LinkedIn credentials card (client) */
.client-linkedin-creds .licred-f { display: block; margin: 12px 0; }
.client-linkedin-creds .licred-f > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.licred-input { width: 100%; font-size: 15px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.licred-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.licred-pwwrap { display: flex; gap: 8px; align-items: stretch; }
.licred-pwwrap .licred-input { flex: 1; }
.licred-toggle { flex: none; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border: 1px solid transparent; border-radius: 10px; padding: 0 14px; cursor: pointer; }
.client-linkedin-creds #licred-status { margin-left: 10px; }
/* Submit-your-resume upload card (client) */
.client-resume-upload .ru-files { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.client-resume-upload .ru-file { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg, #f7f8fa); }
.client-resume-upload .ru-file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent); text-decoration: none; font-size: 14px; }
.client-resume-upload .ru-del { flex: none; width: 22px; height: 22px; border-radius: 50%; border: none; background: rgba(0,0,0,.06); color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer; }
.client-resume-upload .ru-del:hover { background: var(--red, #c0392b); color: #fff; }
.client-resume-upload .ru-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 24px 16px; margin-top: 6px; border: 2px dashed var(--border); border-radius: 12px; background: var(--bg, #f7f8fa); cursor: pointer; transition: border-color .15s, background .15s; }
.client-resume-upload .ru-drop:hover { border-color: var(--accent); }
.client-resume-upload .ru-drop.dragover { border-color: var(--accent); background: var(--accent-soft); }
.client-resume-upload .ru-drop-icon { font-size: 22px; line-height: 1; }
.client-resume-upload .ru-drop-text { font-size: 14px; color: var(--text); line-height: 1.5; }
.client-resume-upload .ru-drop-or { color: var(--muted); font-size: 13px; }
.client-resume-upload #ru-status { display: block; margin-top: 10px; }
/* Coach: client-submitted resume files (in the Resume & LinkedIn detail section) */
.rh-uploads { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.rh-upload { font-size: 14px; color: var(--accent); text-decoration: none; }
.rh-upload:hover { text-decoration: underline; }
.rh-upload-when { color: var(--muted); font-size: 12px; }

/* ---- Resume & LinkedIn handover (coach detail section) ---- */
.detail-resume { padding: 20px 24px; border-top: 1px solid var(--border); }
.detail-resume .rh-block { margin-top: 12px; }
.detail-resume .rh-block + .rh-block { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.detail-resume .rh-sub { margin: 0 0 4px; font-size: 14px; }
.rh-cred-when { font-size: 12px; font-weight: 500; color: var(--muted); }
.rh-f { display: block; }
.rh-f > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.rh-input { width: 100%; font-size: 14px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; }
.rh-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.rh-open { display: inline-block; margin: 8px 0; }
.rh-ready { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; font-weight: 600; cursor: pointer; }
.rh-ready.on { color: var(--green, #18794e); }
.rh-hint { margin-top: 8px; }
.cc-hint { font-weight: 400; color: var(--muted); font-size: 12px; }
/* "Do this later" on the paid-intake wizard head + the entry card's button spacing. */
.onb-head { position: relative; }
.onb-later { position: absolute; top: 0; right: 0; }
.client-paid-intake .primary-btn { margin-top: 4px; }
/* Client Resume & LinkedIn workflow card (decoupled from phases). */
.client-resume-linkedin .rl-track { margin-top: 14px; }
.client-resume-linkedin .rl-track + .rl-track { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.rl-track-h { margin: 0 0 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.rl-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 0; }
.rl-row + .rl-row { border-top: 1px solid var(--border); }
.rl-ic { flex: none; width: 22px; text-align: center; font-size: 15px; }
.rl-row.rl-done .rl-ic { color: var(--green, #18794e); }
.rl-row.rl-done .rl-label { color: var(--muted); }
.rl-label { flex: 1 1 auto; font-size: 15px; font-weight: 600; min-width: 0; }
.rl-row.rl-wait .rl-label { font-weight: 500; }
.rl-act { flex: none; text-decoration: none; }
.rl-note { flex-basis: 100%; font-size: 13px; padding-left: 30px; }
.rl-mode-note { margin: 10px 0 0; font-size: 13px; }
.rl-switch { margin: 12px 0 0; }
/* Self-managed guided checklist (steps from config/linkedinSteps) */
.rl-guide { display: grid; gap: 8px; margin: 6px 0 6px 30px; }
.rl-guide-step { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.rl-guide-step.on { background: var(--accent-soft); border-color: var(--accent); }
.rl-guide-step input { margin-top: 3px; flex: none; width: 18px; height: 18px; accent-color: var(--accent); }
.rl-guide-body { display: grid; gap: 3px; min-width: 0; }
.rl-guide-title { font-size: 14px; font-weight: 600; }
.rl-guide-step.on .rl-guide-title { text-decoration: line-through; color: var(--muted); }
.rl-guide-text { font-size: 13px; color: var(--muted); line-height: 1.5; }
.rl-guide-link { font-size: 13px; font-weight: 600; width: fit-content; }
/* Admin → LinkedIn guide editor */
.admin-linkedinsteps .adm-li-group { margin-top: 16px; }
.admin-linkedinsteps .adm-li-group + .adm-li-group { border-top: 1px solid var(--border); padding-top: 8px; }
.adm-li-step { border: 1px solid var(--border); border-radius: 10px; padding: 10px; margin: 8px 0; display: grid; gap: 8px; }
.adm-li-step-top { display: flex; gap: 8px; align-items: center; }
.adm-li-step-top .adm-li-title { flex: 1 1 auto; }
.adm-li-ord { flex: none; display: inline-flex; gap: 6px; align-items: center; }
.adm-save-row { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
/* Mode picker */
.rl-modepick-q { margin: 4px 0 10px; font-size: 15px; font-weight: 600; }
.rl-modepick-opts { display: flex; flex-wrap: wrap; gap: 10px; }
.rl-modepick-btn { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; flex: 1 1 200px; }
.rl-modepick-sub { font-size: 12px; font-weight: 400; opacity: .85; }
.primary-btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
/* Coach LinkedIn-setup block: mode-aware states (editable toggle when the coach acts, read-only line otherwise). */
.rh-li-line { margin: 6px 0 0; font-size: 14px; }
.rh-li-line.done { color: var(--green, #18794e); font-weight: 600; }
.rh-li-states { display: grid; gap: 8px; margin-top: 12px; }
.rh-li-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.rh-li-toggle.on { color: var(--green, #18794e); }
.rh-li-toggle .rh-cred-when { font-weight: 400; }
.rh-creds { display: flex; flex-direction: column; gap: 10px; }
.rh-cred-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rh-cred-k { flex: none; width: 80px; color: var(--muted); font-weight: 600; font-size: 13px; }
.rh-cred-v { font-size: 14px; }
.rh-cred-pass { flex: 1; min-width: 140px; font-size: 14px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg, #f7f8fa); }

/* ---- Predicted questions (client capture + coach review) ---- */
.detail-predicted { padding: 20px 24px; border-top: 1px solid var(--border); }
.pq-cats { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.pq-cat-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.pq-cat-bar { height: 6px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.pq-cat-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width .25s ease; }
.pq-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pq-chip { font-size: 12px; color: var(--muted); background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; }
.pq-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.pq-item { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); overflow: hidden; }
.pq-sum { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; list-style: none; font-size: 14px; }
.pq-sum::-webkit-details-marker { display: none; }
.pq-sum-cat { font-size: 11px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.pq-sum-q { flex: 1; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pq-badge { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.pq-badge.pq-fb { background: #ecfdf5; color: #047857; }
.pq-badge.pq-overdue { background: #fef2f2; color: #b91c1c; }
.pq-badge.pq-await { background: #fef3c7; color: #92400e; }
.pq-badge.pq-draft { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.pq-foot-actions { display: flex; align-items: center; gap: 12px; }
.pq-submit { padding: 7px 14px; font-size: 13px; }
.pq-body, .cq-body { display: flex; flex-direction: column; gap: 10px; padding: 0 12px 12px; }
.pq-f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.pq-hint { font-weight: 400; }
.pq-req { color: var(--red); margin-left: 2px; }
.pq-f input, .pq-f select, .pq-f textarea { font-size: 14px; font-weight: 400; font-family: inherit; color: var(--text); padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); resize: vertical; }
.pq-f input:focus, .pq-f select:focus, .pq-f textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pq-vid { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }
.pq-readonly { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.pq-fb-text { font-size: 14px; font-weight: 400; color: var(--text); background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.pq-empty { color: var(--muted); }
.pq-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); }
.pq-uploaded { font-style: italic; }
.cq-f { display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.cq-f > span { font-weight: 700; color: var(--muted); }
.cq-f > div { font-size: 14px; color: var(--text); }
.cq-fb { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.cq-fb textarea { font-size: 14px; font-weight: 400; font-family: inherit; color: var(--text); padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); resize: vertical; }
.cq-fb textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.instance { border-top: 1px dashed var(--border); margin-top: 8px; padding-top: 8px; }
.instance:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.instance-label { font-weight: 600; font-size: 13px; margin-bottom: 4px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.il-actions { display: inline-flex; gap: 2px; }
.il-btn { border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; padding: 2px 6px; border-radius: 5px; }
.il-btn:hover { background: var(--accent-soft); color: var(--accent); }
.add-instance { margin-top: 8px; border: 1px dashed var(--border); background: transparent; color: var(--accent); padding: 7px 12px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; width: 100%; }
.add-instance:hover { background: var(--accent-soft); }
.repeat-hint { font-size: 11px; color: var(--muted); font-style: italic; }
.mode-selector { display: flex; align-items: center; gap: 14px; padding: 4px 0 6px; font-size: 13px; }
.mode-selector .mode-label { color: var(--muted); font-weight: 600; }
.mode-opt { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.mode-opt input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }

/* Buttons */
.primary-btn {
  height: 36px; border: none; background: var(--accent); color: #fff; border-radius: 8px;
  padding: 0 16px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.primary-btn:hover { background: #2348c8; }
.text-btn {
  border: none; background: transparent; color: var(--muted); font-size: 13px; cursor: pointer; padding: 6px 4px;
}
.text-btn:hover { color: var(--text); }
.text-btn.danger { color: var(--red); }
.text-btn.danger:hover { color: var(--red); text-decoration: underline; }
.user-chip {
  background: var(--accent-soft); color: var(--accent); padding: 4px 10px; border-radius: 20px;
  font-weight: 600; font-size: 12px;
}

/* Login screen */
.login-screen {
  position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 50;
}
.login-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); padding: 40px 36px; width: 340px; text-align: center;
}
.login-card .brand-mark.big {
  width: 56px; height: 56px; border-radius: 13px; font-size: 22px; margin: 0 auto 16px;
}
.login-card h1 { font-size: 20px; margin: 0 0 4px; }
.login-card .brand-sub { margin: 0 0 24px; }
.google-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  height: 44px; border: 1px solid var(--border); background: var(--surface); border-radius: 9px;
  font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer;
}
/* Hover background is a fixed light colour, so pin a dark text colour too — otherwise in dark mode the
   text stays light (var(--text)) and vanishes on the light hover background. */
.google-btn:hover { background: #f7f8fa; border-color: #cfd5dd; color: #1a2233; }
.google-btn .g {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: #ffffff; color: #4285f4; font-weight: 700; border: 1px solid var(--border);
}
.login-error { color: var(--red); font-size: 12px; margin: 14px 0 0; min-height: 16px; }
/* Magic-link (passwordless) sign-in block on the login card */
.login-or {
  display: flex; align-items: center; gap: 10px; margin: 18px 0 14px; color: var(--muted); font-size: 12px;
}
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.email-link-box { text-align: left; }
.email-link-label { display: block; font-size: 12px; font-weight: 600; color: var(--text); margin: 0 0 6px; }
.email-link-input {
  width: 100%; height: 42px; padding: 0 12px; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: 9px; background: var(--surface);
  color: var(--text); font-size: 14px; margin: 0 0 10px;
}
.email-link-input:focus { outline: none; border-color: var(--accent, #4285f4); }
.email-link-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  height: 44px; border: 0; border-radius: 9px; background: var(--accent, #2f6fed); color: #fff;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.email-link-btn:hover { filter: brightness(1.05); }
.email-link-btn:disabled { opacity: .6; cursor: default; }
.email-link-status { color: var(--muted); font-size: 12px; margin: 10px 0 0; min-height: 16px; line-height: 1.4; }

/* Add-client modal */
.modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: var(--surface); border-radius: 14px; box-shadow: 0 12px 40px rgba(16,24,40,0.2);
  padding: 24px; width: 560px; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 48px); overflow-y: auto; z-index: 61;
}
#modal-overlay { z-index: 60; }
.modal h2 { margin: 0 0 16px; font-size: 18px; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.modal label { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.modal-grid .full { grid-column: 1 / -1; }
.modal label input, .modal label select {
  display: block; width: 100%; height: 36px; margin-top: 0; border: 1px solid var(--border);
  border-radius: 8px; padding: 0 12px; font-size: 13px; color: var(--text); outline: none;
  background: var(--surface);
}
.modal label textarea {
  display: block; width: 100%; margin-top: 0; border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 12px; font-size: 13px; line-height: 1.4; color: var(--text); outline: none;
  background: var(--surface); resize: vertical; font-family: inherit;
}
.modal label input:focus, .modal label select:focus, .modal label textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.modal label input.invalid, .modal label select.invalid { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
/* Empty selects read like placeholders (label sits in the first option). */
.modal label select:invalid { color: var(--muted); }
.modal label input[type="file"] { height: auto; padding: 7px 10px; font-size: 12px; margin-top: 4px; }
/* Visually-hidden label kept for validation messaging. */
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
/* Name | Date of birth on one row. */
.row-name { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 12px; }
.row-name label { margin-bottom: 8px; }
/* Marital status (full-width radio row), with Children stacked below it so the
   name field gets the full modal width. */
.row-marital { display: block; }
.row-marital > label { margin-bottom: 8px; }
.children-field { margin-bottom: 8px; }
.children-list { display: flex; flex-direction: column; gap: 6px; margin-top: 7px; }
.child-row { display: grid; grid-template-columns: 1fr 96px 150px 30px; gap: 8px; align-items: center; }
.child-row select, .child-row input {
  height: 34px; border: 1px solid var(--border); border-radius: 8px; padding: 0 10px;
  font-size: 13px; color: var(--text); background: var(--surface); outline: none; width: 100%;
}
.child-row select:focus, .child-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.child-remove {
  height: 30px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer;
}
.child-remove:hover { border-color: var(--red); color: var(--red); }
.add-child-btn {
  margin-top: 6px; border: 1px dashed var(--border); border-radius: 8px; background: transparent;
  color: var(--accent); font-size: 12px; font-weight: 600; padding: 6px 10px; cursor: pointer;
}
.add-child-btn:hover { border-color: var(--accent); }
/* Title (current) | Title (desired) | Years on one row. */
.row-titles { display: grid; grid-template-columns: 1fr 1fr 92px; gap: 0 12px; }
.row-titles label { margin-bottom: 8px; }
/* Current | Desired | New salary on one row. */
.row-salaries { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 12px; }
.row-salaries label { margin-bottom: 8px; }
/* Product picker | Agreed price on one row. */
.row-product { display: grid; grid-template-columns: 2fr 1fr; gap: 0 12px; }
.row-product label { margin-bottom: 8px; }
.row-product .field-label { margin-bottom: 4px; }
.row-product select { width: 100%; }
/* Gender | Employment | Start date on one row. */
.row-trio { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 12px; }
.row-trio label { margin-bottom: 8px; }
/* Date placeholder overlay (date inputs can't take a real placeholder). */
.ph-field { position: relative; }
.ph-field .ph { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 12px;
  font-size: 13px; font-weight: 400; color: var(--muted); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; pointer-events: none; }
.ph-field input:focus ~ .ph, .ph-field input:valid ~ .ph { display: none; }
.res-field .file-label { display: block; }
.file-current { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); font-weight: 400; }
.file-current a { color: var(--accent); text-decoration: underline; }
.file-current .file-del { border: none; background: none; padding: 0; margin: 0; font: inherit; font-size: 11px; color: var(--red); cursor: pointer; text-decoration: underline; }
.file-current .file-removed { color: var(--red); font-style: italic; }
.req { color: var(--red); margin-left: 2px; }
.modal-grid .field { margin-bottom: 8px; }
.field-label { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.opt-group { display: flex; flex-flow: row wrap; gap: 6px 16px; margin-top: 7px; padding: 4px 8px; border: 1px solid transparent; border-radius: 8px; }
.opt-group.invalid { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
/* Feeling has many options — lay them out on an even grid so they align into
   columns instead of wrapping at ragged natural widths. */
#nc-feeling { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 16px; }
.country-other {
  display: block; width: 100%; height: 36px; margin-top: 8px; border: 1px solid var(--border);
  border-radius: 8px; padding: 0 12px; font-size: 13px; color: var(--text); outline: none; background: var(--surface);
}
.country-other:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.country-other.invalid { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
/* ----- Edit-form layout (dropdowns + multi-column rows) ----- */
.edit-select {
  display: block; width: 100%; height: 36px; border: 1px solid var(--border); border-radius: 8px;
  padding: 0 12px; font-size: 13px; color: var(--text); outline: none; background: var(--surface);
}
.edit-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.edit-select.invalid { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.edit-select:invalid { color: var(--muted); } /* empty select reads like a placeholder */
/* In-place dropdowns sit under their field label. */
.modal-grid .field .edit-select { margin-top: 7px; }
/* Edit mode: DOB + Gender move to the Marital-status row, so the name row holds
   just First | Last. Years gets a touch more room. */
.modal.editing .row-name { grid-template-columns: 1fr 1fr; }
.modal.editing .row-titles { grid-template-columns: 1fr 1fr 82px; }
/* Edit mode: Program start date sits next to Signed client agreement with a label
   above (single column), instead of its full-width placeholder treatment. */
.nc-start-toplabel { display: none; }
.modal.editing #nc-start-field { grid-column: auto; margin-bottom: 8px; }
.modal.editing #nc-start-field .nc-start-toplabel { display: block; margin-bottom: 4px; }
.modal.editing #nc-start-field .ph { display: none; }
/* Edit mode: Job type (current) nests under Employment status (no label of its own). */
.modal.editing #nc-employment-field #nc-jobtype-current { margin-top: 8px; }
/* Relocated multi-column rows (Country|State|City, Address1|2|ZIP, Phone|WhatsApp). */
.edit-row { gap: 0 12px; }
.edit-row:not(.hidden) { display: grid; }
.edit-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.edit-row.cols-2 { grid-template-columns: 1fr 1fr; }
.edit-row > * { align-self: start; }
.edit-row > .edit-select { margin-bottom: 8px; }
.opt { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--text); font-weight: 500; cursor: pointer; }
/* `.modal label { display: block }` is more specific than `.opt`, so re-assert
   the flex centering here or the radio and its text fall out of alignment. */
.modal .opt { display: flex; align-items: center; }
.modal .opt input { display: inline-block; width: 16px; height: 16px; margin: 0; padding: 0; flex: none; accent-color: var(--accent); cursor: pointer; }
.modal-error { color: var(--red); font-size: 12px; min-height: 16px; margin: 4px 0 0; }
.modal-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 12px; }
.modal-actions-spacer { flex: 1; }

/* Detail contact/profile */
.detail-profile { margin: 12px 22px 0; font-size: 13px; }
.detail-profile .pr { display: flex; gap: 12px; padding: 3px 0; }
.detail-profile .pk { color: var(--muted); min-width: 116px; flex-shrink: 0; }
.detail-profile .pv { word-break: break-word; }
.detail-profile a { color: var(--accent); text-decoration: none; }
.detail-profile a:hover { text-decoration: underline; }

/* Add-client split menu (AI / Classic) */
/* Conversational add-client */
#conv-overlay { z-index: 60; }
.conv {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: var(--surface); border-radius: 16px; box-shadow: 0 12px 40px rgba(16,24,40,0.2);
  width: 520px; max-width: calc(100vw - 32px); max-height: calc(100vh - 48px);
  display: flex; flex-direction: column; z-index: 61; overflow: hidden;
}
.conv-head { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--border); }
.conv-head .brand-mark { width: 30px; height: 30px; border-radius: 8px; }
.conv-progress { flex: 1; height: 6px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.conv-bar { height: 100%; width: 0; background: linear-gradient(90deg, #2f5bea, #8b5cf6); transition: width .25s ease; }
/* Fixed-height history: shows only the latest question + answer so the panel never grows and
   the progress bar in .conv-head stays put. Long text scrolls within this capped area. */
.conv-thread { padding: 14px 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; flex: none; display: flex; flex-direction: column; gap: 8px; min-height: 76px; max-height: 124px; }
.conv-msg { max-width: 84%; padding: 9px 13px; border-radius: 14px; font-size: 13px; line-height: 1.45; animation: conv-pop .18s ease; }
.conv-msg.bot { align-self: flex-start; background: var(--bg); color: var(--text); border-bottom-left-radius: 5px; }
.conv-msg.bot.intro { color: var(--muted); }
.conv-msg.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 5px; white-space: pre-wrap; }
@keyframes conv-pop { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.conv-active { border-top: 1px solid var(--border); padding: 14px 18px 16px; background: var(--surface); }
.conv-q { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.conv-slot { margin-bottom: 2px; }
.conv-slot input, .conv-slot select, .conv-slot textarea {
  display: block; width: 100%; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; color: var(--text); background: var(--surface); outline: none; font-family: inherit;
}
.conv-slot input, .conv-slot select { height: 38px; padding: 0 12px; }
.conv-slot textarea { padding: 9px 12px; line-height: 1.4; resize: vertical; }
.conv-slot input:focus, .conv-slot select:focus, .conv-slot textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.conv-slot input.invalid, .conv-slot select.invalid { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.conv-slot input[type="file"] { height: auto; padding: 8px 10px; font-size: 13px; }
.conv-slot .opt input { display: inline-block; width: 16px; height: 16px; margin: 0; padding: 0; flex: none; accent-color: var(--accent); cursor: pointer; }
.conv-slot .opt-group { margin-top: 0; padding: 0; }
.conv-slot .children-list { margin-top: 0; }
.conv-slot .child-row select, .conv-slot .child-row input { height: 34px; padding: 0 10px; font-size: 13px; }
.conv-err { color: var(--red); font-size: 12px; min-height: 16px; margin: 6px 0 0; }
.conv-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.conv-actions #conv-next { margin-left: auto; }

@media (max-width: 720px) {
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar input[type="search"] { min-width: 0; width: 100%; }
  thead { display: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  tbody tr { padding: 8px 4px; }
  tbody td { border: none; padding: 4px 12px; }
  .client-cell-label { display: inline-block; min-width: 96px; color: var(--muted); font-size: 11px; text-transform: uppercase; }
  .modal-grid { grid-template-columns: 1fr; }
}

/* ---------- client-facing portal (mobile-first) ---------- */
.client-app { min-height: 100vh; background: var(--bg); }
.client-header {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 12px; background: var(--surface);
  /* Flat side padding (no safe-area inset) so the account avatar reaches the same edge as the Brian AI
     dock (right: 20px) instead of being pushed inward by env(safe-area-inset-right) on notched phones.
     The header background still spans edge-to-edge via viewport-fit=cover. */
  padding: 14px 16px;
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5;
}
.client-header .brand { margin-right: auto; } /* brand left; nav/pills/avatar group on the right (desktop) */
.client-header h1 { margin: 0; font-size: 18px; }
.client-main { max-width: 640px; margin: 0 auto; padding: 16px; }
/* Board view fills the full screen; outer padding matches the gap between cards (16px). */
.client-main.cp-wide { max-width: none; padding: 16px; }
.client-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; margin-bottom: 16px;
}

/* Layout toggle (List ⇄ Board) */
.cp-toolbar { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-bottom: 14px; }
.cp-layout-toggle {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--bg, #f1f2f4); border: 1px solid var(--border); border-radius: 999px;
}
.cp-lt-btn {
  border: none; background: transparent; cursor: pointer;
  padding: 6px 16px; border-radius: 999px;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--muted);
  transition: background .12s, color .12s;
}
.cp-lt-btn:hover { color: var(--text, #1a1a1a); }
.cp-lt-btn.on { background: var(--accent); color: #fff; }

/* Clean view: section tabs (Ask me anything / Check in / Progress / Content) live in the top
   navigation bar next to "Book a meeting"; only the active section's cards render below, so the
   portal doesn't overwhelm with every card at once. */
.client-nav-group { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.client-clean-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.client-clean-nav.hidden, .client-view-toggle.hidden { display: none; }
.client-view-toggle { display: flex; align-items: center; }
.cp-clean-tab {
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
  padding: 7px 14px; border-radius: 999px; white-space: nowrap;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--text, #1a1a1a);
  transition: background .12s, color .12s, border-color .12s;
}
.cp-clean-tab:hover { border-color: var(--accent); }
.cp-clean-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }
/* "Ask me anything" (Brian AI) is the hero entry — tinted so it reads as the headline action. */
.cp-clean-tab.hero { border-color: var(--accent); color: var(--accent); }
.cp-clean-tab.hero.on { color: #fff; }
.cp-clean-body { display: block; }
.cp-clean-body > .client-card { margin: 0 0 16px; }
/* On narrow screens the header wraps; let the section tabs take their own full-width row. */
@media (max-width: 720px) {
  /* Row 1: brand (left) + account avatar (right, aligned with the logo/name). Row 2: the pill row.
     Row 3: section tabs (test users only). */
  .client-header .brand { margin-right: 0; flex: 1 1 auto; order: 1; min-width: 0; }
  .client-header > .client-avatar-wrap { order: 2; }
  .client-header-actions { order: 3; flex-basis: 100%; min-width: 0; }
  .client-nav-group { order: 4; flex-basis: 100%; justify-content: flex-start; }
  .client-clean-nav { flex: 1 1 auto; }
  .cp-clean-tab { flex: 1 1 auto; text-align: center; padding: 7px 10px; }
}

/* Mobile LANDSCAPE (short height): vertical space is scarce, so collapse the header to ONE row —
   brand static on the left, account avatar static on the right, and the pill row scrolling in the
   middle between them (so both anchors stay put and only the overflowing pills move). This comes after
   the portrait block so it wins on small landscape phones that are also < 720px wide. */
@media (orientation: landscape) and (max-height: 500px) {
  .client-header { flex-wrap: nowrap; }
  .client-header .brand { order: 1; flex: 0 0 auto; margin-right: 0; min-width: 0; }
  /* flex-basis:0 so the pill track fits inline (rather than wrapping to its own row on its wide content)
     and instead grows to fill the middle + scrolls within it. */
  .client-header-actions { order: 2; flex: 1 1 0; min-width: 0; }
  .client-header > .client-avatar-wrap { order: 3; flex: 0 0 auto; }
  .client-nav-group { display: none; } /* section tabs (test users) don't fit a one-row landscape header */
}

/* Pinterest-style masonry: cards are distributed (by app.js) into fixed columns so that
   expanding a card grows only its own column and never makes the card jump elsewhere.
   Cards can also be dragged (by the grip) to any position or column. */
.cp-board { display: flex; align-items: flex-start; gap: 16px; }
.cp-board > .cp-col { flex: 1 1 0; min-width: 0; }
.cp-board > .cp-col:empty { display: none; }

/* Drag grip — appears on hover, top-right of each board card. */
.cp-board .client-card { position: relative; }
.cp-grip {
  position: absolute; top: 8px; right: 10px; z-index: 2;
  border: none; background: transparent; cursor: grab;
  color: var(--muted); font-size: 18px; line-height: 1; padding: 2px 4px;
  border-radius: 6px; opacity: 0; transition: opacity .12s, background .12s;
}
.cp-board .client-card:hover .cp-grip,
.cp-grip:focus-visible { opacity: .55; }
.cp-grip:hover { opacity: 1; background: var(--accent-soft, #eef); }
.cp-grip:active { cursor: grabbing; }
.cp-dragging { opacity: .45; outline: 2px dashed var(--accent); outline-offset: 2px; }

/* Reset-layout button in the board toolbar. */
.cp-reset {
  border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); cursor: pointer;
  padding: 6px 14px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 600;
}
.cp-reset:hover { color: var(--text, #1a1a1a); border-color: var(--accent); }
.client-muted { color: var(--muted); margin: 0; }
.client-empty h2 { margin: 0 0 8px; font-size: 18px; }
.cp-load-slow { margin-top: 10px; }
.cp-load-reload { margin-top: 8px; }
.cp-signedin { margin-top: 12px; font-size: 13px; }
.cp-load-actions { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.client-progress .cp-top { display: flex; align-items: baseline; gap: 8px; }
.cp-pct { font-size: 34px; font-weight: 700; color: var(--accent); line-height: 1; }
.cp-label { color: var(--muted); font-size: 13px; }
.cp-bar { margin: 14px 0 0; height: 10px; border-radius: 6px; background: var(--accent-soft); overflow: hidden; }
.cp-fill { height: 100%; background: var(--accent); border-radius: 6px; transition: width .3s ease; }
.cp-focus { margin: 12px 0 0; font-size: 14px; }

.client-stages { list-style: none; margin: 0 0 16px; padding: 0; }
.client-stage {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 8px;
}
.client-stage .cs-dot {
  flex: none; width: 12px; height: 12px; border-radius: 50%;
  background: var(--border); box-shadow: 0 0 0 3px var(--bg);
}
.client-stage.done .cs-dot { background: var(--green); }
.client-stage.active .cs-dot { background: var(--amber); }
.cs-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cs-name { font-weight: 600; }
.cs-step { color: var(--muted); font-size: 12px; }
.cs-status { flex: none; font-size: 12px; font-weight: 600; color: var(--muted); }
.client-stage.done .cs-status { color: var(--green); }
.client-stage.active .cs-status { color: var(--amber); }
.client-note { color: var(--muted); font-size: 13px; text-align: center; padding: 0 8px 24px; }

/* coach detail panel: client daily reports */
.detail-reports { padding: 16px 20px 28px; border-top: 8px solid var(--bg); }
.dr-title { margin: 4px 0 12px; font-size: 15px; }
.dr-empty { color: var(--muted); font-size: 13px; }
.dr-block { margin-bottom: 18px; }
.dr-block h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.dr-event-list { list-style: none; margin: 0; padding: 0; }
.dr-event { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.dre-icon { flex: none; font-size: 16px; }
.dre-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dre-type { font-weight: 600; font-size: 13px; }
.dre-detail { font-size: 13px; }
.dre-comm { font-size: 12px; color: var(--muted); font-style: italic; }
.dre-date { font-size: 11px; color: var(--muted); }

.coach-checkin { border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 10px; background: var(--surface); }
.cck-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cck-date { font-weight: 700; font-size: 13px; }
.cck-attend { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.cck-scrum p { margin: 2px 0; font-size: 13px; }
.cck-scrum b { color: var(--muted); font-weight: 600; }
.cck-metrics { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0; font-size: 12px; color: var(--muted); }
.cck-metrics b { color: var(--text); font-size: 13px; }
.cck-tag { margin: 6px 0; }
.cck-tag select { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font: inherit; background: var(--surface); }
.cr-other-field { margin-top: 6px; }
.cr-other-field input { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font: inherit; }
.cck-notes { display: block; }
.cck-notes span { display: block; font-size: 12px; color: var(--muted); margin: 4px 0; }
.cck-notes textarea { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font: inherit; resize: vertical; }
.cck-tag select:focus, .cr-other-field input:focus, .cck-notes textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* check-in + milestones */
.cc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cc-head h2 { margin: 0; font-size: 18px; }
.cc-date { color: var(--muted); font-size: 13px; }
.cc-sub { margin: 16px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cc-field { display: block; margin-bottom: 12px; }
.cc-field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.cc-field > span small { font-weight: 400; color: var(--muted); }
.cc-field textarea, .cc-field input[type="text"], .cc-field select {
  width: 100%; border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px;
  font: inherit; background: var(--surface); resize: vertical; -webkit-appearance: none; appearance: none;
}
.cc-field textarea:focus, .cc-field input:focus, .cc-field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}

/* "Do you have any impediments?" — No/Yes radios that reveal a details textarea (shared
   across the client check-in, the coach quick-capture, and the coach detail card). */
.imp-field { margin: 0; }
.imp-q { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.imp-radios { display: flex; gap: 18px; margin-bottom: 8px; }
.imp-radios label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; cursor: pointer; }
.imp-radios input { margin: 0; width: auto; }
.imp-detail.hidden { display: none !important; }
/* Tighter label sizing inside the coach forms to match their other field captions. */
.cck-scrum-edit .imp-q, .scap-scrum .imp-q { font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.cck-scrum-edit .imp-radios, .scap-scrum .imp-radios { gap: 14px; margin-bottom: 6px; }
.cck-scrum-edit .imp-radios label, .scap-scrum .imp-radios label { font-size: 13px; }
/* Daily Scrum card impediment readout. */
.sc-imp-yes { color: var(--amber); font-weight: 700; }
.sc-imp-no { color: var(--muted); font-weight: 600; }
.sc-imp .sc-imp-item {
  display: block; margin-top: 4px; padding-left: 10px; border-left: 2px solid var(--amber-soft);
  font-size: 13px; color: var(--text);
}

/* ----- Impediment capture widget (add-one-at-a-time rows) ----- */
.imp-list { display: flex; flex-direction: column; gap: 8px; }
.imp-row { display: flex; align-items: flex-start; gap: 8px; }
.imp-row textarea { flex: 1; }
.imp-row-remove {
  flex: none; width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer;
}
.imp-row-remove:hover { border-color: var(--red); color: var(--red); }
.imp-add-btn {
  align-self: flex-start; margin-top: 8px; border: 1px dashed var(--border); background: transparent;
  color: var(--accent); font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: 8px; cursor: pointer;
}
.imp-add-btn:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ----- Impediments KPI box ----- */
.kpi.imp .num { color: var(--muted); }
.kpi.imp.has-open .num { color: var(--amber); }
.kpi.checkins .num { color: var(--accent); }
.kpi.draft .num { color: var(--muted); }
.kpi.draft.has-draft .num { color: var(--text); }
.kpi.rem .num { color: var(--muted); }
.kpi.rem.has-due .num { color: var(--accent); }
/* ----- Coach reminders view ----- */
.rem-cards { display: grid; gap: 12px; }
.rem-card { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.rem-card.is-due { border-left: 3px solid var(--accent); background: #f3f6ff; }
.rem-card.is-done { opacity: 0.7; }
.rem-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.rem-client { background: none; border: none; padding: 0; font: inherit; font-weight: 700; color: var(--accent); cursor: pointer; }
.rem-client:hover { text-decoration: underline; }
.rem-when { flex: none; font-size: 12px; color: var(--muted); white-space: nowrap; }
.rem-when.due { color: var(--accent); font-weight: 700; }
.rem-msg { margin: 6px 0 8px; font-size: 14px; line-height: 1.5; }
.rem-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); }
.rem-actions { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.rem-del { color: var(--red) !important; }
.rem-timing { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 2px 0 8px; font-size: 12px; color: var(--muted); }
.rem-timing .rem-t-row b { color: var(--text); font-weight: 600; }
.rem-delta { font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.rem-delta.ahead { color: var(--green, #137a47); background: rgba(19,122,71,0.10); }
.rem-delta.behind { color: var(--red); background: rgba(200,40,40,0.10); }
.rem-delta.ontime { color: var(--muted); background: rgba(120,120,120,0.12); }
/* admin reminder block */
.adm-jp-reminder { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 4px; padding: 8px 10px; background: var(--bg, #f7f7f8); border-radius: 8px; }
.adm-jp-reminder textarea { flex: 1 1 100%; }
/* ----- Personal coach reminders (My reminders) ----- */
.rem-section-head { margin: 4px 0 2px; }
.rem-section-head h2 { margin: 0; font-size: 16px; }
.rem-section-head + .adm-hint { margin-top: 2px; }
.imp-view > .rem-section-head:not(:first-child) { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.todo-add { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 14px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg, #fafafb); }
.todo-add-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.todo-add-row #todo-text { flex: 1 1 240px; }
.todo-date-in { flex: 0 0 auto; }
.todo-add-row2 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.todo-add-lbl { font-size: 12px; color: var(--muted); font-weight: 600; }
.todo-pos-lbl { margin-left: 6px; }
.todo-vis { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.todo-vis-chip { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px 11px; cursor: pointer; font: inherit; font-size: 12px; color: var(--muted); }
.todo-vis-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 700; }
.todo-pos { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.todo-pos-btn { background: var(--surface); border: none; padding: 6px 12px; cursor: pointer; font: inherit; font-size: 13px; color: var(--muted); }
.todo-pos-btn.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.todo-meta { font-size: 11px; color: var(--muted); }
.todo-meta.done { color: #137a47; }
.todo-cards { display: grid; gap: 8px; }
.todo-card { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; background: var(--surface); }
.todo-card.overdue { border-left: 3px solid var(--red); }
.todo-card.due-today { border-left: 3px solid var(--amber); }
.todo-card.is-done { opacity: 0.6; }
.todo-card.is-done .todo-text { text-decoration: line-through; }
.todo-move { display: inline-flex; flex-direction: column; gap: 1px; flex: none; }
.todo-arrow { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 9px; line-height: 1; padding: 1px 2px; }
.todo-arrow:hover:not([disabled]) { color: var(--accent); }
.todo-arrow[disabled] { opacity: 0.25; cursor: default; }
.todo-check { flex: none; display: inline-flex; }
.todo-body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.todo-text { font-size: 14px; color: var(--text); }
.todo-due { font-size: 12px; color: var(--muted); }
.todo-due.overdue { color: var(--red); font-weight: 700; }
.todo-due.today { color: var(--amber); font-weight: 700; }
.todo-done-wrap { margin-top: 8px; }
.todo-done-wrap summary { cursor: pointer; font-size: 13px; color: var(--muted); }

/* ----- Resume SLA KPI + tab + monitor view ----- */
.kpi.sla .num { color: var(--accent); }
.kpi.sla.has-breach .num { color: var(--red); }
.view-toggle button.has-breach { color: var(--red); }
.view-toggle button.has-breach.active { color: #fff; background: var(--red); }

.sla-view { padding: 16px 24px 40px; }
.sla-view-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.sla-view-head h2 { margin: 0; font-size: 20px; }
.sla-view-sub { color: var(--muted); font-size: 13px; }
.sla-empty { color: var(--muted); padding: 24px; text-align: center; max-width: 620px; }
.sla-group { margin-top: 22px; }
.sla-group h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 0 0 12px; }
.sla-group-count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  background: var(--accent-soft); color: var(--accent); border-radius: 999px; font-size: 11px; font-weight: 700;
}
.sla-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.sla-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow); cursor: pointer;
}
.sla-card:hover { border-color: var(--accent); }
.sla-card.breached { border-color: var(--red); background: var(--red-soft); }
.sla-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sla-name { font-weight: 600; font-size: 14px; }
.sla-phase { color: var(--muted); font-size: 12px; margin: 4px 0 10px; }
.sla-bar { height: 7px; border-radius: 999px; background: var(--border); overflow: hidden; }
.sla-bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.sla-bar-fill.running { background: var(--green); }
.sla-bar-fill.paused { background: var(--muted); }
.sla-bar-fill.over { background: var(--red); }
.sla-meta { color: var(--muted); font-size: 12px; margin-top: 8px; }
.sla-pill { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.sla-pill.running { background: var(--green-soft); color: var(--green); }
.sla-pill.paused { background: var(--border); color: var(--muted); }
.sla-card .sla-flag { background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }

/* ----- Needs-review KPI + badge + banner ----- */
.kpi.review .num { color: var(--muted); }
.kpi.review.has-review .num { color: var(--amber); }
.chip.review { background: var(--amber-soft); color: var(--amber); }
.review-banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 14px 22px; padding: 12px 16px; border: 1px solid var(--amber);
  background: var(--amber-soft); border-radius: var(--radius);
}
.review-banner .rb-body { flex: 1; min-width: 200px; font-size: 13px; color: var(--text); }
.review-banner .primary-btn { min-height: 38px; padding: 0 16px; }
/* "Finish coach setup" banner — a distinct accent tone so it doesn't read as the amber "Needs review". */
.setup-banner { border-color: var(--accent); background: var(--accent-soft, #eef2ff); }
.adm-acq-setup { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 4px 0 8px; }
.adm-setup-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }

/* ----- Client self-onboarding flow ----- */
.onb-card { display: flex; flex-direction: column; gap: 18px; }
.onb-head h2 { margin: 0 0 6px; font-size: 20px; }
.onb-progress { height: 6px; background: var(--accent-soft); border-radius: 4px; overflow: hidden; margin: 14px 0 6px; }
.onb-progress-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width .25s ease; }
.onb-step-count { font-size: 12px; color: var(--muted); }
/* Only the latest question + answer is shown, capped so the card stays compact and the
   progress bar above it remains visible. */
.onb-thread { display: flex; flex-direction: column; gap: 8px; max-height: 124px; overflow-y: auto; }
.onb-msg { max-width: 85%; padding: 9px 13px; border-radius: 14px; font-size: 13px; line-height: 1.4; }
.onb-msg.bot { align-self: flex-start; background: #eef1f4; color: var(--text); border-bottom-left-radius: 4px; }
.onb-msg.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.onb-current { display: flex; flex-direction: column; gap: 10px; }
.onb-q { font-size: 16px; font-weight: 600; color: var(--text); }
.onb-hint { margin: -4px 0 2px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.onb-feeling-other { margin-top: 4px; min-height: 60px; resize: vertical; }
.onb-input-wrap { display: flex; flex-direction: column; gap: 10px; }
.onb-input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 9px;
  font-size: 15px; font-family: inherit; background: var(--surface); color: var(--text);
}
.onb-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
/* Years-of-experience: a narrow numeric field (max two digits), not a full-width input. */
.onb-input.onb-years { width: 56px; text-align: center; }
.onb-radios, .onb-checks { display: flex; flex-direction: column; gap: 8px; }
.onb-opt {
  display: flex; align-items: center; gap: 9px; padding: 11px 13px; border: 1px solid var(--border);
  border-radius: 9px; font-size: 15px; cursor: pointer; background: var(--surface);
}
.onb-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.onb-opt input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.onb-children { display: flex; flex-direction: column; gap: 10px; }
.onb-child-row { display: grid; grid-template-columns: 1fr 110px 150px auto; gap: 8px; align-items: center; }
.onb-child-remove {
  width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer;
}
.onb-child-remove:hover { border-color: var(--red); color: var(--red); }
.onb-add-child {
  align-self: flex-start; border: 1px dashed var(--border); background: transparent; color: var(--accent);
  font-weight: 600; font-size: 13px; padding: 7px 13px; border-radius: 8px; cursor: pointer;
}
.onb-add-child:hover { border-color: var(--accent); background: var(--accent-soft); }
.onb-err { color: var(--red); font-size: 13px; margin: 0; min-height: 16px; }
.onb-actions { display: flex; gap: 10px; align-items: center; }
.onb-btn {
  min-height: 46px; padding: 0 22px; border-radius: 10px; font-size: 15px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent; font-family: inherit;
}
.onb-btn.primary { background: var(--accent); color: #fff; margin-left: auto; }
.onb-btn.primary:hover { filter: brightness(1.05); }
.onb-btn.primary:disabled { opacity: .6; cursor: default; }
.onb-btn.ghost { background: transparent; border-color: var(--border); color: var(--muted); }
.onb-btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 520px) {
  .onb-child-row { grid-template-columns: 1fr 1fr; }
  .onb-child-row .onb-child-remove { grid-column: 2; justify-self: end; }
}

/* ----- Impediments view (cross-client, grouped) ----- */
.imp-view { padding: 16px 24px 40px; }
.imp-view-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.imp-view-head h2 { margin: 0; font-size: 20px; }
.imp-view-sub { color: var(--muted); font-size: 13px; }
.imp-view-empty { color: var(--muted); padding: 24px; text-align: center; }
.imp-group { margin-top: 20px; }
.imp-group-h { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 0 0 10px; }
.imp-group-n {
  background: var(--bg); border: 1px solid var(--border); border-radius: 20px;
  padding: 1px 9px; font-size: 12px; font-weight: 700; color: var(--muted);
}
.imp-group-empty { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.imp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.imp-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow); border-left: 3px solid var(--amber);
}
.imp-card.is-resolved { border-left-color: var(--green); opacity: .92; }
.imp-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.imp-card-client { font-weight: 700; font-size: 14px; }
.imp-card-age { font-size: 12px; font-weight: 600; color: var(--muted); }
.imp-card-age.live { color: var(--amber); }
.imp-card-desc { margin: 0 0 8px; font-size: 14px; line-height: 1.4; }
.imp-card-meta { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); }
.imp-card-resolution {
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 13px;
}
.imp-res-label { display: block; font-size: 12px; font-weight: 600; color: var(--green); margin-bottom: 4px; }
.imp-card-resolution p { margin: 0; }
.imp-res-none { color: var(--muted); font-style: italic; }
.imp-card-actions { margin-top: 10px; }
.imp-link-btn {
  border: 0; background: transparent; color: var(--accent); font-weight: 600; font-size: 13px;
  cursor: pointer; padding: 0;
}
.imp-link-btn:hover { text-decoration: underline; }
.imp-card-actions { display: flex; align-items: center; gap: 14px; }
.imp-link-btn.danger { color: var(--red); }

/* Previous check-ins inside the coach quick-capture modal. */
.scap-history { padding: 14px 16px 18px; border-top: 1px solid var(--border); }
.scap-history h4 { margin: 0 0 10px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.scap-hist-empty { color: var(--muted); font-size: 13px; margin: 0; }
.scap-hist-item { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: var(--bg); }
.scap-hist-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.scap-hist-top b { font-size: 13px; }
.scap-hist-by { font-size: 11px; color: var(--muted); }
.scap-hist-line { margin: 2px 0; font-size: 13px; line-height: 1.4; }
.scap-hist-line span { display: inline-block; min-width: 78px; color: var(--muted); font-weight: 600; font-size: 12px; }
.scap-hist-line em { font-style: normal; }
.scap-hist-metrics { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.imp-resolve { margin-top: 10px; }
.imp-resolve textarea { width: 100%; }
.imp-resolve-actions { display: flex; gap: 8px; margin-top: 8px; }
.imp-resolve-actions .primary-btn { min-height: 36px; padding: 0 16px; }
.ghost-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  border-radius: 8px; padding: 0 14px; min-height: 36px; font-weight: 600; font-size: 13px; cursor: pointer;
}
.ghost-btn:hover { border-color: var(--accent); color: var(--text); }

/* ----- Detail-panel impediments section ----- */
/* Coach detail-panel: daily check-in reminders */
.detail-reminders { padding: 20px 24px; border-top: 1px solid var(--border); }
.dr-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.dr-head h3 { margin: 0; font-size: 16px; }
.dr-pending { background: var(--amber-soft); color: var(--amber); border-radius: 20px; padding: 1px 9px; font-size: 11px; font-weight: 700; }
.dr-hint { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.dr-toggle { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 12px; cursor: pointer; }
.dr-grid { display: grid; grid-template-columns: minmax(180px, 1.4fr) 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.dr-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.dr-field select, .dr-field input { font-size: 14px; font-weight: 400; color: var(--text); padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; }
.dr-wa { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.dr-wa-missing { color: var(--amber); }
.dr-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dr-actions .primary-btn { min-height: 38px; padding: 0 16px; }
@media (max-width: 560px) { .dr-grid { grid-template-columns: 1fr; } }

/* Client portal: reminder preferences card */
.client-reminders .cr-toggle { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 6px 0 12px; cursor: pointer; }
.client-reminders .cr-grid { display: grid; gap: 12px; margin-bottom: 10px; }
.client-reminders .cr-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.client-reminders .cr-field select, .client-reminders .cr-field input { font-size: 16px; font-weight: 400; color: var(--text); padding: 10px; border: 1px solid var(--border); border-radius: 10px; }
.client-reminders .cr-wa { margin: 4px 0 12px; }
/* Coach add/edit "Feeling → Other" free-text box. */
.feeling-other {
  width: 100%; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 9px; font-size: 14px; font-family: inherit; background: var(--surface);
  color: var(--text); resize: vertical;
}
.feeling-other:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.detail-impediments { padding: 20px 24px; border-top: 1px solid var(--border); }
.di-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.di-head h3 { margin: 0; font-size: 16px; }
.di-open-badge {
  background: var(--amber-soft); color: var(--amber); border-radius: 20px;
  padding: 1px 9px; font-size: 12px; font-weight: 700;
}
.di-add { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.di-add textarea { width: 100%; }
.di-add .primary-btn { align-self: flex-start; min-height: 38px; padding: 0 16px; }

/* ----- Client portal impediments card (read-only) ----- */
.client-impediments h2 { margin: 0 0 4px; font-size: 18px; }
.ci-imp-group { margin-top: 14px; }
.ci-imp-h { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 0 0 8px; }
.ci-imp-n {
  background: var(--bg); border: 1px solid var(--border); border-radius: 20px;
  padding: 1px 8px; font-size: 11px; font-weight: 700; color: var(--muted);
}
.ci-imp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ci-imp-item {
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px;
  border-left: 3px solid var(--amber); background: var(--surface);
}
.ci-imp-item.is-resolved { border-left-color: var(--green); }
.ci-imp-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.ci-imp-age { font-size: 12px; font-weight: 600; color: var(--muted); }
.ci-imp-age.live { color: var(--amber); }
.ci-imp-date { font-size: 11px; color: var(--muted); }
.ci-imp-desc { margin: 0 0 6px; font-size: 14px; line-height: 1.4; }
.ci-imp-by { font-size: 12px; color: var(--muted); }
.ci-imp-res { margin: 8px 0 0; font-size: 13px; color: var(--green); }
.cc-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* Big-number boxes: the count is the hero, the label sits underneath as a caption. */
.cc-metric {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
  padding: 14px 10px 12px; transition: border-color .15s, box-shadow .15s;
}
.cc-metric:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cc-metric input {
  width: 100%; border: 0; background: transparent; text-align: center;
  font-size: 34px; font-weight: 800; line-height: 1.05; color: var(--text);
  padding: 0; margin: 0; -webkit-appearance: none; appearance: none;
}
.cc-metric input::-webkit-outer-spin-button,
.cc-metric input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cc-metric input[type="number"] { -moz-appearance: textfield; }
.cc-metric input::placeholder { color: var(--border); font-weight: 800; }
.cc-metric input:focus { outline: none; }
.cc-metric-cap {
  margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--muted);
  line-height: 1.25; letter-spacing: .01em;
}
.cc-metric-cap small { font-weight: 400; }
.cc-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.cc-actions .primary-btn { min-height: 44px; padding: 0 20px; }
.cc-saved { color: var(--green); font-size: 13px; font-weight: 600; }

.client-milestones h2 { margin: 0 0 4px; font-size: 18px; }
.ms-help { margin: 0 0 14px; font-size: 13px; }
.ms-list { list-style: none; margin: 16px 0 0; padding: 0; }
.ms-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0; border-top: 1px solid var(--border);
}
.ms-icon { flex: none; font-size: 18px; line-height: 1.3; }
.ms-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ms-type { font-weight: 600; }
.ms-detail { font-size: 13px; }
.ms-comm { font-size: 13px; color: var(--muted); font-style: italic; }
.ms-date { font-size: 12px; color: var(--muted); }
.ms-del {
  flex: none; border: none; background: transparent; color: var(--muted);
  font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px; min-height: 44px;
}
.ms-del:hover { color: var(--red); }
.ms-empty { padding: 10px 0; border-top: 1px solid var(--border); }

.client-journey { padding: 0; }
.client-journey > summary {
  list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 600;
}
.client-journey > summary::-webkit-details-marker { display: none; }
.client-journey > summary::after { content: "⌄"; float: right; color: var(--muted); }
.client-journey[open] > summary::after { content: "⌃"; }
.client-journey .client-stages { padding: 0 14px 14px; margin: 0; }

/* check-in streak */
.client-streak { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.client-streak.lit { background: linear-gradient(180deg, #fff7ed, var(--surface)); border-color: #fed7aa; }
.client-streak.atrisk { background: var(--surface); }
.st-flame { font-size: 30px; line-height: 1; flex: none; }
.client-streak.atrisk .st-flame { filter: grayscale(0.7); opacity: .7; }
.st-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-count { font-weight: 800; font-size: 17px; }
.st-msg { font-size: 13px; color: var(--muted); }

/* client self-reported frameworks */
.client-frameworks h2 { margin: 0 0 4px; font-size: 18px; }
.client-frameworks > .client-muted { margin: 0 0 14px; font-size: 13px; }
/* per-task mastery card (My Path focus column): same row UI as the frameworks card */
.client-task-mastery h2 { margin: 0 0 4px; font-size: 18px; }
.client-task-mastery > .client-muted { margin: 0 0 12px; font-size: 13px; line-height: 1.55; }
.client-task-mastery .tm-status { margin-bottom: 10px; }
/* ---- Inline client-feedback task card ---- */
.client-task-feedback h2 { margin: 0 0 4px; font-size: 18px; }
.client-task-feedback > .client-muted { margin: 0 0 14px; font-size: 13px; line-height: 1.55; }
.tf-form { display: flex; flex-direction: column; gap: 18px; }
.tf-q { display: flex; flex-direction: column; gap: 8px; }
.tf-label { font-size: 14px; font-weight: 650; line-height: 1.4; }
.tf-req { color: #dc2626; font-weight: 700; }
.tf-text { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 14px; resize: vertical; background: var(--surface); }
.tf-choices { flex-direction: column; }
.tf-choices .sa-bool-btn { width: 100%; white-space: normal; text-align: left; padding: 10px 16px; border-radius: 12px; }
.tf-noopts { margin: 0; font-size: 13px; color: var(--muted); font-style: italic; }
.tf-scale { display: flex; flex-wrap: wrap; gap: 6px; }
.tf-scale-btn { flex: 1 1 auto; min-width: 34px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; padding: 8px 0; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 600; }
.tf-scale-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.tf-likert { gap: 6px; }
.tf-likert .sa-likert-btn { flex: 1 1 auto; }
.tf-ends { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 2px; }
.tf-media { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tf-media-empty { padding: 12px; border: 1px dashed var(--border); border-radius: 10px; background: var(--bg, #f7f7f8); }
.tf-rec-btn, .tf-up-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; padding: 8px 16px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 600; color: var(--accent); }
.tf-rec-btn:hover, .tf-up-btn:hover { border-color: var(--accent); }
.tf-media-status { font-size: 12px; color: var(--muted); }
.tf-media-preview { width: 100%; max-width: 340px; border-radius: 12px; background: #000; }
.tf-media-preview-audio { width: 100%; max-width: 340px; }
.tf-media-actions { flex: 1 1 100%; }
.tf-actions { margin-top: 4px; }
.tf-thanks { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: #16a34a; }
.tf-recap { display: flex; flex-direction: column; gap: 12px; }
.tf-recap-row { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; background: var(--bg, #f7f7f8); border-radius: 10px; }
.tf-recap-q { font-size: 12px; font-weight: 650; color: var(--muted); }
.tf-recap-a { font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.tf-recap-empty { color: var(--muted); font-style: italic; }
/* ---- Coach detail-pane Feedback section ---- */
.detail-feedback { padding: 4px 0; }
.detail-feedback .ds-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.detail-feedback .ds-head h3 { margin: 0; }
.cfb-count { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.cfb-list { display: flex; flex-direction: column; gap: 14px; }
.cfb-entry { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.cfb-entry-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cfb-task { font-size: 14px; font-weight: 650; }
.cfb-when { font-size: 12px; color: var(--muted); }
.tm-passed { display: inline-flex; align-items: center; gap: 6px; color: #1c6b3f; background: #e6f5ec; font-weight: 700; font-size: 12px; padding: 3px 11px; border-radius: 999px; margin-bottom: 12px; }
/* "Your evidence is saved — just pass the quiz" note shown when a task was submitted before its quiz existed. */
.tm-evkept, .fw-evkept, .tm-quizonly { color: #1c6b3f; background: #e6f5ec; font-weight: 600; font-size: 13px; padding: 8px 12px; border-radius: 10px; margin-bottom: 12px; }
/* Time-crunch mastery exemption: skip button, "skipped" banner, and the task-list "finish later" tag. */
.tm-skip { margin-top: 12px; text-align: center; }
.tm-skip-btn { color: var(--muted); font-size: 13px; }
.tm-skipped { color: #8a5a00; background: #fdf2df; border: 1px solid #f2d79a; font-weight: 600; font-size: 13px; padding: 8px 12px; border-radius: 10px; margin-bottom: 12px; }
/* Prominent "keep moving" skip for time-crunch-exempt clients, and the repeat-booking "continue without
   booking another" card. Theme-safe: colours come from tokens, so both light + dark work with no override. */
.tm-skip-cta, .bk-already {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--accent-soft); border: 1px solid var(--border);
  border-radius: 12px; padding: 13px 15px; margin: 0 0 14px;
}
.tm-skip-cta .tm-skip-lead, .bk-already .bk-already-lead { margin: 0; font-size: 13.5px; font-weight: 700; color: var(--text); }
.tm-skip-cta .tm-skip-sub, .bk-already .bk-already-sub { margin: 0; font-size: 12.5px; color: var(--muted); }
.tm-skip-cta .tm-skip-go {
  align-self: flex-start; margin-top: 4px; height: 34px; padding: 0 16px; border-radius: 8px;
  border: 1px solid var(--accent); background: transparent; color: var(--accent);
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.tm-skip-cta .tm-skip-go:hover { background: var(--accent); color: #fff; }
.bk-already .bk-already-go {
  align-self: flex-start; margin-top: 4px; height: 34px; padding: 0 16px; border-radius: 8px;
  border: none; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer;
}
.bk-already .bk-already-go:hover { filter: brightness(0.94); }
.mp-step-skip { margin-left: 8px; font-size: 11px; font-weight: 700; color: #8a5a00; background: #fdf2df; border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
.fw-evkept { margin: 8px 0; }
.fw-group { border-top: 1px solid var(--border); }
.fw-group > summary {
  list-style: none; cursor: pointer; padding: 12px 8px; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-radius: 8px; transition: background .15s ease;
}
.fw-group > summary:hover { background: var(--accent-soft); }
.fw-group > summary::-webkit-details-marker { display: none; }
.fw-sum-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
/* A circular +/− affordance so it's obvious the framework row expands.
   The plus is drawn from two CSS bars (not a text glyph) so it's perfectly
   centered in the circle and rotates cleanly into an ×. */
.fw-caret {
  flex: none; position: relative; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  transition: transform .18s ease, background .15s ease;
}
.fw-caret::before, .fw-caret::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 11px; height: 2.5px; border-radius: 2px; background: currentColor;
  transform: translate(-50%, -50%);
}
.fw-caret::after { transform: translate(-50%, -50%) rotate(90deg); }
.fw-group[open] > summary .fw-caret { transform: rotate(135deg); }
.fw-name { min-width: 0; }
.fw-progress { font-size: 12px; font-weight: 600; color: var(--muted); flex: none; }
.fw-items { padding: 0 0 10px; display: flex; flex-direction: column; gap: 2px; }
.fw-item { border-radius: 9px; }
.fw-label { flex: 1; min-width: 0; font-size: 14px; }
.fw-item.confirmed .fw-label { color: var(--muted); }
/* Status badge sits in a fixed-width column so badges line up across rows. */
.fw-badge {
  flex: none; min-width: 96px; text-align: center; white-space: nowrap;
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
}
.fw-badge.pending { background: var(--accent-soft); color: var(--accent); }
.fw-badge.confirmed { background: #dcfce7; color: #15803d; }

/* coach view of client-reported framework progress */
.dr-selfreport .csr-hint { text-transform: none; letter-spacing: 0; font-weight: 400; }
.csr-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 9px;
  border: 1px solid var(--border); margin-bottom: 6px; cursor: pointer; background: var(--surface);
}
.csr-item.confirmed { background: #f0fdf4; border-color: #bbf7d0; }
.csr-item input { width: 18px; height: 18px; flex: none; accent-color: var(--green); }
.csr-label { flex: 1; min-width: 0; font-size: 13px; }
.csr-state { flex: none; font-size: 11px; font-weight: 700; color: var(--muted); }
.csr-item.confirmed .csr-state { color: #15803d; }

@media (min-width: 560px) {
  /* Flat 20px matches the Brian AI messenger dock's inset (right: 20px) so the account avatar lines up
     with where Brian AI ends (no safe-area inset, which was pushing it inward on notched phones). */
  .client-header { padding: 16px 20px; }
  .client-main { padding: 24px; }
  .cc-metrics { grid-template-columns: 1fr 1fr 1fr 1fr; }
}

/* ===== Admin batch: check-in source, multi-tag, editable coach check-in ===== */
.cck-source { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.cck-source.by-client { background: var(--accent-soft); color: var(--accent); }
.cck-source.by-coach { background: #f3e8ff; color: #7e22ce; }
.cck-source.none { background: #eef1f4; color: var(--muted); }
.sc-source { font-size: 11px; font-weight: 600; margin: -4px 0 6px; }
.sc-source.by-client { color: var(--accent); }
.sc-source.by-coach { color: #7e22ce; }

.cck-scrum-edit { display: grid; gap: 8px; margin: 8px 0; }
.cck-scrum-edit label { display: grid; gap: 3px; }
.cck-scrum-edit label span { font-size: 11px; font-weight: 600; color: var(--muted); }
.cck-scrum-edit textarea { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font: inherit; resize: vertical; }
.cck-metrics-edit { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 6px; margin: 8px 0; }
.cck-metrics-edit label { display: grid; gap: 3px; text-align: center; }
.cck-metrics-edit input { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 6px; font: inherit; text-align: center; }
.cck-metrics-edit label span { font-size: 10px; color: var(--muted); }
.cck-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0; }
.cck-tags-cap { font-size: 11px; font-weight: 600; color: var(--muted); width: 100%; }
.cck-tags select { border: 1px solid var(--border); border-radius: 8px; padding: 5px 8px; font: inherit; max-width: 100%; }
.cck-tags .cr-other-field { width: 100%; }
.cck-tags .cr-other-field input { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font: inherit; }
.sc-tag { display: flex; flex-wrap: wrap; gap: 4px; }
.sc-tag-chip { background: var(--accent-soft); color: var(--accent); padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }

/* ===== Framework evidence (client side) ===== */
/* One framework row laid out as a table: label | status | action, the last two fixed-width
   and flush right so they form clean vertical columns down the list. */
.fw-item-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap;
  padding: 9px 6px; border-radius: 9px;
}
.fw-item-row:hover { background: var(--bg); }
.fw-item.reported .fw-item-row { background: #f8fafc; }
.fw-item.reported .fw-item-row:hover { background: #f1f5f9; }
.fw-item-row .fw-label { flex: 1; }
.fw-mark, .fw-undo {
  flex: none; width: 116px; text-align: center; white-space: nowrap;
  border: 1px solid var(--border); background: var(--surface); border-radius: 8px;
  padding: 6px 8px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.fw-mark { color: var(--accent); border-color: var(--accent); }
.fw-undo { color: var(--muted); }
.fw-evidence { margin: 10px 0 4px; padding: 12px; border: 1px dashed var(--border); border-radius: 10px; background: var(--surface); display: grid; gap: 12px; }
.ev-drive-note { margin: 0; font-size: 12px; color: var(--muted); background: #f1f5f9; border-radius: 8px; padding: 8px 10px; }
.ev-video { display: grid; gap: 8px; }
.ev-video-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ev-or { color: var(--muted); font-size: 12px; }
.ev-video-preview video { width: 100%; max-width: 100%; border-radius: 8px; background: #000; }
.ev-link span { font-size: 11px; color: var(--muted); }
.ev-link input { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 8px; font: inherit; }
.fw-evidence-summary { margin-top: 8px; padding: 8px 10px; background: #f1f5f9; border-radius: 8px; font-size: 13px; }
.fes-explain { margin: 0 0 6px; font-style: italic; color: var(--text); }
.fes-links { display: flex; gap: 14px; flex-wrap: wrap; }
.fes-links a { color: var(--accent); font-weight: 600; text-decoration: none; font-size: 12px; }
.csr-item { display: block; padding: 8px; border-radius: 8px; }
.csr-row { display: flex; align-items: center; gap: 8px; }
.csr-noev { margin: 4px 0 0 26px; font-size: 12px; color: var(--muted); }

/* ===== Super Admin panel ===== */
.admin-panel { position: fixed; top: 0; right: 0; width: min(860px, 100%); height: 100%; background: var(--surface); box-shadow: -8px 0 28px rgba(0,0,0,0.18); z-index: 60; overflow-y: auto; display: flex; flex-direction: column; }
.admin-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.admin-head h2 { margin: 0; font-size: 18px; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 6px; row-gap: 4px; padding: 12px 20px 0; }
.admin-tab { border: none; background: #eef1f4; color: var(--muted); padding: 8px 13px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.admin-tab.active { background: var(--accent); color: #fff; }
.admin-body { padding: 16px 20px 40px; }
.adm-hint { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.adm-input { border: 1px solid var(--border); border-radius: 8px; padding: 7px 9px; font: inherit; }
.adm-fw { border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 14px; }
.adm-fw-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.adm-fw-name { flex: 1; font-weight: 700; }
.adm-fw-actions { display: flex; gap: 4px; }
.adm-move, .adm-x { border: 1px solid var(--border); background: var(--surface); border-radius: 6px; padding: 4px 8px; font: inherit; font-size: 12px; cursor: pointer; }
.adm-x { color: #dc2626; }
.adm-move:disabled { opacity: 0.4; cursor: default; }
.adm-items { display: grid; gap: 6px; margin: 6px 0; }
.adm-item { display: flex; gap: 6px; align-items: center; }
.adm-item .adm-input { flex: 1; }
.adm-nested { font-size: 11px; color: #7e22ce; white-space: nowrap; }
.adm-add { border: 1px dashed var(--border); background: var(--surface); border-radius: 8px; padding: 6px 12px; font: inherit; font-size: 13px; color: var(--accent); cursor: pointer; margin-top: 6px; }
.adm-group { border: 1px solid var(--border); border-radius: 10px; padding: 10px; margin: 10px 0; background: #fafbfc; }
.adm-group-head { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.adm-group-head .adm-input { flex: 1; font-weight: 600; }
.adm-add-fw, .adm-add-group { display: block; }
/* Stages editor */
.adm-stage { border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 14px; }
.adm-stage-head { display: flex; gap: 8px; align-items: center; }
.adm-stage-flags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.adm-lock { font-size: 11px; color: #475569; background: #eef2f7; border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; white-space: nowrap; cursor: help; }
.adm-cps { display: grid; gap: 8px; margin: 8px 0; }
.adm-cp { border: 1px solid var(--border); border-radius: 10px; padding: 8px; background: #fafbfc; }
.adm-cp-main { display: flex; gap: 6px; align-items: center; }
.adm-cp-main .adm-input { flex: 1; }
.adm-cp-flags { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }
.adm-cp-flag { font-size: 12px; color: #334155; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.adm-cp-flag input { margin: 0; }
.adm-cp-resp { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #334155; }
.adm-cp-resp-lbl { font-weight: 600; }
.adm-cp-resp-select { flex: none; width: auto; min-width: 150px; padding: 4px 8px; font-size: 12px; }
/* Responsible-party badge shown next to a checkpoint label */
.resp-badge {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .02em;
  text-transform: uppercase; padding: 1px 7px; border-radius: 999px; margin-left: 4px;
  vertical-align: middle; border: 1px solid transparent;
}
.resp-badge.client { background: var(--accent-soft); color: var(--accent); border-color: #c9d8ff; }
.resp-badge.coach { background: #ecfdf5; color: #047857; border-color: #bbf7d0; }
.resp-badge.employer { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.adm-stage-vis { font-weight: 600; color: #6b21a8; background: #faf5ff; border: 1px solid #e9d5ff; border-radius: 8px; padding: 6px 10px; margin: 0 0 8px; }
/* Products editor */
.adm-products { display: grid; gap: 8px; margin-bottom: 6px; }
.adm-product-row { display: grid; grid-template-columns: 1fr 150px auto; gap: 8px; align-items: center; }
.adm-product-row .adm-product-name { width: 100%; }
.adm-product-price { display: flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 8px; padding: 0 9px; }
.adm-product-price .app-currency { color: var(--muted); font-weight: 600; }
.adm-product-price .adm-input { border: none; padding: 7px 0; width: 100%; }
.adm-product-price .adm-input:focus { outline: none; }
.adm-empty { color: var(--muted); font-size: 13px; font-style: italic; }
.adm-add-product { display: block; }
/* Product price badge in the client preview */
.pv-price { color: var(--accent); font-weight: 700; margin-left: 6px; }

/* Team directory editor */
.adm-team { display: grid; gap: 12px; margin-bottom: 6px; }
.adm-team-row { display: flex; align-items: flex-end; gap: 8px; border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.adm-team-grid { display: grid; grid-template-columns: 1.4fr 1.6fr 1fr; gap: 10px; flex: 1; min-width: 0; }
.adm-team-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.adm-team-f > span { font-size: 12px; font-weight: 600; color: var(--muted); }
.adm-team-f .adm-input { width: 100%; }
.adm-team-row .adm-x { margin-bottom: 4px; }
@media (max-width: 760px) { .adm-team-grid { grid-template-columns: 1fr 1fr; } }
.adm-add-team { display: block; }

/* Admin Booking (appointment types) editor */
.adm-booking { display: grid; gap: 14px; margin-bottom: 6px; }
.adm-bk-type { border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.adm-bk-head { display: flex; align-items: flex-end; gap: 10px; }
.adm-bk-head .adm-team-f { flex: 1; }
.adm-bk-phase-row { display: flex; gap: 10px; margin-top: 10px; }
.adm-bk-phase-row .adm-team-f { flex: 1; min-width: 0; }
.adm-bk-dur { flex: 0 0 130px; }
.adm-bk-deltype { white-space: nowrap; }
.adm-bk-opts { display: grid; gap: 8px; margin: 10px 0 6px; }
.adm-bk-opt { display: grid; grid-template-columns: 200px 1fr auto; gap: 8px; align-items: center; }
.adm-add-bo { margin-top: 0; }

/* Client nav-bar: actions + "Book a meeting" button */
/* Reserve the pills row height so a pill appearing/disappearing (e.g. the Favorites pill on the first/
   last favorite) never collapses or expands this row — which, when it wraps to its own line on narrow
   screens, would shove the video below it (a blip). Height stays constant whether or not pills show. */
.client-header-actions { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 38px; }
/* The nav pills scroll horizontally within their own track so a full row can't push the whole page
   sideways on a narrow (mobile portrait) screen; the account avatar stays put on the right. */
.client-pill-scroll {
  display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 auto;
  overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; -ms-overflow-style: none;
}
.client-pill-scroll::-webkit-scrollbar { display: none; }
.client-pill-scroll > .np-control { flex: 0 0 auto; } /* pills keep their size and scroll, never shrink */
.client-avatar-wrap { flex: 0 0 auto; }
.cbk-btn {
  border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer;
  padding: 8px 16px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 600;
}
.cbk-btn:hover { filter: brightness(1.05); }
/* Top-nav "N upcoming" meetings pill — the inverse of the (filled) Book button: outlined accent. */
.cmtg-pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent); cursor: pointer;
  padding: 8px 14px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: background .15s, color .15s;
}
.cmtg-pill:hover { background: var(--accent); color: #fff; }
.cmtg-pill .cmtg-n { font-weight: 800; }
.cmtg-pill .cmtg-ic { font-size: 15px; line-height: 1; }
@media (max-width: 560px) { .cmtg-pill { padding: 8px 12px; } }
.cbk-btn:disabled { background: var(--border); border-color: var(--border); color: var(--muted); cursor: not-allowed; filter: none; }
/* "￫ Impediment" nav button — quieter than the primary book button */
.cbk-btn.cbk-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.cbk-btn.cbk-ghost:hover { border-color: var(--accent); color: var(--accent); filter: none; }
/* "N waiting on you" nav pill (coach is blocked by the client) — red, like an alert */
.cb-pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid #e6a6a0; background: #fdeceb; color: #b3271d; cursor: pointer;
  padding: 8px 14px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: background .15s, color .15s;
}
.cb-pill:hover { background: #b3271d; color: #fff; }
.cb-pill .cb-pill-n { font-weight: 800; }
/* fallback state: "N opened by you" (the client's own open impediments) — amber, not the red alert */
.cb-pill.cb-pill-own { border-color: #e6c98a; background: #fff6e6; color: #8a5a12; }
.cb-pill.cb-pill-own:hover { background: #8a5a12; color: #fff; }
@media (max-width: 560px) { .cb-pill { padding: 8px 12px; } }

/* ---- nav split pills: count (jump to list) joined to a ＋ (create) ---- */
.np-control { display: inline-flex; align-items: stretch; }
.np-pill, .np-add { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent); cursor: pointer; padding: 8px 14px; font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; transition: background .15s, color .15s; }
.np-ic { font-size: 15px; line-height: 1; }
.np-pill b { font-weight: 800; }
.np-main { border-radius: 999px 0 0 999px; }
.np-add { border-radius: 0 999px 999px 0; border-left-width: 0; padding: 8px 12px; font-size: 16px; line-height: 1; }
.np-solo { border-radius: 999px; }
.np-pill:hover, .np-add:hover { background: var(--accent); color: #fff; }
.np-imp-red { border-color: #e6a6a0; background: #fdeceb; color: #b3271d; }
.np-imp-red:hover { background: #b3271d; color: #fff; }
.np-imp-amber { border-color: #e6c98a; background: #fff6e6; color: #8a5a12; }
.np-imp-amber:hover { background: #8a5a12; color: #fff; }
.np-update { border-color: #9ad0c2; background: #e7f6f1; color: #1f6f54; }
.np-update:hover { background: #1f6f54; color: #fff; }
.np-offer { border-color: #c3b3e6; background: #f1ecfb; color: #5b3d9e; }
.np-offer:hover { background: #5b3d9e; color: #fff; }
.np-recording { border-color: #a9c2ec; background: #eaf1fb; color: #29508a; }
.np-recording:hover { background: #29508a; color: #fff; }

/* ── Recordings — shared mock/interview recordings (card below My Path, modal, coach pane) ── */
.rec-items { display: flex; flex-direction: column; gap: 14px; margin: 6px 0 2px; }
.rec-item { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--bg, #f6f7f9); }
.rec-item-head { display: flex; align-items: center; gap: 8px; }
.rec-icon { font-size: 18px; flex: none; }
.rec-item-title { font-weight: 650; flex: 1; min-width: 0; }
.rec-item-date { color: var(--muted); font-size: 13px; white-space: nowrap; }
.rec-del { flex: none; }
.rec-media { margin-top: 10px; }
.rec-play { width: 100%; min-height: 44px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font: inherit; font-weight: 600; cursor: pointer; color: var(--accent); }
.rec-play:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.rec-frame { margin-top: 0; }
.rec-frame .wv-iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; background: #000; }
.rec-openlink { display: inline-block; margin-top: 10px; font-weight: 600; color: var(--accent); text-decoration: none; }
.rec-openlink:hover { text-decoration: underline; }
.rec-nolink { display: inline-block; margin-top: 8px; font-size: 13px; }
.rec-notes, .rec-feedback { margin-top: 10px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; }
.rec-notes-lbl, .rec-fb-lbl { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 2px; }
.rec-feedback { background: #eaf1fb; border-radius: 10px; padding: 8px 10px; }
.rec-feedback .rec-fb-lbl { color: #29508a; }

/* Recording form (shared by client modal + coach pane) */
.rec-form { display: flex; flex-direction: column; gap: 12px; }
.rec-fld { display: flex; flex-direction: column; gap: 4px; }
.rec-lbl { font-size: 13px; font-weight: 600; color: var(--muted); }
.rec-input { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font: inherit; background: var(--surface, #fff); }
.rec-textarea { resize: vertical; }
.rec-radios { display: flex; gap: 16px; align-items: center; }
.rec-radios label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }

/* Recording modal: the list of existing recordings under the form */
.rcd-modal-actions { justify-content: flex-end; }
.rec-modal-list { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 12px; }
.rec-list-h { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.rec-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.rec-row:last-child { border-bottom: 0; }
.rec-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rec-row-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-row-date { color: var(--muted); font-size: 12px; }
.rec-row-open { font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }
.rec-empty { margin: 4px 0; }

/* Coach pane recordings section */
.detail-recordings { margin-top: 18px; }
.detail-recordings > h3 { margin: 0 0 10px; }
.dr-rec-add { border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 14px; background: var(--bg, #f6f7f9); }
.dr-rec-actions { margin-top: 12px; display: flex; justify-content: flex-end; gap: 8px; }
.dr-rec-list { display: flex; flex-direction: column; gap: 12px; }
.dr-rec { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.dr-rec-head { display: flex; align-items: center; gap: 8px; }
.dr-rec-title { font-weight: 650; flex: 1; min-width: 0; }
.dr-rec-date { color: var(--muted); font-size: 13px; white-space: nowrap; }
.dr-rec-open { font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }
.dr-rec-notes { margin-top: 8px; font-size: 14px; white-space: pre-wrap; }
.dr-rec-fb { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.dr-empty { color: var(--muted); }

/* ── Offer worksheet (client modal) ── */
.ow-list { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 12px; }
.ow-list-row { display: flex; align-items: stretch; gap: 6px; }
.ow-list-item { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; background: var(--bg, #f6f7f9); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer; font: inherit; }
.ow-list-item:hover { border-color: #5b3d9e; }
.ow-list-label { font-weight: 700; }
.ow-list-meta { font-size: 12px; color: var(--muted); }
.ow-list-del { width: 38px; border: 1px solid var(--border); border-radius: 10px; background: none; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; }
.ow-list-del:hover { background: #fdeaea; color: #c0392b; border-color: #e7b6b6; }
.ow-empty { margin: 4px 0 12px; }
.ow-form-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.ow-back { border: none; background: none; color: var(--accent); cursor: pointer; font: inherit; font-weight: 600; padding: 4px 0; }
.ow-status { font-size: 12px; color: var(--muted); }
.ow-status.is-sub { color: #1f6f54; font-weight: 700; }
.ow-sec { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px 4px; margin: 12px 0; }
.ow-sec legend { font-weight: 800; font-size: 13px; padding: 0 6px; color: #5b3d9e; }
.ow-field { margin-bottom: 10px; }
/* One-question-at-a-time runner */
.ow-run-prog { height: 6px; border-radius: 999px; background: #ece6f7; overflow: hidden; margin: 4px 0 14px; }
.ow-run-bar { height: 100%; background: #5b3d9e; border-radius: 999px; transition: width .25s ease; }
.ow-run-qn { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.ow-run-sec { color: #5b3d9e; }
.ow-run-q { margin: 6px 0 4px; font-size: 19px; line-height: 1.3; }
.ow-run-hint { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.ow-run-field { margin: 10px 0 4px; }
.ow-run-input { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font: inherit; }
textarea.ow-run-input { resize: vertical; min-height: 92px; }
input.ow-run-num { width: 120px; }
select.ow-run-input { width: auto; max-width: 100%; } /* fit the options, not the full row */
.ow-suffix { display: flex; align-items: center; gap: 8px; }
.ow-suffix-txt { color: var(--muted); font-weight: 600; }
input.ow-run-date { width: 200px; }
.ow-cur { display: flex; align-items: stretch; max-width: 240px; }
.ow-cur-sign { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--border); border-right: none; border-radius: 10px 0 0 10px; background: var(--bg, #f1f2f4); font-weight: 700; color: var(--muted); }
.ow-cur-input { border-radius: 0 10px 10px 0 !important; }
.adm-ow-opts { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.adm-ow-opts textarea { font-size: 13px; }
/* Yes / No radios */
.ow-radios { display: flex; gap: 10px; }
.ow-radio { flex: 1; display: flex; align-items: center; justify-content: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-weight: 600; }
.ow-radio:hover { border-color: #5b3d9e; }
.ow-radio.on { border-color: #5b3d9e; background: #f1ecfb; color: #5b3d9e; box-shadow: inset 0 0 0 1px #5b3d9e; }
/* Pill style: the radio input drives state but isn't shown (the highlighted pill is the indicator). */
.ow-radio input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.ow-run-nav { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.ow-run-nav .primary-btn { margin-left: auto; }
.ow-run-nav .text-btn[data-ow-skip] { color: var(--muted); }
.ow-run-done { text-align: center; padding: 14px 0 6px; }
.ow-run-done-ic { font-size: 38px; }
.ow-run-done h2 { margin: 6px 0 4px; }
.ow-sum-title { margin: 8px 0 4px; font-size: 16px; }

/* ── Received job offers card (client) ── */
.off-item { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; margin: 8px 0; }
.off-item-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.off-item-toggle { flex: 1; min-width: 140px; display: flex; align-items: center; gap: 6px; background: none; border: none; cursor: pointer; font: inherit; font-weight: 700; text-align: left; padding: 2px 0; }
.off-caret { color: var(--muted); }
.off-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.off-status select { font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px; }
.off-guidance { margin-top: 8px; background: #f1ecfb; border: 1px solid #ddd0f3; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.off-guidance-h { display: block; font-weight: 700; color: #5b3d9e; margin-bottom: 2px; }
.off-answers { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 6px; }
.ow-rev-status { font-size: 13px; margin-bottom: 8px; }
.ow-rev-guidance { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; font-size: 12px; color: var(--muted); }
.ow-rev-guidance textarea { font: inherit; font-size: 13px; color: var(--text, #1a1a1a); padding: 8px; border: 1px solid var(--border); border-radius: 8px; resize: vertical; }
/* ── Offer worksheet (coach review, read-only) ── */
.detail-offerws .ow-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #efe9fb; color: #5b3d9e; font-size: 12px; font-weight: 800; }
.ow-rev { border: 1px solid var(--border); border-radius: 10px; margin: 8px 0; overflow: hidden; }
.ow-rev-head { width: 100%; display: flex; align-items: center; gap: 8px; background: var(--bg, #f6f7f9); border: none; cursor: pointer; padding: 10px 12px; font: inherit; text-align: left; }
.ow-rev-label { font-weight: 700; flex: 1; }
.ow-rev-meta { font-size: 12px; color: var(--muted); }
.ow-rev-caret { color: var(--muted); }
.ow-rev-body { padding: 8px 12px 12px; }
.ow-rev-sec { margin-top: 10px; }
.ow-rev-sec h5 { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: #5b3d9e; }
.ow-rev-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 4px 0; border-top: 1px solid var(--border); }
.ow-rev-q { color: var(--muted); font-size: 13px; }
.ow-rev-a { font-size: 13px; white-space: pre-wrap; }

/* ── Offer worksheet (admin editor) ── */
.adm-ow-sec { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin: 12px 0; }
.adm-ow-sec-head { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.adm-ow-sectitle { flex: 1; font-weight: 700; }
.adm-ow-q { border: 1px solid var(--border); border-radius: 8px; padding: 8px; margin: 6px 0; background: var(--bg, #fafbfc); }
.adm-ow-q-main { display: flex; gap: 6px; align-items: center; }
.adm-ow-qlabel { flex: 1; }
.adm-ow-type { width: 90px; flex: none; }
.adm-ow-cond { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.adm-ow-cond select { padding: 4px 6px; font-size: 12px; }
.adm-ow-condq { max-width: 220px; }
.adm-mini { border: 1px solid var(--border); background: var(--surface); border-radius: 6px; cursor: pointer; padding: 4px 7px; font-size: 12px; line-height: 1; color: var(--muted); }
.adm-mini:hover { background: var(--bg, #eef0f3); }
.adm-mini.adm-del:hover { background: #fdeaea; color: #c0392b; border-color: #e7b6b6; }
@media (max-width: 560px) { .np-pill, .np-add { padding: 8px 10px; } }

/* ---- Client "your coach is waiting on you" banner (above My Path) ---- */
/* combined Impediments card (waiting-on-you + your own) — red tint only when the coach is waiting */
.client-impediments h2 { margin: 0 0 4px; font-size: 18px; }
.client-impediments.has-waiting { border: 1px solid #f0c0bb; background: #fff6f5; }
/* collapsible header: title + count summary + caret. Collapsed by default to save space. */
.imp-card-toggle { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: none; padding: 0; cursor: pointer; font: inherit; text-align: left; }
.imp-card-title { font-size: 18px; font-weight: 700; color: var(--text); }
.imp-sum-wrap { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.imp-sum { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--bg, #f1f2f4); padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.imp-sum.waiting { color: #b3271d; background: #fdeceb; }
.imp-sum.meet { color: var(--accent); background: var(--accent-soft); }
/* meetings card picks up the meetings-pill blue, the way Impediments picks up its red */
.client-meetings { border: 1px solid var(--meet-card-border, #cdd7f0); background: var(--meet-card-bg, #f3f6ff); }
:root[data-theme="dark"] { --meet-card-bg: #161d2e; --meet-card-border: #2e3a57; }
@media (prefers-color-scheme: dark) { :root[data-theme="system"] { --meet-card-bg: #161d2e; --meet-card-border: #2e3a57; } }
.imp-card-body { margin-top: 6px; }
/* body is rendered always (so the toggle animates on a class flip, not a re-render); hidden collapsed */
.client-impediments.is-collapsed .imp-card-body, .client-meetings.is-collapsed .imp-card-body, .standup-card.is-collapsed .imp-card-body, .numbers-card.is-collapsed .imp-card-body, .client-updates.is-collapsed .imp-card-body, .client-recordings.is-collapsed .imp-card-body { display: none; }
/* My Path standup + numbers cards: collapsible, with a date pill + status/streak chips in the header */
.standup-card .imp-card-title .cc-date, .numbers-card .imp-card-title .cc-date { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 8px; }
.imp-sum.mpc-done { color: #137a47; background: #e7f6ec; }
.imp-sum.mpc-todo { color: var(--amber); background: var(--amber-soft); }
.imp-sum.mpc-todo.late { color: #fff; background: var(--red); }
.imp-sum.mpc-streak.lit { color: #b3530a; background: #fdeede; }
.imp-sum.mpc-streak.atrisk { color: var(--muted); background: var(--bg, #f1f2f4); }
.cc-dueby { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.cc-dueby.late { color: var(--red); font-weight: 600; }
.imp-sum.mpc-saved { color: var(--accent); background: var(--accent-soft); }
/* numbers card: plain surface to match the theme (no green tint) */
.numbers-card { border: 1px solid var(--border); background: var(--surface); }
/* + stepper on each big-number box */
.cc-metric { position: relative; }
.metric-plus { position: absolute; top: 7px; right: 7px; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--accent); font-size: 17px; font-weight: 700;
  line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .12s, border-color .12s; }
.metric-plus:hover { background: var(--accent-soft); border-color: var(--accent); }
.metric-plus:active { transform: scale(0.92); }
/* Daily Scrum submit + locked state */
.cc-actions-submit { margin-top: 14px; }
.cc-locknote { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.standup-card.is-submitted { background: #f7f9f7; }
.scrum-locked-line { display: grid; grid-template-columns: 84px 1fr; gap: 8px; margin: 4px 0; font-size: 14px; line-height: 1.4; }
.scrum-locked-line > span { color: var(--muted); font-size: 12px; font-weight: 600; padding-top: 1px; }
/* missed-check-ins attendance summary */
.cc-attendance { margin: 6px 0 8px; font-size: 13px; }
.cc-attendance.good { color: #137a47; }
.cc-attendance.miss > summary { cursor: pointer; color: var(--amber); font-weight: 600; }
.cc-missed-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; max-height: 180px; overflow: auto; }
/* red bubbles in the same hue/shape as the blue role/title chips (.rv-chip) */
.missed-chip { display: inline-flex; align-items: center; font-size: 13px; background: #fdeceb; color: #b3271d; border: 1px solid #f3c4c0; border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
/* Admin → Expenses */
.adm-exp-totals { display: flex; gap: 12px; margin: 6px 0 16px; }
.adm-exp-total { flex: 1; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface); text-align: center; }
.adm-exp-total .num { display: block; font-size: 26px; font-weight: 800; color: var(--text); }
.adm-exp-total .lbl { font-size: 12px; color: var(--muted); }
.adm-exp-list { display: grid; gap: 8px; }
.adm-exp-row { display: grid; grid-template-columns: 1fr 130px 130px 96px 28px; gap: 8px; align-items: center; }
.adm-exp-amt { position: relative; display: inline-flex; align-items: center; }
.adm-exp-cur { position: absolute; left: 10px; color: var(--muted); font-size: 13px; pointer-events: none; }
.adm-exp-amt input { padding-left: 20px; }
.adm-exp-mo { font-size: 13px; color: var(--muted); text-align: right; white-space: nowrap; }
.adm-exp-del { color: var(--red) !important; }
.adm-exp-empty { color: var(--muted); font-size: 14px; }
.adm-exp-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
/* coach-side one-at-a-time check-in navigator */
.dr-checkin-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dr-cknav { display: inline-flex; align-items: center; gap: 8px; }
.dr-cknav-pos { font-size: 12px; color: var(--muted); white-space: nowrap; }
.dr-cknav-btn { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; color: var(--text); font-size: 12px; line-height: 1; }
.dr-cknav-btn:hover:not([disabled]) { border-color: var(--accent); color: var(--accent); }
.dr-cknav-btn[disabled] { opacity: 0.35; cursor: default; }
.mpc-streak-line { display: flex; align-items: center; gap: 8px; margin: 8px 0 4px; padding: 8px 11px; border-radius: 10px; font-size: 13px; }
.mpc-streak-line.lit { color: #8a4308; background: #fdeede; }
.mpc-streak-line.atrisk { color: var(--text); background: var(--bg, #f6f7f9); }
.mpc-streak-line .st-flame { font-size: 16px; }
/* reusable +→− toggle (same as the Frameworks card), drawn from two bars: the vertical bar fades out
   when the card is open, leaving a clean minus (collapse), and returns to a plus when collapsed. */
.pm-toggle { margin-left: auto; flex: none; position: relative; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); transition: transform .18s ease, background .15s ease; }
.pm-toggle::before, .pm-toggle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 11px; height: 2.5px; border-radius: 2px; background: currentColor; transform: translate(-50%, -50%); transition: opacity .18s ease; }
.pm-toggle::after { transform: translate(-50%, -50%) rotate(90deg); }
.is-open .pm-toggle::after { opacity: 0; }
/* on the Impediments card it picks up the urgent red while the coach is waiting */
.client-impediments.has-waiting .pm-toggle { background: #fdeceb; color: #b3271d; }
.imp-hub-sec { margin-top: 14px; }
.imp-hub-sec:first-of-type { margin-top: 8px; }
.imp-hub-sec + .imp-hub-sec { border-top: 1px solid var(--border); padding-top: 12px; }
.imp-hub-h { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 15px; }
.imp-hub-h.waiting { color: #b3271d; }
.imp-hub-n { flex: none; min-width: 20px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--muted); color: #fff; font-size: 11px; font-weight: 800; }
.imp-hub-h.waiting .imp-hub-n { background: #b3271d; }
.imp-hub-sub { margin: 0 0 10px; font-size: 13px; }
.imp-hub-resolved { margin-top: 10px; }
.imp-hub-resolved > summary { cursor: pointer; font-size: 13px; color: var(--muted); font-weight: 600; }
.imp-hub-resolved > summary + .cb-list { margin-top: 10px; }
.cb-list { display: grid; gap: 12px; }
.cb-own { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; }
.cb-own-form { display: grid; gap: 8px; }
.cb-own-actions { display: flex; gap: 10px; align-items: center; }

/* ---- impediment card extras (subject, task, conversation, reply) ---- */
.imp-blocking-badge { flex: none; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: #b3271d; background: #fdeceb; padding: 2px 8px; border-radius: 999px; }
.imp-card.is-blocking { border-left: 3px solid #b3271d; }
.imp-card-subject { margin: 6px 0 4px; font-size: 15px; }
.imp-card-task { font-size: 12px; color: var(--muted); margin: 2px 0 6px; }
.imp-card-task b { color: var(--text); }
.imp-convo { display: grid; gap: 8px; margin: 10px 0; padding: 10px; background: var(--bg, #f7f7f8); border-radius: 10px; }
.imp-msg-head { display: flex; gap: 8px; align-items: baseline; font-size: 11px; color: var(--muted); }
.imp-msg-head b { color: var(--text); font-size: 12px; }
.imp-msg-text { font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.imp-msg-coach .imp-msg-text { color: var(--text); }
.imp-reply { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.imp-reply textarea { flex: 1 1 200px; min-height: 36px; resize: vertical; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 13px; }
/* round ➤ send, matching the Brian AI messenger send button */
.imp-send { flex: none; border: none; cursor: pointer; background: var(--accent); color: #fff; width: 34px; height: 34px; border-radius: 50%; font-size: 14px; line-height: 1; }
.imp-send:disabled { opacity: .5; cursor: default; }
.imp-client-resolve { color: #1a8a4a; }
/* coach detail "log a blocker" form extras */
.di-add-subject { margin-bottom: 8px; }
.di-add-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.di-add-task { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.di-add-task select { min-width: 200px; }
.di-add-flag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.di-blocking-badge { font-size: 11px; font-weight: 700; color: #b3271d; background: #fdeceb; padding: 2px 8px; border-radius: 999px; }
.cdlg-lead { margin: 0 0 10px; }
.cdlg-input { width: 100%; margin-bottom: 8px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; font: inherit; box-sizing: border-box; }

/* Book-a-meeting modal */
.cbk-modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 23, 42, .55); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  padding: 32px 16px; overflow: hidden;
  /* The overlay never scrolls (so no scrollbar can shift the modal off-center); the modal scrolls
     internally instead. This keeps left/right spacing perfectly symmetric. */
}
.cbk-modal {
  background: var(--surface); border-radius: 16px; width: 100%; max-width: 460px;
  max-height: calc(100vh - 64px); display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: hidden;
  animation: cbk-pop .16s ease-out;
}
.cbk-head { flex: none; }
/* Fill the modal and let the calendar take the remaining height — no internal scrollbar (whose
   right-side gutter was making the right edge look wider than the left). */
.cbk-body { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
body.cbk-open { overflow: hidden; }
@keyframes cbk-pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.cbk-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.cbk-head h2 { margin: 0; font-size: 18px; }
.cbk-body { padding: 16px 16px 14px; } /* bottom inset = the 14px gap above the prompt box */
/* Equal vertical rhythm between the stacked rows (flex column = no margin collapse):
   types -> coaches and coaches -> prompt are both 10px. */
.cbk-body .bk-types { margin: 4px 0 0; }
.cbk-body .bk-coaches { margin: 10px 0 0; justify-content: center; }
.cbk-body .bk-empty { margin: 10px auto 0; text-align: center; }
/* Compact single-column Calendly fills the narrow modal and starts right where the prompt was. */
.cbk-body .cp-calendly { min-width: 0; height: min(540px, calc(100vh - 230px)); min-height: 380px; margin-top: 10px; }

/* Client portal: "Book a meeting" card with appointment-type chips */
.client-booking h2 { margin: 0 0 4px; font-size: 18px; }
/* Meeting types as full-width stacked rows (name left, duration right) — always tidy, never ragged,
   stretches margin-to-margin regardless of how many types there are or how long their names run. */
.bk-types { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 12px 0 6px; }
.bk-chip {
  display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; box-sizing: border-box; text-align: left;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
  padding: 12px 16px; border-radius: 10px; font: inherit; font-weight: 600; font-size: 15px; color: var(--text, #1a1a1a);
  transition: border-color .12s, background .12s;
}
.bk-chip:hover { border-color: var(--accent); }
.bk-chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.bk-chip .bk-dur { flex: none; font-weight: 500; font-size: 13px; opacity: .8; }
/* Duration picker (only for same-named meetings offered at multiple lengths, e.g. Mock Interview). */
.bk-durations { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; }
.bk-dur-chip {
  flex: 1 1 auto; min-width: 88px; text-align: center;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
  padding: 12px 18px; border-radius: 10px; font: inherit; font-weight: 600; font-size: 15px; color: var(--text, #1a1a1a);
  transition: border-color .12s, background .12s;
}
.bk-dur-chip:hover { border-color: var(--accent); }
.bk-dur-chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
/* Coach picker (step 2): full-width rows with the coach's FACE + name, so it's the clear next choice. */
.bk-coaches { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 12px 0 6px; }
.bk-with { color: var(--muted); font-size: 13px; }
.bk-coach {
  display: flex; flex-direction: row; align-items: center; gap: 12px;
  width: 100%; box-sizing: border-box; text-align: left;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
  padding: 10px 14px; border-radius: 10px; font: inherit; font-size: 15px; font-weight: 600; color: var(--text, #1a1a1a);
  transition: border-color .12s, background .12s;
}
.bk-coach:hover { border-color: var(--accent); }
.bk-coach.on { background: var(--accent-soft, #eef); border-color: var(--accent); color: var(--accent); }
.bk-coach-face { flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; font-weight: 700; font-size: 15px; }
.bk-coach-face.has-photo { background: none; }
.bk-coach-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bk-coach-name { min-width: 0; }
/* Stepped booking: back link, the "who with?" heading, and the chosen-summary bar above the calendar. */
.bk-back { display: inline-block; align-self: flex-start; border: none; background: none; color: var(--accent); cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; padding: 2px 0 8px; }
.bk-back:hover { text-decoration: underline; }
.bk-step-q { margin: 2px 0 4px; font-size: 15px; font-weight: 700; }
.cbk-body .bk-step-q { text-align: center; }
.bk-chosen { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 2px 0 6px; }
.bk-chosen .bk-back { padding: 2px 0; }
.bk-chosen-label { font-size: 14px; font-weight: 600; color: var(--muted); }
.cp-calendly { min-width: 280px; height: 680px; margin-top: 12px; }
.bk-empty {
  width: 100%; margin: 14px 0 0; padding: 22px; border: 1px dashed var(--border); border-radius: 12px;
  text-align: center; color: var(--muted); font-size: 14px; background: var(--bg, #f8f9fb);
}
.bk-fallback { margin: 8px 2px 0; font-size: 12px; color: var(--muted); text-align: center; }
.bk-fallback a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* 5-Day Challenge affiliate promo card */
.client-challenge { background: var(--accent-soft, #eef2ff); border-color: var(--accent); }
.client-challenge h2 { margin: 0 0 8px; font-size: 18px; }
.client-challenge p { margin: 0 0 10px; line-height: 1.5; }
.challenge-btn {
  display: inline-block; margin-top: 4px; text-decoration: none;
  background: var(--accent); color: #fff; font: inherit; font-weight: 600;
  padding: 10px 18px; border-radius: 10px;
}
.challenge-btn:hover { filter: brightness(1.05); }

/* Brian AI — Google-style "Ask me anything" (client) */
.client-brianai h2 { margin: 0 0 4px; font-size: 18px; }
/* Shared rounded search box */
.bai-ask { display: flex; gap: 8px; align-items: flex-end; margin: 12px 0 6px; }
.bai-ask textarea { flex: 1; resize: none; min-height: 46px; padding: 12px 18px; border: 1px solid var(--border); border-radius: 24px; font: inherit; font-size: 15px; line-height: 1.4; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.bai-ask textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 1px 10px rgba(0,0,0,.10); }
.bai-ask .primary-btn { white-space: nowrap; border-radius: 999px; padding-left: 22px; padding-right: 22px; }
.bai-err { color: var(--danger, #c0362c); font-size: 13px; margin: 6px 0; }
.bai-thinking { color: var(--muted); font-size: 14px; margin: 6px 0; font-style: italic; }

/* Hero (centered) state — the Google-like landing before any search */
.bai-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 20px 0; }
.bai-hero-title { margin: 0; font-size: 26px; }
.bai-hero-sub { margin: 0 0 10px; color: var(--muted); font-size: 14px; max-width: 540px; }
.bai-hero .bai-ask { width: 100%; max-width: 560px; }
.bai-history-link { margin-top: 8px; border: none; background: none; cursor: pointer; color: var(--accent); font: inherit; font-size: 14px; font-weight: 600; }
.bai-history-link:hover { text-decoration: underline; }
/* Page mode: when "Ask me anything" is the whole Clean-view page, blend into the page and
   vertically center the hero so the search box sits in the middle like a search homepage. */
.client-brianai.bai-page { background: none; border: none; padding: 0; margin: 0; }
.client-brianai.bai-page .bai-hero { min-height: 60vh; justify-content: center; }

/* Expanded state — search box at the top, history list newest-first below */
.bai-bar { padding: 2px 0 10px; }
.bai-list { display: grid; gap: 0; }
.bai-item { border-top: 1px solid var(--border); padding: 16px 0; }
.bai-item:first-child { border-top: none; padding-top: 4px; }
.bai-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.bai-item-when { color: var(--muted); font-size: 11px; margin-top: 8px; }
.bai-remove { flex: none; border: none; background: none; cursor: pointer; color: var(--muted); font-size: 22px; line-height: 1; padding: 0 6px; border-radius: 8px; }
.bai-remove:hover { color: var(--danger, #c0362c); background: var(--bg, #f1f2f4); }

/* Question line + answer bubble (shared by history items and the "original answer" reveal) */
.bai-q { font-size: 15px; font-weight: 600; }
.bai-a { background: var(--accent-soft, #eef2ff); border-radius: 12px; padding: 10px 12px; font-size: 14px; line-height: 1.5; margin-top: 8px; white-space: pre-wrap; }
.bai-who { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin-right: 6px; }
.bai-who-ai { color: var(--accent); }
.bai-reviewed { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; color: #166b3a; background: #e3f7ec; padding: 2px 8px; border-radius: 999px; }
.bai-a-text { margin-top: 4px; }
.bai-a-text.bai-waiting { color: var(--muted); font-style: italic; }
.bai-orig { margin-top: 8px; font-size: 13px; }
.bai-orig > summary { cursor: pointer; color: var(--muted); }
.bai-a-orig { background: var(--bg, #f1f2f4); margin-top: 6px; }
.bai-a strong, .bai-row-a strong, .bai-row-corr strong { font-weight: 700; }
.bai-a code, .bai-row-a code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; font-size: .92em; }

/* Client messengers (fixed bottom-right): Brian AI + the coaching-team group chat sit side by side
   in a flex dock; the dock itself is click-through so its empty area doesn't block the page. */
.client-msg-dock { position: fixed; right: 20px; bottom: 20px; z-index: 900; display: flex; align-items: flex-end; justify-content: flex-end; flex-wrap: wrap; gap: 14px; max-width: calc(100vw - 32px); pointer-events: none; }
.client-msg-dock > * { pointer-events: auto; }
.client-messenger, .client-group-messenger { position: static; }
.msg-head-group, .msg-launcher-group { background: #1f6f54; } /* team chat = green, distinct from Brian AI accent */
/* Coaching-team faces: coach photos shown side by side in the group header + launcher pill. */
.gm-faces { display: inline-flex; align-items: center; gap: 4px; }
.gm-face { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center; background: rgba(255,255,255,.25); box-shadow: 0 0 0 2px rgba(255,255,255,.65); }
.gm-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gm-face-init { font-size: 11px; font-weight: 700; color: #fff; }
.gm-faces-pill .gm-face { width: 22px; height: 22px; box-shadow: 0 0 0 1.5px rgba(255,255,255,.7); }
.gm-faces-pill .gm-face-init { font-size: 9px; }
.msg-launcher { display: inline-flex; align-items: center; gap: 8px; border: none; cursor: pointer; background: var(--accent); color: #fff; padding: 11px 18px; border-radius: 999px; font: inherit; font-weight: 700; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.msg-launcher-ic { font-size: 16px; }
.msg-panel { width: 360px; max-width: calc(100vw - 32px); height: 72vh; max-height: 560px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 16px 16px 12px 12px; box-shadow: 0 16px 50px rgba(0,0,0,.28); overflow: hidden; }
.msg-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; background: var(--accent); color: #fff; cursor: pointer; }
.msg-head-actions { cursor: default; }
.msg-head-id { display: flex; align-items: center; gap: 8px; }
.msg-avatar { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; font-size: 16px; }
.msg-avatar.msg-avatar-img { background: none; overflow: hidden; }
.msg-avatar-img img { width: 100%; height: 100%; object-fit: cover; }
.msg-launcher { position: relative; }
.msg-launcher-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #e5484d; color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
/* ---- Client bug/improvement/idea reporter: bottom-left pill + modal ---- */
.client-feedback-dock { position: fixed; left: 20px; bottom: 20px; z-index: 900; max-width: calc(100vw - 32px); }
/* "Update available" nudge — a top-center pill; the user chooses when to refresh (never auto-reloads mid-video). */
.update-banner { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 3000; max-width: calc(100vw - 24px); }
.update-banner.hidden { display: none; }
.upd-inner { display: flex; align-items: center; gap: 12px; background: var(--accent, #2f5bea); color: #fff; padding: 8px 8px 8px 16px; border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.25); font-size: 14px; font-weight: 600; }
.upd-refresh { background: #fff; color: var(--accent, #2f5bea); border: none; border-radius: 999px; padding: 6px 16px; font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }
.upd-x { background: transparent; border: none; color: #fff; font-size: 20px; line-height: 1; cursor: pointer; padding: 0 6px; }
/* "What's new" client banner (in-flow, above the portal) + coach admin + the log modal */
.client-whatsnew { max-width: 672px; margin: 0 auto; padding: 0 16px; box-sizing: border-box; }
.client-whatsnew.hidden { display: none; }
.wn-inner { display: flex; align-items: center; gap: 12px; margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft, #eaf0ff); border: 1px solid var(--border); font-size: 14px; }
.wn-count { color: var(--muted); font-weight: 500; font-size: 13px; }
.wn-ic { flex: none; font-size: 16px; }
.wn-text { flex: 1; min-width: 0; color: var(--text, #1c2430); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wn-see { flex: none; border: none; background: var(--accent, #2f5bea); color: #fff; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.wn-x { flex: none; background: transparent; border: none; color: var(--muted); font-size: 19px; line-height: 1; cursor: pointer; padding: 0 4px; }
.wn-list { display: flex; flex-direction: column; gap: 14px; }
.wn-entry { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.wn-entry-title { font-size: 15px; font-weight: 650; }
.wn-entry-date { font-size: 12px; color: var(--muted); margin: 2px 0 6px; }
.wn-entry-body { font-size: 14px; line-height: 1.5; }
.adm-wn { display: flex; flex-direction: column; gap: 12px; max-width: 620px; }
.adm-wn-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.adm-wn-field .adm-input { width: 100%; box-sizing: border-box; }
.adm-wn-past { margin-top: 12px; }
.adm-wn-list { display: flex; flex-direction: column; gap: 8px; }
.adm-wn-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.adm-wn-main { min-width: 0; }
.adm-wn-title { font-size: 14px; font-weight: 650; }
.adm-wn-meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.adm-wn-del { color: #b91c1c; }
.issue-foot-actions { display: flex; align-items: center; gap: 8px; }
.issue-announce { color: var(--accent); }
.fb-launcher { position: relative; display: inline-flex; align-items: center; gap: 6px; border: none; cursor: pointer; background: var(--surface); color: var(--text, #1a1a1a); padding: 11px 18px; border-radius: 999px; font: inherit; font-weight: 700; box-shadow: 0 8px 24px rgba(0,0,0,.22); border: 1px solid var(--border); }
.fb-launcher:hover { border-color: var(--accent); color: var(--accent); }
.fb-launcher-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #e5484d; color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
.fb-overlay { position: fixed; inset: 0; z-index: 1200; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.fb-modal { width: 480px; max-width: 100%; max-height: 88vh; overflow-y: auto; background: var(--surface); border-radius: 16px; box-shadow: 0 24px 64px rgba(0,0,0,.3); padding: 20px; }
.fb-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.fb-head h2 { margin: 0; font-size: 19px; flex: 1; }
.fb-back, .fb-x { border: none; background: transparent; cursor: pointer; color: var(--muted); font-size: 22px; line-height: 1; padding: 2px 8px; border-radius: 8px; }
.fb-back { font-size: 20px; }
.fb-back:hover, .fb-x:hover { background: var(--bg, #f2f2f4); color: var(--text, #1a1a1a); }
.fb-intro { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.fb-types { display: flex; flex-direction: column; gap: 10px; }
.fb-type { display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; font: inherit; }
.fb-type:hover { border-color: var(--accent); background: var(--accent-soft); }
.fb-type-emoji { font-size: 26px; line-height: 1; }
.fb-type-main { display: flex; flex-direction: column; gap: 2px; }
.fb-type-label { font-size: 15px; font-weight: 700; }
.fb-type-desc { font-size: 13px; color: var(--muted); }
.fb-form { display: flex; flex-direction: column; gap: 16px; margin-bottom: 18px; }
.fb-q { display: flex; flex-direction: column; gap: 7px; }
.fb-q-label { font-size: 14px; font-weight: 650; line-height: 1.4; }
.fb-req { color: #dc2626; font-weight: 700; }
.fb-input { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 14px; background: var(--surface); color: inherit; }
.fb-textarea { resize: vertical; min-height: 64px; }
.fb-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-choice { border: 1px solid var(--border); background: var(--surface); cursor: pointer; padding: 8px 16px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; max-width: 100%; }
.fb-choice.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.fb-shots { display: flex; flex-wrap: wrap; gap: 10px; }
.fb-shot { position: relative; width: 68px; height: 68px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.fb-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fb-shot-x { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border: none; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 13px; line-height: 1; display: grid; place-items: center; }
.fb-shot-add { display: grid; place-items: center; width: 68px; height: 68px; border: 1px dashed var(--border); border-radius: 10px; cursor: pointer; color: var(--muted); font-size: 24px; }
.fb-shot-add:hover { border-color: var(--accent); color: var(--accent); }
.fb-uploading { font-size: 12px; color: var(--muted); }
.fb-actions { display: flex; justify-content: flex-end; gap: 10px; }
.fb-myreports-link { margin-top: 16px; width: 100%; border: none; background: transparent; cursor: pointer; color: var(--accent); font: inherit; font-size: 14px; font-weight: 650; padding: 8px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.fb-myreports-link:hover { background: var(--accent-soft); }
.fb-inline-badge { min-width: 18px; padding: 0 6px; border-radius: 999px; background: #e5484d; color: #fff; font-size: 11px; font-weight: 800; }
.fbr-list { display: flex; flex-direction: column; gap: 10px; }
.fbr-item { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.fbr-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.fbr-type { font-size: 13px; font-weight: 700; }
.fbr-sub { font-size: 12px; color: var(--muted); }
.fbr-note { margin-top: 10px; padding: 10px 12px; background: var(--accent-soft); border-radius: 10px; font-size: 13px; line-height: 1.5; }
.fbr-note-label { display: block; font-size: 11px; font-weight: 700; color: var(--accent); margin-bottom: 3px; text-transform: uppercase; letter-spacing: .03em; }
@media (max-width: 600px) { .client-feedback-dock { left: 12px; bottom: 12px; } .fb-launcher { padding: 10px 15px; } }
/* ---- Mobile speed-dial FAB: Brian AI + Your Team + Feedback behind one + button ---- */
.client-fab { display: none; }
.cfab-menu { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; margin-bottom: 12px; }
.cfab-menu:not(.open) { display: none; }
.cfab-item { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; background: var(--surface); color: var(--text); padding: 10px 15px; border: 1px solid var(--border); border-radius: 999px; font: inherit; font-weight: 700; box-shadow: 0 6px 20px rgba(0,0,0,.22); animation: cfabIn .16s ease both; }
.cfab-ic { font-size: 16px; }
.cfab-dot { width: 9px; height: 9px; border-radius: 50%; background: #e5484d; margin-left: 2px; }
.cfab-btn { width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer; background: var(--accent); color: #fff; box-shadow: 0 10px 26px rgba(0,0,0,.32); display: grid; place-items: center; position: relative; transition: transform .18s ease, background .18s ease; }
.cfab-btn.open { transform: rotate(45deg); background: #64748b; }
.cfab-plus { font-size: 32px; line-height: 1; font-weight: 300; }
.cfab-badge { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #e5484d; color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--accent); }
@keyframes cfabIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 600px) {
  /* Collapse the individual floating launchers; the + FAB is the single entry point. */
  .msg-launcher, .fb-launcher { display: none !important; }
  .client-fab { position: fixed; right: 16px; bottom: 16px; z-index: 950; display: flex; flex-direction: column; align-items: flex-end; }
}
/* ---- Coach Feedback board (issue triage) ---- */
.tab-feedback.has-alert, #tab-feedback.has-alert { color: var(--accent); font-weight: 700; }
.issue-board { display: flex; flex-direction: column; gap: 14px; }
.issue-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.issue-fchips { display: flex; flex-wrap: wrap; gap: 8px; }
.issue-fchip { border: 1px solid var(--border); background: var(--surface); cursor: pointer; padding: 7px 14px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 600; }
.issue-fchip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.issue-fchip-n { display: inline-block; min-width: 16px; padding: 0 5px; margin-left: 3px; border-radius: 9px; background: var(--border); color: var(--muted); font-size: 11px; text-align: center; }
.issue-fchip.on .issue-fchip-n { background: var(--accent); color: #fff; }
.issue-showclosed { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.issue-list { display: flex; flex-direction: column; gap: 10px; }
.issue-empty { padding: 40px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.issue-card { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.issue-card.open { border-color: var(--accent); }
.issue-card-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; }
.issue-card-head:hover { background: var(--bg, #f7f7f8); }
.issue-newdot { width: 8px; height: 8px; border-radius: 999px; background: var(--accent); flex: none; }
.issue-type { font-size: 12px; font-weight: 700; white-space: nowrap; padding: 2px 8px; border-radius: 999px; background: var(--bg, #f2f2f4); }
.issue-type-bug { background: #fde7e4; color: #7a271a; }
.issue-type-improvement { background: #e6f0ff; color: #1e3a8a; }
.issue-type-idea { background: #fff4d6; color: #7a5b00; }
.issue-card-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.issue-card-section { font-weight: 500; color: var(--muted); }
.issue-status { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.issue-tone-new { background: #eef1f4; color: #475569; }
.issue-tone-active { background: #e0edff; color: #1d4ed8; }
.issue-tone-done { background: #e3f7ec; color: #14532d; }
.issue-tone-declined { background: #f1f0f2; color: #6b7280; }
.issue-when { font-size: 12px; color: var(--muted); white-space: nowrap; }
.issue-chev { font-size: 10px; color: var(--muted); }
.issue-card-body { padding: 4px 16px 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.issue-qa { padding-top: 10px; }
.issue-qa-q { font-size: 12px; font-weight: 650; color: var(--muted); margin-bottom: 2px; }
.issue-qa-a { font-size: 14px; line-height: 1.5; }
.issue-shots { display: flex; flex-wrap: wrap; gap: 8px; }
.issue-shot { width: 90px; height: 90px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); display: block; }
.issue-shot img { width: 100%; height: 100%; object-fit: cover; }
.issue-controls { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; padding-top: 4px; border-top: 1px dashed var(--border); }
.issue-ctl { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 650; color: var(--muted); }
.issue-ctl select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 13px; background: var(--surface); color: inherit; }
.issue-ctl-note { flex: 1; min-width: 220px; }
.issue-ctl-note textarea { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 13px; resize: vertical; background: var(--surface); color: inherit; font-weight: 400; }
.issue-meta { font-size: 11px; color: var(--muted); }
/* Coach-internal triage (proposed approach + approved dev brief) — never shown to the client. */
.issue-internal { margin-top: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg, #f7f7f8); display: flex; flex-direction: column; gap: 10px; }
.issue-internal-head { font-size: 12px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.issue-internal-hint { font-weight: 500; font-size: 11px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); padding: 1px 7px; border-radius: 999px; }
.issue-proposal { width: 100%; box-sizing: border-box; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 13px; line-height: 1.5; resize: vertical; background: var(--surface); color: inherit; }
.issue-proposal-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.issue-brief { margin-top: 4px; border-top: 1px dashed var(--border); padding-top: 10px; }
.issue-brief-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 700; color: #14532d; margin-bottom: 6px; }
.issue-brief-body { margin: 0; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow-y: auto; color: var(--text, #1a1a1a); }
.issue-brief-note { margin: 8px 0 0; font-size: 11px; color: var(--muted); line-height: 1.5; }
.issue-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.issue-del { border: none; background: transparent; color: #b91c1c; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 6px; white-space: nowrap; }
.issue-del:hover { background: rgba(220,38,38,.1); }
/* Coach header Messages badge */
.inbox-badge { display: inline-grid; place-items: center; min-width: 17px; height: 17px; margin-left: 5px; padding: 0 5px; border-radius: 999px; background: #e5484d; color: #fff; font-size: 11px; font-weight: 800; vertical-align: middle; }
/* ── Messages inbox: iMessage-style two-pane modal ── */
.msg-inbox-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 70;
  width: min(1080px, 94vw); height: min(82vh, 760px); background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: 0 24px 70px rgba(0,0,0,.32); display: flex; flex-direction: column; overflow: hidden; }
.mim-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); flex: none; }
.mim-head h2 { margin: 0; font-size: 17px; }
.mim-head-actions { display: flex; align-items: center; gap: 8px; }
.mim-bell { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text, #1a1a1a); }
.mim-bell:hover { border-color: var(--accent); }
.mim-bell.denied { opacity: .65; }
.pulse { animation: ccd-bell-pulse 1.8s ease-in-out infinite; }
@keyframes ccd-bell-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,0); } 50% { box-shadow: 0 0 0 4px rgba(99,102,241,.22); } }
.mim-body { flex: 1; min-height: 0; display: flex; }
/* Left: conversation list */
.mim-list { width: 320px; min-width: 320px; border-right: 1px solid var(--border); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; background: var(--bg, #f8f9fb); }
.mim-list-empty { padding: 24px 16px; color: var(--muted); font-size: 13px; text-align: center; }
.mim-convo { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; border-bottom: 1px solid var(--border); }
.mim-convo:hover { background: var(--surface); }
.mim-convo.selected { background: var(--surface); box-shadow: inset 3px 0 0 var(--accent); }
.mim-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; overflow: hidden; }
.mim-avatar.has-photo { background: none; }
.mim-avatar img { width: 100%; height: 100%; object-fit: cover; }
/* Client-list photo column */
.tbl-photo-col { width: 78px; padding-right: 0 !important; }
.tbl-photo-wrap { display: inline-flex; align-items: center; gap: 6px; }
/* Quick "message this client" button before the avatar — subtle until hovered. */
.tbl-chat { flex: none; border: none; background: none; cursor: pointer; font-size: 16px; line-height: 1; padding: 4px; border-radius: 8px; opacity: .5; transition: opacity .12s, background .12s; }
.tbl-chat:hover { opacity: 1; background: var(--accent-soft, #eef2ff); }
.tbl-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; overflow: hidden; }
.tbl-avatar.has-photo { background: none; }
.tbl-avatar img { width: 100%; height: 100%; object-fit: cover; }
/* Gender-coded initials: male = blue (as coaches), female = pink, unspecified = grey. Photo avatars
   always show the image (no tint). */
.av-male { background: var(--accent) !important; }
.av-female { background: #d6749b !important; }
.av-none { background: #98a0aa !important; }
.has-photo.av-male, .has-photo.av-female, .has-photo.av-none { background: none !important; }
/* Current → desired role */
.role-arrow { color: var(--muted); }
/* Message attachments + composer attach button */
.msg-attach-btn { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 16px; color: var(--muted); }
.msg-attach-btn:hover { background: var(--bg, #eef0f3); color: var(--text, #1a1a1a); }
.msg-attach { display: block; margin-top: 6px; }
.msg-attach.img img { max-width: 200px; max-height: 200px; border-radius: 10px; display: block; }
.msg-attach.file { font-size: 13px; text-decoration: none; color: inherit; background: rgba(0,0,0,.06); padding: 6px 10px; border-radius: 10px; display: inline-block; }
.msg-row.out .msg-attach.file, .mim-row.out .msg-attach.file { background: rgba(255,255,255,.2); }
.gc-atts, .mim-atts { margin-top: 2px; }
.gc-atts .msg-attach.img img, .mim-atts .msg-attach.img img { max-width: 180px; }
/* Pending-attachment chips (shown in the composer until the user hits Send — one per file) */
.attach-tray:empty { display: none; }
.attach-tray { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 12px 0; }
.attach-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--bg, #eef0f3); border: 1px solid var(--border); border-radius: 999px; padding: 4px 6px 4px 10px; font-size: 12px; max-width: 100%; }
.attach-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.attach-chip-x { border: none; background: none; cursor: pointer; font-size: 15px; line-height: 1; color: var(--muted); padding: 0 2px; }
.attach-chip-x:hover { color: var(--text, #1a1a1a); }

/* Impediment textareas (client check-in capture + coach detail pane) — match the app's input style */
.imp-row textarea, .di-add textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px;
  font: inherit; color: var(--text); background: var(--surface); resize: vertical; box-sizing: border-box;
}
.imp-row textarea:focus, .di-add textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }

/* Coach-side Brian AI Q&A row actions (mark reviewed + delete from coach/client/both) */
.bai-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); }
.bai-del-group { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.bai-del-label { font-size: 12px; color: var(--muted); }
.bai-reviewed-tag { color: var(--green); font-weight: 600; }
.bai-reviewed-row > summary { opacity: 0.72; }
.bai-review-btn { font-weight: 600; }
/* Drag-over highlight on a drop target */
.drag-over { outline: 2px dashed var(--accent); outline-offset: -4px; background: var(--accent-soft, #eef2ff) !important; }
/* "deleted by client" flag in the coach thread */
.mim-row.deleted .mim-bubble { opacity: .55; }
.msg-deleted { color: #c0362c; font-style: italic; }
/* Team Directory: photo preview */
.adm-team-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); flex: none; align-self: flex-start; }
.adm-team-avatar.hidden { display: none; }
/* Dock window: name + role stacked */
.dock-win-id { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dock-win-id .dock-win-name { flex: none; }
.dock-win-role { font-size: 11px; font-weight: 400; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* ── LinkedIn-style docked chat (coach, bottom-right) ── */
.coach-dock { position: fixed; right: 16px; bottom: 0; z-index: 880; display: flex; align-items: flex-end; gap: 12px; pointer-events: none; }
.coach-dock > * { pointer-events: auto; }
.dock-panel, .dock-win { background: var(--surface); border: 1px solid var(--border); border-bottom: none; border-radius: 12px 12px 0 0; box-shadow: 0 -2px 18px rgba(0,0,0,.14); display: flex; flex-direction: column; }
.dock-panel.collapsed, .dock-panel.open { width: 280px; }
.dock-panel-bar, .dock-win-head { display: flex; align-items: center; gap: 9px; padding: 10px 12px; cursor: pointer; background: var(--surface); border: none; border-radius: 12px 12px 0 0; width: 100%; font: inherit; text-align: left; }
.dock-panel-bar { font-weight: 700; font-size: 14px; }
.dock-bar-title { flex: 1; }
.dock-caret { color: var(--muted); font-size: 11px; }
.dock-panel-list { max-height: 50vh; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; border-top: 1px solid var(--border); }
.dock-convo { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--border); }
.dock-convo:hover { background: var(--bg, #f6f7f9); }
.dock-convo.unread .dock-convo-name { font-weight: 700; }
.dock-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; overflow: hidden; }
.dock-avatar.has-photo { background: none; }
.dock-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dock-convo-info { flex: 1; min-width: 0; }
.dock-convo-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-convo-preview { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-empty { padding: 18px 12px; text-align: center; color: var(--muted); font-size: 13px; }
/* Chat windows: maximized wider, minimized narrower (header only) */
.dock-win { width: 320px; }
.dock-win.min { width: 220px; }
.dock-win-head { border-bottom: 1px solid var(--border); }
.dock-win.min .dock-win-head { border-bottom: none; }
.dock-win-name { flex: 1; font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-win-btn { border: none; background: none; cursor: pointer; color: var(--muted); font-size: 13px; padding: 2px 5px; border-radius: 6px; flex: none; }
.dock-win-btn:hover { background: var(--bg, #f1f2f4); color: var(--text, #1a1a1a); }
/* Minimize/expand a dock conversation as a circular +/− (minus when open, plus when minimized) —
   matches the card toggle + the client message minus, instead of a tiny ▾/▴ arrow. */
.dock-min-toggle { position: relative; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); border: none; cursor: pointer; flex: none; padding: 0; }
.dock-min-toggle:hover { background: var(--accent); color: #fff; }
.dock-min-toggle::before, .dock-min-toggle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 11px; height: 2.5px; border-radius: 2px; background: currentColor; transform: translate(-50%, -50%); transition: opacity .15s ease; }
.dock-min-toggle::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; } /* vertical bar hidden → minus */
.dock-min-toggle.is-min::after { opacity: 1; } /* minimized → show vertical bar → plus (click to expand) */
.dock-thread { height: 340px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 12px; display: flex; flex-direction: column; background: var(--bg, #f8f9fb); }
.dock-composer { display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--border); }
.dock-input { flex: 1; min-height: 36px; max-height: 110px; border: 1px solid var(--border); border-radius: 12px; padding: 8px 11px; font: inherit; font-size: 13px; resize: none; outline: none; line-height: 1.4; }
.dock-input:focus { border-color: var(--accent); }
.dock-send { height: 36px; width: 36px; flex: none; border: none; border-radius: 50%; background: var(--accent); color: #fff; cursor: pointer; font-size: 14px; }
.dock-readonly { padding: 10px 12px; color: var(--muted); font-size: 12px; text-align: center; border-top: 1px solid var(--border); }
@media (max-width: 720px) { .coach-dock { display: none; } }
/* Add-client modal: profile photo field */
.nc-photo-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.nc-photo-row { display: flex; align-items: center; gap: 12px; }
.nc-photo-preview { width: 56px; height: 56px; border-radius: 50%; flex: none; border: 1px solid var(--border); background: var(--bg, #f1f2f4); display: grid; place-items: center; overflow: hidden; cursor: pointer; padding: 0; transition: border-color .12s, box-shadow .12s; }
.nc-photo-preview:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.nc-photo-preview.has-photo { border-style: solid; }
.nc-photo-preview:not(.has-photo) { border-style: dashed; }
.nc-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.nc-photo-empty { font-size: 22px; opacity: 0.5; }
/* Hover (or tap) the photo circle → menu with Change / Remove. align-self keeps the wrap sized to
   the circle (not stretched by the flex column) so the menu's left:100% lands beside it, not clipped. */
.nc-photo-menu-wrap { position: relative; display: inline-block; align-self: flex-start; }
.nc-photo-menu { position: absolute; top: 0; left: calc(100% + 8px); z-index: 5; min-width: 168px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(16,24,40,.14); padding: 6px; display: none; }
/* Transparent bridge over the 8px gap to the left, so the hover region stays continuous between the
   photo circle and the menu (otherwise the menu vanishes as the cursor crosses the gap). */
.nc-photo-menu::before { content: ""; position: absolute; top: 0; bottom: 0; left: -8px; width: 8px; }
.nc-photo-menu-wrap:hover .nc-photo-menu,
.nc-photo-menu-wrap:focus-within .nc-photo-menu,
.nc-photo-menu-wrap.open .nc-photo-menu { display: block; }
.nc-photo-menu-item { display: block; width: 100%; text-align: left; border: none; background: none; padding: 8px 10px; border-radius: 7px; cursor: pointer; font: inherit; color: var(--text); }
.nc-photo-menu-item:hover { background: var(--bg, #f1f2f4); }
.nc-photo-menu-item.danger { color: var(--red); }
.nc-photo-menu-item.hidden { display: none; }
.nc-photo-upload { flex: none; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 13px; font-weight: 600; cursor: pointer; background: var(--surface); }
.nc-photo-upload:hover { border-color: var(--accent); }
/* Client top-nav avatar + sign-out menu */
.client-avatar-wrap { position: relative; }
.client-avatar-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; display: grid; place-items: center; overflow: hidden; padding: 0; }
.client-avatar-btn.has-photo { background: none; }
.client-avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.client-avatar-menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 160px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: 6px; display: none; z-index: 50; }
/* Transparent bridge over the 8px gap between the avatar and its menu, so moving the cursor down
   into the menu never leaves the wrap's :hover region (otherwise the menu vanishes mid-reach). */
.client-avatar-menu::before { content: ""; position: absolute; top: -8px; left: 0; right: 0; height: 8px; }
.client-avatar-wrap.open .client-avatar-menu { display: block; }
/* Hover-to-open only on devices that truly hover; on touch a tap leaves a sticky :hover that would keep
   the menu open and defeat the tap-to-close toggle, so gate it behind hover-capable pointers. */
@media (hover: hover) and (pointer: fine) {
  .client-avatar-wrap:hover .client-avatar-menu { display: block; }
}
.cam-name { padding: 8px 10px 6px; font-size: 13px; font-weight: 700; color: var(--text, #1a1a1a); border-bottom: 1px solid var(--border); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cam-item { display: block; width: 100%; text-align: left; border: none; background: none; cursor: pointer; padding: 8px 10px; border-radius: 8px; font: inherit; font-size: 14px; color: var(--text, #1a1a1a); }
.cam-item:hover { background: var(--bg, #f6f7f9); }
.cam-item.hidden { display: none; }
.cam-email { padding: 8px 10px 4px; margin-top: 4px; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted); word-break: break-all; }
/* Legal links tucked into the account menu (Privacy / Terms / Accessibility) — replaces the always-on
   footer so they're reachable but out of the way. */
.cam-legal { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 8px 12px 4px; margin-top: 4px; border-top: 1px solid var(--border); }
.cam-legal a { font-size: 11px; color: var(--muted); text-decoration: none; }
.cam-legal a:hover { color: var(--text); text-decoration: underline; }
/* Client detail pane: photo top-left */
.dh-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.dh-photo { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--border); }
/* Cost pill + breakdown popover (what this client is costing us), in the detail header */
.dh-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cost-wrap { position: relative; display: inline-block; }
.cost-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text); background: var(--green-soft); border: 1px solid var(--green); border-radius: 999px; padding: 3px 10px; cursor: pointer; line-height: 1.4; white-space: nowrap; }
.cost-pill:hover { filter: brightness(0.98); }
.cost-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; width: 300px; max-width: 80vw; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 28px rgba(16,24,40,.16); padding: 12px 14px; }
.cost-pop.hidden { display: none; }
.cost-pop-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; font-size: 13px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.cost-pop-total { color: var(--green); }
.cost-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 6px 0; }
.cost-row-label { font-weight: 600; font-size: 13px; }
.cost-row-amt { font-weight: 600; font-size: 13px; text-align: right; white-space: nowrap; }
.cost-suffix { color: var(--muted); font-weight: 400; font-size: 11px; margin-left: 1px; }
.cost-row-detail { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.cost-foot { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; line-height: 1.4; }
/* Admin → Team: coach photo URL spans the row */
.adm-team-photo-f { grid-column: 1 / -1; }
.mim-convo-info { flex: 1; min-width: 0; }
.mim-convo-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mim-convo-preview { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.mim-convo-meta { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.mim-convo-time { font-size: 11px; color: var(--muted); }
.mim-unread { background: #e5484d; color: #fff; font-size: 10px; font-weight: 800; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 5px; }
/* Right: thread */
.mim-thread { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mim-thread-empty, .mim-thread-empty-ic { display: flex; }
.mim-thread-empty { flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); }
.mim-thread-empty-ic { font-size: 34px; opacity: .5; }
.mim-thread-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); flex: none; }
.mim-back { display: none; border: none; background: none; font-size: 24px; line-height: 1; cursor: pointer; color: var(--accent); padding: 0 6px 0 0; }
.mim-thread-id { min-width: 0; }
.mim-thread-name { font-size: 15px; font-weight: 700; }
.mim-thread-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.mim-thread-sub a { color: var(--accent); }
.mim-thread-id { min-width: 0; flex: 1; }
.mim-thread-actions { flex: none; display: flex; align-items: center; gap: 4px; }
.mim-th-act { border: none; background: none; cursor: pointer; font-size: 16px; line-height: 1; padding: 6px; border-radius: 8px; color: var(--muted); }
.mim-th-act:hover { background: var(--hover, rgba(127,127,127,.14)); }
.mim-th-act.danger:hover { background: rgba(220, 38, 38, .14); }
/* Archived section divider in the conversation list */
.mim-arch-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; border: none; background: none; cursor: pointer; padding: 10px 16px; font-size: 12px; font-weight: 600; color: var(--muted); border-top: 1px solid var(--border); }
.mim-arch-toggle:hover { background: var(--hover, rgba(127,127,127,.08)); }
.mim-arch-caret { font-size: 10px; }
.mim-convo.archived { opacity: .6; }
.mim-convo.archived:hover { opacity: .85; }
.mim-messages { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 16px; display: flex; flex-direction: column; }
.mim-day { text-align: center; margin: 8px 0; }
.mim-day span { font-size: 11px; font-weight: 600; color: var(--muted); background: var(--bg, #eef0f3); padding: 3px 11px; border-radius: 8px; }
.mim-row { display: flex; margin-bottom: 4px; }
.mim-row.in { justify-content: flex-start; }
.mim-row.out { justify-content: flex-end; }
/* Column so the bubble + time size to their own content (a short "Yes" stays small) instead of
   stretching to the width of the timestamp line beneath them. */
.mim-row > div { max-width: 78%; display: flex; flex-direction: column; }
.mim-row.in > div { align-items: flex-start; }
.mim-row.out > div { align-items: flex-end; }
.mim-bubble { padding: 9px 13px; border-radius: 16px; font-size: 14px; line-height: 1.45; word-break: break-word; white-space: pre-wrap; max-width: 100%; }
/* Incoming (client) bubble keeps a fixed light background, so its text must stay dark in every theme
   — otherwise dark mode's light --text renders invisible on the light bubble. */
.mim-row.in .mim-bubble { background: #e9eaee; color: #1a1a1a; border-bottom-left-radius: 4px; }
.mim-row.in .mim-bubble a { color: var(--accent); }
.mim-row.out .mim-bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
/* Inline correction of a Brian AI answer — edited right inside its own bubble. */
.mim-ai-edit { margin-top: 4px; display: flex; align-items: center; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.mim-corr-btn { font-size: 12px; font-weight: 600; color: var(--accent); }
.mim-corr-status { font-size: 12px; color: var(--muted); }
.mim-row.out .mim-bubble.mim-bubble-editing { background: var(--surface); color: var(--text); outline: 2px solid var(--accent); cursor: text; text-align: left; }
.mim-bubble.mim-bubble-editing a { pointer-events: none; }
.mim-time { font-size: 10px; color: var(--muted); margin-top: 2px; padding: 0 4px; }
.mim-row.out .mim-time { text-align: right; }
.mim-empty-thread { color: var(--muted); font-size: 13px; text-align: center; margin: auto; }
.mim-input-area { display: flex; align-items: flex-end; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); flex: none; }
.mim-input { flex: 1; min-height: 40px; max-height: 120px; border: 1px solid var(--border); border-radius: 14px; padding: 9px 13px; font: inherit; font-size: 14px; resize: none; outline: none; line-height: 1.4; }
.mim-input:focus { border-color: var(--accent); }
.mim-send { height: 40px; width: 40px; flex: none; border: none; border-radius: 50%; background: var(--accent); color: #fff; cursor: pointer; font-size: 15px; }
.mim-send:disabled { opacity: .5; cursor: default; }
.mim-readonly { color: var(--muted); font-size: 13px; justify-content: center; }
/* Phase 1 conversation embedded in the client detail pane */
.detail-msg-block { margin-bottom: 18px; }
.detail-msg-h { margin: 0 0 8px; font-size: 14px; }
.detail-msg-thread { max-height: 340px; overflow-y: auto; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg, #f6f7f9); display: flex; flex-direction: column; }
.detail-msg-empty { margin: 0 0 10px; font-size: 13px; }
.detail-msg-reply { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.detail-msg-reply textarea { flex: 1; resize: vertical; min-height: 42px; }
.detail-msg-reply .primary-btn { flex: none; }
@media (max-width: 720px) {
  .msg-inbox-modal { width: 100vw; height: 100vh; border-radius: 0; }
  .mim-list { width: 100%; min-width: 0; }
  .mim-thread { display: none; }
  .mim-body.thread-open .mim-list { display: none; }
  .mim-body.thread-open .mim-thread { display: flex; }
  .mim-back { display: block; }
}
/* Admin → Team: Phase 1 messenger identity */
.adm-p1-block { margin-bottom: 18px; }
.adm-p1-grid { display: flex; gap: 16px; align-items: flex-start; }
.adm-p1-photo { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); flex: none; background: var(--bg, #f1f2f4); }
.adm-p1-fields { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.adm-p1-photo-f { grid-column: 1 / -1; }
.adm-p1-roles { display: flex; gap: 14px; align-items: center; }
.msg-title { font-weight: 800; font-size: 14px; line-height: 1.1; }
.msg-sub { font-size: 11px; opacity: .85; }
.msg-head-actions { display: flex; gap: 2px; }
.msg-iconbtn { border: none; background: none; cursor: pointer; color: #fff; font-size: 15px; padding: 4px 7px; border-radius: 8px; }
.msg-iconbtn:hover { background: rgba(255,255,255,.18); }
/* Minimize control: a circular white minus (echoes the +/− card toggle), bigger & clearer than the
   old tiny ▾ arrow. Drawn as a single bar so it reads unambiguously as "minimize", not "close". */
.msg-iconbtn.msg-min { position: relative; width: 28px; height: 28px; padding: 0; border-radius: 50%; background: rgba(255,255,255,.16); }
.msg-iconbtn.msg-min:hover { background: rgba(255,255,255,.3); }
.msg-iconbtn.msg-min::before { content: ""; position: absolute; top: 50%; left: 50%; width: 13px; height: 2.6px; border-radius: 2px; background: #fff; transform: translate(-50%, -50%); }
.msg-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 12px; background: var(--bg, #f6f7f9); display: flex; flex-direction: column; gap: 4px; }
.msg-empty { margin: auto; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.6; padding: 0 12px; }
.msg-day { text-align: center; margin: 8px 0 4px; }
.msg-day span { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--surface); border: 1px solid var(--border); padding: 2px 10px; border-radius: 999px; }
.msg-row { display: flex; flex-direction: column; max-width: 86%; }
.msg-row.me { align-self: flex-end; align-items: flex-end; }
.msg-row.ai { align-self: flex-start; align-items: flex-start; }
.msg-meta { font-size: 10px; color: var(--muted); margin: 3px 4px 1px; display: flex; align-items: center; gap: 5px; }
.msg-meta b { color: var(--text, #1a1a1a); font-weight: 700; }
.msg-bubble { font-size: 13.5px; line-height: 1.5; padding: 8px 11px; border-radius: 14px; white-space: pre-wrap; word-break: break-word; }
.msg-row.me .msg-bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.msg-row.ai .msg-bubble { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg-reviewed { color: #166b3a; font-weight: 700; }
/* "Your coach updated an earlier answer" notice at the bottom of the client chat → jumps to it */
.msg-corr-note { display: flex; align-items: flex-start; gap: 8px; width: 100%; text-align: left; margin: 4px 0; padding: 9px 11px; border: 1px solid var(--amber); background: var(--amber-soft); border-radius: 12px; cursor: pointer; font: inherit; color: var(--text); transition: opacity .25s, background .12s; }
.msg-corr-note:hover { background: #fbe7cd; }
.msg-corr-ic { flex: none; }
.msg-corr-text { font-size: 12.5px; line-height: 1.4; }
.msg-corr-done { opacity: 0; }
/* Flash the corrected message when the client jumps to it */
.msg-row.msg-flash .msg-bubble { animation: msgFlash 2.2s ease; }
@keyframes msgFlash { 0%, 70% { box-shadow: 0 0 0 3px var(--amber-soft), 0 0 0 1px var(--amber); } 100% { box-shadow: none; } }
.msg-del { border: none; background: none; cursor: pointer; color: var(--muted); font-size: 14px; line-height: 1; opacity: 0; padding: 0 2px; }
.msg-row.me:hover .msg-del { opacity: .6; }
.msg-del:hover { opacity: 1 !important; color: var(--danger, #c0362c); }
.msg-typing { display: inline-flex; gap: 4px; align-items: center; }
.msg-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: msg-blink 1.2s infinite; }
.msg-typing span:nth-child(2) { animation-delay: .2s; }
.msg-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes msg-blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
.msg-err { color: var(--danger, #c0362c); font-size: 12px; padding: 6px 12px; background: #fbeaea; }
.msg-foot { display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--border); background: var(--surface); }
.msg-input { flex: 1; resize: none; max-height: 96px; border: 1px solid var(--border); border-radius: 18px; padding: 7px 13px; font: inherit; font-size: 13.5px; line-height: 1.35; }
.msg-input:focus { outline: none; border-color: var(--accent); }
.msg-send { flex: none; border: none; cursor: pointer; background: var(--accent); color: #fff; width: 38px; height: 38px; border-radius: 50%; font-size: 15px; }
.msg-send:disabled { opacity: .5; cursor: default; }
@media (max-width: 560px) {
  .client-messenger { right: 12px; bottom: 12px; left: 12px; text-align: right; }
  .msg-panel { width: auto; height: 70vh; }
}

/* Brian AI log (coach detail) */
.detail-brianai { padding: 20px 24px; border-top: 1px solid var(--border); }
.detail-brianai h3 { margin: 0 0 6px; }
.bai-row { border: 1px solid var(--border); border-radius: 10px; padding: 4px 12px; margin-bottom: 8px; }
.bai-row > summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; cursor: pointer; list-style: none; }
.bai-row > summary::-webkit-details-marker { display: none; }
.bai-row-q { font-weight: 600; font-size: 14px; }
.bai-row-meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.bai-corrected { color: #1a8a4a; font-weight: 600; }
.bai-removed { color: var(--muted); font-style: italic; }
.bai-gated { color: #b26b00; font-weight: 600; }
.bai-row-body { padding: 4px 0 12px; display: grid; gap: 8px; }
.bai-row-a, .bai-row-corr { font-size: 13px; line-height: 1.5; padding: 8px 10px; border-radius: 8px; background: var(--bg, #f4f5f7); white-space: pre-wrap; }
.bai-row-corr { background: #e3f7ec; }
.bai-correct-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.bai-correct { width: 100%; resize: vertical; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 13px; }
.bai-save { align-self: start; }
.bai-orig { margin-top: 2px; }
.bai-orig > summary { font-size: 12px; color: var(--muted); cursor: pointer; }
.bai-orig .bai-row-a { margin-top: 6px; }

/* "My calendar" (Google Calendar) card */
.gcal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gcal-head h2 { margin: 0; font-size: 18px; }
.gcal-actions { display: flex; gap: 10px; }
.gcal-connect { margin: 12px 0 8px; }
.gcal-fine { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.gcal-err { color: var(--danger, #c0362c); font-size: 13px; margin: 8px 0; }
.gcal-empty { color: var(--muted); font-size: 14px; font-style: italic; margin: 12px 0 0; }
.gcal-addbtn {
  margin: 12px 0 4px; border: 1px dashed var(--border); background: var(--surface); cursor: pointer;
  padding: 8px 14px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600; color: var(--accent);
}
.gcal-addbtn:hover { border-color: var(--accent); }
.gcal-add { margin: 12px 0; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg, #f8f9fb); }
.gcal-add-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gcal-add-grid .gcal-f-title, .gcal-add-grid .gcal-f-loc { grid-column: 1 / -1; }
.gcal-add-grid input, .gcal-add-grid select { width: 100%; }
.gcal-add-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.gcal-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 2px; }
.gcal-ev { display: flex; gap: 12px; padding: 10px 4px; border-top: 1px solid var(--border); }
.gcal-ev:first-child { border-top: none; }
.gcal-ev-when { flex: 0 0 128px; display: flex; flex-direction: column; }
.gcal-ev-day { font-weight: 600; font-size: 13px; }
.gcal-ev-time { color: var(--muted); font-size: 12px; }
.gcal-ev-main { display: flex; flex-direction: column; min-width: 0; }
.gcal-ev-title { font-weight: 600; }
.gcal-ev-loc { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }

/* ---- Practice Exam: setup card ---- */
.client-exam h2 { margin: 0 0 4px; font-size: 18px; }
.ex-subs { display: grid; gap: 10px; margin: 12px 0; }
.ex-fw-group { display: grid; gap: 4px; }
.ex-fw-name { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.ex-sub { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.ex-sub.on { border-color: var(--accent); background: var(--accent-soft, #eef2ff); }
.ex-sub-empty { opacity: .6; cursor: default; }
.ex-sub-empty .ex-sub-count { font-style: italic; }
.ex-none { margin: 12px 0 0; }
.ex-sub-name { flex: 1; font-weight: 600; }
.ex-sub-count { color: var(--muted); font-size: 12px; }
.ex-opts { display: grid; gap: 10px; margin: 12px 0; }
.ex-opt-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ex-opt-row > span:first-child { font-weight: 600; }
.ex-opt-row input[type=number] { width: 72px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; font: inherit; }
.ex-avail { color: var(--muted); font-size: 13px; }
.ex-toggle { cursor: pointer; }
.ex-toggle small { color: var(--muted); font-weight: 400; }
.ex-start { margin-top: 4px; }

/* ---- Practice Exam: full-screen runner overlay ---- */
.exam-overlay { position: fixed; inset: 0; z-index: 1100; background: rgba(15,23,42,.75); backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; padding: 24px 16px; overflow-y: auto; scrollbar-gutter: stable both-edges; }
.exam-panel { background: var(--surface); border-radius: 18px; width: 100%; max-width: 640px; padding: 22px; box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.exam-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.exam-prog { font-weight: 700; }
.exam-tally { display: inline-flex; gap: 10px; font-weight: 700; }
.exam-tally .t-correct { color: #1a8a4a; }
.exam-tally .t-wrong { color: #c0362c; }
.exam-score { font-weight: 700; color: var(--accent); }
.exam-clock { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--bg, #eef); }
.exam-clock.low { background: #fde2e0; color: #c0362c; }
.exam-quit { margin-left: auto; border: none; background: transparent; font-size: 20px; line-height: 1; cursor: pointer; color: var(--muted); }
.exam-clock + .exam-quit { margin-left: 8px; }
/* autosave indicator in the focused-quiz bar */
.exam-save-status { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: opacity .15s; }
.exam-save-status.saved { color: #1a8a4a; }
.exam-save-status + .exam-quit { margin-left: 8px; }
.exam-pqbar { position: relative; height: 26px; margin: 14px 0 6px; background: var(--bg, #eef); border-radius: 999px; overflow: hidden; }
.exam-pq-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #34c77b, #f5c542); transition: width 1s linear; }
.exam-pq-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.exam-q { margin-top: 14px; }
.exam-sub { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.exam-prompt { margin: 4px 0 6px; font-size: 19px; line-height: 1.4; }
.exam-multi-note { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.exam-opts { display: grid; gap: 10px; }
.exam-opt { display: flex; align-items: flex-start; gap: 10px; text-align: left; width: 100%; padding: 14px 16px; border: 2px solid var(--border); border-radius: 12px; background: var(--surface); font: inherit; font-size: 15px; line-height: 1.4; cursor: pointer; transition: border-color .12s, background .12s; }
.exam-opt:hover:not(:disabled) { border-color: var(--accent); }
.exam-opt:disabled { cursor: default; }
.exam-opt .exam-check { flex: none; width: 20px; height: 20px; border: 2px solid var(--border); border-radius: 6px; }
.exam-opt.sel { border-color: var(--accent); background: var(--accent-soft, #eef2ff); }
.exam-opt.sel .exam-check { background: var(--accent); border-color: var(--accent); }
/* Answered states use fixed LIGHT backgrounds, so pin a dark text colour too — otherwise dark mode's
   light var(--text) sits on a light green/pink and becomes unreadable. */
.exam-opt.right { border-color: #1a8a4a; background: #e3f7ec; color: #14532d; animation: exam-flash-g .4s ease; }
.exam-opt.wrong { border-color: #c0362c; background: #fde7e4; color: #7a271a; animation: exam-flash-r .4s ease; }
.exam-opt.right .exam-opt-text, .exam-opt.wrong .exam-opt-text { color: inherit; }
.exam-opt.dim { opacity: .55; }
@keyframes exam-flash-g { 0% { background: #b6efce; } 100% { background: #e3f7ec; } }
@keyframes exam-flash-r { 0% { background: #f8c4bd; } 100% { background: #fde7e4; } }
.exam-feedback { margin-top: 12px; font-weight: 700; font-size: 15px; }
.exam-feedback.ok { color: #1a8a4a; }
.exam-feedback.no { color: #c0362c; }
.exam-foot { margin-top: 16px; display: flex; justify-content: flex-end; }
.exam-hint { color: var(--muted); font-size: 13px; margin: 0; }
/* Answered-state answer labels (never A/B/C — always words): "Correct answer" / "Your answer" / "You
   missed this". The option text flexes so the mark + label sit at the right edge. */
/* min-width:0 lets this flex item shrink so long answers WRAP instead of overflowing; overflow-wrap
   breaks any very long unbroken token (e.g. a URL) so nothing is clipped. */
.exam-opt-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
/* Keep the check box + result ✓/✗ aligned with the first line of a multi-line answer. */
.exam-opt .exam-check { margin-top: 1px; }
.exam-opt .exam-mark { margin-top: 1px; }
.exam-lbl { flex: none; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.exam-lbl.right { color: #1a8a4a; background: rgba(26,138,74,.14); }
.exam-lbl.wrong { color: #c0362c; background: rgba(192,54,44,.14); }
.exam-lbl.miss { color: #8a5a00; background: rgba(217,119,6,.16); }
.exam-opt.right.miss { border-style: dashed; }
/* Teaching card shown on a wrong answer (only when the coach approved teaching for the question). */
.exam-teach { margin-top: 14px; padding: 13px 15px; border-radius: 12px; background: var(--accent-soft, #eef2ff); border: 1px solid var(--border); }
.exam-teach-h { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); margin-bottom: 5px; }
.exam-teach-body { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text); }
/* Keep the Continue button reachable on mobile when a longer teaching card pushes the panel tall. */
.exam-panel.has-teaching .exam-foot { position: sticky; bottom: 0; background: var(--surface); padding: 12px 0 4px; margin-top: 8px; }
/* "Something wrong with this question?" report control (secondary to teaching; on wrong answers + review). */
.exam-report { margin-top: 12px; }
.exam-report-link { border: none; background: none; padding: 4px 0; cursor: pointer; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.exam-report-link:hover { color: var(--accent); }
.exam-report.done { font-size: 13px; color: var(--muted); padding: 8px 0; }
.exam-report.open { padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg, #f6f7f9); }
.qr-head { font-size: 13px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.qr-reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.qr-reason { border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; padding: 5px 10px; border-radius: 999px; cursor: pointer; }
.qr-reason:hover { border-color: var(--accent); }
.qr-reason.sel { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.qr-note { width: 100%; margin-top: 8px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 13.5px; line-height: 1.4; resize: vertical; background: var(--surface); color: var(--text); }
.qr-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; align-items: center; }
/* Client "My reports": the flagged-questions section. */
.fbr-section-h { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin: 16px 0 8px; }
.fbr-q { font-size: 13.5px; color: var(--text); margin: 4px 0; line-height: 1.4; }
.exam-advancing { font-weight: 600; opacity: .75; animation: exam-adv-pulse 1s ease-in-out infinite; }
@keyframes exam-adv-pulse { 0%, 100% { opacity: .45; } 50% { opacity: .9; } }
/* ✓/✗ on an answered option so the right answer is unmistakable, not colour alone */
.exam-mark { margin-left: auto; flex: none; font-weight: 800; font-size: 16px; }
.exam-mark.right { color: #1a8a4a; }
.exam-mark.wrong { color: #c0362c; }
/* "every answer must be correct" legend + restart link at the foot of the quiz */
.exam-legend { margin: 14px 0 0; font-size: 12px; color: var(--muted); text-align: center; text-wrap: balance; }
.exam-retry-note { margin: 0 0 12px; font-size: 13px; color: #1a8a4a; font-weight: 600; }
:root[data-theme="dark"] .exam-retry-note { color: #34d399; }
/* Restart reads as a (mildly destructive) link — red + underlined, like the cancel-meeting link */
.exam-restart-link { background: none; border: none; padding: 0; font: inherit; font-weight: 600; color: var(--red, #c0362c); text-decoration: underline; cursor: pointer; }
.exam-restart-link:hover { opacity: .82; }
/* quit dialog (Restart / Save & close / Keep going) */
.exam-quitconfirm { text-align: center; }
.exam-qc-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 14px; }
.exam-qc-actions .primary-btn { min-width: 200px; }
.exam-summary { text-align: center; }
.exam-result-pct { font-size: 56px; font-weight: 800; color: var(--accent); line-height: 1.1; margin: 8px 0; }
.exam-result-line { color: var(--muted); margin: 0 0 10px; }
.exam-tally.big { justify-content: center; font-size: 20px; margin-bottom: 16px; }
.exam-saved-note { color: var(--muted); font-size: 12px; margin: 0 0 12px; }
.exam-summary-actions { display: flex; align-items: center; justify-content: center; gap: 16px; }
.exam-summary-actions.stacked { flex-direction: column; gap: 10px; }
.exam-summary-links { display: flex; align-items: center; justify-content: center; gap: 10px; }
.exam-link-sep { color: var(--muted); }
.exam-opt-in { animation: exam-reveal .28s ease; }
@keyframes exam-reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
body.exam-open { overflow: hidden; }

/* End-of-exam review */
.exam-review .exrev-list { display: grid; gap: 14px; margin: 14px 0; }
.exrev-q { border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.exrev-q.ok { border-left-color: #1a8a4a; }
.exrev-q.no { border-left-color: #c0362c; }
.exrev-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.exrev-n { font-weight: 700; }
.exrev-badge { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.exrev-badge.ok { background: #e3f7ec; color: #1a8a4a; }
.exrev-badge.no { background: #fde7e4; color: #c0362c; }
.exrev-prompt { font-weight: 600; margin: 2px 0 8px; }
.exrev-opts { display: grid; gap: 5px; }
.exrev-opt { padding: 7px 10px; border-radius: 8px; background: var(--bg, #f4f5f7); font-size: 14px; overflow-wrap: anywhere; }
.exrev-opt.right { background: #e3f7ec; color: #166b3a; }
.exrev-opt.wrong { background: #fde7e4; color: #97271e; }

/* Coach detail: practice-exam performance */
.detail-exams { padding: 20px 24px; border-top: 1px solid var(--border); }
.detail-exams h3 { margin: 0 0 10px; }
.cex-count { font-size: 12px; font-weight: 600; color: var(--muted); }
.cex-reset { margin-left: 8px; border: 1px solid #e7b6b6; background: #fdeaea; color: #c0392b; border-radius: 8px; padding: 3px 10px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; vertical-align: middle; }
.cex-reset:hover { background: #c0392b; color: #fff; border-color: #c0392b; }
/* Data & privacy (GDPR/CCPA) section — Super-Admin only, bottom of the client detail pane. */
.detail-privacy { padding: 20px 24px; border-top: 1px solid var(--border); }
.detail-privacy h3 { margin: 0 0 8px; }
.dp-gdpr { font-size: 11px; font-weight: 700; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; vertical-align: middle; margin-left: 6px; }
.dp-note { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 0 0 12px; }
.dp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.dp-erase-btn { border: 1px solid #c0362c; background: rgba(192,54,44,.10); color: #c0362c; border-radius: 8px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.dp-erase-btn:hover { background: #c0362c; color: #fff; }
.dp-erase-btn:disabled { opacity: .55; cursor: default; }
.dp-status { display: inline-block; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.cex-rollup-h { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin: 10px 0 6px; }
.cex-sub { display: grid; grid-template-columns: minmax(120px, 1.4fr) 2fr auto; align-items: center; gap: 10px; padding: 4px 0; }
.cex-sub-name { font-weight: 600; font-size: 14px; }
.cex-bar { height: 8px; background: var(--bg, #eef); border-radius: 999px; overflow: hidden; }
.cex-fill { display: block; height: 100%; border-radius: 999px; }
.cex-fill.hi { background: #1a8a4a; } .cex-fill.mid { background: #e0a000; } .cex-fill.lo { background: #c0362c; }
.cex-pct { font-weight: 700; font-size: 13px; white-space: nowrap; }
.cex-pct small { color: var(--muted); font-weight: 400; }
.cex-attempt { padding: 8px 0; border-top: 1px solid var(--border); font-size: 13px; }
/* Top row of an attempt: date / score / detail, with the "# to revisit" pinned to the right so it
   sits at the same horizontal spot across every attempt. Subs list goes on its own line below. */
.cex-arow { display: flex; align-items: center; gap: 10px; }
.cex-when { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.cex-score { font-weight: 700; flex: none; }
.cex-score.hi { color: #1a8a4a; } .cex-score.mid { color: #b07c00; } .cex-score.lo { color: #c0362c; }
.cex-detail { flex: none; }
.cex-subs { display: block; color: var(--muted); margin-top: 4px; }
.cex-partial { color: #b07c00; font-weight: 600; }
.cex-attempt-d { border-top: 1px solid var(--border); }
.cex-attempt-d > summary { display: block; padding: 8px 0; font-size: 13px; cursor: pointer; list-style: none; }
.cex-attempt-d > summary::-webkit-details-marker { display: none; }
.cex-missn { color: #c0362c; font-weight: 600; margin-left: auto; flex: none; white-space: nowrap; }
.cex-missed { padding: 4px 0 12px; display: grid; gap: 8px; }
.cex-miss { border-left: 3px solid #c0362c; padding: 6px 0 6px 12px; }
.cex-miss.done { border-left-color: #1a8a4a; opacity: .65; }
.cex-miss-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cex-miss-q { font-weight: 600; font-size: 14px; margin-bottom: 3px; }
.cex-miss.done .cex-miss-q { text-decoration: line-through; }
.cex-miss-chk { flex: none; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.cex-miss-your, .cex-miss-right { font-size: 13px; color: var(--muted); }
.cex-miss-right { color: #166b3a; }
.cex-missn.done { color: #1a8a4a; }

/* Coach client pane: "Book a session" */
.coach-booking { padding: 20px 24px; border-top: 1px solid var(--border); }
.coach-booking h3 { margin: 0 0 4px; }
.coach-booking .cb-note { color: var(--muted); font-size: 13px; margin: 0 0 10px; }
.bk-rows { display: grid; gap: 8px; }
.bk-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.bk-row-name { font-weight: 600; display: flex; align-items: baseline; gap: 8px; }
.bk-row-name .bk-dur { font-weight: 500; font-size: 12px; color: var(--muted); }
.bk-row-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.bk-book-btn {
  border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer;
  padding: 6px 14px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600;
}
.bk-book-btn:hover { filter: brightness(1.05); }
/* Copy booking link button + per-coach hover menu */
.bk-copy { border: 1px solid var(--border); background: var(--surface); color: var(--text, #1a1a1a); cursor: pointer; border-radius: 8px; padding: 6px 10px; font-size: 14px; line-height: 1.1; min-width: 34px; }
.bk-copy:hover { border-color: var(--accent); }
.bk-copy.copied { border-color: #1a8a4a; color: #1a8a4a; }
.bk-copy-wrap { position: relative; display: inline-block; }
.bk-copy-menu { position: absolute; top: calc(100% + 4px); right: 0; z-index: 30; display: none; min-width: 180px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.16); padding: 4px; }
.bk-copy-wrap:hover .bk-copy-menu, .bk-copy-wrap:focus-within .bk-copy-menu { display: block; }
.bk-copy-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); padding: 5px 9px 3px; }
.bk-copy-item { display: block; width: 100%; text-align: left; border: none; background: transparent; cursor: pointer; padding: 8px 9px; border-radius: 6px; font: inherit; font-size: 13px; color: var(--text, #1a1a1a); }
.bk-copy-item:hover { background: var(--accent-soft, #eef2ff); }
.bk-copy-item.copied { background: #e3f7ec; color: #166b3a; font-weight: 600; }
/* Transient toast (above the Calendly popup overlay) */
.app-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(10px); background: #1f2937; color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px; font-weight: 600; box-shadow: 0 12px 34px rgba(0,0,0,.35); z-index: 100000; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; max-width: 90vw; text-align: center; }
.app-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
/* Lightweight styled client dialog (e.g. "already booked") */
.cdlg-overlay { position: fixed; inset: 0; background: rgba(16,24,40,.45); display: grid; place-items: center; z-index: 100001; padding: 18px; }
.cdlg { position: relative; width: 420px; max-width: 100%; background: var(--surface); border-radius: 16px; box-shadow: 0 20px 60px rgba(16,24,40,.3); padding: 22px 22px 18px; }
.cdlg-x { position: absolute; top: 10px; right: 12px; border: none; background: none; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 6px; }
.cdlg-x:hover { color: var(--text); }
.cdlg-title { margin: 0 26px 10px 0; font-size: 18px; }
.cdlg-body { font-size: 14px; line-height: 1.5; color: var(--text); }
.cdlg-body p { margin: 0 0 10px; }
/* "Got it" sits centered; the Reschedule/Cancel links go in a bottom-left footer below it. */
.cdlg-actions { display: flex; justify-content: center; margin-top: 16px; }
.cdlg-footer { margin-top: 14px; }
/* Anchor "buttons" inside the dialog need inline-flex to vertically centre their text */
.cdlg a.primary-btn, .cdlg a.text-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
/* Manage-a-booking links, tucked into the bottom-left corner */
.cdlg-manage { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 18px; }
.cdlg-resched { color: var(--text); }
.cdlg-resched:hover { color: var(--text); text-decoration: underline; }
/* Dashboard (summary KPI) layout editor */
.adm-kpis { display: grid; gap: 8px; margin-bottom: 6px; }
.adm-subhead { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin: 18px 0 8px; }
/* Questions header row with bulk approve/disapprove */
.adm-ex-qhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.adm-ex-qhead .adm-subhead { margin-bottom: 0; }
.adm-ex-qcount { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--muted); opacity: .8; }
.adm-ex-bulk { display: inline-flex; align-items: center; gap: 8px; }
.adm-ex-bulk .text-btn { font-size: 13px; }
.adm-ex-bulk-sep { color: var(--border); }
.adw-stepvid { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.adw-stepvid-name { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.adw-stepvid-tag { font-weight: 600; font-size: 11px; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 2px 8px; margin-left: 6px; }
.adm-kpi-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.adm-kpi-move { display: flex; gap: 4px; }
.adm-kpi-btn { border: 1px solid var(--border); background: var(--surface); border-radius: 6px; width: 28px; height: 28px; cursor: pointer; font-size: 14px; color: var(--text); line-height: 1; }
.adm-kpi-btn:hover:not(:disabled) { background: var(--bg); }
.adm-kpi-btn:disabled { opacity: .35; cursor: default; }
.adm-kpi-name { font-weight: 600; }
.adm-kpi-show { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; cursor: pointer; }
/* Practice Exam authoring editor */
.adm-ex-pick { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.adm-ex-pick > span { font-size: 12px; font-weight: 600; color: var(--muted); }
.adm-ex-content-f { display: flex; flex-direction: column; gap: 4px; margin-bottom: 4px; }
.adm-ex-content-f > span { font-size: 12px; font-weight: 600; color: var(--muted); }
.adm-ex-ai { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0 4px; }
.adm-ex-ai-auto { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text, #1a1a1a); }
.adm-ex-ai-count { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.adm-ex-ai-count input:disabled { opacity: .4; }
.adm-ex-ai-count input { width: 56px; text-align: center; }
.adm-ex-aihint { font-size: 12px; color: var(--muted); flex-basis: 100%; }
.adm-ex-err { color: var(--danger, #c0362c); font-size: 13px; }
/* Live character counts + the AI clean-up row in the exam editor */
.adm-ex-chars { font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.adm-ex-content-f > span { display: flex; align-items: baseline; gap: 8px; }
.adm-ex-content-f > span .adm-ex-chars { margin-left: auto; }
.adm-ex-opt { font-weight: 400; color: var(--muted); }
.adm-ex-clean { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0 10px; }

/* My Path — admin journey editor */
.adm-jp-phase .adm-jp-blurb { margin: 6px 0 10px; width: 100%; }
.adm-jp-steps { display: grid; gap: 0; margin: 4px 0 8px; }
/* Each step's controls are separated by a divider so it's clear which belong to which step. */
.adm-jp-step { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 12px 0; border-top: 1px solid var(--border); }
.adm-acq-h { margin: 16px 0 6px; font-size: 14px; }
.adm-acq-list { display: grid; gap: 6px; margin-bottom: 6px; }
.adm-acq-row { display: flex; gap: 6px; align-items: center; }
.adm-acq-row .adm-input { flex: 1; min-width: 0; }
.adm-acq-row .adm-acq-fu { flex: 0 0 auto; }
.adm-jp-steps > .adm-jp-step:first-child { border-top: none; padding-top: 2px; }
.adm-jp-step-label { flex: 1 1 200px; min-width: 0; }
.adm-jp-url { flex: 1 1 100%; } /* URL field wraps to its own full-width line under the step */
.adm-jp-content { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px dashed var(--border); margin-top: 4px; padding-top: 8px; }
.adm-jp-clabel { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.adm-jp-clabel select { flex: none; }
.adm-jp-cfield { flex: 1 1 100%; }
.adm-jp-cfinal { flex: 1 1 100%; }
.adm-jp-cfinal input { flex: 1; min-width: 0; }
.adm-jp-cmanual { flex: 1 1 100%; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 600; cursor: pointer; }
.adm-jp-cmanual input { flex: none; }
.adm-jp-cmanual.is-locked { opacity: .55; cursor: default; }
.adm-jp-cmanual.is-locked input { cursor: default; }
/* Inline client-feedback question builder (per task) */
.adm-fb { flex: 1 1 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 6px; padding: 10px; background: var(--bg, #f7f7f8); border-radius: 8px; }
.adm-fb-head { font-size: 12px; font-weight: 700; color: var(--muted); }
.adm-fb-count { display: inline-block; min-width: 16px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; text-align: center; }
.adm-fb-hint { font-size: 11px; color: var(--muted); line-height: 1.4; }
.adm-fb-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.adm-fb-label { flex: 1 1 100%; min-width: 0; }
.adm-fb-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; width: 100%; }
.adm-fb-type { flex: none; }
.adm-fb-req { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; cursor: pointer; }
.adm-fb-req input { flex: none; }
.adm-fb-opts { flex: 1 1 100%; min-width: 0; }
.adm-fb-del { margin-left: auto; border: none; background: transparent; color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.adm-fb-del:hover { background: rgba(220,38,38,.12); color: #dc2626; }
.adm-fb-add { align-self: flex-start; }
.adm-jp-goto { flex: none; width: 150px; }
.adm-jp-vis { flex: none; width: 160px; }
.adm-jp-path { flex: none; width: 160px; }
.adm-jp-emp { flex: none; width: 150px; }
/* Bulk-move: per-task select checkbox + the "move selected to phase" toolbar. */
.adm-jp-sel { flex: none; width: 16px; height: 16px; margin: 0 4px 0 0; cursor: pointer; }
.adm-jp-movebar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 10px 14px; margin: 4px 0 12px; background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 10px; font-size: 13px; position: sticky; top: 4px; z-index: 5; }
.adm-jp-movebar.hidden { display: none; }
.adm-jp-move-to { display: flex; align-items: center; gap: 6px; }
.adm-jp-move-to select { width: auto; min-width: 140px; }
/* Media Library (Admin → Library) */
.lib-upload { display: flex; align-items: center; gap: 12px; margin: 8px 0 16px; }
.lib-upload-btn { cursor: pointer; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.lib-item { border: 1px solid var(--border); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; background: var(--surface); }
.lib-thumb { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; background: var(--bg, #eef0f3); }
.lib-thumb.lib-file { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 30px; color: var(--muted); }
.lib-thumb.lib-file span { font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.lib-name { font-size: 12px; font-weight: 600; word-break: break-word; line-height: 1.3; max-height: 2.6em; overflow: hidden; }
.lib-sub { font-size: 11px; color: var(--muted); }
.lib-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.lib-actions .text-btn { font-size: 11px; padding: 3px 7px; }
.adm-jp-paths { flex: none; width: 172px; display: flex; flex-direction: column; gap: 3px; padding: 2px 0; }
.adm-jp-path-chk { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text); white-space: nowrap; cursor: pointer; line-height: 1.25; }
.adm-jp-path-chk input { flex: none; margin: 0; }
.adm-jp-path-all { font-weight: 700; color: var(--text); padding-bottom: 3px; margin-bottom: 1px; border-bottom: 1px solid var(--border); }
.adm-it-block { border: 1px dashed #f0c0bb; background: #fdf6f5; }
.adm-it-title { font-size: 15px; font-weight: 700; color: #8a2a22; }
.adm-it-ess { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.adm-it-tight { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: 13px; }
.adm-it-tight input { width: 70px; }
.adm-it-tight > span:first-child { font-weight: 600; }

/* My Path — guided journey (client) */
.client-mypath { border-top: 3px solid var(--accent); }
.mp-head { margin-bottom: 12px; }
.mp-phase-pos { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.mp-phase-name { margin: 2px 0 4px; font-size: 22px; }
.mp-phase-blurb { margin: 0; color: var(--muted); font-size: 14px; }
.mp-hero { background: var(--accent-soft, #eef2ff); border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin: 12px 0; }
.mp-hero-done { background: #e3f7ec; }
.mp-hero-kicker { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.mp-hero-done .mp-hero-kicker { color: #166b3a; }
.mp-hero-step { margin: 6px 0 10px; font-size: 17px; font-weight: 600; line-height: 1.4; }
/* The "phase complete" hero keeps its light-green background in both themes, so pin its text dark green —
   otherwise dark mode inherits light --text and it's unreadable on the light-green card. */
.mp-hero-done .mp-hero-step { color: #14532d; }
/* Coach "Preview as client" — fixed bottom bar + a transient "changes disabled" toast. */
.cp-preview-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; padding: 10px 16px; background: #7a3e00; color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 -2px 14px rgba(0,0,0,.3); }
.cp-preview-bar b { font-weight: 800; }
.cp-preview-exit { background: #fff; color: #7a3e00; border: none; border-radius: 8px; padding: 6px 14px; font: inherit; font-weight: 700; cursor: pointer; }
.cp-preview-exit:hover { background: #ffe8cc; }
.cp-preview-toast { position: fixed; left: 50%; bottom: 66px; transform: translateX(-50%); z-index: 10000; background: #222; color: #fff; padding: 9px 16px; border-radius: 10px; font-size: 13px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .18s; }
.cp-preview-toast.show { opacity: 1; }
/* Client presence: green "active now" dot in the table + badge in the detail header. */
.presence-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--border, #cbd2da); margin-right: 7px; vertical-align: middle; }
.presence-dot.on { width: 8px; height: 8px; background: #22c55e; box-shadow: 0 0 0 2px rgba(34,197,94,.28); animation: presence-pulse 2s ease-in-out infinite; }
@keyframes presence-pulse { 0%, 100% { box-shadow: 0 0 0 2px rgba(34,197,94,.28); } 50% { box-shadow: 0 0 0 5px rgba(34,197,94,.08); } }
.presence-badge { display: none; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.presence-badge.active { display: inline-flex; color: #166b3a; background: #e3f7ec; }
.presence-badge.seen { display: inline-flex; color: var(--muted); background: var(--bg, #eef0f3); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .presence-dot.on { animation: none; } }
.mp-hero-cta { white-space: nowrap; }
/* Generic "next up" card for a link/manual step (auto-advance surfaces this when the next task has no
   card of its own, e.g. the community / Skool step). */
.mp-linkstep .cc-head { align-items: center; gap: 12px; min-height: 28px; }
.mp-linkstep .cc-head .wv-done { flex: none; }
/* Bounded, scrollable text box — same treatment as the paged reader's .agr-page, so a long blurb stays
   short height-wise and scrolls instead of stretching the card. */
.mp-linkstep-body { max-height: 40vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-size: 14px; line-height: 1.6; margin-top: 12px; }
.mp-linkstep-body p { margin: 0 0 10px; }
.mp-linkstep-body p:last-child { margin-bottom: 0; }
.mp-linkstep-body ul, .mp-linkstep-body ol { margin: 0 0 10px; padding-left: 20px; }
/* Footer with the action button pushed to the bottom-right, like the reader's .agr-nav. */
.mp-linkstep-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-top: 12px; }
.mp-linkstep-nav .primary-btn { margin-left: auto; }
.mp-linkstep-prompt { font-size: 13px; }
.mp-linkstep-hint { font-size: 13px; margin: 10px 0 0; }
.mp-linkstep-open { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; white-space: nowrap; }
.mp-linkstep-done { padding: 9px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text, inherit); font: inherit; font-weight: 600; cursor: pointer; }
.mp-linkstep-done:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.mp-linkstep-done:disabled { opacity: .55; cursor: default; }
.mp-linkstep-done.is-done { color: #166b3a; border-color: #9fe0bb; background: #e3f7ec; }
.mp-linkstep-hint { font-size: 13px; margin: 8px 0 0; }
.mp-prog { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.mp-prog-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--bg, #eceef1); overflow: hidden; }
.mp-prog-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width .25s; }
.mp-prog-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
.mp-steps { display: grid; gap: 2px; margin: 8px 0; }
.mp-step { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 10px; cursor: pointer; }
.mp-step:hover { background: var(--bg, #f6f7f9); }
/* The step whose card is currently shown beside My Path — bold accent label + filled "→" so it's
   clear which one you're looking at (no row tint / left bar — that was too heavy). */
.mp-step.active .mp-step-label { color: var(--accent); font-weight: 700; }
.mp-step.active .mp-step-go { background: var(--accent); color: #fff; border-color: var(--accent); }
/* Favorite star. Two stacked ★: a grey outline BASE (always shown) + a gold LIT overlay. Favoriting
   flips ONLY the lit layer's opacity, and that layer is pre-promoted (will-change:opacity + translateZ),
   so the flip is a pure COMPOSITOR op — no repaint, no layout. Even a colour repaint here was enough to
   blip the lesson video beside it; an opacity flip on an isolated layer cannot. Off = grey outline;
   on = solid gold. */
.mp-fav { position: relative; flex: none; border: none; background: none; cursor: pointer; font-size: 18px; line-height: 1; padding: 2px 4px; border-radius: 6px; }
.mp-fav .fav-base, .mp-fav .fav-lit { display: block; }
.mp-fav .fav-base { color: transparent; -webkit-text-stroke: 1.4px var(--muted); }
.mp-fav .fav-lit { position: absolute; left: 4px; top: 2px; color: #e0a020; -webkit-text-stroke: 1.4px #e0a020; opacity: 0; will-change: opacity; transform: translateZ(0); }
.mp-fav.on .fav-lit { opacity: 1; }
.mp-fav:hover { background: var(--bg, #f1f2f4); }
.mp-fav:hover .fav-base { -webkit-text-stroke-color: #e0a020; }
/* Locked / view-only tasks show the star (keeps rows + locks aligned) but it's inert. */
.mp-fav.disabled { opacity: .3; cursor: not-allowed; }
.mp-fav.disabled:hover { background: none; }
.mp-fav.disabled:hover .fav-base { -webkit-text-stroke-color: var(--muted); }
.mp-fav.on.disabled { opacity: .5; }
/* The favorite star relocated onto the open task card's title line, right after the heading text.
   The heading becomes a flex row so the star centres vertically against the whole title. */
:is(h1, h2, h3).has-card-fav { display: flex; align-items: center; }
.mp-fav.cp-card-fav { flex: none; font-size: 20px; margin-left: 8px; }
/* Task card header: "← My Path" on the left, the favorite star on the right (synced with the row star). */
.cp-mp-right-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
/* Full-focus "Step X of Y" + slim bar next to ← My Path — restores the sense-of-place the hidden list gave. */
.mp-progress { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.mp-progress-txt { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.mp-progress-bar { width: 64px; height: 5px; border-radius: 999px; background: var(--border); overflow: hidden; flex: none; }
.mp-progress-bar > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
/* Focus-mode reminders: slim, conditional nudges that persist even when a task fills the screen. */
.focus-reminders { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; }
.fr-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft, #eaf0ff); border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text, #1c2430); }
.fr-ic { flex: none; font-size: 15px; }
.fr-text { flex: 1; min-width: 0; }
.fr-act { flex: none; border: none; background: var(--accent, #2f5bea); color: #fff; border-radius: 999px; padding: 5px 14px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; text-decoration: none; }
.fr-act:hover { opacity: .92; }
.cp-mp-right-top .mp-fav { font-size: 20px; padding: 4px 6px; }
.mp-step-flash { animation: mpStepFlash 1.6s ease; }
@keyframes mpStepFlash { 0%, 100% { background: transparent; } 25%, 60% { background: var(--accent-soft); } }
/* Favorites dialog (⭐ pill → list of starred tasks, grouped by phase). */
.fav-list { display: flex; flex-direction: column; gap: 14px; }
.fav-group-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin-bottom: 6px; }
.fav-item { display: flex; align-items: center; gap: 6px; }
.fav-go { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 9px 12px; cursor: pointer; font: inherit; font-size: 14px; color: var(--text); }
.fav-go:hover:not(:disabled) { border-color: var(--accent); }
.fav-go:disabled { opacity: .6; cursor: default; }
.fav-label.done { text-decoration: line-through; color: var(--muted); }
.fav-tag { flex: none; font-size: 12px; color: var(--accent); font-weight: 600; }
.fav-remove { flex: none; border: none; background: none; cursor: pointer; font-size: 16px; color: #e0a020; padding: 4px; }
.mp-step input { position: absolute; opacity: 0; width: 0; height: 0; }
.mp-step-box { flex: none; width: 20px; height: 20px; border: 2px solid var(--border); border-radius: 6px; position: relative; transition: background .12s, border-color .12s; }
.mp-step input:checked + .mp-step-box { background: var(--accent); border-color: var(--accent); }
.mp-step input:checked + .mp-step-box::after { content: "✓"; position: absolute; inset: 0; color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.mp-step input:focus-visible + .mp-step-box { outline: 2px solid var(--accent); outline-offset: 2px; }
.mp-step-label { flex: 1; font-size: 14px; line-height: 1.4; }
.mp-step.done .mp-step-label { color: var(--muted); text-decoration: line-through; }
/* Per-client step-label note, e.g. "(Approved by Elective)" — green, not struck through when done */
.mp-step-note { display: inline-block; margin-left: 0.35em; color: var(--green, #16a34a); font-weight: 600; font-size: 12px; text-decoration: none; }
.mp-step-note.bad { color: var(--red, #dc2626); } /* e.g. "(Declined by Elective)" */
/* Declined step: red ✕ in the box, not a green check */
.mp-step.declined .mp-step-box { border-color: var(--red, #dc2626); background: transparent; }
.mp-step.declined .mp-step-box::after { content: "✕"; position: absolute; inset: 0; color: var(--red, #dc2626); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.mp-step-go { flex: none; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; padding: 0; border: 1px solid var(--border); background: var(--surface); cursor: pointer; width: 26px; height: 26px; border-radius: 8px; color: var(--accent); font: inherit; font-weight: 700; line-height: 1; text-decoration: none; }
.mp-step-go:hover { border-color: var(--accent); }
.mp-step-auto { flex: none; font-size: 11px; font-weight: 700; color: #166b3a; background: #e3f7ec; padding: 2px 8px; border-radius: 999px; }
.mp-step input:disabled + .mp-step-box { opacity: .85; }
.mp-step.readonly { cursor: default; }
.mp-step.readonly:hover { background: none; }
/* A step whose "→" hasn't been opened yet: the checkbox is dimmed until they open it. */
.mp-step.needs-visit .mp-step-box { opacity: .5; }
.mp-step.needs-visit .mp-step-go { border-color: var(--accent); color: var(--accent); }
/* When a task is BOTH the active (auto-selected) one AND not-yet-visited, the active rule paints the
   arrow's background blue while needs-visit paints the arrow itself blue → invisible blue-on-blue.
   This higher-specificity rule keeps the arrow white on the blue active background. */
.mp-step.active.needs-visit .mp-step-go { color: #fff; }
/* A dependency-locked step: greyed out (label + checkbox) with the lock icon. */
.mp-step.locked { cursor: not-allowed; }
.mp-step.locked .mp-step-label { color: var(--muted); opacity: .65; }
.mp-step.locked .mp-step-box { opacity: .45; }
.mp-step-lock { flex: none; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; opacity: .6; } /* same footprint as the → button so locks line up with arrows */
.mpc-vis { margin-left: auto; flex: none; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 2px 7px; border-radius: 999px; }
.mpc-vis.coachonly { color: #8a2a22; background: #fbeaea; }
.mpc-vis.readonly { color: #8a5a12; background: #fff3cd; }
.mpc-count { margin-left: auto; flex: none; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--bg, #f1f2f4); padding: 2px 8px; border-radius: 999px; }
/* mastery (quiz + evidence) status pill on a coach My Path step */
.mpc-mastery { margin-left: auto; flex: none; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.mpc-mastery.todo { color: var(--muted); background: var(--bg, #f1f2f4); }
.mpc-mastery.pending { color: #8a5a12; background: #fff3cd; }
.mpc-mastery.confirmed { color: #1c6b3f; background: #e6f5ec; }
.mpc-attempts { flex: none; margin-left: 8px; font-size: 10px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.mpc-step { justify-content: flex-start; }
/* Role lock (client role card) */
.cr-locked { font-size: 12px; font-weight: 700; color: #8a6d00; background: #fff3cd; padding: 2px 8px; border-radius: 999px; vertical-align: middle; }
.cr-locked-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.rv-chip-locked { background: var(--bg, #f1f2f4); }
/* Self-assessment */
.sa-snapshot { display: grid; gap: 16px; margin: 8px 0 18px; }
.sa-pills { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.sa-pill { text-align: center; border: 1px solid var(--border); border-radius: 12px; padding: 12px 8px; }
.sa-ring { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 8px; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p, 0) * 1%), var(--bg, #e9ecf1) 0); }
.sa-ring span { width: 42px; height: 42px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.sa-pill-name { font-size: 12px; font-weight: 700; line-height: 1.2; }
.sa-pill-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
/* Coach snapshot: ✅ readiness counts per section (absolute + %) — no donuts */
.sa-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.sa-stat { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.sa-stat-name { font-size: 12px; font-weight: 700; line-height: 1.2; }
.sa-stat-ans { font-size: 11px; color: var(--muted); margin-top: 2px; }
.sa-stat-line { display: flex; justify-content: space-between; align-items: baseline; margin: 4px 0 6px; }
.sa-stat-num { font-size: 13px; color: var(--text); }
.sa-stat-num b { font-size: 18px; }
.sa-stat-pct { font-size: 13px; font-weight: 700; color: var(--accent); }
.sa-stat-bar { height: 6px; border-radius: 999px; background: var(--bg, #e9ecf1); overflow: hidden; }
.sa-stat-fill { height: 100%; background: var(--green); border-radius: 999px; }
/* Overall readiness bar: the sum of all pillar boxes, shown full-width below them. */
.sa-stat-total { border: 1px solid var(--accent); border-radius: 12px; padding: 10px 14px; background: var(--accent-soft); }
.sa-stat-total-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 2px 12px; margin-bottom: 8px; }
.sa-stat-total-name { font-size: 13px; font-weight: 700; }
.sa-stat-total-num { font-size: 13px; color: var(--text); }
.sa-stat-total-num b { font-size: 16px; }
.sa-stat-total-pct { font-size: 17px; font-weight: 700; color: var(--accent); }
/* Reviewed (locked) Brian AI answer — shown as read-only text, no editable textarea */
.bai-locked { opacity: .85; }
.sa-ladder-wrap { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.sa-ladder-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin-bottom: 8px; }
.sa-ladder-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; border-bottom: 1px dashed var(--border); }
.sa-ladder-row:last-child { border-bottom: none; }
.sa-ladder-row.now { color: var(--accent); font-weight: 700; }
.sa-ladder-row.target { color: var(--muted); }
/* Salary picture: yearly figure + monthly/daily breakdown, and increase-vs-current for targets */
.sp-group { display: grid; gap: 9px; }
.sp-row { font-size: 13px; }
.sp-row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.sp-label { color: var(--muted); }
.sp-year { font-size: 14px; white-space: nowrap; }
.sp-row.now .sp-year { color: var(--accent); }
.sp-target .sp-year { color: var(--text); }
.sp-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.sp-inc-wrap { margin-top: 3px; }
.sp-inc-label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.sp-inc { font-size: 12px; font-weight: 600; color: var(--green); }
.sp-inc-neg { color: var(--red); }
.sp-divider { height: 1px; background: var(--border); margin: 11px 0; }
.sp-foot { font-size: 10.5px; color: var(--muted); margin-top: 10px; line-height: 1.4; }
.sa-section { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; }
.sa-section > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; cursor: pointer; font-weight: 700; list-style: none; }
.sa-section > summary::-webkit-details-marker { display: none; }
.sa-sec-title { font-size: 15px; }
.sa-badge { font-size: 12px; font-weight: 700; color: var(--text); background: var(--bg, #eef0f3); border: 1px solid var(--border, #e3e6ea); padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.sa-badge.done { color: #166b3a; background: #e3f7ec; border-color: transparent; } /* all scorable questions correct */
.sa-badge.muted { color: var(--muted); background: var(--bg, #eef0f3); border-color: transparent; }
/* Per-answer readiness verdict shown under a scored answer in the review views. */
.sa-verdict-row { margin-top: 7px; }
.sa-verdict { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; line-height: 1.35; }
.sa-verdict.ok { color: #166b3a; background: #e3f7ec; }
.sa-verdict.bad { color: #b42318; background: #fdecea; }
.sa-verdict.warn { color: #9a6400; background: #fdf3d8; }
/* Admin: global assessment setting (client "needs discussion" message). */
.as-global { margin: 4px 0 18px; padding: 12px 14px; border: 1px solid var(--line, #e3e6ea); border-radius: 10px; background: var(--card, #fafbfc); }
.as-global-lbl { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.as-global .adm-hint { margin: 6px 0 0; }
.sa-section-body { padding: 4px 14px 14px; display: grid; gap: 16px; }
.sa-q-label { display: block; font-size: 14px; font-weight: 600; line-height: 1.4; margin-bottom: 6px; }
.sa-field-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sa-link { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 12px; padding: 3px 11px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); text-decoration: none; white-space: nowrap; }
.sa-link:hover { background: var(--accent-soft); }
/* Gentle attention nudge on the Check pill — ONLY in the guided runner (one question on screen),
   ONLY while the field is still empty (placeholder showing), a few soft pulses then it rests. Disabled
   for users who prefer reduced motion. */
@keyframes saCheckNudge {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-soft); transform: scale(1); }
  50%      { box-shadow: 0 0 0 5px var(--accent-soft); transform: scale(1.04); }
}
@media (prefers-reduced-motion: no-preference) {
  .sa-runner .sa-field-row:has(input:placeholder-shown, textarea:placeholder-shown) .sa-link {
    animation: saCheckNudge 1.8s ease-in-out 3;
  }
}
.sa-example-cap { font-size: 12px; color: var(--muted); margin: 5px 2px 0; }
.sa-example-cap a { color: var(--accent); text-decoration: underline; }
.sa-hint { margin: -2px 0 6px; font-size: 12px; color: var(--muted); }
.sa-inline { display: flex; align-items: center; gap: 6px; }
.sa-input { width: 160px; max-width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; font: inherit; font-size: 14px; }
.sa-input-sm { width: 96px; }
.sa-input-num { width: 110px; } /* whole-number count fields (comma-formatted) */
.sa-input-yr { width: 40px; } /* digits-only, max 2 chars (≈ half of the prior 79px), both sides */
.sa-prefix, .sa-suffix { color: var(--muted); font-size: 13px; }
/* Money input: $ inside, comma-formatted (5/8 of the standard width) */
.sa-money { position: relative; display: inline-block; }
.sa-money-sym { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; pointer-events: none; }
.sa-money-in { width: 112px; padding-left: 22px; text-align: left; }
/* Optional/required follow-up details */
.sa-details { margin-top: 10px; }
.sa-details-label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.sa-req { color: var(--danger, #c0362c); }
/* Flash a required field's own control when the client tries to advance past it unanswered */
.sa-need { animation: saNeed .5s ease; }
@keyframes saNeed {
  0%, 100% { transform: translateX(0); }
  15%, 75% { transform: translateX(-5px); box-shadow: 0 0 0 3px var(--red-soft); }
  45% { transform: translateX(5px); box-shadow: 0 0 0 3px var(--red-soft); }
}
.sa-loc-grouplabel { font-size: 12px; font-weight: 700; color: var(--muted); margin: 8px 0 2px; }
.sa-text, .sa-notein { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; font: inherit; font-size: 14px; resize: vertical; }
.sa-notein { margin-top: 8px; }
/* Side by side when they fit; if a label is long, each keeps to one line and stacks onto its own row
   (a two-line button looks bad). Pill radius softens to a rounded rectangle once stacked. */
.sa-bool { display: flex; flex-wrap: wrap; gap: 8px; }
.sa-bool button { border: 1px solid var(--border); background: var(--surface); cursor: pointer; padding: 7px 22px; border-radius: 14px; font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; max-width: 100%; }
/* Neutral selected state — the buttons don't signal good/bad (the "correct answer" is set per question) */
.sa-bool-btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
/* Single-select "choice" options are often multi-word, graded answers — stack each on its own full-width
   row (with wrapping text), rather than the side-by-side, nowrap layout used for Yes/No. */
.sa-choice { flex-direction: column; align-items: stretch; }
.sa-choice .sa-bool-btn { width: 100%; white-space: normal; text-align: left; padding: 10px 16px; border-radius: 12px; }
/* Short-option choices (Yes / No / Not sure): back to a narrow inline row like the bool buttons. */
.sa-choice.sa-choice-inline { flex-direction: row; flex-wrap: wrap; align-items: center; }
.sa-choice.sa-choice-inline .sa-bool-btn { width: auto; white-space: nowrap; text-align: center; padding: 7px 22px; border-radius: 14px; }
/* Likert 1–5 */
.sa-likert-wrap { display: grid; gap: 5px; }
.sa-likert { display: flex; gap: 8px; }
.sa-likert-btn { flex: 1 1 0; min-width: 40px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; padding: 11px 0; border-radius: 12px; font: inherit; font-size: 15px; font-weight: 700; }
.sa-likert-btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.sa-likert-ends { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); padding: 0 2px; }
.as-q-money { display: flex; gap: 8px; flex-wrap: wrap; }
.as-q-money .adm-input { flex: 1 1 160px; min-width: 0; }
.as-q-likert-lab { display: flex; gap: 8px; flex-wrap: wrap; }
.as-q-likert-lab .adm-input { flex: 1 1 160px; min-width: 0; }
/* legacy classes (kept harmless in case any cached markup lingers) */
.sa-yes.on, .sa-no.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.sa-multi { display: flex; flex-wrap: wrap; gap: 8px; }
.sa-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.sa-chip.on { background: var(--accent-soft, #eef2ff); border-color: var(--accent); }
.sa-chip input { display: none; }
.sa-subs { margin: 10px 0 0 14px; padding-left: 12px; border-left: 2px solid var(--border); display: grid; gap: 10px; }
.sa-sub-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.sa-titles { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sa-title-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--bg, #f1f2f4); border-radius: 999px; padding: 5px 6px 5px 12px; font-size: 13px; }
.sa-title-x { border: none; background: none; cursor: pointer; font-size: 16px; line-height: 1; color: var(--muted); }
.sa-title-input { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 13px; }
.sa-title-addbtn { border: 1px solid var(--border); background: var(--surface); cursor: pointer; padding: 7px 12px; border-radius: 8px; font: inherit; font-weight: 600; }
.sa-title-add { display: inline-flex; align-items: center; gap: 6px; }
/* Completed self-assessment: links row (Review & update · See all answers · Download PDF) with the
   "I'm done" button pushed to the bottom-right. */
.sa-done-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.sa-done-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.sa-done-actions .primary-btn { margin-left: auto; }
.sa-sep { color: var(--muted); opacity: .6; }
.sa-download-pdf { font-weight: 600; }
.sa-loc > summary { cursor: pointer; font-size: 14px; color: var(--accent); font-weight: 600; }
.sa-loc-group { margin-top: 10px; }
.sa-loc-inline .sa-loc-group:first-child { margin-top: 0; }
.sa-loc-all { font-size: 13px; }
.sa-loc-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sa-loc-chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px; font-size: 12px; cursor: pointer; }
.sa-loc-chip.on { background: var(--accent-soft, #eef2ff); border-color: var(--accent); }
.sa-loc-chip input { display: none; }
.detail-assessment { padding: 20px 24px; border-top: 1px solid var(--border); }
.detail-assessment h3 { margin: 0 0 6px; }
/* Coach-only reset controls (per-section + whole assessment) — destructive, so styled quietly in red */
.sa-sec-reset { display: flex; justify-content: flex-end; border-top: 1px dashed var(--border); padding-top: 10px; }
.sa-reset-all-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.sa-reset-all-row .client-muted { font-size: 12px; }
.sa-reset-btn { color: var(--red); }
.sa-reset-btn:hover { background: var(--red-soft); border-radius: 6px; }
/* Coach-side Appetite summary (all "not scored" appetite answers in one place) */
.sa-appetite { margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.sa-appetite-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.sa-appetite-head h4 { margin: 0; font-size: 14px; }
.sa-appetite-sub { font-size: 12px; color: var(--muted); }
.sa-appetite-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.sa-appetite-item { display: grid; gap: 2px; }
.sa-appetite-q { font-size: 12px; color: var(--muted); line-height: 1.35; }
.sa-appetite-a { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.35; }
.sa-appetite-a.none { font-weight: 400; color: var(--muted); font-style: italic; }
/* Self-assessment admin editor */
.as-sec-collapse { flex: 0 0 auto; background: none; border: none; cursor: pointer; font-size: 13px; color: var(--muted); padding: 2px 4px; line-height: 1; border-radius: 6px; }
.as-sec-collapse:hover { background: var(--bg, #eef0f3); color: var(--text); }
.as-sec-count { flex: 0 0 auto; font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.as-sec.collapsed .as-sec-body { display: none; }
.as-collapse-all { display: flex; gap: 4px; justify-content: flex-end; margin: 0 0 8px; }
.as-sec .as-qs { display: grid; gap: 10px; margin: 8px 0; }
.as-q { border: 1px solid var(--border); border-radius: 10px; padding: 10px; display: grid; gap: 6px; }
.as-q-row1 { display: flex; gap: 6px; align-items: center; }
.as-q-label { flex: 1; min-width: 0; }
.as-q-row2 { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.as-q-row2 select { flex: 1 1 160px; }
.as-q-unscored { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text); white-space: nowrap; cursor: pointer; }
.as-q-unscored input { cursor: pointer; }
.as-q-appetite-note { font-size: 12px; color: var(--muted); font-style: italic; margin: 4px 0 0; padding: 6px 8px; border-left: 2px solid var(--border, #d7dbe0); background: var(--bg, #f4f5f7); border-radius: 0 6px 6px 0; }
.as-q-extra { display: flex; gap: 6px; flex-wrap: wrap; }
.as-q-extra input { flex: 1 1 180px; min-width: 0; }
/* Conditional follow-up ("Show only if…") row in the assessment editor */
.as-q-cond { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 6px; border-radius: 8px; background: var(--accent-soft); }
.as-q-cond .as-cond-mode { flex: 0 0 auto; }
.as-q-cond .as-cond-q { flex: 2 1 160px; min-width: 0; }
.as-q-cond .as-cond-val { flex: 1 1 120px; min-width: 0; }
.as-q-cond .as-cond-num { flex: 0 0 64px; width: 64px; min-width: 0; text-align: center; }
/* Duplicate-question warnings in the assessment editor */
.as-dup-banner { background: var(--amber-soft); color: var(--text); border: 1px solid var(--amber); border-radius: 8px; padding: 8px 12px; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.as-q-dup { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber); }
.as-q-dupwarn { font-size: 12px; font-weight: 600; color: var(--amber); }
/* Example-image control in the assessment editor */
.as-q-img { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.as-q-img-thumb { max-width: 120px; max-height: 80px; border: 1px solid var(--border); border-radius: 6px; object-fit: contain; }
.as-q-img-add { font-size: 13px; color: var(--accent); cursor: pointer; font-weight: 600; }
.as-q-img-status { font-size: 12px; color: var(--muted); }
/* 0–100% slider question (client) */
.sa-scale { display: flex; align-items: center; gap: 12px; max-width: 420px; }
.sa-scale-range { flex: 1; accent-color: var(--accent); height: 22px; cursor: pointer; }
.sa-scale-val { flex: none; min-width: 46px; text-align: right; font-weight: 700; font-size: 15px; color: var(--text); }
/* Scale correct-range editor (admin) */
.as-q-scale { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.as-q-scale .as-scale-lab { font-size: 13px; color: var(--muted); }
.as-q-scale .as-scale-in { width: 60px; flex: none; text-align: center; }
.as-scale-hint { font-size: 12px; color: var(--muted); margin: 2px 0 0; }
/* File-upload question (client + coach) */
.sa-file { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sa-file-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--accent); color: var(--accent); background: var(--surface); border-radius: 999px; padding: 7px 16px; font-size: 13px; font-weight: 600; cursor: pointer; }
.sa-file-btn:hover { background: var(--accent-soft); }
.sa-file-current { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; color: var(--text); text-decoration: underline; }
.sa-file-status { font-size: 12px; color: var(--muted); }
/* Choice-type editor: option rows with a "correct" tick */
.as-q-choice { display: grid; gap: 6px; }
.as-choice-row { display: flex; gap: 6px; align-items: center; }
.as-choice-row .adm-input { flex: 1 1 auto; min-width: 0; }
.as-choice-correct { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; cursor: pointer; }
.as-choice-hint { font-size: 12px; color: var(--muted); margin: 2px 0 0; }
.as-q-linkrow { display: flex; gap: 6px; flex-wrap: wrap; }
.as-q-linkrow .as-q-link { flex: 2 1 200px; min-width: 0; }
.as-q-linkrow .as-q-linklabel { flex: 1 1 130px; min-width: 0; }
/* Client/coach: example screenshot shown below a self-assessment field */
.sa-example { display: block; margin-top: 8px; }
/* width:100% gives a definite width so the inline `aspect-ratio` (set per-image from its real size,
   captured at preload) reserves the exact slot before the pixels load — no reflow that shoves the
   surrounding text. The 340px height cap is applied per-image via an inline max-width (see app.js), so
   it never distorts the aspect ratio. Without known dimensions it falls back to natural ratio. */
.sa-example img { width: 100%; height: auto; max-width: 100%; border: 1px solid var(--border); border-radius: 8px; display: block; }
/* Reserved slot that a persistent, pre-decoded <img> node is mounted into (runner). The inline
   aspect-ratio + max-width (set per-image in app.js) hold the exact space before the node mounts. */
.sa-example-slot { display: block; width: 100%; }
.as-cond-when { font-size: 12px; color: var(--muted); }
/* Self-assessment guided runner + home */
.sa-meta { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--bg, #eef0f3); padding: 6px 12px; border-radius: 999px; margin: 2px 0 12px; }
.sa-home-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.sa-runner { min-height: 42vh; display: flex; flex-direction: column; }
.sa-run-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sa-run-sec { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); }
.sa-form-title { margin: 0; font-size: 18px; }
.sa-run-close { border: none; background: none; cursor: pointer; font-size: 18px; color: var(--muted); border-radius: 8px; padding: 2px 6px; }
.sa-run-close:hover { background: var(--bg, #f1f2f4); }
.sa-run-prog { height: 6px; border-radius: 999px; background: var(--bg, #eceef1); overflow: hidden; margin-bottom: 14px; }
.sa-run-bar { height: 100%; background: var(--accent); border-radius: 999px; transition: width .25s; }
.sa-run-qn { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.sa-run-q { margin: 0 0 10px; font-size: 21px; line-height: 1.3; }
.sa-run-field { flex: 1; margin-bottom: 18px; }
.sa-run-nav { display: flex; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.sa-run-nav .primary-btn { margin-left: auto; }
/* My Path: phases on the left, the chosen task's card on the right (desktop), each keeping its full
   card width. Stacks to one column when there isn't room for two. */
.client-main.cp-mypath-wide { max-width: 1320px; }
.cp-mypath-2col { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; justify-content: center; }
.cp-mp-left, .cp-mp-right { flex: 1 1 600px; min-width: 0; max-width: 640px; }
/* "Your meetings" card, stacked under My Path inside the left column (so no gap when the focus card
   on the right is taller than My Path). */
.cp-mypath-meetings .client-card { margin-bottom: 0; } /* meetings sits last in the left column */
/* Every focus card's title gets a consistent size. (It used to also carry an 18px top margin to line up
   with My Path's phase title in the old two-column view — but a focused task now hides the left column
   full-width, so that margin only stacked on top of the card's own 18px padding and pushed the title
   down. Removed so the title sits at the card's normal inset.) */
.cp-mp-right > .client-card > h2:first-child,
.cp-mp-right > .client-card > .cc-head:first-child,
.cp-mp-right > .client-card > .agr-top:first-child { margin-top: 0; }
.cp-mp-right > .client-card > h2:first-child,
.cp-mp-right > .client-card > .cc-head:first-child h2,
.cp-mp-right > .client-card > .agr-top:first-child .agr-title { font-size: 18px; font-weight: 700; }
/* Client portal only: disable pinch / double-tap zoom (allow normal scrolling). Pairs with the JS
   gesture blockers — iOS Safari ignores the viewport meta, so this + preventDefault are what actually stop it. */
html.cp-no-zoom, html.cp-no-zoom body { touch-action: pan-x pan-y; }
.cp-focus-placeholder { display: flex; align-items: center; min-height: 120px; }
/* "← My Path" back control: shown whenever a task card is focused (list→detail nav), at every width. */
.cp-mp-back { display: none; align-items: center; gap: 6px; background: none; border: none; color: var(--accent); font: inherit; font-size: 15px; font-weight: 700; padding: 2px 2px 10px; margin: 0; cursor: pointer; }
.cp-mp-back:active { opacity: 0.6; }
/* FULL-FOCUS (Cristina's improvement): when a task is selected — at ANY width — show ONLY its card and
   hide the My Path column, a book-like detail view; "← My Path" returns to the list. Browsing
   (.cp-mypath-solo, no task) stays full-width My Path, unchanged. The focused task is capped + centered
   so the video/text stay a comfortable size on wide monitors (was mobile-only before; now desktop matches
   mobile). Completing a task auto-advances to the next one (advanceTaskFocus) — no trip back to the list. */
.cp-mypath-2col:not(.cp-mypath-solo) .cp-mp-left { display: none; }
.cp-mypath-2col:not(.cp-mypath-solo) .cp-mp-right { flex-basis: 100%; max-width: 900px; margin: 0 auto; }
.cp-mypath-2col:not(.cp-mypath-solo) .cp-mp-back { display: inline-flex; }
/* On desktop the two columns are independent (top-aligned, natural height) — neither stretches to the
   other's height — so the meetings card stacked under My Path on the left never gets a gap forced by a
   taller focus card on the right. The paged reader keeps its own bounded height (max-height below). */
@media (min-width: 1180px) {
  .cp-mypath-wide .cp-mypath-2col { align-items: flex-start; }
}
/* My Path: full-width phases card + a selector to focus one contextual card at a time */
.cp-focus-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 14px; }
.cp-focus-chip { border: 1px solid var(--border); background: var(--surface); cursor: pointer; padding: 8px 16px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 600; color: var(--text, #1a1a1a); }
.cp-focus-chip:hover { border-color: var(--accent); }
.cp-focus-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cp-focus-hint { color: var(--muted); font-size: 13px; }
/* Welcome video + agreement cards */
.wv-done { font-size: 12px; font-weight: 700; color: #166b3a; background: #e3f7ec; padding: 2px 9px; border-radius: 999px; white-space: nowrap; flex: none; }
/* Center the "Watched/Reviewed" pill against the title (the agreement card already does this) so it
   sits at the same height on the video and lesson cards instead of on the title's baseline. A shared
   min-height makes every header row identical despite the titles being different font sizes (h2 18px
   vs the agreement's 16px), so the pill centers at the exact same height across all three cards. */
.client-welcome-video .cc-head, .client-lesson .cc-head, .agr-top { align-items: center; min-height: 28px; }
/* Isolate the video onto its own compositing layer (translateZ + paint containment). Without this, a
   repaint of a nearby element — e.g. the favorite ★ flipping colour in the card title — forces the
   browser to re-composite the layer the iframe shares, producing a brief "blip" on the video. Its own
   layer means nearby repaints never touch it. */
.wv-frame { position: relative; padding-top: 56.25%; margin-top: 10px; border-radius: 12px; overflow: hidden; background: #000; transform: translateZ(0); contain: paint; }
.wv-iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lesson-text { margin-top: 12px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; }
/* "Mark complete" footer on a manual-complete lesson card */
.lesson-complete { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.lesson-complete .lesson-mark { margin: 0; }
.lesson-complete .lesson-undo { color: var(--muted); }
/* Lists produced by mdLite. white-space:normal so the items themselves don't inherit pre-wrap gaps
   from their (often pre-wrap) container; markers/indent restored since some containers reset them. */
.md-list { margin: 8px 0; padding-left: 22px; white-space: normal; }
ul.md-list { list-style: disc; }
ol.md-list { list-style: decimal; }
.md-list li { margin: 3px 0; padding-left: 2px; }
/* nested outlines: tighter spacing + distinct markers per level so the hierarchy reads clearly */
.md-list .md-list { margin: 4px 0; }
ul.md-list ul.md-list { list-style: circle; }
ul.md-list ul.md-list ul.md-list { list-style: square; }
ol.md-list ol.md-list { list-style: lower-alpha; }
ol.md-list ol.md-list ol.md-list { list-style: lower-roman; }
ol.md-list ol.md-list ol.md-list ol.md-list { list-style: decimal; }
.agr-reader { display: flex; flex-direction: column; }
.agr-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.agr-title { font-weight: 800; font-size: 16px; flex: 1 1 auto; min-width: 0; }
.agr-close { border: none; background: none; cursor: pointer; font-size: 16px; color: var(--muted); border-radius: 8px; padding: 2px 6px; }
.agr-prog { height: 5px; border-radius: 999px; background: var(--bg, #eceef1); overflow: hidden; margin-bottom: 8px; }
.agr-bar { height: 100%; background: var(--accent); border-radius: 999px; transition: width .2s; }
.agr-pageno { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.agr-page { max-height: 46vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; font-size: 14px; line-height: 1.65; white-space: pre-wrap; }
/* Inline images in task/agreement text (markdown ![alt](url)) — responsive, never overflow the box. */
.md-img { display: block; max-width: 100%; height: auto; border-radius: 8px; margin: 12px 0; }
/* Blockquotes in task/agreement text (markdown "> quoted line"). */
.md-quote { margin: 10px 0; padding: 8px 14px; border-left: 3px solid var(--accent, #6f8dff); background: var(--bg, #f4f5f7); color: var(--muted); font-style: italic; border-radius: 0 8px 8px 0; }
.agr-nav { display: flex; align-items: center; gap: 10px; padding-top: 12px; }
.agr-nav .primary-btn { margin-left: auto; }
/* Clearly greyed-out until the page has been scrolled to the end. */
.agr-cta:disabled { background: var(--border); color: var(--muted); cursor: not-allowed; opacity: 1; box-shadow: none; }
/* Resources (client card) */
.res-list { display: grid; gap: 8px; margin-top: 4px; }
.res-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; text-decoration: none; color: var(--text, #1a1a1a); transition: border-color .12s, background .12s; }
.res-item:hover { border-color: var(--accent); background: var(--accent-soft, #eef2ff); }
.res-item-plain { cursor: default; }
.res-label { font-weight: 600; font-size: 15px; }
.res-note { color: var(--muted); font-size: 13px; }
.res-arrow { margin-left: auto; color: var(--accent); font-weight: 700; }
.adm-res-label, .adm-res-url, .adm-res-note { flex: 1 1 0; min-width: 0; }
/* Network mapping (client card) */
.client-network .nw-item { border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 12px; display: grid; gap: 8px; }
.nw-row2 { display: flex; gap: 8px; flex-wrap: wrap; }
.nw-row2 input { flex: 1 1 140px; min-width: 0; }
.client-network input, .client-network textarea, .client-network select { padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; font: inherit; font-size: 14px; }
.client-network textarea { resize: vertical; width: 100%; }
.nw-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nw-add { border: 1px dashed var(--border); background: none; cursor: pointer; padding: 9px 14px; border-radius: 10px; font: inherit; font-weight: 600; color: var(--accent); }
.nw-add:hover { border-color: var(--accent); }
/* Network (coach detail) */
.detail-network { padding: 20px 24px; border-top: 1px solid var(--border); }
.detail-network h3 { margin: 0 0 8px; }
.dn-item { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.dn-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.dn-status { margin-left: auto; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--bg, #eef0f3); color: var(--muted); }
.dn-status.dn-responded { background: #e3f7ec; color: #166b3a; }
.dn-status.dn-intro { background: #e7eefe; color: #2a4ba0; }
.dn-rel { font-size: 12px; color: var(--muted); margin-top: 4px; }
.dn-why { font-size: 13px; margin-top: 4px; line-height: 1.5; }
.detail-acquisition { padding: 20px 24px; border-top: 1px solid var(--border); }
.detail-acquisition h3 { margin: 0 0 6px; }
/* Pass-gate (must score 100% to submit a framework's progress) */
.fw-gate { border: 1px solid #f0c277; background: #fff8ee; border-radius: 12px; padding: 14px 16px; margin: 10px 0; }
.fw-gate-head { font-size: 14px; font-weight: 800; color: #8a5a12; margin-bottom: 4px; }
.fw-gate-sub { margin: 0 0 12px; font-size: 13px; color: var(--muted); line-height: 1.55; }
/* "quiz passed — now submit evidence" state (green instead of the amber lock) */
.fw-gate.fw-gate-pass { border-color: #9ad3b0; background: #eefaf2; }
.fw-gate-pass .fw-gate-head { color: #1c6b3f; }
.fw-item-actions { margin-top: 8px; }
/* Final Exam block (client practice-exam card) */
.ex-final { border: 1px solid #cdd7f0; background: #f3f6ff; border-radius: 12px; padding: 14px 16px; margin: 6px 0 16px; }
.ex-final-resume { border-color: #f0c277; background: #fff8ee; }
.ex-final-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ex-final-badge { font-size: 15px; font-weight: 800; }
.ex-final-inprog { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #8a5a12; background: #ffe9c7; padding: 2px 8px; border-radius: 999px; }
.ex-final-sub { margin: 0 0 12px; font-size: 13px; color: var(--muted); line-height: 1.55; }
.ex-final-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mp-rail-wrap { margin-top: 6px; }
.mp-rail-wrap > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); padding: 6px 0; }
.mp-rail { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.mp-rail-item { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 4px 2px; }
.mp-rail-item.locked { color: var(--muted); }
.mp-rail-item.current .mp-rail-name { font-weight: 700; color: var(--accent); }
.mp-rail-item.done .mp-rail-icon { color: #1a8a4a; }
/* Clickable rail phases (completed + current) → review that phase. */
.mp-rail-item.nav { cursor: pointer; border-radius: 8px; }
.mp-rail-item.nav:hover { background: var(--bg, #f1f2f4); }
.mp-rail-item.nav .mp-rail-name { text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 2px; }
.mp-rail-item.viewing { background: var(--accent-soft); }
.mp-rail-item.viewing .mp-rail-name { font-weight: 700; }
/* Reviewing an earlier, completed phase. */
.mp-hero-review { background: #eef4fb; border-color: var(--accent); }
.mp-hero-review .mp-hero-kicker { color: var(--accent); }
.client-mypath.mp-reviewing { outline: 2px solid var(--accent-soft); }
/* A coach-shared standalone task (…/?task=<id>). */
.cp-shared { max-width: 760px; margin: 0 auto; }
.cp-shared-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.cp-shared-id { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cp-shared-badge { font-size: 13px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.cp-shared-note { font-size: 12px; color: var(--muted); }
.cp-shared-exit { font-weight: 600; }
/* A shared task is view/do-only, so hide task-completion controls (they can't complete anything here):
   the lesson "Mark complete" row (and its divider bar) and the self-assessment "I'm done" actions. */
.cp-shared .lesson-complete, .cp-shared .sa-done-actions .primary-btn { display: none; }
/* Coach: "Share a task" picker in the client detail header. */
.share-task { font-size: 13px; }
.share-task > summary { cursor: pointer; color: var(--accent); font-weight: 600; list-style: none; }
.share-task > summary::-webkit-details-marker { display: none; }
.share-task-body { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.share-task-select { max-width: 320px; }
.share-task-hint { font-size: 12px; color: var(--muted); }
.mp-rail-icon { flex: none; width: 18px; text-align: center; }
.mp-cs { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); line-height: 1.5; }
.mp-fork { margin: 10px 0 0; }
.mp-link { border: none; background: none; padding: 0; cursor: pointer; color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; }
.mp-link:hover { text-decoration: underline; }
/* My Path — interview-prep fast-track */
.client-mypath.mp-interview { border-top-color: #c0362c; }
.mp-interview-banner { background: #fbeaea; color: #8a2a22; border: 1px solid #f0c0bb; border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.mp-date { display: flex; flex-direction: column; gap: 4px; margin: 12px 0 4px; max-width: 220px; }
.mp-date > span { font-size: 12px; font-weight: 600; color: var(--muted); }
.mp-date input { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; }
.mp-paused { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); line-height: 1.6; }
.mp-tailored { margin: 0 0 10px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.mpc-startflags { margin: 6px 0 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg, #f7f8fa); }
.mpc-startnote { margin: 6px 0 0; font-size: 12px; line-height: 1.5; }
.mpc-interview { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg, #f7f8fa); font-size: 14px; cursor: pointer; }
.mpc-interview input { margin-top: 3px; }
.mpc-dim { opacity: .55; }
/* My Path — coach editor */
.detail-mypath { padding: 20px 24px; border-top: 1px solid var(--border); }
.detail-mypath h3 { margin: 0 0 6px; }
.mpc-phase { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 14px; max-width: 360px; }
.mpc-phase > span { font-size: 12px; font-weight: 600; color: var(--muted); }
.mpc-steps-head { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 6px; }
.mpc-step { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 14px; cursor: pointer; }
.mpc-step.done > span { color: var(--muted); text-decoration: line-through; }

/* Maintenance flag — small icon to the left of the logo (test accounts only) */
.client-maint-flag { font-size: 20px; line-height: 1; cursor: help; }
.client-maint-flag.hidden { display: none; }
/* Maintenance mode — client-facing notice */
.client-maint { text-align: center; padding: 40px 28px; max-width: 560px; margin: 24px auto; }
.client-maint-icon { font-size: 40px; line-height: 1; margin-bottom: 8px; }
.client-maint h2 { margin: 0 0 10px; font-size: 22px; }
.client-maint p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
/* Maintenance mode — admin editor */
.adm-maint-toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; margin: 4px 0 16px; user-select: none; }
.adm-maint-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.adm-maint-switch { position: relative; flex: none; width: 46px; height: 26px; border-radius: 999px; background: var(--border); transition: background .15s; }
.adm-maint-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.adm-maint-toggle input:checked + .adm-maint-switch { background: var(--danger, #c0362c); }
.adm-maint-toggle input:checked + .adm-maint-switch::after { transform: translateX(20px); }
.adm-maint-toggle input:focus-visible + .adm-maint-switch { outline: 2px solid var(--accent); outline-offset: 2px; }
.adm-maint-state { font-size: 14px; color: var(--text, #1a1a1a); }
.adm-maint-preview { margin: 18px 0 6px; padding: 14px; border: 1px dashed var(--border); border-radius: 12px; background: var(--bg, #f7f8fa); }
.adm-maint-preview-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 8px; }
.adm-maint-preview .client-maint { margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.adm-ex-qs { display: grid; gap: 12px; margin-bottom: 6px; }
.adm-ex-q { border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.adm-ex-q.approved { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.adm-ex-q-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 8px; }
.adm-ex-qn { font-weight: 700; }
.adm-ex-flag { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); cursor: pointer; }
.adm-ex-flag.adm-ex-approve { font-weight: 600; color: var(--accent); }
.adm-ex-q-head .adm-x { margin-left: auto; }
.adm-ex-prompt { width: 100%; resize: vertical; }
.adm-ex-opts { display: grid; gap: 6px; margin: 8px 0; }
.adm-ex-opt { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; }
.adm-ex-opt .adm-ex-correct { width: 17px; height: 17px; }
.adm-ex-q-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.adm-ex-meta { font-size: 12px; color: var(--muted); }
/* Coach "Why?" provenance (question + each answer) and the client-teaching authoring block. */
.adm-ex-optwrap { display: grid; gap: 3px; }
.adm-ex-whywrap { display: flex; align-items: center; gap: 8px; }
.adm-ex-why-btn { flex: none; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font: inherit; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; cursor: pointer; }
.adm-ex-why-btn:hover { border-color: var(--accent); color: var(--accent); }
.adm-ex-why { margin: 1px 0; padding: 8px 11px; background: var(--bg, #f6f7f9); border: 1px solid var(--border); border-radius: 8px; font-size: 12.5px; line-height: 1.5; }
.adm-ex-why-txt { color: var(--text); white-space: pre-wrap; }
.adm-ex-why-load { color: var(--muted); font-size: 12.5px; }
.adm-ex-why-regen { display: inline-block; margin-top: 5px; font-size: 11px; }
.adm-ex-qwhy { display: flex; align-items: flex-start; gap: 8px; margin: 5px 0 2px; }
.adm-ex-qwhy > .adm-ex-why, .adm-ex-qwhy > .adm-ex-whywrap { flex: 1; }
.adm-ex-why-lbl { flex: none; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; padding-top: 5px; }
.adm-ex-teach { margin: 8px 0; padding: 10px 12px; border: 1px dashed var(--border); border-radius: 10px; background: var(--bg, #f6f7f9); }
.adm-ex-teach.approved { border-style: solid; border-color: var(--accent); }
.adm-ex-teach-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.adm-ex-teach-lbl { font-size: 13px; font-weight: 700; color: var(--text); }
.adm-ex-teach-sub { font-weight: 400; color: var(--muted); }
.adm-ex-teach-draft { margin-left: auto; }
.adm-ex-teach-txt { width: 100%; resize: vertical; }
/* Client flags surfaced in the exam editor + the Flags tab. */
.adm-ex-flagbadge { border: 1px solid var(--border); background: var(--surface); color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; cursor: pointer; }
.adm-ex-flagbadge.has-open { border-color: #c0362c; background: rgba(192,54,44,.14); color: #c0362c; }
.adm-ex-q.flagged { box-shadow: inset 3px 0 0 #c0362c; }
.adm-ex-flags { display: grid; gap: 8px; margin: 8px 0; }
.qrf-row { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--bg, #f6f7f9); }
.qrf-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.qrf-reason { font-weight: 700; font-size: 13px; color: var(--text); }
.qrf-by { font-size: 12px; color: var(--muted); margin-left: auto; }
.qrf-note { margin: 6px 0; font-size: 13px; font-style: italic; color: var(--text); }
.qrf-ans { font-size: 12.5px; color: var(--muted); margin: 4px 0; }
.qrf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.qrf-cnote { flex: 1; min-width: 180px; }
.adm-flag-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.adm-flag-statustabs { display: flex; gap: 6px; }
.adm-flag-list { display: grid; gap: 12px; }
.adm-flag-item { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.adm-flag-q { font-weight: 600; font-size: 14px; color: var(--text); line-height: 1.4; }
.adm-flag-meta { font-size: 12px; color: var(--muted); margin: 2px 0 8px; }
.adm-flag-jump { margin-top: 8px; }

/* Client-cards editor rows add a "Board column" selector between the name and the Show toggle. */
.adm-cc-list .adm-kpi-row { grid-template-columns: auto 1fr auto auto; }
.adm-cc-col { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.adm-cc-col select { padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); font: inherit; font-size: 13px; color: var(--text); }
@media (max-width: 620px) {
  .adm-cc-list .adm-kpi-row { grid-template-columns: auto 1fr; }
  .adm-cc-list .adm-cc-col, .adm-cc-list .adm-kpi-show { grid-column: 2; justify-content: flex-start; }
}
.adm-save-bar { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); position: sticky; bottom: 0; background: var(--surface); }
.adm-intake-list { display: grid; gap: 8px; }
.adm-intake-row { display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 10px; align-items: center; border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.air-audience { gap: 6px; }
.air-audience select { font-size: 12px; padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px; font-family: inherit; background: var(--surface); color: var(--text); }
.adm-intake-row.disabled { opacity: 0.55; background: #fafbfc; }
.air-reorder { display: flex; flex-direction: column; gap: 2px; }
.air-main { min-width: 0; }
.air-main .adm-input { width: 100%; }
.air-label { font-weight: 600; }
.air-label.dynamic small { color: var(--muted); font-weight: 400; }
.air-id { font-size: 11px; color: var(--muted); margin-top: 3px; font-family: ui-monospace, monospace; }
.air-lock { font-family: inherit; color: var(--amber); font-weight: 600; }
.air-type {
  font-family: inherit; font-size: 10px; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); padding: 1px 7px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .3px; vertical-align: middle;
}
.air-toggle { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; white-space: nowrap; }
@media (max-width: 560px) {
  .adm-intake-row { grid-template-columns: auto 1fr; }
  .cck-metrics-edit { grid-template-columns: 1fr 1fr; }
  .scap-metrics { grid-template-columns: 1fr 1fr; }
}

/* ===== Finances panel (private banking-statement analysis) ===== */
.fin-private { font-size: 11px; font-weight: 600; color: var(--muted); background: var(--bg, #f1f2f4); padding: 3px 9px; border-radius: 999px; margin-left: 8px; vertical-align: middle; }
.fin-body { padding-bottom: 40px; }
.link-btn { background: none; border: none; color: var(--accent); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
.fin-upload { margin: 8px 0 18px; }
.fin-upload-controls { display: flex; gap: 8px; margin-bottom: 8px; }
.fin-upload-controls .adm-input { flex: 0 0 auto; }
.fin-drop { border: 2px dashed var(--border); border-radius: 12px; padding: 26px 16px; text-align: center; color: var(--muted); background: var(--bg, #fafafb); transition: border-color .15s, background .15s; }
.li-export { margin-top: 10px; text-align: right; }
.fin-drop.dragover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.fin-parsing { color: var(--accent); font-weight: 600; }
.fin-error { color: var(--red); font-size: 13px; margin: 6px 0 0; }
.fin-totals { display: flex; gap: 12px; flex-wrap: wrap; margin: 4px 0 18px; }
.fin-total { flex: 1 1 180px; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface); text-align: center; }
.fin-total .num { display: block; font-size: 24px; font-weight: 800; color: var(--text); }
.fin-total .lbl { font-size: 12px; color: var(--muted); }
.fin-h { margin: 20px 0 8px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.fin-count { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--bg, #f1f2f4); padding: 1px 8px; border-radius: 999px; }
.fin-recs { display: grid; gap: 8px; }
.fin-rec { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--border); border-left: 3px solid var(--amber); border-radius: 10px; padding: 9px 12px; font-size: 13px; background: var(--surface); }
.fin-rec-stopped { border-left-color: var(--red); }
.fin-rec-increase { border-left-color: var(--red); }
.fin-rec-body { line-height: 1.45; }
.fin-rec-save { color: #137a47; font-weight: 700; white-space: nowrap; }
.fin-empty, .fin-empty-sm { color: var(--muted); font-size: 14px; }
.fin-svc-list { display: grid; gap: 6px; }
.fin-svc { display: grid; grid-template-columns: 1fr 110px 134px 120px auto; gap: 10px; align-items: center; border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.fin-svc-cancelled, .fin-svc-ignored { opacity: 0.55; }
.fin-svc-dispute { border-left: 3px solid var(--red); }
.fin-svc-name { display: flex; flex-direction: column; min-width: 0; font-weight: 600; }
.fin-svc-name small { color: var(--muted); font-weight: 400; font-size: 11px; }
.fin-svc-amt { font-weight: 700; white-space: nowrap; }
.fin-svc-amt small { color: var(--muted); font-weight: 400; }
.fin-svc-mo { font-weight: 800; font-size: 15px; text-align: right; white-space: nowrap; }
.fin-svc-mo small { font-weight: 500; font-size: 11px; color: var(--muted); }
.fin-totals-head { font-size: 12px; font-weight: 700; color: var(--muted); margin: 6px 0 4px; text-transform: uppercase; letter-spacing: .03em; }
.fin-manage { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.fin-manage > summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--muted); }
.fin-status { padding: 5px 8px; font-size: 12px; }
.fin-cadence { padding: 5px 8px; font-size: 12px; }
.fin-cad-warn { display: inline-block; font-size: 10px; font-weight: 700; color: #92600a; background: #fef3c7; border: 1px solid #fde68a; border-radius: 6px; padding: 1px 6px; margin-left: 4px; vertical-align: middle; cursor: help; }
.fin-svc-annual { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.fin-ignored { margin-top: 10px; }
.fin-ignored summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.fin-svc-ign { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 4px; font-size: 13px; color: var(--muted); }
.fin-stmt-list { display: grid; gap: 4px; }
.fin-stmt { display: grid; grid-template-columns: 150px 1fr auto auto; gap: 10px; align-items: center; padding: 7px 4px; font-size: 13px; border-bottom: 1px solid var(--border); }
.fin-stmt-acct { font-weight: 600; }
.fin-stmt-file { color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-stmt-meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.fin-stmt-del { color: var(--red) !important; }
.fin-stmt-note { margin: 2px 0 6px; font-size: 12px; color: var(--amber); }

/* Finances Phase 2: renewal button + inline transaction editor */
.fin-svc-extra { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.fin-remind { white-space: nowrap; }
.fin-tx { margin: 2px 0 10px; }
.fin-tx > summary { cursor: pointer; font-size: 12px; color: var(--accent); margin: 2px 0 6px; }
.fin-tx-list { display: grid; gap: 4px; }
.fin-tx-row { display: grid; grid-template-columns: 110px 1fr 100px auto; gap: 6px; align-items: center; }
.fin-tx-row .adm-input { padding: 5px 8px; font-size: 12px; }
.fin-tx-amt { text-align: right; }
.fin-tx-btns { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.fin-tx-del { color: var(--red) !important; }
.fin-tx-delall { color: var(--red) !important; font-size: 11px; }
.fin-tx-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.fin-tx-hint { font-size: 11px; color: var(--muted); }

/* Finances: merchant rename (alias) UI */
.fin-rename { color: var(--muted) !important; }
.fin-aliased { color: var(--accent); font-size: 11px; }
.fin-svc-rename { display: grid; grid-template-columns: 1fr 160px auto auto; gap: 8px; align-items: center; border: 1px dashed var(--accent); border-radius: 10px; padding: 8px 12px; }
.fin-svc-rename .adm-input { padding: 6px 9px; font-size: 13px; }
.fin-aliases { margin: 10px 0 4px; }
.fin-aliases > summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.fin-alias-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 2px; font-size: 13px; }
.fin-alias-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.fin-alias-add .adm-input { flex: 1 1 160px; padding: 6px 9px; font-size: 13px; }

/* Finances: multi-upload account controls */
.fin-fallback-lbl { font-size: 12px; color: var(--muted); }
.fin-upload-controls { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.fin-stmt { grid-template-columns: 180px 1fr auto auto; }
.fin-stmt-acct-sel { padding: 4px 8px; font-size: 12px; }

/* Finances: deposits-cleanup banner */
.fin-deposit-note { background: var(--amber-soft); color: #8a5a00; border: 1px solid #f0dcae; border-radius: 10px; padding: 8px 12px; margin: 4px 0 14px; font-size: 13px; }
.fin-deposit-note .text-btn { font-weight: 700; }

/* Finances: danger zone (clear all) */
.fin-danger { margin-top: 16px; padding: 12px; border: 1px solid #f0c4c0; border-radius: 10px; background: #fdeceb; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fin-danger-title { font-size: 12px; font-weight: 700; color: #b3271d; }
.fin-danger-btn { background: var(--red); color: #fff; border: none; border-radius: 8px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.fin-danger-btn:hover { filter: brightness(0.94); }
.fin-clear-merch { color: #b3271d !important; }

.fin-reparse-note { font-size: 13px; color: var(--muted); margin: 6px 0 10px; }
.fin-reparse-note .text-btn { font-weight: 600; }

/* Finances: expandable merchant → its transactions (date, account, amount, statement) */
.fin-merch { display: block; }
.fin-expand { background: none; border: none; cursor: pointer; font: inherit; text-align: left; padding: 0; margin: 0; display: flex; align-items: center; gap: 6px; min-width: 0; }
.fin-chevron { color: var(--muted); font-size: 11px; line-height: 1; transition: transform .15s ease; flex: none; }
.fin-merch.is-open .fin-chevron { transform: rotate(90deg); }
.fin-svc-nm { display: flex; flex-direction: column; min-width: 0; font-weight: 600; line-height: 1.25; }
.fin-svc-nm small { color: var(--muted); font-weight: 400; font-size: 11px; }
.fin-merch-tx { margin: 4px 0 8px 24px; border-left: 2px solid var(--border); padding-left: 10px; display: grid; gap: 3px; }
.fin-mtx { display: grid; grid-template-columns: 92px auto 90px 1fr; gap: 10px; align-items: center; font-size: 12px; }
.fin-mtx-date { color: var(--muted); white-space: nowrap; }
.fin-mtx-amt { font-weight: 700; text-align: right; white-space: nowrap; }
.fin-mtx-stmt { color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.fin-mtx-stmt.muted { color: var(--muted); }
.fin-acct-badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; white-space: nowrap; justify-self: start; }
.fin-acct-badge.acct-chequing_cad { background: #e7f0ff; color: #1c4fb3; }
.fin-acct-badge.acct-chequing_usd { background: #e3f3ec; color: #137a47; }
.fin-acct-badge.acct-visa_brian { background: #efe7fb; color: #6b3fb0; }
.fin-acct-badge.acct-visa_brian_usd { background: #fdeede; color: #9a5a00; }
.fin-acct-badge.acct-visa_german { background: #fde9ef; color: #b3275a; }

/* Finances: bulk-tag merchants by keyword */
.fin-bulk { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg, #fafafb); font-size: 13px; }
.fin-bulk-lbl { color: var(--muted); }
.fin-bulk-kw { flex: 0 1 160px; padding: 5px 9px; font-size: 13px; }
.fin-bulk #fin-bulk-status { padding: 5px 8px; font-size: 13px; }
.fin-bulk #fin-bulk-apply { font-weight: 700; }

/* Finances: USD-switch (FX) panel */
.fin-usd { margin: 4px 0 14px; border: 1px solid #f0dcae; border-radius: 10px; background: #fdf6e6; padding: 8px 12px; }
.fin-usd > summary { cursor: pointer; font-size: 13px; font-weight: 700; color: #8a5a00; }
.fin-usd-hint { font-size: 12px; color: var(--muted); margin: 6px 0 8px; }
.fin-usd-list { display: grid; gap: 4px; }
.fin-usd-row { display: grid; grid-template-columns: 1fr 122px 34px 96px 112px 104px; gap: 10px; align-items: center; font-size: 13px; padding: 4px 0; border-top: 1px solid #f0e3c2; }
.fin-usd-name { font-weight: 600; min-width: 0; }
.fin-usd-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.fin-usd-card { justify-self: start; }
.fin-usd-count { color: var(--muted); font-size: 12px; text-align: right; white-space: nowrap; }
.fin-usd-name small { font-weight: 400; font-size: 11px; color: var(--muted); }
.fin-usd-usd, .fin-usd-cad, .fin-usd-fx { text-align: right; white-space: nowrap; font-weight: 700; }
.fin-usd-usd small, .fin-usd-cad small, .fin-usd-fx small { font-weight: 400; font-size: 10px; color: var(--muted); }
.fin-usd-fx { color: #b3530a; }
.fin-mtx-fx { font-weight: 400; font-size: 10px; color: #b3530a; }

/* ===== LinkedIn content analytics panel ===== */
.linkedin-panel { width: min(1100px, 100%); }
.li-body { padding-bottom: 40px; }
.li-stats { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 14px; }
.li-stat { flex: 1 1 130px; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--surface); text-align: center; }
.li-stat .num { display: block; font-size: 22px; font-weight: 800; color: var(--text); }
.li-stat .lbl { font-size: 11px; color: var(--muted); }
.li-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.li-filters .li-q { flex: 1 1 240px; }
.li-filters .adm-input { padding: 6px 9px; font-size: 13px; }
.li-date-f { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.li-date-f input { padding: 4px 6px; }
.li-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.li-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.li-table thead th { position: sticky; top: 0; background: var(--bg, #f4f5f7); text-align: left; padding: 8px 10px; font-weight: 700; color: var(--muted); white-space: nowrap; border-bottom: 1px solid var(--border); }
.li-th-sort { cursor: pointer; user-select: none; }
.li-th-sort:hover { color: var(--accent); }
.li-table td { padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.li-table .li-n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.li-date { white-space: nowrap; color: var(--muted); }
.li-type { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--bg, #eef0f3); color: var(--muted); white-space: nowrap; }
.li-type-poll { background: #efe7fb; color: #6b3fb0; }
.li-type-image { background: #e7f0ff; color: #1c4fb3; }
.li-type-video { background: #fde9ef; color: #b3275a; }
.li-type-article { background: #e3f3ec; color: #137a47; }
.li-type-text { background: #fdeede; color: #9a5a00; }
.li-auth { white-space: nowrap; font-weight: 600; }
.li-auth.bird { color: #6b3fb0; }
.li-auth.brian { color: var(--muted); }
.li-text { width: 36%; }
.li-text-btn { background: none; border: none; padding: 0; font: inherit; text-align: left; color: var(--text); cursor: pointer; line-height: 1.4; }
.li-text-btn:hover { color: var(--accent); }
.li-detail-row td { background: var(--bg, #fafafb); }
.li-detail-text { white-space: pre-wrap; font-size: 13px; line-height: 1.5; max-height: 320px; overflow: auto; }
.li-detail-meta { margin-top: 8px; font-size: 11px; color: var(--muted); }
.li-pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 12px; font-size: 13px; color: var(--muted); }

/* LinkedIn: Ask-AI */
.li-ai { border: 1px solid #cdd7f0; background: #f3f6ff; border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; }
.li-ai-row { display: flex; gap: 8px; align-items: center; }
.li-ai-q { flex: 1 1 auto; }
.li-ai-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.li-ai-chip { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px 11px; cursor: pointer; font: inherit; font-size: 12px; color: var(--accent); }
.li-ai-chip:hover:not([disabled]) { border-color: var(--accent); }
.li-ai-chip[disabled] { opacity: .5; cursor: default; }
.li-ai-answer { margin-top: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-size: 14px; line-height: 1.55; max-height: 460px; overflow: auto; }
.li-ai-answer p { margin: 0 0 8px; }
.li-ai-answer ul, .li-ai-answer ol { margin: 4px 0 8px; padding-left: 20px; }
.li-ai-note { margin: 8px 0 0; font-size: 11px; color: var(--muted); }

/* LinkedIn panel header: cost pill beside the close button; popup right-aligned so it doesn't overflow */
.li-head-right { display: inline-flex; align-items: center; gap: 12px; }
.li-head-right .cost-pop { left: auto; right: 0; }

/* LinkedIn AI: saved Q&A history */
.li-ai-saved-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 6px 10px; margin: 10px 0 0; }
.li-ai-hist { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 10px; }
.li-ai-hist-head { font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.li-ai-hist-item { display: flex; align-items: center; gap: 6px; }
.li-ai-hist-item + .li-ai-hist-item { margin-top: 3px; }
.li-ai-hist-q { flex: 1 1 auto; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 13px; color: var(--accent); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-ai-hist-q:hover { border-color: var(--accent); background: #f6f9ff; }
.li-ai-hist-del { flex: 0 0 auto; width: 26px; height: 26px; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; }
.li-ai-hist-del:hover { border-color: var(--red); color: var(--red); }

/* LinkedIn AI: similar-question nudge + history search */
.li-ai-simhint:not(:empty) { font-size: 12px; color: #92600a; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 6px 10px; margin-top: 8px; }
.li-ai-simhint .li-text-btn { font-weight: 600; }
.li-ai-sim-meta { color: var(--muted); }
.li-ai-hist-search { width: 100%; margin-bottom: 6px; font-size: 13px; }
.li-ai-hist-empty { font-size: 12px; color: var(--muted); padding: 4px 2px; }

/* LinkedIn table: total-engagement column (the AI's default ranking metric) */
.li-eng-col { font-weight: 600; }

/* Finances: FX "original price" hint in a merchant subtitle */
.fin-orig { color: var(--muted); cursor: help; }

/* ===== Missed installments (failed Stripe charges) ===== */
/* Coach: red "Payment failed" pill next to the client name (mirrors the green cost pill) */
.pay-fail-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--red); background: var(--red-soft); border: 1px solid var(--red); border-radius: 999px; padding: 3px 10px; cursor: pointer; line-height: 1.4; white-space: nowrap; }
.pay-fail-pill:hover { filter: brightness(0.98); }
/* Coach: alert-colored tab — red text when inactive, white-on-red when selected (mirrors .has-breach) */
#tab-missed.has-alert { color: var(--red); font-weight: 700; }
#tab-missed.has-alert.active { color: #fff; background: var(--red); }
/* Coach: Missed installments view */
.mi-view .mi-group { margin-top: 14px; }
.mi-group-h { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin: 0 0 6px; }
.mi-row { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1.6fr) auto; gap: 12px; align-items: center; border: 1px solid var(--border); border-left: 3px solid var(--red); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; background: var(--surface); }
.mi-row.is-resolved { border-left-color: var(--green); opacity: .7; }
.mi-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mi-client { text-align: left; background: none; border: none; padding: 0; font: inherit; font-weight: 700; color: var(--accent); cursor: pointer; }
.mi-client:hover { text-decoration: underline; }
.mi-meta { font-size: 12px; color: var(--muted); }
.mi-note { resize: vertical; min-height: 34px; font-size: 13px; }
.mi-actions { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.mi-resolved-tag { font-size: 12px; color: var(--green); font-weight: 600; }
.mi-del { color: var(--muted); }
.mi-del:hover { color: var(--red); }
@media (max-width: 640px) { .mi-row { grid-template-columns: 1fr; } }
/* Client: "Installment Failed" alert card (red-accented) */
.client-installment-alert { border: 1px solid var(--red); border-left: 4px solid var(--red); background: var(--red-soft); }
.client-installment-alert .imp-card-title { color: var(--red); }
.ia-sum { color: var(--red); font-weight: 700; }
.ia-msg { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.ia-more { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--red); }
.ia-help { margin: 0; font-size: 13px; color: var(--muted); }

/* ===== Group chat (client ↔ human coaches) ===== */
.gc-thread { display: flex; flex-direction: column; gap: 4px; max-height: 340px; overflow-y: auto; padding: 8px 2px; }
.gc-coach-thread { max-height: 300px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; background: var(--bg, #fafafa); }
.gc-empty { font-size: 13px; color: var(--muted); padding: 12px 6px; text-align: center; }
.gc-row { display: flex; }
.gc-row.out { justify-content: flex-end; }
.gc-row.in { justify-content: flex-start; }
.gc-row > div { max-width: 78%; }
.gc-who { font-size: 11px; font-weight: 700; color: var(--accent); margin: 2px 4px 1px; }
.gc-bubble { font-size: 14px; line-height: 1.45; padding: 7px 11px; border-radius: 14px; word-wrap: break-word; }
.gc-row.in .gc-bubble { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.gc-row.out .gc-bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.gc-row.out .gc-bubble a { color: #fff; text-decoration: underline; }
.gc-time { font-size: 10px; color: var(--muted); margin: 1px 6px 0; text-align: right; }
.gc-row.in .gc-time { text-align: left; }
/* Deleted-message tombstone (coach + client) */
.gc-deleted, .msg-deleted-bubble { font-style: italic; color: var(--muted) !important; background: var(--bg) !important; border: 1px dashed var(--border) !important; }
/* Coach-only delete control on a group-chat bubble — hover to reveal */
.gc-row > div, .mim-row > div { position: relative; }
.gc-del { position: absolute; top: 0; border: none; background: var(--surface); box-shadow: var(--shadow); border-radius: 50%; width: 24px; height: 24px; font-size: 12px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .12s; padding: 0; }
.gc-row.out > div .gc-del, .mim-row.out > div .gc-del { left: -30px; }
.gc-row.in > div .gc-del, .mim-row.in > div .gc-del { right: -30px; }
.gc-row:hover .gc-del, .mim-row:hover .gc-del { opacity: .85; }
.gc-del:hover { opacity: 1 !important; background: var(--red-soft); }
/* Inline media preview in the attach tray (before sending) */
.attach-chip-media { flex-direction: column; align-items: stretch; border-radius: 12px; padding: 6px 8px; gap: 4px; position: relative; }
.attach-chip-media .attach-chip-x { position: absolute; top: 2px; right: 4px; }
.attach-chip-audio { width: 220px; max-width: 100%; height: 34px; }
.attach-chip-video { width: 200px; max-width: 100%; max-height: 150px; border-radius: 8px; background: #000; }
.attach-chip-thumb { width: 100%; max-width: 200px; max-height: 150px; object-fit: cover; border-radius: 8px; }
.gc-input-area { display: flex; align-items: flex-end; gap: 8px; margin-top: 8px; }
.gc-input, .tgc-input { flex: 1; resize: none; min-height: 38px; max-height: 120px; border: 1px solid var(--border); border-radius: 18px; padding: 9px 14px; font: inherit; font-size: 14px; }
.gc-send { flex: none; width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--accent); color: #fff; font-size: 16px; cursor: pointer; }
.gc-send:hover { filter: brightness(1.05); }
.gc-inactive { font-size: 12px; font-weight: 400; color: var(--muted); }
.detail-groupchat .gc-input-area { margin-top: 10px; }
/* Client team-chat card accent */
.client-team-chat .imp-card-title { color: var(--accent); }
.tgc-sum { color: var(--muted); }
.client-team-chat .gc-thread { background: var(--bg, #fafafa); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }

/* Messages inbox: conversation-type chip (Brian AI vs Group) */
.mim-convo-type { display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 6px; vertical-align: middle; }
.mim-convo-type.group { background: var(--accent-soft, #e8eefc); color: var(--accent); }
.mim-convo-type.ai { background: var(--green-soft); color: var(--green); }
.mim-thread-name .mim-convo-type { font-size: 11px; }

/* ── Leads · SMS outreach ── */
.leads-wrap { padding: 4px 2px 40px; }
.leads-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.leads-head h2 { margin: 0; }
.leads-warn { font-size: 12px; color: #8a5a12; background: #fff6e6; border: 1px solid #e6c98a; border-radius: 8px; padding: 4px 10px; }
.leads-panel { border: 1px solid var(--border); border-radius: 12px; padding: 0 14px; margin-bottom: 12px; background: var(--surface); }
.leads-panel summary { cursor: pointer; font-weight: 700; padding: 12px 0; }
.leads-panel[open] summary { border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.leads-panel textarea, #leads-campaign-body { width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 10px; padding: 10px; font: inherit; resize: vertical; }
.leads-help { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.leads-import-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 10px 0 14px; }
.leads-import-row label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.leads-import-row input[type=text], .leads-import-row select, .leads-filters select, .leads-filters input { border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font: inherit; }
.leads-send-btn { background: #1f6f54; }
.leads-send-btn:disabled { opacity: .5; cursor: not-allowed; }
.leads-filters { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 6px 0 12px; }
.leads-filters label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.leads-filters #leads-search { min-width: 220px; }
.leads-count { font-size: 12px; color: var(--muted); margin-left: auto; }
.leads-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
table.leads-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.leads-table th { text-align: left; padding: 9px 10px; background: var(--bg, #f6f7f9); color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.leads-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.lead-row.stopped { opacity: .6; }
.lead-row td select { border: 1px solid var(--border); border-radius: 7px; padding: 3px 6px; font: inherit; font-size: 12px; }
.lead-tag { display: inline-block; background: #eef0f3; border-radius: 999px; padding: 1px 8px; font-size: 11px; margin: 1px 2px 1px 0; }
.lead-stop-badge { background: #fdeaea; color: #c0392b; border-radius: 6px; padding: 1px 7px; font-size: 11px; font-weight: 800; }
.lead-ok-badge { color: #1f6f54; font-size: 12px; font-weight: 700; }
.lead-badphone { color: #c0392b; }
.lead-actions { white-space: nowrap; }
.lead-actions button { border: 1px solid var(--border); background: var(--surface); border-radius: 8px; cursor: pointer; padding: 4px 8px; font-size: 14px; margin-left: 3px; }
.lead-actions button:hover { background: var(--bg, #eef0f3); }
.leads-empty { text-align: center; color: var(--muted); padding: 20px; }
/* Per-lead SMS thread modal */
.leads-thread-ov { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: grid; place-items: center; z-index: 1200; }
.leads-thread { width: 420px; max-width: calc(100vw - 24px); height: 70vh; max-height: 600px; background: var(--surface); border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.lt-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; background: #1f6f54; color: #fff; }
.lt-name { font-weight: 800; }
.lt-sub { font-size: 12px; opacity: .9; }
.lt-close { background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; line-height: 1; }
.lt-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.lt-row { display: flex; flex-direction: column; max-width: 80%; }
.lt-row.out { align-self: flex-end; align-items: flex-end; }
.lt-row.in { align-self: flex-start; align-items: flex-start; }
.lt-bubble { padding: 8px 12px; border-radius: 14px; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.lt-row.out .lt-bubble { background: #1f6f54; color: #fff; border-bottom-right-radius: 4px; }
.lt-row.in .lt-bubble { background: var(--bg, #eef0f3); border-bottom-left-radius: 4px; }
.lt-time { font-size: 10px; color: var(--muted); margin-top: 2px; }
.lt-empty { text-align: center; color: var(--muted); margin: auto; }
.lt-foot { display: flex; align-items: flex-end; gap: 8px; padding: 10px; border-top: 1px solid var(--border); }
.lt-foot textarea { flex: 1; border: 1px solid var(--border); border-radius: 18px; padding: 9px 14px; font: inherit; resize: none; max-height: 120px; }
.lt-send { width: 40px; height: 40px; flex: none; border: none; border-radius: 50%; background: #1f6f54; color: #fff; cursor: pointer; font-size: 16px; }
.lt-stopped { padding: 14px; text-align: center; color: #c0392b; font-size: 13px; border-top: 1px solid var(--border); }

/* Leads import file button + tier cell */
.leads-file-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent); border-radius: 8px; padding: 7px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.leads-file-btn:hover { background: var(--accent); color: #fff; }
.lead-tier select { border-radius: 7px; padding: 3px 6px; font: inherit; font-size: 12px; border: 1px solid var(--border); }
.lead-tier.t-high_ticket select { background: #f3e8c0; border-color: #d8b95e; color: #6b5311; font-weight: 700; }
.lead-tier.t-low_ticket select { background: #e6eefb; border-color: #9ec0f0; color: #234e8a; }

/* Leads suppression (opt-out) panel */
.leads-suppress > summary { color: #b42318; }
.leads-suppress textarea { width: 100%; box-sizing: border-box; }

/* Coach My Path — acquisition path badge next to a task name */
/* Fixed-width column that holds the path pill(s), pushed to the right and right-aligned so the
   different-width pills (Interview Sniper vs Job Switching Challenge) share a right edge. */
.mpc-path-col { margin-left: auto; flex: 0 0 auto; min-width: 160px; text-align: right; }
/* "client view-only" / "coach only" stays the last (rightmost) column. */
.mpc-vis-col { flex: 0 0 auto; min-width: 116px; text-align: right; text-decoration: none; }
.mpc-step.done > .mpc-path-col, .mpc-step.done > .mpc-vis-col { text-decoration: none; }
.mpc-path { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; vertical-align: middle; border: 1px solid var(--border); color: var(--text-muted); white-space: nowrap; text-decoration: none; }
.mpc-path.p-sniper { background: #eef2ff; border-color: #c7d2fe; color: #3730a3; }
.mpc-path.p-challenge { background: #fef3c7; border-color: #fcd34d; color: #92400e; }
.mpc-path.p-challenge_replay { background: #fdf2f8; border-color: #fbcfe8; color: #9d174d; }
.mpc-path.mpc-emp { background: #eef7f0; border-color: #bbe5c8; color: #166b3a; }

/* Photo upload controls (client modal menu item + team editor upload buttons) */
.nc-photo-preview.nc-photo-uploading { opacity: .5; pointer-events: none; }
.adm-photo-row { display: flex; gap: 8px; align-items: center; }
.adm-photo-row .adm-input { flex: 1; }
.adm-photo-upload { flex: 0 0 auto; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent);
  border-radius: 8px; padding: 7px 12px; font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; }
.adm-photo-upload:hover:not(:disabled) { background: var(--accent); color: #fff; }
.adm-photo-upload:disabled { opacity: .6; cursor: default; }

/* Coach My Path — payment/financing "how it was done" override dropdown */
.mpc-fin { margin-left: 8px; font-size: 12px; padding: 2px 4px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--muted); cursor: pointer; vertical-align: middle; }
.mpc-fin:hover { border-color: var(--accent); color: var(--text); }

/* Admin My Path — collapse/expand phases */
.adm-jp-collapse { border: none; background: none; cursor: pointer; font-size: 14px; color: var(--muted); padding: 2px 6px; line-height: 1; flex: none; }
.adm-jp-collapse:hover { color: var(--text); }
.adm-jp-count { font-size: 12px; color: var(--muted); white-space: nowrap; margin-left: 2px; }
.adm-jp-bulk { display: flex; gap: 14px; margin: 2px 0 12px; }
.adm-jp-phase.collapsed { padding-bottom: 12px; }

/* Admin My Path — per-card phase-range gates */
.adm-cardgates .adm-hint { margin: 4px 0 12px; }
.adm-cardgate { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 9px 0; border-top: 1px solid var(--border); }
.adm-cardgate-name { font-weight: 600; flex: 1 1 160px; min-width: 140px; }
.adm-cardgate-range { display: flex; gap: 10px; flex: none; }
.adm-cardgate-lab { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; color: var(--muted); }
.adm-cardgate-lab select { min-width: 132px; }

/* Chat: voice-note / video record buttons + recorder modal + inline players */
.msg-rec-btn { border: none; background: none; cursor: pointer; font-size: 18px; line-height: 1; padding: 4px; border-radius: 8px; flex: none; }
.msg-rec-btn:hover { background: var(--bg, #f1f2f4); }
.rec-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(16,24,40,.55); display: grid; place-items: center; }
.rec-modal { background: var(--surface); border-radius: 16px; padding: 20px; width: min(92vw, 420px); box-shadow: 0 20px 60px rgba(0,0,0,.35); text-align: center; }
.rec-title { font-weight: 700; font-size: 16px; margin-bottom: 12px; }
.rec-preview { width: 100%; border-radius: 12px; background: #000; aspect-ratio: 4 / 3; object-fit: cover; }
.rec-mic { font-size: 52px; padding: 20px 0; position: relative; }
.rec-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #e5484d; margin-right: 8px; vertical-align: middle; animation: recpulse 1s infinite; }
@keyframes recpulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.rec-timer { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 18px; margin: 12px 0; }
.rec-timer .rec-max { color: var(--muted); font-weight: 500; font-size: 14px; }
.rec-actions { display: flex; gap: 10px; justify-content: center; }
.msg-attach.audio { width: 240px; max-width: 100%; height: 40px; display: block; margin-top: 4px; }
.msg-attach.video { width: 260px; max-width: 100%; border-radius: 10px; display: block; margin-top: 4px; background: #000; }

/* WhatsApp-style + attach menu in chat composers */
.composer-plus { position: relative; flex: none; align-self: flex-end; }
.composer-plus-btn { border: none; background: var(--bg, #eef0f3); color: var(--muted); width: 34px; height: 34px; border-radius: 50%; font-size: 24px; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: background .12s, transform .12s, color .12s; }
.composer-plus-btn:hover { background: var(--border); color: var(--text); }
.composer-plus.open .composer-plus-btn { transform: rotate(45deg); color: var(--text); }
.composer-plus-menu { position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 30; min-width: 176px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 30px rgba(16,24,40,.18); padding: 6px; display: none; }
.composer-plus.open .composer-plus-menu { display: block; }
.cpm-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: none; background: none; padding: 9px 10px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 14px; color: var(--text); }
.cpm-item:hover { background: var(--bg, #f1f2f4); }
.cpm-ic { font-size: 17px; width: 20px; text-align: center; }
/* Recorder review players */
.rec-review { width: 100%; border-radius: 12px; background: #000; aspect-ratio: 4 / 3; }
.rec-review-audio { width: 100%; margin: 10px 0; }

/* Theme (light/dark/system) segmented toggle — lives in the account menus */
.cam-theme { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; font-size: 13px; color: var(--muted); }
.theme-toggle { display: inline-flex; gap: 2px; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.theme-toggle button { border: none; background: none; cursor: pointer; border-radius: 999px; padding: 4px 9px; font-size: 14px; line-height: 1; color: var(--muted); }
.theme-toggle button:hover { color: var(--text); }
:root[data-theme="light"] .theme-toggle button[data-theme-set="light"],
:root[data-theme="dark"] .theme-toggle button[data-theme-set="dark"],
:root[data-theme="system"] .theme-toggle button[data-theme-set="system"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ── Admin → Spend (cloud/API cost overview) ── */
.spend-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 4px 0 16px; }
.spend-tile { border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; background: var(--surface); }
.spend-tile-lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.spend-tile-amt { font-size: 28px; font-weight: 750; margin: 4px 0 8px; }
.spend-tile-split { display: flex; flex-wrap: wrap; gap: 6px; }
.spend-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--bg, #f6f7f9); border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; }
.spend-chip-ic { font-size: 13px; }

.spend-table { width: 100%; border-collapse: collapse; margin: 4px 0 18px; font-size: 14px; }
.spend-table th, .spend-table td { text-align: right; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.spend-table th:first-child, .spend-table td:first-child { text-align: left; }
.spend-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.spend-svc { font-weight: 600; }
.spend-detail { text-align: left !important; color: var(--muted); font-size: 12.5px; white-space: normal; }
.spend-detail-note { opacity: .7; }
.spend-total-row td { font-weight: 750; border-top: 2px solid var(--border); border-bottom: 0; }

.spend-charts { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 12px; }
@media (max-width: 720px) { .spend-charts { grid-template-columns: 1fr; } .spend-tiles { grid-template-columns: 1fr; } }
.spend-chart { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; background: var(--surface); }
.spend-chart-head { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 10px; }
.spend-bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; }
.spend-col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 0; height: 100%; }
.spend-track { width: 100%; max-width: 22px; height: 100%; display: flex; align-items: flex-end; }
.spend-fill { width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 0; transition: height .2s ease; }
.spend-col.is-today .spend-fill { background: #29508a; }
.spend-col-lbl { font-size: 10px; color: var(--muted); margin-top: 4px; height: 12px; line-height: 12px; }
.spend-note { margin-top: 6px; }

/* ── Legal footer (login screen + client portal): Privacy · Terms · Accessibility ── */
.legal-footer { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; padding: 18px 12px 24px; font-size: 12.5px; color: var(--muted); }
.legal-footer a { color: var(--muted); text-decoration: none; }
.legal-footer a:hover { color: var(--text); text-decoration: underline; }
.legal-footer span { opacity: .5; }
/* The client-portal legal footer is hidden — logged-in clients reach Privacy/Terms/Accessibility from the
   account menu instead (the footer sat under every screen and was an easy mis-tap on mobile). The login
   screen keeps its own .legal-footer (that one has no .client-legal class). */
.client-legal { display: none; }
/* On the login screen the card is grid-centered; pin the footer to the very bottom instead of letting
   it float just under the card. (login-screen is position:fixed inset:0, so it's the positioning box.) */
.login-screen .legal-footer { position: absolute; left: 0; right: 0; bottom: 0; }
/* Lockout / setup screens ("Your portal is being set up", "Your access is paused"): make the app a full-
   height column so the footer links sit at the very bottom, and centre the message in the space above. */
#client-app.cp-locked { display: flex; flex-direction: column; min-height: 100vh; }
#client-app.cp-locked .client-main { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; }
#client-app.cp-locked .client-empty { text-align: center; }

.adm-maint-sep { border: 0; border-top: 1px solid var(--border); margin: 22px 0 4px; }

/* ── Admin → Legal (Privacy / Terms / Accessibility editor) ── */
.adm-legal-subtabs { display: flex; gap: 6px; margin: 8px 0 16px; flex-wrap: wrap; }
.adm-legal-subtab { padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.adm-legal-subtab:hover { color: var(--text); }
.adm-legal-subtab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.adm-legal-body { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.55; resize: vertical; }

/* ── Client Assets hub (top-nav "Assets" pill → a full page of the client's captured work) ── */
.np-assets { border-color: #c9b48f; background: #faf4e8; color: #7a5c25; }
.np-assets:hover, .np-assets.is-active { background: #7a5c25; color: #fff; border-color: #7a5c25; }
.cp-assets-page { max-width: 780px; margin: 0 auto; padding: 4px 0 24px; }
.cp-assets-head { margin-bottom: 18px; }
.cp-assets-title { font-size: 24px; margin: 10px 0 4px; }
.cp-assets-sub { margin: 0; }
.cp-assets-cards { display: flex; flex-direction: column; gap: 18px; }
.cp-assets-cards .client-card { width: 100%; }
.asset-empty h2 { margin: 0 0 6px; font-size: 18px; }
@media (prefers-color-scheme: dark) {
  .np-assets { border-color: #6b5a3a; background: #2a2418; color: #d8c39a; }
}
:root[data-theme="dark"] .np-assets { border-color: #6b5a3a; background: #2a2418; color: #d8c39a; }


/* ===== Dark-mode surface fixes (2026-08-12) — cards/panels that hard-coded light colors and did not
   adapt via CSS variables. Appended last, scoped to dark only, so light mode is 100% untouched and
   these win by specificity + source order. Grouped: blue / amber / red / green / neutral panels,
   plus dark-green-text-on-dark-surface fixes. ===== */
:root[data-theme="dark"] .ex-final { background:#161d2e;border-color:#2e3a57; }
:root[data-theme="dark"] .li-ai { background:#161d2e;border-color:#2e3a57; }
:root[data-theme="dark"] .rem-card.is-due { background:#161d2e; }
:root[data-theme="dark"] .mp-hero-review { background:#161d2e; }
:root[data-theme="dark"] .rec-feedback { background:#18202e; }
:root[data-theme="dark"] .li-ai-hist-q:hover { background:#1c2740; }
:root[data-theme="dark"] .ex-final-resume { background:#2a2113;border-color:#4a3a1a; }
:root[data-theme="dark"] .fw-gate { background:#2a2113;border-color:#4a3a1a; }
:root[data-theme="dark"] .fin-usd { background:#2a2113;border-color:#4a3a1a; }
:root[data-theme="dark"] .board-card.draft-card { background:#221f14; }
:root[data-theme="dark"] .client-streak.lit { background:linear-gradient(180deg,#2a2113,var(--surface));border-color:#4a3a1a; }
:root[data-theme="dark"] .msg-corr-note:hover { background:#3a2f18; }
:root[data-theme="dark"] .li-ai-saved-bar { background:#2a2510; }
:root[data-theme="dark"] .fin-deposit-note { color:var(--amber); }
:root[data-theme="dark"] .client-impediments.has-waiting { background:#2a1a1a;border-color:#5a2a2a; }
:root[data-theme="dark"] .adm-it-block { background:#2a1a1a;border-color:#5a2a2a; }
:root[data-theme="dark"] .fin-danger { background:#2a1a1a;border-color:#5a2a2a; }
:root[data-theme="dark"] .standup-card.is-submitted { background:#16241b; }
:root[data-theme="dark"] .fw-gate.fw-gate-pass { background:#15311f;border-color:#2a5a3a; }
:root[data-theme="dark"] .mp-hero-done { background:#15311f; }
:root[data-theme="dark"] .mp-hero-done .mp-hero-kicker { color:var(--green); }
:root[data-theme="dark"] .mp-hero-done .mp-hero-step { color:var(--text); }
:root[data-theme="dark"] .csr-item.confirmed { background:#15311f;border-color:#2a5a3a; }
:root[data-theme="dark"] .bai-row-corr { background:#15311f; }
:root[data-theme="dark"] .onb-msg.bot { background:#242832; }
:root[data-theme="dark"] .fw-item.reported .fw-item-row { background:#1f232a; }
:root[data-theme="dark"] .fw-item.reported .fw-item-row:hover { background:#262b33; }
:root[data-theme="dark"] .fw-evidence-summary { background:#1f232a; }
:root[data-theme="dark"] tbody tr:hover { background:#20242c; }
:root[data-theme="dark"] .stage-head { background:var(--bg); }
:root[data-theme="dark"] .stage-head:hover { background:#20242c; }
:root[data-theme="dark"] .board-col { background:#1b1f26; }
:root[data-theme="dark"] thead th { background:var(--bg); }
:root[data-theme="dark"] .adm-group { background:#1f232a; }
:root[data-theme="dark"] .adm-cp { background:#1f232a; }
:root[data-theme="dark"] .as-global { background:var(--bg); }
:root[data-theme="dark"] .adm-intake-row.disabled { background:#1f232a; }
:root[data-theme="dark"] .chip.muted { background:#262b33; }
:root[data-theme="dark"] .close-btn { background:#262b33; }
:root[data-theme="dark"] .close-btn:hover { background:#2e343d; }
:root[data-theme="dark"] .stage-num { background:var(--border); }
:root[data-theme="dark"] .cck-source.none { background:#262b33; }
:root[data-theme="dark"] .lead-tag { background:#262b33; }
:root[data-theme="dark"] .rec-play { background:var(--surface); }
:root[data-theme="dark"] .gd-tag { color:var(--green); }
:root[data-theme="dark"] .cc-attendance.good { color:var(--green); }
:root[data-theme="dark"] .imp-client-resolve { color:var(--green); }
:root[data-theme="dark"] .issue-brief-head { color:var(--green); }
:root[data-theme="dark"] .todo-meta.done { color:var(--green); }
:root[data-theme="dark"] .fin-rec-save { color:var(--green); }
:root[data-theme="dark"] .msg-reviewed { color:var(--green); }
@media (prefers-color-scheme: dark) {
:root[data-theme="system"] .ex-final { background:#161d2e;border-color:#2e3a57; }
:root[data-theme="system"] .li-ai { background:#161d2e;border-color:#2e3a57; }
:root[data-theme="system"] .rem-card.is-due { background:#161d2e; }
:root[data-theme="system"] .mp-hero-review { background:#161d2e; }
:root[data-theme="system"] .rec-feedback { background:#18202e; }
:root[data-theme="system"] .li-ai-hist-q:hover { background:#1c2740; }
:root[data-theme="system"] .ex-final-resume { background:#2a2113;border-color:#4a3a1a; }
:root[data-theme="system"] .fw-gate { background:#2a2113;border-color:#4a3a1a; }
:root[data-theme="system"] .fin-usd { background:#2a2113;border-color:#4a3a1a; }
:root[data-theme="system"] .board-card.draft-card { background:#221f14; }
:root[data-theme="system"] .client-streak.lit { background:linear-gradient(180deg,#2a2113,var(--surface));border-color:#4a3a1a; }
:root[data-theme="system"] .msg-corr-note:hover { background:#3a2f18; }
:root[data-theme="system"] .li-ai-saved-bar { background:#2a2510; }
:root[data-theme="system"] .fin-deposit-note { color:var(--amber); }
:root[data-theme="system"] .client-impediments.has-waiting { background:#2a1a1a;border-color:#5a2a2a; }
:root[data-theme="system"] .adm-it-block { background:#2a1a1a;border-color:#5a2a2a; }
:root[data-theme="system"] .fin-danger { background:#2a1a1a;border-color:#5a2a2a; }
:root[data-theme="system"] .standup-card.is-submitted { background:#16241b; }
:root[data-theme="system"] .fw-gate.fw-gate-pass { background:#15311f;border-color:#2a5a3a; }
:root[data-theme="system"] .mp-hero-done { background:#15311f; }
:root[data-theme="system"] .mp-hero-done .mp-hero-kicker { color:var(--green); }
:root[data-theme="system"] .mp-hero-done .mp-hero-step { color:var(--text); }
:root[data-theme="system"] .csr-item.confirmed { background:#15311f;border-color:#2a5a3a; }
:root[data-theme="system"] .bai-row-corr { background:#15311f; }
:root[data-theme="system"] .onb-msg.bot { background:#242832; }
:root[data-theme="system"] .fw-item.reported .fw-item-row { background:#1f232a; }
:root[data-theme="system"] .fw-item.reported .fw-item-row:hover { background:#262b33; }
:root[data-theme="system"] .fw-evidence-summary { background:#1f232a; }
:root[data-theme="system"] tbody tr:hover { background:#20242c; }
:root[data-theme="system"] .stage-head { background:var(--bg); }
:root[data-theme="system"] .stage-head:hover { background:#20242c; }
:root[data-theme="system"] .board-col { background:#1b1f26; }
:root[data-theme="system"] thead th { background:var(--bg); }
:root[data-theme="system"] .adm-group { background:#1f232a; }
:root[data-theme="system"] .adm-cp { background:#1f232a; }
:root[data-theme="system"] .as-global { background:var(--bg); }
:root[data-theme="system"] .adm-intake-row.disabled { background:#1f232a; }
:root[data-theme="system"] .chip.muted { background:#262b33; }
:root[data-theme="system"] .close-btn { background:#262b33; }
:root[data-theme="system"] .close-btn:hover { background:#2e343d; }
:root[data-theme="system"] .stage-num { background:var(--border); }
:root[data-theme="system"] .cck-source.none { background:#262b33; }
:root[data-theme="system"] .lead-tag { background:#262b33; }
:root[data-theme="system"] .rec-play { background:var(--surface); }
:root[data-theme="system"] .gd-tag { color:var(--green); }
:root[data-theme="system"] .cc-attendance.good { color:var(--green); }
:root[data-theme="system"] .imp-client-resolve { color:var(--green); }
:root[data-theme="system"] .issue-brief-head { color:var(--green); }
:root[data-theme="system"] .todo-meta.done { color:var(--green); }
:root[data-theme="system"] .fin-rec-save { color:var(--green); }
:root[data-theme="system"] .msg-reviewed { color:var(--green); }
}

/* ===== Coaching brief (session prep) — coach detail pane ===== */
.detail-brief {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; margin: 14px 0;
}
.detail-brief .cb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.detail-brief .cb-head h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.cb-tag {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 999px;
}
.cb-actions { display: flex; gap: 8px; align-items: center; }
.cb-actions .text-btn { white-space: nowrap; }
.cb-gen[disabled] { opacity: .6; cursor: default; }
.cb-intro, .cb-working, .cb-summary, .cb-meta { margin: 10px 0 0; }
.cb-intro { color: var(--text); font-size: 13.5px; line-height: 1.5; }
.cb-muted, .cb-meta { color: var(--muted); }
.cb-working { color: var(--muted); font-style: italic; }
.cb-summary { font-size: 14.5px; line-height: 1.55; }
.cb-meta { font-size: 12px; margin-top: 12px; }
.cb-stale {
  margin: 10px 0 0; padding: 8px 12px; border-radius: 8px; font-size: 13px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--border);
}
.cb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 14px; }
.cb-col { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--bg); }
.cb-col h4 { margin: 0 0 8px; font-size: 13px; }
.cb-col.cb-strengths { border-left: 3px solid #35a06a; }
.cb-col.cb-gaps { border-left: 3px solid #d99521; }
.cb-col.cb-focus { border-left: 3px solid var(--accent); }
.cb-list { margin: 0; padding-left: 18px; }
.cb-list li { margin: 4px 0; font-size: 13px; line-height: 1.5; color: var(--text); }
.cb-empty-line { margin: 0; color: var(--muted); }

/* ===== Evidence coach-access status + self-heal ===== */
.ev-share-row { margin-top: 6px; }
.ev-share { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; line-height: 1.4; }
.ev-share.ok { color: #2f8f5b; }
.ev-share.warn { color: #b26a00; }
.ev-share.q { color: var(--muted); }
.ev-fix-btn { font-size: 12.5px; padding: 2px 8px; }
.ev-record-btn { padding: 8px 14px; }
.ev-video-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ev-link-wrap { margin-top: 8px; }
.ev-link-wrap > summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.ev-link-warn { display: block; margin-top: 4px; color: #b26a00; font-size: 12px; line-height: 1.4; }

/* ===== Evidence video mastery check (transcript assessment) ===== */
.ev-assess-status { margin-top: 8px; font-size: 13px; color: var(--muted); }
.ev-assess-status.q { color: var(--muted); }
.ev-assess { margin-top: 8px; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; background: var(--bg); }
.ev-assess > summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.ev-assess-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-top: 8px; }
.ev-assess-col b { display: block; font-size: 12.5px; margin-bottom: 4px; }
.ev-assess-col ul { margin: 0; padding-left: 16px; }
.ev-assess-col li { font-size: 12.5px; line-height: 1.45; margin: 3px 0; color: var(--text); }
.ev-assess-col.hi b { color: #2f8f5b; }
.ev-assess-col.mid b { color: #b26a00; }
.ev-assess-col.lo b { color: #c0392b; }
.ev-transcript { margin-top: 8px; }
.ev-transcript > summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.ev-transcript p { font-size: 12.5px; line-height: 1.5; color: var(--muted); white-space: pre-wrap; margin: 6px 0 0; }

/* ===== Predicted-questions STARL regenerate (C2) ===== */
.pq-regen { border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 6px; width: 20px; height: 18px; line-height: 1; font-size: 12px; cursor: pointer; padding: 0; vertical-align: middle; }
.pq-regen:hover { border-color: var(--accent); color: var(--accent); }
.pq-regen:disabled { opacity: .5; cursor: default; }
.pq-regenall-row { display: flex; align-items: center; gap: 10px; margin: 4px 0 2px; }
.pq-regenall { font-size: 12.5px; }
.pq-regen-status { font-size: 12px; color: var(--muted); }

/* ---- Lesson cross-reference links (refreshers) + the "← Back" bar ---- */
:root { --lref: #b3801f; --lref-soft: rgba(179,128,31,.12); --lref-line: rgba(179,128,31,.5); }
:root[data-theme="dark"] { --lref: #e6ad52; --lref-soft: rgba(230,173,82,.14); --lref-line: rgba(230,173,82,.55); }
@media (prefers-color-scheme: dark) { :root[data-theme="system"] { --lref: #e6ad52; --lref-soft: rgba(230,173,82,.14); --lref-line: rgba(230,173,82,.55); } }
.lesson-ref {
  appearance: none; border: 0; background: none; padding: 0; margin: 0; cursor: pointer;
  font: inherit; color: var(--lref); font-weight: 600; border-bottom: 1.5px dotted var(--lref-line); line-height: inherit;
}
.lesson-ref:hover { color: var(--text); border-bottom-color: var(--lref); }
.lesson-ref:focus-visible { outline: 2px solid var(--lref); outline-offset: 2px; border-radius: 3px; }
.lesson-ref .lref-arr { font-size: .85em; margin-left: 2px; }
.lesson-refback { margin: 0 0 12px; }
.lesson-refback-btn {
  appearance: none; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px; color: var(--lref);
  background: var(--lref-soft); border: 1px solid var(--lref-line); border-radius: 8px; padding: 7px 12px;
}
.lesson-refback-btn:hover { filter: brightness(1.08); }
.lesson-refback-btn:focus-visible { outline: 2px solid var(--lref); outline-offset: 2px; }
.lesson-refback-btn .lrb-to { color: var(--muted); font-weight: 500; }

/* Admin → Lesson links */
.lref-admin .lref-row { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr auto; gap: 10px; align-items: center;
  padding: 9px 0; border-top: 1px solid var(--border); }
.lref-admin .lref-row:first-of-type { border-top: 0; }
.lref-admin .lref-name { font-weight: 600; }
.lref-admin .lref-phase { color: var(--muted); font-size: 12px; }
.lref-admin select { max-width: 100%; }
.lref-pill { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.lref-pill.ok { color: #1a7f4b; background: rgba(46,158,105,.14); }
.lref-pill.amb { color: #9a6a12; background: rgba(230,173,82,.18); }
.lref-pill.off { color: var(--muted); background: var(--border); }
:root[data-theme="dark"] .lref-pill.ok { color: #6fe0a6; }
.adm-sub { font-size: 13px; font-weight: 700; margin: 20px 0 6px; color: var(--text); }

/* ---- In-app evidence recorder: live self-view + device pickers + pause ---- */
.ev-video-controls { flex-direction: column; align-items: stretch; }
.ev-rec-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ev-devices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .ev-devices { grid-template-columns: 1fr; } }
.ev-dev { display: grid; gap: 3px; font-size: 12px; color: var(--muted); min-width: 0; }
.ev-dev select { font: inherit; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); max-width: 100%; }
.ev-video-preview { position: relative; }
/* Mirror the LIVE self-view like a mirror/FaceTime (the saved recording stays un-mirrored — MediaRecorder
   captures the raw stream, not this CSS transform). Playback video is not mirrored. */
.ev-video-preview video.ev-live { width: 100%; max-width: 100%; border-radius: 8px; background: #000; transform: scaleX(-1); }
.ev-dev-hint { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.ev-photo-note { display: block; font-size: 12px; font-weight: 600; color: #047857; margin-top: 4px; }
:root[data-theme="dark"] .ev-photo-note { color: #34d399; }
.ev-rec-badge, .ev-live-badge { position: absolute; top: 8px; left: 8px; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; pointer-events: none; }
.ev-rec-badge { background: rgba(210,40,40,.92); color: #fff; }
.ev-rec-badge.paused { background: rgba(80,80,92,.94); }
.ev-live-badge { background: rgba(0,0,0,.6); color: #fff; font-weight: 500; }
.ev-rec-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: evRecPulse 1.2s infinite; }
.ev-rec-badge.paused .ev-rec-dot { animation: none; }
@keyframes evRecPulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .ev-rec-dot { animation: none; } }
.ev-pause-btn { padding: 8px 14px; }
.ev-delete-btn { color: var(--red, #d23b3b); font-weight: 600; }
/* Stop/Pause overlaid on the live recording video (kept visible with the video) */
.ev-overlay-controls { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 10px; z-index: 3; pointer-events: none; }
.ev-ovl-btn { pointer-events: auto; appearance: none; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; border-radius: 999px; padding: 9px 18px; border: 0; box-shadow: 0 3px 12px rgba(0,0,0,.45); }
.ev-ovl-stop { background: rgba(214,45,45,.96); color: #fff; }
.ev-ovl-save { background: rgba(34,153,84,.97); color: #fff; } /* story recorder: Save take = positive/green */
.ev-ovl-pause { background: rgba(255,255,255,.94); color: #1a2233; }
.ev-ovl-btn:active { transform: translateY(1px); }

/* ---------- Record your story (client card + versions + coach review) ---------- */
.client-story-record .story-rec { margin-top: 12px; }
.story-uploading { margin: 8px 2px 0; font-style: italic; }
.story-empty { margin: 12px 2px 0; }
.story-versions { display: flex; flex-direction: column; gap: 14px; margin: 16px 0 4px; }
/* Media-card layout: the video bleeds edge to edge (side to side), header + notes stay padded. */
.story-version { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.story-version.latest { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.story-ver-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 12px 14px 10px; }
.story-latest-badge { font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 2px 9px; border-radius: 999px; }
/* No max-height: a cap letterboxes a tall/portrait take (black bars on the sides). Match the live view —
   full width, natural height — so the saved player is edge-to-edge like the recording was. */
.story-ver-video { width: 100%; max-width: 100%; background: #000; display: block; }
.story-ver-open { display: inline-block; margin: 2px 14px 12px; }
.story-ver-body { padding: 10px 14px 12px; }
.story-ver-notes { display: block; }
.story-ver-notes > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.story-ver-notes textarea { width: 100%; resize: vertical; }
.story-ver-del { margin-top: 8px; color: #d62d2d; }
/* ✕ that cancels a recording in progress — a white disc with a red glyph so it's visible on any frame
   (a dark button on a dark/black frame was invisible), top-right and clear of the play button + scrub bar. */
.story-cancel-btn { position: absolute; top: 8px; right: 8px; z-index: 4; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.94); color: #d62d2d; font-size: 16px; font-weight: 700; line-height: 1; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; }
.story-cancel-btn:hover { background: #fff; color: #b81f1f; }
.story-saving-row { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--muted); font-style: italic; }
.story-saving-row .ev-rec-dot { background: var(--accent); }
/* Coach-side recorded-story review */
.ds-storyvid { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.ds-storyvid-notes { margin: 10px 0; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); font-size: 14px; }

/* ---------- Coach: inline reading readout under a My Path task (Client Agreement engagement) ---------- */
/* Sits just under the task's checkbox row, indented to line up with the task label. */
.mpc-readstat { margin: 2px 0 8px 26px; padding: 6px 10px; border-left: 3px solid var(--border); border-radius: 0 8px 8px 0; background: var(--surface); }
.mpc-readstat.ok { border-left-color: #1a9b54; }
.mpc-readstat.warn { border-left-color: #d6a318; }
.mpc-rs-line { display: block; font-size: 12px; color: var(--text); }
.agrd-detail { margin-top: 6px; }
.agrd-detail > summary { font-size: 12px; color: var(--accent); cursor: pointer; }
.agrd-secs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; margin-top: 6px; }
.agrd-sec { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); border-bottom: 1px dotted var(--border); padding: 2px 0; }
.agrd-sec span:last-child { font-variant-numeric: tabular-nums; color: var(--text); }
