/* TBR Workspace — Atlas Professional Services
   Calm single column, lines + whitespace, light by default, dark via [data-theme="dark"].
   CSP: this is the only stylesheet besides Google Fonts; no inline styles anywhere. */

/* ============ tokens ============ */
:root {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* brand */
  --navy: #0F2A4A;
  --navy-line: rgba(255, 255, 255, 0.08);
  --on-navy: #FFFFFF;
  --on-navy-2: #B8C7DA;
  --accent: #1E6FD9;
  --accent-text: #1A63C4;
  --accent-soft: #E8F1FC;
  --accent-soft-2: #D5E5FA;
  --btn: #1E6FD9;
  --btn-hover: #185DB8;
  --on-btn: #FFFFFF;

  /* surfaces + text */
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --surface-2: #EEF1F5;
  --hover: #EDF1F6;
  --text: #13233A;
  --text-2: #45556A;
  --text-3: #5F6E81;
  --line: #E1E6EC;
  --line-strong: #CAD2DC;
  --track: #E6EAF0;

  /* semantic (separate from the accent) */
  --good: #1B7A50;
  --good-fill: #2E9D6A;
  --good-soft: #E4F3EB;
  --warn: #975A00;
  --warn-fill: #D98A1C;
  --warn-soft: #FCF1DE;
  --crit: #BA3128;
  --crit-fill: #D9463B;
  --crit-soft: #FBE8E6;
  --neutral-fill: #9AA6B5;

  /* pills */
  --done-bg: #E2E8F0;
  --done-fg: #0F2A4A;

  --toast-bg: #13233A;
  --toast-fg: #FFFFFF;
  --shadow-pop: 0 12px 32px rgba(15, 42, 74, 0.14), 0 2px 6px rgba(15, 42, 74, 0.08);
  --shadow-soft: 0 1px 2px rgba(15, 42, 74, 0.06);
  --focus: #1E6FD9;

  --radius: 10px;
  --radius-sm: 7px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --topbar-h: 60px;
}

[data-theme="dark"] {
  --navy: #0A1A2E;
  --navy-line: rgba(255, 255, 255, 0.07);
  --on-navy-2: #A9B9CD;
  --accent: #5B9BF0;
  --accent-text: #85B5F5;
  --accent-soft: rgba(91, 155, 240, 0.14);
  --accent-soft-2: rgba(91, 155, 240, 0.24);
  --btn: #2272DB;
  --btn-hover: #3683E6;

  --bg: #0E1726;
  --surface: #142034;
  --surface-2: #1A2940;
  --hover: #172539;
  --text: #E6ECF4;
  --text-2: #AFBCCD;
  --text-3: #8E9DB1;
  --line: #233249;
  --line-strong: #34465F;
  --track: #22324A;

  --good: #5BCB95;
  --good-fill: #3FB47C;
  --good-soft: rgba(63, 180, 124, 0.14);
  --warn: #F0B660;
  --warn-fill: #E09B38;
  --warn-soft: rgba(224, 155, 56, 0.15);
  --crit: #F4847A;
  --crit-fill: #E85D52;
  --crit-soft: rgba(232, 93, 82, 0.15);
  --neutral-fill: #6E7F95;

  --done-bg: rgba(207, 219, 234, 0.14);
  --done-fg: #DCE5F0;

  --toast-bg: #E6ECF4;
  --toast-fg: #0E1726;
  --shadow-pop: 0 14px 36px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.3);
  --focus: #7DB0F5;
  color-scheme: dark;
}

/* ============ base ============ */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; color-scheme: light; scroll-padding-top: calc(var(--topbar-h) + 64px); }
html[data-theme="dark"] { color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
.theme-switching body, .theme-switching body * {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.2s ease, fill 0.3s ease, stroke 0.3s ease !important;
}
h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.88em; background: var(--surface-2); padding: 1px 6px; border-radius: 5px; }
strong { font-weight: 600; }
::selection { background: var(--accent-soft-2); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }

.i { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.18em; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--surface); color: var(--text); padding: 8px 14px; border-radius: 8px; box-shadow: var(--shadow-pop);
}
.skip-link:focus { top: 10px; }
.noscript { padding: 40px; text-align: center; }

.container { width: 100%; max-width: 1148px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
main { display: block; padding-top: 36px; padding-bottom: 96px; outline: none; }

/* ============ header ============ */
.topbar { background: var(--navy); color: var(--on-navy); border-bottom: 1px solid var(--navy-line); position: sticky; top: 0; z-index: 30; }
.topbar-inner { display: flex; align-items: center; gap: 28px; height: var(--topbar-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--on-navy); text-decoration: none; flex: none; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 30px; height: 30px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.92); object-fit: cover; }
.brand-name { font-weight: 600; font-size: 15px; letter-spacing: -0.005em; }
.topnav { display: flex; align-items: stretch; gap: 4px; height: 100%; }
.topnav-link {
  position: relative; display: inline-flex; align-items: center; padding: 0 12px;
  color: var(--on-navy-2); font-size: 14px; font-weight: 500; text-decoration: none; transition: color 0.15s ease;
}
.topnav-link:hover { color: var(--on-navy); text-decoration: none; }
.topnav-link.active { color: var(--on-navy); }
.topnav-link::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; border-radius: 2px 2px 0 0;
  background: #6FA8F5; transform: scaleX(0); transition: transform 0.25s var(--ease);
}
.topnav-link.active::after { transform: scaleX(1); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.topbar :focus-visible { outline-color: #8CC0FF; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: transparent; color: var(--on-navy-2); cursor: pointer; transition: background 0.15s ease, color 0.15s ease;
}
.icon-btn .i { width: 19px; height: 19px; }
.icon-btn:hover { background: rgba(255, 255, 255, 0.1); color: var(--on-navy); }
.icon-btn-plain { color: var(--text-2); border-radius: 8px; }
.icon-btn-plain:hover { background: var(--hover); color: var(--text); }
.icon-btn-plain[disabled] { opacity: 0.4; cursor: default; background: transparent; }

.menu { position: relative; }
.avatar-btn { border: 0; background: transparent; padding: 3px; border-radius: 50%; cursor: pointer; }
.avatar {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: #1E6FD9; color: #fff; font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.14); transition: box-shadow 0.15s ease;
}
.avatar-btn:hover .avatar, .avatar-btn[aria-expanded="true"] .avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45); }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 250px; z-index: 40;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-pop); padding: 6px; transform-origin: top right;
}
.menu-pop.menu-in { animation: pop-in 0.18s var(--ease) both; }
.menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-name { font-weight: 600; font-size: 14.5px; }
.menu-email { color: var(--text-3); font-size: 13px; word-break: break-all; }
.menu-role { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--accent-text); background: var(--accent-soft); padding: 2px 9px; border-radius: 999px; }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text); font-size: 14px; cursor: pointer; text-align: left;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--hover); }
.menu-item .i { color: var(--text-3); }

/* ============ sample-data bar ============ */
.mockbar { background: var(--surface); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.mockbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.mockbar-text { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sample-pill {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px;
  background: var(--warn-soft); color: var(--warn); font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.mockbar-roles { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.mockbar-label { color: var(--text-3); margin-right: 4px; }
.mini-toggle {
  height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent;
  color: var(--text-2); font-size: 12.5px; font-weight: 500; cursor: pointer; transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.mini-toggle:hover { background: var(--hover); color: var(--text); }
.mini-toggle[aria-pressed="true"] { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }
.mini-link { border: 0; background: none; color: var(--text-3); font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; margin-left: 6px; padding: 4px; }
.mini-link:hover { color: var(--text); }

/* ============ page scaffolding ============ */
.page { min-width: 0; }
.page-head { margin-bottom: 28px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 6px; }
.page-title { font-size: 28px; line-height: 1.2; font-weight: 650; letter-spacing: -0.02em; outline: none; }
.page-lede { margin-top: 8px; color: var(--text-2); font-size: 15px; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }
.view-enter { animation: rise 0.34s var(--ease) both; }
.panel-enter { animation: rise 0.28s var(--ease) both; }
.tabpanel { outline: none; min-height: 240px; }

/* ============ buttons + inputs ============ */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 9px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); font-size: 14px; font-weight: 550; line-height: 1;
  cursor: pointer; white-space: nowrap; text-decoration: none; user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
}
.btn:hover { background: var(--hover); text-decoration: none; }
.btn:active:not([disabled]) { transform: translateY(1px); }
.btn .i { width: 17px; height: 17px; }
.btn-primary { background: var(--btn); border-color: var(--btn); color: var(--on-btn); box-shadow: var(--shadow-soft); }
.btn-primary:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--hover); color: var(--text); }
.btn-danger { background: var(--crit-fill); border-color: var(--crit-fill); color: #fff; }
.btn-danger:hover { background: var(--crit); border-color: var(--crit); }
.btn-quiet-danger:hover { color: var(--crit); background: var(--crit-soft); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 7px; gap: 6px; }
.btn-sm .i { width: 15px; height: 15px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.btn.is-busy { color: transparent !important; pointer-events: none; }
.btn.is-busy > * { visibility: hidden; }
.btn.is-busy::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--text-3) transparent var(--text-3) var(--text-3); animation: spin 0.7s linear infinite;
}
.btn-primary.is-busy::after, .btn-danger.is-busy::after { border-color: #fff transparent #fff #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

.input, textarea, select.input, input[type="search"], input[type="date"] {
  height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 9px;
  background: var(--surface); color: var(--text); font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { height: auto; min-height: 92px; padding: 10px 12px; line-height: 1.55; resize: vertical; width: 100%; }
.input:focus, textarea:focus, input[type="search"]:focus, input[type="date"]:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft-2);
}
select.input {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 17px) 16px, calc(100% - 12px) 16px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
select.input[disabled] { opacity: 0.55; cursor: not-allowed; }
.input-sm { height: 32px; font-size: 13.5px; }
select.input.input-sm { background-position: calc(100% - 17px) 13px, calc(100% - 12px) 13px; }
input[type="date"] { font-variant-numeric: tabular-nums; }
::placeholder { color: var(--text-3); opacity: 0.85; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-inline { flex-direction: row; align-items: center; gap: 10px; }
.field-label { font-size: 13px; font-weight: 550; color: var(--text-2); padding: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; }

.switch {
  appearance: none; -webkit-appearance: none; position: relative; flex: none; margin: 0;
  width: 36px; height: 20px; border-radius: 999px; background: var(--line-strong); cursor: pointer; transition: background 0.2s ease;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.22s var(--ease);
}
.switch:checked { background: var(--btn); }
.switch:checked::after { transform: translateX(16px); }
.switch:disabled { opacity: 0.6; cursor: wait; }
.switch:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.switch-row { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); cursor: pointer; user-select: none; }
.switch-sm { font-size: 13px; }
.switch-sm .switch { width: 30px; height: 17px; }
.switch-sm .switch::after { width: 13px; height: 13px; }
.switch-sm .switch:checked::after { transform: translateX(13px); }

.check { display: flex; align-items: center; gap: 9px; font-size: 14px; cursor: pointer; padding: 5px 0; }
.check input { width: 16px; height: 16px; accent-color: var(--btn); margin: 0; flex: none; }

/* ============ list toolbar ============ */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-bottom: 18px; }
.search { position: relative; display: flex; align-items: center; flex: 0 1 340px; min-width: 0; }
.search .i { position: absolute; left: 12px; width: 17px; height: 17px; color: var(--text-3); pointer-events: none; }
.search input { width: 100%; padding-left: 38px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: transparent; color: var(--text-2); font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.chip:hover { background: var(--hover); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }
.chip-count { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .chip-count { color: inherit; opacity: 0.8; }

/* ============ tables ============ */
.table-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; border-top: 1px solid var(--line); overscroll-behavior-x: contain; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.table th, .table td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table thead th {
  padding-top: 11px; padding-bottom: 11px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text-3); white-space: nowrap; background: var(--bg);
}
.table tbody th { font-weight: 550; }
.table th:first-child, .table td:first-child { padding-left: 4px; }
.table th:last-child, .table td:last-child { padding-right: 4px; }
.table .num { text-align: right; }
.table tbody tr { transition: background 0.12s ease; }
.row-link { cursor: pointer; }
.row-link:hover td { background: var(--hover); }
.cell-main { display: block; }
.cell-sub { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.is-overdue { color: var(--crit) !important; font-weight: 550; }
.nc { color: var(--text-3); font-size: 13px; white-space: nowrap; }

.clients-table { min-width: 780px; }
.clients-table td { padding-top: 15px; padding-bottom: 15px; }
.clients-table th:not(.col-client), .clients-table td:not(.col-client) { width: 1%; white-space: nowrap; }
.clients-table th + th, .clients-table td + td { padding-left: 16px; }
.client-link { color: var(--text); font-weight: 600; font-size: 14.5px; }
.client-link:hover { color: var(--accent-text); text-decoration: none; }
.row-link:hover .client-link { color: var(--accent-text); }
.col-am { white-space: nowrap; }
.col-next { white-space: normal; min-width: 120px; max-width: 160px; }
.col-am { color: var(--text-2); }
.flags { display: flex; flex-wrap: wrap; gap: 3px 16px; margin-top: 5px; }
.flag { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; font-size: 12.5px; color: var(--text-3); }
.flag .i { width: 13px; height: 13px; color: var(--sev-text); }
.flag-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.flags-clear { color: var(--text-3); font-size: 12.5px; align-items: center; gap: 5px; }
.flags-clear .i { width: 13px; height: 13px; color: var(--good); }

.meter-cell { display: inline-flex; align-items: center; gap: 10px; }
.meter { position: relative; display: inline-block; width: 72px; height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; flex: none; }
.meter-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 3px; background: var(--sev, var(--accent)); transition: width 0.6s var(--ease); }
.meter-val { min-width: 44px; text-align: right; }
.val-sev { display: inline-flex; align-items: center; gap: 5px; }
.val-sev .i { width: 14px; height: 14px; color: var(--sev-text); }

/* severity tokens applied per element */
.sev-critical { --sev: var(--crit-fill); --sev-text: var(--crit); --sev-soft: var(--crit-soft); }
.sev-warning { --sev: var(--warn-fill); --sev-text: var(--warn); --sev-soft: var(--warn-soft); }
.sev-good { --sev: var(--good-fill); --sev-text: var(--good); --sev-soft: var(--good-soft); }
.sev-none { --sev: var(--neutral-fill); --sev-text: var(--text-3); --sev-soft: var(--surface-2); }

/* ============ pills + tags ============ */
.pill {
  display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 550; white-space: nowrap; background: var(--surface-2); color: var(--text-2);
}
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--neutral-fill); flex: none; }
.status-notes { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text); }
.status-notes .pill-dot { background: var(--accent); }
.status-draft { background: var(--accent-soft); color: var(--accent-text); }
.status-draft .pill-dot { background: var(--accent); }
.status-presented, .status-finalized, .status-final { background: var(--done-bg); color: var(--done-fg); }
.status-presented .pill-dot, .status-finalized .pill-dot, .status-final .pill-dot { background: currentColor; }
.run-running { background: var(--accent-soft); color: var(--accent-text); }
.run-running .pill-dot { background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
.run-ok { background: var(--good-soft); color: var(--good); }
.run-ok .pill-dot { background: var(--good-fill); }
.run-partial { background: var(--warn-soft); color: var(--warn); }
.run-partial .pill-dot { background: var(--warn-fill); }
.run-failed { background: var(--crit-soft); color: var(--crit); }
.run-failed .pill-dot { background: var(--crit-fill); }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.8); } }

.tag {
  display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap; vertical-align: 1px;
}
.tag .i { width: 12px; height: 12px; }
.tag-internal { background: var(--surface-2); color: var(--text-2); margin-left: 10px; }
.tag-tbr { background: var(--accent-soft); color: var(--accent-text); }
.tag-v2 { background: var(--accent-soft); color: var(--accent-text); height: 24px; padding: 0 10px; font-size: 12px; }
.tag-you { background: var(--accent-soft); color: var(--accent-text); margin-left: 8px; }

/* ============ tabs ============ */
.tabs {
  position: sticky; top: var(--topbar-h); z-index: 20; display: flex; gap: 2px; margin-bottom: 4px;
  overflow-x: auto; scrollbar-width: none; background: var(--bg); box-shadow: inset 0 -1px 0 var(--line);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; flex: none; padding: 12px 14px 13px; border: 0; background: none; cursor: pointer;
  color: var(--text-2); font-size: 14.5px; font-weight: 550; border-radius: 8px 8px 0 0; transition: color 0.15s ease, background 0.15s ease;
}
.tab:first-child { margin-left: -4px; }
.tab:hover { color: var(--text); background: var(--hover); }
.tab[aria-selected="true"] { color: var(--text); }
.tab:focus-visible { outline-offset: -3px; }
.tab-indicator {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 0; border-radius: 2px; background: var(--accent);
  transition: transform 0.32s var(--ease), width 0.32s var(--ease); pointer-events: none;
}
.tab-indicator.no-anim { transition: none; }

/* ============ client header ============ */
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-3); margin-bottom: 14px; margin-left: -2px; }
.back-link .i { width: 15px; height: 15px; transition: transform 0.2s var(--ease); }
.back-link:hover { color: var(--text); text-decoration: none; }
.back-link:hover .i { transform: translateX(-2px); }
.client-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; margin-bottom: 24px; min-height: 64px; }
.client-title { min-width: 0; flex: 1 1 420px; }
.client-meta { display: flex; flex-wrap: wrap; gap: 4px 0; margin-top: 8px; color: var(--text-3); font-size: 14px; }
.client-meta strong { color: var(--text-2); font-weight: 550; }
.client-meta > span + span::before { content: "·"; margin: 0 10px; color: var(--line-strong); }
.client-head-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; padding-top: 6px; }
.head-asof { font-size: 12.5px; color: var(--text-3); }

/* ============ sections ============ */
.section { padding: 30px 0; border-top: 1px solid var(--line); min-width: 0; }
.tabpanel > .section:first-child, .section-first { border-top: 0; padding-top: 26px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.section-title { font-size: 16.5px; font-weight: 600; letter-spacing: -0.01em; }
.section-note { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.section-desc { color: var(--text-2); font-size: 14px; margin: -6px 0 20px; max-width: 70ch; }
.section-foot { color: var(--text-3); font-size: 13px; margin-top: 16px; }
.subhead { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); margin: 24px 0 8px; }
.quiet-line { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 14px; }
.quiet-line .i { color: var(--good); }
.plain { color: var(--text-2); }
.readonly-line { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 14px; padding: 12px 0 4px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 56px; border-top: 1px solid var(--line); }
.split > .section { border-top: 0; }

/* ============ KPI strip ============ */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 26px 0 6px; padding: 0; }
.kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 14px; }
.kpi { margin: 0; padding: 2px 18px 4px; min-width: 0; display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; } /* label, number and sub line up across the row when a label wraps */
.kpi:first-child { padding-left: 0; }
.kpi + .kpi { border-left: 1px solid var(--line); }
.kpi dd { margin: 0; }
.kpi-label { font-size: 13px; color: var(--text-3); font-weight: 500; text-wrap: balance; } /* wraps: a cut-off label hid what the number meant */
.kpi-value { display: flex; align-items: center; gap: 8px; margin-top: 4px !important; font-size: 27px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; }
.kpi-sev { display: inline-flex; }
.kpi-sev .i { width: 18px; height: 18px; color: var(--sev-text); }
.kpi-sub { margin-top: 4px !important; font-size: 12.5px; color: var(--text-3); line-height: 1.4; }
.kpi-null .kpi-value { font-size: 14px; font-weight: 500; letter-spacing: 0; min-height: 32px; }

/* ============ findings ============ */
.findings { list-style: none; margin: 0; padding: 0; }
.finding { position: relative; display: flex; gap: 14px; padding: 15px 4px 15px 20px; border-bottom: 1px solid var(--line); }
.finding:first-child { border-top: 1px solid var(--line); }
.finding::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--sev); }
.finding-icon { padding-top: 2px; color: var(--sev-text); }
.finding-icon .i { width: 18px; height: 18px; }
.finding-body { min-width: 0; flex: 1 1 auto; }
.finding-title { font-weight: 600; font-size: 14.5px; color: var(--text); }
.finding-detail { margin-top: 3px; color: var(--text-2); font-size: 14px; }
.finding-source { flex: 0 0 auto; max-width: 240px; padding-top: 2px; text-align: right; color: var(--text-3); font-size: 12.5px; }
.findings-good .finding { padding-top: 11px; padding-bottom: 11px; }
.findings-good .finding-title { font-weight: 550; }
.findings-good .finding-detail { font-size: 13.5px; }

/* ============ lifecycle ============ */
.lc { display: grid; gap: 14px; }
.lc-row { display: grid; grid-template-columns: 104px minmax(0, 1fr) 40px; align-items: center; gap: 14px; }
.lc-label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sev-text); }
.lc-track { position: relative; height: 10px; border-radius: 5px; background: var(--track); overflow: hidden; }
.lc-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 5px; background: var(--sev); transition: width 0.7s var(--ease); }
.lc-count { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ============ service ============ */
.mini-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; }
.mini-stats div { min-width: 0; }
.mini-stats dt { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.mini-stats dd { margin: 2px 0 0; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.unit { font-size: 13px; font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.themes { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.theme { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 36px; align-items: center; gap: 12px; font-size: 13.5px; }
.theme-label { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.theme-track { position: relative; height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.theme-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 3px; background: var(--accent); opacity: 0.75; transition: width 0.6s var(--ease); }
.theme-count { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }

/* ============ identity & email ============ */
.compare { list-style: none; margin: 0; padding: 0; }
.compare-row {
  display: grid; grid-template-columns: minmax(150px, 220px) minmax(80px, 1fr) 64px minmax(0, 1.4fr);
  align-items: center; gap: 16px; padding: 11px 12px; margin: 0 -12px; border-radius: 8px; font-size: 14px;
}
.compare-row + .compare-row { box-shadow: inset 0 1px 0 var(--line); }
.compare-row.is-flagged { background: var(--warn-soft); box-shadow: none; }
.compare-row.is-flagged + .compare-row { box-shadow: none; }
.compare-label { color: var(--text-2); }
.compare-track { position: relative; height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.compare-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 3px; background: var(--neutral-fill); transition: width 0.6s var(--ease); }
.is-flagged .compare-fill { background: var(--warn-fill); }
.compare-value { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.compare-note { display: flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 13px; min-width: 0; }
.is-flagged .compare-note { color: var(--warn); font-weight: 550; }
.compare-note .i { width: 14px; height: 14px; }

/* ============ sources ============ */
.sources { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.source { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--text-2); min-width: 0; }
.source .i { width: 16px; height: 16px; }
.src-ok .i { color: var(--good); }
.src-error .i { color: var(--crit); }
.src-skipped .i { color: var(--text-3); }
.src-skipped .source-name { color: var(--text-3); }
.source-status { font-size: 12.5px; color: var(--text-3); }
.src-error .source-status { color: var(--crit); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }

/* ============ collapse ============ */
.toggle .toggle-chev { transition: transform 0.28s var(--ease); }
.toggle[aria-expanded="true"] .toggle-chev { transform: rotate(180deg); }
.collapse { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.36s var(--ease); }
.collapse.open { grid-template-rows: 1fr; }
.collapse-inner { position: relative; min-height: 0; overflow: hidden; opacity: 0; transition: opacity 0.25s ease; }
.collapse.open > .collapse-inner { opacity: 1; }

/* ============ devices ============ */
.devices-table { min-width: 1040px; font-size: 13.5px; }
.devices-table td, .devices-table tbody th { padding-top: 10px; padding-bottom: 10px; }
.dev-name { white-space: nowrap; }
.dev-model, .dev-os { color: var(--text-2); white-space: nowrap; }
.is-stale { color: var(--warn); font-weight: 550; }
.agent { display: inline-flex; align-items: center; gap: 4px; }
.agent .i { width: 15px; height: 15px; }
.agent-yes { color: var(--good); }
.agent-no { color: var(--crit); font-size: 12.5px; font-weight: 550; }
.lc-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; padding: 2px 9px; border-radius: 999px; background: var(--sev-soft); color: var(--sev-text); white-space: nowrap; }
.lc-pill.sev-good, .lc-pill.sev-none { background: transparent; padding-left: 0; font-weight: 500; color: var(--text-2); }
.lc-pill.sev-good::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good-fill); }
.devices-table .cell-sub { max-width: 260px; white-space: normal; }

/* ============ notes ============ */
.note-form { display: grid; gap: 16px; padding: 20px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-2); }
.seg-opt { position: relative; }
.seg-opt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg-opt span {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 550;
  color: var(--text-2); transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.seg-opt span .i { width: 15px; height: 15px; opacity: 0.8; }
.seg-opt:hover span { color: var(--text); }
.seg-opt input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(15, 42, 74, 0.14); }
[data-theme="dark"] .seg-opt input:checked + span { background: var(--line-strong); }
.seg-opt input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 1px; }
.note-form-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; }
.note-form-foot .btn { margin-left: auto; }
.char-count { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.char-count.is-near { color: var(--warn); }

.notes { list-style: none; margin: 18px 0 0; padding: 0; }
.note { padding: 18px 0; border-bottom: 1px solid var(--line); transition: opacity 0.2s ease, transform 0.2s ease; }
.note:first-child { border-top: 1px solid var(--line); }
.note-fresh { animation: note-in 0.5s var(--ease) both; }
@keyframes note-in { from { opacity: 0; transform: translateY(-6px); background: var(--accent-soft); } to { opacity: 1; transform: none; background: transparent; } }
.note-leaving { opacity: 0; transform: translateX(8px); }
.notes-empty { border: 0 !important; }
.note-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--text-3); }
.note-cat { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text-2); }
.note-cat .i { width: 14px; height: 14px; color: var(--text-3); }
.cat-risk .i { color: var(--warn); }
.note-author { color: var(--text-2); }
.note-text { margin-top: 8px; font-size: 14.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 78ch; }
.note-edit { margin-top: 10px; display: grid; gap: 10px; }
.note-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; min-height: 30px; }
.note-actions { display: flex; align-items: center; gap: 4px; }
.confirm {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 4px 4px 4px 12px; border-radius: 9px;
  background: var(--crit-soft); animation: fade 0.18s ease both;
}
.confirm-text { font-size: 13.5px; color: var(--crit); font-weight: 550; margin-right: 4px; }

/* ============ TBR ============ */
.schedule, .pack-form, .refresh-form { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.prices-table { max-width: 520px; }
.prices-table input { width: 9rem; max-width: 100%; text-align: right; }
.prices-form .btn { margin-top: 14px; }

.doc {
  margin-top: 4px; padding: 40px 48px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  max-width: 860px; box-shadow: var(--shadow-soft);
}
.doc-head { padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.doc-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
.doc-title { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; margin-top: 6px; }
.doc-sub { color: var(--text-3); font-size: 13.5px; margin-top: 4px; }
.doc-sec { padding: 20px 0 4px; }
.doc-sec h4 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.doc-sec h5 { font-size: 13px; font-weight: 600; color: var(--text-2); margin: 16px 0 6px; }
.doc-sec p { color: var(--text-2); font-size: 14.5px; line-height: 1.65; }
.doc-list { margin: 6px 0 0; padding-left: 20px; color: var(--text-2); font-size: 14.5px; line-height: 1.65; }
.doc-list li { padding: 1px 0; }
.doc-list strong { color: var(--text); }
.doc-wins { list-style: none; padding-left: 0; margin-top: 12px; }
.doc-wins li { display: flex; align-items: center; gap: 8px; }
.doc-wins .i { color: var(--good); width: 16px; height: 16px; }
.doc-recs { margin: 6px 0 0; padding-left: 22px; color: var(--text-2); font-size: 14.5px; line-height: 1.6; }
.doc-recs li { padding: 3px 0; }
.doc-recs strong { color: var(--text); }
.doc-notes { list-style: none; padding-left: 0; }
.doc-notes li { padding: 6px 0; }
.doc-note-cat { display: inline-block; min-width: 86px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.doc-nc, .doc-muted { color: var(--text-3) !important; font-size: 13.5px !important; }

/* ============ history charts ============ */
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 56px; }
.chart { margin: 0; min-width: 0; }
.chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.chart-title { font-weight: 600; font-size: 14.5px; }
.chart-value { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.chart-sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.chart-plot { position: relative; height: 188px; margin-top: 14px; border-radius: 8px; }
.chart-box:focus-visible { outline-offset: 4px; }
.c-svg { display: block; overflow: visible; }
.c-grid line { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.c-axis-text { fill: var(--text-3); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.c-end-text { fill: var(--text); font-size: 12px; font-weight: 600; font-family: var(--font); font-variant-numeric: tabular-nums; }
.c-empty { fill: var(--text-3); font-size: 13px; font-family: var(--font); }
.c-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.c-draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 0.9s var(--ease) 0.05s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.c-area { fill: var(--accent); fill-opacity: 0.09; animation: fade 0.6s ease both; }
.c-dot { fill: var(--accent); stroke: var(--bg); stroke-width: 2; }
.c-hot { opacity: 0; transition: opacity 0.12s ease; }
.c-hot.on { opacity: 1; }
.c-cross { stroke: var(--line-strong); stroke-width: 1; opacity: 0; shape-rendering: crispEdges; transition: opacity 0.12s ease; }
.c-cross.on { opacity: 1; }
.c-hit { fill: transparent; cursor: crosshair; }
.c-tip {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); pointer-events: none; z-index: 2;
  display: flex; flex-direction: column; align-items: center; padding: 6px 10px; border-radius: 8px; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-pop); font-size: 12px; color: var(--text-3);
  opacity: 0; transition: opacity 0.12s ease;
}
.c-tip strong { color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
.c-tip.on { opacity: 1; }
.history-table { min-width: 620px; }

/* ============ data pack ============ */
.pack-result { margin-top: 18px; }
.pack-result:empty { display: none; }
.pack-ok, .pack-err { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 10px; font-size: 14px; animation: rise 0.25s var(--ease) both; }
.pack-ok { background: var(--good-soft); color: var(--text); }
.pack-ok .i { color: var(--good); margin-top: 2px; }
.pack-err { background: var(--crit-soft); color: var(--crit); }
.pack-err .i { margin-top: 2px; }
.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.file-list li { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--text-2); }
.file-list .i { color: var(--text-3); width: 16px; height: 16px; }

/* ============ admin ============ */
.users-table { min-width: 720px; }
.users-table .col-remove { width: 1%; text-align: right; }
.btn-link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-text); text-decoration: underline; cursor: pointer; }
.btn-link:hover { color: var(--accent); }
.btn-link.is-busy { opacity: .6; pointer-events: none; }
.remove-row .confirm { justify-content: flex-start; }
.col-person .person-name { display: flex; align-items: center; font-weight: 550; }
.col-access { color: var(--text-2); }
.col-access { white-space: nowrap; }
.col-access .btn { margin-left: 8px; }
.col-seen { color: var(--text-3); white-space: nowrap; }
.share-row td { padding: 0 !important; border-bottom: 0; }
.share-row:hover td { background: transparent; }
.share-box { padding: 14px 16px 18px; margin: 0 0 12px; border-radius: 10px; background: var(--surface-2); }
.share-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 20px; }
.share-actions { margin-top: 12px; }
.api-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 0 18px; }
.api-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 16px; margin: 14px 0; }
.api-facts dt { font-size: 12px; color: var(--text-2); font-weight: 550; }
.api-facts dd { margin: 2px 0 0; font-size: 13.5px; overflow-wrap: anywhere; }
.api-help p { margin: 0 0 8px; font-size: 13.5px; color: var(--text-2); overflow-wrap: anywhere; }
.api-help strong { color: var(--text); font-weight: 600; }
.api-card > .btn { margin: 6px 0 14px; }
.api-form { padding: 4px 0 16px; }
.api-warn { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; font-size: 13px; color: var(--text-2); }
.api-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.api-actions { margin-top: 14px; }
.field-hint { font-size: 12px; color: var(--text-2); }
.req { color: var(--text-2); }
.client-logo { display: inline-flex; align-items: center; justify-content: center; flex: none; background: #fff; border-radius: 6px; overflow: hidden; }
.client-logo:empty { display: none; }
.client-logo img { display: block; height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.client-logo-lg { height: 44px; max-width: 168px; padding: 4px 8px; margin-right: 14px; box-shadow: 0 0 0 1px var(--line); }
.client-logo-sm { height: 22px; max-width: 76px; padding: 2px 4px; margin-right: 8px; vertical-align: middle; box-shadow: 0 0 0 1px var(--line); }
.client-name-row { display: flex; align-items: center; min-width: 0; }
.add-user { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 0 0 16px; }
.add-user-email { flex: 1 1 260px; min-width: 0; }
.add-user-hint { flex-basis: 100%; margin: 0; font-size: 13px; color: var(--text-2); }
.runs-table { min-width: 820px; }
.col-trigger { color: var(--text-2); white-space: nowrap; }
.is-bad { color: var(--crit); font-weight: 600; }
.row-new td { animation: row-flash 1.6s ease both; }
@keyframes row-flash { from { background: var(--accent-soft); } to { background: transparent; } }
.day-picker { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.audit-table { min-width: 760px; }
.col-time { white-space: nowrap; color: var(--text-2); }
.col-actor { white-space: nowrap; }
.col-detail { color: var(--text-3); font-size: 13px; }
.action { font-weight: 550; white-space: nowrap; }

/* ============ states + skeletons ============ */
.state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 64px 16px; }
.state-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--surface-2); color: var(--text-3); margin-bottom: 4px; }
.state-icon .i { width: 24px; height: 24px; }
.state-error .state-icon { background: var(--crit-soft); color: var(--crit); }
.state-title { font-size: 17px; font-weight: 600; }
.state-body { color: var(--text-2); max-width: 46ch; font-size: 14.5px; }
.state .btn { margin-top: 8px; }

.skel {
  border-radius: 6px; height: 12px;
  background: linear-gradient(90deg, var(--track) 0%, var(--surface-2) 45%, var(--track) 90%);
  background-size: 900px 100%; animation: shimmer 1.3s linear infinite;
}
[data-theme="dark"] .skel { background-image: linear-gradient(90deg, var(--track) 0%, var(--line-strong) 45%, var(--track) 90%); }
@keyframes shimmer { from { background-position: -450px 0; } to { background-position: 450px 0; } }
.skel-title { height: 26px; width: min(420px, 70%); margin: 4px 0 12px; }
.skel-line { margin: 10px 0; }
.skel-kpi { height: 26px; width: 70%; margin-top: 10px; }
.skel-block { padding: 22px 0; border-top: 1px solid var(--line); }
.skel-table { border-top: 1px solid var(--line); }
.skel-row { display: grid; grid-template-columns: 2.4fr repeat(5, 1fr); gap: 24px; padding: 20px 4px; border-bottom: 1px solid var(--line); }
.skel-cell { height: 12px; }
.kpi-skel { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px; padding: 26px 0; }
.w-50 { width: 50%; } .w-60 { width: 60%; } .w-70 { width: 70%; } .w-80 { width: 80%; } .w-90 { width: 90%; }
.loading { animation: fade 0.3s ease 0.08s both; }

/* ============ gate (sign-in etc.) ============ */
.gate { display: grid; place-items: center; min-height: calc(100vh - var(--topbar-h) - 140px); }
.gate-box { width: 100%; max-width: 440px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.gate-logo { width: 72px; height: 72px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px #fff, 0 10px 30px rgba(15, 42, 74, 0.18); margin-bottom: 10px; }
.gate-title { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; }
.gate-lede { color: var(--text-2); font-size: 15.5px; margin-bottom: 14px; }
.gate-fine { color: var(--text-3); font-size: 13.5px; }
.gate-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--surface-2); color: var(--text-2); }
.gate-icon .i { width: 22px; height: 22px; }
.gate-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.gate-fine a { color: var(--accent-text); }
.gate-error { display: flex; align-items: flex-start; gap: 8px; text-align: left; padding: 10px 14px; border-radius: 10px; background: var(--crit-soft); color: var(--crit); font-size: 14px; width: 100%; }
.gate-error .i { margin-top: 3px; }
.i-ms { width: 18px; height: 18px; }

/* ============ toasts ============ */
.toasts {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100vw - 32px);
}
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 100%;
  padding: 11px 18px 11px 14px; border-radius: 12px; background: var(--toast-bg); color: var(--toast-fg);
  box-shadow: var(--shadow-pop); font-size: 14px; font-weight: 500; cursor: default; animation: toast-in 0.32s var(--ease) both;
}
.toast .i { width: 18px; height: 18px; color: #6FD3A3; }
[data-theme="dark"] .toast .i { color: var(--good-fill); }
.toast-error .i { color: #FF9A90; }
[data-theme="dark"] .toast-error .i { color: var(--crit-fill); }
.toast-info .i { color: #8CC0FF; }
[data-theme="dark"] .toast-info .i { color: var(--btn); }
.toast.out { animation: toast-out 0.22s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

/* ============ responsive ============ */
@media (max-width: 980px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 22px; }
  .kpi:nth-child(3n + 1) { border-left: 0; padding-left: 0; }
  .kpi-skel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .split { grid-template-columns: minmax(0, 1fr); border-top: 0; }
  .split > .section { border-top: 1px solid var(--line); }
  .charts { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .compare-row { grid-template-columns: minmax(0, 1fr) 56px; row-gap: 6px; }
  .compare-track { grid-column: 1 / -1; grid-row: 2; }
  .compare-note { grid-column: 1 / -1; }
  .compare-note:empty { display: none; }
  .doc { padding: 28px 24px; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .container { padding-left: 16px; padding-right: 16px; }
  main { padding-top: 24px; }
  .topbar-inner { gap: 12px; }
  .brand-name { display: none; }
  .topnav-link { padding: 0 10px; }
  .page-title { font-size: 23px; }
  .page-head { margin-bottom: 22px; }
  .toolbar { gap: 12px; }
  .search { flex: 1 1 100%; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:nth-child(3n + 1) { border-left: 1px solid var(--line); padding-left: 18px; }
  .kpi:nth-child(2n + 1) { border-left: 0; padding-left: 0; }
  .kpi-value { font-size: 23px; }
  .kpi-skel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .client-head-side { align-items: flex-start; flex-direction: row; flex-wrap: wrap; padding-top: 0; }
  .client-meta { gap: 2px 14px; }
  .client-meta > span + span::before { content: none; }
  .tab { padding: 11px 11px 12px; font-size: 14px; }
  .lc-row { grid-template-columns: 92px minmax(0, 1fr) 32px; gap: 10px; }
  .doc { padding: 22px 18px; border-radius: 12px; }
  .note-form { padding: 14px; }
  .note-form-foot .btn { margin-left: 0; width: 100%; }
  .field-inline { flex-direction: column; align-items: stretch; gap: 6px; width: 100%; }
  .schedule .btn, .pack-form .btn, .refresh-form .btn { width: 100%; }
  .mockbar-note { display: none; }
  .mockbar-text { order: 1; }
  #exitMock { order: 2; margin-left: auto; }
  .mockbar-roles { order: 3; flex-basis: 100%; margin-left: 0; }
  .mockbar-label { display: none; }
  .finding { flex-wrap: wrap; row-gap: 4px; }
  .finding-source { flex-basis: 100%; max-width: none; text-align: left; padding: 0 0 0 32px; }

  /* client list becomes stacked rows: no sideways scrolling for the main list */
  .clients-wrap { overflow: visible; }
  .clients-table { min-width: 0; display: block; }
  .clients-table thead { display: none; }
  .clients-table tbody { display: block; }
  .clients-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .clients-table td { display: block; padding: 0 !important; border: 0 !important; width: auto !important; white-space: normal !important; text-align: left !important; }
  .clients-table td.col-client { grid-column: 1 / -1; }
  .clients-table td[data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 3px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3);
  }
  .clients-table .col-am { order: 10; }
  .clients-table .meter-val { min-width: 0; text-align: left; }
  .row-link:hover td { background: transparent; }
  .flag-text { white-space: normal; max-width: none; }
  .theme { grid-template-columns: minmax(0, 1fr) 72px 32px; }
  .skel-row { grid-template-columns: 2fr 1fr 1fr; }
  .skel-row .skel-cell:nth-child(n + 4) { display: none; }
}

/* ============ reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important;
    transition-duration: 0.01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important;
  }
  .skel { animation: none !important; }
  .c-draw { stroke-dasharray: none; stroke-dashoffset: 0; }
}

/* ============ forced colors ============ */
@media (forced-colors: active) {
  .meter-fill, .lc-fill, .theme-fill, .compare-fill, .tab-indicator { background: Highlight; forced-color-adjust: none; }
  .finding::before { background: CanvasText; }
}


/* ============ client report (TBR tab preview + PDF) ============ */
.export-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.export-bar .btn .i { width: 15px; height: 15px; }
.schedule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px 28px; margin: 14px 0 4px; }
.schedule-grid dt { font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.schedule-grid dd { margin: 4px 0 0; font-size: 15px; font-weight: 550; }
.tbr-status { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 650; background: var(--surface-2); color: var(--text-2); }
.tbr-status.is-open { background: var(--accent-soft); color: var(--accent-text); }

.report { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 40px 44px; margin-top: 16px; box-shadow: var(--shadow-soft); color: var(--text); }
.r-cover { padding-bottom: 22px; border-bottom: 3px solid var(--accent); margin-bottom: 8px; }
.r-logo { width: 48px; height: 48px; border-radius: 50%; display: block; margin-bottom: 16px; }
.r-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); }
.r-title { font-size: 30px; font-weight: 750; letter-spacing: -0.02em; margin-top: 6px; color: var(--text); }
.r-meta { margin-top: 6px; color: var(--text-2); font-size: 14px; }
.r-meta-2 { margin-top: 2px; color: var(--text-3); font-size: 13px; }
.r-sec { padding: 26px 0 6px; border-bottom: 1px solid var(--line); }
.r-sec:last-of-type { border-bottom: 0; }
.r-h { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; color: var(--text); margin-bottom: 12px; }
.r-sub { font-size: 14px; font-weight: 650; margin: 18px 0 8px; color: var(--text); }
.r-p { color: var(--text-2); font-size: 14.5px; line-height: 1.65; margin: 0 0 10px; max-width: 78ch; }
.r-note { color: var(--text-3); font-size: 12.5px; font-style: italic; margin-top: 10px; }
.r-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 6px 0 14px; padding: 0; }
.r-kpi { margin: 0; padding: 14px 16px 14px 18px; border-radius: 10px; background: var(--surface-2); border-left: 4px solid var(--accent); min-width: 0; }
.r-kpi.sev-critical, .r-kpi.sev-warning, .r-kpi.sev-good { background: var(--sev-soft); border-left-color: var(--sev); }
.r-kpi dt { font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-3); }
.r-kpi-value { margin: 6px 0 2px; font-size: 26px; font-weight: 750; letter-spacing: -0.02em; color: var(--text); }
.r-kpi.sev-critical .r-kpi-value, .r-kpi.sev-warning .r-kpi-value, .r-kpi.sev-good .r-kpi-value { color: var(--sev-text); }
.r-kpi-sub { margin: 0; font-size: 12.5px; color: var(--text-2); line-height: 1.4; }
.r-list { margin: 4px 0 8px; padding: 0; list-style: none; color: var(--text-2); font-size: 14.5px; line-height: 1.6; }
.r-list li { display: flex; gap: 8px; align-items: flex-start; padding: 2px 0; }
.r-list li::before { content: ""; flex: 0 0 6px; height: 6px; margin-top: 9px; border-radius: 50%; background: var(--line-strong); }
.r-list-good li::before, .r-list-warning li::before, .r-list-critical li::before { display: none; }
.r-list .i { flex: 0 0 16px; width: 16px; height: 16px; margin-top: 3px; }
.r-list-good .i { color: var(--good); }
.r-list-warning .i { color: var(--warn); }
.r-recs { margin: 4px 0 6px; padding: 0; list-style: none; counter-reset: rec; }
.r-recs li { counter-increment: rec; position: relative; padding: 10px 0 10px 44px; border-bottom: 1px solid var(--line); }
.r-recs li:last-child { border-bottom: 0; }
.r-recs li::before { content: counter(rec); position: absolute; left: 0; top: 10px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; background: var(--sev, var(--accent)); }
.r-rec-title { font-weight: 650; font-size: 15px; color: var(--text); }
.r-rec-detail { margin-top: 3px; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.r-table-wrap { overflow-x: auto; margin: 6px 0 12px; }
.r-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.r-table th, .r-table td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.r-table thead th { background: var(--navy); color: #fff; font-size: 12px; font-weight: 650; letter-spacing: 0.02em; border-bottom: 0; }
.r-table tbody tr:nth-child(even) td { background: var(--bg); }
.r-table .num { text-align: right; }
.r-pill { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--sev-text); white-space: nowrap; }
.trend-better { color: var(--good); font-weight: 650; }
.trend-worse { color: var(--crit); font-weight: 650; }
.r-arrow { font-size: 10px; margin-right: 4px; }
.r-chart { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin: 8px 0 12px; }
.r-bars svg { width: 100%; max-width: 560px; height: auto; }
.r-arc.sev-critical { stroke: var(--crit-fill); }
.r-arc.sev-warning { stroke: var(--warn-fill); }
.r-arc.sev-good { stroke: var(--good-fill); }
.r-arc.sev-none { stroke: var(--neutral-fill); }
.r-donut-total { font-size: 26px; font-weight: 750; fill: var(--text); }
.r-donut-label { font-size: 11px; fill: var(--text-3); }
.r-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; color: var(--text-2); }
.r-legend li { display: flex; align-items: center; gap: 8px; }
.r-legend strong { margin-left: 6px; color: var(--text); }
.r-legend-inline { display: flex; gap: 18px; }
.r-swatch { width: 11px; height: 11px; border-radius: 3px; display: inline-block; background: var(--sev); }
.r-swatch.r-bar { background: var(--accent); }
.r-swatch.r-bar-2 { background: var(--accent-soft-2); }
.r-bar { fill: var(--accent); }
.r-bar-2 { fill: var(--accent-soft-2); }
.r-bar-val { font-size: 11px; fill: var(--text-2); font-weight: 600; }
.r-bar-label { font-size: 12px; fill: var(--text-3); }
/* Report "Since our last review": the Overview's then-and-now design, with the lines drawn in SVG for print */
.r-tn { margin-top: 12px; }
.r-db { display: block; width: 100%; max-width: 220px; height: 18px; }
.r-db-track { stroke: var(--track); stroke-width: 2; }
.r-db-seg { fill: var(--bar-neutral); }
.r-db-then { fill: var(--surface); stroke: var(--text-3); stroke-width: 2; }
.r-db-now { fill: var(--bar-neutral); stroke: var(--surface); stroke-width: 2; }
.tn-row.trend-better .r-db-seg, .tn-row.trend-better .r-db-now { fill: var(--good-fill); }
.tn-row.trend-worse .r-db-seg, .tn-row.trend-worse .r-db-now { fill: var(--crit-fill); }
.r-axis { stroke: var(--line-strong); stroke-width: 1; }
.r-foot { margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 12px; }
.w-10 { width: 10%; } .w-11 { width: 11%; } .w-12 { width: 12%; } .w-13 { width: 13%; } .w-15 { width: 15%; }
.w-16 { width: 16%; } .w-17 { width: 17%; } .w-18 { width: 18%; } .w-20 { width: 20%; } .w-21 { width: 21%; }
.w-22 { width: 22%; } .w-24 { width: 24%; } .w-28 { width: 28%; } .w-30 { width: 30%; } .w-33 { width: 33%; }
.w-34 { width: 34%; } .w-40 { width: 40%; } .w-50 { width: 50%; } .w-55 { width: 55%; } .w-70 { width: 70%; }

/* Overview additions */
.services-table th .cell-sub, .opps-table th .cell-sub { font-weight: 400; }
.services-table tr.is-muted th, .services-table tr.is-muted td { color: var(--text-3); }
.cell-wrap { white-space: normal; max-width: 320px; font-size: 13px; color: var(--text-2); }
.cell-note { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; color: var(--warn); }
.cell-note .i { width: 13px; height: 13px; }
.cell-note .tag-internal { margin-left: 0; }
.changes-table .trend-better, .changes-table .trend-worse { white-space: nowrap; }
.agreements-table tbody th { vertical-align: top; white-space: normal; max-width: 220px; }
.agreements-table tr.group-start th, .agreements-table tr.group-start td { border-top: 1px solid var(--line-strong); }
.agreements-table tfoot th, .agreements-table tfoot td { border-bottom: 0; font-weight: 600; }
.billing-table tr.is-flagged th { color: var(--warn); }
.cell-sub-inline { font-size: 12.5px; color: var(--text-3); }
.kpi-internal .kpi-label { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kpi-internal .tag-internal { margin-left: 0; text-transform: none; letter-spacing: 0; }
.kpi-internal .kpi-sub { line-height: 1.45; }

@media (max-width: 980px) { .r-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .report { padding: 24px 18px; border-radius: 12px; }
  .r-title { font-size: 24px; }
  .r-kpis { grid-template-columns: minmax(0, 1fr); }
  .export-bar { width: 100%; }
}

/* ============ print: the client report only (export to PDF) ============ */
#printRoot { display: none; }
@page {
  size: letter;
  margin: 0.6in 0.6in 0.75in;
  @bottom-left { content: "Atlas Professional Services \00B7  Technical Business Review"; font-family: Inter, "Segoe UI", sans-serif; font-size: 8pt; color: #5F6E81; }
  @bottom-right { content: "Page " counter(page) " of " counter(pages); font-family: Inter, "Segoe UI", sans-serif; font-size: 8pt; color: #5F6E81; }
}
@page :first {
  @bottom-left { content: none; }
  @bottom-right { content: none; }
}
@media print {
  body.print-report { background: #fff !important; font-size: 10.5pt; }
  body.print-report > *:not(#printRoot) { display: none !important; }
  body.print-report #printRoot { display: block; }
  #printRoot { -webkit-print-color-adjust: exact; print-color-adjust: exact; color: #13233A; }
  #printRoot .report { border: 0; box-shadow: none; padding: 0; margin: 0; border-radius: 0; background: #fff; }
  #printRoot .r-cover { min-height: 8.6in; display: flex; flex-direction: column; justify-content: center; border-bottom: 0; break-after: page; padding: 0; }
  #printRoot .r-cover::after { content: ""; display: block; width: 120px; height: 6px; background: #1E6FD9; margin-top: 28px; border-radius: 3px; }
  #printRoot .r-logo { width: 84px; height: 84px; margin-bottom: 40px; }
  #printRoot .r-eyebrow { font-size: 12pt; }
  #printRoot .r-title { font-size: 34pt; margin-top: 10px; }
  #printRoot .r-meta { font-size: 12pt; margin-top: 18px; }
  #printRoot .r-meta-2 { font-size: 11pt; }
  #printRoot .r-sec { border-bottom: 0; padding: 0 0 14px; }
  #printRoot .r-sec[data-sec="security"], #printRoot .r-sec[data-sec="hardware"], #printRoot .r-sec[data-sec="service"],
  #printRoot .r-sec[data-sec="recommendations"], #printRoot .r-appendix { break-before: page; }
  #printRoot .r-h { font-size: 16pt; padding-bottom: 6px; border-bottom: 2px solid #1E6FD9; margin: 4px 0 12px; break-after: avoid; }
  #printRoot .r-sub { break-after: avoid; }
  #printRoot .r-p { font-size: 10.5pt; max-width: none; }
  #printRoot .r-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; break-inside: avoid; }
  #printRoot .r-kpi { padding: 10px 12px 10px 14px; break-inside: avoid; }
  #printRoot .r-kpi-value { font-size: 18pt; }
  #printRoot .r-kpi-sub { font-size: 8.5pt; }
  #printRoot .r-table { font-size: 9pt; }
  #printRoot .r-table th, #printRoot .r-table td { padding: 5px 7px; }
  #printRoot .r-table thead { display: table-header-group; }
  #printRoot .r-table tr { break-inside: avoid; }
  #printRoot .r-table-wrap { overflow: visible; }
  #printRoot .r-recs li { break-inside: avoid; }
  #printRoot .r-chart { break-inside: avoid; }
  #printRoot .r-foot { display: none; }
}
.r-kpis-c1 { grid-template-columns: minmax(0, 1fr); }
.r-kpis-c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.r-kpis-c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.r-kpis-c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .r-kpis-c3, .r-kpis-c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .r-kpis-c2, .r-kpis-c3, .r-kpis-c4 { grid-template-columns: minmax(0, 1fr); } }
@media print {
  #printRoot .r-kpis-c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #printRoot .r-kpis-c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* report polish: readable status labels, no mid-word breaks, sections kept together in print */
.r-pill { text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.r-table th, .r-table td { overflow-wrap: break-word; word-break: normal; }
@media print {
  #printRoot .r-pill { font-size: 8.5pt; }
  #printRoot .r-sec:not(.r-appendix) { break-inside: avoid; }
  #printRoot .r-table-wrap { break-inside: auto; }
}
/* PDF is always the light layout, even if printed from dark mode without the export button */
@media print {
  #printRoot { color-scheme: light; }
  #printRoot .report { background: #fff; color: #13233A; }
}


/* ============ v3: health score, critical now, insights, grouped findings, hardware tiles ============ */
.health { display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1.25fr); gap: 28px; align-items: center; margin-top: 14px; }
.health-score { text-align: center; }
.ring-track { stroke: var(--track); }
.ring-fill { stroke: var(--sev, var(--accent)); transition: stroke-dasharray 0.8s var(--ease); }
.ring.sev-none .ring-fill { stroke: var(--neutral-fill); }
.ring-text { font-size: 30px; font-weight: 750; fill: var(--text); letter-spacing: -0.02em; }
.health-band { margin-top: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sev-text); }
.health-sub { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 6px; }
.spark { max-width: 100%; height: auto; overflow: visible; }
.spark-line { stroke: var(--accent); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.spark-dot { fill: var(--accent); }
.spark-val { font-size: 13px; font-weight: 700; fill: var(--text); }
.spark-lbl { font-size: 11px; fill: var(--text-3); }
.health-parts { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.hp { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(60px, 1fr) 44px; gap: 10px; align-items: center; font-size: 13px; }
.hp-label { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-weight { margin-left: 6px; font-size: 11px; color: var(--text-3); }
.hp-track { height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.hp-fill { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--bar-neutral); transition: width 0.7s var(--ease); }
.hp.sev-warning .hp-fill, .hp.sev-critical .hp-fill { background: var(--sev); }
.hp.sev-warning .hp-val, .hp.sev-critical .hp-val { color: var(--sev-text); }
.hp-val { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }

.critical-now .crit-cards { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.crit-card { border: 1px solid var(--line); border-left: 4px solid var(--crit-fill); border-radius: 10px; padding: 14px 16px; background: var(--crit-soft); min-width: 0; }
.crit-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--crit); }
.crit-meta .tag-internal { margin-left: 0; text-transform: none; letter-spacing: 0; }
.crit-title { display: flex; gap: 8px; align-items: flex-start; margin-top: 6px; font-weight: 650; font-size: 15px; color: var(--text); }
.crit-title .i { flex: 0 0 18px; width: 18px; height: 18px; color: var(--crit); margin-top: 1px; }
.crit-detail { margin-top: 6px; font-size: 13.5px; color: var(--text-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.crit-source { margin-top: 8px; font-size: 12px; color: var(--text-3); }
.critical-now.is-clear .quiet-line { margin-top: 8px; }

.insights { list-style: none; margin: 10px 0 0; padding: 0; }
.insight { display: grid; grid-template-columns: 22px 160px minmax(0, 1fr) 70px 110px; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.insight-icon .i { width: 18px; height: 18px; color: var(--sev-text); }
.insight-cat { font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.insight-title { color: var(--text); }
.insight-count { text-align: right; font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; color: var(--text); }
.insight-trend { text-align: right; font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.insight-trend.trend-worse { color: var(--crit); font-weight: 650; }
.insight-trend.trend-better { color: var(--good); font-weight: 650; }

.fgroups { display: grid; gap: 10px; margin-top: 12px; }
.fgroup { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.fgroup > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 12px 16px; font-weight: 650; }
.fgroup > summary::-webkit-details-marker { display: none; }
.fgroup-title { flex: 1 1 auto; }
.fgroup-count { font-size: 13px; font-weight: 500; color: var(--text-3); }
.fgroup-chev { width: 16px; height: 16px; color: var(--text-3); transition: transform 0.2s var(--ease); }
.fgroup[open] .fgroup-chev { transform: rotate(180deg); }
.fgroup .findings { padding: 0 16px 6px; margin: 0; }
.fgroup-internal { background: var(--surface-2); }
.fgroup-good > summary .fgroup-title { color: var(--good); }

.hw-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 12px 0 8px; padding: 0; }
.hw-tile { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border-top: 3px solid var(--sev, var(--line-strong)); min-width: 0; }
.hw-tile.sev-none { border-top-color: var(--line-strong); }
.hw-tile dt { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.hw-n { margin: 4px 0 0; font-size: 24px; font-weight: 750; color: var(--text); }
.hw-tile.sev-critical .hw-n, .hw-tile.sev-warning .hw-n { color: var(--sev-text); }
.hw-sub { margin: 0; font-size: 12px; color: var(--text-2); line-height: 1.35; }
.hw-row.sev-critical > * { background: var(--crit-soft); }
.hw-row.sev-warning > * { background: var(--warn-soft); }
.hw-row.sev-good > *, .hw-row.sev-none > * { background: transparent; }
.sq-table { margin-top: 10px; }

/* ============ clients: account-manager board ============ */
.view-toggle { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 9px; overflow: hidden; }
.seg-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 0; background: var(--surface); color: var(--text-2); font: inherit; font-size: 13.5px; font-weight: 550; cursor: pointer; }
.seg-btn + .seg-btn { border-left: 1px solid var(--line-strong); }
.seg-btn .i { width: 16px; height: 16px; }
.seg-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); }
.am-board { margin-top: 18px; }
.am-summary { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; background: var(--surface); margin-bottom: 16px; }
.am-summary-title { font-weight: 650; margin-bottom: 10px; }
.tstate-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--track); }
.tstate-seg { display: block; height: 100%; width: 0; transition: width 0.6s var(--ease); }
.tstate-legend { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--text-2); }
.tstate-legend li { display: inline-flex; align-items: center; gap: 7px; }
.tstate-legend strong { color: var(--text); }
.tstate-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
/* TBR ticket states read as one ramp: amber = someone has to act, greens = on its way to done
   (light → dark), muted red = skipped, grey = no ticket. Blue stays reserved for things you can click. */
.tstate-needs { background: var(--ts-needs); }
.tstate-waiting { background: var(--ts-waiting); }
.tstate-scheduled { background: var(--ts-scheduled); }
.tstate-progress { background: var(--ts-progress); }
.tstate-done { background: var(--ts-done); }
.tstate-skipped { background: var(--ts-skipped); }
.tstate-none { background: var(--ts-none); }
.am-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.am-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; background: var(--surface); box-shadow: var(--shadow-soft); min-width: 0; }
.am-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.am-bubble { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 700; letter-spacing: 0.02em; }
.am-name { font-size: 16px; font-weight: 700; }
.am-meta { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.am-clients { list-style: none; margin: 12px 0 0; padding: 0 8px 0 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px;
  max-height: 380px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.cchip { display: flex; flex-direction: column; align-items: stretch; gap: 2px; min-width: 0; padding: 8px 10px 8px 12px; border-radius: 8px; background: var(--surface-2); border-left: 4px solid transparent; cursor: pointer; }
.cchip:hover { background: var(--hover); }
.cchip.tstate-needs, .cchip.tstate-waiting, .cchip.tstate-scheduled, .cchip.tstate-progress, .cchip.tstate-done, .cchip.tstate-skipped, .cchip.tstate-none { background: var(--surface-2); }
.cchip.tstate-needs { border-left-color: var(--ts-needs); }
.cchip.tstate-waiting { border-left-color: var(--ts-waiting); }
.cchip.tstate-scheduled { border-left-color: var(--ts-scheduled); }
.cchip.tstate-progress { border-left-color: var(--ts-progress); }
.cchip.tstate-done { border-left-color: var(--ts-done); }
.cchip.tstate-skipped { border-left-color: var(--ts-skipped); }
.cchip.tstate-none { border-left-color: var(--ts-none); }
.cchip-name { font-size: 13.5px; font-weight: 550; line-height: 1.3; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.cchip-name:hover { text-decoration: underline; }
.cchip-state { font-size: 12px; color: var(--text-3); }

/* ============ roadmap + budget ============ */
.roadmap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.rm-col { background: var(--surface-2); border-radius: 12px; padding: 12px; min-width: 0; }
.rm-q { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.rm-now { font-size: 11px; font-weight: 650; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); }
.rm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rm-card { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--bar-neutral); border-radius: 9px; padding: 10px 12px; }
.rm-card.rm-service { border-top-color: var(--warn-fill); }
.rm-card.rm-hardware { border-top-color: var(--crit-fill); }
.rm-tags { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); }
.rm-kind { color: var(--text-2); }
.rm-service .rm-kind { color: var(--warn); }
.rm-hardware .rm-kind { color: var(--crit); }
.rm-overdue { color: var(--warn); }
.rm-title { margin-top: 5px; font-weight: 650; font-size: 13.5px; line-height: 1.35; }
.rm-sub { margin-top: 4px; font-size: 12px; color: var(--text-3); display: flex; gap: 5px; align-items: flex-start; }
.rm-sub .i { width: 13px; height: 13px; color: var(--good); flex: 0 0 13px; margin-top: 2px; }
.rm-money { margin-top: 6px; font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.rm-empty { font-size: 12.5px; color: var(--text-3); padding: 8px 2px; }
.budget-chart { margin: 14px 0 6px; }
.budget-chart svg { width: 100%; max-width: 680px; height: auto; }
.bg-agreements { fill: var(--navy); background: var(--navy); }
.bg-proposals { fill: var(--accent); background: var(--accent); }
.bg-hardware { fill: var(--warn-fill); background: var(--warn-fill); }
[data-theme="dark"] .bg-agreements { fill: #6E8BB3; background: #6E8BB3; }

/* ============ vendors ============ */
.vendor-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 4px; }
.vendor-link { font: inherit; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); cursor: pointer; }
.vendor-link:hover { border-color: var(--accent); color: var(--accent-text); }
.vendor-link.is-error { border-color: var(--crit-fill); color: var(--crit); }
.vendor-link.is-off { border-style: dashed; color: var(--text-3); background: transparent; }
.vstatus { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; }
.vstatus .i { width: 15px; height: 15px; }
.vstatus.is-ok { color: var(--good); }
.vstatus.is-error { color: var(--crit); }
.vstatus.is-off { color: var(--text-3); }
.vendor { scroll-margin-top: calc(var(--topbar-h) + 64px); }
.vendor-kpis { margin-top: 10px; }
.vendor-table { margin-top: 10px; }

@media (max-width: 980px) {
  .health { grid-template-columns: 130px minmax(0, 1fr); }
  .health-parts { grid-column: 1 / -1; }
  .hw-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .roadmap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .insight { grid-template-columns: 22px minmax(0, 1fr) 60px 90px; }
  .insight-cat { display: none; }
}
@media (max-width: 640px) {
  .health { grid-template-columns: minmax(0, 1fr); }
  .hw-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .roadmap { grid-template-columns: minmax(0, 1fr); }
  .am-grid { grid-template-columns: minmax(0, 1fr); }
  .insight { grid-template-columns: 22px minmax(0, 1fr) 48px; }
  .insight-trend { display: none; }
  .view-toggle { width: 100%; }
  .seg-btn { flex: 1 1 50%; justify-content: center; }
}
.cchip-name { min-width: 0; flex: 1 1 auto; }
.cchip-state { flex: 0 0 auto; }

/* ============ report v3: score card, row tints, stacked budget chart ============ */
.w-14 { width: 14%; } .w-42 { width: 42%; } .w-56 { width: 56%; } .w-25 { width: 25%; } .w-26 { width: 26%; } .w-45 { width: 45%; } .w-57 { width: 57%; }
.r-table tbody tr.r-row td, .r-table tbody tr.r-row:nth-child(even) td { background: var(--sev-soft); }
.r-table tbody tr.r-row td:first-child { box-shadow: inset 3px 0 0 var(--sev); }
.r-sub-h { margin-top: 22px; }
.r-sub-h:first-child { margin-top: 4px; }
.r-stack-1 { fill: var(--navy); background: var(--navy); }
.r-stack-2 { fill: var(--accent); background: var(--accent); }
.r-stack-3 { fill: var(--warn-fill); background: var(--warn-fill); }
.r-stack-4 { fill: var(--good-fill); background: var(--good-fill); }
[data-theme="dark"] .r-stack-1 { fill: #6E8BB3; background: #6E8BB3; }
.r-score-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px 28px; align-items: center; }
.r-score-ring { text-align: center; }
.r-ring-track { stroke: var(--surface-2); }
.r-ring-val { stroke: var(--sev); stroke-linecap: round; }
.r-ring-num { font-size: 28px; font-weight: 750; fill: var(--text); }
.r-score-band { margin: 4px 0 0; font-weight: 700; color: var(--sev-text); font-size: 13px; }
.r-score-parts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.r-score-parts li { display: grid; grid-template-columns: minmax(0, 13em) minmax(60px, 1fr) 3.2em; gap: 10px; align-items: center; font-size: 12.5px; color: var(--text-2); }
.r-score-parts strong { text-align: right; color: var(--text); }
.r-part-bar { width: 100%; height: 8px; display: block; }
.r-part-track { fill: var(--surface-2); }
.r-part-fill { fill: var(--bar-neutral); }
.r-score-parts .sev-warning .r-part-fill, .r-score-parts .sev-critical .r-part-fill { fill: var(--sev); }
.r-score-trend { margin: 0; text-align: center; }
.r-score-trend svg { display: block; max-width: 100%; height: auto; }
.r-score-trend figcaption { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.r-trend-line { stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.r-trend-dot { fill: var(--accent); }
@media (max-width: 760px) { .r-score-row { grid-template-columns: minmax(0, 1fr); justify-items: center; } .r-score-parts { width: 100%; } }
@media print {
  #printRoot .r-sec[data-sec="roadmap"] { break-before: page; }
  #printRoot .r-table-wrap.r-table-small { break-inside: avoid; }
  #printRoot .r-score { break-inside: avoid; }
  #printRoot .r-score-parts li { font-size: 9pt; }
  #printRoot .r-ring-track, #printRoot .r-part-track { fill: none; stroke: #E7ECF3; }
  #printRoot .r-part-track { fill: #E7ECF3; stroke: none; }
  #printRoot .r-ring-track { stroke: #E7ECF3; }
}
/* TBR tab: report preview with the section picker on the right (stacks above the report on narrow screens) */
.report-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.report-layout .report { margin-top: 0; }
.sec-picker { position: sticky; top: calc(var(--topbar-h) + 16px); max-height: calc(100vh - var(--topbar-h) - 32px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 12px; display: grid; gap: 8px; align-content: start; }
.sp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 4px; }
.sec-picker-title { font-size: 14px; font-weight: 650; margin: 0; }
.sp-count { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.sec-picker-note { font-size: 12.5px; color: var(--text-3); margin: 0; padding: 0 4px; }
.sp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.sp-group { margin: 8px 4px 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 650; color: var(--text-3); }
.sp-row { border-radius: 8px; border-left: 3px solid transparent; }
.sp-row.is-current { background: var(--accent-soft); border-left-color: var(--accent); }
.sp-line { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; }
.sp-check { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); flex: none; }
.sp-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.sp-critical { background: var(--crit-fill); }
.sp-warning { background: var(--warn-fill, #D98A1C); }
.sp-none { background: var(--line); box-shadow: inset 0 0 0 1px var(--text-3); opacity: .6; }
.sp-link { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 2px 0; font: inherit; font-size: 13.5px; color: var(--text); cursor: pointer; }
.sp-link:hover:not(:disabled) { color: var(--accent); text-decoration: underline; }
.sp-link:disabled { cursor: default; }
.sp-row.is-off .sp-link { color: var(--text-3); text-decoration: line-through; }
.sp-expand { display: inline-flex; align-items: center; gap: 2px; background: none; border: 0; padding: 2px 4px; border-radius: 6px; font: inherit; font-size: 12px; color: var(--accent); cursor: pointer; white-space: nowrap; }
.sp-expand:hover { background: var(--surface-2); }
.sp-chev { width: 14px; height: 14px; transition: transform .15s; }
.sp-expand[aria-expanded="true"] .sp-chev { transform: rotate(180deg); }
.sp-items { margin: 2px 6px 8px 28px; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); display: grid; gap: 4px; }
.sp-items ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sp-items-title { margin: 4px 0 0; font-size: 11.5px; font-weight: 650; color: var(--text-3); }
.sp-item { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: start; gap: 6px; font-size: 12.5px; line-height: 1.35; cursor: pointer; padding: 3px 0; }
.sp-item input { width: 14px; height: 14px; margin: 1px 0 0; accent-color: var(--accent); }
.sp-item .sp-dot { margin-top: 4px; }
.sp-cat { font-size: 11px; font-weight: 650; color: var(--text-3); margin-top: 1px; }
.sp-sub { margin: -2px 6px 6px 48px; font-size: 12px; color: var(--text-3); }
.sp-legend { list-style: none; margin: 6px 4px 0; padding: 8px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--text-3); }
.sp-legend li { display: inline-flex; align-items: center; gap: 5px; }
@media (prefers-reduced-motion: reduce) { .sp-chev { transition: none; } }
@media (max-width: 1359px) {
  .report-layout { grid-template-columns: minmax(0, 1fr); }
  .sec-picker { order: -1; position: static; max-height: none; }
  .sp-list { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}

/* ============ calmer colour rules (2026-10-08) ============
   red = act now · amber = plan or watch · green = done / improving only · grey = fine or no data ·
   blue = clickable. Numbers stay neutral; icons, pills and bars carry the meaning. */
:root {
  --bar-neutral: #4A6385;
  --ts-needs: #D98A1C; --ts-waiting: #F0CD8E; --ts-scheduled: #B5DCC6; --ts-progress: #6CBF93; --ts-done: #2E8F61;
  --ts-skipped: #D9837B; --ts-none: #D5DCE4;
}
[data-theme="dark"] {
  --bar-neutral: #7F9BC0;
  --ts-needs: #E09B38; --ts-waiting: #8C6C35; --ts-scheduled: #2F5C47; --ts-progress: #3F8F66; --ts-done: #4CC189;
  --ts-skipped: #B8584F; --ts-none: #34465F;
}
#printRoot { --bar-neutral: #4A6385; }
/* thin, quiet scrollbars on inner scroll areas (the page scrollbar is left alone) */
.am-clients, .table-wrap, .r-table-wrap { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.am-clients::-webkit-scrollbar, .table-wrap::-webkit-scrollbar, .r-table-wrap::-webkit-scrollbar { width: 6px; height: 6px; }
.am-clients::-webkit-scrollbar-thumb, .table-wrap::-webkit-scrollbar-thumb, .r-table-wrap::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }
.am-clients::-webkit-scrollbar-button, .table-wrap::-webkit-scrollbar-button, .r-table-wrap::-webkit-scrollbar-button { display: none; }
.refresh-status { margin: 10px 0 0; font-size: 13.5px; color: var(--text-2); min-height: 1.2em; }

/* ============ clients dashboard (2026-10-08) ============ */
body.page-wide .container { max-width: 1760px; }
.dashboard { margin: 0 0 28px; }
.dash-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 0 0 12px; }
.dash-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 14px 18px; min-width: 0; box-shadow: var(--shadow-soft); }
.dash-tile.sev-critical, .dash-tile.sev-warning { box-shadow: inset 3px 0 0 var(--sev), var(--shadow-soft); }
.dash-tile dt { font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.dash-value { margin-top: 4px; font-size: 30px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--text); }
.dash-tile.sev-critical .dash-value, .dash-tile.sev-warning .dash-value { color: var(--sev-text); }
.dash-sub { margin-top: 2px; font-size: 12.5px; color: var(--text-2); }
.dash-panels { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; }
.dash-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; min-width: 0; box-shadow: var(--shadow-soft); }
.dash-panel.am-summary { margin: 0; }
.dash-panel-title { font-size: 15px; font-weight: 650; margin-bottom: 12px; }
.dash-note { margin-top: 12px; font-size: 12.5px; color: var(--text-3); }
.dash-sub-title { margin: 16px 0 6px; font-size: 12.5px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; }
.hband-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--track); }
.hband-seg { display: block; height: 100%; width: 0; transition: width 0.6s var(--ease); }
.hband-legend { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--text-2); }
.hband-legend li { display: inline-flex; align-items: center; gap: 7px; }
.hband-legend strong { color: var(--text); }
.hband-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.hband-attention { background: var(--crit-fill); }
.hband-fair { background: var(--warn-fill); }
.hband-good { background: var(--hb-good); }
.hband-excellent { background: var(--bar-neutral); }
:root { --hb-good: #A9B9CE; }
[data-theme="dark"] { --hb-good: #4F6789; }
.dash-lowest { list-style: none; margin: 0; padding: 0; }
.dash-lowest li { display: grid; grid-template-columns: minmax(0, 1fr) auto 40px; gap: 12px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.dash-lowest a { color: var(--text); font-weight: 550; text-decoration: none; overflow-wrap: anywhere; }
.dash-lowest a:hover { color: var(--accent-text); text-decoration: underline; }
.dash-lowest-am { color: var(--text-3); font-size: 12.5px; white-space: nowrap; }
.dash-score { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.dash-score.sev-critical, .dash-score.sev-warning { color: var(--sev-text); }
.am-row-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0 12px; }
@media (max-width: 1400px) { .dash-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 980px) { .dash-panels { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .dash-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-value { font-size: 24px; } }

/* ============ vendor cards (2026-10-08): one card per product, clear header ============ */
.vendor { margin-top: 18px; padding: 20px 22px 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-soft); min-width: 0; }
.vendor-head { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.vendor-badge { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 700; font-size: 17px; }
[data-theme="dark"] .vendor-badge { background: var(--surface-2); color: var(--text); }
.vendor-heading { flex: 1 1 auto; min-width: 0; }
.vendor-title.section-title { font-size: 19px; font-weight: 700; }
.vendor-what { margin-top: 2px; font-size: 13.5px; color: var(--text-2); }
.vendor .vendor-kpis { margin-top: 14px; }
.vendor .table-wrap { border-top: 0; }
@media (max-width: 640px) { .vendor { padding: 16px 14px 6px; } .vendor-head { flex-wrap: wrap; } }
.dash-tile dd { margin: 0; }
.dash-age { text-align: right; font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dash-oldest li { grid-template-columns: minmax(0, 1fr) auto 48px; }

/* ============ site navigation (2026-10-08): left sidebar + client picker ============ */
:root { --sidebar-w: 252px; }
.topbar-wide { padding: 0 20px; gap: 16px; }
body.has-sidebar .topbar-wide .brand { width: calc(var(--sidebar-w) - 20px); }
.side-toggle { display: none; }
body.has-sidebar .app-body { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); align-items: start; }
.sidebar[hidden], .side-scrim[hidden] { display: none; }
.sidebar {
  position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-right: 1px solid var(--line); padding: 14px 12px 28px;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.side-nav { display: grid; gap: 18px; }
.side-group { display: grid; gap: 2px; min-width: 0; }
.side-group[hidden] { display: none; }
.side-label { margin: 0 10px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.side-link {
  position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 7px 10px; border-radius: 8px;
  color: var(--text-2); font-size: 14px; font-weight: 550; text-decoration: none;
}
.side-link .i { width: 17px; height: 17px; flex: none; color: var(--text-3); }
.side-link:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.side-link[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); }
.side-link[aria-current="page"] .i { color: var(--accent-text); }
.side-link[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.side-client { padding-top: 2px; }
.side-client-name { margin: 0 10px 6px; font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.3; overflow-wrap: anywhere; }
.side-recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.side-initial { flex: none; width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); font-size: 10.5px; font-weight: 700; }
.side-link[aria-current="page"] .side-initial { background: var(--accent); color: #fff; }
.side-initial.has-logo { background: #fff; padding: 2px; box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.side-initial.has-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.side-link[aria-current="page"] .side-initial.has-logo { background: #fff; box-shadow: 0 0 0 2px var(--accent); }
.side-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-empty { margin: 0 10px; font-size: 13px; color: var(--text-3); }
.side-find {
  display: flex; align-items: center; gap: 10px; margin-top: 4px; padding: 7px 10px; border: 1px dashed var(--line-strong); border-radius: 8px;
  background: transparent; color: var(--text-2); font: inherit; font-size: 13.5px; cursor: pointer; text-align: left;
}
.side-find .i { width: 16px; height: 16px; color: var(--text-3); }
.side-find:hover { border-color: var(--accent); color: var(--accent-text); }
.side-find kbd, .picker-kbd, .picker-foot kbd {
  margin-left: auto; font: 600 11px/1 inherit; font-family: inherit; padding: 3px 6px; border-radius: 5px; border: 1px solid var(--line-strong); color: var(--text-3); background: var(--surface);
}
body.has-sidebar main.container { padding-left: 32px; padding-right: 32px; }

/* client picker in the top bar */
.picker { position: relative; flex: 0 1 420px; min-width: 0; }
.picker-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; padding: 0 12px; border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.08); color: var(--on-navy); font: inherit; font-size: 14px; cursor: pointer; text-align: left;
}
.picker-btn:hover, .picker-btn[aria-expanded="true"] { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.3); }
.picker-btn .i { width: 17px; height: 17px; flex: none; opacity: 0.85; }
.picker-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.picker-label.is-placeholder { font-weight: 400; color: rgba(255, 255, 255, 0.72); }
.picker-kbd { margin-left: 0; background: transparent; color: rgba(255, 255, 255, 0.7); border-color: rgba(255, 255, 255, 0.28); }
.picker-pop {
  position: absolute; left: 0; top: calc(100% + 8px); width: min(560px, calc(100vw - 24px)); z-index: 50;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop);
  animation: pop-in 0.16s var(--ease) both; transform-origin: top left;
}
.picker-search { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.picker-search .i { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.picker-input { flex: 1 1 auto; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text); font: inherit; font-size: 15px; padding: 4px 0; }
.picker-list { list-style: none; margin: 0; padding: 6px; max-height: min(420px, 60vh); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.picker-opt { display: grid; gap: 1px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.picker-opt[aria-selected="true"] { background: var(--accent-soft); }
.picker-opt:hover { background: var(--hover); }
.picker-opt[aria-selected="true"]:hover { background: var(--accent-soft); }
.picker-name { font-size: 14px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.picker-meta { font-size: 12.5px; color: var(--text-3); }
.picker-empty { padding: 14px 10px; font-size: 13.5px; color: var(--text-3); }
.picker-foot { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); }
.picker-foot kbd { margin-left: 0; }
.picker-foot kbd + kbd { margin-left: -2px; }

/* narrow screens: the sidebar becomes a drawer */
@media (max-width: 1023px) {
  .side-toggle { display: inline-flex; }
  body.has-sidebar .app-body { grid-template-columns: minmax(0, 1fr); }
  body.has-sidebar .topbar-wide .brand { width: auto; }
  .sidebar { position: fixed; top: var(--topbar-h); left: 0; bottom: 0; height: auto; width: min(300px, 86vw); z-index: 45; transform: translateX(-105%); transition: transform 0.24s var(--ease); box-shadow: var(--shadow-pop); }
  body.sidebar-open .sidebar { transform: none; }
  .side-scrim { position: fixed; inset: var(--topbar-h) 0 0 0; z-index: 44; background: rgba(10, 20, 35, 0.4); }
  body.has-sidebar main.container { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 640px) {
  .topbar-wide { padding: 0 10px; gap: 8px; }
  .brand-name { display: none; }
  .picker { flex: 1 1 auto; }
  .picker-kbd, .picker-chev { display: none; }
  .picker-pop { position: fixed; left: 8px; right: 8px; top: calc(var(--topbar-h) + 6px); width: auto; }
  body.has-sidebar main.container { padding-left: 16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } .picker-pop { animation: none; } }

/* tables fit beside the sidebar at 1280px: names and models wrap instead of pushing the table wider */
.devices-table { min-width: 0; }
.devices-table .dev-name, .devices-table .dev-model, .devices-table .dev-os { white-space: normal; overflow-wrap: anywhere; }
.devices-table .dev-model { min-width: 130px; }
.devices-table .cell-sub { max-width: 220px; }
.devices-table th + th, .devices-table td + td { padding-left: 12px; }
.clients-table { min-width: 0; }
.clients-table th + th, .clients-table td + td { padding-left: 12px; }
.clients-table td.col-am { white-space: normal; min-width: 88px; }
.col-next { min-width: 110px; max-width: 140px; }
.meter { width: 56px; }
@media (max-width: 760px) { .devices-table { min-width: 860px; } }
.clients-table thead th { white-space: normal; vertical-align: bottom; }
.clients-table .flag { white-space: normal; }
.clients-table thead th:not(.col-client) { white-space: normal; }
.clients-table td.col-next { white-space: normal; }
body.has-sidebar .mockbar .container { max-width: none; padding-left: 20px; padding-right: 20px; }
.menu-build { margin-top: 6px; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
/* sidebar: long client names end in an ellipsis instead of spilling out; content sits next to the sidebar */
.sidebar { overflow-x: hidden; }
.side-nav, .side-group, .side-recent { grid-template-columns: minmax(0, 1fr); }
.side-recent li { min-width: 0; }
.side-link { overflow: hidden; }
.side-find { min-width: 0; }
.side-find span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.has-sidebar main.container { margin-left: 0; margin-right: auto; max-width: 1360px; }
body.has-sidebar.page-wide main.container { max-width: 1760px; }

/* ============ navigation + overview refresh (2026-10-08 late) ============ */
/* cool hues for navigation and card icons: never status colours */
:root {
  --hue-blue: #2563C9; --hue-blue-bg: #E7F0FD;
  --hue-indigo: #4B4FC4; --hue-indigo-bg: #ECEDFB;
  --hue-violet: #7445C4; --hue-violet-bg: #F2ECFC;
  --hue-cyan: #0B7A93; --hue-cyan-bg: #E2F3F7;
  --hue-slate: #4A5D78; --hue-slate-bg: #ECF0F5;
  --hue-navy: #1E3A61; --hue-navy-bg: #E5EAF2;
}
[data-theme="dark"] {
  --hue-blue: #8DB4F5; --hue-blue-bg: rgba(141, 180, 245, 0.16);
  --hue-indigo: #A9ACF2; --hue-indigo-bg: rgba(169, 172, 242, 0.16);
  --hue-violet: #C3A6F2; --hue-violet-bg: rgba(195, 166, 242, 0.16);
  --hue-cyan: #7FD0E2; --hue-cyan-bg: rgba(127, 208, 226, 0.15);
  --hue-slate: #AAB8CB; --hue-slate-bg: rgba(170, 184, 203, 0.14);
  --hue-navy: #9FB6D6; --hue-navy-bg: rgba(159, 182, 214, 0.15);
}
.hue-blue { --hf: var(--hue-blue); --hb: var(--hue-blue-bg); }
.hue-indigo { --hf: var(--hue-indigo); --hb: var(--hue-indigo-bg); }
.hue-violet { --hf: var(--hue-violet); --hb: var(--hue-violet-bg); }
.hue-cyan { --hf: var(--hue-cyan); --hb: var(--hue-cyan-bg); }
.hue-slate { --hf: var(--hue-slate); --hb: var(--hue-slate-bg); }
.hue-navy { --hf: var(--hue-navy); --hb: var(--hue-navy-bg); }
.hue-red { --hf: var(--crit); --hb: var(--crit-soft); }

/* sidebar: icon tiles + one highlight that slides between links */
.side-nav { position: relative; }
.side-pill { position: absolute; left: 0; right: 0; top: 0; height: 40px; border-radius: 10px; background: var(--accent-soft); z-index: 0; pointer-events: none;
  transition: transform 0.34s var(--ease), height 0.34s var(--ease); }
.side-pill[hidden] { display: none; }
.side-pill.no-anim { transition: none; }
.side-link { z-index: 1; gap: 11px; padding: 6px 10px; transition: background 0.15s ease, color 0.15s ease; }
.side-link[aria-current="page"] { background: transparent; color: var(--text); font-weight: 650; }
.side-link[aria-current="page"]::before { content: none; }
.side-link:hover { background: var(--hover); }
.side-link[aria-current="page"]:hover { background: transparent; }
.side-ico { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--hb); color: var(--hf);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s var(--ease); }
.side-link .side-ico .i { width: 16px; height: 16px; color: inherit; }
.side-link:hover .side-ico { transform: scale(1.07); }
.side-link[aria-current="page"] .side-ico { background: var(--hf); color: #fff; }
[data-theme="dark"] .side-link[aria-current="page"] .side-ico { color: var(--surface); }
.side-recent-link[aria-current="page"] { font-weight: 600; }

/* breadcrumb replaces the in-page tabs wherever the sidebar is showing */
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; font-size: 13.5px; color: var(--text-3); }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent-text); }
.crumb-sep { width: 14px; height: 14px; color: var(--text-3); }
.crumb-here { color: var(--text); font-weight: 600; }
@media (min-width: 1024px) {
  body.has-sidebar .page > .tabs { display: none; }
}

/* overview: a grid of cards, most important first */
.ov-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; padding-top: 16px; }
.ov-grid > .section { grid-column: span 12; margin: 0; padding: 18px 20px 20px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); box-shadow: var(--shadow-soft); min-width: 0; animation: rise 0.42s var(--ease) both; }
.ov-grid > .section:nth-child(2) { animation-delay: 0.04s; }
.ov-grid > .section:nth-child(3) { animation-delay: 0.08s; }
.ov-grid > .section:nth-child(4) { animation-delay: 0.12s; }
.ov-grid > .section:nth-child(5) { animation-delay: 0.16s; }
.ov-grid > .section:nth-child(6) { animation-delay: 0.2s; }
.ov-grid > .section:nth-child(7) { animation-delay: 0.24s; }
.ov-grid > .section:nth-child(n+8) { animation-delay: 0.28s; }
@media (min-width: 1200px) {
  .ov-grid > [aria-labelledby="h-health"] { grid-column: span 8; }
  .ov-grid > .critical-now { grid-column: span 4; }
  .ov-grid > [aria-labelledby="h-insights"], .ov-grid > [aria-labelledby="h-attention"],
  .ov-grid > [aria-labelledby="h-services"], .ov-grid > [aria-labelledby="h-changes"] { grid-column: span 6; }
  .ov-grid .insight { grid-template-columns: 22px 92px minmax(0, 1fr) 44px 86px; gap: 10px; }
  .ov-grid .critical-now .crit-cards { grid-template-columns: minmax(0, 1fr); }
}
.ov-grid .section-head { margin-bottom: 12px; align-items: center; }
.ov-grid .section-title { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 650; }
.sec-chip { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--hb); color: var(--hf); }
.sec-chip .i { width: 16px; height: 16px; }
.ov-kpis { padding: 14px 12px !important; }
.ov-kpis .kpis { margin: 0; }
.ov-grid .critical-now.is-clear .quiet-line { margin-top: 0; }

/* folded detail */
.ov-more { margin-top: 12px; border-top: 1px solid var(--line); }
.ov-more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 12px 2px 2px; font-size: 13.5px; font-weight: 600; color: var(--accent-text); }
.ov-more > summary::-webkit-details-marker { display: none; }
.ov-more > summary:hover { text-decoration: underline; }
.ov-more-chev { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }
.ov-more[open] .ov-more-chev { transform: rotate(180deg); }
.ov-more[open] > :not(summary) { animation: rise 0.28s var(--ease) both; margin-top: 10px; }

/* security services summary */
.svc-summary { display: grid; gap: 8px; margin-bottom: 14px; }
.svc-count { font-size: 14px; color: var(--text-2); }
.svc-count strong { font-size: 18px; color: var(--text); margin-right: 4px; }
.svc-bar { display: block; height: 8px; border-radius: 4px; background: var(--track); overflow: hidden; }
.svc-fill { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--bar-neutral); transition: width 0.8s var(--ease); }
.svc-missing { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.svc-missing li { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.svc-missing .lc-pill { margin-top: 1px; }
.svc-name { font-weight: 600; font-size: 14px; }
.svc-why { margin-top: 2px; font-size: 13px; color: var(--text-3); }

@media (prefers-reduced-motion: reduce) {
  .side-pill, .side-ico, .svc-fill { transition: none; }
  .ov-grid > .section, .ov-more[open] > :not(summary), .rs-fold-body { animation: none; }
}
.ov-grid .hp-label { white-space: normal; overflow: visible; line-height: 1.25; }

/* ============ Roadmap + Vendors as card pages (2026-10-08 late) ============ */
.ov-kpis .kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.ov-grid .budget-chart { margin-top: 4px; }

/* agreements: the money and the check first, line items folded */
.ag-summary { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin-bottom: 12px; }
.ag-total { font-size: 14px; color: var(--text-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ag-total strong { font-size: 22px; color: var(--text); font-variant-numeric: tabular-nums; }
.ag-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-2); }
.ag-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.ag-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); min-width: 0; }
.ag-name { display: grid; gap: 2px; font-weight: 600; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.ag-money { display: grid; gap: 2px; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ag-meta { font-size: 12px; font-weight: 400; color: var(--text-3); }

/* vendors: glance card, then two product cards per row on wide screens */
.vendor-summary .vendor-nav { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin: 0; }
.vendor-summary .vendor-link { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13px;
  transition: border-color 0.15s ease, transform 0.2s var(--ease), box-shadow 0.2s ease; }
.vendor-summary .vendor-link:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-soft); color: var(--text); }
.vendor-summary .vendor-link.is-off { border-style: dashed; background: transparent; }
.vl-name { display: inline-flex; align-items: center; gap: 7px; font-weight: 650; color: var(--text); }
.vl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good-fill); }
.vendor-link.is-off .vl-dot { background: var(--line-strong); }
.vendor-link.is-error .vl-dot { background: var(--crit-fill); }
.vl-value { font-size: 20px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; display: inline-flex; align-items: baseline; gap: 6px; }
.vl-unit { font-size: 12px; font-weight: 500; color: var(--text-3); }
.vl-off { font-size: 13px; font-weight: 500; color: var(--text-3); }
.vendor-link.is-error .vl-off { color: var(--crit); }
.ov-grid > .vendor { grid-column: span 12; margin: 0; animation: rise 0.42s var(--ease) both; }
.ov-grid > .vendor:nth-child(n+2) { animation-delay: 0.05s; }
.ov-grid > .vendor:nth-child(n+4) { animation-delay: 0.1s; }
.ov-grid > .vendor:nth-child(n+6) { animation-delay: 0.15s; }
@media (min-width: 1400px) {
  .vendors-grid > .vendor { grid-column: span 6; }
  .vendors-grid > .vendor .kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.vendor-badge { background: var(--hb, var(--navy)); color: var(--hf, #fff); }
.vendor .ov-more { margin-top: 10px; }
.vendor .vendor-kpis { margin-bottom: 4px; }
@media (prefers-reduced-motion: reduce) {
  .ov-grid > .vendor { animation: none; }
  .vendor-summary .vendor-link { transition: none; }
}
[data-theme="dark"] .vendor-badge[class*="hue-"] { background: var(--hb); color: var(--hf); }

/* snappier: content shows at once, motion stays short (2026-10-08) */
.view-enter { animation-duration: 0.18s; }
.panel-enter { animation-duration: 0.18s; }
.ov-grid > .section, .ov-grid > .vendor { animation-duration: 0.26s; }
.ov-grid > .section:nth-child(2) { animation-delay: 0.02s; }
.ov-grid > .section:nth-child(3) { animation-delay: 0.04s; }
.ov-grid > .section:nth-child(4) { animation-delay: 0.06s; }
.ov-grid > .section:nth-child(5) { animation-delay: 0.08s; }
.ov-grid > .section:nth-child(6) { animation-delay: 0.1s; }
.ov-grid > .section:nth-child(7) { animation-delay: 0.12s; }
.ov-grid > .section:nth-child(n+8) { animation-delay: 0.14s; }
.ov-grid > .vendor:nth-child(n+2) { animation-delay: 0.03s; }
.ov-grid > .vendor:nth-child(n+4) { animation-delay: 0.06s; }
.ov-grid > .vendor:nth-child(n+6) { animation-delay: 0.09s; }

/* use the width beside the sidebar on every page; documents and forms keep a reading width */
body.has-sidebar main.container { max-width: 1760px; }
.report { max-width: 1120px; }
#client-panel[aria-labelledby="client-tab-notes"] > *, #client-panel[aria-labelledby="client-tab-pack"] > * { max-width: 1120px; }

/* agreements: one row per agreement, itemized lines on demand */
.ag-rows { display: grid; gap: 8px; }
.ag-row { border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.ag-row > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; align-items: center; gap: 14px; padding: 11px 14px; }
.ag-row > summary::-webkit-details-marker { display: none; }
.ag-row > summary:hover { background: var(--hover); border-radius: 10px; }
.ag-row[open] { background: var(--surface); }
.ag-row[open] > summary { border-bottom: 1px solid var(--line); border-radius: 10px 10px 0 0; }
.ag-row[open] .ov-more-chev { transform: rotate(180deg); }
.ag-row .table-wrap { border-top: 0; padding: 4px 6px 8px; animation: rise 0.2s var(--ease) both; }
@media (prefers-reduced-motion: reduce) { .ag-row .table-wrap { animation: none; } }
/* vendor cards two per row: four numbers in a row when the card is wide enough, else a clean 2x2 */
@media (min-width: 1400px) and (max-width: 1799px) {
  .vendors-grid > .vendor .kpis-4 { row-gap: 14px; }
  .vendors-grid > .vendor .kpis-4 .kpi:nth-child(2n + 1) { border-left: 0; padding-left: 0; }
}
@media (min-width: 1800px) {
  .vendors-grid > .vendor .kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ============ Then and now (2026-10-08) ============ */
.tn-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding: 4px 0 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.tn-scores { display: flex; align-items: center; gap: 14px; }
.tn-score { display: grid; justify-items: center; gap: 2px; }
.tn-score .ring { width: 72px; height: 72px; }
.tn-score .ring-text { font-size: 28px; }
.tn-score:not(.tn-score-now) { opacity: 0.72; }
.tn-when { font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.tn-band { font-size: 12px; font-weight: 600; color: var(--text-2); }
.tn-arrow .i { width: 22px; height: 22px; color: var(--text-3); }
.tn-delta { display: grid; gap: 2px; margin-left: 6px; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tn-delta span { font-size: 12px; font-weight: 500; color: var(--text-3); }
.tn-tally { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.tn-tally li { display: grid; justify-items: center; min-width: 76px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-size: 12.5px; color: var(--text-2); }
.tn-tally strong { font-size: 20px; color: var(--text); }
.tn-tally .trend-better strong { color: var(--good); }
.tn-tally .trend-worse strong { color: var(--crit); }
.trend-same { color: var(--text-3); }
.tn-rows { list-style: none; margin: 0; padding: 0; }
.tn-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(120px, 1.4fr) minmax(0, 1fr) 84px; align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.tn-label { color: var(--text); font-weight: 550; }
.tn-vals { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tn-vals strong { color: var(--text); font-weight: 650; }
.tn-to { width: 13px; height: 13px; }
.tn-change { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text-3); }
.tn-row.trend-better .tn-change { color: var(--good); }
.tn-row.trend-worse .tn-change { color: var(--crit); }
.db-track { position: relative; display: block; height: 18px; }
.db-track::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 2px; border-radius: 1px; background: var(--track); }
.db-seg { position: absolute; top: 7px; height: 4px; width: 0; border-radius: 2px; background: var(--bar-neutral); transition: left 0.7s var(--ease), width 0.7s var(--ease); }
.db-dot { position: absolute; top: 3px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; }
.db-then { background: var(--surface); border: 2px solid var(--text-3); z-index: 1; }
.db-now { background: var(--bar-neutral); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--bar-neutral); z-index: 2; transition: left 0.7s var(--ease); }
.tn-row.trend-better .db-seg, .tn-row.trend-better .db-now { background: var(--good-fill); }
.tn-row.trend-better .db-now { box-shadow: 0 0 0 1px var(--good-fill); }
.tn-row.trend-worse .db-seg, .tn-row.trend-worse .db-now { background: var(--crit-fill); }
.tn-row.trend-worse .db-now { box-shadow: 0 0 0 1px var(--crit-fill); }
.tn-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 10px; font-size: 12px; color: var(--text-3); }
.tn-legend .db-dot { position: static; margin: 0 0 0 8px; display: inline-block; }
.tn-legend .db-dot:first-child { margin-left: 0; }
@media (max-width: 640px) {
  .tn-row { grid-template-columns: minmax(0, 1fr) auto; }
  .tn-row .db-track { grid-column: 1 / -1; order: 3; }
  .tn-vals { order: 2; }
  .tn-change { display: none; }
}
@media (prefers-reduced-motion: reduce) { .db-seg, .db-now { transition: none; } }

/* ============ Assets tab (2026-10-08) ============ */
.asset-downloads { display: flex; gap: 8px; }
.asset-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 14px; }
.asset-tools .search { flex: 0 1 320px; }
.asset-table .agent { margin-right: 8px; }
.agent-name { font-size: 12px; margin-left: 2px; }
.sort-btn { font: inherit; font-weight: inherit; text-transform: inherit; letter-spacing: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.sort-btn:hover { color: var(--text); }
.sort-chev { width: 13px; height: 13px; opacity: 0.25; transition: transform 0.15s ease, opacity 0.15s ease; }
.sort-chev.is-on { opacity: 1; }
.sort-chev.is-desc { transform: rotate(180deg); }
.asset-name { white-space: nowrap; }
.asset-name .cell-sub { white-space: normal; }
.asset-table .agent { display: inline-flex; margin-right: 10px; white-space: nowrap; }

/* Users tab */
.people-table .tag-admin { background: var(--surface-2); color: var(--text-2); margin-left: 8px; }
.user-name { white-space: nowrap; }
.user-name .cell-sub { white-space: normal; overflow-wrap: anywhere; }

/* Notes tab (2026-10-15): quick-add bar, two lanes (in the next TBR / internal only) grouped by category, past TBRs */
.qa { display: grid; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.qa:focus-within { border-color: var(--accent); }
.qa-text { width: 100%; border: 0; resize: none; background: transparent; font: inherit; font-size: 14.5px; line-height: 1.5; color: var(--text); padding: 2px 0; }
.qa-text:focus { outline: none; }
.qa-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.qa-field { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.qa-field .field-label { margin: 0; }
.qa-row .btn-primary { margin-left: auto; }
.qa-row .spacer { flex: 1; }
.notes-bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.lanes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.lane { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 14px 6px; min-width: 0; }
.lane-tbr { border-top: 3px solid var(--accent); }
.lane-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.lane-title { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 650; margin: 0; }
.lane-note { font-size: 12px; color: var(--text-3); }
.lane-group { padding: 8px 0 4px; border-top: 1px solid var(--line); }
.lane-group:first-of-type { border-top: 0; }
.lane-group-title { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; color: var(--text-2); margin: 2px 0 6px; }
.lane-group-title .i { width: 14px; height: 14px; }
.lane-empty { font-size: 13.5px; color: var(--text-3); padding: 10px 0 12px; margin: 0; }
.ncards { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ncard { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 4px 10px; align-items: start; padding: 8px 6px; border-radius: 8px; }
.ncard:hover { background: var(--surface-2); }
.ncard.is-pinned { background: var(--accent-soft); }
.ncard.is-done .nc-text { color: var(--text-3); text-decoration: line-through; }
.ncard.is-editing { display: block; background: var(--surface-2); }
.nc-done { width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--good-fill); cursor: pointer; }
.nc-spacer { width: 16px; }
.nc-body { min-width: 0; display: grid; gap: 2px; }
.nc-text { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.nc-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; margin: 0; font-size: 12px; color: var(--text-3); }
.nc-pin { display: inline-flex; align-items: center; gap: 3px; color: var(--accent-text, var(--accent)); font-weight: 600; }
.nc-pin .i { width: 12px; height: 12px; }
.nc-overdue { color: var(--warn); font-weight: 600; }
.nc-actions { display: flex; gap: 2px; opacity: .55; transition: opacity .15s; }
.ncard:hover .nc-actions, .ncard:focus-within .nc-actions { opacity: 1; }
.icon-btn.icon-btn-sm { width: 28px; height: 28px; color: var(--text-2); }
.icon-btn.icon-btn-sm .i { width: 15px; height: 15px; }
.icon-btn[aria-pressed="true"] { color: var(--accent); }
.nc-edit { display: grid; gap: 8px; }
.ncard .confirm { margin-top: 6px; }
.past-tbrs { margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.past-tbrs > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 650; list-style: none; }
.past-tbrs > summary::-webkit-details-marker { display: none; }
.past-tbrs > summary .i:first-child { width: 15px; height: 15px; color: var(--text-3); }
.past-tbrs[open] .ov-more-chev { transform: rotate(180deg); }
.past-group { padding-top: 10px; }
.ncard.is-past .nc-text { color: var(--text-2); }
.drawer { margin: 0 0 0 auto; height: 100%; max-height: 100%; width: min(520px, 100%); border: 0; border-left: 1px solid var(--line); padding: 0; background: var(--bg); color: var(--text); }
.drawer::backdrop { background: rgba(10, 20, 35, .35); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; }
.drawer-body { padding: 16px 18px; display: grid; gap: 12px; }
.notes-tbr-note { font-size: 12.5px; color: var(--text-3); margin: 0; }
.notes-tbr-warn { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: var(--warn); margin: 0; }
.notes-tbr-warn .i { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.report.report-mini { margin: 0; padding: 14px 16px; border-radius: 10px; box-shadow: none; font-size: 13.5px; }
.report-mini .r-sub { margin-top: 0; }
@media (max-width: 1100px) { .lanes { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .nc-actions { transition: none; } }

/* Users tab */
.people-table .tag-admin { background: var(--surface-2); color: var(--text-2); margin-left: 8px; }
.user-name { white-space: nowrap; }
.user-name .cell-sub { white-space: normal; overflow-wrap: anywhere; }

/* Notes tab: notes on the left, the TBR's Recommendations section as it stands on the right */
.notes-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.notes-main { min-width: 0; display: grid; gap: 14px; }
.notes-tools { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.notes-tools:empty { display: none; }
.notes-tbr { position: sticky; top: calc(var(--topbar-h) + 16px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 10px; max-height: calc(100vh - var(--topbar-h) - 32px); overflow-y: auto; }
.notes-tbr-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.notes-tbr-title { font-size: 14px; font-weight: 650; margin: 0; }
.notes-tbr-note { font-size: 12.5px; color: var(--text-3); margin: 0; }
.notes-tbr-warn { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: var(--warn); margin: 0; }
.notes-tbr-warn .i { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.report.report-mini { margin: 0; padding: 14px 16px; border-radius: 10px; box-shadow: none; font-size: 13.5px; }
.report-mini .r-sub { margin-top: 0; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
@media (max-width: 1359px) {
  .notes-layout { grid-template-columns: minmax(0, 1fr); }
  .notes-tbr { position: static; max-height: none; }
}

/* Admin > Integrations: clients × integrations, a column per product with its logo, colour-coded marks */
.integ-table { border-collapse: separate; border-spacing: 0; }
.integ-table th[scope="row"] { min-width: 210px; }
.integ-table .ig-head { text-align: center; vertical-align: bottom; white-space: normal; line-height: 1.2; min-width: 74px; padding: 10px 6px; font-size: 11.5px; }
.integ-table .ig-head, .integ-table .ig-cell { border-left: 1px solid var(--line); }
.integ-table tbody tr:hover > * { background: var(--surface-2); }
.ig-logo { display: grid; place-items: center; width: 32px; height: 32px; margin: 0 auto 6px; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.ig-logo .logo { width: 22px; height: 22px; object-fit: contain; }
.logo-mono { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; }
.ig-name { display: block; }
.ig-cell { text-align: center; padding: 8px 4px; }
.ig-mark { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-weight: 700; line-height: 1; }
.ig-mark .i { width: 14px; height: 14px; }
.ig-ok .ig-mark { background: var(--good-soft, rgba(46, 157, 106, .14)); color: var(--good); }
.ig-off .ig-mark, .ig-unknown .ig-mark { color: var(--text-3); }
.ig-error .ig-mark { background: var(--crit-fill); color: #fff; }
.ig-cell.ig-error { background: var(--crit-soft, transparent); }
.ig-total { font-weight: 650; font-variant-numeric: tabular-nums; color: var(--text); }
.integ-table tfoot th, .integ-table tfoot td { border-top: 2px solid var(--line); }
.ig-legend { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--text-2); }
.ig-legend li { display: inline-flex; align-items: center; gap: 6px; }
.ig-legend .ig-hint { color: var(--text-3); }
.ig-btn { display: inline-grid; place-items: center; padding: 3px; border: 0; border-radius: 50%; background: none; cursor: pointer; color: inherit; font: inherit; }
.ig-btn:hover .ig-mark, .ig-btn:focus-visible .ig-mark { box-shadow: 0 0 0 2px var(--accent); }
.match-now { margin: 0; display: grid; gap: 4px; }
.match-note { margin: 0; font-size: 13px; color: var(--text-3); }
.match-list { border: 1px solid var(--line); border-radius: 10px; margin: 0; padding: 4px; display: grid; gap: 2px; max-height: 52vh; overflow-y: auto; }
.match-row { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.match-row:hover { background: var(--surface-2); }
.match-row:has(input:checked) { background: var(--accent-soft, var(--surface-2)); box-shadow: inset 0 0 0 1px var(--accent); }
.match-row input { grid-row: span 2; margin: 0; }
.match-name { font-weight: 600; overflow-wrap: anywhere; }
.match-sub { grid-column: 2; font-size: 12.5px; color: var(--text-3); overflow-wrap: anywhere; }
.match-sub:empty { display: none; }
.match-warn { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--warn); }
.match-warn .i { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.match-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.match-done { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--good); font-weight: 600; }
.match-done .i { width: 16px; height: 16px; }
.unmatched-list { margin: 8px 0 4px; padding: 0; list-style: none; columns: 2 260px; column-gap: 24px; font-size: 13.5px; }
.unmatched-list li { break-inside: avoid; padding: 3px 0; }
.unmatched-list .cell-sub { display: inline; margin-left: 6px; }
.unmatched-warn { color: var(--warn); font-weight: 500; }

.vendor-badge.has-logo { background: #fff; border: 1px solid var(--line); }
.vendor-badge .logo { width: 24px; height: 24px; object-fit: contain; }
.vendor-badge .logo-mono { width: 24px; height: 24px; }

/* Audit log: view chips, day picker or page size, pager */
.audit-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 14px; }
.audit-tools .seg-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.audit-tools .day-picker { margin: 0; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; }
.pager-text { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 90px; text-align: center; }

/* Overview: open follow-ups inside the Critical now card */
.ov-followups { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.ov-fu-title { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13.5px; font-weight: 650; }
.ov-fu-title .i { width: 15px; height: 15px; color: var(--text-3); }
.ov-fu-link { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 500; }
.ov-fu-link .i { width: 13px; height: 13px; color: currentColor; }
.ov-followups ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ov-followups li { display: grid; gap: 1px; font-size: 13.5px; }
.ov-fu-due { font-size: 12px; color: var(--text-3); }
.ov-followups .nc-overdue { font-size: 12px; }

/* Ask box (top bar) and Ask page, phase 1 */
.askbar { flex: 0 1 380px; min-width: 0; margin-left: 12px; }
.askbar-field { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 10px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: var(--on-navy-2); }
.askbar-field:focus-within { border-color: rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .12); }
.askbar-field .i { width: 17px; height: 17px; flex: none; }
.askbar-field input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--on-navy); font: inherit; font-size: 14px; }
.askbar-field input::placeholder { color: var(--on-navy-2); }
.askbar-field input:focus { outline: none; }
@media (max-width: 1100px) { .askbar { display: none; } }
.ask-page { display: grid; gap: 16px; }
.ask-big { display: flex; gap: 10px; align-items: center; }
.ask-big-field { flex: 1; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.ask-big-field:focus-within { border-color: var(--accent); }
.ask-big-field .i { width: 19px; height: 19px; color: var(--accent); flex: none; }
.ask-big-field input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 15.5px; color: var(--text); }
.ask-big-field input:focus { outline: none; }
.ask-examples { display: grid; gap: 6px; }
.ask-ex-title { margin: 4px 0 0; font-size: 12.5px; font-weight: 650; color: var(--text-3); }
.ask-examples .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ask-sub { margin: 0 0 10px; font-size: 13.5px; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.ask-logo { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: #fff; border: 1px solid var(--line); }
.ask-logo .logo { width: 18px; height: 18px; object-fit: contain; }
.ask-table td.num, .ask-table th.num { text-align: right; }
.ask-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ask-rank li { display: grid; grid-template-columns: 28px minmax(0, 1.4fr) minmax(80px, 1fr) 110px; align-items: center; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.ask-rank-n { font-variant-numeric: tabular-nums; color: var(--text-3); text-align: right; }
.ask-rank-name a { font-weight: 600; }
.ask-rank-bar svg { width: 100%; height: 8px; display: block; }
.ask-bar-track { fill: var(--track); }
.ask-bar-fill { fill: var(--accent); }
.ask-rank-v { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }

/* TBR prep tracker (client header, every tab): done = green, the next step = blue, the rest grey */
.prep { position: relative; }
.prep-btn {
  display: grid; gap: 5px; width: 252px; padding: 10px 12px 11px; text-align: left; cursor: pointer;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 12px; font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.prep-btn:hover, .prep-btn[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.prep-top { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); }
.prep-count { font-variant-numeric: tabular-nums; letter-spacing: 0; text-transform: none; }
.prep-now { display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 650; }
.prep-chev { width: 16px; height: 16px; color: var(--text-3); transition: transform 0.2s var(--ease); }
.prep-btn[aria-expanded="true"] .prep-chev { transform: rotate(180deg); }
.prep-bar { display: flex; gap: 3px; }
.pb { flex: 1; height: 5px; border-radius: 3px; background: var(--track); }
.pb.is-done { background: var(--good-fill); }
.pb.is-next { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.pb.is-gap { margin-left: 6px; }
.prep-next { font-size: 12.5px; color: var(--text-2); }
.prep-pop {
  position: absolute; right: 0; top: calc(100% + 8px); width: min(360px, calc(100vw - 32px)); z-index: 40;
  max-height: calc(100vh - 140px); overflow-y: auto; padding: 14px 14px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop);
}
.prep-title { margin: 0 0 2px; font-size: 15px; }
.prep-title:focus { outline: none; }
.prep-group { margin: 12px 0 4px; font-size: 11.5px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); }
.psteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pstep-btn { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 6px 6px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pstep-btn:not(.is-static):hover { background: var(--hover); }
.pstep-btn.is-static { cursor: default; }
.pstep-dot { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-strong); font-size: 12px; font-weight: 650; color: var(--text-3); }
.pstep-dot .i { width: 13px; height: 13px; }
.pstep.is-done .pstep-dot, .pstep.is-current .pstep-dot { background: var(--good-fill); border-color: var(--good-fill); color: #fff; }
.pstep.is-current .pstep-dot { box-shadow: 0 0 0 4px var(--good-soft); }
.pstep.is-next .pstep-dot { border-color: var(--accent); color: var(--accent-text); }
.pstep-text { display: grid; gap: 1px; min-width: 0; }
.pstep-label { font-size: 14px; font-weight: 600; }
.pstep.is-todo .pstep-label { color: var(--text-2); font-weight: 550; }
.pstep-sub { font-size: 12.5px; color: var(--text-3); }
.pchecks { list-style: none; margin: 2px 0 6px 40px; padding: 0; display: grid; gap: 4px; }
.pcheck { display: flex; align-items: flex-start; gap: 7px; font-size: 13px; color: var(--text-2); }
.pcheck .i { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.pcheck.is-ok .i { color: var(--good); }
.pcheck.is-warn .i { color: var(--warn); }
.pcheck-dot { flex: none; width: 8px; height: 8px; margin: 5px 3px 0; border-radius: 50%; border: 1.5px solid var(--line-strong); }
.pcheck.is-info .pcheck-dot { border-style: dashed; }
.prep-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.prep-ro { margin: 12px 0 0; font-size: 12.5px; color: var(--text-3); }
@media (max-width: 720px) { .prep-btn { width: 100%; } .client-head-side .prep { width: 100%; } .prep-pop { left: 0; right: auto; } }

/* ---------- finance billing audits ---------- */
.fin-form { display: grid; gap: 22px; }
.fin-types { border: 0; margin: 0; padding: 0; min-width: 0; }
.fin-types legend, .fin-files .field-label { margin-bottom: 10px; }
.fin-type-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.fin-type {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.fin-type:hover { background: var(--hover); }
.fin-type:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.fin-type:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.fin-type-title { font-weight: 600; font-size: 14.5px; color: var(--text); }
.fin-type:has(input:checked) .fin-type-title { color: var(--accent-text); }
.fin-type-desc { font-size: 13px; line-height: 1.45; color: var(--text-3); }
.fin-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.fin-drop {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-width: 0; border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius); background: var(--surface); cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease;
}
.fin-drop:hover, .fin-drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.fin-drop:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.fin-drop.has-file { border-style: solid; border-color: var(--good-fill); background: var(--good-soft); }
.fin-drop-ico { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 9px; background: var(--surface-2); color: var(--text-3); }
.fin-drop.has-file .fin-drop-ico { color: var(--good); background: var(--surface); }
.fin-drop-ico .i { width: 19px; height: 19px; }
.fin-drop-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.fin-drop-label { font-weight: 600; font-size: 14px; color: var(--text); }
.fin-drop-name { font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-drop.has-file .fin-drop-name { color: var(--good); font-weight: 550; }
.fin-drop-btn { flex: none; pointer-events: none; }
.fin-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.fin-hint { font-size: 13px; color: var(--text-3); }
.fin-runs td { vertical-align: middle; }
.fin-runs tr.is-selected td { background: var(--accent-soft); }
.fin-run-audit { font-weight: 600; white-space: nowrap; }
.fin-run-file { color: var(--text-2); overflow-wrap: anywhere; min-width: 180px; }
.fin-run-open { text-align: right; white-space: nowrap; }
.fin-open-now { font-size: 13px; font-weight: 600; color: var(--accent-text); }
.fin-err { margin-top: 4px; font-size: 12.5px; color: var(--crit); max-width: 360px; }
.fin-result-head { align-items: flex-end; }
.fin-result-head .eyebrow { margin-bottom: 2px; }
.fin-result-meta { margin: 4px 0 0; font-size: 13px; color: var(--text-3); overflow-wrap: anywhere; }
.fin-summary { margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); background: var(--surface); }
.fin-summary p { margin: 0; font-size: 14px; color: var(--text-2); }
.fin-summary p + p { margin-top: 4px; }
.fin-apply { margin: 0 0 18px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); display: grid; gap: 12px; }
.fin-apply-title { font-size: 16px; font-weight: 650; margin: 0 0 4px; }
.fin-apply .plain { margin: 0; }
.fin-apply .fin-pick { width: 1%; }
.fin-apply .confirm { flex-wrap: wrap; }
.fin-manual ul { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; color: var(--text-2); display: grid; gap: 4px; }
.fin-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.fin-sheets, .fin-filter { flex-wrap: wrap; }
.fin-table { font-size: 13.5px; }
.fin-table th { white-space: nowrap; }
.fin-table th, .fin-table td { padding: 10px 12px; vertical-align: top; }
.fin-table td.fin-nowrap, .fin-nowrap { white-space: nowrap; }
.fin-table td.fin-wide { min-width: 180px; max-width: 320px; white-space: normal; overflow-wrap: break-word; }
.fin-table td.num { white-space: nowrap; }
.fin-status { min-width: 200px; max-width: 360px; }
.fin-status .pill { white-space: nowrap; }
.fin-detail { display: block; margin-top: 5px; font-size: 12.5px; line-height: 1.4; color: var(--text-3); white-space: normal; overflow-wrap: break-word; }
.fin-muted { color: var(--text-3); }
.fin-diff { color: var(--crit); font-weight: 600; }
.fin-table td.num strong { font-weight: 600; color: var(--text); }
.fin-empty { display: flex; align-items: center; gap: 8px; color: var(--good); }
.fin-empty .i { width: 18px; height: 18px; }

/* Research tab: profile + brief on the left, Ask on the right */
.rs-page { display: grid; gap: 20px; }
.rs-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 20px; align-items: start; }
.rs-side { display: grid; gap: 20px; }
.rs-profile .rs-dl { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 20px; }
.rs-profile .rs-dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
.rs-fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.rs-fold > summary::-webkit-details-marker { display: none; }
.rs-fold > summary .section-title { flex: 1 1 auto; margin: 0; }
.rs-fold-hint { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.rs-fold-chev { width: 16px; height: 16px; color: var(--text-3); flex: none; transition: transform 0.2s var(--ease); }
.rs-fold[open] .rs-fold-chev { transform: rotate(180deg); }
.rs-fold-body { margin-top: 12px; animation: rise 0.25s var(--ease) both; }
.rs-fold-actions { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.rs-fold-actions:empty { display: none; }
.rs-card { padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-soft); min-width: 0; }
.rs-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.rs-note { margin: 2px 0 12px; font-size: 13px; color: var(--text-3); }
.rs-card-head .rs-note { margin: 0; }
.rs-dl { display: grid; gap: 9px; margin: 0; }
.rs-dl > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; }
.rs-dl dt { font-size: 13px; color: var(--text-3); }
.rs-dl dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.rs-text { display: grid; gap: 8px; font-size: 14.5px; line-height: 1.55; }
.rs-text p, .rs-text ul { margin: 0; }
.rs-text ul { padding-left: 20px; display: grid; gap: 3px; }
.rs-h { margin: 8px 0 0; font-size: 14px; font-weight: 650; }
.rs-h:first-child { margin-top: 0; }
.rs-meta { margin: 10px 0 0; font-size: 12.5px; color: var(--text-3); }
.rs-form { display: flex; gap: 10px; align-items: center; }
.rs-form .ask-big-field { flex: 1; min-width: 0; }
.rs-examples { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.rs-thread { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 14px; }
.rs-qa { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); animation: rise 0.25s var(--ease) both; }
.rs-q { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 10px; font-weight: 600; }
.rs-q .i { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--text-3); }
.rs-wait { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--text-2); font-size: 14px; }
.rs-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--accent); border-right-color: transparent; animation: spin 0.8s linear infinite; }
.rs-err { margin: 0; color: var(--crit); font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .rs-spin { animation-duration: 2.4s; } .rs-qa { animation: none; } }
@media (max-width: 960px) { .rs-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .rs-form { flex-wrap: wrap; } .rs-form .btn { width: 100%; } .rs-card { padding: 16px; } .rs-dl > div { grid-template-columns: 96px minmax(0, 1fr); } }

/* ============ design refresh (2026-10-21) ============
   Geist (the typeface shadcn uses), a clearer type scale and more air on the dashboard, staggered entrances with
   counted numbers, raised cards in dark mode, and a dark Atlas stage for the sign-in and no-access pages.
   Appended as one block on purpose: later rules win, and the whole change reads (and reverts) in one place. */
:root {
  --font: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-lg: 14px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-card: 0 1px 2px rgba(15, 42, 74, 0.05), 0 1px 1px rgba(15, 42, 74, 0.03);
}
[data-theme="dark"] { --shadow-card: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 1px 2px rgba(0, 0, 0, 0.35); }

/* page head */
.page-head { margin-bottom: 32px; }
.page-title { font-size: 32px; letter-spacing: -0.025em; }

/* dashboard tiles + panels */
.dashboard { margin: 0 0 40px; }
.dash-tiles { gap: 16px; margin: 0 0 16px; }
.dash-tile { padding: 20px 22px 18px; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); animation: rise 0.55s var(--ease-out) both; }
.dash-tile.sev-critical, .dash-tile.sev-warning { box-shadow: inset 3px 0 0 var(--sev), var(--shadow-card); }
.dash-tile dt { font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.dash-value { margin-top: 10px; font-size: 34px; line-height: 1.05; letter-spacing: -0.03em; }
.dash-sub { margin-top: 8px; font-size: 13px; line-height: 1.45; }
.dash-tile:nth-child(2) { animation-delay: 60ms; }
.dash-tile:nth-child(3) { animation-delay: 120ms; }
.dash-tile:nth-child(4) { animation-delay: 180ms; }
.dash-tile:nth-child(5) { animation-delay: 240ms; }
.dash-tile:nth-child(6) { animation-delay: 300ms; }
.dash-panels { gap: 16px; }
.dash-panel { padding: 22px 24px; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); animation: rise 0.6s var(--ease-out) both; animation-delay: 260ms; }
.dash-panels > :nth-child(2) { animation-delay: 340ms; }
.dash-panel-title { font-size: 16px; margin-bottom: 14px; }
.tstate-bar, .hband-bar { height: 8px; border-radius: 4px; }
.tstate-legend, .hband-legend { margin-top: 12px; gap: 8px 20px; }
.dash-sub-title { margin: 22px 0 8px; }
.dash-lowest li { padding: 9px 0; }
.dash-note { margin-top: 14px; }

/* toolbar + account-manager board */
.toolbar { margin-bottom: 22px; }
.am-board { margin-top: 24px; }
.am-row-head { margin: 8px 0 16px; }
.am-grid { grid-template-columns: repeat(auto-fit, minmax(226px, 1fr)); gap: 16px; }
.am-card { padding: 20px 22px; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); animation: rise 0.55s var(--ease-out) both; }
.am-card:nth-child(2) { animation-delay: 60ms; }
.am-card:nth-child(3) { animation-delay: 120ms; }
.am-card:nth-child(4) { animation-delay: 180ms; }
.am-card:nth-child(5) { animation-delay: 240ms; }
.am-card:nth-child(6) { animation-delay: 300ms; }
.am-head { margin-bottom: 14px; }
.am-meta { font-size: 13px; line-height: 1.45; }
.am-clients { gap: 8px; margin-top: 14px; max-height: none; overflow: visible; padding-right: 0; }
.am-more { margin-top: 10px; width: 100%; justify-content: center; color: var(--accent-text); }
.am-more .am-more-chev { width: 15px; height: 15px; transition: transform 0.2s var(--ease); }
.am-more[aria-expanded="true"] .am-more-chev { transform: rotate(180deg); }
.cchip { padding: 10px 12px 10px 14px; border-radius: 10px; }

/* dark mode: cards sit a step above the page, with a hairline top highlight */
[data-theme="dark"] .dash-tile, [data-theme="dark"] .dash-panel, [data-theme="dark"] .am-card { background: #172540; border-color: rgba(255, 255, 255, 0.07); }
[data-theme="dark"] .cchip { background: rgba(255, 255, 255, 0.04); }
[data-theme="dark"] .cchip:hover { background: rgba(255, 255, 255, 0.08); }

/* ---------- sign-in / no-access stage ---------- */
body.gate-mode main.container { max-width: none; padding: 0; }
.gate-stage {
  position: relative; isolation: isolate; overflow: hidden; margin: 0; padding: 56px 24px;
  min-height: calc(100vh - var(--topbar-h)); color: #fff;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(30, 111, 217, 0.36) 0%, rgba(30, 111, 217, 0) 70%),
    linear-gradient(180deg, #0C1D36 0%, #070F1E 55%, #04080F 100%);
}
.gate-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
/* a fine grid that fades out from the centre */
.gate-bg::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 62% 58% at 50% 42%, #000 0%, rgba(0, 0, 0, 0.45) 50%, transparent 100%);
  mask-image: radial-gradient(ellipse 62% 58% at 50% 42%, #000 0%, rgba(0, 0, 0, 0.45) 50%, transparent 100%);
}
/* one light, sweeping slowly */
.gate-beam {
  position: absolute; left: -20%; top: 8%; width: 140%; height: 46%; pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgba(77, 143, 234, 0.14) 44%, rgba(140, 190, 255, 0.22) 50%, rgba(77, 143, 234, 0.14) 56%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  animation: beam-sweep 24s ease-in-out infinite alternate;
}
@keyframes beam-sweep { from { transform: translateX(-10%) rotate(-18deg); } to { transform: translateX(10%) rotate(-18deg); } }
/* orbits round the Atlas globe: thin rings, a few points of light travelling along them */
.gate-orbits { position: absolute; left: 50%; top: 46%; width: 1100px; height: 1100px; transform: translate(-50%, -50%); pointer-events: none; }
.gate-orbits .ring { fill: none; stroke: rgba(255, 255, 255, 0.07); stroke-width: 1; }
.gate-orbits .ring-2 { stroke: rgba(255, 255, 255, 0.11); stroke-dasharray: 2 9; }
.gate-orbits .ring-3 { stroke: rgba(255, 255, 255, 0.05); }
.gate-orbits .orbit { transform-box: view-box; transform-origin: 550px 550px; animation: orbit-spin 52s linear infinite; }
.gate-orbits .orbit-2 { animation-duration: 80s; animation-direction: reverse; }
.gate-orbits .orbit-3 { animation-duration: 118s; }
.gate-orbits .sat { fill: #A9CCFF; filter: drop-shadow(0 0 5px rgba(140, 190, 255, 0.95)) drop-shadow(0 0 14px rgba(30, 111, 217, 0.8)); }
.gate-orbits .sat-halo { fill: rgba(125, 176, 255, 0.16); }
@keyframes orbit-spin { to { transform: rotate(360deg); } }
/* the card: frosted, with a light running round its edge */
@property --gate-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.gate-stage .gate-box {
  position: relative; max-width: 480px; gap: 14px; padding: 44px 40px 36px; border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.085) 0%, rgba(255, 255, 255, 0.04) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.gate-stage .gate-box::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--gate-angle), transparent 0deg, transparent 250deg, rgba(140, 190, 255, 0.95) 300deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  animation: gate-angle 9s linear infinite;
}
@keyframes gate-angle { to { --gate-angle: 360deg; } }
.gate-stage .gate-box > * { animation: rise 0.7s var(--ease-out) both; }
.gate-stage .gate-box > :nth-child(1) { animation-delay: 80ms; }
.gate-stage .gate-box > :nth-child(2) { animation-delay: 160ms; }
.gate-stage .gate-box > :nth-child(3) { animation-delay: 240ms; }
.gate-stage .gate-box > :nth-child(4) { animation-delay: 320ms; }
.gate-stage .gate-box > :nth-child(5) { animation-delay: 400ms; }
.gate-stage .gate-box > :nth-child(6) { animation-delay: 480ms; }
.gate-stage .gate-box > :nth-child(7) { animation-delay: 560ms; }
.gate-stage .gate-logo {
  width: 88px; height: 88px; margin-bottom: 6px; background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25), 0 0 0 8px rgba(255, 255, 255, 0.05), 0 0 44px rgba(30, 111, 217, 0.45), 0 16px 40px rgba(0, 0, 0, 0.5);
  animation: rise 0.7s var(--ease-out) 80ms both, logo-glow 5s ease-in-out 1.2s infinite alternate;
}
@keyframes logo-glow {
  from { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25), 0 0 0 8px rgba(255, 255, 255, 0.05), 0 0 40px rgba(30, 111, 217, 0.4), 0 16px 40px rgba(0, 0, 0, 0.5); }
  to { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.32), 0 0 0 12px rgba(255, 255, 255, 0.07), 0 0 70px rgba(77, 143, 234, 0.7), 0 16px 40px rgba(0, 0, 0, 0.5); }
}
.gate-eyebrow { margin: 0; font-size: 11.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); }
.gate-stage .gate-title { font-size: 32px; font-weight: 650; letter-spacing: -0.03em; color: #fff; margin-top: -6px; }
.gate-stage .gate-lede { color: rgba(255, 255, 255, 0.72); font-size: 16px; }
.gate-stage .gate-fine { color: rgba(255, 255, 255, 0.55); }
.gate-stage .gate-fine a, .gate-stage .gate-fine strong, .gate-stage code { color: rgba(255, 255, 255, 0.92); }
.gate-stage code { background: rgba(255, 255, 255, 0.1); padding: 1px 6px; border-radius: 5px; }
.gate-stage .gate-icon { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.85); }
.gate-stage .gate-error { background: rgba(232, 93, 82, 0.18); color: #FFB4AD; }
.gate-stage .btn { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.16); color: #fff; }
.gate-stage .btn:hover { background: rgba(255, 255, 255, 0.14); }
.gate-stage .btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.gate-stage .btn-primary { background: #fff; border-color: #fff; color: #0F2A4A; box-shadow: 0 10px 30px rgba(30, 111, 217, 0.35); transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), background 0.15s ease; }
.gate-stage .btn-primary:hover { background: #EAF2FF; border-color: #EAF2FF; transform: translateY(-1px); box-shadow: 0 14px 36px rgba(30, 111, 217, 0.45); }
.gate-stage .btn-primary.is-busy::after { border-color: #0F2A4A transparent #0F2A4A #0F2A4A; }
.gate-stage .btn-lg { height: auto; min-height: 50px; padding: 12px 20px; border-radius: 12px; font-size: 15.5px; white-space: normal; line-height: 1.3; }
@media (max-width: 640px) {
  .gate-stage { padding: 32px 16px; }
  .gate-stage .gate-box { padding: 36px 22px 28px; }
  .gate-orbits { width: 760px; height: 760px; }
}

/* ============ zinc re-skin (2026-10-21, Nihar: neutral zinc, blue accent) ============
   Neutral greys, near-black text, one blue for anything clickable or current, colour otherwise reserved for
   status. The top bar matches the page instead of a navy band; nav icon tiles are neutral until active.
   --navy becomes "ink" (initials bubbles, badges, report table heads). Appended as one block on purpose. */
:root {
  --navy: #18181B; --navy-line: var(--line); --on-navy: var(--text); --on-navy-2: var(--text-2);
  --accent: #2563EB; --accent-text: #1D4ED8; --accent-soft: #EFF6FF; --accent-soft-2: #DBEAFE;
  --btn: #2563EB; --btn-hover: #1D4ED8;
  --bg: #FAFAFA; --surface: #FFFFFF; --surface-2: #F4F4F5; --hover: #F4F4F5;
  --text: #09090B; --text-2: #3F3F46; --text-3: #71717A;
  --line: #E4E4E7; --line-strong: #D4D4D8; --track: #E4E4E7;
  --good: #15803D; --good-fill: #22C55E; --good-soft: #F0FDF4;
  --warn: #B45309; --warn-fill: #F59E0B; --warn-soft: #FFFBEB;
  --crit: #B91C1C; --crit-fill: #EF4444; --crit-soft: #FEF2F2;
  --neutral-fill: #A1A1AA; --bar-neutral: #52525B; --hb-good: #A1A1AA;
  --done-bg: #F4F4F5; --done-fg: #18181B;
  --toast-bg: #18181B; --toast-fg: #FAFAFA;
  --shadow-pop: 0 10px 30px rgba(0, 0, 0, 0.10), 0 2px 6px rgba(0, 0, 0, 0.06);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04);
  --focus: #2563EB;
  --radius: 12px; --radius-sm: 8px;
  --hue-blue: #52525B; --hue-blue-bg: #F4F4F5; --hue-indigo: #52525B; --hue-indigo-bg: #F4F4F5;
  --hue-violet: #52525B; --hue-violet-bg: #F4F4F5; --hue-cyan: #52525B; --hue-cyan-bg: #F4F4F5;
  --hue-slate: #52525B; --hue-slate-bg: #F4F4F5; --hue-navy: #52525B; --hue-navy-bg: #F4F4F5;
}
[data-theme="dark"] {
  --navy: #3F3F46; --navy-line: var(--line); --on-navy: var(--text); --on-navy-2: var(--text-2);
  --accent: #3B82F6; --accent-text: #60A5FA; --accent-soft: rgba(59, 130, 246, 0.14); --accent-soft-2: rgba(59, 130, 246, 0.28);
  --btn: #2563EB; --btn-hover: #3B82F6;
  --bg: #09090B; --surface: #121214; --surface-2: #1C1C20; --hover: #202024;
  --text: #FAFAFA; --text-2: #A1A1AA; --text-3: #85858E;
  --line: #27272A; --line-strong: #3F3F46; --track: #27272A;
  --good: #4ADE80; --good-fill: #22C55E; --good-soft: rgba(34, 197, 94, 0.14);
  --warn: #FBBF24; --warn-fill: #F59E0B; --warn-soft: rgba(245, 158, 11, 0.15);
  --crit: #F87171; --crit-fill: #EF4444; --crit-soft: rgba(239, 68, 68, 0.15);
  --neutral-fill: #52525B; --bar-neutral: #A1A1AA; --hb-good: #52525B;
  --done-bg: rgba(255, 255, 255, 0.08); --done-fg: #E4E4E7;
  --toast-bg: #FAFAFA; --toast-fg: #09090B;
  --shadow-pop: 0 14px 36px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-card: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 1px 2px rgba(0, 0, 0, 0.4);
  --focus: #60A5FA;
  --hue-blue: #A1A1AA; --hue-blue-bg: rgba(255, 255, 255, 0.07); --hue-indigo: #A1A1AA; --hue-indigo-bg: rgba(255, 255, 255, 0.07);
  --hue-violet: #A1A1AA; --hue-violet-bg: rgba(255, 255, 255, 0.07); --hue-cyan: #A1A1AA; --hue-cyan-bg: rgba(255, 255, 255, 0.07);
  --hue-slate: #A1A1AA; --hue-slate-bg: rgba(255, 255, 255, 0.07); --hue-navy: #A1A1AA; --hue-navy-bg: rgba(255, 255, 255, 0.07);
}

/* top bar matches the page */
.topbar { background: var(--surface); color: var(--text); border-bottom: 1px solid var(--line); }
.brand { color: var(--text); }
.brand-logo { box-shadow: 0 0 0 1px var(--line); }
.icon-btn { color: var(--text-2); }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.avatar { background: var(--accent); box-shadow: 0 0 0 2px var(--surface-2); }
.avatar-btn:hover .avatar, .avatar-btn[aria-expanded="true"] .avatar { box-shadow: 0 0 0 2px var(--accent-soft-2); }
.topbar :focus-visible { outline-color: var(--focus); }
.picker-btn { border-color: var(--line); background: var(--surface-2); color: var(--text); box-shadow: none; }
.picker-btn:hover, .picker-btn[aria-expanded="true"] { background: var(--hover); border-color: var(--line-strong); }
.picker-label.is-placeholder { color: var(--text-3); }
.picker-kbd { color: var(--text-3); border-color: var(--line-strong); background: var(--surface); }
.askbar-field { background: var(--surface-2); border-color: var(--line); color: var(--text-3); }
.askbar-field:focus-within { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft-2); }
.askbar-field input { color: var(--text); }
.askbar-field input::placeholder { color: var(--text-3); }
.mockbar { background: var(--bg); }
/* the sign-in stage keeps a dark bar above it */
body.gate-mode .topbar { background: #0C1D36; border-bottom-color: rgba(255, 255, 255, 0.08); color: #fff; }
body.gate-mode .brand { color: #fff; }
body.gate-mode .brand-logo { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9); }
body.gate-mode .icon-btn { color: rgba(255, 255, 255, 0.75); }
body.gate-mode .icon-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

/* sidebar: neutral icon tiles, blue only on the current page */
.sidebar { background: var(--bg); }
.side-label { font-size: 11px; }
.side-ico { background: var(--surface-2); color: var(--text-2); }
.side-link[aria-current="page"] .side-ico { background: var(--accent); color: #fff; }
[data-theme="dark"] .side-link[aria-current="page"] .side-ico { color: #fff; }

/* components */
.btn { height: 36px; border-radius: 8px; border-color: var(--line); box-shadow: var(--shadow-soft); font-weight: 500; }
.btn:hover { border-color: var(--line-strong); }
.btn-ghost, .btn-ghost:hover { box-shadow: none; border-color: transparent; }
.btn-primary { border-color: var(--btn); box-shadow: 0 1px 2px rgba(37, 99, 235, 0.3); }
.btn-primary:hover { border-color: var(--btn-hover); }
.btn-lg { height: 44px; border-radius: 10px; }
.input, textarea, select.input, input[type="search"], input[type="date"] { height: 36px; border-radius: 8px; border-color: var(--line); box-shadow: var(--shadow-soft); }
textarea { height: auto; }
.input:focus, textarea:focus, input[type="search"]:focus, input[type="date"]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft-2); }
.input-sm { height: 32px; }
.table th, .table td { padding: 12px 14px; }
.table thead th { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 500; color: var(--text-3); }
.seg-opt input:checked + span { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--line); }
.dash-tile, .dash-panel, .am-card, .vendor, .menu-pop, .picker-pop, .drawer { border-color: var(--line); }
[data-theme="dark"] .dash-tile, [data-theme="dark"] .dash-panel, [data-theme="dark"] .am-card { background: var(--surface); border-color: var(--line); }
[data-theme="dark"] .cchip { background: var(--surface-2); }
[data-theme="dark"] .cchip:hover { background: var(--hover); }
.section { padding: 36px 0; }
.section-title { font-size: 17px; }

/* ---------- Project backlog (#/backlog) ---------- */
.bl-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.bl-inputs { display: flex; flex-wrap: wrap; gap: 12px 20px; margin: 4px 0 18px; }
.bl-inputs label { display: grid; gap: 4px; font-size: 13px; color: var(--text-2); }
.bl-inputs .input { width: 120px; }
.bl-email { white-space: pre-wrap; font: inherit; font-size: 14px; line-height: 1.55; margin: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.bl-leftout { margin-top: 14px; font-size: 14px; color: var(--text-2); }
.bl-leftout summary { cursor: pointer; }
.bl-leftout ul { margin: 8px 0 0 18px; padding: 0; }
.bl-why { color: var(--text-3); margin-left: 6px; }
/* ============ Shift staffing (#/staffing) ============ */
.stf-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 18px 0 4px; }
.stf-source { margin: 0; font-size: 13.5px; color: var(--text-2); }
.stf-bar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.stf-bar-actions select { max-width: 260px; }
.stf-err { color: var(--crit); }
.stf-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0 0; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--warn); font-size: 14px; }
.stf-note .i { width: 16px; height: 16px; flex: none; }
.stf-note span { flex: 1 1 260px; color: var(--text); }
.stf-note-dirty { background: var(--accent-soft); color: var(--accent-text); }
.stf-saved { margin: 14px 0 0; font-size: 13px; color: var(--text-3); }
.kpis-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stf-kpi-of { margin-left: 2px; font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--text-3); }
.stf-muted { color: var(--text-3); }
.stf-shifts th[scope="row"] { min-width: 150px; }
.stf-shift-time { display: block; font-weight: 600; }
.stf-shift-name { display: block; font-size: 12.5px; font-weight: 450; color: var(--text-3); }
.stf-shifts tfoot th, .stf-shifts tfoot td { border-bottom: 0; font-weight: 600; }
.stf-delta { display: inline-block; min-width: 34px; margin-left: 4px; font-size: 12.5px; font-weight: 600; }
.stf-up { color: var(--crit); }
.stf-down, .stf-same { color: var(--text-3); font-weight: 500; }
.stf-roster p { margin: 8px 0 0; font-size: 13.5px; color: var(--text-2); }

.stf-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 12px; padding: 0; list-style: none; font-size: 13px; color: var(--text-2); }
.stf-key { display: inline-flex; align-items: center; gap: 6px; }
.stf-key .i { width: 15px; height: 15px; }
.stf-key.stf-short .i { color: var(--crit); }
.stf-key.stf-tight .i { color: var(--warn); }
.stf-key.stf-ok .i { color: var(--good); }
.stf-key.stf-none .i { color: var(--neutral-fill); }
.stf-grid { display: grid; gap: 2px; max-width: 640px; }
.stf-row { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); gap: 2px; }
.stf-hour, .stf-day { font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; }
.stf-day { justify-content: center; font-weight: 600; padding-bottom: 2px; }
.stf-cell { height: 26px; min-width: 0; padding: 0 2px; border: 0; border-radius: 4px; font: inherit; font-size: 11.5px; font-variant-numeric: tabular-nums; cursor: pointer; background: var(--surface-2); color: var(--text-3); }
.stf-cell.stf-short { background: var(--crit-soft); color: var(--crit); font-weight: 650; }
.stf-cell.stf-tight { background: var(--warn-soft); color: var(--warn); }
.stf-cell.stf-ok { background: var(--good-soft); color: var(--good); }
.stf-cell.stf-none { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.stf-cell.stf-oncall { background: var(--surface-2); color: var(--text-3); box-shadow: inset 0 0 0 1px var(--line-strong); }
.stf-key.stf-oncall .i { color: var(--text-3); }
.stf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; padding: 0; list-style: none; font-size: 13.5px; }
.stf-chips .chip { display: inline-flex; align-items: center; gap: 4px; }
.stf-chip-x { display: inline-flex; padding: 2px; border: 0; background: none; color: var(--text-3); cursor: pointer; border-radius: 4px; }
.stf-chip-x .i { width: 13px; height: 13px; }
.stf-chip-x:hover { color: var(--crit); }
.stf-exclude { max-width: 320px; }
.stf-cell:hover { filter: brightness(0.96); }
.stf-cell.is-picked, .stf-cell:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.stf-detail { margin: 12px 0 0; min-height: 2.8em; font-size: 13.5px; color: var(--text-2); max-width: 75ch; }

.stf-form { display: grid; gap: 22px; }
.stf-group { display: grid; gap: 12px; }
.stf-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px 18px; }
.stf-num { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); }
.stf-num .input { width: 96px; }
.stf-form .input[aria-invalid="true"] { border-color: var(--crit-fill); }
.stf-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 18px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.stf-checks label { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.stf-map td:last-child { width: 150px; }
.stf-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.stf-method { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14px; color: var(--text-2); max-width: 80ch; }

@media (max-width: 900px) {
  .kpis-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
  .kpis-5 .kpi + .kpi { border-left: 0; }
  .kpis-5 .kpi { padding-left: 0; }
}
@media (max-width: 520px) {
  .stf-row { grid-template-columns: 44px repeat(7, minmax(0, 1fr)); }
  .stf-cell { font-size: 10.5px; padding: 0; }
}

/* ---------- assets added by hand (Assets tab) ---------- */
.asset-form { margin: 4px 0 18px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); display: grid; gap: 14px; }
.asset-form-title { margin: 0; font-size: 15px; font-weight: 600; }
.asset-form-hint { margin: -8px 0 0; font-size: 13px; color: var(--text-3); }
.asset-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 16px; }
.asset-fields .asset-notes { grid-column: 1 / -1; }
.asset-fields textarea { height: auto; min-height: 56px; resize: vertical; }
.asset-form .input[aria-invalid="true"] { border-color: var(--crit-fill); }
.asset-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.asset-remove { margin-left: auto; }
.asset-confirm { margin-left: auto; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; color: var(--crit); font-weight: 550; }
.asset-manual .btn-link { font-size: inherit; }
.asset-retired { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 14px; }
.asset-retired li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.asset-hand { color: var(--accent-text); }
.asset-pulled { display: flex; flex-direction: column; min-height: 36px; justify-content: center; font-size: 14px; }

/* ============ TBR progress track (client header, 2026-10-22) ============
   Coloured by phase: preparing amber, the meeting blue, follow-up green. Done steps keep their own phase colour,
   so the line shifts colour as the TBR moves through time. */
.ph-prep { --ph: var(--warn-fill); --ph-soft: var(--warn-soft); --ph-text: var(--warn); }
.ph-meeting { --ph: var(--accent); --ph-soft: var(--accent-soft); --ph-text: var(--accent-text); }
.ph-follow { --ph: var(--good-fill); --ph-soft: var(--good-soft); --ph-text: var(--good); }
.ph-idle { --ph: var(--neutral-fill); --ph-soft: var(--surface-2); --ph-text: var(--text-2); }
.client-track { margin: -8px 0 22px; }
.track {
  position: relative; padding: 18px 20px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-soft); overflow: hidden;
}
.track::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--ph); }
.track-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
.track-title { display: grid; gap: 2px; min-width: 0; margin-right: auto; }
.track-kicker { font-size: 11.5px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.track-count { margin-left: 6px; letter-spacing: 0; text-transform: none; font-weight: 550; }
.track-now { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.track-now .prep-now { display: inline; font-size: 21px; font-weight: 650; letter-spacing: -0.015em; }
.track-phase { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--ph-soft); color: var(--ph-text); font-size: 12.5px; font-weight: 650; }
.track.is-complete .track-phase { background: var(--good-soft); color: var(--good); }
.track-when { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--text-2); }
.track-when .i { width: 16px; height: 16px; color: var(--text-3); }
.track-when.is-late, .track-when.is-late .i { color: var(--crit); }
.track-when.is-unset { color: var(--text-3); }
.track-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.track-details .prep-chev { width: 15px; height: 15px; transition: transform 0.2s var(--ease); }
.track-confirm { flex-wrap: wrap; }
.track-restart .i { width: 15px; height: 15px; }
.track-details[aria-expanded="true"] .prep-chev { transform: rotate(180deg); }

/* time: last TBR to the meeting, today marked */
.tt { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin: 22px 0 4px; font-size: 12.5px; color: var(--text-3); }
.tt-bar { position: relative; height: 8px; border-radius: 4px; background: var(--track); }
.tt-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 4px; background: linear-gradient(90deg, var(--ph-soft), var(--ph)); transition: width 0.8s var(--ease); }
.tt-today { position: absolute; top: -5px; width: 2px; height: 18px; margin-left: -1px; background: var(--text); border-radius: 1px; transition: left 0.8s var(--ease); }
.tt-today-label { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 650; color: var(--text); white-space: nowrap; }

/* steps */
.track-steps { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 18px 0 0; padding: 0; }
.track-steps .pstep { position: relative; min-width: 0; }
.track-steps .pstep::before { content: ""; position: absolute; top: 15px; left: -50%; right: 50%; height: 4px; background: var(--track); z-index: 0; }
.track-steps .pstep:first-child::before { display: none; }
.track-steps .pstep.is-done::before, .track-steps .pstep.is-current::before { background: var(--ph); }
.track-steps .pstep-btn { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 0 4px 4px; border-radius: 10px; text-align: center; }
.track-steps .pstep-dot { width: 34px; height: 34px; border-width: 3px; background: var(--surface); font-size: 13px; }
.track-steps .pstep.is-done .pstep-dot { background: var(--ph); border-color: var(--ph); color: #fff; }
.track-steps .pstep.is-current .pstep-dot { background: var(--ph); border-color: var(--ph); color: #fff; box-shadow: 0 0 0 6px var(--ph-soft); animation: track-pulse 2.4s var(--ease) infinite; }
.track-steps .pstep.is-next .pstep-dot { border-color: var(--ph); color: var(--ph-text); background: var(--surface); }
.track-steps .pstep-text { justify-items: center; }
.track-steps .pstep-label { font-size: 13px; line-height: 1.25; }
.track-steps .pstep.is-current .pstep-label { color: var(--ph-text); font-weight: 700; }
.track-steps .pstep-sub { font-size: 11.5px; line-height: 1.3; }
@keyframes track-pulse { 0%, 100% { box-shadow: 0 0 0 4px var(--ph-soft); } 50% { box-shadow: 0 0 0 9px var(--ph-soft); } }
@media (prefers-reduced-motion: reduce) { .track-steps .pstep.is-current .pstep-dot { animation: none; } .tt-fill, .tt-today { transition: none; } }

/* details, inline under the track */
.track .prep-pop { position: static; width: auto; max-height: none; overflow: visible; margin-top: 14px; padding: 14px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; background: none; }
.prep-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 24px; }
.track .pchecks { margin-left: 0; }
.prep-date .dp-btn { width: 200px; }
.prep-hint { margin: 6px 0 0; font-size: 12.5px; color: var(--text-3); }

@media (max-width: 760px) {
  .track { padding: 14px 14px 10px; }
  .track-steps { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .track-steps .pstep::before { top: -50%; bottom: 50%; left: 21px; right: auto; width: 4px; height: auto; }
  .track-steps .pstep-btn { flex-direction: row; align-items: center; text-align: left; gap: 12px; padding: 4px 4px; }
  .track-steps .pstep-text { justify-items: start; }
  .tt { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}

/* ============ Recommendations tab ============ */
.rec-kpis { margin-bottom: 18px; }
.rec-later { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; font-size: 13.5px; color: var(--text-3); }
.rec-later .i { width: 15px; height: 15px; flex: none; }
.rec-meeting { margin: 0 0 22px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--accent-soft-2); background: var(--accent-soft); }
.rec-meeting-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.rec-meeting-title { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; color: var(--accent-text); }
.rec-meeting-title .i { width: 18px; height: 18px; }
.rec-meeting-hint { margin: 6px 0 12px; font-size: 13.5px; color: var(--text-2); }
.rec-meeting-form { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 12px 16px; align-items: start; }
.rec-meeting-form textarea { height: auto; min-height: 110px; resize: vertical; }
.rec-meeting-form .rec-form-actions { grid-column: 1 / -1; }
.rec-meeting-ro { margin: 0; white-space: pre-wrap; }
.rec-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 14px; }
.rec-tools .search { flex: 0 1 260px; }
.rec-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px 16px; }
.rec-fields .rec-title, .rec-fields .rec-desc { grid-column: 1 / -1; }
.rec-fields textarea { height: auto; min-height: 64px; resize: vertical; }
.rec-form .input[aria-invalid="true"] { border-color: var(--crit-fill); }
.rec-table th[scope="row"] { min-width: 280px; max-width: 520px; }
.rec-cell { font-weight: 400; }
.rec-cell-main { display: grid; gap: 3px; }
.rec-title-text { font-weight: 600; }
.rec-desc-text { font-size: 13.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rec-response .input { margin-top: 4px; max-width: 420px; }
.rec-response-text { font-size: 13px; color: var(--accent-text); }
.rec-row.is-out .rec-title-text { color: var(--text-2); }
.rec-status { min-width: 120px; }
.rec-cell-tbr { text-align: center; }
.rec-cell-edit { white-space: nowrap; text-align: right; }
.rec-cell-q { white-space: nowrap; }
.rec-edit .i { width: 15px; height: 15px; color: var(--text-3); }
.rec-edit:hover .i { color: var(--text); }
.rec-empty { display: flex; gap: 12px; align-items: flex-start; padding: 18px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--text-2); }
.rec-empty .i { width: 22px; height: 22px; color: var(--text-3); flex: none; }
.rec-empty p { margin: 0; }
/* decision colours: red = declined, amber = later, green = yes or done, grey = not decided */
.rec-st { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--text-2); }
.rec-st.st-approved, .rec-st.st-completed, .rec-status.st-approved, .rec-status.st-completed { background: var(--good-soft); color: var(--good); }
.rec-st.st-deferred, .rec-status.st-deferred { background: var(--warn-soft); color: var(--warn); }
.rec-st.st-declined, .rec-status.st-declined { background: var(--crit-soft); color: var(--crit); }
@media (max-width: 720px) { .rec-meeting-form { grid-template-columns: minmax(0, 1fr); } .rec-table th[scope="row"] { min-width: 220px; } }

/* ============ History: past TBRs ============ */
.ptbr-list { list-style: none; margin: 0; padding: 0; display: grid; }
.ptbr { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; padding: 18px 0; border-top: 1px solid var(--line); }
.ptbr-date { position: relative; display: grid; align-content: start; gap: 2px; padding-left: 18px; }
.ptbr-date::before { content: ""; position: absolute; left: 0; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--good-fill); box-shadow: 0 0 0 4px var(--good-soft); }
.ptbr:not(.is-latest) .ptbr-date::before { background: var(--neutral-fill); box-shadow: 0 0 0 4px var(--surface-2); }
.ptbr-day { font-weight: 650; }
.ptbr-q { font-size: 12.5px; color: var(--text-3); }
.ptbr-body { display: grid; gap: 8px; min-width: 0; }
.ptbr-meta { margin: 0; font-size: 13px; color: var(--text-3); }
.ptbr-tally { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ptbr-recs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ptbr-recs li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 8px 12px; border-radius: 8px; background: var(--surface-2); }
.ptbr-rec-title { font-weight: 600; }
.ptbr-response { flex-basis: 100%; font-size: 13px; color: var(--text-2); }
.ptbr-notes { margin: 8px 0 0; white-space: pre-wrap; font-size: 14px; color: var(--text-2); }
@media (max-width: 640px) { .ptbr { grid-template-columns: minmax(0, 1fr); gap: 8px; } }

/* ============ Date picker (web/js/datepicker.js, 2026-10-22) ============ */
.dp { display: inline-block; max-width: 100%; }
.dp-btn { display: inline-flex; align-items: center; gap: 8px; min-width: 190px; max-width: 100%; text-align: left; cursor: pointer; font-variant-numeric: tabular-nums; }
.dp-btn:hover { border-color: var(--text-3); }
.dp-btn .i { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.dp-btn .dp-chev { margin-left: auto; width: 14px; height: 14px; transition: transform 0.2s var(--ease); }
.dp-btn:has(+ .dp-pop:popover-open) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft-2); }
.dp-btn:has(+ .dp-pop:popover-open) .dp-chev { transform: rotate(180deg); }
.dp-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-text.is-empty { color: var(--text-3); }
.field .dp { display: block; }
.field .dp-btn { width: 100%; }
.dp-pop { position: fixed; inset: auto; margin: 0; width: 300px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop); }
.dp-pop:popover-open { animation: dp-in 0.16s var(--ease); }
@keyframes dp-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dp-title { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 15px; font-weight: 650; letter-spacing: -0.01em; cursor: pointer; }
.dp-title:hover:not(.is-static) { background: var(--surface-2); }
.dp-title.is-static { cursor: default; }
.dp-title .dp-title-chev { width: 14px; height: 14px; color: var(--text-3); }
.dp-cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 4px 0 2px; }
.dp-cell { height: 52px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; font-size: 14px; font-variant-numeric: tabular-nums; cursor: pointer; }
.dp-cell:hover:not(:disabled) { background: var(--surface-2); }
.dp-cell[aria-pressed="true"] { background: var(--accent); color: #fff; font-weight: 650; }
.dp-cell:disabled, .dp-day:disabled, .dp-nav:disabled { opacity: 0.35; cursor: default; }
.dp-day:disabled:hover, .dp-nav:disabled:hover { background: none; }
.dp-nav { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--text-2); cursor: pointer; }
.dp-nav:hover { background: var(--surface-2); color: var(--text); }
.dp-nav .i { width: 16px; height: 16px; }
.dp-grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.dp-grid th { padding: 4px 0 6px; font-size: 11.5px; font-weight: 600; color: var(--text-3); text-align: center; }
.dp-grid td { padding: 1px 0; text-align: center; }
.dp-day { width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--text); font: inherit; font-size: 13.5px; font-variant-numeric: tabular-nums; cursor: pointer; transition: background 0.12s ease; }
.dp-day:hover { background: var(--surface-2); }
.dp-day.is-out { color: var(--text-3); }
.dp-day[aria-current="date"] { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent-text); font-weight: 650; }
.dp-day[aria-pressed="true"] { background: var(--accent); color: #fff; font-weight: 650; box-shadow: none; }
.dp-day:focus-visible, .dp-nav:focus-visible, .dp-link:focus-visible, .dp-title:focus-visible, .dp-cell:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.dp-foot { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.dp-link { padding: 5px 10px; border: 0; border-radius: 7px; background: none; color: var(--text-2); font: inherit; font-size: 13.5px; cursor: pointer; }
.dp-link:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.dp-link:disabled { opacity: 0.45; cursor: default; }
.dp-today { color: var(--accent-text); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .dp-pop:popover-open { animation: none; } .dp-btn .dp-chev { transition: none; } }

/* ---- Atlas Hub: the hub (one sign-in, a tile per tool) and the per-tool sidebar head ---- */
.hub { max-width: 1120px; margin: 0 auto; padding-top: 24px; }
.hub-head { margin-bottom: 28px; }
.hub-title { font-size: 34px; letter-spacing: -0.025em; margin: 4px 0 8px; }
.hub-lede { color: var(--text-2); max-width: 62ch; margin: 0; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.tool-card { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 200px; padding: 22px 22px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); color: inherit; text-decoration: none; animation: rise 0.4s var(--ease) both; transition: transform 0.22s var(--ease-out), border-color 0.2s, box-shadow 0.2s; }
.tool-card:nth-child(2) { animation-delay: 50ms; }
.tool-card:nth-child(3) { animation-delay: 100ms; }
.tool-card:nth-child(4) { animation-delay: 150ms; }
.tool-card:nth-child(5) { animation-delay: 200ms; }
.tool-card:nth-child(6) { animation-delay: 250ms; }
a.tool-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 10px 30px rgba(15, 42, 74, 0.10); text-decoration: none; }
a.tool-card:hover * { text-decoration: none; }
a.tool-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tool-ico { width: 44px; height: 44px; margin-bottom: 8px; display: grid; place-items: center; border-radius: 12px; background: var(--hb); color: var(--hf); }
.tool-ico .i { width: 22px; height: 22px; }
.tool-kicker { font-size: 12px; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; color: var(--hf); } /* the tool's own hue (set on the card) */
.tool-card.is-locked .tool-kicker, .tool-card.is-soon .tool-kicker { color: var(--text-3); }
.tool-title { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; }
.tool-desc { flex: 1; font-size: 14px; line-height: 1.45; color: var(--text-2); }
.tool-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--accent-text); }
.tool-go .i { width: 16px; height: 16px; transition: transform 0.2s var(--ease-out); }
a.tool-card:hover .tool-go .i { transform: translateX(3px); }
.tool-card.is-locked, .tool-card.is-soon { background: var(--surface-2); box-shadow: none; }
.tool-card.is-locked .tool-title, .tool-card.is-soon .tool-title { color: var(--text-2); }
.tool-card.is-locked .tool-go, .tool-card.is-soon .tool-go { color: var(--text-3); }
.tool-card.is-locked .tool-ico, .tool-card.is-soon .tool-ico { background: var(--surface); color: var(--text-3); }
.brand-tool { padding-left: 14px; border-left: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.brand-tool[hidden] { display: none; }
.side-home { display: inline-flex; align-items: center; gap: 8px; margin: 2px 10px 4px; padding: 6px 8px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-3); text-decoration: none; }
.side-home:hover { color: var(--text); background: var(--surface-2); }
.side-home .i { width: 15px; height: 15px; }
.side-tool { margin: 0 18px 12px; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
body:not(.has-sidebar) .side-toggle { display: none; }
@media (max-width: 720px) { .brand-tool { display: none; } .hub-title { font-size: 28px; } .hub { padding-top: 8px; } }
@media (prefers-reduced-motion: reduce) { .tool-card { animation: none; transition: none; } }

/* ============ Assets by source + type-CONFIRM dialog + client prices (review call 2026-10-22) ============ */
.asset-section { margin: 18px 0 0; }
.asset-section:first-child { margin-top: 4px; }
.asset-section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 8px; }
.asset-section-title { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 15.5px; font-weight: 650; }
.asset-section-title .logo, .asset-section-title .i { width: 20px; height: 20px; flex: none; }
.asset-section-note { margin: 0; font-size: 13px; color: var(--text-3); }
.asset-actions { text-align: right; white-space: nowrap; }
.asset-actions .btn .i { width: 14px; height: 14px; }
.confirm-dialog { width: min(440px, calc(100% - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop); }
.confirm-dialog::backdrop { background: rgba(10, 20, 35, .45); }
.cd-form { display: grid; gap: 14px; padding: 20px 22px; }
.cd-title { margin: 0; font-size: 17px; }
.cd-body { margin: 0; font-size: 14px; color: var(--text-2); }
.cd-form .input { width: 100%; font-weight: 600; letter-spacing: 0.04em; }
.cd-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.price-editor { display: grid; gap: 10px; }
.price-table .input { width: 120px; text-align: right; }
.price-actions { display: flex; gap: 8px; }
.users-compare { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; font-size: 13.5px; color: var(--text-2); }
.users-compare .i { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--text-3); }
/* walk-through fixes 2026-10-23: plan cards amber; half-width tables wrap pills instead of scrolling; 9 asset columns fit 1280 */
.rm-card.rm-hardware.rm-plan { border-top-color: var(--warn-fill); }
.rm-hardware.rm-plan .rm-kind { color: var(--warn); }
.services-table .lc-pill, .vendor-table .lc-pill { white-space: normal; }
.asset-table th, .asset-table td, .vendor-table th, .vendor-table td { padding-left: 10px; padding-right: 10px; }
.asset-table .hw-row > * { background: transparent; } /* the lifecycle pill carries it; a tinted row per device was a wall of amber */
.role-save { display: inline-flex; gap: 6px; margin-left: 8px; vertical-align: middle; }
.role-save[hidden] { display: none; }
/* device detail (M5) */
.asset-open { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.asset-open:hover { color: var(--accent-text); text-decoration: underline; }
.device-dialog { width: min(780px, calc(100% - 32px)); max-height: calc(100% - 48px); padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop); }
.device-dialog::backdrop { background: rgba(10, 20, 35, .45); }
.dd-head { padding: 18px 22px 12px; border-bottom: 1px solid var(--line); }
.dd-title { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.dd-sub { margin: 4px 0 0; font-size: 13.5px; color: var(--text-2); }
.dd-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px 28px; padding: 16px 22px; }
.dd-group-title { margin: 0 0 8px; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.dd-group dl { display: grid; grid-template-columns: minmax(110px, 40%) minmax(0, 1fr); gap: 7px 12px; margin: 0; font-size: 14px; }
.dd-group dt { color: var(--text-2); }
.dd-group dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.dd-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 22px 18px; border-top: 1px solid var(--line); }

/* ============ Pricing calculator (#/pricing, 2026-10-28) ============ */
.prc-calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 40px; align-items: start; }
.prc-calc > .section { min-width: 0; }
.prc-form { display: grid; gap: 22px; }
.prc-group { display: grid; gap: 10px; }
.prc-field { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.prc-label { display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--text); min-width: 0; }
.prc-label .field-hint { font-size: 12px; color: var(--text-3); }
.prc-num { width: 104px; text-align: right; flex: none; }
.prc-total { display: flex; justify-content: space-between; gap: 16px; margin: 6px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-2); }
.prc-total strong { font-variant-numeric: tabular-nums; color: var(--text); }
.prc-form .input[aria-invalid="true"] { border-color: var(--crit-fill); }
.prc-tier { margin: 0 0 10px; }
.prc-users { margin-bottom: 0; }
.prc-users + .r-kpis { margin-top: 12px; }
.prc-sub { margin: 14px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--text-2); max-width: 60ch; }
.prc-empty { margin: 8px 0 0; font-size: 14px; color: var(--text-3); }
.prc-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 16px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--warn); font-size: 14px; }
.prc-note .i { width: 16px; height: 16px; flex: none; }
.prc-note span { flex: 1 1 260px; color: var(--text); }
.prc-note-dirty { background: var(--accent-soft); color: var(--accent-text); }
.prc-note-bad { background: var(--crit-soft); color: var(--crit); }
.prc-result .prc-note { margin: 8px 0 0; }
.prc-saved { margin: 0 0 16px; font-size: 13px; color: var(--text-3); }
.prc-rates .input.prc-rate-zero { border-color: var(--crit-fill); }
.prc-flag { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-size: 12px; font-weight: 600; color: var(--crit); white-space: nowrap; vertical-align: middle; }
.prc-flag .i { width: 14px; height: 14px; }
.prc-tier-name { display: flex; align-items: center; gap: 8px; }
.prc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.prc-save { display: grid; gap: 14px; margin-top: 16px; padding: 16px; border-radius: var(--radius-sm); background: var(--surface-2); }
.prc-save .prc-actions { margin-top: 0; }
.prc-lines tfoot th, .prc-lines tfoot td { border-bottom: 0; font-weight: 600; }
.prc-lines .prc-rounding th, .prc-lines .prc-rounding td { font-weight: 450; color: var(--text-3); }
.prc-lines .prc-total-row th, .prc-lines .prc-total-row td { font-weight: 700; border-top: 2px solid var(--line-strong); }
.prc-quotes th[scope="row"] { font-weight: 600; }
.prc-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; white-space: nowrap; }
.prc-quote-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 16px; }
.prc-doc { margin-top: 16px; }
.prc-doc .r-cover { padding-bottom: 18px; }
.prc-notes { white-space: pre-wrap; }
.prc-fineprint { font-size: 12.5px; color: var(--text-3); }
.prc-internal { display: inline-block; margin: 10px 0 0; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.prc-rate { width: 96px; text-align: right; }
.prc-rates th[scope="row"], .prc-tiers td { vertical-align: middle; }
.prc-tiers input[data-tier-name] { width: 100%; min-width: 180px; }
.prc-add { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 18px; padding-top: 6px; }
.prc-add .field { flex: 1 1 220px; }
.prc-settings { max-width: 560px; }
.prc-settings .field { gap: 4px; }
@media (max-width: 980px) {
  .prc-calc { grid-template-columns: minmax(0, 1fr); }
  .prc-calc > .section + .section { border-top: 1px solid var(--line); padding-top: 28px; margin-top: 8px; }
}
@media (max-width: 520px) {
  .prc-field { flex-direction: column; align-items: stretch; }
  .prc-num { width: 100%; }
}
/* print: a saved quote is one short document, not the TBR report (own footer; no cover page) */
@page quote {
  size: letter;
  margin: 0.6in 0.6in 0.75in;
  @bottom-left { content: "Atlas Professional Services \00B7  Managed services quote \00B7  Atlas Internal Use Only"; font-family: Inter, "Segoe UI", sans-serif; font-size: 8pt; color: #5F6E81; }
  @bottom-right { content: "Page " counter(page) " of " counter(pages); font-family: Inter, "Segoe UI", sans-serif; font-size: 8pt; color: #5F6E81; }
}
@media print {
  #printRoot .prc-doc { page: quote; }
  #printRoot .prc-doc .r-cover { min-height: 0; display: block; break-after: avoid; padding: 0 0 14px; border-bottom: 3px solid #1E6FD9; margin-bottom: 10px; }
  #printRoot .prc-doc .r-cover::after { display: none; }
  #printRoot .prc-doc .r-logo { width: 48px; height: 48px; margin-bottom: 14px; }
  #printRoot .prc-doc .r-title { font-size: 24pt; margin-top: 6px; }
  #printRoot .prc-doc .r-meta { font-size: 10.5pt; margin-top: 8px; }
  #printRoot .prc-doc .prc-internal { border-color: #C9D2DE; color: #5F6E81; font-size: 8.5pt; }
  #printRoot .prc-doc .r-sec { break-before: auto; }
  #printRoot .prc-doc .r-foot { display: block; margin-top: 18px; font-size: 8.5pt; color: #5F6E81; }
}

/* ============ Users & roles: tools ticked per person (2026-10-28) ============ */
.tool-checks { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.tool-checks .check { padding: 2px 0; font-size: 13.5px; white-space: nowrap; }
.tool-checks .check input:disabled + span { color: var(--text-3); }
.tool-pair { display: inline-flex; align-items: center; gap: 6px; }
.tool-pair .tool-sub { font-size: 12px; color: var(--text-2); }
.users-table .col-tools { min-width: 220px; }
.users-table .col-role .cell-sub { display: block; margin-top: 4px; }
.add-user-tools { border: 0; margin: 0; padding: 0; min-width: 0; }
.add-user-tools .tool-checks { min-height: 36px; align-items: center; }

/* ============ customer sentiment (#/sentiment) ============ */
.sn-phases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.sn-phase { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sn-phase h3 { margin: 0; font-size: 13px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.sn-big { margin: 0; font-size: 14px; color: var(--text-2); }
.sn-big span { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.sn-rate { margin: 0 0 6px; font-size: 13px; color: var(--text-3); }
.sn-phase .seg { align-self: flex-start; }
.sn-total { margin: 14px 0 0; font-size: 14px; color: var(--text-2); }
.sn-tools { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin: 14px 0 12px; }
.sn-search { width: 260px; max-width: 100%; }
.sn-table td { vertical-align: top; }
.sn-table .sn-rank { width: 36px; color: var(--text-3); }
.sn-table th:nth-child(2) { width: 42%; }
.sn-toggle { display: block; border: 0; padding: 0; background: none; font: inherit; font-weight: 550; color: var(--text); text-align: left; cursor: pointer; }
.sn-toggle::before { content: '▸'; display: inline-block; width: 14px; color: var(--accent-text); transition: transform 0.15s; }
.sn-toggle[aria-expanded="true"]::before { transform: rotate(90deg); }
.sn-toggle:hover { color: var(--accent-text); }
.sn-meta { display: block; margin: 3px 0 0 14px; font-size: 12.5px; color: var(--text-3); }
.sn-meta a { color: var(--accent-text); }
.sn-mood { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--text-2); }
.sn-negative { background: var(--crit-soft); color: var(--crit); }
.sn-negative.sn-strong { background: var(--crit-fill); color: #fff; }
.sn-positive { background: var(--good-soft); color: var(--good); }
.sn-unknown { font-style: italic; color: var(--text-3); }
.sn-sub { display: block; margin-top: 4px; font-size: 12px; color: var(--text-3); }
.sn-none { color: var(--text-3); font-size: 13px; }
.sn-cat { font-size: 13px; font-weight: 600; color: var(--text-3); }
.sn-cat-at_risk { color: var(--crit); }
.sn-cat-recovered { color: var(--good); }
.sn-row.is-open td { border-bottom-color: transparent; }
.sn-detail-row td { padding-top: 0; }
.sn-detail { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; padding: 4px 0 8px 14px; }
.sn-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sn-timeline li { display: grid; grid-template-columns: auto auto 1fr; gap: 4px 10px; align-items: center; }
.sn-timeline q { grid-column: 1 / -1; color: var(--text-2); font-size: 13.5px; }
.sn-when, .sn-conf { font-size: 12px; color: var(--text-3); }
.sn-facts { margin: 0; display: grid; gap: 8px; font-size: 13.5px; }
.sn-facts dt { font-size: 12px; color: var(--text-3); font-weight: 600; }
.sn-facts dd { margin: 2px 0 0; color: var(--text-2); }
.sn-more { margin-top: 12px; }
@media (max-width: 900px) {
  .sn-phases { grid-template-columns: 1fr; }
  .sn-detail { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .sn-table thead { display: none; }
  .sn-table tr.sn-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .sn-table tr.sn-row td { border: 0; padding: 0; }
  .sn-table tr.sn-row td.sn-rank { display: none; }
  .sn-table tr.sn-row td:nth-child(2), .sn-table tr.sn-row td:last-child { grid-column: 1 / -1; }
  .sn-table tr.sn-detail-row, .sn-table tr.sn-detail-row td { display: block; }
}
