:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #1c2430;
  --muted: #5d6b7c;
  --border: #dde3ea;
  --primary: #1f4e79;
  --primary-hover: #173d60;
  --primary-soft: #e7eff8;
  --good: #1d7a46;
  --good-soft: #e3f4ea;
  --warn: #9a5b00;
  --warn-soft: #fff4dc;
  --bad: #b42318;
  --bad-soft: #fde8e6;
  --info-soft: #eef2ff;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161d; --surface: #19202a; --surface-2: #1f2834; --text: #e6ebf1; --muted: #9aa8b8; --border: #2d3846;
    --primary: #6aa6e0; --primary-hover: #8bbbe9; --primary-soft: #1d3147;
    --good: #5cc98a; --good-soft: #15301f; --warn: #f0b350; --warn-soft: #34270f; --bad: #f2867c; --bad-soft: #3a1c19; --info-soft: #1e2440;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-size: 15px; line-height: 1.45; }
a { color: var(--primary); }
h1 { font-size: 1.5rem; margin: 0 0 .25rem; }
h2 { font-size: 1.15rem; margin: 1.5rem 0 .6rem; }
h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
p { margin: .4rem 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.loading { padding: 3rem; text-align: center; color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Layout */
.topbar { background: var(--primary); color: #fff; display: flex; align-items: center; gap: 1rem; padding: .6rem 1rem; position: sticky; top: 0; z-index: 10; }
@media (prefers-color-scheme: dark) { .topbar { background: #14304d; } }
.topbar .brand { font-weight: 700; font-size: 1.05rem; white-space: nowrap; color: #fff; text-decoration: none; }
.topbar nav { display: flex; gap: .25rem; flex-wrap: wrap; flex: 1; }
.topbar nav a { color: #dbe7f3; text-decoration: none; padding: .35rem .65rem; border-radius: 6px; font-size: .92rem; }
.topbar nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.topbar nav a.active { background: rgba(255,255,255,.2); color: #fff; }
.topbar .who { font-size: .85rem; color: #dbe7f3; white-space: nowrap; }
.topbar .who button { margin-left: .5rem; }
.menu-toggle { display: none; }
main { max-width: 1180px; margin: 0 auto; padding: 1.25rem 1rem 4rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; }
  .menu-toggle { display: inline-flex; margin-left: auto; }
  .topbar nav { display: none; flex-basis: 100%; flex-direction: column; }
  .topbar nav.open { display: flex; }
  .topbar .who { flex-basis: 100%; display: none; }
  .topbar nav.open + .who { display: block; }
  main { padding: 1rem .75rem 4rem; }
}

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 1rem; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem 1rem; }
.stat .label { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.stat .value { font-size: 1.5rem; font-weight: 650; font-variant-numeric: tabular-nums; }

/* Buttons & forms */
button, .btn { font: inherit; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 8px; padding: .5rem .9rem; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; line-height: 1.2; }
button:hover, .btn:hover { background: var(--surface-2); }
button:disabled { opacity: .55; cursor: not-allowed; }
button.primary, .btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
button.primary:hover { background: var(--primary-hover); }
@media (prefers-color-scheme: dark) { button.primary, .btn.primary { color: #0d1620; } }
button.good { background: var(--good); border-color: var(--good); color: #fff; }
button.danger { color: var(--bad); border-color: var(--bad); }
button.danger.solid { background: var(--bad); color: #fff; }
button.link { border: none; background: none; color: var(--primary); padding: .2rem .3rem; text-decoration: underline; }
button.small, .btn.small { padding: .3rem .6rem; font-size: .85rem; }
.topbar button { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); padding: .3rem .7rem; font-size: .85rem; }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .2rem; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 7px; padding: .45rem .6rem; width: 100%; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
input[type=checkbox] { width: auto; margin-right: .4rem; transform: scale(1.15); }
textarea { min-height: 60px; resize: vertical; }
.field { margin-bottom: .8rem; }
.check { display: flex; align-items: center; font-weight: 500; color: var(--text); font-size: .95rem; margin-bottom: .6rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 1rem; }
.help { font-size: .8rem; color: var(--muted); margin-top: .2rem; font-weight: 400; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem 1rem .4rem; margin: 0 0 1rem; }
legend { font-weight: 650; padding: 0 .4rem; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { padding: .5rem .65rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { background: var(--surface-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); white-space: nowrap; }
tr:last-child td { border-bottom: none; }
tfoot td { font-weight: 700; background: var(--surface-2); border-top: 2px solid var(--border); }
tr.weekend td { background: var(--surface-2); }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--primary-soft); }

/* Badges & alerts */
.badge { display: inline-block; padding: .12rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.badge.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge.info { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.alert { padding: .7rem .9rem; border-radius: 8px; margin: .6rem 0; font-size: .92rem; border: 1px solid transparent; }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.bad { background: var(--bad-soft); color: var(--bad); }
.alert.good { background: var(--good-soft); color: var(--good); }
.alert.info { background: var(--info-soft); color: var(--text); border-color: var(--border); }
.alert ul { margin: .3rem 0 0 1.1rem; padding: 0; }

/* Clock */
.clock-card { text-align: center; padding: 1.6rem 1rem; }
.clock-time { font-size: 3rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.clock-status { font-size: 1.05rem; margin: .4rem 0 1.2rem; }
.clock-buttons { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.clock-buttons button { font-size: 1.15rem; padding: .9rem 1.6rem; border-radius: 12px; min-width: 160px; justify-content: center; }
.dot { display: inline-block; width: .65rem; height: .65rem; border-radius: 50%; background: var(--muted); margin-right: .35rem; vertical-align: middle; }
.dot.on { background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.dot.break { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }

/* Timesheet */
.day-row td { padding-top: .45rem; padding-bottom: .45rem; }
.day-name { font-weight: 600; white-space: nowrap; }
.entry-line { display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.entry-notes { color: var(--muted); font-size: .85rem; white-space: pre-wrap; }
.period-nav { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

/* Modal */
.modal-back { position: fixed; inset: 0; background: rgba(10, 15, 25, .5); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 1rem; z-index: 50; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 12px; width: 100%; max-width: 560px; padding: 1.2rem 1.3rem; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.modal.wide { max-width: 860px; }
.modal h2 { margin-top: 0; }
.modal .actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; flex-wrap: wrap; }

/* Toast */
#toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: .4rem; align-items: center; }
#toast .t { background: #1c2430; color: #fff; padding: .6rem 1rem; border-radius: 8px; box-shadow: var(--shadow); font-size: .92rem; max-width: 90vw; }
#toast .t.err { background: var(--bad); }

/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.login { width: 100%; max-width: 380px; }
.login h1 { text-align: center; margin-bottom: .2rem; }
.login .sub { text-align: center; color: var(--muted); margin-bottom: 1.2rem; }

/* Pay stub */
.stub { background: #fff; color: #111; border: 1px solid #ccc; border-radius: 6px; padding: 1.4rem; max-width: 820px; margin: 0 auto; font-size: .9rem; }
.stub h2 { margin: 0; font-size: 1.2rem; }
.stub .stub-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-bottom: 2px solid #222; padding-bottom: .6rem; margin-bottom: .8rem; }
.stub table { font-size: .85rem; }
.stub th { background: #f1f1f1; color: #333; }
.stub th, .stub td { border-bottom: 1px solid #ddd; padding: .3rem .5rem; }
.stub .net-box { border: 2px solid #222; padding: .6rem .9rem; display: inline-block; font-size: 1.1rem; font-weight: 700; }
.stub .two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .stub .two { grid-template-columns: 1fr; } }
.draft-mark { color: #b42318; font-weight: 700; letter-spacing: .1em; }

.report-notes { font-size: .88rem; }
.report-notes li { margin-bottom: .3rem; }

@media print {
  .topbar, .no-print, #toast, .btn-row, .page-head .btn-row { display: none !important; }
  body, html { background: #fff; color: #000; }
  main { padding: 0; max-width: none; }
  .card { border: none; box-shadow: none; padding: 0; }
  .stub { border: none; padding: 0; }
  .table-wrap { border: none; overflow: visible; }
  th { background: #eee !important; color: #000; }
  .print-break { page-break-after: always; }
  a { color: #000; text-decoration: none; }
}
.print-only { display: none; }
@media print { .print-only { display: block; } }
@media (max-width: 600px) {
  th, td { padding: .4rem .35rem; }
  table { font-size: .85rem; }
  .day-name { white-space: normal; width: 4.2rem; }
  th { font-size: .7rem; letter-spacing: 0; white-space: normal; }
  .clock-time { font-size: 2.4rem; }
}
@media (max-width: 600px) { .stub { padding: .7rem; } .stub th, .stub td { padding: .3rem .25rem; } }

.time-dial-box { text-align: center; margin: .25rem 0 .9rem; }
.time-dial { display: block; width: 100%; max-width: 280px; margin: 0 auto .25rem; touch-action: none; user-select: none; }
.dial-track { fill: none; stroke: var(--border); stroke-width: 14; }
.dial-band { fill: none; stroke: var(--primary); stroke-opacity: .55; stroke-width: 14; cursor: grab; pointer-events: stroke; }
.dial-tick { stroke: var(--border); stroke-width: 1; }
.dial-tick.hour { stroke: var(--muted); stroke-width: 2; }
.dial-number { fill: var(--muted); font-size: 12px; text-anchor: middle; dominant-baseline: central; }
.dial-dot { stroke: var(--surface); stroke-width: 3; cursor: grab; }
.dial-dot.start { fill: var(--good); }
.dial-dot.end { fill: var(--primary); }
.dial-hours { fill: var(--text); font-size: 20px; font-weight: 700; text-anchor: middle; }
.dial-range { fill: var(--muted); font-size: 11px; text-anchor: middle; }

.picker-list { border: 1px solid var(--border); border-radius: 8px; margin-top: .25rem; max-height: 220px; overflow-y: auto; background: var(--surface); }
.picker-item { padding: .5rem .7rem; cursor: pointer; }
.picker-item:hover, .picker-item.active { background: var(--primary-soft); }
.picker-item.add { color: var(--primary); font-weight: 600; border-top: 1px solid var(--border); }
.picker-head { padding: .4rem .7rem .1rem; font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.picker-note { font-size: .85rem; color: var(--muted); margin-top: .3rem; }
.picker-warn { color: var(--warn); font-weight: 600; margin-bottom: .2rem; }

.pw-row { position: relative; }
.pw-row input { padding-right: 3.6rem; }
.pw-toggle { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); }
.pw-caps { color: var(--warn); margin-top: .25rem; }
.pw-meter { height: 6px; background: var(--border); border-radius: 3px; margin: .4rem 0 .25rem; overflow: hidden; }
.pw-meter-fill { height: 100%; width: 0; background: var(--bad); transition: width .15s; }
.pw-meter-fill[data-score="1"] { background: var(--warn); }
.pw-meter-fill[data-score="2"], .pw-meter-fill[data-score="3"] { background: var(--good); }
.account-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .35rem 0; border-top: 1px solid var(--border); }
.activity li.failed > span:first-child { color: var(--bad); font-weight: 600; }
.tabs { display: flex; gap: .25rem; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.tabs button { background: none; border: none; border-bottom: 3px solid transparent; border-radius: 0; padding: .5rem .8rem; color: var(--muted); box-shadow: none; }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
@media (prefers-color-scheme: dark) { .tabs button.active { color: var(--text); border-bottom-color: var(--text); } }
.preset-row { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .3rem; }
.preset-row button.active { background: var(--primary-soft); border-color: var(--primary); }

/* ===== Premium layer: tokens ===== */
:root {
  --bg: #f5f6f8; --surface: #fff; --surface-2: #f8f9fb; --text: #14202e; --muted: #5b6878; --border: #e3e7ec;
  --primary: #1d4f7c; --primary-hover: #163f64; --primary-soft: #e9f0f7; --ink: #0f2437; --accent: #b98a3e;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 36, 55, .05), 0 4px 14px rgba(15, 36, 55, .05);
  font-family: Inter, "Inter var", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: "cv11", "ss01";
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0d141c; --surface: #151e29; --surface-2: #1a2531; --text: #e8edf3; --muted: #9dabba; --border: #27333f;
    --primary: #79aee0; --primary-hover: #9ac3ea; --primary-soft: #1a2e42; --ink: #0a1118; --accent: #d6ab62;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 14px rgba(0,0,0,.2); }
}
body { -webkit-font-smoothing: antialiased; }
h1 { font-size: 1.7rem; font-weight: 680; letter-spacing: -.022em; }
h2 { font-size: 1.1rem; font-weight: 650; letter-spacing: -.01em; margin-top: 1.8rem; }
main > * { animation: rise .22s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { main > * { animation: none; } * { transition: none !important; } }

/* Navigation */
.topbar { background: var(--ink); gap: .75rem; }
@media (prefers-color-scheme: dark) { .topbar { background: var(--ink); border-right: 1px solid var(--border); } }
.topbar .brand { font-size: 1rem; letter-spacing: -.01em; }
.topbar nav a { display: flex; align-items: center; gap: .65rem; color: #b9c6d4; border-radius: 9px; padding: .55rem .7rem; font-weight: 500; transition: background .12s, color .12s; }
.topbar nav a:hover { background: rgba(255,255,255,.07); }
.topbar nav a.active { background: rgba(255,255,255,.11); color: #fff; box-shadow: inset 2px 0 0 var(--accent); }
.nav-icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.topbar .who { color: #b9c6d4; }
.who-name { color: #fff; font-weight: 600; margin-bottom: .5rem; white-space: normal; }
.topbar .who button { margin: 0 .4rem 0 0; border-color: rgba(255,255,255,.22); border-radius: 8px; }
.topbar .who button:hover { background: rgba(255,255,255,.08); }
@media (min-width: 1000px) {
  .topbar { position: fixed; inset: 0 auto 0 0; width: 232px; flex-direction: column; align-items: stretch; padding: 1.3rem .85rem 1rem; overflow-y: auto; }
  .topbar .brand { padding: 0 .55rem 1rem; white-space: normal; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: .4rem; }
  .topbar nav { flex-direction: column; flex-wrap: nowrap; }
  .topbar .who { margin-top: auto; padding: .9rem .55rem 0; border-top: 1px solid rgba(255,255,255,.1); white-space: normal; }
  main { margin-left: 232px; max-width: none; padding: 2rem 2.5rem 4rem; }
  main > * { max-width: 1180px; }
}
@media (min-width: 761px) and (max-width: 999px) { .topbar { flex-wrap: wrap; } .topbar nav { order: 3; flex-basis: 100%; } .topbar .who { margin-left: auto; } .who-name { display: inline; margin-right: .6rem; } }

/* Surfaces and controls */
.card, .stat, .table-wrap { border-color: var(--border); box-shadow: var(--shadow); border-radius: var(--radius); }
.card { padding: 1.25rem 1.35rem; }
.stat { padding: 1rem 1.15rem; }
.stat .label { font-size: .73rem; font-weight: 600; letter-spacing: .06em; }
.stat .value { font-size: 1.75rem; font-weight: 680; letter-spacing: -.02em; margin-top: .15rem; }
fieldset { background: var(--surface); box-shadow: var(--shadow); border-radius: var(--radius); padding: 1rem 1.25rem .6rem; }
legend { background: var(--surface); border-radius: 6px; }
button, .btn { border-radius: 9px; font-weight: 550; transition: background .12s, border-color .12s, box-shadow .12s, transform .05s; }
button:active:not(:disabled), .btn:active { transform: translateY(1px); }
button.primary, .btn.primary { box-shadow: 0 1px 2px rgba(15,36,55,.25); }
button.link { font-weight: 500; text-underline-offset: 2px; }
input, select, textarea { border-radius: 9px; padding: .55rem .7rem; transition: border-color .12s, box-shadow .12s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
input[type=checkbox] { padding: 0; accent-color: var(--primary); box-shadow: none; }
th { background: transparent; font-size: .72rem; font-weight: 600; letter-spacing: .06em; padding-top: .7rem; padding-bottom: .55rem; }
td { padding-top: .62rem; padding-bottom: .62rem; }
tbody tr:hover td { background: var(--surface-2); }
tfoot td { background: transparent; }
.badge { font-weight: 600; }
.alert { border-radius: 11px; padding: .8rem 1rem; }
.tabs { border-bottom-color: var(--border); }
.modal { border-radius: 18px; padding: 1.5rem 1.6rem; box-shadow: 0 30px 70px rgba(10,20,30,.32); animation: rise .18s ease-out; }
.modal-back { background: rgba(10, 20, 30, .48); backdrop-filter: blur(3px); }
#toast .t { border-radius: 11px; }
.stat .value.long { font-size: 1.15rem; line-height: 1.3; margin-top: .4rem; }
.clock-card { padding: 2.4rem 1rem; }
.clock-time { font-size: 3.6rem; font-weight: 680; letter-spacing: -.04em; }
.clock-buttons button { border-radius: 13px; }

/* Sign-in */
.login-wrap { background: radial-gradient(1100px 600px at 15% -10%, #24557f 0%, transparent 60%), radial-gradient(900px 600px at 110% 110%, #1b3d5c 0%, transparent 55%), var(--ink); }
.login { max-width: 410px; padding: 2rem 2rem 1.5rem; border: none; border-radius: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.login-mark { width: 46px; height: 46px; margin: 0 auto .8rem; border-radius: 13px; display: grid; place-items: center; background: var(--ink); color: #fff; }
.login-mark .nav-icon { width: 24px; height: 24px; }
.login button.primary { border-radius: 11px; }

/* Charts: one measure, one color */
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.chart-wide { grid-column: 1 / -1; }
.chart-card { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.25rem 1rem; }
.chart-title { font-weight: 650; letter-spacing: -.01em; }
.chart-card figcaption { margin-bottom: .85rem; }
.chart-empty { padding: 1.5rem 0; text-align: center; }
.bars { display: flex; flex-direction: column; gap: .15rem; }
.bar-row { display: grid; grid-template-columns: minmax(70px, 34%) 1fr 3.4rem; gap: .6rem; align-items: center; padding: .28rem .2rem; border-radius: 6px; font-size: .87rem; }
.bar-row:hover { background: var(--surface-2); }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 10px; }
.bar-fill { height: 100%; background: var(--primary); border-radius: 0 4px 4px 0; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.bar-value { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.cols-wrap { position: relative; padding-top: 1.1rem; }
.cols-guide { position: absolute; inset: 1.1rem 0 auto; border-top: 1px dashed var(--border); }
.cols-guide span { position: absolute; top: -1.05rem; right: 0; font-size: .75rem; color: var(--muted); }
.cols { position: relative; display: flex; gap: 2px; align-items: stretch; }
.col { flex: 1 1 0; min-width: 0; border-radius: 4px; }
.col:hover { background: var(--surface-2); }
.col-plot { height: 150px; display: flex; align-items: flex-end; justify-content: center; border-bottom: 1px solid var(--border); }
.col-fill { width: min(78%, 34px); background: var(--primary); border-radius: 4px 4px 0 0; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.col-label { font-size: .72rem; color: var(--muted); text-align: center; white-space: nowrap; height: 1.3rem; padding-top: .25rem; overflow: visible; }
.chart-tip { position: fixed; z-index: 120; display: none; pointer-events: none; background: #14202e; color: #fff; padding: .35rem .6rem; border-radius: 7px; font-size: .8rem; box-shadow: 0 6px 18px rgba(0,0,0,.25); white-space: nowrap; }

@media print {
  main { margin-left: 0 !important; padding: 0 !important; }
  main > * { animation: none; max-width: none; }
  .chart-card, .stat { box-shadow: none; break-inside: avoid; }
  .chart-tip { display: none !important; }
}
