/* =====================================================================
   Koda - Web (desktop) - DESIGN TOKENS
   Every colour, radius, shadow and spacing used by the app is defined here.
   To re-skin the application, change ONLY this file.
   ===================================================================== */
:root {
  /* brand / accent (same family as the mobile app) */
  --navy: #0B2A4A;
  --navy-2: #12375F;
  --primary: #1E5AA8;
  --primary-hover: #174A8C;
  --primary-soft: #EAF2FC;
  --primary-ring: rgba(30, 90, 168, .22);
  --cyan: #0096D6;

  /* neutrals */
  --bg: #F4F6FA;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --surface-3: #EFF3F8;
  --border: #E3E8EF;
  --border-strong: #CFD7E2;
  --text: #0F1B2D;
  --text-2: #4F5D72;
  --text-3: #8592A6;

  /* semantic */
  --out: #1E5AA8;   --out-bg: #E8F0FB;
  --in: #6A48C2;    --in-bg: #F0EBFB;
  --ok: #1D7F47;    --ok-bg: #E4F4EA;
  --warn: #A9650A;  --warn-bg: #FDF1DD;
  --err: #C0392B;   --err-bg: #FCEAE8;
  --info: #0B7FB5;  --info-bg: #E3F3FA;
  --neutral: #4F5D72; --neutral-bg: #EEF1F5;

  /* sidebar */
  --side-bg: #0B2A4A;
  --side-bg-2: #0E3157;
  --side-text: rgba(255, 255, 255, .72);
  --side-text-strong: #FFFFFF;
  --side-hover: rgba(255, 255, 255, .07);
  --side-active: rgba(255, 255, 255, .13);
  --side-section: rgba(255, 255, 255, .42);

  /* shape */
  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow-xs: 0 1px 2px rgba(15, 27, 45, .05);
  --shadow-sm: 0 1px 3px rgba(15, 27, 45, .06), 0 1px 2px rgba(15, 27, 45, .04);
  --shadow: 0 6px 18px rgba(15, 27, 45, .08);
  --shadow-lg: 0 24px 60px rgba(15, 27, 45, .22);

  /* layout */
  --side-w: 252px;
  --side-w-collapsed: 72px;
  --top-h: 64px;
  --page-pad-x: 32px;
  --page-max: 1480px;

  /* density (comfortable) */
  --row-h: 52px;
  --ctl-h: 40px;
  --gap: 20px;

  /* type */
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, "SFMono-Regular", Menlo, monospace;
  --fs: 14px;

  --ease: cubic-bezier(.2, .7, .2, 1);

  /* Koda Green (1.0.3): energy classes and score grades */
  --g-zero: #11845B;  --g-zero-bg: #DDF3E8;
  --g-low: #5FB37E;   --g-low-bg: #EAF6EE;
  --g-thermal: #9AA6B8; --g-thermal-bg: #EEF1F5;
  --g-a: #11845B; --g-b: #5FB37E; --g-c: #C9A227; --g-d: #D9822B; --g-e: #C0392B;
  /* insights charts (categorical, validated for contrast on both themes) */
  --c1: #1E5AA8; --c2: #6A48C2; --c3: #0B7FB5; --c4: #11845B; --c5: #A9650A; --c6: #8592A6;
  color-scheme: light;
}

[data-density="compact"] {
  --row-h: 40px;
  --ctl-h: 34px;
  --gap: 14px;
  --page-pad-x: 24px;
  --fs: 13px;
}

[data-theme="dark"] {
  --bg: #0D1420;
  --surface: #141D2B;
  --surface-2: #182233;
  --surface-3: #1E2A3D;
  --border: #243246;
  --border-strong: #2F4059;
  --text: #E8EEF6;
  --text-2: #A9B6C8;
  --text-3: #74839A;
  --primary: #4D8FE0;
  --primary-hover: #6AA3EA;
  --primary-soft: rgba(77, 143, 224, .14);
  --primary-ring: rgba(77, 143, 224, .35);
  --out: #6FA6EA;   --out-bg: rgba(77, 143, 224, .16);
  --in: #A88BF0;    --in-bg: rgba(168, 139, 240, .16);
  --ok: #4CC287;    --ok-bg: rgba(76, 194, 135, .14);
  --warn: #F0B556;  --warn-bg: rgba(240, 181, 86, .14);
  --err: #F07466;   --err-bg: rgba(240, 116, 102, .14);
  --info: #4FC0F0;  --info-bg: rgba(79, 192, 240, .14);
  --neutral: #A9B6C8; --neutral-bg: rgba(169, 182, 200, .12);
  --g-zero: #4CC287;  --g-zero-bg: rgba(76, 194, 135, .16);
  --g-low: #8FD3A8;   --g-low-bg: rgba(143, 211, 168, .12);
  --g-thermal: #6B7A91; --g-thermal-bg: rgba(169, 182, 200, .12);
  --g-a: #4CC287; --g-b: #8FD3A8; --g-c: #E3C25A; --g-d: #F0A05A; --g-e: #F07466;
  --c1: #6FA6EA; --c2: #A88BF0; --c3: #4FC0F0; --c4: #4CC287; --c5: #F0B556; --c6: #74839A;
  --side-bg: #0A111C;
  --side-bg-2: #0D1624;
  --shadow: 0 6px 18px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

/* ===================== BASE ===================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); font-size: var(--fs); line-height: 1.45; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0; color: var(--text); letter-spacing: -.01em; }
a { color: var(--primary); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--primary-ring); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.svg-i { width: 18px; height: 18px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.svg-i.sm { width: 15px; height: 15px; } .svg-i.lg { width: 22px; height: 22px; } .svg-i.xl { width: 28px; height: 28px; }
.muted { color: var(--text-2); } .faint { color: var(--text-3); } .mono { font-family: var(--mono); font-size: .92em; }
.nowrap { white-space: nowrap; } .right { text-align: right; } .center { text-align: center; }
.tnum { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.scroll-y { overflow-y: auto; }
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }

/* ===================== APP SHELL ===================== */
#app { display: grid; grid-template-columns: var(--side-w) 1fr; grid-template-rows: var(--top-h) 1fr; height: 100vh; height: 100dvh; transition: grid-template-columns .22s var(--ease); }
#app.collapsed { grid-template-columns: var(--side-w-collapsed) 1fr; }

/* ---- sidebar ---- */
.side { grid-row: 1 / 3; background: linear-gradient(180deg, var(--side-bg) 0%, var(--side-bg-2) 100%); color: var(--side-text); display: flex; flex-direction: column; min-width: 0; overflow: hidden; z-index: 20; }
.side .brand { height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 18px; flex: 0 0 auto; }
.brand .mark { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--cyan), #1E5AA8); display: grid; place-items: center; color: #fff; box-shadow: 0 4px 14px rgba(0, 150, 214, .35); flex: 0 0 auto; }
.brand .mark .svg-i { width: 20px; height: 20px; stroke-width: 2.1; }
.brand .name { line-height: 1.15; white-space: nowrap; }
.brand .name b { display: block; color: #fff; font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.brand .name span { font-size: 11.5px; color: var(--side-section); }
.side nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 6px 12px 16px; scrollbar-color: rgba(255,255,255,.18) transparent; }
.side .sec { font-size: 10.5px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--side-section); padding: 18px 12px 6px; white-space: nowrap; }
.side .item { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; color: var(--side-text); padding: 0 12px; height: 40px; border-radius: 10px; cursor: pointer; text-align: left; font-size: 13.5px; font-weight: 500; white-space: nowrap; transition: background .15s, color .15s; }
.side .item:hover { background: var(--side-hover); color: var(--side-text-strong); }
.side .item.on { background: var(--side-active); color: var(--side-text-strong); font-weight: 600; }
.side .item.on::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--cyan); }
.side .item .nl { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.side .item .cnt { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: #E5484D; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.side .item .cnt.soft { background: rgba(255,255,255,.16); }
.side .foot { padding: 12px; border-top: 1px solid rgba(255, 255, 255, .08); flex: 0 0 auto; }
.side .me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; cursor: pointer; border: 0; background: none; color: inherit; width: 100%; text-align: left; }
.side .me:hover { background: var(--side-hover); }
.side .me .who { line-height: 1.2; min-width: 0; } .side .me .who b { display: block; color: #fff; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .side .me .who span { font-size: 11.5px; color: var(--side-section); white-space: nowrap; }
#app.collapsed .side .name, #app.collapsed .side .sec, #app.collapsed .side .item .nl, #app.collapsed .side .me .who, #app.collapsed .side .item .cnt { display: none; }
#app.collapsed .side .brand { padding: 0; justify-content: center; }
#app.collapsed .side .item { justify-content: center; padding: 0; }
#app.collapsed .side .item.on::before { left: -12px; }
#app.collapsed .side .sec { display: block; height: 14px; padding: 0; font-size: 0; }
#app.collapsed .side .me { justify-content: center; }
#app.collapsed .side .item .dot { position: absolute; top: 8px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: #E5484D; }
.side .item .dot { display: none; } #app.collapsed .side .item .dot { display: block; }

/* ---- top bar ---- */
.top { grid-column: 2; display: flex; align-items: center; gap: 14px; padding: 0 var(--page-pad-x) 0 16px; background: var(--surface); border-bottom: 1px solid var(--border); min-width: 0; z-index: 15; }
.top .crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14px; color: var(--text-2); }
.top .crumbs a, .top .crumbs button.lnk { color: var(--text-2); }
.top .crumbs b { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .crumbs .svg-i { width: 14px; height: 14px; color: var(--text-3); }
.top .spacer { flex: 1; }
.searchbox { display: flex; align-items: center; gap: 10px; height: 38px; width: min(420px, 34vw); padding: 0 12px; border: 1px solid var(--border); background: var(--surface-2); border-radius: 10px; color: var(--text-3); cursor: text; transition: border-color .15s, box-shadow .15s; font-size: 13.5px; }
.searchbox:hover { border-color: var(--border-strong); }
.searchbox span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; }
kbd { font-family: var(--font); font-size: 11px; font-weight: 600; color: var(--text-2); background: var(--surface); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; line-height: 1.4; }
.top .tools { display: flex; align-items: center; gap: 6px; }
.top .env { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); }
.top .env.live { background: var(--ok-bg); color: var(--ok); }

/* ---- main ---- */
main { grid-column: 2; overflow: auto; position: relative; scroll-behavior: auto; }
.page { max-width: var(--page-max); margin: 0 auto; padding: 28px var(--page-pad-x) 56px; animation: pageIn .22s var(--ease); }
.page.full { max-width: none; }
@keyframes pageIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .t { flex: 1; min-width: 260px; }
.page-head h1 { font-size: 24px; font-weight: 680; line-height: 1.2; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-head p { margin: 6px 0 0; color: var(--text-2); font-size: 13.5px; max-width: 820px; }
.page-head .acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

#progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: linear-gradient(90deg, var(--cyan), var(--primary)); z-index: 100; opacity: 0; transition: width .3s var(--ease), opacity .3s; }
#progress.on { opacity: 1; width: 70%; } #progress.done { opacity: 0; width: 100%; }

@media (max-width: 1180px) { :root { --page-pad-x: 22px; } .searchbox { width: 260px; } }
@media (max-width: 860px) {
  #app, #app.collapsed { grid-template-columns: 0 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: var(--side-w); transform: translateX(-100%); transition: transform .22s var(--ease); box-shadow: var(--shadow-lg); }
  #app.mnav .side { transform: none; }
  #app.collapsed .side .name, #app.collapsed .side .sec, #app.collapsed .side .item .nl, #app.collapsed .side .me .who { display: initial; }
  .searchbox span, .searchbox kbd { display: none; } .searchbox { width: 38px; padding: 0; justify-content: center; }
  .top .env { display: none; }
}

@media print {
  #app { display: block; height: auto; } .side, .top, .no-print, #toasts, #progress { display: none !important; }
  main { overflow: visible; } .page { padding: 0; max-width: none; animation: none; }
  .panel, .card { box-shadow: none !important; break-inside: avoid; }
  body { background: #fff; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ===================== COMPONENTS ===================== */

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--ctl-h); padding: 0 16px; border-radius: 10px; border: 1px solid transparent; background: var(--primary); color: #fff; font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: background .15s, box-shadow .15s, border-color .15s, transform .05s; text-decoration: none; }
.btn:hover { background: var(--primary-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn .svg-i { width: 16px; height: 16px; }
.btn.sec { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn.sec:hover { background: var(--surface-2); border-color: var(--text-3); }
.btn.ghost { background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-3); color: var(--text); }
.btn.ok { background: var(--ok); } .btn.ok:hover { filter: brightness(.94); background: var(--ok); }
.btn.danger { background: var(--err); } .btn.danger:hover { filter: brightness(.94); background: var(--err); }
.btn.danger-sec { background: var(--surface); color: var(--err); border-color: color-mix(in srgb, var(--err) 35%, var(--border)); }
.btn.danger-sec:hover { background: var(--err-bg); }
.btn.in { background: var(--in); } .btn.in:hover { filter: brightness(.94); background: var(--in); }
.btn.warn { background: var(--warn); } .btn.warn:hover { filter: brightness(.94); background: var(--warn); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn.xs { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 7px; gap: 5px; }
.btn.xs .svg-i { width: 13px; height: 13px; }
.btn.block { width: 100%; }
.btn.lg { height: 46px; font-size: 14.5px; padding: 0 20px; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 10px; border: 0; background: transparent; color: var(--text-2); cursor: pointer; position: relative; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn .pip { position: absolute; top: 5px; right: 5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #E5484D; color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }
button.lnk { border: 0; background: none; padding: 0; color: var(--primary); cursor: pointer; font-weight: 500; }
button.lnk:hover { text-decoration: underline; }

/* ---- badges ---- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--neutral-bg); color: var(--neutral); white-space: nowrap; line-height: 1; }
.badge .d { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge .svg-i { width: 12px; height: 12px; stroke-width: 2.3; }
.b-out { background: var(--out-bg); color: var(--out); } .b-in { background: var(--in-bg); color: var(--in); }
.b-ok { background: var(--ok-bg); color: var(--ok); } .b-warn { background: var(--warn-bg); color: var(--warn); }
.b-err { background: var(--err-bg); color: var(--err); } .b-info { background: var(--info-bg); color: var(--info); }
.b-primary { background: var(--primary-soft); color: var(--primary); } .b-solid { background: var(--navy); color: #fff; }
[data-theme="dark"] .b-solid { background: var(--primary); }

/* ---- panels / cards ---- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); min-width: 0; }
.panel + .panel { margin-top: var(--gap); }
.stack > .panel + .panel, .grid > .panel + .panel { margin-top: 0; }
.panel-h { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); min-height: 58px; }
.panel-h h3 { font-size: 15px; font-weight: 650; flex: 1; display: flex; align-items: center; gap: 8px; }
.panel-h h3 .count { font-size: 12px; font-weight: 600; color: var(--text-3); }
.panel-h .acts { display: flex; gap: 6px; align-items: center; }
.panel-b { padding: 18px 20px; }
.panel-b.flush { padding: 0; }
.panel.tint { background: var(--surface-2); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.card.click { cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.card.click:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.grid { display: grid; gap: var(--gap); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-auto { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.g-main-side { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.g-side-main { grid-template-columns: 300px minmax(0, 1fr); align-items: start; }
@media (max-width: 1180px) { .g-main-side, .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-main-side > :first-child { grid-column: 1 / -1; } }
@media (max-width: 860px) { .g2, .g3, .g4, .g-main-side, .g-side-main { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: var(--gap); }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .row.nw { flex-wrap: nowrap; } .row.sp { justify-content: space-between; } .row.top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.sticky { position: sticky; top: 20px; }
.divider { height: 1px; background: var(--border); margin: 14px 0; }

/* ---- KPI tiles ---- */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1380px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; position: relative; box-shadow: var(--shadow-xs); }
.kpi.click { cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.kpi.click:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.kpi .top-r { display: flex; align-items: center; justify-content: space-between; }
.kpi .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.kpi .ic .svg-i { width: 18px; height: 18px; }
.kpi .go { color: var(--text-3); opacity: 0; transition: opacity .15s; } .kpi.click:hover .go { opacity: 1; }
.kpi .v { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 15px; font-weight: 600; color: var(--text-2); margin-left: 2px; }
.kpi .l { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.kpi.t-ok .ic { background: var(--ok-bg); color: var(--ok); } .kpi.t-warn .ic { background: var(--warn-bg); color: var(--warn); }
.kpi.t-err .ic { background: var(--err-bg); color: var(--err); } .kpi.t-in .ic { background: var(--in-bg); color: var(--in); }
.kpi.t-err .v { color: var(--err); } .kpi.t-warn .v { color: var(--warn); }
.kpis.mini .kpi { padding: 12px 16px; gap: 6px; } .kpis.mini .kpi .v { font-size: 21px; }

/* ---- tables ---- */
.tbl-wrap { overflow: auto; border-radius: inherit; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.tbl th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); text-align: left; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); padding: 0 14px; height: 40px; border-bottom: 1px solid var(--border); white-space: nowrap; user-select: none; }
.tbl th.sortable { cursor: pointer; } .tbl th.sortable:hover { color: var(--text); }
.tbl th .svg-i { width: 12px; height: 12px; margin-left: 3px; }
.tbl td { padding: 0 14px; height: var(--row-h); border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl td.wrap { padding-top: 10px; padding-bottom: 10px; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .1s; }
.tbl tbody tr.click { cursor: pointer; } .tbl tbody tr.click:hover { background: var(--surface-2); }
.tbl tbody tr.sel { background: var(--primary-soft); }
.tbl tbody tr.flag td:first-child { box-shadow: inset 3px 0 0 var(--err); }
.tbl .ref { font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .sub { display: block; color: var(--text-3); font-size: 12px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }
.tbl .ell { max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td.act { text-align: right; white-space: nowrap; }
.tbl input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.tbl-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-top: 1px solid var(--border); color: var(--text-2); font-size: 12.5px; }

/* ---- forms ---- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .lbl { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field .req { color: var(--err); margin-left: 2px; }
.field .hint { font-size: 12px; color: var(--text-3); }
.field .err-msg { font-size: 12px; color: var(--err); display: none; } .field.invalid .err-msg { display: block; }
.field.invalid .inp { border-color: var(--err); box-shadow: 0 0 0 3px var(--err-bg); }
.inp, input.inp, select.inp, textarea.inp { width: 100%; height: var(--ctl-h); padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text); font-size: 13.5px; transition: border-color .15s, box-shadow .15s; outline: none; }
textarea.inp { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
select.inp { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238592A6' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.inp:hover { border-color: var(--text-3); }
.inp:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
input[type="file"].inp { padding: 7px 10px; height: auto; }
.inp-ic { position: relative; } .inp-ic .svg-i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; width: 16px; height: 16px; } .inp-ic .inp { padding-left: 38px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-size: 13.5px; transition: border-color .15s, background .15s; }
.check:hover { border-color: var(--border-strong); }
.check input { width: 16px; height: 16px; accent-color: var(--primary); margin: 0; }
.check:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; }
.switch input { appearance: none; width: 36px; height: 20px; border-radius: 20px; background: var(--border-strong); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: left .15s var(--ease); }
.switch input:checked { background: var(--primary); } .switch input:checked::after { left: 18px; }

/* ---- segmented control & filter chips ---- */
.seg { display: inline-flex; padding: 3px; background: var(--surface-3); border-radius: 10px; gap: 2px; flex-wrap: nowrap; }
.seg button { border: 0; background: transparent; height: calc(var(--ctl-h) - 8px); padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 550; color: var(--text-2); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; transition: background .15s, color .15s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.seg button .n { font-size: 11px; font-weight: 700; color: var(--text-3); } .seg button.on .n { color: var(--primary); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); font-size: 12.5px; font-weight: 550; cursor: pointer; white-space: nowrap; transition: all .15s; }
.chip:hover { border-color: var(--text-3); color: var(--text); }
.chip.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.toolbar .inp-ic { width: 340px; max-width: 100%; }

/* ---- empty states ---- */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 44px 20px; color: var(--text-2); }
.empty .ic { width: 52px; height: 52px; border-radius: 16px; background: var(--surface-3); display: grid; place-items: center; color: var(--text-3); margin-bottom: 4px; }
.empty .ic.ok { background: var(--ok-bg); color: var(--ok); }
.empty b { color: var(--text); font-size: 14.5px; } .empty span { font-size: 13px; max-width: 380px; }
.empty.sm { padding: 24px 16px; }

/* ---- banners ---- */
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius); background: var(--primary-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent); margin-bottom: var(--gap); }
.banner .svg-i { color: var(--primary); }
.banner.warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 30%, transparent); } .banner.warn .svg-i { color: var(--warn); }
.banner.err { background: var(--err-bg); border-color: color-mix(in srgb, var(--err) 30%, transparent); } .banner.err .svg-i { color: var(--err); }
.banner.ok { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 30%, transparent); } .banner.ok .svg-i { color: var(--ok); }
.banner.click { cursor: pointer; } .banner.click:hover { filter: brightness(.98); }
.banner .grow b { font-weight: 650; }

/* ---- key / value list ---- */
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px 24px; }
.kv > div { min-width: 0; } .kv .k { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin-bottom: 4px; }
.kv .v { margin: 0; font-size: 14px; color: var(--text); font-weight: 500; overflow-wrap: anywhere; }

/* ---- tabs ---- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 12px; overflow-x: auto; }
.tabs button { border: 0; background: none; height: 46px; padding: 0 10px; font-size: 13.5px; font-weight: 550; color: var(--text-2); cursor: pointer; position: relative; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--primary); } .tabs button.on::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--primary); }
.tabs .n { font-size: 11px; font-weight: 700; background: var(--surface-3); color: var(--text-2); border-radius: 10px; padding: 1px 7px; }
.tabs button.on .n { background: var(--primary-soft); color: var(--primary); }

/* ---- avatar ---- */
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; background: linear-gradient(135deg, #2E6FC0, var(--cyan)); color: #fff; flex: 0 0 auto; letter-spacing: .02em; }
.av.sm { width: 28px; height: 28px; font-size: 11px; } .av.lg { width: 44px; height: 44px; font-size: 15px; }
.av.alt { background: linear-gradient(135deg, #7A5AD0, #A27BEA); } .av.neutral { background: var(--surface-3); color: var(--text-2); }
.person { display: flex; align-items: center; gap: 12px; min-width: 0; } .person b { display: block; font-weight: 600; } .person span { font-size: 12.5px; color: var(--text-3); }

/* ---- timeline ---- */
.tl { position: relative; padding-left: 22px; }
.tl::before { content: ""; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--border); border-radius: 2px; }
.tl .e { position: relative; padding-bottom: 16px; } .tl .e:last-child { padding-bottom: 0; }
.tl .e::before { content: ""; position: absolute; left: -21px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--primary); }
.tl .e .t { font-size: 12px; color: var(--text-3); } .tl .e .m { font-size: 13.5px; margin-top: 2px; }

/* ---- milestone stepper ---- */
.steps { display: flex; gap: 0; overflow-x: auto; padding: 4px 2px 2px; }
.step { flex: 1; min-width: 76px; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; gap: 6px; padding: 0 4px; }
.step::before { content: ""; position: absolute; top: 13px; left: -50%; right: 50%; height: 2px; background: var(--border); z-index: 0; }
.step:first-child::before { display: none; }
.step .dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; z-index: 1; color: var(--text-3); font-size: 11.5px; font-weight: 700; }
.step .dot .svg-i { width: 14px; height: 14px; stroke-width: 2.6; }
.step.done::before { background: var(--ok); } .step.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.step.next .dot { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
.step.next::before { background: linear-gradient(90deg, var(--ok), var(--border)); }
.step .n { font-size: 12px; font-weight: 600; color: var(--text-2); line-height: 1.25; } .step.done .n { color: var(--text); }
.step .w { font-size: 11px; color: var(--text-3); }

/* ---- proofs gallery ---- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.proof { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; background: var(--surface); transition: box-shadow .15s, border-color .15s; }
.proof:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }
.proof .pv { height: 104px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); font-weight: 650; font-size: 15px; gap: 4px; text-align: center; padding: 6px; }
.proof .pv .svg-i { width: 24px; height: 24px; color: var(--text-3); }
.proof img { width: 100%; height: 104px; object-fit: cover; display: block; }
.proof .c { padding: 8px 10px; font-size: 12px; } .proof .c b { display: block; font-size: 12.5px; }

/* ---- action list ---- */
.actions { display: flex; flex-direction: column; gap: 8px; }
.actions .btn { justify-content: flex-start; width: 100%; }
.actions .sep { height: 1px; background: var(--border); margin: 4px 0; }
.code-big { font-family: var(--mono); font-size: 26px; font-weight: 700; letter-spacing: .18em; color: var(--text); text-align: center; padding: 12px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2); }

/* ---- overlays ---- */
.ov { position: fixed; inset: 0; background: rgba(9, 18, 32, .45); backdrop-filter: blur(2px); display: flex; align-items: flex-start; justify-content: center; z-index: 60; padding: 8vh 20px 20px; animation: fadeIn .15s; }
.ov.center { align-items: center; padding-top: 20px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal { width: 100%; max-width: 560px; max-height: 84vh; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; animation: popIn .18s var(--ease); border: 1px solid var(--border); }
.modal.wide { max-width: 760px; } .modal.xl { max-width: 960px; } .modal.narrow { max-width: 440px; }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-h { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 14px; }
.modal-h .t { flex: 1; } .modal-h h2 { font-size: 18px; font-weight: 680; } .modal-h p { margin: 6px 0 0; font-size: 13px; color: var(--text-2); }
.modal-b { padding: 6px 22px 20px; overflow-y: auto; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); }
.modal-f .hint { margin-right: auto; align-self: center; font-size: 12px; color: var(--text-3); }
.modal .ic-head { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: 0 0 auto; }
.modal .ic-head.danger { background: var(--err-bg); color: var(--err); }

/* ---- command palette ---- */
.cmdk { max-width: 640px; }
.cmdk .q { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--border); }
.cmdk .q input { flex: 1; height: 56px; border: 0; outline: none; background: transparent; font-size: 16px; color: var(--text); }
.cmdk .q .svg-i { color: var(--text-3); }
.cmdk .res { max-height: 56vh; overflow-y: auto; padding: 8px; }
.cmdk .grp { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); padding: 10px 10px 6px; }
.cmdk .it { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; cursor: pointer; font-size: 13.5px; }
.cmdk .it .svg-i { color: var(--text-3); }
.cmdk .it .s { color: var(--text-3); font-size: 12px; margin-left: auto; white-space: nowrap; }
.cmdk .it.on { background: var(--primary-soft); } .cmdk .it.on .svg-i { color: var(--primary); }
.cmdk .foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-3); background: var(--surface-2); }

/* ---- menu ---- */
.menu { position: fixed; min-width: 240px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 70; animation: popIn .12s var(--ease); max-height: 70vh; overflow-y: auto; }
.menu .mh { padding: 8px 10px; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-align: left; font-size: 13.5px; color: var(--text); }
.menu button:hover { background: var(--surface-3); } .menu button.on { color: var(--primary); font-weight: 600; }
.menu button .s { margin-left: auto; font-size: 11.5px; color: var(--text-3); }
.menu .sep { height: 1px; background: var(--border); margin: 6px 4px; }

/* ---- toasts ---- */
#toasts { position: fixed; right: 24px; bottom: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 90; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; min-width: 300px; max-width: 440px; padding: 12px 14px; border-radius: 12px; background: var(--navy); color: #fff; box-shadow: var(--shadow-lg); font-size: 13.5px; animation: toastIn .22s var(--ease); }
[data-theme="dark"] .toast { background: #22324A; }
.toast .svg-i { color: #5FD69A; margin-top: 1px; } .toast.err { background: #8E2A20; } .toast.err .svg-i { color: #FFB4AA; }
.toast .x { margin-left: auto; background: none; border: 0; color: rgba(255,255,255,.6); cursor: pointer; padding: 0; } .toast .x:hover { color: #fff; }
.toast.out { animation: toastOut .2s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }

/* ---- misc ---- */
.stars { color: #E2A100; letter-spacing: 1px; white-space: nowrap; } .stars .off { color: var(--border-strong); }
.bar { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; min-width: 60px; } .bar i { display: block; height: 100%; border-radius: 6px; background: var(--ok); }
.bar.warn i { background: var(--warn); } .bar.err i { background: var(--err); }
.dl-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); } .dl-row:last-child { border-bottom: 0; }
.file-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex: 0 0 auto; }
details.acc summary { cursor: pointer; color: var(--primary); font-size: 12.5px; font-weight: 600; list-style: none; padding: 6px 0; } details.acc summary::-webkit-details-marker { display: none; }
.sig { width: 100%; height: 200px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius); background: #fff; touch-action: none; cursor: crosshair; }
.kbd-list { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; align-items: center; font-size: 13.5px; }
.kbd-list .k { display: flex; gap: 4px; }
.selbar { position: sticky; bottom: 20px; margin-top: 16px; display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--navy); color: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); animation: toastIn .2s var(--ease); z-index: 5; }
.selbar .btn.sec { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.2); box-shadow: none; } .selbar .btn.sec:hover { background: rgba(255,255,255,.18); }
.selbar .btn.ghost { color: rgba(255,255,255,.75); } .selbar .btn.ghost:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ===================== SCREEN-SPECIFIC ===================== */

/* ---- control tower: weekly volume chart ---- */
.chart { display: flex; align-items: flex-end; gap: 14px; height: 168px; padding: 8px 4px 0; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; cursor: pointer; }
.chart .bars { width: 100%; max-width: 46px; display: flex; flex-direction: column-reverse; border-radius: 8px; overflow: hidden; background: var(--surface-3); flex: 1; justify-content: flex-start; }
.chart .bars i { display: block; width: 100%; }
.chart .bars i.o { background: var(--out); } .chart .bars i.n { background: var(--in); }
.chart .lab { font-size: 11.5px; color: var(--text-3); font-weight: 600; white-space: nowrap; }
.chart .col.today .lab { color: var(--primary); }
.chart .col .tot { font-size: 12px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.ex-item { display: flex; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.ex-item:last-child { border-bottom: 0; }
.ex-item .sev { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; }
.ex-item .sev.High { background: var(--err-bg); color: var(--err); } .ex-item .sev.Medium { background: var(--warn-bg); color: var(--warn); } .ex-item .sev.Low { background: var(--info-bg); color: var(--info); }
.ex-item .txt { flex: 1; min-width: 0; } .ex-item .txt .r { font-weight: 650; cursor: pointer; } .ex-item .txt .r:hover { color: var(--primary); }
.ex-item .txt .m { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.ex-item .txt .meta { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.scn { display: flex; flex-direction: column; gap: 8px; }
.scn .n { width: 26px; height: 26px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.scn b { font-size: 13.5px; } .scn .muted { font-size: 12.5px; flex: 1; }

/* ---- dock board ---- */
.days { display: flex; gap: 6px; overflow-x: auto; }
.days button { border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 7px 14px; cursor: pointer; display: flex; flex-direction: column; align-items: center; min-width: 64px; line-height: 1.15; transition: all .15s; }
.days button b { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 650; }
.days button span { font-size: 15px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.days button:hover { border-color: var(--border-strong); }
.days button.on { background: var(--primary); border-color: var(--primary); } .days button.on b, .days button.on span { color: #fff; }
.waitlist { display: flex; flex-direction: column; gap: 10px; padding: 14px; max-height: calc(100vh - 290px); overflow-y: auto; }
.wcard { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 12px 10px; cursor: grab; transition: box-shadow .15s, border-color .15s; position: relative; }
.wcard:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.wcard.pick { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.wcard.dragging { opacity: .5; }
.wcard .grip { position: absolute; right: 10px; top: 12px; color: var(--text-3); }
.wcard .r { font-weight: 700; font-size: 13.5px; } .wcard .p { font-size: 13px; margin: 2px 0; } .wcard .m { font-size: 12px; color: var(--text-3); }
.wcard.OUT { box-shadow: inset 3px 0 0 var(--out); } .wcard.IN { box-shadow: inset 3px 0 0 var(--in); }
.wcard.OUT:hover, .wcard.IN:hover { box-shadow: var(--shadow); }
.board-wrap { overflow: auto; max-height: calc(100vh - 230px); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.board { display: grid; min-width: 100%; }
.board .hd { position: sticky; top: 0; z-index: 3; background: var(--surface-2); border-bottom: 1px solid var(--border); border-left: 1px solid var(--border); height: 44px; display: flex; align-items: center; justify-content: center; font-weight: 650; font-size: 12.5px; color: var(--text-2); }
.board .hd.corner { left: 0; z-index: 4; border-left: 0; }
.board .hr { position: sticky; left: 0; z-index: 2; background: var(--surface); border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--text-3); display: flex; align-items: flex-start; justify-content: flex-end; padding: 6px 10px 0 0; font-variant-numeric: tabular-nums; }
.board .hr.now { color: var(--primary); } .board .hr.now::after { content: ""; position: absolute; right: -4px; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.board .cell { border: 0; border-left: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); min-height: 58px; padding: 4px; text-align: left; font-family: inherit; position: relative; }
.board .cell.free { cursor: pointer; display: grid; place-items: center; color: transparent; transition: background .1s, color .1s; }
.board .cell.free:hover:not(:disabled) { background: var(--primary-soft); color: var(--primary); }
.board .cell.free .svg-i { width: 16px; height: 16px; }
.board .cell.free.can { background: color-mix(in srgb, var(--ok-bg) 70%, transparent); color: var(--ok); }
.board .cell.free.over { background: var(--ok-bg); box-shadow: inset 0 0 0 2px var(--ok); color: var(--ok); }
.board .cell.past, .board .cell:disabled { background: repeating-linear-gradient(-45deg, var(--surface-2), var(--surface-2) 6px, var(--surface) 6px, var(--surface) 12px); cursor: not-allowed; }
.board .slot { height: 100%; width: 100%; border-radius: 8px; padding: 6px 8px; cursor: pointer; overflow: hidden; display: flex; flex-direction: column; gap: 1px; font-size: 11.5px; line-height: 1.25; border: 0; text-align: left; font-family: inherit; }
.board .slot.OUT { background: var(--out-bg); box-shadow: inset 3px 0 0 var(--out); color: var(--text); }
.board .slot.IN { background: var(--in-bg); box-shadow: inset 3px 0 0 var(--in); color: var(--text); }
.board .slot.alert { background: var(--err-bg); box-shadow: inset 3px 0 0 var(--err); }
.board .slot b { font-size: 12px; } .board .slot span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.board .slot[draggable="true"] { cursor: grab; }
.board .slot:hover { filter: brightness(.97); }

/* ---- planning week ---- */
.week { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 12px; overflow-x: auto; }
.wday { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); display: flex; flex-direction: column; min-height: 380px; min-width: 0; }
.wday.today { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.wday .h { padding: 12px 14px 10px; border-bottom: 1px solid var(--border); }
.wday .h b { font-size: 13.5px; display: block; } .wday .h .s { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.wday .b { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.pitem { border-radius: 10px; padding: 8px 10px; cursor: pointer; font-size: 12.5px; transition: filter .1s; }
.pitem:hover { filter: brightness(.96); }
.pitem.OUT { background: var(--out-bg); box-shadow: inset 3px 0 0 var(--out); } .pitem.IN { background: var(--in-bg); box-shadow: inset 3px 0 0 var(--in); }
.pitem b { display: block; font-size: 12.5px; } .pitem span { color: var(--text-2); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- live map ---- */
.map-shell { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--gap); align-items: start; }
@media (max-width: 1180px) { .map-shell { grid-template-columns: 1fr; } }
.map { position: relative; background: linear-gradient(180deg, #DCEAF6, #E7F0F8); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }
[data-theme="dark"] .map { background: linear-gradient(180deg, #0F1E31, #132438); }
.map svg { display: block; width: 100%; height: auto; max-height: calc(100vh - 250px); }
.map .map-ctl { position: absolute; top: 12px; right: 12px; z-index: 2; display: flex; gap: 6px; }
.map .map-ctl button { min-width: 34px; height: 34px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 94%, transparent); color: var(--text); font: 600 14px var(--font); cursor: pointer; box-shadow: var(--shadow-sm, none); }
.map .map-ctl button:hover { background: var(--surface-2); }
.map svg { cursor: grab; user-select: none; -webkit-user-select: none; } .map svg.drag { cursor: grabbing; }
.map .site-pt { cursor: pointer; }
.map .land { fill: #FBFCFD; stroke: #C9D3DF; } [data-theme="dark"] .map .land { fill: #1B283B; stroke: #2B3B52; }
.map .lbl { fill: var(--text); font-family: var(--font); } .map .site-lbl { fill: var(--navy); font-weight: 700; } [data-theme="dark"] .map .site-lbl { fill: #fff; }
.map g.load { cursor: pointer; } .map g.load:hover path { stroke-opacity: 1; }
.map .overlay { position: absolute; left: 14px; bottom: 14px; display: flex; gap: 14px; background: color-mix(in srgb, var(--surface) 92%, transparent); padding: 8px 12px; border-radius: 10px; font-size: 12px; color: var(--text-2); box-shadow: var(--shadow-sm); flex-wrap: wrap; }
.map .overlay i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.loadlist { max-height: calc(100vh - 250px); overflow-y: auto; }
.load-row { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer; align-items: flex-start; }
.load-row:hover { background: var(--surface-2); } .load-row:last-child { border-bottom: 0; }
.load-row .src { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: 0 0 auto; }

/* ---- assistant ---- */
.chat-shell { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--gap); height: calc(100vh - var(--top-h) - 150px); min-height: 460px; }
@media (max-width: 1180px) { .chat-shell { grid-template-columns: 1fr; height: auto; } }
.chat { display: flex; flex-direction: column; min-height: 0; }
.chat .msgs { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.chat .m { display: flex; gap: 10px; max-width: 80%; } .chat .m.u { align-self: flex-end; flex-direction: row-reverse; }
.chat .m .bub { padding: 11px 14px; border-radius: 14px; background: var(--surface-3); font-size: 13.5px; white-space: pre-wrap; line-height: 1.5; }
.chat .m.u .bub { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; } .chat .m.a .bub { border-bottom-left-radius: 4px; }
.chat .m .bot { width: 30px; height: 30px; border-radius: 10px; background: linear-gradient(135deg, var(--cyan), var(--primary)); color: #fff; display: grid; place-items: center; flex: 0 0 auto; }
.chat .m .bot .svg-i { width: 16px; height: 16px; }
.chat .composer { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--border); }
.chat .typing { display: flex; gap: 4px; padding: 14px; } .chat .typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: blink 1s infinite; } .chat .typing i:nth-child(2) { animation-delay: .15s; } .chat .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .25; } }
.sugg { display: flex; flex-direction: column; gap: 6px; padding: 12px; }
.sugg button { text-align: left; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 10px 12px; font-size: 13px; cursor: pointer; color: var(--text); display: flex; gap: 8px; align-items: center; transition: border-color .15s, background .15s; }
.sugg button:hover { border-color: var(--primary); background: var(--primary-soft); }
.sugg button .svg-i { color: var(--primary); width: 15px; height: 15px; }

/* ---- settings ---- */
.set-row { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.set-row:last-child { border-bottom: 0; } .set-row .t { flex: 1; } .set-row .t b { display: block; font-size: 13.5px; } .set-row .t span { font-size: 12.5px; color: var(--text-3); }
.persona-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.persona { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; background: var(--surface); text-align: left; transition: border-color .15s, background .15s; }
.persona:hover { border-color: var(--border-strong); } .persona.on { border-color: var(--primary); background: var(--primary-soft); }
.persona b { display: block; font-size: 13px; } .persona span { font-size: 11.5px; color: var(--text-3); }

/* ---- boot ---- */
.boot { height: 100vh; display: grid; place-items: center; background: var(--bg); }
.boot .box { text-align: center; color: var(--text-2); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.boot .spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- weekly hours editor ---- */
.hours-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.hrow { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.hrow .switch { min-width: 120px; } .hrow .switch b { font-weight: 600; font-size: 13px; }
.hrow .hsel { display: flex; align-items: center; gap: 6px; flex: 1; } .hrow .hsel .inp { height: 32px; padding: 0 28px 0 8px; font-size: 13px; }
.hrow .hclosed { display: none; color: var(--text-3); font-size: 12.5px; font-weight: 600; }
.hrow.off { background: var(--surface-2); } .hrow.off .hsel { display: none; } .hrow.off .hclosed { display: inline; }
.board .cell.outside { background: repeating-linear-gradient(45deg, var(--warn-bg), var(--warn-bg) 6px, var(--surface) 6px, var(--surface) 12px); }
.board .hr.outside { color: var(--warn); }

/* ===================== PHONE =====================
   The mobile app and the phone prototype use THIS design: same tokens, same components as the desktop client.
   Below 760 px: compact top bar, bottom tab bar, menu as a drawer, tables shown as cards, dialogs as full-height sheets. */
.mtabs, .scrim { display: none; }
@media (max-width: 760px) {
  :root { --top-h: 56px; --page-pad-x: 14px; --gap: 12px; --row-h: 44px; --fs: 14px; }
  #app, #app.collapsed { grid-template-columns: 1fr; grid-template-rows: var(--top-h) 1fr auto; }
  .top { grid-column: 1; padding: 0 10px; gap: 8px; padding-top: env(safe-area-inset-top, 0); }
  main { grid-column: 1; grid-row: 2; -webkit-overflow-scrolling: touch; }
  .top .crumbs { font-size: 15px; flex: 1; } .top .crumbs > :not(:last-child) { display: none; } .top .spacer { display: none; }
  .top .tools > .seg { max-width: 38vw; overflow-x: auto; } .top .tools > .seg button { padding: 0 8px; font-size: 12px; }
  .top .tools [data-a="shortcuts"], .top .tools [data-a="toggleTheme"], .top .env { display: none; }
  .searchbox { width: 38px; padding: 0; justify-content: center; border: 0; background: none; } .searchbox span, .searchbox kbd { display: none; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(84vw, 300px); transform: translateX(-102%); transition: transform .22s var(--ease); box-shadow: var(--shadow-lg); z-index: 50; }
  #app.mnav .side { transform: none; }
  #app.mnav .scrim { display: block; position: fixed; inset: 0; background: rgba(9, 18, 32, .45); z-index: 40; }
  #app.collapsed .side .name, #app.collapsed .side .sec, #app.collapsed .side .item .nl, #app.collapsed .side .me .who { display: initial; }
  .mtabs { display: flex; grid-column: 1; grid-row: 3; background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom, 0); z-index: 15; }
  .mtabs button { flex: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px 7px; font-size: 10.5px; font-weight: 600; color: var(--text-3); position: relative; }
  .mtabs button .svg-i { width: 22px; height: 22px; }
  .mtabs button.on { color: var(--primary); }
  .mtabs button i { position: absolute; top: 3px; left: 54%; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #E5484D; color: #fff; font-size: 10px; font-style: normal; display: grid; place-items: center; }
  .page { padding: 16px var(--page-pad-x) 28px; }
  .page-head { margin-bottom: 14px; gap: 10px; } .page-head h1 { font-size: 20px; } .page-head p { font-size: 13px; }
  .page-head .acts { width: 100%; } .page-head .acts .btn { flex: 1 1 auto; } .page-head .acts .btn kbd { display: none; } .page-head .acts .seg { overflow-x: auto; max-width: 100%; }
  .kpis, .kpis.mini { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; } .kpi { padding: 12px 14px; } .kpi .v { font-size: 24px; }
  .grid, .g2, .g3, .g4, .g-main-side, .g-side-main, .map-shell, .chat-shell { grid-template-columns: 1fr !important; }
  .sticky { position: static; }
  .grid > *, .stack > *, .page > * { min-width: 0; max-width: 100%; } .panel { overflow: hidden; }
  .panel-h .acts .btn { padding: 0 8px; } .panel-h h3 { min-width: 0; }
  .panel-h { padding: 12px 14px; min-height: 0; flex-wrap: wrap; } .panel-b { padding: 14px; }
  .toolbar { padding: 12px; } .toolbar .inp-ic { width: 100%; } .toolbar > select.inp { width: 100% !important; } .toolbar .seg { overflow-x: auto; max-width: 100%; }
  /* tables become cards */
  .tbl-wrap { overflow: visible; }
  table.tbl, .tbl tbody { display: block; } .tbl thead { display: none; }
  .tbl tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .tbl tbody tr.flag { box-shadow: inset 3px 0 0 var(--err); } .tbl tr.flag td:first-child { box-shadow: none; }
  .tbl td { display: block; height: auto; padding: 0; border: 0; min-width: 0; }
  .tbl td::before { content: attr(data-label); display: block; font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin-bottom: 1px; }
  .tbl td[data-label=""]::before { display: none; }
  .tbl td:first-child { grid-column: 1 / -1; } .tbl td:first-child::before { display: none; }
  .tbl td.num { text-align: left; } .tbl td.act { grid-column: 1 / -1; text-align: left; } .tbl td.act::before { display: none; }
  .tbl .sub, .tbl .ell { max-width: 100%; white-space: normal; }
  .tbl-foot { flex-direction: column; align-items: flex-start; gap: 4px; }
  /* dialogs as sheets */
  .ov { padding: 0; align-items: flex-end; } .ov.center { align-items: flex-end; padding: 0; }
  .modal, .modal.wide, .modal.xl, .modal.narrow { max-width: none; max-height: 92vh; border-radius: 18px 18px 0 0; }
  .modal-f { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0)); flex-wrap: wrap; } .modal-f .hint { display: none; } .modal-f .btn { flex: 1; }
  .form-grid { grid-template-columns: 1fr; } .hours-grid { grid-template-columns: 1fr; }
  .cmdk { max-height: 92vh; }
  #toasts { left: 12px; right: 12px; bottom: 76px; } .toast { min-width: 0; max-width: none; }
  .selbar { bottom: 8px; flex-wrap: wrap; }
  /* screens */
  .chart { gap: 6px; height: 140px; } .days button { min-width: 54px; padding: 6px 8px; }
  .waitlist { max-height: none; } .board-wrap { max-height: 70vh; } .board .cell { min-height: 52px; }
  .week { grid-template-columns: repeat(7, minmax(150px, 1fr)); }
  .map svg { max-height: 52vh; } .loadlist { max-height: none; }
  .chat-shell { height: auto; } .chat .msgs { max-height: 55vh; } .chat .m { max-width: 92%; }
  .steps .step { min-width: 64px; } .step .n { font-size: 11px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .persona-grid { grid-template-columns: 1fr; }
  .actions .btn { height: 44px; }
  .btn, .inp, select.inp { min-height: 40px; }
}

/* =====================================================================
   Koda 1.0.3 - KODA GREEN (sustainability) + CONTROL TOWER INSIGHTS
   ===================================================================== */
.badge.b-green { background: var(--g-low-bg); color: var(--g-zero); gap: 4px; }
.badge.b-green.zero { background: var(--g-zero-bg); color: var(--g-zero); }
.badge.b-energy { gap: 4px; } .badge.b-energy.zero { background: var(--g-zero-bg); color: var(--g-zero); }
.badge.b-energy.low { background: var(--g-low-bg); color: var(--g-zero); } .badge.b-energy.thermal { background: var(--g-thermal-bg); color: var(--text-2); }
.badge.b-energy.est { opacity: .75; border: 1px dashed currentColor; }
.g-grade { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font-weight: 800; font-size: 13px; color: #fff; background: var(--g-thermal); flex: 0 0 auto; }
.g-grade.g-A { background: var(--g-a); } .g-grade.g-B { background: var(--g-b); color: #0B2A1B; } .g-grade.g-C { background: var(--g-c); color: #2A2204; } .g-grade.g-D { background: var(--g-d); } .g-grade.g-E { background: var(--g-e); }
.g-grade.lg { width: 44px; height: 44px; border-radius: 12px; font-size: 22px; }
.g-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.g-mini > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.g-mini b { font-size: 18px; } .g-mini b.ok { color: var(--g-zero); } .g-mini span { font-size: 11.5px; color: var(--text-3); }
/* score gauge */
.g-score { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.g-score svg { width: 150px; height: 92px; flex: 0 0 auto; }
.g-score .track { fill: none; stroke: var(--surface-3); stroke-width: 14; stroke-linecap: round; }
.g-score .val { fill: none; stroke-width: 14; stroke-linecap: round; }
.g-score .num { font: 800 28px var(--font); fill: var(--text); } .g-score .cap { font: 600 11px var(--font); fill: var(--text-3); }
.g-score .legend-g { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-2); min-width: 200px; flex: 1; }
.g-score .legend-g b { color: var(--text); }
/* stacked share bar (energy mix) */
.mix { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--surface-3); }
.mix i { display: block; height: 100%; } .mix i + i { border-left: 2px solid var(--surface); }
.mix-leg { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--text-2); margin-top: 8px; }
.mix-leg span { display: inline-flex; align-items: center; gap: 6px; } .mix-leg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
/* SVG charts */
.ichart { width: 100%; display: block; overflow: visible; }
.ichart .grid-l { stroke: var(--border); stroke-width: 1; } .ichart .axis-t { font: 500 11px var(--font); fill: var(--text-3); }
.ichart .val-t { font: 700 11px var(--font); fill: var(--text); } .ichart .line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.ichart .dot { stroke: var(--surface); stroke-width: 2; } .ichart rect.b { rx: 3; }
.ichart .hit { fill: transparent; cursor: default; } .ichart .hit:hover + g rect, .ichart g.col:hover rect { opacity: .82; }
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbars .r { display: grid; grid-template-columns: minmax(90px, 32%) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.hbars .r .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.hbars .r .t { height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; } .hbars .r .t i { display: block; height: 100%; border-radius: 5px; }
.hbars .r .v { font-variant-numeric: tabular-nums; color: var(--text-2); font-size: 12.5px; white-space: nowrap; }
.donut-w { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut-w svg { width: 132px; height: 132px; flex: 0 0 auto; } .donut-w .c-t { font: 800 22px var(--font); fill: var(--text); } .donut-w .c-s { font: 600 10.5px var(--font); fill: var(--text-3); }
.donut-w .leg { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-2); flex: 1; min-width: 150px; }
.donut-w .leg span { display: flex; align-items: center; gap: 8px; } .donut-w .leg i { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; } .donut-w .leg b { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; }
.ins-title { display: flex; align-items: baseline; gap: 10px; margin: calc(var(--gap) + 6px) 0 12px; } .ins-title h2 { font-size: 16px; margin: 0; } .ins-title span { font-size: 12.5px; color: var(--text-3); }
.reco { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); } .reco:last-child { border-bottom: 0; }
.reco .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--g-zero-bg); color: var(--g-zero); flex: 0 0 auto; }
.reco > div > b { display: block; font-size: 13.5px; } .reco > div > span { font-size: 12.5px; color: var(--text-2); }
.adv { background: linear-gradient(135deg, var(--navy), #0E4D3A); color: #fff; border-radius: var(--radius-lg, 16px); padding: 22px 24px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; }
.adv h3 { margin: 0 0 6px; font-size: 17px; color: #fff; } .adv p { margin: 0; color: rgba(255,255,255,.8); font-size: 13.5px; line-height: 1.55; }
.adv ul { margin: 10px 0 0; padding-left: 18px; color: rgba(255,255,255,.85); font-size: 13px; line-height: 1.7; }
.adv .tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: rgba(255,255,255,.14); padding: 3px 8px; border-radius: 999px; margin-bottom: 8px; }
.adv .btn.ok { background: #4CC287; border-color: #4CC287; color: #08261A; }
@media (max-width: 860px) { .adv { grid-template-columns: 1fr; } .g-mini { grid-template-columns: 1fr 1fr 1fr; } .hbars .r { grid-template-columns: minmax(80px, 38%) 1fr auto; } }
@media print { .adv .btn, .no-print { display: none !important; } .panel { break-inside: avoid; } }
.kpi .l .delta { font-size: 11px; font-weight: 700; margin-left: 4px; color: var(--text-3); } .kpi .l .delta.up { color: var(--ok); } .kpi .l .delta.down { color: var(--err); }
