:root {
  --brand: #0f4c81; --brand-2: #1565c0; --brand-soft: #e8f0f9;
  --bg: #f4f6f9; --card: #fff; --ink: #1f2937; --mute: #6b7280; --line: #e5e7eb; --line-2: #d1d5db;
  --red: #b91c1c; --red-soft: #fdecec; --amber: #b45309; --amber-soft: #fff4e0;
  --green: #15803d; --green-soft: #e7f6ec; --violet: #6d28d9; --violet-soft: #f1ebfd; --gray-soft: #f1f3f5;
  --radius: 12px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --nav-h: 62px; --top-h: 56px;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); -webkit-text-size-adjust: 100%; }
a { color: var(--brand-2); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font-size: 20px; } h2 { font-size: 17px; } h3 { font-size: 15px; }
button, input, select, textarea { font: inherit; color: inherit; }
.mute { color: var(--mute); } .small { font-size: 13px; } .xs { font-size: 12px; }
.row { display: flex; gap: 8px; align-items: center; } .wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }
.between { justify-content: space-between; } .stack > * + * { margin-top: 12px; }
.hidden { display: none !important; }
svg.ic { width: 18px; height: 18px; flex: none; vertical-align: -3px; } /* default icon size; contexts below may override */
.nowrap { white-space: nowrap; } .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pre { white-space: pre-line; }

/* ---------- layout */
.topbar { position: sticky; top: 0; z-index: 30; height: var(--top-h); background: var(--brand); color: #fff; display: flex; align-items: center; gap: 10px; padding: 0 12px; padding-top: env(safe-area-inset-top); }
.topbar .title { font-weight: 600; font-size: 16px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar button { background: transparent; border: 0; color: #fff; padding: 8px; border-radius: 8px; cursor: pointer; }
.topbar button:hover { background: rgba(255,255,255,.12); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; font-weight: 600; font-size: 13px; }
main { padding: 14px 14px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); max-width: 1180px; margin: 0 auto; }
.bottomnav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--line); display: flex; }
.bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--mute); font-size: 11px; font-weight: 500; position: relative; }
.bottomnav a.active { color: var(--brand); }
.bottomnav svg { width: 22px; height: 22px; }
.navbadge { position: absolute; top: 6px; left: 50%; margin-left: 6px; background: var(--red); color: #fff; font-size: 10px; border-radius: 9px; padding: 0 5px; min-width: 16px; text-align: center; line-height: 16px; }
.sidenav { display: none; }
@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - var(--top-h)); }
  .bottomnav { display: none; }
  .sidenav { display: block; background: #fff; border-right: 1px solid var(--line); padding: 12px 8px; position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); }
  .sidenav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--ink); font-weight: 500; position: relative; }
  .sidenav a:hover { background: var(--gray-soft); }
  .sidenav a.active { background: var(--brand-soft); color: var(--brand); }
  .sidenav svg { width: 20px; height: 20px; }
  .sidenav .navbadge { position: static; margin-left: auto; }
  main { padding: 20px 24px 40px; width: 100%; }
}

/* ---------- cards & lists */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.card + .card { margin-top: 12px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.section-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--mute); margin: 22px 2px 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.list { display: grid; gap: 10px; }
.item { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; display: block; color: inherit; border-left: 4px solid transparent; cursor: pointer; }
.item:hover { box-shadow: 0 2px 8px rgba(16,24,40,.12); }
.item.overdue { border-left-color: var(--red); }
.item.done { border-left-color: var(--green); }
.item.blocked { border-left-color: var(--amber); }
.item .t { font-weight: 600; }
.item .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--mute); margin-top: 6px; }
.item .meta span { display: inline-flex; align-items: center; gap: 4px; }
.item .meta svg { width: 14px; height: 14px; }
.empty { text-align: center; padding: 30px 12px; color: var(--mute); }

/* ---------- chips / badges */
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--gray-soft); color: var(--ink); white-space: nowrap; }
.st-New { background: var(--brand-soft); color: var(--brand); }
.st-In-Progress { background: var(--violet-soft); color: var(--violet); }
.st-Pending { background: var(--amber-soft); color: var(--amber); }
.st-Blocked { background: var(--red-soft); color: var(--red); }
.st-Completed { background: var(--green-soft); color: var(--green); }
.st-Closed { background: #e5e7eb; color: #374151; }
.st-Open { background: var(--amber-soft); color: var(--amber); }
.pr-Critical { background: var(--red); color: #fff; } .pr-High { background: var(--red-soft); color: var(--red); }
.pr-Medium { background: var(--amber-soft); color: var(--amber); } .pr-Low { background: var(--gray-soft); color: var(--mute); }
.badge-od { background: var(--red); color: #fff; } .badge-esc { background: #7f1d1d; color: #fff; } .badge-sd { background: var(--amber); color: #fff; }
.badge-ok { background: var(--green); color: #fff; }

/* ---------- progress */
.prog { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.bar { flex: 1; height: 7px; background: var(--gray-soft); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand-2); border-radius: 99px; }
.bar.g > i { background: var(--green); } .bar.r > i { background: var(--red); }
.prog .pt { font-size: 12.5px; color: var(--mute); white-space: nowrap; max-width: 60%; overflow: hidden; text-overflow: ellipsis; }

/* ---------- KPIs & dashboard */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; color: inherit; display: block; }
.kpi .n { font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 12.5px; color: var(--mute); margin-top: 2px; }
.kpi.red .n { color: var(--red); } .kpi.green .n { color: var(--green); } .kpi.amber .n { color: var(--amber); }
.dgrid { display: grid; gap: 12px; }
@media (min-width: 900px) { .dgrid { grid-template-columns: repeat(3, 1fr); } .dgrid.two { grid-template-columns: 1fr 1fr; } }
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); color: inherit; }
.hbar:last-child { border-bottom: 0; }
.hbar .lbl { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .val { font-size: 13px; font-variant-numeric: tabular-nums; }
.hbar .track { grid-column: 1 / -1; height: 8px; background: var(--gray-soft); border-radius: 99px; overflow: hidden; display: flex; }
.hbar .track i { display: block; height: 100%; }
.hbar .track .o { background: var(--brand-2); } .hbar .track .od { background: var(--red); }
.legend { display: flex; gap: 12px; font-size: 12px; color: var(--mute); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }

/* ---------- forms */
label.f { display: block; }
label.f > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--mute); margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=number], input[type=search], select, textarea {
  width: 100%; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; background: #fff; min-height: 44px; }
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-2); outline-offset: -1px; border-color: transparent; }
.fgrid { display: grid; gap: 12px; }
@media (min-width: 640px) { .fgrid.c2 { grid-template-columns: 1fr 1fr; } .fgrid.c3 { grid-template-columns: repeat(3, 1fr); } .span2 { grid-column: span 2; } .span3 { grid-column: 1 / -1; } }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; cursor: pointer; }
.switch input { appearance: none; width: 44px; height: 26px; background: var(--line-2); border-radius: 99px; position: relative; transition: .15s; flex: none; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--brand-2); } .switch input:checked::after { left: 21px; }
.hint { font-size: 12px; color: var(--mute); margin-top: 4px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; font-weight: 600; cursor: pointer; white-space: nowrap; color: var(--ink); }
.btn:hover { background: var(--gray-soft); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; } .btn.primary:hover { background: #0c3f6b; }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.danger { color: var(--red); border-color: #f3c0c0; } .btn.danger:hover { background: var(--red-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.fab { position: fixed; right: 16px; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); z-index: 25; border-radius: 999px; min-height: 52px; padding: 0 20px; box-shadow: 0 4px 14px rgba(15,76,129,.35); }
@media (min-width: 960px) { .fab { bottom: 24px; right: 28px; } }

.seg { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; color: var(--mute); }
.seg button.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* tabs */
.tabs { display: flex; gap: 2px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px; position: sticky; top: calc(var(--top-h) + 6px); z-index: 20; overflow-x: auto; scrollbar-width: none; margin: 12px 0; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 9px 10px; border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--mute); white-space: nowrap; cursor: pointer; }
.tabs button.on { background: var(--brand-soft); color: var(--brand); }
.tabs .cnt { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--gray-soft); font-size: 11.5px; margin-left: 4px; }
.tabs button.on .cnt { background: #fff; }

/* filters */
.filters { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; margin-bottom: 12px; }
.filters .fgrid { grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 900px) { .filters .fgrid { grid-template-columns: repeat(4, 1fr); } }
.filters input, .filters select { min-height: 40px; padding: 8px 10px; font-size: 14px; }

/* modal / bottom sheet */
.overlay { position: fixed; inset: 0; background: rgba(17,24,39,.45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .12s; }
.sheet { background: #fff; width: 100%; max-width: 680px; max-height: 92vh; border-radius: 16px 16px 0 0; display: flex; flex-direction: column; animation: up .18s ease-out; }
@media (min-width: 700px) { .overlay { align-items: center; padding: 20px; } .sheet { border-radius: 16px; } }
.sheet-h { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.sheet-h h2 { flex: 1; font-size: 16px; }
.sheet-b { padding: 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-f { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
.sheet-f .btn { flex: 1; } @media (min-width: 700px) { .sheet-f .btn { flex: 0 0 auto; } }
@keyframes up { from { transform: translateY(24px); opacity: .6; } }
@keyframes fade { from { opacity: 0; } }

#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 20px); z-index: 60; background: #111827; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; max-width: 90vw; }
#toast.show { opacity: 1; } #toast.err { background: var(--red); }

/* timeline */
.tl { position: relative; padding-left: 22px; }
.tl::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-i { position: relative; padding-bottom: 14px; }
.tl-i::before { content: ""; position: absolute; left: -20px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--brand-2); }
.tl-i.ev-completed::before, .tl-i.ev-closed::before { border-color: var(--green); background: var(--green); }
.tl-i.ev-escalated::before { border-color: var(--red); background: var(--red); }
.tl-i.ev-carried_forward::before { border-color: var(--amber); }
.tl-i.ev-comment::before { border-color: var(--mute); }
.tl-h { font-size: 14px; } .tl-h b { font-weight: 600; }
.tl-c { background: var(--gray-soft); border-radius: 8px; padding: 6px 10px; margin-top: 4px; font-size: 13.5px; white-space: pre-line; }
.tl-d { font-size: 12px; color: var(--mute); }

/* key/value */
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
@media (min-width: 700px) { .kv { grid-template-columns: repeat(3, 1fr); } }
.kv > div > span { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--mute); font-weight: 600; }
.kv > div > b { font-weight: 500; }

/* minutes (HTML report) */
.mom h3.sec { background: var(--brand); color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; padding: 7px 10px; border-radius: 6px; margin: 18px 0 10px; }
.mom h4 { color: var(--brand); margin: 14px 0 6px; font-size: 15px; }
.mom ul { margin: 4px 0 8px; padding-left: 20px; }
.mom .act { background: var(--brand-soft); border-left: 3px solid var(--brand); border-radius: 6px; padding: 8px 10px; margin: 6px 0 10px; font-size: 14px; }
.mom .act .meta { font-size: 12.5px; color: var(--mute); margin-top: 3px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 12px; color: var(--brand); background: var(--brand-soft); padding: 7px 8px; }
.tbl td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tblwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.attach { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.attach a { display: block; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--gray-soft); font-size: 11.5px; color: var(--ink); }
.attach img { width: 100%; height: 80px; object-fit: cover; display: block; }
.attach .fn { padding: 4px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach .doc { height: 80px; display: grid; place-items: center; font-weight: 700; color: var(--mute); }

.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(160deg, #0f4c81, #1565c0); }
.login .card { width: 100%; max-width: 380px; padding: 24px; }
.banner { border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.banner.warn { background: var(--amber-soft); color: #7c3f06; } .banner.info { background: var(--brand-soft); color: var(--brand); } .banner.ok { background: var(--green-soft); color: var(--green); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.reviewed-tick { color: var(--green); display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; }
.reviewed-tick svg { width: 14px; height: 14px; }
.pill-cat { font-size: 12px; color: var(--brand); font-weight: 600; }
.rng { width: 100%; accent-color: var(--brand-2); height: 32px; }
.pgbig { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* dashboard: main column + upcoming meetings on the right */
.dash-layout { display: grid; gap: 16px; }
.dash-main { min-width: 0; }
.dash-side { order: -1; }
@media (max-width: 1099px) { .dash-side { order: 0; } }
@media (min-width: 1100px) {
  main:has(.dash-layout) { max-width: 1480px; }
  .dash-layout { grid-template-columns: minmax(0, 1fr) 330px; align-items: start; }
  .dash-side { order: 0; position: sticky; top: calc(var(--top-h) + 16px); max-height: calc(100vh - var(--top-h) - 32px); overflow-y: auto; border-radius: var(--radius); }
}
.up-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 8px; color: inherit; border-bottom: 1px solid var(--line); }
.up-row:last-child { border-bottom: 0; }
.up-row:hover { background: var(--gray-soft); }
.up-when { width: 58px; flex: none; display: flex; flex-direction: column; line-height: 1.2; }
.up-when b { font-size: 13px; }
.up-when span { font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums; }
.up-t { font-weight: 600; font-size: 14px; }
.up-row.today .up-when b { color: var(--amber); }

/* cards side by side in a grid must line up (".card + .card" spacing is for stacked cards) */
.dgrid > .card + .card { margin-top: 0; }

/* ================= corporate dashboard ================= */
:root {
  --viz-new: #4a3aa7; --viz-progress: #2a78d6; --viz-pending: #eda100;
  --viz-critical: #e34948; --viz-good: #1baf7a; --viz-closed: #008300;
  --grid: #e9eaee; --ink-2: #4b5563;
}
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.dash-head h1 { font-size: 22px; letter-spacing: -.01em; }
.dash-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.dash-filters select, .dash-filters input { width: auto; min-width: 150px; min-height: 36px; padding: 6px 10px; font-size: 13.5px; border-radius: 8px; background: #fff; }
@media (max-width: 640px) { .dash-filters select, .dash-filters input { flex: 1 1 45%; min-width: 0; } }

.dash-main > * + * { margin-top: 16px; }
.dash-card { padding: 16px 18px; }
.card + .card.dash-card, .dash-grid > .card + .card { margin-top: 0; }
.dc-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.dc-h h2 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.dc-meta { font-size: 12.5px; color: var(--mute); }
.dc-link { font-size: 13px; font-weight: 600; }
.dash-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .dash-grid.g-2 { grid-template-columns: 1.4fr 1fr; } .dash-grid.g-2b { grid-template-columns: 1.4fr 1fr; } }
.empty.small { padding: 18px 8px; }
.is-critical { color: var(--red) !important; }

/* KPI band: one panel, figures divided by hairlines */
.kpi-band { display: grid; grid-template-columns: 1fr 1fr; padding: 0; overflow: hidden; }
.kb { display: block; padding: 16px 18px; color: inherit; border-top: 1px solid var(--grid); border-left: 1px solid var(--grid); }
.kb:hover { background: #f8f9fb; }
.kb-hero { grid-column: 1 / -1; border-top: 0; border-left: 0; background: linear-gradient(135deg, #0f4c81, #1565c0); color: #fff; }
.kb-hero:hover { background: linear-gradient(135deg, #0d4270, #135cb0); }
.kb-hero .kb-l, .kb-hero .kb-s { color: rgba(255,255,255,.82); }
.kb-hero .kb-v { font-size: 48px; }
.kb-l { font-size: 12.5px; font-weight: 600; color: var(--mute); }
.kb-v { font-size: 30px; font-weight: 650; line-height: 1.15; margin-top: 4px; letter-spacing: -.02em; }
.kb-of, .kb-sep { font-size: 16px; font-weight: 500; color: var(--mute); }
.kb-s { font-size: 12.5px; color: var(--mute); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.kb-s svg.ic { width: 14px; height: 14px; color: var(--red); }
.meter { height: 6px; border-radius: 99px; background: #dce8f8; margin-top: 10px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--viz-progress); border-radius: 99px; }
@media (min-width: 640px) {
  .kpi-band { grid-template-columns: 1.4fr repeat(2, 1fr); }
  .kb-hero { grid-column: auto; grid-row: span 2; display: flex; flex-direction: column; justify-content: center; }
  .kb { border-top: 0; }
  .kb:nth-child(n+4) { border-top: 1px solid var(--grid); }
}
@media (min-width: 1300px) {
  .kpi-band { grid-template-columns: 1.3fr repeat(4, 1fr); }
  .kb-hero { grid-row: auto; }
  .kb:nth-child(n+4) { border-top: 0; }
}

/* segmented status bar: 2px surface gaps between parts, rounded ends */
.segbar { display: flex; gap: 2px; height: 14px; border-radius: 4px; overflow: hidden; margin: 4px 0 14px; }
.segbar a { display: block; min-width: 3px; }
.segbar a:hover { filter: brightness(1.1); }
.seg-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px 14px; }
.seg-legend a { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 13px; padding: 3px 0; }
.seg-legend a.is-zero { opacity: .45; }
.seg-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.seg-legend span { flex: 1; color: var(--ink-2); }
.seg-legend b { font-variant-numeric: tabular-nums; }

/* overdue age: columns from a single baseline, value on the cap */
.agebars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: end; }
.ab { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--mute); }
.ab-col { height: 92px; width: 100%; max-width: 24px; display: flex; align-items: flex-end; border-bottom: 1px solid var(--grid); }
.ab-col i { display: block; width: 100%; background: var(--viz-critical); border-radius: 4px 4px 0 0; min-height: 2px; }
.ab b { color: var(--ink); font-size: 14px; font-variant-numeric: tabular-nums; }
.ok-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--viz-good); margin-right: 4px; }

/* pending actions breakdown table with inline bars */
.dc-tabs { display: inline-flex; background: var(--gray-soft); border-radius: 8px; padding: 3px; }
.dc-tabs button { border: 0; background: transparent; padding: 5px 12px; font-size: 12.5px; font-weight: 600; color: var(--mute); border-radius: 6px; cursor: pointer; }
.dc-tabs button.on { background: #fff; color: var(--brand); box-shadow: 0 1px 2px rgba(16,24,40,.1); }
.bd-table { display: grid; }
.bd-row { display: grid; grid-template-columns: minmax(150px, 1.6fr) minmax(80px, 1.4fr) 48px 62px; gap: 12px; align-items: center; padding: 7px 4px; border-bottom: 1px solid var(--grid); color: inherit; font-size: 13.5px; }
.bd-row:last-child { border-bottom: 0; }
a.bd-row:hover { background: #f8f9fb; }
.bd-head { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); padding-top: 0; }
.bd-bar > span { display: flex; gap: 2px; height: 10px; }
.bd-bar i { display: block; height: 100%; min-width: 2px; }
.bd-bar i:first-child { border-radius: 4px 0 0 4px; } .bd-bar i:last-child { border-radius: 0 4px 4px 0; } .bd-bar i:only-child { border-radius: 4px; }
.bd-bar i.od { background: var(--viz-critical); } .bd-bar i.ot { background: var(--viz-progress); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .bd-row { grid-template-columns: minmax(90px, 1fr) 1fr 40px 48px; gap: 8px; } }

/* this week's meetings */
.wk-list { display: grid; }
.wk-row { display: flex; align-items: center; gap: 10px; padding: 7px 2px; border-bottom: 1px solid var(--grid); color: inherit; font-size: 13.5px; }
.wk-row:last-child { border-bottom: 0; }
.wk-row:hover { background: #f8f9fb; }
.wk-day { width: 62px; flex: none; font-weight: 600; font-size: 12.5px; display: flex; flex-direction: column; line-height: 1.2; }
.wk-day small { font-weight: 400; color: var(--mute); }

/* compact data tables */
.dtable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dtable th { text-align: left; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); padding: 0 10px 8px; border-bottom: 1px solid var(--grid); }
.dtable td { padding: 9px 10px; border-bottom: 1px solid var(--grid); vertical-align: top; }
.dtable tr:last-child td { border-bottom: 0; }
.dtable tbody tr { cursor: pointer; }
.dtable tbody tr:hover td { background: #f8f9fb; }
.dtable th.num, .dtable td.num { text-align: right; }
.t-strong { color: var(--ink); font-weight: 600; }
.bd-name { line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* single-column (phone) layout must not grow wider than the screen */
.dash-layout, .dash-grid { grid-template-columns: minmax(0, 1fr); }
.dash-side, .dash-grid > * { min-width: 0; }
@media (min-width: 900px) { .dash-grid.g-2, .dash-grid.g-2b { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
@media (min-width: 1100px) { .dash-layout { grid-template-columns: minmax(0, 1fr) 330px; } }

/* --- alignment fixes --- */
/* content starts right next to the sidebar instead of floating in the middle of wide screens */
@media (min-width: 960px) {
  main { margin: 0; max-width: 1240px; }
  main:has(.dash-layout) { max-width: 1680px; }
}
/* cards in the same dashboard row share one height; long lists scroll inside their card */
.dash-grid { align-items: stretch; }
.dash-grid > .card { display: flex; flex-direction: column; }
.wk-list { max-height: 380px; overflow-y: auto; margin-right: -6px; padding-right: 6px; }
.bd-table { max-height: 420px; overflow-y: auto; }
/* status legend: even columns */
.seg-legend { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 520px) { .seg-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* AI fill box on the discussion-point form */
.ai-fill { background: #f3f0ff; border: 1px solid #e0d9fb; border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }
.ai-fill label.f > span { color: #4a3aa7; }
