/* =====================================================================
   i-School Consult Programme Manager
   Everything reads from the tokens below, so light/dark is one attribute flip
   (html[data-bs-theme]). Brand red is sampled from the logo.
   ===================================================================== */
:root {
  --brand: #ef3037;
  --brand-dark: #c4222a;
  --brand-deep: #a81c22;
  --brand-tint: #fdecec;
  --brand-tint-strong: rgba(239,48,55,.18);

  --page: #f3f4f8;
  --surface: #ffffff;
  --surface-alt: #f7f8fb;
  --surface-raised: #ffffff;
  --input-bg: #ffffff;
  --border: #e7e9ee;
  --border-strong: #d5d9e0;
  --text: #1f2430;
  --text-muted: #6b7280;

  --radius: .75rem;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --shadow-md: 0 8px 24px rgba(16,24,40,.12);

  --indigo-bg:#eef2ff; --indigo-fg:#3730a3;
  --amber-bg:#fff4d6;  --amber-fg:#92600a;
  --green-bg:#e3f5ea;  --green-fg:#17653a;
  --grey-bg:#eef0f3;   --grey-fg:#566070;
  --teal-bg:#dff4f4;   --teal-fg:#0f6b6b;
  --red-bg:#fde8e8;    --red-fg:#9b1c1c;
  --brandt-bg:#fdecec; --brandt-fg:#a81c22;

  --side-bg: #12151c; --side-bg-2: #181c26; --side-ink: #aab1c0;

  --bs-primary: #ef3037;
  --bs-primary-rgb: 239, 48, 55;
  --bs-body-bg: var(--page);
  --bs-body-color: var(--text);
  --bs-border-color: var(--border);
  --bs-link-color: #d1242c;
  --bs-link-color-rgb: 209, 36, 44;
  --bs-link-hover-color: #a81c22;
  --bs-link-hover-color-rgb: 168, 28, 34;
  --bs-border-radius: .5rem;
  color-scheme: light;
}

[data-bs-theme="dark"] {
  --brand-tint: rgba(239,48,55,.14);
  --brand-tint-strong: rgba(239,48,55,.28);

  --page: #0d1017;
  --surface: #151a24;
  --surface-alt: #1a202c;
  --surface-raised: #1b2230;
  --input-bg: #0f131b;
  --border: #263042;
  --border-strong: #34405a;
  --text: #e6e9f0;
  --text-muted: #96a0b2;

  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 1px 3px rgba(0,0,0,.35);
  --shadow-md: 0 12px 28px rgba(0,0,0,.55);

  --indigo-bg:rgba(129,140,248,.16); --indigo-fg:#a5b4fc;
  --amber-bg:rgba(245,176,45,.16);   --amber-fg:#f6c75e;
  --green-bg:rgba(52,199,120,.16);   --green-fg:#6fe0a3;
  --grey-bg:rgba(148,163,184,.16);   --grey-fg:#aab4c4;
  --teal-bg:rgba(45,212,191,.16);    --teal-fg:#5eead4;
  --red-bg:rgba(248,113,113,.16);    --red-fg:#fca5a5;
  --brandt-bg:rgba(239,48,55,.2);    --brandt-fg:#ff8a8f;

  --side-bg: #0a0d13; --side-bg-2: #0f131b;

  --bs-body-bg: var(--page);
  --bs-body-color: var(--text);
  --bs-border-color: var(--border);
  --bs-link-color: #ff7a7f;
  --bs-link-color-rgb: 255, 122, 127;
  --bs-link-hover-color: #ffa0a4;
  --bs-link-hover-color-rgb: 255, 160, 164;
  color-scheme: dark;
}

html { font-size: 15px; }
@media (min-width: 768px) { html { font-size: 16px; } }

body {
  background: var(--page); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, .h1, h2, .h2, h3, .h3, h4, .h4 { font-weight: 650; letter-spacing: -.01em; }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
.text-muted { color: var(--text-muted) !important; }

/* ---------- icons ---------- */
.ico, .icon-svg { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico-sm { width: 16px; height: 16px; flex-basis: 16px; }

/* ---------- cards, panels, tables ---------- */
.card, .panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  --bs-card-bg: var(--surface); --bs-card-cap-bg: transparent; --bs-card-border-color: var(--border); --bs-card-color: var(--text);
}
.card-header { padding: .85rem 1.25rem; font-size: .95rem; font-weight: 600; border-bottom: 1px solid var(--border); }
.card-body { padding: 1.25rem; }
.panel { overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.panel-head h2 { margin: 0; font-size: 1.05rem; font-weight: 650; display: flex; align-items: center; gap: .55rem; }
.panel-head h2 .count { font-size: .75rem; font-weight: 600; color: var(--text-muted); background: var(--surface-alt); border: 1px solid var(--border); border-radius: 99px; padding: .05rem .5rem; }
.panel-body { padding: 1.25rem; }
.panel .table-responsive { border: 0; border-radius: 0; box-shadow: none; }

.table-responsive { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.table { margin-bottom: 0; --bs-table-bg: transparent; --bs-table-color: var(--text); --bs-table-border-color: var(--border); }
.table > :not(caption) > * > * { padding: .7rem .9rem; border-bottom-color: var(--border); }
.table thead th {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 600;
  background: var(--surface-alt); border-bottom: 1px solid var(--border);
}
.table tbody tr:last-child > * { border-bottom: 0; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: var(--surface-alt); color: var(--text); }
.table td, .table th { font-variant-numeric: tabular-nums; }
.table a:not(.btn) { color: var(--text); font-weight: 600; }
.table a:not(.btn):hover { color: var(--brand-dark); text-decoration: none; }
.table .table-actions a { color: var(--bs-link-color); font-weight: 600; }
.table-nums th, .table-nums td { white-space: nowrap; }
.table-nums .cohort-col { white-space: normal; }
.cohort-col { min-width: 14rem; }
.cell-clip { max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 575.98px) { .cell-clip { max-width: 7rem; } }

/* ---------- pills / tags ---------- */
.pill { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; background: var(--p-bg, var(--grey-bg)); color: var(--p-fg, var(--grey-fg)); }
.pill-registered, .pill-furthertraining, .pill-facilitator { --p-bg: var(--indigo-bg); --p-fg: var(--indigo-fg); }
.pill-intraining { --p-bg: var(--amber-bg); --p-fg: var(--amber-fg); }
.pill-completed, .pill-employed, .pill-active { --p-bg: var(--green-bg); --p-fg: var(--green-fg); }
.pill-ownbusiness { --p-bg: var(--teal-bg); --p-fg: var(--teal-fg); }
.pill-unemployed { --p-bg: var(--red-bg); --p-fg: var(--red-fg); }
.pill-admin { --p-bg: var(--brandt-bg); --p-fg: var(--brandt-fg); }
.pill-withdrawn, .pill-other, .pill-inactive { --p-bg: var(--grey-bg); --p-fg: var(--grey-fg); }
.pill-lg { font-size: .8rem; padding: .25rem .75rem; }

.tag { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .65rem; border-radius: .5rem; font-size: .78rem; font-weight: 600; background: var(--surface-alt); border: 1px solid var(--border); color: var(--text-muted); }
.tag-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; color: var(--text); }
.tag-warn { background: var(--amber-bg); color: var(--amber-fg); border-color: transparent; }

.avatar-sm {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: .75rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, #ff5b61, #c4222a); overflow: hidden;
}
.avatar-sm img { width: 100%; height: 100%; object-fit: cover; }
.name-cell { display: flex; align-items: center; gap: .7rem; }
.name-cell .sub { display: block; font-size: .78rem; font-weight: 400; color: var(--text-muted); }

/* ---------- buttons, forms ---------- */
.btn { font-weight: 600; border-radius: .55rem; padding: .5rem 1rem; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; }
.btn-sm { padding: .3rem .65rem; }
.btn-primary {
  --bs-btn-bg: #ef3037; --bs-btn-border-color: #ef3037; --bs-btn-color: #fff;
  --bs-btn-hover-bg: #d1242c; --bs-btn-hover-border-color: #c4222a; --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #a81c22; --bs-btn-active-border-color: #a81c22;
  --bs-btn-disabled-bg: #ef3037; --bs-btn-disabled-border-color: #ef3037;
  box-shadow: 0 1px 2px rgba(239,48,55,.3);
}
.btn-outline-primary {
  --bs-btn-color: var(--bs-link-color); --bs-btn-border-color: #ef3037;
  --bs-btn-hover-bg: #ef3037; --bs-btn-hover-border-color: #ef3037; --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #d1242c; --bs-btn-active-border-color: #d1242c; --bs-btn-active-color: #fff;
}
.btn-outline-secondary {
  --bs-btn-color: var(--text-muted); --bs-btn-border-color: var(--border-strong);
  --bs-btn-hover-bg: var(--surface-alt); --bs-btn-hover-color: var(--text); --bs-btn-hover-border-color: var(--border-strong);
  --bs-btn-active-bg: var(--surface-alt); --bs-btn-active-color: var(--text);
}

.form-label { font-weight: 600; font-size: .875rem; margin-bottom: .3rem; }
.form-control, .form-select { background-color: var(--input-bg); color: var(--text); border-color: var(--border-strong); padding: .6rem .8rem; border-radius: .55rem; }
.form-control::placeholder { color: var(--text-muted); opacity: .8; }
.form-control:focus, .form-select:focus { background-color: var(--input-bg); color: var(--text); border-color: var(--brand); }
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-select:focus, .form-check-input:focus { box-shadow: 0 0 0 .22rem rgba(239,48,55,.22); }
.form-check-input { width: 1.15em; height: 1.15em; background-color: var(--input-bg); border-color: var(--border-strong); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.text-danger { font-size: .85rem; }

.page-link { color: var(--bs-link-color); background: var(--surface); border-color: var(--border); }
.page-link:hover { background: var(--surface-alt); }
.page-item.active .page-link { background: var(--brand); border-color: var(--brand); color: #fff; }

.alert { border-radius: var(--radius); border: 0; box-shadow: var(--shadow); }
.alert-success { background: var(--green-bg); color: var(--green-fg); }
.alert-warning { background: var(--amber-bg); color: var(--amber-fg); }
.alert-light { background: var(--surface); color: var(--text); border: 1px solid var(--border); }

.filter-bar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1rem 1.1rem; margin-left: 0; margin-right: 0; --bs-gutter-x: .75rem; }

/* ---------- signature + photo capture ---------- */
.signature-canvas { width: 100%; height: 180px; border: 2px dashed var(--border-strong); border-radius: var(--radius); background: #fff; touch-action: none; cursor: crosshair; }
.signature-canvas:hover { border-color: var(--brand); }
.signature-view { display: block; max-width: 100%; width: auto; height: auto; max-height: 110px; object-fit: contain; padding: .5rem .75rem; background: #fff; border: 1px solid var(--border); border-radius: .6rem; }

/* choices-lite (shared with the PMS) expects these token names */
:root { --radius-token: var(--radius); }

/* ---------- login ---------- */
.login-wrap { min-height: 70vh; display: flex; align-items: center; }
.login-card { padding: 2rem 1.75rem; border-top: 4px solid var(--brand); }
.login-logo { max-width: 240px; width: 100%; height: auto; }
[data-bs-theme="dark"] .login-logo { background: #fff; border-radius: .75rem; padding: .75rem 1rem; }

/* =====================================================================
   APP SHELL: dark sidebar + content column
   ===================================================================== */
:root { --side-w: 264px; }
.shell { display: flex; min-height: 100vh; }
.main-col { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.content { flex: 1 0 auto; width: 100%; max-width: 1360px; padding: 2rem 2.25rem 1.5rem; margin: 0 auto; }
.content-guest { max-width: 1100px; }
.app-footer { padding: 1rem 2.25rem; font-size: .8rem; color: var(--text-muted); border-top: 1px solid var(--border); }

.sidebar {
  position: sticky; top: 0; height: 100vh; width: var(--side-w); flex: 0 0 var(--side-w);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--side-bg-2) 0%, var(--side-bg) 100%);
  color: var(--side-ink); border-right: 1px solid rgba(255,255,255,.04); z-index: 1040;
}
.side-brand { display: flex; align-items: center; gap: .75rem; padding: 1.25rem 1.25rem 1.1rem; text-decoration: none !important; border-bottom: 1px solid rgba(255,255,255,.07); }
.side-brand img { height: 38px; width: auto; }
.side-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.side-brand-text strong { color: #fff; font-size: 1rem; font-weight: 700; letter-spacing: -.01em; }
.side-brand-text small { color: #7f8798; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; }
.side-nav { flex: 1 1 auto; overflow-y: auto; padding: 1rem .8rem; display: flex; flex-direction: column; gap: 2px; }
.side-label { padding: 1rem .8rem .4rem; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #5f6779; }
.side-label:first-child { padding-top: .2rem; }
.side-link { position: relative; display: flex; align-items: center; gap: .8rem; padding: .62rem .8rem; border-radius: .6rem; color: var(--side-ink); font-weight: 500; font-size: .93rem; text-decoration: none !important; transition: background .15s, color .15s; }
.side-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-link .ico { opacity: .85; }
.side-link.active { background: linear-gradient(90deg, rgba(239,48,55,.24), rgba(239,48,55,.08)); color: #fff; }
.side-link.active::before { content: ""; position: absolute; left: -.8rem; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand); }
.side-link.active .ico { color: #ff7a7f; opacity: 1; }

.side-foot { padding: 0 .6rem .6rem; display: flex; flex-direction: column; gap: .5rem; }
.theme-switch {
  display: flex; align-items: center; gap: .75rem; width: 100%; padding: .6rem .8rem; border-radius: .6rem;
  border: 0; background: transparent; color: var(--side-ink); font-weight: 500; font-size: .93rem; text-align: left;
}
.theme-switch:hover { background: rgba(255,255,255,.06); color: #fff; }
.theme-switch .track { margin-left: auto; width: 34px; height: 20px; border-radius: 99px; background: rgba(255,255,255,.14); position: relative; transition: background .2s; }
.theme-switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s; }
[data-bs-theme="dark"] .theme-switch .track { background: var(--brand); }
[data-bs-theme="dark"] .theme-switch .track::after { transform: translateX(14px); }
.theme-switch .when-dark, [data-bs-theme="dark"] .theme-switch .when-light { display: none; }
[data-bs-theme="dark"] .theme-switch .when-dark { display: inline-flex; }

.side-user { display: flex; align-items: center; gap: .7rem; padding: .7rem .75rem; border-radius: .8rem; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.06); }
.side-avatar { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, #ff5b61, #c4222a); }
.side-user-meta { min-width: 0; flex: 1 1 auto; }
.side-user-name { color: #fff; font-size: .85rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user-role { color: #7f8798; font-size: .72rem; }
.side-signout { border: 0; background: transparent; color: #8b93a5; padding: .4rem; border-radius: .5rem; line-height: 0; cursor: pointer; }
.side-signout:hover { background: rgba(239,48,55,.18); color: #fff; }

.sidebar-backdrop { display: none; }
.mobile-bar, .guest-bar {
  display: none; align-items: center; gap: .75rem; padding: .7rem 1rem;
  background: var(--surface); border-bottom: 1px solid var(--border); border-top: 3px solid var(--brand);
  position: sticky; top: 0; z-index: 1030;
}
.guest-bar { display: flex; }
.mobile-brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; color: var(--text); text-decoration: none !important; }
.mobile-brand img { height: 30px; width: auto; }
.mobile-toggle, .theme-btn { border: 1px solid var(--border); background: var(--surface); border-radius: .55rem; padding: .4rem; line-height: 0; color: var(--text); }
.theme-btn { margin-left: auto; }
.theme-btn .when-dark, [data-bs-theme="dark"] .theme-btn .when-light { display: none; }
[data-bs-theme="dark"] .theme-btn .when-dark { display: inline-flex; }

@media (max-width: 991.98px) {
  .mobile-bar { display: flex; }
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .22s ease; }
  body.sidebar-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.45); }
  body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(10,12,18,.55); z-index: 1035; }
  body.sidebar-open { overflow: hidden; }
  .content { padding: 1.25rem 1rem 1rem; }
  .app-footer { padding: 1rem; }
}
@media (max-width: 575.98px) {
  .form-control, .form-select { padding: .75rem .9rem; font-size: 1rem; }
  .btn { padding: .65rem 1rem; }
  .btn-sm { padding: .4rem .7rem; }
}

/* =====================================================================
   PAGE-LEVEL COMPONENTS
   ===================================================================== */
.content h1.h3 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
.page-sub { color: var(--text-muted); margin: .15rem 0 0; font-size: .92rem; }

.kpi { position: relative; display: flex; align-items: center; gap: .9rem; padding: 1.1rem 1.2rem; height: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.kpi:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.kpi-icon { width: 44px; height: 44px; flex: 0 0 44px; border-radius: .8rem; display: grid; place-items: center; background: var(--t-bg, var(--grey-bg)); color: var(--t-fg, var(--grey-fg)); }
.kpi-icon .ico { width: 22px; height: 22px; }
.kpi-value { font-size: 1.85rem; font-weight: 750; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi-label { color: var(--text-muted); font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-top: .3rem; }
.tone-brand  { --t-bg: var(--brandt-bg); --t-fg: var(--brandt-fg); }
.tone-indigo { --t-bg: var(--indigo-bg); --t-fg: var(--indigo-fg); }
.tone-amber  { --t-bg: var(--amber-bg);  --t-fg: var(--amber-fg); }
.tone-green  { --t-bg: var(--green-bg);  --t-fg: var(--green-fg); }
.tone-grey   { --t-bg: var(--grey-bg);   --t-fg: var(--grey-fg); }
.tone-teal   { --t-bg: var(--teal-bg);   --t-fg: var(--teal-fg); }
.tone-red    { --t-bg: var(--red-bg);    --t-fg: var(--red-fg); }
.kpi-plain { display: block; border-left: 4px solid var(--border); }
.kpi-plain.tone-brand  { border-left-color: var(--brand); }
.kpi-plain.tone-amber  { border-left-color: #f0a81c; }
.kpi-plain.tone-green  { border-left-color: #2fa866; }
.kpi-plain.tone-indigo { border-left-color: #5a63e0; }

.bar { height: 8px; min-width: 90px; background: var(--grey-bg); border-radius: 99px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, #ff5b61, #ef3037); border-radius: 99px; }
.bar-cell { display: flex; align-items: center; gap: .6rem; }
.bar-cell small { color: var(--text-muted); font-variant-numeric: tabular-nums; width: 2.6rem; text-align: right; }

/* ---------- trainee profile ---------- */
.profile-hero { background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + .15rem); box-shadow: var(--shadow); overflow: hidden; }
.hero-banner {
  height: 96px;
  background:
    radial-gradient(circle at 18% 30%, rgba(255,255,255,.18) 0 2px, transparent 3px) 0 0 / 28px 28px,
    linear-gradient(120deg, #ef3037 0%, #b3212a 55%, #5c0f14 100%);
}
.hero-body { display: flex; align-items: flex-end; gap: 1.25rem; padding: 0 1.5rem 1.25rem; flex-wrap: wrap; }
.hero-avatar {
  width: 104px; height: 104px; flex: 0 0 104px; margin-top: -52px; border-radius: 50%;
  border: 4px solid var(--surface); box-shadow: var(--shadow-md); overflow: hidden;
  display: grid; place-items: center; font-size: 2.2rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #ff5b61, #c4222a);
}
.hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hero-main { flex: 1 1 280px; min-width: 0; padding-top: .9rem; }
.hero-name { font-size: 1.65rem; font-weight: 750; letter-spacing: -.02em; margin: 0 0 .5rem; }
.hero-tags { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.hero-actions { display: flex; gap: .5rem; padding-top: .9rem; }
.hero-stats { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--border); background: var(--surface-alt); }
.hero-stat { padding: .9rem 1.25rem; border-right: 1px solid var(--border); min-width: 0; }
.hero-stat:last-child { border-right: 0; }
.hero-stat .k { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.hero-stat .v { font-size: 1.05rem; font-weight: 650; margin-top: .15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 991.98px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stat { border-bottom: 1px solid var(--border); }
  .hero-stat:nth-child(2n) { border-right: 0; }
  .hero-stat:last-child { grid-column: 1 / -1; border-bottom: 0; }
}
@media (max-width: 575.98px) {
  .hero-body { padding: 0 1rem 1rem; }
  .hero-avatar { width: 84px; height: 84px; flex-basis: 84px; margin-top: -42px; font-size: 1.8rem; }
  .hero-name { font-size: 1.35rem; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; }
}

.info-list { list-style: none; margin: 0; padding: 0; }
.info-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.info-row:last-child { border-bottom: 0; padding-bottom: 0; }
.info-row:first-child { padding-top: 0; }
.info-row .lbl { color: var(--text-muted); font-size: .85rem; display: flex; align-items: center; gap: .5rem; flex: 0 0 auto; }
.info-row .val { font-weight: 550; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.info-row .val.muted { color: var(--text-muted); font-weight: 400; }
.contact-line { display: flex; align-items: center; gap: .85rem; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.contact-line:first-child { padding-top: 0; }
.contact-line:last-child { border-bottom: 0; padding-bottom: 0; }
.contact-ico { width: 38px; height: 38px; flex: 0 0 38px; border-radius: .7rem; display: grid; place-items: center; background: var(--t-bg); color: var(--t-fg); }
.contact-line .meta { min-width: 0; flex: 1; }
.contact-line .meta .k { font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.contact-line .meta .v { font-weight: 600; overflow-wrap: anywhere; }
.contact-line .meta .v.muted { color: var(--text-muted); font-weight: 400; }
.contact-line .go { flex: 0 0 auto; }

.consent-ok { display: flex; align-items: center; gap: .65rem; padding: .7rem .85rem; border-radius: .7rem; background: var(--green-bg); color: var(--green-fg); font-weight: 600; font-size: .92rem; }
.consent-ok small { display: block; font-weight: 500; opacity: .85; }
.consent-no { background: var(--amber-bg); color: var(--amber-fg); }
.sig-label { font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; margin: 1rem 0 .4rem; }

/* follow-up timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.75rem; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: .5rem; bottom: .5rem; width: 2px; background: var(--border); border-radius: 2px; }
.tl-item { position: relative; padding: 0 0 1.4rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -1.75rem; top: .3rem; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--dot, var(--grey-fg)); box-sizing: border-box; }
.tl-employed { --dot: var(--green-fg); } .tl-ownbusiness { --dot: var(--teal-fg); } .tl-furthertraining { --dot: var(--indigo-fg); }
.tl-unemployed { --dot: var(--red-fg); } .tl-other { --dot: var(--grey-fg); }
.tl-card { background: var(--surface-alt); border: 1px solid var(--border); border-radius: .8rem; padding: .9rem 1rem; }
.tl-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.tl-date { font-size: .82rem; color: var(--text-muted); display: inline-flex; align-items: center; gap: .4rem; }
.tl-title { font-weight: 650; margin-top: .55rem; }
.tl-sub { color: var(--text-muted); font-size: .92rem; }
.tl-income { display: inline-flex; align-items: baseline; gap: .35rem; margin-top: .55rem; padding: .2rem .65rem; border-radius: .5rem; background: var(--green-bg); color: var(--green-fg); font-weight: 700; font-variant-numeric: tabular-nums; }
.tl-income small { font-weight: 500; opacity: .85; }
.tl-notes { margin: .6rem 0 0; font-size: .9rem; color: var(--text-muted); border-left: 3px solid var(--border-strong); padding-left: .7rem; }
.tl-latest .tl-card { border-color: var(--brand-tint-strong); box-shadow: 0 0 0 3px var(--brand-tint); }

.empty-state { text-align: center; padding: 2.25rem 1rem; }
.empty-state .ring { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; background: var(--brandt-bg); color: var(--brandt-fg); }
.empty-state .ring .ico { width: 28px; height: 28px; }
.empty-state h3 { font-size: 1.05rem; margin-bottom: .25rem; }
.empty-state p { color: var(--text-muted); margin: 0 auto; max-width: 30rem; font-size: .92rem; }

/* inputs line up on one baseline even when a label wraps to two lines */
.form-aligned > [class*="col-"] { display: flex; flex-direction: column; justify-content: flex-end; }
.form-aligned > .col-12 > .btn { align-self: flex-start; }
