/* Team Colab ------------------------------------------------------------------
   Navy rail, quiet white work surfaces, and one loud thing: how loaded each
   person is. Load colours (room / balanced / busy / overloaded) are reserved
   for capacity so they always mean the same thing. */

:root {
  --ink: #1A2236;
  --ink-2: #4A5469;
  --ink-3: #737D93;
  --canvas: #ECEFF3;
  --surface: #FFFFFF;
  --surface-2: #F6F7FA;
  --line: #DCE1E8;
  --line-2: #E9ECF1;

  --nav: #17213B;
  --nav-2: #1F2B4A;
  --nav-ink: #B9C3D9;
  --nav-ink-strong: #FFFFFF;
  --signal: #F2A93B;

  --primary: #1F2C52;
  --primary-hover: #2B3B6B;
  --link: #2D5BD0;
  --focus: #2D5BD0;

  --s-todo: #737D93;
  --s-progress: #2D6BE0;
  --s-blocked: #D2453B;
  --s-review: #7B55D6;
  --s-done: #1D9A64;

  --p-low: #8A93A6;
  --p-medium: #2D6BE0;
  --p-high: #D9822B;
  --p-critical: #D2453B;

  --l-available: #86C9AA;
  --l-balanced: #2E9F76;
  --l-busy: #E3A32B;
  --l-overloaded: #D9483B;
  --h-none: #F1F3F6;
  --h-available: #E3F3EB;
  --h-balanced: #BDE4D1;
  --h-busy: #F8DFA6;
  --h-overloaded: #F2B3A9;

  --good: #1D9A64;
  --warn: #C9771F;
  --bad: #D2453B;
  --info: #2D6BE0;

  --radius-panel: 12px;
  --radius-ctl: 7px;
  --shadow-pop: 0 12px 32px rgba(23, 33, 59, .18), 0 2px 6px rgba(23, 33, 59, .08);

  --font-ui: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--canvas);
  color: var(--ink);
  font: 400 14px/1.5 var(--font-ui);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--ink-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.stack { display: grid; gap: 12px; }
.hidden { display: none !important; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.rail {
  background: var(--nav); color: var(--nav-ink);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 18px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 18px; color: var(--nav-ink-strong); }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-name { font: 650 17px/1.15 var(--font-display); letter-spacing: -.01em; }
.brand-sub { font-size: 12px; color: var(--nav-ink); }
.nav { display: grid; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px;
  color: var(--nav-ink); font-weight: 500; position: relative;
}
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav a:hover { background: var(--nav-2); color: var(--nav-ink-strong); text-decoration: none; }
.nav a.active { background: var(--nav-2); color: var(--nav-ink-strong); }
.nav a.active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--signal);
}
.nav .nav-count { margin-left: auto; font-size: 12px; background: var(--signal); color: #2a1a00; border-radius: 999px; padding: 0 7px; font-weight: 600; }
.nav-group { margin: 16px 10px 6px; font-size: 12px; color: #7F8BA6; }
.rail-foot { margin-top: auto; border-top: 1px solid #2A3658; padding-top: 12px; display: grid; gap: 4px; }
.me-chip { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; color: var(--nav-ink-strong); }
.me-chip:hover { background: var(--nav-2); text-decoration: none; }
.me-chip .who { min-width: 0; }
.me-chip .who b { display: block; font-weight: 600; font-size: 13.5px; }
.me-chip .who span { display: block; font-size: 12px; color: var(--nav-ink); }
.rail-btn { background: none; border: 0; color: var(--nav-ink); display: flex; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 8px; cursor: pointer; text-align: left; }
.rail-btn:hover { background: var(--nav-2); color: #fff; }
.rail-btn svg { width: 17px; height: 17px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 12px 28px; background: rgba(236, 239, 243, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar .menu-btn { display: none; }
.search { position: relative; flex: 1; max-width: 460px; }
.search input {
  width: 100%; height: 36px; padding: 0 12px 0 36px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface);
}
.search > svg { position: absolute; left: 11px; top: 9px; width: 18px; height: 18px; color: var(--ink-3); }
.search-results {
  position: absolute; top: 42px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow-pop); padding: 6px; max-height: 70vh; overflow: auto;
}
.search-results h5 { margin: 8px 8px 4px; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.search-results a { display: flex; gap: 8px; align-items: center; padding: 7px 8px; border-radius: 7px; color: var(--ink); }
.search-results a:hover, .search-results a.sel { background: var(--surface-2); text-decoration: none; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; position: relative; color: var(--ink-2);
}
.icon-btn:hover { border-color: #C5CCD8; color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.badge {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center;
  border: 2px solid var(--canvas);
}
.content { padding: 24px 28px 64px; max-width: 1400px; width: 100%; }

/* ---------------------------------------------------------------- page header */
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font: 700 28px/1.15 var(--font-display); letter-spacing: -.02em; }
.page-head .lede { color: var(--ink-2); margin-top: 4px; max-width: 70ch; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { font-size: 13px; color: var(--ink-3); margin-bottom: 4px; display: inline-flex; gap: 6px; align-items: center; }
.crumb a { color: var(--ink-2); }

/* ---------------------------------------------------------------- buttons & inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  border-radius: var(--radius-ctl); border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none !important;
}
.btn:hover { border-color: #C2C9D6; background: var(--surface-2); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.danger { color: var(--bad); }
.btn.danger.solid { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--line-2); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.smart { border-color: #D7CBF3; color: #5B3BB5; background: #F6F2FE; }
.btn.smart:hover { background: #EEE6FD; }

.field { display: grid; gap: 5px; align-content: start; }
.field > label, .field > .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--ink-3); }
.input, select.input, textarea.input {
  width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-ctl);
  background: var(--surface);
}
textarea.input { height: auto; min-height: 84px; padding: 8px 10px; resize: vertical; line-height: 1.45; }
.input:hover { border-color: #C9D0DB; }
.input:focus { border-color: var(--focus); outline: 2px solid rgba(45, 91, 208, .18); outline-offset: 0; }
.input.sm { height: 30px; font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 14px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 2px; }
.seg button { border: 0; background: none; padding: 5px 12px; border-radius: 6px; cursor: pointer; color: var(--ink-2); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.seg button svg { width: 15px; height: 15px; }
.seg button.on { background: var(--primary); color: #fff; }
.form-error { color: var(--bad); font-size: 13px; min-height: 0; }
.form-error:empty { display: none; }

/* ---------------------------------------------------------------- panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-panel); min-width: 0; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px 10px; }
.panel-head h2 { font-size: 15px; font-weight: 650; }
.panel-head .sub { color: var(--ink-3); font-size: 13px; }
.panel-head .end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.panel-body { padding: 4px 18px 16px; }
.panel-body.flush { padding: 0 0 6px; }
.layout { display: grid; gap: 18px; }
.layout.split { grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); align-items: start; }
.layout.halves { grid-template-columns: 1fr 1fr; align-items: start; }

/* KPI band: one strip, divided, not a row of cards */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-panel); margin-bottom: 18px; }
.kpi { padding: 14px 18px; border-left: 1px solid var(--line-2); color: inherit; display: block; }
.kpi:first-child { border-left: 0; }
a.kpi:hover { background: var(--surface-2); text-decoration: none; }
.kpi .v { font: 700 26px/1.1 var(--font-display); letter-spacing: -.02em; display: flex; align-items: baseline; gap: 6px; }
.kpi .v small { font: 600 13px var(--font-ui); color: var(--ink-3); letter-spacing: 0; }
.kpi .k { font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.kpi .d { font-size: 12.5px; margin-top: 2px; color: var(--ink-3); }
.kpi .d.bad { color: var(--bad); font-weight: 600; }
.kpi .d.warn { color: var(--warn); font-weight: 600; }
.kpi .d.good { color: var(--good); font-weight: 600; }

/* ---------------------------------------------------------------- avatars & chips */
.av {
  --size: 28px; width: var(--size); height: var(--size); border-radius: 50%; flex: none; display: inline-grid; place-items: center;
  color: #fff; font-weight: 700; font-size: calc(var(--size) * .38); letter-spacing: .02em; background: var(--ink-3);
  box-shadow: 0 0 0 2px var(--surface);
}
.av.sm { --size: 22px; }
.av.lg { --size: 44px; }
.av.xl { --size: 64px; }
.av.none { background: var(--surface-2); color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); }
.av-stack { display: inline-flex; }
.av-stack .av + .av { margin-left: -4px; }
.person { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.person .nm { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .tt { display: block; font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person > span:last-child { min-width: 0; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap;
  border: 1px solid var(--line-2);
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.st-todo { color: var(--s-todo); }
.chip.st-in_progress { color: var(--s-progress); background: #EEF3FE; border-color: #DCE6FB; }
.chip.st-blocked { color: var(--s-blocked); background: #FDEFEE; border-color: #F8D9D6; }
.chip.st-review { color: var(--s-review); background: #F4F0FD; border-color: #E5DCF8; }
.chip.st-done { color: var(--s-done); background: #EBF7F1; border-color: #D3EEE1; }
.chip.h-on_track { color: var(--good); background: #EBF7F1; border-color: #D3EEE1; }
.chip.h-at_risk { color: var(--warn); background: #FDF4E8; border-color: #F6E2C4; }
.chip.h-off_track { color: var(--bad); background: #FDEFEE; border-color: #F8D9D6; }
.chip.risk-overdue, .chip.risk-blocked { color: var(--bad); background: #FDEFEE; border-color: #F8D9D6; }
.chip.risk-at_risk { color: var(--warn); background: #FDF4E8; border-color: #F6E2C4; }
.chip.risk-stale { color: var(--ink-2); background: #F1F3F6; }
.chip.sev-critical { color: #fff; background: var(--bad); border-color: var(--bad); }
.chip.sev-high { color: var(--bad); background: #FDEFEE; border-color: #F8D9D6; }
.chip.sev-medium { color: var(--warn); background: #FDF4E8; border-color: #F6E2C4; }
.chip.sev-low { color: var(--ink-2); }
.chip.is-open { color: var(--info); background: #EEF3FE; border-color: #DCE6FB; }
.chip.is-in_progress { color: var(--s-review); background: #F4F0FD; border-color: #E5DCF8; }
.chip.is-resolved, .chip.is-closed { color: var(--good); background: #EBF7F1; border-color: #D3EEE1; }
.chip.tag { color: var(--ink-2); background: var(--surface); font-weight: 500; }
.chip.proj { border-color: transparent; background: none; padding: 0; color: var(--ink-2); font-weight: 500; }
.chip.proj .sq { width: 9px; height: 9px; border-radius: 3px; }
.prio { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.prio i { width: 8px; height: 8px; border-radius: 2px; background: var(--p-medium); display: inline-block; }
.prio.low i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--p-low); }
.prio.medium i { background: var(--p-medium); }
.prio.high i { background: var(--p-high); }
.prio.critical i { background: var(--p-critical); transform: rotate(45deg); }
.prio.critical { color: var(--p-critical); font-weight: 600; }

/* ---------------------------------------------------------------- load: the signature element */
.load { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; min-width: 140px; }
.load-track { position: relative; height: 10px; border-radius: 999px; background: var(--h-none); overflow: visible; }
.load-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--l-balanced); max-width: 100%; }
.load-fill.available { background: var(--l-available); }
.load-fill.balanced { background: var(--l-balanced); }
.load-fill.busy { background: var(--l-busy); }
.load-fill.overloaded { background: repeating-linear-gradient(-45deg, var(--l-overloaded) 0 6px, #C23A2E 6px 12px); }
.load-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); border-radius: 1px; opacity: .55; }
.load-pct { font: 700 15px/1 var(--font-display); min-width: 46px; text-align: right; }
.load-pct.overloaded { color: var(--l-overloaded); }
.load-pct.busy { color: #B9801A; }
.load-word { font-size: 12px; color: var(--ink-3); }
.load-word.overloaded { color: var(--l-overloaded); font-weight: 600; }
.load-word.busy { color: #B9801A; font-weight: 600; }
.load-word.available { color: #2B8763; }

.heat { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(44px, 1fr); gap: 3px; }
.heat-cell {
  height: 30px; border-radius: 5px; display: grid; place-items: center; font-size: 11.5px; font-weight: 600;
  background: var(--h-none); color: var(--ink-3);
}
.heat-cell.available { background: var(--h-available); color: #2B7A5A; }
.heat-cell.balanced { background: var(--h-balanced); color: #19654A; }
.heat-cell.busy { background: var(--h-busy); color: #7E5408; }
.heat-cell.overloaded { background: var(--h-overloaded); color: #8D2219; }
.heat-cell.off { background: repeating-linear-gradient(-45deg, #F3F5F8 0 4px, #ECEFF3 4px 8px); color: var(--ink-3); }
.heat-head { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(44px, 1fr); gap: 3px; font-size: 11px; color: var(--ink-3); text-align: center; white-space: nowrap; font-weight: 600; }

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* team load table */
.team-table { width: 100%; border-collapse: collapse; }
.team-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 6px 10px; }
.team-table td { padding: 9px 10px; border-top: 1px solid var(--line-2); vertical-align: middle; }
.team-table tr.click { cursor: pointer; }
.team-table tr.click:hover td { background: var(--surface-2); }
.team-table th:first-child, .team-table td:first-child { padding-left: 18px; }
.team-table th:last-child, .team-table td:last-child { padding-right: 18px; }
.counts { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12.5px; color: var(--ink-2); }
.counts > span { white-space: nowrap; }
.counts b { font-weight: 700; color: var(--ink); }
.counts .bad b, .counts .bad { color: var(--bad); }

/* gauge for personal load */
.gauge { display: grid; gap: 10px; }
.gauge-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.gauge-num { font: 750 44px/1 var(--font-display); letter-spacing: -.03em; }
.gauge-num.overloaded { color: var(--l-overloaded); }
.gauge-num.busy { color: #B9801A; }
.gauge .load-track { height: 14px; }

/* ---------------------------------------------------------------- insights */
.insights { list-style: none; margin: 0; padding: 0 0 6px; }
.insights li a { display: grid; grid-template-columns: 10px 1fr; gap: 12px; padding: 10px 18px; color: var(--ink); line-height: 1.4; }
.insights li a:hover { background: var(--surface-2); text-decoration: none; }
.insights li + li a { border-top: 1px solid var(--line-2); }
.insights .mk { width: 10px; height: 10px; border-radius: 3px; margin-top: 5px; }
.insights .critical .mk { background: var(--bad); }
.insights .warning .mk { background: var(--l-busy); }
.insights .info .mk { background: #9AA6BE; }
.insights .good .mk { background: var(--l-balanced); }

/* ---------------------------------------------------------------- lists & tables */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-top: 1px solid var(--line-2); }
.list > li:first-child { border-top: 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 18px; color: var(--ink); cursor: pointer; min-width: 0; }
.list-row:hover { background: var(--surface-2); text-decoration: none; }
.list-row .main-col { flex: 1; min-width: 0; }
.list-row .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .meta { display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; flex-wrap: wrap; }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 9px 12px; white-space: nowrap;
  border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0;
}
table.data th.sortable { cursor: pointer; user-select: none; }
table.data th.sortable:hover { color: var(--ink); }
table.data th .arrow { font-size: 10px; margin-left: 3px; }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.data tr.click { cursor: pointer; }
table.data tr.click:hover td { background: var(--surface-2); }
table.data td.title-cell { min-width: 260px; }
table.data td.title-cell b { font-weight: 600; display: block; }
table.data th:first-child, table.data td:first-child { padding-left: 18px; }
table.data th:last-child, table.data td:last-child { padding-right: 18px; }
.due { white-space: nowrap; font-size: 13px; }
.due.late { color: var(--bad); font-weight: 600; }
.due.soon { color: var(--warn); font-weight: 600; }
.mini-progress { display: flex; align-items: center; gap: 8px; min-width: 92px; }
.mini-progress .bar { flex: 1; height: 6px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.mini-progress .bar i { display: block; height: 100%; background: var(--s-progress); border-radius: 999px; }
.mini-progress span { font-size: 12px; color: var(--ink-2); width: 32px; text-align: right; }

.progress { position: relative; height: 8px; background: var(--line-2); border-radius: 999px; }
.progress > i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--primary); border-radius: 999px; }
.progress > b { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--warn); border-radius: 1px; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.filters .input { width: auto; min-width: 140px; }
.filters .search-mini { position: relative; }
.filters .search-mini input { padding-left: 32px; min-width: 220px; }
.filters .search-mini svg { position: absolute; left: 9px; top: 9px; width: 17px; height: 17px; color: var(--ink-3); }
.toggle-chip {
  height: 32px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px;
}
.toggle-chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.toggle-chip .dot { width: 7px; height: 7px; border-radius: 50%; }

/* ---------------------------------------------------------------- board */
.board { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.col { background: #E3E7ED; border-radius: 12px; padding: 8px; min-height: 160px; }
.col.drop { outline: 2px dashed var(--focus); outline-offset: -2px; background: #DCE4F2; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-weight: 650; }
.col-head .n { color: var(--ink-3); font-weight: 600; font-size: 13px; }
.col-head .dot { width: 9px; height: 9px; border-radius: 50%; }
.card {
  background: var(--surface); border-radius: 9px; padding: 10px 11px; margin-bottom: 8px; cursor: grab;
  border: 1px solid var(--line); border-left: 3px solid var(--card-color, var(--line)); display: grid; gap: 7px;
}
.card:hover { border-color: #C5CCD8; border-left-color: var(--card-color, #C5CCD8); }
.card.dragging { opacity: .45; }
.card .t { font-weight: 600; line-height: 1.35; }
.card .chip { white-space: normal; height: auto; padding: 2px 8px; line-height: 1.35; }
.card .mini-progress { min-width: 0; }
.card .foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); }
.card .foot .grow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- projects */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.project-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-panel); padding: 16px 18px; color: var(--ink); display: grid; gap: 12px; position: relative; overflow: hidden; }
.project-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--pc, var(--line)); }
.project-card:hover { border-color: #C5CCD8; text-decoration: none; }
.project-card h3 { font: 650 17px/1.25 var(--font-display); letter-spacing: -.01em; }
.project-card .code { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.project-card .reasons { font-size: 12.5px; color: var(--ink-2); }
.project-card .stats { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; }
.project-card .stats b { color: var(--ink); }
.pct-line { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; }
.pct-line b { color: var(--ink); }

.status-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--line-2); }
.status-bar i { display: block; height: 100%; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 9px 14px; font-weight: 600; color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); border-bottom-color: var(--primary); }
.tabs .n { font-size: 12px; color: var(--ink-3); margin-left: 4px; }

/* ---------------------------------------------------------------- feed */
.feed { list-style: none; margin: 0; padding: 0 0 6px; }
.feed li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; padding: 8px 18px; align-items: start; font-size: 13.5px; line-height: 1.4; }
.feed li + li { border-top: 1px solid var(--line-2); }
.feed .when { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.feed b { font-weight: 600; }
.feed a.ent { color: var(--ink); font-weight: 600; }
.feed .det { color: var(--ink-3); }

/* standups */
.standup { padding: 14px 18px; display: grid; gap: 10px; }
.standup + .standup { border-top: 1px solid var(--line-2); }
.standup-head { display: flex; align-items: center; gap: 10px; }
.standup-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.standup-grid h4 { font-size: 12.5px; color: var(--ink-3); font-weight: 600; margin-bottom: 3px; }
.standup-grid p { white-space: pre-wrap; line-height: 1.45; }
.standup-grid .blk p { color: var(--bad); }
.standup-work { display: flex; flex-wrap: wrap; gap: 6px; }
.standup-work .chip { height: auto; padding: 3px 9px; white-space: normal; }
.mood { display: inline-flex; gap: 4px; }
.mood button { width: 36px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 700; color: var(--ink-2); }
.mood button.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.mood-tag { font-size: 12px; color: var(--ink-3); }
.date-nav { display: inline-flex; align-items: center; gap: 6px; }
.date-nav .input { width: auto; }

/* ---------------------------------------------------------------- overlays */
.scrim { position: fixed; inset: 0; background: rgba(15, 22, 40, .42); z-index: 50; animation: fade .12s ease-out; }
.modal {
  position: fixed; z-index: 51; left: 50%; top: 7vh; transform: translateX(-50%); width: min(620px, calc(100vw - 24px));
  max-height: 86vh; display: flex; flex-direction: column; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-pop);
  animation: pop .14s ease-out;
}
.modal.wide { width: min(820px, calc(100vw - 24px)); }
.modal > form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.modal-body { flex: 1; min-height: 0; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px 6px; }
.modal-head h2 { font: 650 19px/1.25 var(--font-display); letter-spacing: -.01em; }
.modal-head .icon-btn { margin-left: auto; border: 0; }
.modal-body { padding: 10px 20px 4px; overflow: auto; display: grid; gap: 14px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px 18px; align-items: center; }
.modal-foot .left { margin-right: auto; }

.drawer {
  position: fixed; z-index: 51; top: 0; right: 0; bottom: 0; width: min(640px, 100vw); background: var(--surface);
  box-shadow: var(--shadow-pop); display: flex; flex-direction: column; animation: slide .16s ease-out;
}
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line-2); }
.drawer-head .icon-btn { border: 0; }
.drawer-body { overflow: auto; padding: 18px 22px 40px; display: grid; gap: 18px; align-content: start; }
.drawer h2.title-edit { font: 650 22px/1.25 var(--font-display); letter-spacing: -.015em; }
.title-input { width: 100%; font: 650 22px/1.25 var(--font-display); letter-spacing: -.015em; border: 1px solid transparent; border-radius: 8px; padding: 4px 6px; margin: -5px -7px; background: transparent; }
.title-input:hover { border-color: var(--line); }
.title-input:focus { border-color: var(--focus); outline: none; background: #fff; }
.meta-grid { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; align-items: center; }
.meta-grid > .k { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.meta-grid .input { height: 32px; }
.banner { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 9px; font-size: 13.5px; }
.banner svg { width: 18px; height: 18px; flex: none; }
.banner.bad { background: #FDEFEE; color: #9E2A21; }
.banner.warn { background: #FDF4E8; color: #8A5212; }
.banner.info { background: #EEF3FE; color: #23479E; }
.banner.neutral { background: var(--surface-2); color: var(--ink-2); }
.composer { border: 1px solid var(--line); border-radius: 11px; padding: 12px; display: grid; gap: 10px; background: var(--surface-2); }
.composer textarea { background: #fff; min-height: 70px; }
.composer-row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.composer-row .field { min-width: 110px; }
.range-wrap { display: flex; align-items: center; gap: 10px; }
.range-wrap input[type=range] { flex: 1; accent-color: var(--primary); }
.range-wrap output { font-weight: 700; width: 42px; text-align: right; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.timeline li.sys { grid-template-columns: 28px 1fr; color: var(--ink-3); font-size: 13px; padding: 6px 0; }
.timeline .sys-dot { width: 8px; height: 8px; border-radius: 50%; background: #C3CAD6; margin: 6px auto 0; }
.timeline .tl-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.timeline .tl-head b { font-weight: 600; }
.timeline .tl-head span { font-size: 12px; color: var(--ink-3); }
.timeline .tl-body { white-space: pre-wrap; margin-top: 2px; }
.timeline .tl-meta { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.section-title { font-size: 14px; font-weight: 650; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.desc { white-space: pre-wrap; line-height: 1.55; color: var(--ink); }
.desc.empty { color: var(--ink-3); }

.suggest-box { border: 1px solid #E2D8F7; background: #FAF7FF; border-radius: 10px; padding: 10px; display: grid; gap: 6px; }
.suggest-box .sg { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; background: #fff; text-align: left; }
.suggest-box .sg:hover { border-color: #CDBEF0; }
.suggest-box .sg.best { border-color: #B9A4EC; }
.suggest-box .sg .why { font-size: 12px; color: var(--ink-3); line-height: 1.35; }

.popover {
  position: absolute; z-index: 40; background: var(--surface); border: 1px solid var(--line); border-radius: 11px;
  box-shadow: var(--shadow-pop); min-width: 220px; padding: 6px;
}
.popover .item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 7px; border: 0; background: none; cursor: pointer; text-align: left; color: var(--ink); }
.popover .item:hover { background: var(--surface-2); text-decoration: none; }
.popover .item svg { width: 16px; height: 16px; color: var(--ink-3); }
.notif-pop { width: min(400px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; padding: 0; }
.notif-pop .np-head { display: flex; align-items: center; padding: 12px 14px 8px; position: sticky; top: 0; background: var(--surface); }
.notif-pop .np-head h3 { font-size: 15px; }
.notif { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line-2); color: var(--ink); cursor: pointer; }
.notif:hover { background: var(--surface-2); text-decoration: none; }
.notif.unread { background: #F3F6FE; }
.notif .nt { font-weight: 600; line-height: 1.35; }
.notif .nb { font-size: 12.5px; color: var(--ink-2); margin-top: 1px; }
.notif .nw { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; background: var(--nav); color: #fff;
  padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow-pop); font-weight: 500; animation: rise .16s ease-out;
  display: flex; gap: 10px; align-items: center; max-width: calc(100vw - 24px);
}
.toast.err { background: #8E2219; }

.empty { padding: 28px 18px; text-align: center; color: var(--ink-2); display: grid; gap: 8px; justify-items: center; }
.empty h3 { font-size: 15px; color: var(--ink); }
.empty p { max-width: 46ch; color: var(--ink-3); }

.secret { font: 600 18px/1.2 ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--surface-2); border: 1px dashed var(--line); border-radius: 8px; padding: 10px 12px; letter-spacing: .04em; user-select: all; }

/* ---------------------------------------------------------------- auth screens */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 520px); background: var(--surface); }
.auth-art { background: var(--nav); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art h1 { font: 750 clamp(30px, 3.6vw, 46px)/1.08 var(--font-display); letter-spacing: -.03em; max-width: 14ch; }
.auth-art p { color: var(--nav-ink); max-width: 42ch; margin-top: 14px; font-size: 15px; }
.auth-demo { display: grid; gap: 10px; max-width: 460px; }
.auth-demo .row-l { display: grid; grid-template-columns: 120px 1fr 44px; gap: 12px; align-items: center; color: var(--nav-ink); font-size: 13px; }
.auth-demo .load-track { background: #24304F; }
.auth-demo .load-pct { color: #fff; font-size: 13px; }
.auth-form { padding: 48px clamp(24px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.auth-form h2 { font: 700 26px/1.2 var(--font-display); letter-spacing: -.02em; }
.auth-form form { display: grid; gap: 14px; }
.auth-form .btn.primary { height: 42px; }
.auth-form .callout { font-size: 13.5px; }
.auth-form input[readonly] { background: var(--surface-2); color: var(--ink-2); }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.label-row label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.link-btn { border: 0; background: none; padding: 0; color: var(--link); font-size: 13px; font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.link-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.sent-mark { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: #EEF3FE; color: var(--link); }
.sent-mark svg { width: 26px; height: 26px; }

/* reporting lines (Team page) */
.org, .org ul { list-style: none; margin: 0; padding: 0; }
.org ul { margin-left: 18px; padding-left: 18px; border-left: 1px solid var(--line); }
.org li { position: relative; }
.org ul > li::before { content: ""; position: absolute; left: -18px; top: 27px; width: 16px; border-top: 1px solid var(--line); }
.org-node { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin: 6px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); max-width: 560px; }
.org-node:hover { border-color: #C2C9D6; background: var(--surface-2); text-decoration: none; }
.org-node .who { display: grid; min-width: 0; flex: 1; }
.org-node .who b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-node .who span { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-load { width: 170px; flex: none; }
.org-loose { font-size: 14px; margin: 18px 0 4px; display: grid; gap: 2px; }

/* radio cards, e.g. "email a link" vs "temporary password" */
.choice-list { display: grid; gap: 10px; }
.choice { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.choice:hover { border-color: #C2C9D6; }
.choice:has(input:checked) { border-color: var(--focus); background: #F5F8FE; }
.choice input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--primary); }
.choice > span { display: grid; gap: 3px; }
.span-all { grid-column: 1 / -1; }

/* ---------------------------------------------------------------- misc */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }
.bars { display: grid; gap: 8px; }
.bars .b { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 56px; gap: 10px; align-items: center; font-size: 13px; }
.bars .b .track { height: 10px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.bars .b .track i { display: block; height: 100%; border-radius: 999px; }
.bars .b .v { text-align: right; font-weight: 600; }
.daybars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; align-items: end; height: 70px; }
.daybars i { display: block; background: var(--s-progress); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; }
.daybars i.zero { background: var(--line); }
.callout { font-size: 13px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 9px; padding: 10px 12px; line-height: 1.5; }
.move { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 12px 18px; align-items: center; }
.move + .move { border-top: 1px solid var(--line-2); }
.move .what { font-weight: 600; }
.move .how { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }
.move .how .from { color: var(--l-overloaded); font-weight: 600; }
.move .how .to { color: #1F7C5A; font-weight: 600; }
.expand-row td { background: var(--surface-2); padding: 0 !important; }
.expand-row table.data th { background: var(--surface-2); }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, 8px); } }
@keyframes slide { from { transform: translateX(24px); opacity: .4; } }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .layout.split, .layout.halves { grid-template-columns: 1fr; }
  .standup-grid { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: fixed; z-index: 45; left: 0; top: 0; bottom: 0; width: 260px; transform: translateX(-100%); transition: transform .18s ease-out; }
  .shell.nav-open .rail { transform: none; box-shadow: var(--shadow-pop); }
  .shell.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(15, 22, 40, .4); z-index: 44; }
  .topbar .menu-btn { display: grid; }
  .topbar { padding: 10px 16px; }
  .content { padding: 18px 16px 56px; }
  .page-head h1 { font-size: 24px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .hide-sm { display: none !important; }
  .meta-grid { grid-template-columns: 96px 1fr; }
  .kpi .v { font-size: 22px; }
  .board { grid-template-columns: repeat(5, 260px); }
  .topbar .new-label { display: none; }
}
