:root {
  /* Phase-20 brand: deep forest green + gold over soft off-white (approved design) */
  --ink: #1E3326;
  --ink-soft: #6E7E6F;
  --line: #E2E9DD;
  --paper: #F4F7F1;
  --card: #ffffff;
  --teal: #1C7A43;          /* primary -> brand green (rebrands existing accents) */
  --teal-dark: #0F4427;
  --green: #1C7A43;
  --green-ink: #163D28;
  --green-mid: #2E8B57;
  --green-deep: #0F4427;
  --gold: #D6B24A;
  --gold-deep: #B8923A;
  --gold-soft: #EBD9A6;
  --amber: #B07A2A;
  --red: #9A4A40;
  --maroon: #9A4A40;
  --blue: #1d5fa8;
  --purple: #6a4fa3;
  --gray: #6E7E6F;
  --radius: 12px;
  --shadow: 0 6px 22px rgba(20,55,35,.08);
  --shadow-h: 0 12px 30px rgba(20,55,35,.16);
}
.serif { font-family: Georgia, "Times New Roman", serif; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html, body { overflow-x: clip; }
body {
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--paper); color: var(--ink);
}
.hidden { display: none !important; }

/* ---------- sign-in gate ---------- */
.gate {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, #0C3A21 0%, #14512E 55%, #1C7A43 110%); z-index: 50;
}
.gate-card {
  background: var(--card); border-radius: 16px; box-shadow: 0 18px 60px rgba(0,0,0,.35);
  padding: 40px 44px; text-align: center; max-width: 420px; width: calc(100% - 40px);
}
.gate-card h1 { margin: 6px 0 0; font-size: 21px; }
.gate-sub { margin: 2px 0 22px; color: var(--ink-soft); font-size: 15px; }
.gate-note { margin-top: 22px; color: var(--ink-soft); font-size: 12.5px; }
.gate-msg { color: var(--red); font-size: 13.5px; min-height: 18px; margin-bottom: 8px; }
#signin-btn { display: flex; justify-content: center; min-height: 44px; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 14px; background: var(--teal); color: #fff;
  font-weight: 800; font-size: 20px; letter-spacing: .5px;
}
.brand-mark.sm { width: 32px; height: 32px; border-radius: 8px; font-size: 13px; }

/* the shield-and-spear emblem in a cream medallion with a thin gold ring */
.emblem-badge {
  width: 58px; height: 58px; border-radius: 50%; background: #fff; border: 2px solid var(--gold);
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
  flex: 0 0 auto; box-shadow: 0 2px 6px rgba(0,0,0,.30);
}
.emblem-badge img { width: 48px; height: 48px; object-fit: contain; }
.emblem-badge.lg { width: 92px; height: 92px; margin: 0 auto 10px; }
.emblem-badge.lg img { width: 78px; height: 78px; }

/* ---------- brand header (forest green + gold rule) ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(120deg, #0C3A21 0%, #14512E 55%, #1C7A43 110%);
  color: #EAF3EA; border-bottom: 3px solid var(--gold);
  padding: 14px 26px; position: sticky; top: 0; z-index: 10;
}
.topbar-brand { display: flex; align-items: center; gap: 14px; }
.brandtext h1 { margin: 0; font-size: 20px; font-weight: 600; color: #fff; letter-spacing: .3px; }
.brandtext .sub { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--gold-soft); margin-top: 2px; }
.topbar .navlink { color: #EAF3EA; border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.06); margin-left: 6px; }
.topbar .navlink:hover { background: rgba(255,255,255,.16); }
.view-title { color: var(--gold-soft); font-weight: 600; font-size: 13px; letter-spacing: .4px; }
.topbar-user { display: flex; align-items: center; gap: 14px; }
.userbox { text-align: right; line-height: 1.3; }
.who { color: #E4F0E4; font-size: 13px; }
.fsp { display: block; font-size: 10.5px; color: #9DBBA2; letter-spacing: .4px; margin-top: 1px; }
.topbar .btn-ghost { color: #EAF3EA; border-color: rgba(255,255,255,.30); background: rgba(255,255,255,.06); }
.topbar .btn-ghost:hover { background: rgba(255,255,255,.16); }
main { max-width: 1500px; margin: 0 auto; padding: 26px 28px 60px; }
.foot {
  max-width: 1500px; margin: 28px auto 0; padding: 22px 28px 28px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; color: var(--ink-soft); font-size: 12.5px; flex-wrap: wrap;
}
.foot .tag { font-style: italic; color: var(--green); font-size: 14px; }
.foot .right { margin-left: auto; font-size: 11.5px; color: #9aa99c; }

/* ---------- search ---------- */
.searchbar { display: flex; gap: 10px; }
.searchbar input {
  flex: 1; padding: 13px 16px; font-size: 16px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--card); outline: none;
}
.searchbar input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,110,99,.14); }
.status-line { margin: 14px 2px; color: var(--ink-soft); font-size: 13.5px; min-height: 18px; }

/* ---------- buttons ---------- */
.btn {
  border: 1px solid transparent; border-radius: 10px; padding: 11px 18px;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: background .12s;
  white-space: nowrap;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); padding: 7px 13px; }
.btn-ghost:hover { background: #eef2f5; }
.btn-danger { background: #fbeae8; color: var(--red); border-color: #efcfcb; }
.btn-danger:hover { background: #f6d9d5; }
.btn-line { background: #fff; color: var(--teal); border-color: var(--teal); }
.btn-line:hover { background: #ecf5f4; }
.btn-doc { background: #0d7a3a; color: #fff; border-color: #0a5e2d; }
.btn-doc:hover { background: #0a5e2d; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- policy card ---------- */
.pcard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 22px; overflow: hidden;
}
.pcard-head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 16px 20px; border-bottom: 1px solid var(--line); background: #fbfdfe;
}
.pcode { font-size: 19px; font-weight: 800; letter-spacing: .4px; }
.pcard-head .spacer { flex: 1; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
  padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px;
}
.b-active { background: #e3f2e8; color: var(--green); }
.b-new { background: #e4edf8; color: var(--blue); }
.b-cancelled { background: #fbe8e6; color: var(--red); }
.b-lapsed { background: #fdf1dd; color: var(--amber); }
.b-claimed { background: #ece6f7; color: var(--purple); }
.b-no-take-up { background: #eceff1; color: var(--gray); }
.b-removed { background: #f1ece4; color: #8a6d3b; }

.pgrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px 22px; padding: 16px 20px;
}
.pgrid .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-soft); }
.pgrid .val { font-size: 14.5px; font-weight: 600; margin-top: 1px; }
.pgrid .val { overflow-wrap: anywhere; }

.lives-wrap { padding: 4px 20px 18px; }
.sec-title { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-soft); margin: 8px 0; font-weight: 600; }
.sec-note { text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 6px; }
.bene-wrap, .pay-wrap { padding: 4px 20px 0; }
/* Phase-30: the nominated-beneficiary grid sits inside the already-padded .bene-wrap, so
   neutralise .pgrid's own side padding to keep it aligned with the section. */
.bene-grid { padding: 2px 0 8px; gap: 12px 22px; }
.placeholder {
  border: 1px dashed var(--line); border-radius: 8px; background: #fafcfd;
  color: var(--ink-soft); font-size: 13px; padding: 10px 14px; margin-bottom: 6px;
}
/* Phase 7: payment status row (traffic light) */
.pay-row {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: 8px; background: #fafcfd;
  font-size: 13.5px; padding: 9px 14px; margin-bottom: 6px;
}
.pay-light { width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto; }
.pay-light.green { background: var(--green); box-shadow: 0 0 0 3px rgba(30,125,60,.15); }
.pay-light.amber { background: var(--amber); box-shadow: 0 0 0 3px rgba(199,125,10,.15); }
.pay-light.red   { background: var(--red);   box-shadow: 0 0 0 3px rgba(179,56,46,.15); }
.pay-light.grey  { background: var(--gray);  box-shadow: 0 0 0 3px rgba(105,117,126,.15); }
.pay-state { font-weight: 600; }
.pay-meta { color: var(--ink-soft); }

.btn-reveal {
  border: 1px solid var(--teal); border-radius: 7px; background: #fff; color: var(--teal);
  font-size: 12px; font-weight: 600; padding: 3px 10px; cursor: pointer;
}
.btn-reveal:hover { background: #ecf5f4; }
.btn-reveal[disabled] { opacity: .55; cursor: progress; }
.idnum { font-variant-numeric: tabular-nums; letter-spacing: .4px; }
/* Phase 8: SA-ID validation flag + audited ID/DoB column */
.id-flag {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  background: #fbe8e6; color: var(--red); border: 1px solid #efcfcb;
  font-size: 11px; font-weight: 700; white-space: normal;
}
td.idcell { white-space: normal; font-variant-numeric: tabular-nums; }
.plan-tag { font-size: 13px; font-weight: 600; }
/* Phase-28 (Item C): every covered-lives field renders on ONE line — no vertical
 * wrapping. The card is widened (main max-width) so all columns fit in plain view on
 * desktop; .lives-scroll provides a CONTAINED horizontal reflow at narrow widths —
 * never a page-level scrollbar, never squashed/stacked cells. */
.lives-scroll { overflow-x: auto; overflow-y: visible; -webkit-overflow-scrolling: touch; }
table.lives { width: 100%; border-collapse: collapse; font-size: 13px; }
/* DATA cells never wrap — every field stays on ONE line. HEADER cells MAY wrap to two
   lines, so a long column label (e.g. "Inception / Cover start") never widens its data
   column; this keeps all 13 columns inside the card with no horizontal scroll. */
table.lives td { white-space: nowrap; }
/* The rare invalid-ID flag may wrap inside its own cell rather than widening the column. */
table.lives td.idcell { white-space: normal; }
.rel-sub { font-size: 11px; color: var(--ink-soft); white-space: nowrap; }
table.lives th.num, table.lives td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.lives td.num { white-space: nowrap; }
table.lives th.dt, table.lives td.dt { font-variant-numeric: tabular-nums; }
table.lives td.dt { white-space: nowrap; }
table.lives th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .3px;
  color: var(--ink-soft); border-bottom: 1px solid var(--line); padding: 7px 8px;
  white-space: normal; vertical-align: bottom;
}
table.lives td { padding: 8px 8px; border-bottom: 1px solid #eef2f5; }
table.lives tr:last-child td { border-bottom: none; }

/* Waiting-period gate (Phase-15 clock) surfaced read-only on the card.
 * Green/red dot mirrors the payment traffic-light styling for consistency. */
.lives-wrap { overflow-x: clip; }
.wp { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.wp > i { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.wp-ok { color: var(--green); }
.wp-ok > i { background: var(--green); box-shadow: 0 0 0 3px rgba(30,125,60,.15); }
.wp-wait { color: var(--red); }
.wp-wait > i { background: var(--red); box-shadow: 0 0 0 3px rgba(179,56,46,.15); }
.wp-na { color: var(--ink-soft); }
.wp-c { white-space: normal; }
.wp-summary .val.wp-head { display: flex; flex-direction: column; gap: 5px; font-weight: 600; }
.wp-line { display: flex; align-items: center; gap: 8px; }
.wp-line .wp-k { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-soft); min-width: 88px; }

/* ---------- Phase-28 (Item C): one line per field; widened card; contained reflow ---------- */
/* Main-member waiting summary: label + status/date on ONE line each (Natural, then Suicide). */
.wp-summary .wp { white-space: nowrap; }
.wp-summary .wp-line { align-items: center; flex-wrap: nowrap; gap: 8px; }
.wp-summary .wp-line .wp-k { min-width: 0; flex: 0 0 auto; }
.wp-summary .wp > i { margin-top: 0; }
/* Covered-lives waiting chips stay on one line; the .lives-scroll wrapper handles any
   narrow-width overflow (contained), so nothing squashes or forces a page scrollbar. */
.wp-c .wp { white-space: nowrap; }
/* On standard laptop widths (≤1440, e.g. 1366) a slightly more compact table keeps all 13
   columns inside the card with no horizontal scroll; wide desktops (>1440) get the roomier
   spacing above. Below ~1300px the .lives-scroll wrapper takes over with a contained scroll. */
@media (max-width: 1440px) {
  table.lives { font-size: 12.5px; }
  table.lives th, table.lives td { padding: 6px 7px; }
}
.muted { color: var(--ink-soft); }
.empty {
  background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 34px; text-align: center; color: var(--ink-soft);
}

/* ---------- modal ---------- */
.modal-back {
  position: fixed; inset: 0; background: rgba(13,26,33,.45); z-index: 40;
  display: flex; align-items: flex-start; justify-content: center; padding: 7vh 16px;
}
.modal {
  background: var(--card); border-radius: 14px; box-shadow: 0 22px 70px rgba(0,0,0,.3);
  width: 100%; max-width: 560px; max-height: 84vh; overflow: auto; padding: 24px 26px;
}
/* Phase-24c: wider modal for new-business capture so long plan labels
 * (e.g. "Conventional Option A (R20,000 cover)") are never cut off. */
.modal.modal-wide { max-width: 900px; }
/* Phase-24c: searchable employer single-select (combobox). */
.frow.combo { position: relative; }
.combo-list {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 5;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,.16); max-height: 240px; overflow: auto; margin-top: 2px;
}
.combo-item { padding: 8px 11px; cursor: pointer; font-size: 13.5px; }
.combo-item:hover { background: #eef4f3; }
.combo-empty { padding: 8px 11px; color: var(--ink-soft); font-size: 13px; }
.modal h2 { margin: 0 0 4px; font-size: 18px; }
.modal .sub { color: var(--ink-soft); font-size: 13px; margin-bottom: 16px; }
.frow { margin-bottom: 13px; }
.frow label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 4px; }
.frow input, .frow select, .frow textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; background: #fff;
}
.frow input:focus, .frow select:focus, .frow textarea:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,110,99,.12);
}
.fgrid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fgrid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
/* C — keep every control in a capture/edit row on the same baseline regardless
 * of how many lines its label/helper takes. Helper text wraps to its own line
 * under the label ("Age band" / "oldest member — staff confirm"). */
.fgrid2 .hint-inline, .fgrid3 .hint-inline { display: block; font-size: 11.5px; }
/* Phase-48 (G): reserve an equal-height label block and TOP-align every control, so all three
 * boxes in a row sit on one baseline even when a row carries a trailing .hint under its control
 * (the beneficiary SA-ID box used to ride up above First name / Surname because the old
 * margin-top:auto only bottom-aligns a control that is the row's LAST child). */
.fgrid3 > .frow { display: flex; flex-direction: column; }
.fgrid3 > .frow > label { min-height: 2.9em; }
.fgrid3 > .frow > select, .fgrid3 > .frow > input { margin-top: 0; }
/* fgrid2 (add a life) can carry a live validity hint below a control, so reserve
 * a consistent 2-line label block above every control instead. */
.fgrid2 > .frow > label { min-height: 2.9em; }
/* Phase 8: catalogue-driven edit */
.frow input.ro {
  background: #f4f7f9; color: var(--ink); font-weight: 700;
  font-variant-numeric: tabular-nums; cursor: default;
}
.hint { font-size: 12px; color: var(--ink-soft); margin-top: 3px; min-height: 14px; }
.hint.ok { color: var(--green); }
.hint.bad { color: var(--red); }
.hint-inline { font-weight: 400; text-transform: none; }
.prem-note { font-size: 12.5px; color: var(--ink-soft); padding: 2px 1px 10px; }
.locked-banner {
  border: 1px solid #efcfcb; border-radius: 8px; background: #fbeae8; color: var(--red);
  font-size: 13px; font-weight: 600; padding: 9px 13px; margin-bottom: 12px;
}
.warn-banner {
  border: 1px solid #f0dcb6; border-radius: 8px; background: #fdf6e7; color: var(--amber);
  font-size: 12.5px; padding: 9px 13px; margin-bottom: 12px;
}
.fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px 4px; margin-bottom: 14px; }
.fieldset > .ftitle { font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; align-items: center; }
.modal-actions .spacer { flex: 1; }
.sess-gsi { display: flex; justify-content: center; min-height: 44px; margin: 14px 0 4px; }
.sess-gsi:empty { display: none; }
.modal-err { color: var(--red); font-size: 13.5px; min-height: 18px; margin-top: 10px; white-space: pre-wrap; }

/* ---------- Phase 35: capture/card UX ---------- */
/* structured-address sub-block within a fieldset */
.addr-block { margin-top: 2px; }
.addr-title { font-size: 11.5px; font-weight: 600; color: var(--ink-soft); margin: 2px 0 8px; }
/* draft auto-save indicator in the capture footer */
.draft-state { font-size: 12px; color: var(--ink-soft); font-style: italic; }
/* pending-captures list */
.draft-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.draft-row {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 2px 10px; align-items: center;
}
.draft-main { font-size: 13.5px; font-weight: 600; }
.draft-label { margin-left: 4px; }
.draft-meta { font-size: 12px; color: var(--ink-soft); grid-column: 1; }
.draft-actions { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 8px; }
/* edit sub-menu (two big choices) */
.edit-menu { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 4px; }
.edit-choice { display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 12px 14px; height: auto; gap: 3px; }
.edit-choice .ec-t { font-weight: 700; font-size: 14px; }
.edit-choice .ec-d { font-weight: 400; font-size: 12.5px; color: var(--ink-soft); }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; border-radius: 10px; padding: 12px 20px;
  font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.3); z-index: 60; max-width: 90vw;
}
.toast.ok { background: var(--teal-dark); }
.toast.err { background: var(--red); }

/* =====================================================================
 * OPS LAYER — hub, nav, registry tables, role chips
 * ===================================================================== */

/* top-bar nav */
.navlink {
  border: 1px solid var(--line); background: #fff; color: var(--teal);
  border-radius: 8px; padding: 5px 11px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.navlink:hover { background: #ecf5f4; }
.view-title { color: var(--ink-soft); font-weight: 600; font-size: 14px; }

/* home hub — branded landing (greeting + status ribbon + grouped tiles) */
.hub-welcome { margin: 4px 0 2px; }
.greet { margin: 26px 0 6px; }
.greet h2 { margin: 0; font-size: 27px; font-weight: 600; color: var(--green-ink); }
.greet h2 .name { color: var(--gold-deep); }
.greet p { color: var(--ink-soft); font-size: 14.5px; margin: 5px 0 0; }
.ribbon { display: flex; gap: 14px; flex-wrap: wrap; margin: 20px 0 8px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 20px;
  min-width: 150px; flex: 1; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--green); }
.stat .k { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-soft); }
.stat .v { font-size: 25px; font-weight: 700; color: var(--green-ink); margin-top: 5px; }
.stat.good .v { color: var(--green); }
.stat.warn .v { color: var(--maroon); }
.stat .note { font-size: 11.5px; color: #9aa99c; margin-top: 2px; }

.seclabel { display: flex; align-items: center; gap: 12px; margin: 30px 2px 16px; }
.seclabel span { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--ink-soft); }
.seclabel .rule { height: 1px; background: var(--line); flex: 1; }
/* Tile fix: #hub-tiles is a plain block holding section label + grid pairs that
 * STACK; only the inner .grid is the responsive horizontal tile grid (matches the
 * approved mockup). grid-auto-rows:1fr equalises every row so tiles are uniform. */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; grid-auto-rows: 1fr; }
.tile {
  display: flex; flex-direction: column; text-decoration: none; color: inherit; position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 20px 18px 18px; min-height: 168px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
}
a.tile:hover { transform: translateY(-4px); border-color: var(--green-mid); box-shadow: var(--shadow-h); }
.tile .ic {
  width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, #E7F2E9, #D7EBDC); margin-bottom: 13px;
}
.tile .ic svg { width: 24px; height: 24px; stroke: var(--green); stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; }
/* reserve a uniform 2-line title block so a 1- vs 2-line label can't change tile height */
.tile h3 { margin: 0; font-size: 16px; font-weight: 650; color: var(--green-ink);
  line-height: 1.25; min-height: 2.5em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* clamp the description to a uniform 2 lines so every tile is the same height */
.tile p { font-size: 12.8px; color: var(--ink-soft); margin: 5px 0 0; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.9em; }
.tile .arrow { margin-top: auto; padding-top: 13px; font-size: 12.5px; color: var(--green); font-weight: 600; }
.tile-soon { opacity: .66; }
.tile .badge {
  position: absolute; top: 16px; right: 16px; background: var(--gray); color: #fff;
  border-radius: 20px; padding: 2px 9px; font-size: 11px; font-weight: 700; letter-spacing: .3px; text-transform: none;
}
.hub-noaccess { margin-top: 8px; }

/* view headers */
.view-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.view-head h1 { margin: 0; font-size: 21px; }
.view-sub { color: var(--ink-soft); font-size: 13px; margin-top: 3px; max-width: 640px; }
.view-head-actions { display: flex; gap: 8px; }

/* registry / users tables */
.reg-wrap { overflow-x: auto; }
table.reg {
  width: 100%; border-collapse: collapse; font-size: 13.5px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
table.reg th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--ink-soft); background: #fbfdfe; border-bottom: 1px solid var(--line); padding: 10px 12px;
}
table.reg td { padding: 10px 12px; border-bottom: 1px solid #eef2f5; vertical-align: middle; }
table.reg tr:last-child td { border-bottom: none; }
table.reg tr.reg-broker td { background: #fafdfc; font-weight: 600; }
table.reg .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.reg-acts { white-space: nowrap; text-align: right; }
.reg-acts .btn { padding: 5px 10px; font-size: 12px; margin-left: 6px; }
.small { font-size: 11px; }

/* broker-first registry (Phase 20) */
.reg-bar { display: flex; gap: 10px; align-items: center; margin: 4px 2px 14px; }
.reg-search { flex: 1; padding: 10px 14px; font-size: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); outline: none; }
.reg-search:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(28,122,67,.14); }
table.reg tr.reg-broker { cursor: pointer; }
table.reg tr.reg-broker:hover td { background: #eef6ef; }
table.reg tr.reg-frozen td { background: #fbf3ec; }
.reg-code { font-weight: 700; color: var(--green-ink); }
.reg-self { display: inline-block; margin-left: 8px; font: 600 10px/1 -apple-system, sans-serif; text-transform: uppercase; letter-spacing: .5px; color: var(--gold-deep); background: #f6efda; border-radius: 6px; padding: 2px 6px; vertical-align: middle; }
.reg-go { text-align: right; color: var(--green); font-weight: 600; font-size: 12.5px; white-space: nowrap; }
td.num, th.num { text-align: center; }
.reg-crumb { margin: 0 0 12px; }
.reg-crumb a { color: var(--green); text-decoration: none; font-weight: 600; font-size: 13.5px; }
.reg-crumb a:hover { text-decoration: underline; }
.reg-bhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 14px; }
.reg-bhead h2 { margin: 4px 0 4px; font-size: 21px; color: var(--green-ink); }
.reg-bcode { display: inline-block; font-weight: 700; font-size: 12px; letter-spacing: .5px; color: #fff; background: var(--green); border-radius: 7px; padding: 3px 9px; }
.reg-bactions { display: flex; gap: 8px; flex-wrap: wrap; }
.reg-holdnote { margin-top: 8px; color: var(--maroon); font-weight: 600; font-size: 13px; }
.b-held { background: #fbe7df; color: var(--maroon); }
/* status badges (reuse .badge) */
.b-frozen { background: #e4ecf1; color: var(--gray); }
.b-ok { background: #e3f2e8; color: var(--green); }
.b-verify { background: #fdf1dd; color: var(--amber); }

/* role chips */
.rchip {
  display: inline-flex; align-items: center; gap: 4px; background: #eef4f3; color: var(--teal-dark);
  border: 1px solid #cfe3df; border-radius: 999px; font-size: 12px; font-weight: 600; padding: 2px 4px 2px 10px; margin: 2px 0;
}
.rchip-x {
  border: none; background: #d9e6e3; color: var(--teal-dark); border-radius: 50%;
  width: 16px; height: 16px; line-height: 14px; font-size: 12px; cursor: pointer; padding: 0;
}
.rchip-x:hover { background: #fbeae8; color: var(--red); }
.owner-tag { font-size: 11px; color: var(--gray); }

/* advanced disclosure in the rate modal */
.adv { margin: 6px 0 12px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 12px; }
.adv > summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); padding: 6px 0; }
.adv[open] > summary { margin-bottom: 8px; }

@media (max-width: 760px) {
  .topbar { padding: 12px 16px; }
  .brandtext h1 { font-size: 17px; }
  .stat { min-width: 120px; }
}
@media (max-width: 560px) {
  .fgrid2, .fgrid3 { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr 1fr; }
  .ribbon { gap: 10px; }
  .stat { min-width: 44%; padding: 12px 14px; }
  .stat .v { font-size: 21px; }
  .reg-bhead { padding: 14px; }
  .brandtext .sub { display: none; }
}

/* ===================== SMS / non-payment drawer (Phase 12) ===================== */
.sms-panel { display: flex; flex-direction: column; gap: 18px; }
.sms-controls { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.sms-controls .lbl { display: block; font-size: 12px; color: var(--ink-soft); margin-bottom: 4px; }
.sms-select {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink); font-size: 14px; min-width: 320px;
}
.sms-buckets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 760px) { .sms-buckets { grid-template-columns: 1fr 1fr; } }
.sms-bcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.sms-bname { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.sms-bnum { font-size: 30px; font-weight: 800; color: var(--teal); line-height: 1.1; margin-top: 4px; }
.sms-bsub { font-size: 11px; font-weight: 500; color: var(--ink-soft); margin-left: 6px; }
.sms-bmeta { font-size: 11.5px; color: var(--ink-soft); margin-top: 6px; }
.sms-result { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.sms-result-head { font-size: 15px; margin-bottom: 4px; }
.sms-result-meta { font-size: 13px; color: var(--ink-soft); margin-bottom: 12px; }
.sms-result-meta .warn, .warn { color: var(--amber); font-weight: 600; }
/* DB export drawer */
.export-controls { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.export-controls .lbl { display: block; font-size: 12px; color: var(--ink-soft); margin-bottom: 4px; }
.export-field .sms-select { min-width: 240px; }
.export-preview { font-size: 14px; color: var(--ink); margin: 2px; min-height: 18px; }
.export-done-head { font-size: 15px; margin-bottom: 4px; }
.export-dls { display: flex; gap: 12px; flex-wrap: wrap; margin: 14px 0 8px; }
.export-note { font-size: 12.5px; color: var(--ink-soft); }
.sms-file-wrap { overflow-x: auto; margin-top: 10px; }
table.sms-file { width: 100%; border-collapse: collapse; font-size: 13px; }
table.sms-file th { text-align: left; color: var(--ink-soft); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--line); padding: 6px 8px; }
table.sms-file td { padding: 6px 8px; border-bottom: 1px solid var(--paper); }
table.sms-file .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

/* the stacked card history */
.sms-wrap { margin-top: 14px; }
.sms-hist { display: flex; flex-direction: column; gap: 6px; }
.sms-hist-row {
  display: grid; grid-template-columns: 180px 130px 110px 1fr; align-items: center; gap: 10px;
  padding: 8px 12px; border: 1px solid var(--line); border-left: 4px solid var(--green);
  border-radius: 10px; background: #f3faf5;
}
.sms-hist-bucket { font-weight: 700; font-size: 13px; color: var(--ink); }
.sms-hist-cell { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: var(--ink-soft); }
.sms-hist-date { font-size: 12.5px; color: var(--ink-soft); }
.sms-sent { color: var(--green); font-weight: 700; font-size: 12.5px; justify-self: end; }
@media (max-width: 620px) { .sms-hist-row { grid-template-columns: 1fr 1fr; } .sms-sent { justify-self: start; } }

/* Phase 12.1 — revealed full cell on the card history */
.sms-cell-slot { margin-left: 8px; }
.sms-cell-full { color: var(--ink); font-weight: 600; background: #eef6f2; padding: 2px 8px; border-radius: 6px; }

/* ===================== Phase 48: policy notes panel + attachments ===================== */
.notes-wrap { padding: 4px 20px 0; margin-top: 14px; }
.notes-wrap.hidden { display: none; }
.note-compose { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--card); margin-bottom: 12px; }
.note-text { width: 100%; box-sizing: border-box; resize: vertical; min-height: 48px; }
.note-drop {
  margin-top: 10px; border: 1.5px dashed var(--line); border-radius: 10px; padding: 14px;
  text-align: center; color: var(--ink-soft); font-size: 12.5px; cursor: pointer; background: #fbfdfe;
  transition: border-color .12s, background .12s;
}
.note-drop:hover, .note-drop:focus { border-color: var(--green); outline: none; }
.note-drop.drag { border-color: var(--green); background: #eef9f1; color: var(--ink); }
.note-drop-link { color: var(--green); font-weight: 700; text-decoration: underline; }
.note-file-chosen { margin-top: 8px; font-size: 12.5px; color: var(--ink); }
.note-file-clear { color: var(--red); margin-left: 6px; font-size: 12px; }
.note-compose-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 10px; }
.note-msg { color: var(--ink-soft); font-size: 12.5px; margin-right: auto; }
.note-list { display: flex; flex-direction: column; gap: 8px; }
.note-item {
  border: 1px solid var(--line); border-left: 4px solid #6b7b8c; border-radius: 10px;
  padding: 9px 12px; background: #f7f9fb;
}
.note-meta { font-size: 12px; color: var(--ink-soft); margin-bottom: 3px; }
.note-author { font-weight: 600; }
.note-body { font-size: 13.5px; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.note-atts { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 8px; }
.note-att {
  font-size: 12.5px; color: var(--ink); text-decoration: none; background: #eef6f2;
  border: 1px solid var(--line); border-radius: 7px; padding: 3px 9px;
}
.note-att:hover { background: #e2f0e8; }
.note-att.loading { opacity: .5; pointer-events: none; }
.note-empty { padding: 4px 2px; }

/* Phase 15: change-request payload preview */
.cr-payload { margin: 6px 0 0; padding: 10px 12px; background: #0d1b2a0a; border: 1px solid #0d1b2a1a;
  border-radius: 8px; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap;
  overflow-x: auto; color: #1b2a3a; }

/* ===================== Phase 16: Recon Dashboard ===================== */
.rk-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.rk-live { font-size: 12.5px; color: var(--ink-soft); }
.rk-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.rk-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 15px; }
.rk-card .rk-lab { font-size: 11.5px; color: var(--ink-soft); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.rk-card .rk-val { font-size: 24px; font-weight: 800; margin-top: 6px; letter-spacing: -.5px; }
.rk-card .rk-sub { font-size: 12px; color: var(--ink-soft); margin-top: 3px; }
.rk-accent { background: linear-gradient(135deg, var(--teal), var(--teal-dark)); border: none; color: #fff; }
.rk-accent .rk-lab, .rk-accent .rk-sub { color: #cdeee6; }
.rk-bar { height: 7px; border-radius: 99px; background: rgba(255,255,255,.25); margin-top: 9px; overflow: hidden; }
.rk-bar > i { display: block; height: 100%; background: #fff; border-radius: 99px; }
.rk-attn { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 15px; margin-bottom: 14px; }
.rk-attn h3 { margin: 0 0 10px; font-size: 12px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .5px; }
.rk-chips { display: flex; gap: 9px; flex-wrap: wrap; }
.rk-chip { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; font-size: 13px; }
.rk-tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.t-red { background: #fdeceb; color: var(--red); } .t-amber { background: #fbf0db; color: var(--amber); }
.t-green { background: #e6f4ea; color: var(--green); } .t-gray { background: #eef2f4; color: var(--gray); }
.rk-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.rk-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rk-table th { text-align: left; padding: 10px 14px; font-size: 11px; letter-spacing: .4px; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 700; border-bottom: 1px solid var(--line); background: #fafbfc; }
.rk-table th.r, .rk-table td.r { text-align: right; }
.rk-table td { padding: 10px 14px; border-bottom: 1px solid #eef2f4; vertical-align: middle; }
.rk-table tbody tr:hover td { background: #fafdfc; }
.rk-emp { font-weight: 600; }
.rk-excl { font-size: 10px; font-weight: 700; color: var(--gray); background: #eef2f4; padding: 1px 6px; border-radius: 6px; }
.rk-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.p-green { background: #e6f4ea; color: #15803d; } .p-amber { background: #fbf0db; color: #b45309; }
.p-grey { background: #eef2f4; color: var(--gray); } .p-blue { background: #e3edf9; color: var(--blue); }
.rk-manual { font-size: 11px; color: var(--purple); font-weight: 700; white-space: nowrap; }
.rk-out { color: var(--red); font-weight: 700; }
.rk-mini { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.rk-mbar { width: 70px; height: 7px; border-radius: 99px; background: #eef2f4; overflow: hidden; }
.rk-mbar > i { display: block; height: 100%; border-radius: 99px; }
.rk-pct { font-variant-numeric: tabular-nums; font-weight: 700; width: 50px; text-align: right; }
.rk-drill { color: var(--blue); font-weight: 700; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.rk-totrow td { font-weight: 800; background: #f4f7f9; border-top: 2px solid var(--line); position: sticky; bottom: 0; }
.rk-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--ink-soft); }
.rk-legend .sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 5px; }
.rk-table.sm { font-size: 12.5px; } .rk-table.sm th, .rk-table.sm td { padding: 7px 10px; }
.dd-scroll { max-height: 56vh; overflow-y: auto; } .dd-sec { margin-bottom: 14px; }
.dd-h { font-weight: 700; font-size: 13px; margin: 4px 0 6px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

/* ===================== Phase 16: Operations ===================== */
.ops-body { display: grid; gap: 14px; }
.ops-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.ops-card h3 { margin: 0 0 4px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.ops-tag { font-size: 10.5px; font-weight: 700; color: var(--teal); background: #e3f1ee; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .4px; }
.ops-tag-warn { color: var(--amber); background: #fbf0db; }
.ops-note { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 12px; line-height: 1.5; }
.ops-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ops-month, .ops-in { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; background: #fff; }
.ops-in.sm { width: 130px; } .ops-in.wide { flex: 1; min-width: 200px; }
.ops-lbl { font-size: 12px; color: var(--ink-soft); } .ops-chk { font-size: 12.5px; color: var(--ink-soft); display: flex; align-items: center; gap: 4px; }
.ops-status { margin-top: 12px; }
.ops-ok { color: var(--green); font-weight: 700; margin-bottom: 6px; }
.ops-kv { font-size: 13px; color: var(--ink); margin: 4px 0; }
.ops-sub2 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-soft); font-weight: 700; margin: 12px 0 5px; }
.ops-arts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ops-card code { background: #eef2f4; padding: 1px 5px; border-radius: 5px; font-size: 12px; }
/* Phase 17 — employer payroll file block on the Draw Billing result */
.ops-payroll { margin: 12px 0 6px; padding: 12px 14px; border: 1px solid var(--teal);
  border-left: 4px solid var(--teal); border-radius: var(--radius); background: #f1f8f6; }
.ops-payroll-h { font-size: 13.5px; color: var(--ink); margin-bottom: 8px; }
/* C1 — pilot output is not for sending until the full book is migrated */
.ops-payroll-pilot { border-color: var(--amber); border-left-color: var(--amber); background: #fdf6ec; }
.ops-pilot-pill { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px;
  background: var(--amber); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .2px; }
.ops-arts-all { margin-top: 12px; }
.ops-arts-lbl { font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-soft); font-weight: 700; margin-bottom: 5px; }
@media (max-width: 720px) { .rk-cards { grid-template-columns: 1fr 1fr; } }

/* ===================== Phase 18: Billing Delivery ===================== */
.p-red { background: #fce8e6; color: #c5221f; }
.ops-send-row { margin-top: 12px; }
.dlv-alert { background: #fce8e6; border: 1px solid #f3c0bb; color: #a3160f; border-radius: 10px;
  padding: 10px 14px; margin-bottom: 14px; font-size: 13px; }
.dlv-recip { font-size: 12.5px; color: var(--ink); max-width: 280px; overflow-wrap: anywhere; }
#dlv-config table, #dlv-log table { min-width: 720px; }
.dlv-prev { font-size: 13.5px; }
.dlv-kv { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 5px 0;
  border-bottom: 1px solid var(--line); align-items: baseline; }
.dlv-kv > span { color: var(--ink-soft); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.dlv-body { background: #f7f9fa; border: 1px solid var(--line); border-radius: 8px; padding: 12px;
  white-space: pre-wrap; font-family: inherit; font-size: 13px; margin: 12px 0; line-height: 1.5; }
.dlv-note { font-size: 12px; margin-top: 6px; }
.dlv-route { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 8px 0;
  background: #fbfcfd; }
.dlv-route-h { font-size: 13px; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.dlv-form { display: flex; flex-direction: column; gap: 4px; }
.dlv-form .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-soft);
  margin-top: 8px; }
.dlv-ta { width: 100%; box-sizing: border-box; font-family: inherit; font-size: 13px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; resize: vertical; }
.dlv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 6px; }
.dlv-adv { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.dlv-adv summary { cursor: pointer; font-size: 12.5px; color: var(--blue); }
.btn.sm { padding: 4px 10px; font-size: 12px; }

/* ===== Phase 19: Employer Registry ===== */
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
table.reg.sm th, table.reg.sm td { padding: 6px 9px; font-size: 12.5px; }
.emp-row { cursor: pointer; }
.emp-row:hover td { background: #f4fbfa; }
.emp-name { font-size: 18px; margin: 2px 0 14px; color: var(--ink); }
.emp-sec { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.emp-sec-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.warn-text { color: var(--amber); font-weight: 600; }

/* ===== Phase 24d: per-child Student-status panel + age-band SMS buttons ===== */
.stud-panel { display: flex; flex-direction: column; gap: 3px; }
.stud-tick { display: flex; align-items: center; gap: 5px; font-size: 12px; white-space: normal; cursor: pointer; }
.stud-tick input { margin: 0; }
.stud-status { font-size: 11px; line-height: 1.35; color: var(--ink-soft, #5a6b5f); }
.stud-status.ok { color: var(--green); }
.stud-status.warn { color: var(--amber); }
.stud-actions { margin-top: 2px; }
.btn-xs { padding: 2px 8px; font-size: 11px; line-height: 1.5; }
.sms-sep { display: inline-block; width: 1px; height: 22px; background: var(--line); margin: 0 6px; vertical-align: middle; }

/* ===== Phase-31 reconciliation exceptions ===== */
.exc-top { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; margin:0 0 12px; }
.exc-facets { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.exc-top-r { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
/* the coloured tallies double as the clickable issue-type filter (Phase-39) */
.exc-chip-f { font-family:inherit; line-height:1.2; cursor:pointer; border:1px solid transparent; }
.exc-chip-f:hover { filter:brightness(0.97); }
.exc-chip-f.exc-chip-on { border-color:currentColor; box-shadow:0 0 0 1px currentColor inset; }
.exc-actions { display:flex; gap:6px; flex-wrap:wrap; }
.exc-rec { font-size:13px; }
.exc-sum { background:#F4F7F1; border:1px solid #dfe7da; border-radius:8px; padding:10px 12px; margin:8px 0 14px; font-size:14px; line-height:1.5; }
.exc-search { display:flex; gap:8px; margin:6px 0; }
.exc-search input { flex:1; }
.exc-results { margin:6px 0 12px; max-height:300px; overflow:auto; }
.exc-chosen-h { font-weight:600; margin:8px 0 4px; font-size:13px; }
.exc-chosen { margin-bottom:10px; }
.exc-chip { display:inline-block; background:#1C7A43; color:#fff; border-radius:14px; padding:3px 10px; margin:2px; font-size:13px; font-family:monospace; }
.exc-chip a { color:#fff; cursor:pointer; margin-left:6px; font-weight:700; text-decoration:none; }
