/* Kutera UI.
   The name is kut, Old Turkic for prosperity and the fortune given from the sky, and era. The mark is a K whose upper
   arm is that sun half risen over the horizon. The interface follows it: a lit working sheet set into a night-navy
   frame (ASP's ink), kut gold only where the work is (the primary action, the open place, the logo's sun), ASP sky
   blue for links, focus and selection, and each module's own hue for its figures. Archivo, ASP's typeface: wide cuts
   for titles and figures, normal width for reading. Surfaces separate by fill steps, not by stripes or glows.
   Every colour is a token on :root; light and dark values sit side by side in light-dark(). */
@font-face {
  font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url("/fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url("/fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
:root {
  /* the frame: night sky navy around the sheet (ASP ink, hue 255) */
  --frame: light-dark(#0b1626, #070e19);
  --frame-2: light-dark(#13213a, #0e1828);
  --frame-line: rgba(196, 214, 240, 0.11);
  --frame-ink: #e8eef7;
  --frame-muted: #93a3bb;
  /* kut: the sun's gold. Fill for the primary action and the open place; never text on light ground */
  --kut: light-dark(#f5b83d, #f2b544);
  --kut-hi: light-dark(#ffc95c, #ffcd66);
  --kut-deep: light-dark(#d9961a, #e0a12f);
  --on-kut: #1a1405;
  --kut-glow: light-dark(rgba(245, 184, 61, 0.22), rgba(242, 181, 68, 0.16));
  /* the sheet and its surfaces, cool paper toward the navy hue */
  --bg: light-dark(#eef2f7, #0f1827);
  --paper: light-dark(#f4f7fb, #121c2c);
  --surface: light-dark(#ffffff, #162133);
  --surface-2: light-dark(#f6f8fb, #1a263a);
  --sunk: light-dark(#e9eef5, #0c1522);
  --hover: light-dark(rgba(11, 22, 38, 0.045), rgba(214, 228, 248, 0.06));
  --press: light-dark(rgba(11, 22, 38, 0.085), rgba(214, 228, 248, 0.1));
  --line: light-dark(#dfe5ee, #243147);
  --line-strong: light-dark(#c3ccda, #34445e);
  --rule: light-dark(#d3dbe6, #2b3a52);
  --ledger-rule: light-dark(#9fb3cc, #3e5576);
  --text: light-dark(#0e1a2c, #e9eef6);
  --text-2: light-dark(#3d4a5e, #b3bfd0);
  --text-3: light-dark(#566276, #8f9db2);
  --ink: light-dark(#0e1a2c, #e9eef6);
  /* ASP sky blue: links, focus, selection, the chosen filter */
  --brand: light-dark(#0b6fbd, #57b3ef);
  --brand-ink: light-dark(#095d9f, #84c8f4);
  --brand-hi: light-dark(#0a82dc, #79c4f3);
  --brand-soft: light-dark(#e3f0fa, rgba(87, 179, 239, 0.13));
  --brand-line: light-dark(#a9cdea, rgba(87, 179, 239, 0.42));
  --on-brand: light-dark(#ffffff, #04121f);
  --ochre: light-dark(#8f5a05, #e3b25a);
  --ochre-soft: light-dark(#f8eed8, rgba(227, 178, 90, 0.13));
  --red-ink: light-dark(#b42318, #f59a8e);
  --amber: light-dark(#a8650a, #e3b25a);
  --amber-soft: light-dark(#f8eed8, rgba(227, 178, 90, 0.13));
  --amber-ink: light-dark(#80480a, #ecc786);
  /* the side menu sits on the frame */
  --spine: var(--frame);
  --spine-2: var(--frame-2);
  --spine-line: var(--frame-line);
  --spine-ink: var(--frame-ink);
  --spine-icon: #a7b5ca;
  --spine-muted: var(--frame-muted);
  --spine-hi: var(--kut);
  /* module hues: one per module, with a tint, a text ink and a pale tone for the frame.
     Workspace cyan, Sales green, Purchases amber, Finance blue, Team rose, Insights moss, Settings violet-slate.
     Icons and tabs keep 3:1 on the surfaces; text inks keep 4.5:1. */
  --mod-work: light-dark(#0f7396, #6cc6e0); --mod-work-soft: light-dark(#e2f1f6, rgba(108, 198, 224, 0.13));
  --mod-work-ink: light-dark(#0d5f7c, #93d9ee); --mod-work-spine: #7fd3e8;
  --mod-sales: light-dark(#1f7f3f, #6fcf93); --mod-sales-soft: light-dark(#e3f3e6, rgba(111, 207, 147, 0.13));
  --mod-sales-ink: light-dark(#17672f, #92dcab); --mod-sales-spine: #8ed9a4;
  --mod-purch: light-dark(#a35f00, #e6b24f); --mod-purch-soft: light-dark(#f9f0d8, rgba(230, 178, 79, 0.13));
  --mod-purch-ink: light-dark(#7d4800, #f0c96f); --mod-purch-spine: #efc35c;
  --mod-fin: light-dark(#2d56b8, #8db3f2); --mod-fin-soft: light-dark(#e7edfa, rgba(141, 179, 242, 0.14));
  --mod-fin-ink: light-dark(#23449a, #abc9f7); --mod-fin-spine: #9dbcf5;
  --mod-team: light-dark(#b8336a, #f08fb6); --mod-team-soft: light-dark(#f9e7ef, rgba(240, 143, 182, 0.13));
  --mod-team-ink: light-dark(#962755, #f5aac8); --mod-team-spine: #f2a3c3;
  --mod-insight: light-dark(#5f8a0f, #c3da6e); --mod-insight-soft: light-dark(#eef5dc, rgba(195, 218, 110, 0.13));
  --mod-insight-ink: light-dark(#4b6d0b, #d3e68e); --mod-insight-spine: #c9e082;
  --mod-settings: light-dark(#5b5a9e, #b4b3ea); --mod-settings-soft: light-dark(#ececf7, rgba(180, 179, 234, 0.14));
  --mod-settings-ink: light-dark(#47468a, #cbcaf3); --mod-settings-spine: #c4c3f0;
  /* the open module, set on .shell by the side link that is open; the brand when no module is open */
  --m: var(--brand);
  --m-soft: var(--brand-soft);
  --m-ink: var(--brand-ink);
  --m-spine: var(--kut);
  /* muted inks for user-chosen colours (events, currencies); never decoration */
  --h-cobalt: light-dark(#2f62b0, #7ea4e6); --h-azure: light-dark(#1f7aa8, #62b2dc);
  --h-lagoon: light-dark(#17816a, #4fc2a6); --h-emerald: light-dark(#2a7d4c, #6cc58f);
  --h-lime: light-dark(#5f7d1a, #a6c25a); --h-saffron: light-dark(#a86d0c, #ddb05a);
  --h-tangerine: light-dark(#b65a1e, #e79a5e); --h-coral: light-dark(#b8443a, #ec8a7e);
  --h-rose: light-dark(#b0446f, #e486ab); --h-orchid: light-dark(#8a4ca8, #c597e0);
  --h-iris: light-dark(#5a50b8, #a59cf0); --h-slate: light-dark(#5b6770, #a2adb5);
  /* categorical chart slots: validated order (adjacent CVD and normal-vision floors pass) */
  --s1: light-dark(#2f6db5, #4f8ad6); --s2: light-dark(#c97a12, #c27f1f); --s3: light-dark(#1f9a6e, #2fa679);
  --s4: light-dark(#8a56c2, #9a74d6); --s5: light-dark(#c4473b, #d85f52); --s6: light-dark(#0f8fae, #2a9dbb);
  --s7: light-dark(#7d8f1f, #839626); --s8: light-dark(#d2618f, #cf6b99);
  --s2-ink: light-dark(#9a5d08, #e0a85a);
  /* sequential blue for ageing buckets, light to dark */
  --seq-1: light-dark(#b9cfe9, #24384f); --seq-2: light-dark(#86abd8, #2f5583); --seq-3: light-dark(#5688c4, #4a79b6);
  --seq-4: light-dark(#2f6db5, #77a3dc); --seq-5: light-dark(#1d4d87, #b1cdf0);
  /* status: always with a glyph and a label */
  --st-good: light-dark(#17734a, #7fdaa4); --st-warn: light-dark(#8a5600, #e8c27c); --st-bad: light-dark(#b42318, #f59a8e);
  --st-info: light-dark(#0b6fbd, #84c8f4); --st-muted: light-dark(#566276, #a9b4c4);
  --ok-bg: light-dark(#e1f3e9, rgba(127, 218, 164, 0.12)); --ok-ink: light-dark(#13603d, #9be3b8);
  --warn-bg: light-dark(#faf0d9, rgba(232, 194, 124, 0.13)); --warn-ink: light-dark(#774900, #efd19a);
  --bad-bg: light-dark(#fbe6e3, rgba(245, 154, 142, 0.13)); --bad-ink: light-dark(#a11f15, #f7b0a6);
  --info-bg: light-dark(#e3f0fa, rgba(132, 200, 244, 0.13)); --info-ink: light-dark(#0a5a98, #a6d6f6);
  --muted-bg: light-dark(#e9edf3, rgba(169, 180, 196, 0.11)); --muted-ink: light-dark(#4a5568, #bcc6d4);
  --neg-ink: light-dark(#b42318, #f59a8e);
  --track: light-dark(#e3e8ef, #1f2b3f);
  --track-strong: light-dark(#bec8d6, #3a4a64);
  --grid: light-dark(#e3e8ef, #1e2a3d);
  --baseline: light-dark(#9aa7b9, #4b5b75);
  --tip-bg: light-dark(#0e1a2c, #e9eef6);
  --tip-ink: light-dark(#f3f6fa, #0e1a2c);
  --login-bg: var(--frame);
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --shadow: 0 1px 0 light-dark(rgba(11, 22, 38, 0.03), rgba(0, 0, 0, 0));
  --shadow-lift: 0 1px 2px light-dark(rgba(11, 22, 38, 0.06), rgba(0, 0, 0, 0.3)),
    0 12px 28px -16px light-dark(rgba(11, 22, 38, 0.28), rgba(0, 0, 0, 0.85));
  --shadow-pop: 0 2px 6px light-dark(rgba(11, 22, 38, 0.08), rgba(0, 0, 0, 0.35)),
    0 24px 48px -20px light-dark(rgba(11, 22, 38, 0.4), rgba(0, 0, 0, 0.9));
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "Archivo", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Ubuntu Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* legacy names still referenced by inline styles */
  --side-ink: var(--spine-ink);
  --side-icon: var(--spine-icon);
  --side-muted: var(--spine-muted);
  --card-base: var(--surface);
  --card-border: var(--line);
  --primary-a: var(--brand);
  --primary-b: var(--brand-ink);
}
/* ---- base ---------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { line-height: 1.25; font-weight: 500; }
a { color: inherit; }
button, input, select, textarea { font-family: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--brand) 24%, transparent); }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-stretch: 115%; font-size: 12.5px; letter-spacing: -0.01em; }
.wrap { overflow-wrap: anywhere; }
.muted-text { color: var(--text-3); font-size: 13px; }
.big { font-size: 26px; font-weight: 500; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; }
.nw { white-space: nowrap; }
.grow { flex: 1; font-size: 14px; }

/* ---- icons ---------------------------------------------------------------------------------
   Drawn for Kutera: 1.5px ink outlines on a 24 grid, each with one solid mark (a needle hub,
   a selected cell, a total bar) that names the thing. The solid mark takes --ic-mark. */
.ic { display: inline-block; flex: none; vertical-align: middle; overflow: visible; }
.ic .mk { fill: var(--ic-mark, currentColor); stroke: none; }

/* ---- sign-in: the kut sun rising behind fluted ledger glass, the sheet beside it --------------------- */
.login {
  position: relative; min-height: 100vh; min-height: 100dvh; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 468px); padding: 10px;
  background: var(--frame); color: var(--frame-ink);
}
.login-scene {
  position: relative; overflow: hidden; border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(28px, 5vw, 64px);
  background: linear-gradient(180deg, #0b1626 0%, #13294a 58%, #0a1322 58.2%, #070e19 100%);
}
.login-scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.login-story { position: relative; max-width: 620px; animation: rise 0.9s var(--ease-out) 0.5s both; }
.login-slogan {
  margin: 0; font-size: clamp(34px, 4.4vw, 64px); line-height: 1.02; font-weight: 620; font-stretch: 125%;
  letter-spacing: -0.025em; color: #f4f7fb; text-wrap: balance;
}
.login-origin { margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; color: #a9b8cd; }
.login-origin b { font-weight: 640; font-stretch: 118%; color: var(--kut); margin-right: 6px; }
.login-card {
  position: relative; display: flex; flex-direction: column; justify-content: center; gap: 28px;
  color: var(--text); background: var(--surface); border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 48px clamp(28px, 4vw, 56px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.login-card > * { width: 100%; max-width: 340px; margin-inline: auto; }
.login:not(.odoo) .tiles { justify-content: flex-start; margin-left: -6px; }
.login-card.done { opacity: 0; transform: translateY(-6px); }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-brand { display: flex; align-items: center; gap: 14px; }
.login-brand h1 { margin: 0; font-size: 30px; font-weight: 660; font-stretch: 120%; letter-spacing: -0.02em; line-height: 1; }
.login-card .btn.primary.block { min-height: 44px; font-size: 15px; }
@media (max-width: 900px) {
  .login { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(300px, 46vh) auto; padding: 0; }
  .login-scene { border-radius: 0; padding: 28px 22px 48px; }
  .login-card { border-radius: var(--radius-lg) var(--radius-lg) 0 0; margin-top: -22px; justify-content: flex-start; padding: 32px 22px 40px; gap: 24px; }
}
@media (max-width: 900px) and (min-height: 820px) { .login { grid-template-rows: 48vh auto; } }
.tiles { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.tile-wrap { position: relative; width: 104px; }
.tile-main {
  display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%;
  background: none; border: 1px solid transparent; color: var(--text); font: inherit; cursor: pointer; padding: 12px 6px 10px; border-radius: 10px;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.tile-main:hover, .tile-main:focus-visible { background: var(--hover); border-color: var(--line); }
.tile-name { font-size: 13px; font-weight: 500; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-x {
  position: absolute; top: 2px; right: 4px; width: 24px; height: 24px; border-radius: 6px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2);
  display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity 0.15s;
}
.tile-wrap:hover .tile-x, .tile-x:focus-visible { opacity: 1; }
@media (hover: none) { .tile-x { opacity: 1; } }
.tile-other .tile-ico {
  width: 64px; height: 64px; border-radius: 50%; border: 1px dashed var(--line-strong);
  display: grid; place-items: center; color: var(--text-2);
}
.who { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.who strong { flex: 1; min-width: 0; font-weight: 500; }
.link-btn {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--brand-ink);
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; padding: 4px 2px; text-decoration: none;
}
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- form controls ------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.input {
  min-height: 38px; padding: 0 11px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); font: inherit; font-size: 14.5px; width: 100%; min-width: 0;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
textarea.input { padding: 9px 11px; line-height: 1.5; }
.input:hover { border-color: color-mix(in srgb, var(--line-strong) 60%, var(--text-3)); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent); }
.input::placeholder { color: var(--text-3); }
.input[readonly] { background: var(--surface-2); }
.input:disabled { background: var(--surface-2); color: var(--text-3); }
.select {
  padding-right: 32px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
input[type="date"], input[type="datetime-local"], input[type="time"] { font-variant-numeric: tabular-nums; }
.date-pop input { min-height: 36px; padding: 0 10px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; }
.form-error { color: var(--bad-ink); margin: 0; font-size: 13.5px; font-weight: 500; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; position: relative; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.switch .track {
  width: 36px; height: 20px; border-radius: 10px; background: var(--track-strong); position: relative; flex: none;
  transition: background 0.22s var(--ease);
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: transform 0.22s var(--ease-out); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---- buttons --------------------------------------------------------------------------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 0 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font: inherit; font-size: 13.5px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease), transform 0.12s var(--ease);
}
.btn:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--m) 45%, var(--line-strong)); }
.btn:active { transform: translateY(1px); }
.btn .ic { color: var(--text-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.primary .ic { color: inherit; --ic-mark: currentColor; }
.btn.primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
:root[data-theme="dark"] .btn.primary:hover { background: var(--brand-hi); border-color: var(--brand-hi); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary:hover { background: var(--brand-hi); border-color: var(--brand-hi); } }
.btn.danger { background: var(--surface); color: var(--bad-ink); border-color: color-mix(in srgb, var(--st-bad) 40%, var(--line)); }
.btn.danger .ic { color: inherit; }
.btn.danger:hover { background: var(--bad-bg); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--hover); border-color: transparent; }
.btn.sm { min-height: 30px; padding: 0 10px; font-size: 13px; gap: 6px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2);
  cursor: pointer; text-decoration: none; transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.icon-btn .ic { color: inherit; }

/* ---- shell ------------------------------------------------------------------------------- */
.shell { position: relative; display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; background: var(--bg); }
.shell.arrive { animation: fade-in 0.45s var(--ease) both; }
.side {
  position: sticky; top: 0; height: 100vh; z-index: 30; overflow: visible;
  display: flex; flex-direction: column; gap: 4px; padding: 16px 12px 12px;
  background: var(--spine); color: var(--spine-ink);
  border-right: 1px solid var(--spine-line);
  --ic-mark: var(--spine-icon);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 16px; }
.brand-mark { position: relative; display: inline-flex; border-radius: 10px; outline: none; cursor: default; }
.brand-mark:focus-visible { outline: 2px solid var(--spine-hi); outline-offset: 3px; }
.about {
  position: absolute; left: 0; top: calc(100% + 10px); width: 268px; z-index: 60;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; box-shadow: var(--shadow-pop);
  opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}
.about strong { display: block; font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.about span { display: block; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.brand-mark:hover .about, .brand-mark:focus-visible .about, .brand-mark:focus-within .about { opacity: 1; transform: none; pointer-events: auto; }
.brand-name { font-size: 19px; font-weight: 640; font-stretch: 118%; color: var(--frame-ink); letter-spacing: -0.005em; }
.nav-scroll {
  position: relative; flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto;
  scrollbar-width: none; margin: 0 -12px; padding: 0 12px;
  mask-image: linear-gradient(to bottom, transparent 0, #000 8px, #000 calc(100% - 14px), transparent 100%);
}
.nav-scroll::-webkit-scrollbar { display: none; }
.nav { position: relative; display: flex; flex-direction: column; gap: 1px; padding: 4px 0 8px; }
.nav-group { display: flex; flex-direction: column; gap: 1px; margin-top: 10px; }
.nav-title { font-size: 11.5px; font-weight: 500; color: var(--spine-muted); padding: 6px 12px 4px; letter-spacing: 0.02em; }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 11px; height: 34px; padding: 0 10px 0 12px; border-radius: 7px;
  color: var(--spine-ink); text-decoration: none; font-size: 14px;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.nav-link > .ic { color: var(--spine-icon); transition: color 0.18s var(--ease); }
.nav-link:hover { background: rgba(214, 228, 248, 0.06); color: #fff; }
.nav-link:hover > .ic { color: #e3ebf6; }
.nav-link[aria-current="page"] { color: #fff; background: color-mix(in srgb, var(--m-spine) 16%, transparent); }
.nav-link[aria-current="page"] > .ic { color: #fff; --ic-mark: var(--m-spine); }
.lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the index tab: a short rule that travels to the open page */
.nav-ind {
  position: absolute; left: -12px; top: 0; width: 3px; height: 18px; border-radius: 0 2px 2px 0;
  background: var(--m-spine); pointer-events: none; opacity: 0;
  transition: transform 0.38s var(--ease-out), opacity 0.2s var(--ease);
}
.nav-ind.on { opacity: 1; }
.badge-slot { display: inline-flex; margin-left: auto; }
.badge-count {
  font-size: 12px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; color: var(--brand-ink);
  min-width: 16px; text-align: right;
}
.side .badge-count { color: var(--spine-hi); }
.nav-count { margin-left: auto; font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--spine-hi); }
.side-foot { display: flex; flex-direction: column; gap: 1px; padding-top: 8px; border-top: 1px solid var(--spine-line); margin-top: 4px; }
.user { position: relative; margin-top: 8px; }
.user-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; color: #fff; font: inherit; text-align: left; cursor: pointer;
  padding: 8px 10px; border-radius: 9px; border: 1px solid var(--spine-line); background: var(--spine-2);
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.user-btn:hover { background: color-mix(in srgb, var(--spine-2) 80%, #fff 6%); border-color: rgba(196, 214, 240, 0.2); }
.user-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.user-text strong { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-text span { font-size: 12px; color: var(--spine-muted); }
.user-chev { display: inline-flex; color: var(--spine-icon); flex: none; transition: transform 0.2s var(--ease); }
.user-btn[aria-expanded="true"] .user-chev { transform: rotate(180deg); }
.main { min-width: 0; display: flex; flex-direction: column; position: relative; z-index: 1; }
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 32px 14px; background: var(--bg);
  transition: box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.top::after {
  content: ""; position: absolute; left: 32px; right: 32px; bottom: 0; height: 1px; background: var(--line);
  opacity: 0; transition: opacity 0.2s var(--ease);
}
.top.stuck { background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.top.stuck::after { opacity: 1; }
.top-head { min-width: 0; display: flex; flex-direction: column; }
.top-title { margin: 0; font-size: 25px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-sub { margin: 3px 0 0; font-size: 13px; color: var(--text-3); }
.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.top-actions .icon-btn { width: 38px; height: 38px; }
.top-actions .new-btn { min-height: 38px; padding: 0 14px 0 12px; }
.sync-link[data-state="run"] .ic { animation: spin 2.4s linear infinite; }
.sync-link[data-state="bad"] { color: var(--st-bad); border-color: color-mix(in srgb, var(--st-bad) 45%, var(--line)); }
.content { padding: 8px 32px 56px; width: 100%; max-width: 1480px; }
.page { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head > .btn, .page-head > .pop-wrap { margin-left: auto; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; flex: 1 1 auto; }
.seg-slot, .date-slot { display: contents; }
.list-meta { display: flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 13px; margin: 0; }
.bnav { display: none; }

/* page arrival: blocks rise into place one after another */
.page > * { animation: rise 0.42s var(--ease-out) both; }
.page > *:nth-child(2) { animation-delay: 0.04s; }
.page > *:nth-child(3) { animation-delay: 0.08s; }
.page > *:nth-child(4) { animation-delay: 0.12s; }
.page > *:nth-child(5) { animation-delay: 0.16s; }
.page > *:nth-child(n+6) { animation-delay: 0.2s; }
.page .page > * { animation: none; }

/* ---- header: global search and notifications ------------------------------------------- */
.gsearch {
  position: relative; display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 8px 0 12px;
  width: clamp(220px, 24vw, 340px); border-radius: var(--radius-sm); border: 1px solid var(--line-strong); color: var(--text-3);
  background: var(--surface); transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.gsearch:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent); }
.gsearch.pop-wrap { display: flex; }
.gs-input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px; }
.gs-input::placeholder { color: var(--text-3); }
.gs-input::-webkit-search-cancel-button { display: none; }
.gs-kbd {
  font: 500 11px/1 var(--font); padding: 4px 6px; border-radius: 5px; white-space: nowrap;
  border: 1px solid var(--line); border-bottom-width: 2px; background: var(--surface-2); color: var(--text-3);
}
.gs-pop { top: calc(100% + 6px); left: 0; width: max(100%, 420px); max-height: min(70vh, 540px); overflow: auto; padding: 6px; }
.gs-group + .gs-group { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line); }
.gs-head { font-size: 12px; font-weight: 500; color: var(--text-3); padding: 6px 8px 4px; }
.gs-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 7px; color: inherit; text-decoration: none; }
.gs-item:hover, .gs-item.on { background: var(--hover); }
.gs-item.on { box-shadow: inset 2px 0 0 var(--brand); }
.gs-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.gs-text strong { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-text span { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-none { margin: 0; padding: 14px 10px; color: var(--text-3); font-size: 14px; }
.bell-count {
  position: absolute; top: 3px; right: 4px; font-size: 10.5px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
  color: var(--red-ink); background: var(--surface); padding: 1px 2px; border-radius: 3px;
}
.bell-pop { top: calc(100% + 6px); right: 0; width: 310px; }
.pop-title { font-size: 12.5px; font-weight: 500; color: var(--text-3); padding: 8px 10px 6px; }
.pop-empty { display: flex; align-items: center; gap: 8px; margin: 0; padding: 6px 10px 10px; color: var(--text-2); font-size: 14px; }
.pop-empty .ic { color: var(--st-good); }

/* ---- popovers and menus ------------------------------------------------------------- */
.pop-wrap { position: relative; display: inline-block; }
.pop {
  position: absolute; z-index: 60; min-width: 220px; color: var(--text); padding: 6px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: var(--shadow-pop);
  transform-origin: top right; animation: pop-in 0.16s var(--ease-out) both;
}
.new-menu { top: calc(100% + 6px); right: 0; min-width: 240px; }
.date-pop { top: calc(100% + 6px); left: 0; width: 280px; padding: 14px; display: flex; flex-direction: column; gap: 12px; transform-origin: top left; }
.pop-actions { display: flex; justify-content: flex-end; gap: 8px; }
.user .pop { bottom: calc(100% + 8px); left: 0; right: 0; min-width: 0; transform-origin: bottom left; }
.user-menu { width: 300px; right: auto !important; }
.pop-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border-radius: 7px; color: inherit;
  text-decoration: none; background: none; border: 0; font: inherit; font-size: 14px; cursor: pointer; text-align: left;
}
.pop-item:hover { background: var(--hover); }
.pop-item .ic, .pop-item .glyph { color: var(--text-3); }
.pop-item.on { color: var(--brand-ink); font-weight: 500; }
.pop-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; flex-wrap: wrap; }
.pop-row > .ic { color: var(--text-3); }
.pop-row .seg { flex: none; }

/* ---- segmented controls, chips, search ------------------------------------------------------- */
.seg {
  display: inline-flex; flex-wrap: wrap; gap: 0; padding: 2px; border-radius: 8px;
  background: var(--sunk); border: 1px solid var(--line);
}
.field > .seg, .stack-form > .seg, .field > div > .seg { align-self: flex-start; }
.seg-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border: 0; background: transparent;
  color: var(--text-2); border-radius: 6px; font: inherit; font-size: 13px; font-weight: 400; cursor: pointer; white-space: nowrap;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.seg-btn:hover { color: var(--text); }
.seg-btn[aria-pressed="true"] { background: var(--surface); color: var(--text); font-weight: 500; box-shadow: 0 0 0 1px var(--line-strong), 0 1px 2px rgba(21, 27, 23, 0.06); }
.seg-btn .ic { color: var(--text-3); }
.seg-btn[aria-pressed="true"] .ic { color: var(--text); --ic-mark: var(--m); }
.seg-btn .count { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; font-weight: 400; }
.seg-btn[aria-pressed="true"] .count { color: var(--brand-ink); }
.search {
  display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 10px; background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--text-3); min-width: 200px; flex: 1 1 220px; max-width: 320px;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent); }
.search-input { border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px; flex: 1; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 4px 2px; align-items: center; }
/* filter chips read as an index: text with a rule under the chosen one */
.chip-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px; border-radius: 0;
  border: 0; border-bottom: 2px solid transparent; background: none; color: var(--text-2); font: inherit; font-size: 13.5px; cursor: pointer;
  transition: color 0.18s var(--ease), border-color 0.22s var(--ease);
}
.chip-btn:hover { color: var(--text); border-bottom-color: var(--line-strong); }
.chip-btn .count { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.chip-btn[aria-pressed="true"] { color: var(--text); border-bottom-color: var(--m); font-weight: 500; }
/* small facts beside a name: plain inked text, never a capsule */
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 0; font-size: 12.5px; font-weight: 400;
  color: var(--text-2); white-space: nowrap; background: none; border: 0; text-decoration: none;
}
.chip .ic { color: var(--text-3); }
.chip.local { color: var(--ochre); font-weight: 500; }
.chip.local .ic { color: var(--ochre); }
.chip.link { color: var(--brand-ink); }
.chip.link .ic, .chip.copied .ic { color: inherit; }
.chip.copied { color: var(--text-3); }
.chip.cur { color: var(--text-3); font-stretch: 115%; font-size: 11.5px; letter-spacing: 0.02em; }
.chip.budget { color: var(--brand-ink); }
.chip.ok-chip { color: var(--ok-ink); }
.chip.warn-chip { color: var(--warn-ink); }
.chip.link:hover, .chip.ok-chip:hover { text-decoration: underline; text-underline-offset: 3px; }
.src { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.src::before { content: "·"; margin-right: 5px; color: var(--line-strong); }
.marks { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; vertical-align: middle; }
.marks > * + .chip.local::before { content: "·"; margin-right: 1px; color: var(--line-strong); font-weight: 400; }
.marks > .src:first-child::before { content: none; }

/* ---- status marks: a glyph that names the state, then the word ----------------------------------- */
.status, .pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 400; white-space: nowrap;
  color: var(--text); background: none; padding: 0; border-radius: 0;
}
.status .sg, .pill .sg { flex: none; color: var(--st-muted); }
.st-ok .sg { color: var(--st-good); }
.st-warn .sg { color: var(--st-warn); }
.st-bad .sg { color: var(--st-bad); }
.st-info .sg { color: var(--st-info); }
.st-muted { color: var(--text-2); }
.st-bad { color: var(--text-2); }
.pill .dot { display: none; }

/* ---- cards and grids ----------------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); min-width: 0; color: var(--text);
}
a.card { text-decoration: none; transition: border-color 0.2s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease-out); }
a.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-lift); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; min-width: 0; }
.card-title { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 15px; font-weight: 500; letter-spacing: -0.005em; min-width: 0; color: var(--text); }
.card-title .ic, .card-title .glyph { color: var(--text-3); }
.card-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--text-3); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.card-grid.budgets, .card-grid.rates { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card-grid.products { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card-grid.people { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dash-grid > .span-2 { grid-column: span 2; }
.dash-grid > .card { min-width: 0; }
.two-up { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.settings-grid > .card { min-width: 0; }
.asof { margin: 0; }

/* Figures sit in one ruled strip, a column each, like the head of a ledger page. */
.kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.kpi-grid > .card, .kpi-grid > a.card {
  border: 0; border-radius: 0; box-shadow: none; background: none; margin: 0 -1px -1px 0;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 18px;
}
.kpi-grid > a.card:hover { background: var(--surface-2); box-shadow: none; }
.kpi-grid .kpi-value { font-size: 22px; gap: 6px; }
.kpi-grid .kpi-value .num { overflow: hidden; text-overflow: ellipsis; }
.kpi { display: flex; flex-direction: column; gap: 6px; text-decoration: none; position: relative; overflow: hidden; }
.kpi-top { display: flex; align-items: center; gap: 8px; }
.kpi-top .glyph { --g: 18px; }
.kpi-label { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-3); min-width: 0; }
.kpi-label .ic { color: var(--text-3); }
.rec-kind { font-size: 12.5px; color: var(--text-3); }
.late .ic { color: inherit; }
.fact-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fact-val { font-weight: 500; overflow-wrap: anywhere; display: flex; align-items: center; gap: 8px; min-width: 0; }
.fact-val .contact-top { gap: 10px; }
.paid-pct { margin-left: auto; font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.paid-meter { margin-top: 4px; }
.paid-meter .meter-fill { background: var(--st-warn); }
.paid-meter.full .meter-fill { background: var(--brand); }
.kpi-value { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.kpi-cur { font-size: 12px; color: var(--text-3); font-weight: 400; font-stretch: 115%; letter-spacing: 0.02em; }
.kpi-sub { font-size: 12.5px; color: var(--text-3); }
.kpi .spark { height: 30px; margin-top: auto; }

/* per-currency totals: one ruled strip, a column per currency */
.stat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; align-items: stretch;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; position: relative;
}
.stat-row > .card.stat {
  border: 0; border-radius: 0; box-shadow: none; padding: 14px 18px 14px; background: none;
  border-right: 1px solid var(--line); margin-right: -1px;
}
.stat-label { display: inline-flex; align-items: center; gap: 2px; }
.stat-label .info { width: 18px; height: 18px; }
.stat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat-label { font-size: 12.5px; color: var(--text-3); }
.stat-main { font-size: 21px; font-weight: 500; letter-spacing: -0.015em; margin: 4px 0 10px; font-variant-numeric: tabular-nums; }
.stat-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; margin: 0; }
.stat-grid > div, .budget-stats > div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.stat-grid dt { font-size: 12px; color: var(--text-3); }
.stat-grid dd { margin: 0; font-size: 12.5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; color: var(--text-2); }

/* pipeline strip: a ruled row of counters; the chosen one is underlined */
.stages {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.stage {
  --tone: var(--st-muted);
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px 16px 13px;
  border: 0; border-right: 1px solid var(--line); background: none; cursor: pointer; text-align: left; font: inherit; color: var(--text);
  transition: background 0.18s var(--ease);
}
.stage:last-child { border-right: 0; }
.stage:hover { background: var(--surface-2); }
.stage::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 2px; background: var(--tone);
  transform: scaleX(0); transform-origin: left; transition: transform 0.32s var(--ease-out);
}
.stage.on::after { transform: scaleX(1); }
.stage strong { font-size: 22px; font-weight: 500; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; }
.stage span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.stage span::before { content: ""; width: 8px; height: 2px; background: var(--tone); flex: none; }
.stage.tone-info { --tone: var(--st-info); }
.stage.tone-ok { --tone: var(--st-good); }
.stage.tone-warn { --tone: var(--st-warn); }
.stage.tone-bad { --tone: var(--st-bad); }

/* expense type tiles */
.type-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.type-tile {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; padding: 12px 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); text-align: left; font: inherit; color: var(--text); cursor: pointer;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.type-tile:hover { border-color: var(--line-strong); }
.type-tile[aria-pressed="true"] { border-color: var(--m); box-shadow: inset 0 0 0 1px var(--m); }
.type-ico { grid-row: 1 / span 3; }
.type-tile strong { font-size: 14px; font-weight: 500; }
.type-tile .num { font-size: 13.5px; text-align: left; color: var(--text-2); }

/* ---- tables -------------------------------------------------------------------------- */
.table-wrap {
  overflow: auto; max-height: 72vh; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table th {
  position: sticky; top: 0; z-index: 1; background: var(--surface); text-align: left; font-size: 12.5px; font-weight: 500;
  color: var(--text-3); padding: 10px 14px 9px; border-bottom: 1px solid var(--ledger-rule); white-space: nowrap;
}
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; }
.table tbody tr { transition: background 0.12s var(--ease); }
.table tr.click:hover td, .table tr.click:focus-visible td { background: var(--surface-2); }
.table tr.click:focus-visible { outline: none; }
.table tr.click:focus-visible td:first-child { box-shadow: inset 2px 0 0 var(--brand); }
.table tr.muted td { color: var(--text-3); }
.table th.num, .table td.num { text-align: right; }
.table td .amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.table td .cur { margin-left: 5px; font-size: 11px; color: var(--text-3); font-stretch: 115%; letter-spacing: 0.02em; }
.table td .amt.neg, .amt.neg { color: var(--neg-ink); }
@media (max-width: 1100px) { .hide-md { display: none; } }
@media (max-width: 700px) { .hide-sm { display: none; } }
.docno { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.docno-txt { font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: 0.005em; }
.edoc { color: var(--text-3); display: inline-grid; }
.person { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.person-name { min-width: 0; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amt { white-space: nowrap; font-variant-numeric: tabular-nums; }
.late { color: var(--red-ink); font-weight: 500; }
.diffs { display: flex; flex-direction: column; gap: 4px; }
.diff { display: flex; align-items: center; gap: 6px; font-size: 13px; flex-wrap: wrap; }
.diff code { background: var(--sunk); padding: 0 5px; border-radius: 4px; font-size: 12px; font-family: var(--mono); }
.diff-old { color: var(--text-3); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text-3) 60%, transparent); }
.diff-new { color: var(--text); font-weight: 500; }

/* ---- avatars: people are round, organisations are square tiles carrying their real mark ---------- */
.av {
  position: relative; display: inline-grid; place-items: center; border-radius: 50%; flex: none; font-weight: 500;
  overflow: hidden; line-height: 1; user-select: none; letter-spacing: 0.01em;
  background: var(--av-bg, var(--sunk)); color: var(--av-ink, var(--text-2));
}
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av.org { border-radius: 24%; box-shadow: inset 0 0 0 1px var(--av-ring, transparent); }
.av.org .logo-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 12%;
  background: #fff; opacity: 0; transition: opacity 0.45s var(--ease);
}
.av.org.has-logo { box-shadow: inset 0 0 0 1px rgba(21, 27, 23, 0.1); }
.av.org.has-logo .logo-img { opacity: 1; }
.av.org.has-logo .av-ini { opacity: 0; transition: opacity 0.3s var(--ease); }
.av-0 { --av-bg: #dfe8f3; --av-ink: #26507f; }
.av-1 { --av-bg: #f3e6d4; --av-ink: #7d4a10; }
.av-2 { --av-bg: #dcefe5; --av-ink: #1e6343; }
.av-3 { --av-bg: #ebe2f3; --av-ink: #5f3d84; }
.av-4 { --av-bg: #f4e0e2; --av-ink: #8a3237; }
.av-5 { --av-bg: #dcedf1; --av-ink: #1f5f6e; }
.av-6 { --av-bg: #e9edd8; --av-ink: #4f5d16; }
.av-7 { --av-bg: #f3e1ea; --av-ink: #873a60; }
:root[data-theme="dark"] .av-0 { --av-bg: #1f2c3b; --av-ink: #9fc0e6; }
:root[data-theme="dark"] .av-1 { --av-bg: #33281a; --av-ink: #e3b878; }
:root[data-theme="dark"] .av-2 { --av-bg: #1b3027; --av-ink: #8fd3b0; }
:root[data-theme="dark"] .av-3 { --av-bg: #2b2336; --av-ink: #c7aee6; }
:root[data-theme="dark"] .av-4 { --av-bg: #362224; --av-ink: #eba4a8; }
:root[data-theme="dark"] .av-5 { --av-bg: #1a2f34; --av-ink: #8ccbd9; }
:root[data-theme="dark"] .av-6 { --av-bg: #2a2f1b; --av-ink: #c3d07e; }
:root[data-theme="dark"] .av-7 { --av-bg: #35212c; --av-ink: #e6a6c6; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .av-0 { --av-bg: #1f2c3b; --av-ink: #9fc0e6; }
  :root:not([data-theme="light"]) .av-1 { --av-bg: #33281a; --av-ink: #e3b878; }
  :root:not([data-theme="light"]) .av-2 { --av-bg: #1b3027; --av-ink: #8fd3b0; }
  :root:not([data-theme="light"]) .av-3 { --av-bg: #2b2336; --av-ink: #c7aee6; }
  :root:not([data-theme="light"]) .av-4 { --av-bg: #362224; --av-ink: #eba4a8; }
  :root:not([data-theme="light"]) .av-5 { --av-bg: #1a2f34; --av-ink: #8ccbd9; }
  :root:not([data-theme="light"]) .av-6 { --av-bg: #2a2f1b; --av-ink: #c3d07e; }
  :root:not([data-theme="light"]) .av-7 { --av-bg: #35212c; --av-ink: #e6a6c6; }
}
.side .av { --av-bg: #2a3d33; --av-ink: #cfe7da; }

/* info tooltip icon */
.info {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--text-3);
  cursor: help; flex: none; border: 0; transition: color 0.15s var(--ease);
}
.info:hover, .info:focus-visible { color: var(--text); }

/* empty and loading */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 36px 16px 44px; color: var(--text-2); }
.empty p { margin: 0; font-size: 14.5px; color: var(--text-2); }
.loading { display: flex; align-items: center; gap: 10px; padding: 24px 4px; color: var(--text-3); font-size: 13.5px; }
.spin {
  width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--line-strong); border-top-color: var(--brand);
  animation: spin 0.9s linear infinite;
}
.feed { transition: opacity 0.2s var(--ease); display: flex; flex-direction: column; gap: 14px; }
.feed.busy { opacity: 0.5; pointer-events: none; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 4px 0; }
.pager-text { color: var(--text-3); font-size: 13px; font-variant-numeric: tabular-nums; }

/* ---- contacts, products, people -------------------------------------------------------- */
.card.contact { display: flex; flex-direction: column; gap: 12px; color: inherit; text-decoration: none; padding: 16px 18px; }
.contact-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.contact-id { min-width: 0; display: flex; flex-direction: column; gap: 1px; flex: 1; }
.contact-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-place { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); font-size: 12.5px; min-width: 0; }
.contact-place .ic { color: var(--text-3); }
.mini-set { display: flex; flex-direction: column; gap: 7px; }
.mini { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 12.5px; }
.mini-label { color: var(--text-3); }
.mini-bar { height: 4px; width: 100%; display: block; border-radius: 2px; overflow: hidden; }
.mini-bar .hbar-bg { fill: var(--track); }
.mini-val { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 12.5px; color: var(--text-2); }
.contact-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px;
  border-top: 1px solid var(--line); font-size: 12.5px; flex-wrap: wrap; color: var(--text-3);
}
.open-chip { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; font-variant-numeric: tabular-nums; }
.open-chip.pos { color: var(--text); }
.open-chip.neg { color: var(--neg-ink); }
.open-chip .ic { color: var(--text-3); }
.card.product { display: flex; flex-direction: column; gap: 10px; color: inherit; text-decoration: none; }
.prod-top { display: flex; align-items: center; justify-content: space-between; }
.prod-name { font-weight: 500; overflow-wrap: anywhere; }
.prod-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); flex-wrap: wrap; }
.prod-meta .mono { color: var(--text-2); }
.prod-price { font-size: 19px; font-weight: 500; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); }
.prod-price .cur { font-size: 11px; color: var(--text-3); margin-left: 5px; font-stretch: 115%; font-weight: 400; }
.contact-lines { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.contact-lines li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.contact-lines .ic { color: var(--text-3); }
.contact-lines span { overflow-wrap: anywhere; }
.card.person-card { display: flex; flex-direction: column; gap: 12px; }

/* ---- charts ------------------------------------------------------------------------------- */
.chart-wrap { min-width: 0; }
.chart-box { width: 100%; min-width: 0; position: relative; }
.chart-svg, .donut, .ring, .spark { display: block; overflow: visible; }
.chart-svg text.tick, .area-chart text.tick { font-size: 11px; fill: var(--text-3); font-variant-numeric: tabular-nums; }
.grid { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.base { stroke: var(--baseline); stroke-width: 1; shape-rendering: crispEdges; }
.bar { stroke: none; transition: opacity 0.2s var(--ease); }
.bars-svg:hover .bar { opacity: 0.55; }
.bars-svg:hover .bar-col:hover .bar, .bars-svg .bar:hover { opacity: 1; }
.bar.s-1 { fill: var(--s1); } .bar.s-2 { fill: var(--s2); } .bar.s-3 { fill: var(--s3); } .bar.s-4 { fill: var(--s4); }
.bar.s-5 { fill: var(--s5); } .bar.s-6 { fill: var(--s6); } .bar.s-7 { fill: var(--s7); } .bar.s-8 { fill: var(--s8); }
.area-chart { position: relative; }
.area-fill { fill-opacity: 0.1; stroke: none; }
.area-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.cross { stroke: var(--text-3); stroke-width: 1; }
.dot-hi { stroke: var(--surface); stroke-width: 2; }
.chart-tip {
  position: absolute; transform: translate(-50%, calc(-100% - 10px)); background: var(--tip-bg); color: var(--tip-ink);
  padding: 6px 9px; border-radius: 6px; font-size: 12px; white-space: nowrap; pointer-events: none; z-index: 5;
  font-variant-numeric: tabular-nums; box-shadow: var(--shadow-lift);
}
.spark { width: 100%; height: 30px; }
.spark-line { fill: none; stroke-width: 1.5; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12.5px; color: var(--text-2); }
.lg { display: inline-flex; align-items: center; gap: 7px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; flex: none; }
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: center; }
.donut .track { stroke: var(--track); }
.donut-total { font-size: 26px; font-weight: 500; fill: var(--text); letter-spacing: -0.02em; }
.donut-sub { font-size: 12px; fill: var(--text-3); }
.legend-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; font-size: 13px; min-width: 170px; flex: 1; }
.legend-list li { display: flex; align-items: center; gap: 9px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.legend-list li:last-child { border-bottom: 0; }
.lg-label { flex: 1; color: var(--text-2); min-width: 0; }
.lg-val { font-variant-numeric: tabular-nums; font-weight: 500; }
.ring .track { stroke: var(--track); }
.ring-arc.ring-brand { stroke: var(--brand); }
.ring-arc.ring-warn { stroke: var(--st-warn); }
.ring-arc.ring-bad { stroke: var(--st-bad); }
.ring-text { font-size: 16px; font-weight: 500; fill: var(--text); font-variant-numeric: tabular-nums; }
.hbars { display: flex; flex-direction: column; gap: 2px; }
.hrow { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 7px 8px; border-radius: 8px; transition: background 0.15s var(--ease); }
.hrow.click { cursor: pointer; }
.hrow.click:hover, .hrow.click:focus-visible { background: var(--surface-2); outline: none; }
.hrow-lead { display: inline-flex; }
.hrow-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hrow-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; min-width: 0; align-items: baseline; }
.hrow-label, .hrow-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.hrow-val { font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; }
.hrow-val .cur { margin-left: 5px; font-size: 11px; color: var(--text-3); font-weight: 400; font-stretch: 115%; }
.hbar { width: 100%; height: 4px; display: block; border-radius: 2px; background: var(--track); overflow: hidden; }
.hbar-bg { fill: var(--track); }
.hbar-fill {
  --c: var(--s1); display: block; height: 100%; min-width: 3px; border-radius: inherit; background: var(--c);
  transform-origin: left; animation: grow-x 0.9s var(--ease-out) both;
}
.hbar-fill.fill-2 { --c: var(--s2); }
.hbar-fill.fill-c { --c: var(--s1); }
.hbar-fill.fill-o { --c: var(--s2); }
.stack { width: 100%; height: 10px; display: block; border-radius: 3px; overflow: hidden; margin: 10px 0 12px; }
.stack .track { fill: var(--track); }
.ageing-head { display: flex; align-items: baseline; gap: 10px; }

/* fills and strokes per categorical slot and ramp */
.fill-1 { fill: var(--s1); } .fill-2 { fill: var(--s2); } .fill-3 { fill: var(--s3); } .fill-4 { fill: var(--s4); }
.fill-5 { fill: var(--s5); } .fill-6 { fill: var(--s6); } .fill-7 { fill: var(--s7); } .fill-8 { fill: var(--s8); }
.stroke-1 { stroke: var(--s1); color: var(--s1); } .stroke-2 { stroke: var(--s2); color: var(--s2); } .stroke-3 { stroke: var(--s3); color: var(--s3); } .stroke-4 { stroke: var(--s4); color: var(--s4); }
.stroke-5 { stroke: var(--s5); color: var(--s5); } .stroke-6 { stroke: var(--s6); color: var(--s6); } .stroke-7 { stroke: var(--s7); color: var(--s7); } .stroke-8 { stroke: var(--s8); color: var(--s8); }
.stroke-tone { stroke: var(--tone); }
.seg-1 { fill: var(--seq-1); } .seg-2 { fill: var(--seq-2); } .seg-3 { fill: var(--seq-3); } .seg-4 { fill: var(--seq-4); } .seg-5 { fill: var(--seq-5); }
.swatch.fill-1 { background: var(--s1); } .swatch.fill-2 { background: var(--s2); } .swatch.fill-3 { background: var(--s3); }
.swatch.fill-4 { background: var(--s4); } .swatch.fill-5 { background: var(--s5); } .swatch.fill-6 { background: var(--s6); }
.swatch.fill-7 { background: var(--s7); } .swatch.fill-8 { background: var(--s8); }
.swatch.seq-1 { background: var(--seq-1); } .swatch.seq-2 { background: var(--seq-2); } .swatch.seq-3 { background: var(--seq-3); }
.swatch.seq-4 { background: var(--seq-4); } .swatch.seq-5 { background: var(--seq-5); }

/* chart arrival: columns rise from the baseline, lines draw, segments sweep (first paint only) */
.anim .bar { transform-box: fill-box; transform-origin: 50% 100%; animation: grow-y 0.7s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 28ms); }
.anim .bar.neg { transform-origin: 50% 0; }
.anim .area-line, .anim .spark-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s var(--ease-out) 0.1s forwards; }
.anim .area-fill { animation: fade-in 0.9s var(--ease) 0.35s both; }
.anim .seg { animation: fade-in 0.5s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
.anim .ring-arc { animation: sweep 1s var(--ease-out) both; }
.segbar-part { transform-origin: left; animation: grow-x 0.8s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms); }

/* ---- dashboard -------------------------------------------------------------------------------- */
/* the ledger strip: the four figures that matter, ruled into columns like a ledger page */
.ledger {
  grid-column: 1 / -1; display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.lc {
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 20px 14px; min-width: 0;
  color: inherit; text-decoration: none; border-right: 1px solid var(--line);
  transition: background 0.2s var(--ease);
}
.lc:last-child { border-right: 0; }
a.lc:hover { background: var(--surface-2); }
.lc-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); min-width: 0; }
.lc-label > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-label .ic { color: var(--text-3); }
.lc-open { margin-left: auto; color: var(--text-3); opacity: 0; transform: translate(-3px, 3px); transition: opacity 0.2s var(--ease), transform 0.25s var(--ease-out); }
a.lc:hover .lc-open { opacity: 1; transform: none; }
.lc-value { display: flex; align-items: baseline; gap: 7px; margin-top: 4px; font-size: 27px; font-weight: 500; letter-spacing: -0.025em; line-height: 1.15; min-width: 0; }
.lc-value .num { text-align: left; overflow: hidden; text-overflow: ellipsis; }
.lc-cur { font-size: 12px; font-weight: 400; color: var(--text-3); font-stretch: 115%; letter-spacing: 0.02em; }
.lc-meta { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-3); min-height: 18px; }
.lc-meta .warn { color: var(--red-ink); }
.lc-meta .warn .ic { color: var(--red-ink); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; font-weight: 500; color: var(--text-2); }
.delta.good { color: var(--st-good); }
.delta.bad { color: var(--red-ink); }
.micro { display: block; width: 100%; height: 34px; margin-top: 8px; overflow: visible; }
.micro rect { fill: var(--track-strong); }
.micro rect.now { fill: var(--brand); }
.micro .mbase { stroke: var(--line-strong); stroke-width: 1; shape-rendering: crispEdges; }
.micro.anim rect { transform-box: fill-box; transform-origin: 50% 100%; animation: grow-y 0.6s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 22ms); }

.dash-head { margin-bottom: 16px; align-items: flex-start; }
.dh { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.dh-text { min-width: 0; }
.dh-text .card-title { font-size: 15px; }
.open-link { width: 30px; height: 30px; border-color: transparent; background: transparent; flex: none; }
.open-link:hover { border-color: var(--line); background: var(--surface-2); }
.period-btn { min-height: 32px; gap: 7px; font-size: 13px; }
.period-btn .ic { color: var(--text-3); }
.period-pop { top: calc(100% + 6px); right: 0; min-width: 170px; }
.trend-chart { margin-top: 2px; }
.trend-foot {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
}
.trend-foot .legend { margin: 0 0 4px; font-size: 13px; }
.trend-sums { display: flex; flex-wrap: wrap; gap: 14px 0; }
.trend-sum { display: flex; flex-direction: column; gap: 2px; padding: 0 0 0 22px; margin-left: 22px; border-left: 1px solid var(--line); }
.trend-sum:first-child { margin-left: 0; }
.ts-label { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-3); }
.ts-label::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--sw, var(--s1)); }
.trend-sum.sales { --sw: var(--s1); }
.trend-sum.purchases { --sw: var(--s2); }
.ts-value { display: flex; align-items: baseline; gap: 6px; }
.ts-value strong { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.ts-cur { font-size: 11.5px; color: var(--text-3); font-stretch: 115%; }
.docs-card { display: flex; flex-direction: column; }
.segbar { display: flex; width: 100%; height: 28px; gap: 2px; margin: 4px 0 6px; }
.segbar-part { height: 100%; border-radius: 3px; min-width: 2px; }
.segbar-empty { flex: 1; height: 100%; border-radius: 3px; background: var(--track); }
.seg-legend { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.seg-legend li { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; min-width: 0; }
.seg-legend .lg-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg-legend .lg-pct { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; width: 40px; text-align: right; }
.seg-total { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.seg-total strong { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; }
.seg-total span { font-size: 13px; color: var(--text-3); }
.meter-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.meter-item { display: flex; flex-direction: column; gap: 7px; color: inherit; text-decoration: none; }
.meter-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.meter-top strong { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meter-top span { color: var(--text-3); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.meter { position: relative; height: 6px; border-radius: 3px; background: var(--track); }
.meter-fill { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--brand); transform-origin: left; animation: grow-x 0.9s var(--ease-out) both; }
.meter-fill.warn { background: var(--st-warn); }
.meter-fill.bad { background: var(--st-bad); }
.meter-mark { position: absolute; top: -3px; bottom: -3px; width: 1px; background: var(--text-3); opacity: 0.55; }

/* legacy dashboard pieces still used by other pages */
.rate-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.rate-item { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rate-item:last-child { border-bottom: 0; }
.rate-item strong { font-weight: 500; text-align: left; }
.chg { display: inline-flex; align-items: center; gap: 3px; font-weight: 500; font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chg.up { color: var(--st-good); }
.chg.down { color: var(--red-ink); }
.attn { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.attn-chip {
  display: flex; align-items: center; gap: 10px; padding: 9px 2px; color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--line); font-size: 13.5px; transition: color 0.15s var(--ease);
}
.attn li:last-child .attn-chip { border-bottom: 0; }
.attn-chip .ic { color: var(--st-warn); }
.attn-chip:hover { color: var(--brand-ink); }
.attn-chip span { flex: 1; min-width: 0; }
.attn-chip strong { font-variant-numeric: tabular-nums; font-weight: 500; }
.ok-line { display: flex; align-items: center; gap: 8px; color: var(--text-2); margin: 0; font-size: 13.5px; }
.ok-line .ic { color: var(--st-good); }
.local-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.local-tile {
  display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; color: inherit; text-decoration: none;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; align-items: flex-start;
  transition: background 0.15s var(--ease);
}
.local-tile:hover { background: var(--surface-2); }
.local-tile .num { font-size: 20px; font-weight: 500; text-align: left; }
.local-tile .glyph { color: var(--ochre); }


/* ---- budgets, rates, accounting ---------------------------------------------------- */
.card.budget { display: flex; flex-direction: column; gap: 12px; }
.budget-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.budget-head h3 { margin: 0; font-size: 15px; font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.budget-body { display: flex; gap: 18px; align-items: center; }
.ring-wrap { flex: none; }
.budget-stats { margin: 0; display: grid; gap: 7px; flex: 1; min-width: 0; }
.budget-stats dt { font-size: 12px; color: var(--text-3); }
.budget-stats dd { margin: 0; font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.budget-stats .neg dd { color: var(--neg-ink); }
.kw { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.mini-list h4 { margin: 0 0 4px; font-size: 12.5px; font-weight: 500; color: var(--text-3); }
.mini-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; font-size: 13px; }
.mini-row:hover .mini-name { color: var(--brand-ink); }
.mini-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card.converter { margin-bottom: 2px; }
.convert-row { display: grid; grid-template-columns: 1.4fr 1fr auto 1fr; gap: 12px; align-items: end; }
.convert-row .swap { margin-bottom: 1px; }
.amount-in { font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; }
.convert-result { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-height: 48px; }
.convert-result p { margin: 0; }
.convert-val { font-size: 32px; font-weight: 500; letter-spacing: -0.025em; display: flex; align-items: baseline; gap: 10px; }
.card.rate-card { display: flex; flex-direction: column; gap: 10px; }
.rate-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.rate-main .big { font-size: 27px; }
.ageing-head .big { font-size: 25px; }

/* ---- reconciliation ------------------------------------------------------------------- */
.check-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.card.check {
  display: flex; flex-direction: column; gap: 6px; text-align: left; font: inherit; color: var(--text); cursor: pointer;
  border: 0; border-radius: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0;
  background: none; box-shadow: none; padding: 16px 18px; transition: background 0.18s var(--ease);
}
.card.check:hover { background: var(--surface-2); }
.card.check.open { background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand-line); }
.check-top { display: flex; align-items: center; justify-content: space-between; }
.check-top .glyph { color: var(--st-good); }
.card.check.has .check-top .glyph { color: var(--st-warn); }
.check-count { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.check-title { font-size: 13px; color: var(--text-2); line-height: 1.4; }
.check-area { display: flex; flex-direction: column; gap: 14px; }
.change-area { display: flex; flex-direction: column; gap: 12px; }
.change-area > .toolbar { justify-content: space-between; }
.change-area > .card-head { margin: 0; }

/* ---- connections ----------------------------------------------------------------------- */
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.conn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.card.conn { display: flex; flex-direction: column; gap: 14px; }
.conn-head { display: flex; align-items: center; gap: 10px; }
.conn-head h2 { margin: 0; font-size: 16px; font-weight: 500; flex: 1; min-width: 0; }
.conn-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.conn-facts dt { font-size: 12px; color: var(--text-3); }
.conn-facts dd { margin: 2px 0 0; font-weight: 500; font-size: 14px; min-width: 0; font-variant-numeric: tabular-nums; }
.conn-models { list-style: none; margin: 0; padding: 10px 0 0; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: 13px; }
.conn-models li { display: flex; justify-content: space-between; gap: 8px; color: var(--text-2); }
.card.progress { display: flex; flex-direction: column; gap: 10px; }
.progress-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.progress-list li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.history-slot .table td { font-size: 13px; }

/* ---- settings ---------------------------------------------------------------------------- */
.drop {
  display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px; border: 1px dashed var(--line-strong);
  border-radius: var(--radius); cursor: pointer; text-align: center; color: var(--text-2);
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.drop:hover, .drop:focus-visible, .drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop-text { font-size: 13px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 14px 0; }
.facts dt { font-size: 12px; color: var(--text-3); }
.facts dd { margin: 2px 0 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.stack-form { display: flex; flex-direction: column; gap: 12px; }
.pref-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.pref-row:last-child { border-bottom: 0; }
.pref-row.switch { justify-content: space-between; width: 100%; }
.pref-row.switch .track { order: 2; }

/* ---- feedback --------------------------------------------------------------------------- */
.toasts {
  position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 100;
  max-width: min(380px, calc(100vw - 32px));
}
.toast {
  display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: 9px; background: var(--surface);
  color: var(--text); border: 1px solid var(--line-strong); box-shadow: var(--shadow-pop); font-size: 13.5px;
  animation: toast-in 0.32s var(--ease-out) both;
}
.toast.out { animation: toast-out 0.25s var(--ease) both; }
.toast .ic { flex: none; margin-top: 1px; }
.toast.ok .ic { color: var(--st-good); }
.toast.bad .ic { color: var(--st-bad); }
.toast.info .ic { color: var(--text-3); }
.scrim {
  position: fixed; inset: 0; background: rgba(12, 18, 15, 0.42); display: grid; place-items: center; padding: 16px; z-index: 90;
  animation: fade-in 0.18s var(--ease) both;
}
.dialog {
  width: min(480px, 100%); background: var(--surface); color: var(--text); border-radius: 12px; border: 1px solid var(--line);
  box-shadow: var(--shadow-pop); animation: rise 0.28s var(--ease-out) both;
}
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font-size: 16px; font-weight: 500; }
.dialog-head .icon-btn { border-color: transparent; background: transparent; width: 32px; height: 32px; }
.dialog-head .icon-btn:hover { background: var(--hover); }
.dialog-body { padding: 18px 20px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 12px 12px; }

/* ---- glyphs: an icon at a size; module colour is not used as decoration ------------------------- */
.glyph { --g: 28px; display: inline-grid; place-items: center; flex: none; width: var(--g); height: var(--g); color: var(--text-3); }
.glyph .ic { color: inherit; }
.glyph.solid { color: var(--text-2); }
.glyph.ct { --g: 18px; }
.glyph.mi { --g: 20px; }
.glyph.kpi-ico { --g: 24px; }
.glyph.type-ico, .glyph.prod-ico {
  --g: 38px; border-radius: 8px; background: var(--m-soft); box-shadow: none; color: var(--m-ink); --ic-mark: var(--m);
}
.glyph.conn-ico { --g: 40px; border-radius: 9px; background: var(--m-soft); box-shadow: none; color: var(--m-ink); --ic-mark: var(--m); }
.glyph.hero-ico { --g: 48px; border-radius: 10px; background: var(--m-soft); box-shadow: none; color: var(--m-ink); --ic-mark: var(--m); }
.glyph.gs-ico { --g: 20px; }

/* currency codes: set in the figure face, never a coloured capsule */
.card.stat { position: relative; overflow: hidden; }

/* ---- empty-state figure: a drafting frame with registration marks around the subject ----------------- */
.art { display: block; overflow: visible; color: var(--text-3); }
.art-frame { fill: none; stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 2 4; }
.art-reg { fill: none; stroke: var(--text-3); stroke-width: 1; opacity: 0.7; }
.art-rule { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.art-ic { color: var(--text-2); --ic-mark: var(--brand); }
.empty .art { animation: rise 0.5s var(--ease-out) both; }

/* ---- spreadsheets ----------------------------------------------------------------------------
   A working ledger: hairline grid, figures right-aligned in ink (red when negative), data blocks set
   apart by a faint blue wash with a ruled head, one clean outline around the selection. */
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sheet-name { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 320px; }
.sheet-name > .ic { color: var(--text-3); --ic-mark: var(--m); }
.sheet-title {
  font: inherit; font-size: 20px; font-weight: 500; letter-spacing: -0.015em; color: var(--text); background: transparent;
  border: 0; border-bottom: 1px dashed transparent; border-radius: 0; padding: 2px 0; min-width: 0; width: min(440px, 100%);
  transition: border-color 0.18s var(--ease);
}
.sheet-title:hover { border-bottom-color: var(--line-strong); }
.sheet-title:focus { outline: none; border-bottom: 1px solid var(--brand); }
.sheet-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.sheet-status[data-state="saved"] .sg { color: var(--st-good); }
.sheet-status[data-state="failed"] { color: var(--bad-ink); }
.sheet-status[data-state="failed"] .sg { color: var(--st-bad); }
.sheet-status[data-state="saving"] .sg { animation: spin 1.1s linear infinite; }
.act-rule { width: 1px; height: 22px; background: var(--line-strong); margin: 0 4px; }
.icon-btn.pinned { color: var(--brand-ink); border-color: var(--brand-line); background: var(--brand-soft); }
.sheet-body { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.sheet-card-grid { padding: 0; flex: 1 1 560px; min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
.sheet-aside { flex: 0 1 270px; min-width: 230px; max-width: 100%; }
.sh-formula { display: flex; align-items: stretch; height: 40px; border-bottom: 1px solid var(--line-strong); background: var(--surface); }
.sh-name {
  flex: none; width: 96px; display: grid; place-items: center; font-family: var(--font); font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--text-2);
  border-right: 1px solid var(--line); background: var(--surface-2);
}
.sh-fx {
  flex: none; width: 38px; display: grid; place-items: center; font-family: Georgia, "DejaVu Serif", serif; font-style: italic;
  color: var(--text-3); font-size: 14px; border-right: 1px solid var(--line);
}
.sh-bar {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-family: var(--font); font-variant-numeric: tabular-nums;
  font-size: 13px; padding: 0 12px; transition: background 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.sh-bar::placeholder { color: var(--text-3); font-family: var(--font); }
.sh-bar:focus { background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--brand); }
.sh-bar[readonly] { color: var(--text-3); }
.sh-wrap {
  overflow: auto; max-height: 62vh; outline: none; position: relative; background: var(--surface);
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.sh-wrap:focus-visible { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--brand) 35%, transparent); }
.sh-grid { display: grid; position: relative; width: max-content; min-width: 100%; font-size: 13px; }
.sh-h {
  position: sticky; z-index: 2; background: var(--surface-2); color: var(--text-3); font-size: 11.5px; font-weight: 500;
  text-align: center; user-select: none; height: var(--cell-h); line-height: var(--cell-h);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; overflow: hidden;
  font-variant-numeric: tabular-nums; transition: color 0.12s var(--ease), background 0.12s var(--ease);
}
.sh-col { top: 0; }
.sh-row { left: 0; z-index: 1; }
.sh-corner { top: 0; left: 0; z-index: 4; cursor: default; }
.sh-h:hover { color: var(--text); }
.sh-h.on { color: var(--brand-ink); background: color-mix(in srgb, var(--brand) 10%, var(--surface-2)); }
.sh-col.on { box-shadow: inset 0 -2px 0 var(--brand); }
.sh-row.on { box-shadow: inset -2px 0 0 var(--brand); }
.sh-c {
  position: relative; height: var(--cell-h); line-height: var(--cell-h); padding: 0 8px; overflow: hidden; white-space: nowrap;
  text-overflow: ellipsis; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: cell;
  user-select: none; color: var(--text); background: var(--surface); font-variant-numeric: tabular-nums;
}
.sh-c.k-n { text-align: right; }
.sh-c.k-b { text-align: center; color: var(--text-2); font-size: 12px; letter-spacing: 0.02em; }
.sh-c.k-e { color: var(--bad-ink); font-family: var(--font); font-variant-numeric: tabular-nums; font-size: 12px; }
.sh-c.neg { color: var(--neg-ink); }
.sh-c.blk { background: color-mix(in srgb, var(--s1) 4%, var(--surface)); }
.sh-c.blk-h { font-weight: 500; color: var(--text-2); background: color-mix(in srgb, var(--s1) 9%, var(--surface)); border-bottom-color: color-mix(in srgb, var(--s1) 38%, var(--line)); }
.sh-c.sel { background: color-mix(in srgb, var(--brand) 9%, var(--surface)); }
.sh-c.sel::after { content: ""; position: absolute; inset: 0; pointer-events: none; border: 0 solid var(--brand); }
.sh-c.st::after { border-top-width: 1.5px; }
.sh-c.sb::after { border-bottom-width: 1.5px; }
.sh-c.sl::after { border-left-width: 1.5px; }
.sh-c.sr::after { border-right-width: 1.5px; }
.sh-c.act { background: var(--surface); box-shadow: inset 0 0 0 2px var(--brand); z-index: 1; }
.sh-c.editing { padding: 0; overflow: visible; z-index: 3; box-shadow: 0 0 0 2px var(--brand), 0 8px 20px -8px rgba(0, 0, 0, 0.3); }
.sh-c.editing::after { display: none; }
.sh-input {
  width: 100%; height: 100%; border: 0; outline: 0; padding: 0 8px; margin: 0; background: var(--surface); color: var(--text);
  font-family: var(--font); font-variant-numeric: tabular-nums; font-size: 12.5px; text-align: inherit;
}
.sh-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 12px 4px 6px;
  border-top: 1px solid var(--line); background: var(--surface-2); min-height: 40px;
}
.sh-sum { display: flex; gap: 18px; font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.sh-sum strong { color: var(--text); font-weight: 500; margin-left: 4px; }
.sh-sum strong.neg { color: var(--neg-ink); }
.blk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.blk-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.blk-item > .ic { color: var(--text-3); --ic-mark: var(--s1); }
.blk-text { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.blk-text strong { font-weight: 500; }
.blk-text > span { color: var(--text-3); font-size: 12px; }
.blk-text .mono { font-size: 11.5px; }
.blk-err { color: var(--bad-ink) !important; }
.icon-btn.blk-x { width: 28px; height: 28px; border-color: transparent; background: transparent; }
.icon-btn.blk-x:hover { border-color: var(--line); background: var(--surface-2); }
/* the list: each sheet opens with a ruled thumbnail */
.card.sheet-card { gap: 10px; padding: 0 0 12px; overflow: hidden; }
.sheet-card > :not(.sheet-thumb) { margin-left: 16px; margin-right: 16px; }
.sheet-card .contact-foot { color: var(--text-3); }
.sheet-thumb { height: 80px; padding: 8px 12px 0; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.sheet-thumb svg { display: block; }
.th-rule { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.th-head { fill: color-mix(in srgb, var(--s1) 12%, transparent); }
.th-text { fill: var(--track-strong); }
.th-num { fill: color-mix(in srgb, var(--text-3) 42%, transparent); transition: fill 0.25s var(--ease); }
a.sheet-card:hover .th-num { fill: color-mix(in srgb, var(--brand) 65%, transparent); }
.sheet-pin { color: var(--brand); display: inline-grid; }
.tpl-strip { display: flex; flex-direction: column; gap: 10px; }
.strip-title { margin: 4px 0 0; font-size: 13px; font-weight: 500; color: var(--text-3); }
.tpl-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tpl {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left; font: inherit; color: var(--text); cursor: pointer;
  background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.tpl:hover { border-style: solid; border-color: var(--brand-line); background: color-mix(in srgb, var(--brand) 4%, var(--surface)); }
.tpl-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; background: var(--m-soft); box-shadow: none; color: var(--m-ink); --ic-mark: var(--m); flex: none; }
.tpl-text { display: flex; flex-direction: column; min-width: 0; }
.tpl-text strong { font-weight: 500; font-size: 14px; }
.tpl-text span { font-size: 12.5px; color: var(--text-3); }
/* dashboards built from pinned sheets */
.board { display: flex; flex-direction: column; gap: 14px; }
.board + .board { margin-top: 10px; padding-top: 22px; border-top: 1px solid var(--line); }
.board-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.board-title { margin: 0; font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.board-meta { color: var(--text-3); font-size: 13px; }
.board-head .link-btn { margin-left: auto; }

/* ---- calendar, helpdesk, chat ------------------------------------------------------------------ */
.cal-grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.cal-head { background: var(--surface); padding: 9px 10px 8px; font-size: 12px; font-weight: 500; color: var(--text-3); text-align: left; border-bottom: 1px solid var(--line-strong); }
.cal-head.we { color: color-mix(in srgb, var(--text-3) 70%, transparent); }
.cal-cell {
  background: var(--surface); min-height: 108px; padding: 6px; display: flex; flex-direction: column; gap: 2px; min-width: 0; cursor: pointer;
  transition: background 0.15s var(--ease);
}
.cal-cell:hover { background: var(--surface-2); }
.cal-cell.out { background: var(--paper); }
.cal-cell.out .cal-num { color: var(--text-3); }
.cal-cell.we:not(.out) { background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); }
.cal-num {
  align-self: flex-start; min-width: 26px; height: 24px; padding: 0 5px; border: 0; border-radius: 5px; font: inherit; font-size: 13px;
  font-weight: 500; cursor: pointer; background: transparent; color: var(--text); font-variant-numeric: tabular-nums; text-align: left;
}
.cal-num:hover { background: var(--hover); }
.cal-cell.today { box-shadow: inset 0 2px 0 var(--brand); }
.cal-cell.today .cal-num { background: var(--brand); color: var(--on-brand); text-align: center; }
.ev-chip {
  display: flex; align-items: center; gap: 5px; width: 100%; min-width: 0; padding: 2px 6px 2px 6px; border: 0; border-left: 2px solid var(--tone);
  border-radius: 0 4px 4px 0; background: transparent; color: var(--text); font: inherit; font-size: 12px; text-align: left; cursor: pointer;
  transition: background 0.15s var(--ease);
}
.ev-chip:hover { background: color-mix(in srgb, var(--tone) 10%, var(--surface)); }
.ev-chip .ic { color: var(--tone); flex: none; }
.ev-time { flex: none; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ev-title { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-more { background: none; border: 0; padding: 1px 6px; font: inherit; font-size: 12px; color: var(--text-3); text-align: left; cursor: pointer; }
.cal-more:hover { color: var(--brand-ink); }
.agenda { display: flex; flex-direction: column; gap: 18px; }
.agenda-day { display: flex; flex-direction: column; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.agenda-day h3 { margin: 0; padding: 10px 14px; font-size: 13px; font-weight: 500; color: var(--text-2); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.agenda-day.today h3 { color: var(--brand-ink); box-shadow: inset 2px 0 0 var(--brand); }
.ev-row {
  display: grid; grid-template-columns: auto 64px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-width: 0; text-align: left;
  font: inherit; color: var(--text); background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 10px 14px; cursor: pointer;
  transition: background 0.15s var(--ease);
}
.agenda-day .ev-row:last-child { border-bottom: 0; }
.ev-row:hover { background: var(--surface-2); }
.ev-row .ic { color: var(--tone); }
.ev-row .ev-title { font-weight: 500; }
.ticket-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; cursor: pointer; transition: border-color 0.2s var(--ease), box-shadow 0.25s var(--ease); }
.ticket-card:hover, .ticket-card:focus-visible { border-color: var(--line-strong); box-shadow: var(--shadow-lift); outline: none; }
.ticket-card.late-card { border-color: color-mix(in srgb, var(--st-bad) 35%, var(--line)); }
.prio .pb { fill: var(--track-strong); }
.prio .pb.on { fill: var(--text-2); }
.prio-high .pb.on { fill: var(--st-warn); }
.prio-urgent .pb.on { fill: var(--st-bad); }
.due-mark { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.due-mark .ic { color: var(--text-3); }
.due-mark.late { color: var(--red-ink); font-weight: 500; }
.due-mark.late .ic { color: var(--red-ink); }
.chan-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--line);
  transition: background 0.15s var(--ease);
}
.chan-row:hover { background: var(--surface-2); }
.chan-row.on { background: color-mix(in srgb, var(--brand) 7%, var(--surface)); box-shadow: inset 2px 0 0 var(--brand); }
.day-sep { position: relative; align-self: stretch; display: flex; justify-content: center; margin: 12px 0 4px; }
.day-sep::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.day-sep span { position: relative; padding: 0 10px; font-size: 12px; color: var(--text-3); background: var(--surface-2); }
.rate-code { font-stretch: 115%; font-size: 15px; font-weight: 500; letter-spacing: 0.02em; color: var(--text); }

/* ---- logo: the K, its upper arm the kut sun half risen over the horizon -------------------------- */
.logo { display: block; flex: none; }
.logo .lg-tile { fill: var(--logo-tile, #0b1626); }
.logo .lg-ink { fill: var(--logo-ink, #f4f7fb); }
.logo .lg-sun { fill: var(--logo-sun, #f5b83d); }
.side .logo, .drawer-head .logo { --logo-tile: #1a2b45; }
.logo.shine .lg-sun { animation: kut-rise 1.5s var(--ease-out) 0.25s both; }
@keyframes kut-rise { from { transform: translateY(12.5px); } to { transform: none; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo { --logo-tile: #1a2b45; } }
:root[data-theme="dark"] .logo { --logo-tile: #1a2b45; }

/* ---- animations ---------------------------------------------------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(10px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes sweep { from { stroke-dashoffset: var(--len, 300); } to { stroke-dashoffset: 0; } }
@keyframes look { 0% { transform: translateX(0); } 35% { transform: translateX(-1.2px); } 70% { transform: translateX(1px); } 100% { transform: translateX(0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-delay: 0s !important; transition-duration: 0.001ms !important; }
  .anim .area-line, .anim .spark-line { stroke-dashoffset: 0; stroke-dasharray: none; }
}

/* ---- responsive ------------------------------------------------------------------------------ */
@media (max-width: 1240px) {
  .ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger .lc:nth-child(2n) { border-right: 0; }
  .ledger .lc:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 1100px) {
  .shell { grid-template-columns: 68px minmax(0, 1fr); }
  .side { padding: 14px 10px; align-items: stretch; }
  .brand { justify-content: center; padding: 0 0 12px; }
  .brand-name, .nav-title, .user-text, .user-chev, .lbl { display: none; }
  .nav-group { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--spine-line); }
  .nav-link { justify-content: center; padding: 0; height: 38px; }
  .nav-ind { left: -10px; }
  .badge-slot, .nav-count { position: absolute; top: 3px; right: 5px; margin: 0; font-size: 10.5px; }
  .user-btn { justify-content: center; padding: 6px; }
  .user-menu { width: 280px; }
  .gsearch { width: 220px; }
  .top { padding: 16px 24px 12px; }
  .top::after { left: 24px; right: 24px; }
  .content { padding: 8px 24px 48px; }
  .conn-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .top { flex-wrap: wrap; }
  .top-actions { flex: 1 1 auto; justify-content: flex-end; }
  .gsearch { flex: 1 1 0; width: auto; min-width: 0; max-width: 420px; }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-grid > .span-2 { grid-column: auto; }
  .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage:nth-child(2n) { border-right: 0; }
  .stage:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .settings-grid, .two-up { grid-template-columns: minmax(0, 1fr); }
  .convert-row { grid-template-columns: 1fr 1fr; }
  .seg-legend { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  body { font-size: 14px; }
  .shell { grid-template-columns: minmax(0, 1fr); padding-bottom: 0; }
  .side { display: none; }
  .top { padding: 12px 16px 10px; gap: 10px; }
  .top::after { left: 16px; right: 16px; }
  .top-title { font-size: 22px; }
  .top-sub { font-size: 12.5px; }
  .top-actions { width: 100%; gap: 8px; justify-content: flex-start; }
  .gsearch { max-width: none; height: 38px; }
  .gs-kbd { display: none; }
  .gs-pop { width: calc(100vw - 32px); }
  .icon-btn { width: 36px; height: 36px; }
  .content { padding: 10px 16px 104px; }
  .ledger { grid-template-columns: minmax(0, 1fr); }
  .ledger .lc { border-right: 0; border-bottom: 1px solid var(--line); }
  .ledger .lc:last-child { border-bottom: 0; }
  .lc-value { font-size: 24px; }
  .trend-sum { padding-left: 14px; margin-left: 14px; }
  .kpi-value { font-size: 22px; }
  .search { min-width: 0; flex-basis: 100%; max-width: none; }
  .toolbar { gap: 8px; }
  .seg { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .seg-btn { padding: 0 8px; }
  .bnav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; gap: 2px; overflow-x: auto; scrollbar-width: none;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: var(--spine); border-top: 1px solid var(--spine-line);
  }
  .bnav-link {
    position: relative; flex: 0 0 48px; height: 44px; display: grid; place-items: center; color: var(--spine-icon); border-radius: 8px; text-decoration: none;
    --ic-mark: var(--spine-icon);
  }
  .bnav-link[aria-current="page"] { color: #fff; background: color-mix(in srgb, var(--m-spine) 16%, transparent); --ic-mark: var(--m-spine); }
  .bnav-link[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; top: 0; height: 2px; border-radius: 0 0 2px 2px; background: var(--m-spine); }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid, .card-grid.budgets, .card-grid.rates, .card-grid.products, .card-grid.people { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 14px 16px; }
  .conn-facts { grid-template-columns: minmax(0, 1fr); }
  .convert-row { grid-template-columns: minmax(0, 1fr); }
  .budget-body { flex-direction: column; align-items: stretch; }
  .user-menu { width: auto; }
}
@media (max-width: 360px) {
  .top-actions .btn span { display: none; }
}

/* ---- breadcrumbs, labelled filters, folding ------------------------------------------------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; font-size: 13px; line-height: 1.3; margin: 0 0 3px; min-width: 0; }
.crumb { color: var(--text-3); text-decoration: none; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.crumb:hover { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 2px; }
.crumb::after { content: "\203A"; display: inline-block; margin: 0 7px; color: var(--text-3); text-decoration: none; }
.seg.labelled { align-items: center; }
.seg-label { font-size: 12px; color: var(--text-3); padding: 0 6px 0 8px; white-space: nowrap; }
.seg[data-set] .seg-label { color: var(--m-ink); }
.flt-btn .ic:last-child { color: var(--text-3); margin-left: -2px; }
.flt-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--m); color: var(--on-brand); font-size: 11.5px; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.flt-pop { top: calc(100% + 6px); left: 0; width: max-content; max-width: min(92vw, 560px); padding: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; transform-origin: top left; }
.flt-pop .seg { max-width: 100%; }
.flt-pop .seg-slot { display: contents; }
.flt-pop .pop-wrap > .btn { border-color: var(--line-strong); }
.fold { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.fold-head {
  display: flex; align-items: center; gap: 9px; padding: 11px 16px; cursor: pointer; list-style: none; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; color: var(--text); user-select: none;
}
.fold-head::-webkit-details-marker { display: none; }
.fold-head:hover { background: var(--hover); }
.fold-head > .ic { color: var(--text-3); }
.fold-meta { color: var(--text-3); font-size: 12.5px; font-weight: 400; font-stretch: 115%; }
.fold-chev { display: inline-flex; margin-left: auto; color: var(--text-3); transition: transform 0.2s var(--ease); }
.fold[open] > .fold-head .fold-chev, .nav-fold.open .fold-chev, .fold-toggle[aria-expanded="true"] .ic { transform: rotate(180deg); }
.fold-body { padding: 0 12px 12px; }
.fold-body > .stat-row { border-color: var(--line); }
.card.foldable > .card-head { margin-bottom: 14px; }
.card.foldable.folded > .card-head { margin-bottom: 0; }
.card.foldable.folded > :not(.card-head) { display: none !important; }
.fold-click { cursor: pointer; user-select: none; }
.icon-btn.fold-toggle { width: 30px; height: 30px; border-color: transparent; background: transparent; margin-left: 2px; flex: none; }
.icon-btn.fold-toggle .ic { transition: transform 0.2s var(--ease); }
.icon-btn.fold-toggle:hover { background: var(--hover); }
.pop-sep { height: 1px; margin: 5px 6px; background: var(--line); }
.pop-row.pop-wide { flex-wrap: wrap; }
.pop-row.pop-wide .seg { width: 100%; }
.pop-row.pop-wide .seg-btn { flex: 1 1 0; justify-content: center; padding: 0 6px; }

/* ---- shortcuts: personal buttons under the page title ------------------------------------------ */
.shortcut-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 0 32px 10px; min-width: 0; }
.shortcut-bar[hidden] { display: none; }
.sc-list { display: contents; }
.sc {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px 0 9px; max-width: 240px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); text-decoration: none; font-size: 13px;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.sc .ic { color: var(--text-3); }
.sc:hover { border-color: var(--brand-line); }
.sc[aria-current="page"] { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-ink); }
.sc[aria-current="page"] .ic { color: inherit; --ic-mark: var(--brand); }
.sc-lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-add {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px; border-radius: var(--radius-sm);
  border: 1px dashed var(--line-strong); background: transparent; color: var(--text-3); font: inherit; font-size: 13px; cursor: pointer;
}
.sc-add:hover { color: var(--text); border-style: solid; background: var(--surface); }
.sc-pop { top: calc(100% + 6px); right: 0; width: 280px; }
.sc-pop .pop-item .ic { flex: none; }
.sc-icons { display: grid; grid-template-columns: repeat(auto-fill, 34px); gap: 6px; }
.sc-ico {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
}
.sc-ico:hover { border-color: var(--line-strong); color: var(--text); }
.sc-ico[aria-checked="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); --ic-mark: var(--brand); }
.sc-manage { display: flex; flex-direction: column; gap: 14px; }
.dialog .sc-manage { max-height: min(60vh, 480px); overflow: auto; }
.sc-group-title { margin: 0 0 6px; font-size: 12.5px; font-weight: 500; color: var(--text-3); }
.sc-rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.sc-row { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 12px; border-top: 1px solid var(--line); min-width: 0; }
.sc-row:first-child { border-top: 0; }
.sc-row > .ic { color: var(--text-3); }
.sc-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.sc-row-text strong { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-row-text span { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-row-text:hover strong { color: var(--brand-ink); }
.icon-btn.sm { width: 30px; height: 30px; border-color: transparent; background: transparent; }
.icon-btn.sm:hover:not(:disabled) { background: var(--hover); }
.icon-btn.sm:disabled { opacity: 0.3; }
.sc-del.armed { color: var(--bad-ink); background: var(--bad-bg); }

/* ---- phones: a menu drawer and labelled bottom places ------------------------------------------- */
.drawer { position: fixed; inset: 0; z-index: 95; background: rgba(7, 14, 25, 0.5); animation: fade-in 0.18s var(--ease) both; }
.drawer-panel {
  position: absolute; left: 0; top: 0; bottom: 0; width: min(320px, 86vw); overflow-y: auto; display: flex; flex-direction: column; gap: 4px;
  padding: 14px 12px calc(14px + env(safe-area-inset-bottom)); background: var(--spine); color: var(--spine-ink); --ic-mark: var(--spine-icon);
  animation: slide-in 0.24s var(--ease-out) both;
}
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 2px 4px 10px; }
.drawer-head strong { flex: 1; font-size: 17px; font-weight: 640; font-stretch: 118%; color: var(--frame-ink); }
.drawer-head .icon-btn { background: transparent; border-color: var(--spine-line); color: var(--spine-ink); }
.drawer .nav-link { font: inherit; font-size: 14px; background: none; border: 0; width: 100%; text-align: left; cursor: pointer; }
.drawer .nav-link[aria-current="page"] { color: #fff; background: color-mix(in srgb, var(--m-spine) 16%, transparent); }
.drawer .side-foot { margin-top: auto; }
@keyframes slide-in { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 700px) {
  .shortcut-bar { padding: 0 16px 10px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .sc, .sc-add { flex: none; }
  .bnav { gap: 0; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); overflow: visible; }
  .bnav-link {
    flex: 1 1 0; height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0;
    border: 0; background: none; font: inherit; cursor: pointer;
  }
  .bnav-link span { font-size: 10.5px; max-width: 100%; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bnav-menu[aria-expanded="true"] { color: #fff; }
}
@media (max-width: 1100px) and (min-width: 701px) { .shortcut-bar { padding: 0 24px 10px; } }

/* ---- minimal layout: groups, filters and secondary panels fold away ---------------------------- */
.nav-toggle {
  display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: none; font: inherit; font-size: 11.5px; font-weight: 500;
  color: var(--spine-muted); cursor: pointer; border-radius: 6px; text-align: left;
}
.nav-toggle:hover { color: var(--spine-ink); background: rgba(214, 228, 248, 0.05); }
.nav-toggle .fold-chev { color: inherit; }
.nav-fold:not(.open) > .nav-link { display: none; }
.nav-fold.open > .nav-link { animation: rise 0.22s var(--ease-out) both; }
:root[data-layout="minimal"] .top-sub { display: none; }
:root[data-layout="minimal"] .top-title { font-size: 21px; }
:root[data-layout="minimal"] .card { border-color: transparent; box-shadow: none; }
:root[data-layout="minimal"] .page { gap: 12px; }
:root[data-layout="minimal"] .new-btn { width: 38px; padding: 0; }
:root[data-layout="minimal"] .new-btn span { display: none; }
:root[data-layout="minimal"] .top-actions .gsearch, .onav .gsearch {
  width: 38px; padding: 0 9px; cursor: text; transition: width 0.22s var(--ease-out), border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
:root[data-layout="minimal"] .top-actions .gsearch:focus-within { width: min(320px, 52vw); }
:root[data-layout="minimal"] .gs-kbd { display: none; }
:root[data-layout="minimal"] .fold { border-color: transparent; }
@media (max-width: 1100px) {
  .nav-fold > .nav-link { display: flex !important; }
  .nav-toggle { display: none; }
}
@media (max-width: 700px) {
  :root[data-layout="minimal"] .top-actions .gsearch:focus-within { width: 100%; }
}

/* ---- module index tabs and stamp inks ------------------------------------------------------------
   Each module has one hue (--mod-*). The open page takes the hue of the module whose spine link is
   current and carries it as --m: the index tab, the title tab, card icons, filters and figures.
   Standard and Minimal only; the Odoo layout sets its own colours below. */
:root:not([data-layout="odoo"]) .shell:has(.nav-link[aria-current="page"][href="#/calendar"], .nav-link[aria-current="page"][href="#/helpdesk"], .nav-link[aria-current="page"][href="#/chat"], .nav-link[aria-current="page"][href="#/history"], .nav-link[aria-current="page"][href="#/outbox"]) {
  --m: var(--mod-work); --m-soft: var(--mod-work-soft); --m-ink: var(--mod-work-ink); --m-spine: var(--mod-work-spine);
}
:root:not([data-layout="odoo"]) .shell:has(.nav-link[aria-current="page"][href="#/sales"], .nav-link[aria-current="page"][href="#/invoices"], .nav-link[aria-current="page"][href="#/customers"], .nav-link[aria-current="page"][href="#/products"]) {
  --m: var(--mod-sales); --m-soft: var(--mod-sales-soft); --m-ink: var(--mod-sales-ink); --m-spine: var(--mod-sales-spine);
}
:root:not([data-layout="odoo"]) .shell:has(.nav-link[aria-current="page"][href="#/bills"], .nav-link[aria-current="page"][href="#/suppliers"]) {
  --m: var(--mod-purch); --m-soft: var(--mod-purch-soft); --m-ink: var(--mod-purch-ink); --m-spine: var(--mod-purch-spine);
}
:root:not([data-layout="odoo"]) .shell:has(.nav-link[aria-current="page"][href="#/accounting"], .nav-link[aria-current="page"][href="#/ledger"], .nav-link[aria-current="page"][href="#/budgets"], .nav-link[aria-current="page"][href="#/rates"], .nav-link[aria-current="page"][href="#/einvoices"], .nav-link[aria-current="page"][href="#/reconciliation"]) {
  --m: var(--mod-fin); --m-soft: var(--mod-fin-soft); --m-ink: var(--mod-fin-ink); --m-spine: var(--mod-fin-spine);
}
:root:not([data-layout="odoo"]) .shell:has(.nav-link[aria-current="page"][href="#/expenses"], .nav-link[aria-current="page"][href="#/people"], .nav-link[aria-current="page"][href="#/org"], .nav-link[aria-current="page"][href="#/timeoff"], .nav-link[aria-current="page"][href="#/timesheets"], .nav-link[aria-current="page"][href="#/personnel"]) {
  --m: var(--mod-team); --m-soft: var(--mod-team-soft); --m-ink: var(--mod-team-ink); --m-spine: var(--mod-team-spine);
}
:root:not([data-layout="odoo"]) .shell:has(.nav-link[aria-current="page"][href="#/dashboards"], .nav-link[aria-current="page"][href="#/sheets"], .nav-link[aria-current="page"][href="#/explore"], .nav-link[aria-current="page"][href="#/import"]) {
  --m: var(--mod-insight); --m-soft: var(--mod-insight-soft); --m-ink: var(--mod-insight-ink); --m-spine: var(--mod-insight-spine);
}
:root:not([data-layout="odoo"]) .shell:has(.nav-link[aria-current="page"][href="#/connections"], .nav-link[aria-current="page"][href="#/settings"]) {
  --m: var(--mod-settings); --m-soft: var(--mod-settings-soft); --m-ink: var(--mod-settings-ink); --m-spine: var(--mod-settings-spine);
}
.nav-link[href="#/calendar"] > .ic, .nav-link[href="#/helpdesk"] > .ic, .nav-link[href="#/chat"] > .ic, .nav-link[href="#/history"] > .ic, .nav-link[href="#/outbox"] > .ic { color: var(--mod-work-spine); --ic-mark: var(--mod-work-spine); }
.nav-link[href="#/sales"] > .ic, .nav-link[href="#/invoices"] > .ic, .nav-link[href="#/customers"] > .ic, .nav-link[href="#/products"] > .ic { color: var(--mod-sales-spine); --ic-mark: var(--mod-sales-spine); }
.nav-link[href="#/bills"] > .ic, .nav-link[href="#/suppliers"] > .ic { color: var(--mod-purch-spine); --ic-mark: var(--mod-purch-spine); }
.nav-link[href="#/accounting"] > .ic, .nav-link[href="#/ledger"] > .ic, .nav-link[href="#/budgets"] > .ic, .nav-link[href="#/rates"] > .ic, .nav-link[href="#/einvoices"] > .ic, .nav-link[href="#/reconciliation"] > .ic { color: var(--mod-fin-spine); --ic-mark: var(--mod-fin-spine); }
.nav-link[href="#/expenses"] > .ic, .nav-link[href="#/people"] > .ic, .nav-link[href="#/org"] > .ic, .nav-link[href="#/timeoff"] > .ic, .nav-link[href="#/timesheets"] > .ic, .nav-link[href="#/personnel"] > .ic { color: var(--mod-team-spine); --ic-mark: var(--mod-team-spine); }
.nav-link[href="#/dashboards"] > .ic, .nav-link[href="#/sheets"] > .ic, .nav-link[href="#/explore"] > .ic, .nav-link[href="#/import"] > .ic { color: var(--mod-insight-spine); --ic-mark: var(--mod-insight-spine); }
.nav-link[href="#/connections"] > .ic, .nav-link[href="#/settings"] > .ic { color: var(--mod-settings-spine); --ic-mark: var(--mod-settings-spine); }
.nav-group:has(> .nav-link[href="#/calendar"]) > .nav-title::before { background: var(--mod-work-spine); }
.nav-group:has(> .nav-link[href="#/sales"]) > .nav-title::before { background: var(--mod-sales-spine); }
.nav-group:has(> .nav-link[href="#/bills"]) > .nav-title::before { background: var(--mod-purch-spine); }
.nav-group:has(> .nav-link[href="#/accounting"]) > .nav-title::before { background: var(--mod-fin-spine); }
.nav-group:has(> .nav-link[href="#/expenses"]) > .nav-title::before { background: var(--mod-team-spine); }
.nav-group:has(> .nav-link[href="#/dashboards"]) > .nav-title::before { background: var(--mod-insight-spine); }
.apps-home .app-tile[href="#/calendar"] .app-ico { background: var(--mod-work-soft); color: var(--mod-work-ink); --ic-mark: var(--mod-work); }
.apps-home .app-tile[href="#/sales"] .app-ico { background: var(--mod-sales-soft); color: var(--mod-sales-ink); --ic-mark: var(--mod-sales); }
.apps-home .app-tile[href="#/bills"] .app-ico { background: var(--mod-purch-soft); color: var(--mod-purch-ink); --ic-mark: var(--mod-purch); }
.apps-home .app-tile[href="#/accounting"] .app-ico { background: var(--mod-fin-soft); color: var(--mod-fin-ink); --ic-mark: var(--mod-fin); }
.apps-home .app-tile[href="#/expenses"] .app-ico { background: var(--mod-team-soft); color: var(--mod-team-ink); --ic-mark: var(--mod-team); }
.apps-home .app-tile[href="#/dashboards"] .app-ico { background: var(--mod-insight-soft); color: var(--mod-insight-ink); --ic-mark: var(--mod-insight); }
.apps-home .app-tile[href="#/connections"] .app-ico, .apps-home .app-tile[href="#/settings"] .app-ico { background: var(--mod-settings-soft); color: var(--mod-settings-ink); --ic-mark: var(--mod-settings); }

.side ~ .main .top-title::before {
  content: ""; display: inline-block; width: 0.64em; height: 0.32em; margin-right: 0.42em; border-radius: 0.32em 0.32em 0 0;
  background: var(--m); vertical-align: 0.06em;
}
.nav-title::before {
  content: ""; display: inline-block; width: 10px; height: 5px; margin-right: 8px; border-radius: 5px 5px 0 0;
  background: var(--spine-muted); vertical-align: 1px;
}
.side :focus-visible, .drawer :focus-visible, .bnav :focus-visible { outline-color: var(--spine-hi); }
/* states: the words carry the stamp ink of their glyph */
.status.st-ok { color: var(--st-good); }
.status.st-warn { color: var(--st-warn); }
.status.st-bad { color: var(--st-bad); }
.status.st-info { color: var(--st-info); }
.status.st-muted { color: var(--st-muted); }
/* card heads: a tile in the page's module colour */
.card-title .glyph.ct { --g: 26px; border-radius: 7px; background: var(--m-soft); color: var(--m-ink); --ic-mark: var(--m); }
.card.kpi .kpi-label .ic { color: var(--m); }
/* dashboard ledger: sales and purchases carry their module colours in the icon and the current month's bar */
.lc[href="#/invoices"] .lc-label .ic { color: var(--mod-sales); }
.lc[href="#/invoices"] .micro rect.now { fill: var(--mod-sales); }
.lc[href="#/bills"] .lc-label .ic { color: var(--mod-purch); }
.lc[href="#/bills"] .micro rect.now { fill: var(--mod-purch); }
/* table rows and filters take the page's colour, lightly */
.table tr.click:hover td, .table tr.click:focus-visible td { background: color-mix(in srgb, var(--m) 7%, var(--surface)); }
.chip-btn:hover { border-bottom-color: var(--m-spine); }
/* apps page: one tile per app, the off ones dimmed and still */
.apps-home { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 12px; }
.apps-home .app-tile {
  display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 12px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none;
  font-size: 14px; font-weight: 500; text-align: center; transition: border-color 0.18s var(--ease), box-shadow 0.22s var(--ease);
}
.apps-home .app-tile:hover, .apps-home .app-tile:focus-visible { border-color: var(--line-strong); box-shadow: var(--shadow-lift); }
.apps-home .app-tile .app-ico {
  width: 56px; height: 56px; border: 0; border-radius: 14px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-ink); --ic-mark: var(--brand);
}
.apps-home .app-tile:hover .app-ico, .apps-home .app-tile:focus-visible .app-ico { border: 0; color: inherit; }
.apps-home .app-tile.off { cursor: default; opacity: 0.5; filter: grayscale(1); }
.apps-home .app-tile.off:hover { border-color: var(--line); box-shadow: none; }
.apps-home .app-tile.off .app-ico { background: var(--sunk); color: var(--text-3); --ic-mark: var(--text-3); }

/* ---- Odoo-like layout: an app switcher and the open app's menus across the top ------------------ */
:root[data-layout="odoo"] {
  --bg: #f4f5f7; --paper: #f8f9fa; --surface: #ffffff; --surface-2: #f8f9fa; --sunk: #eef0f3;
  --hover: rgba(33, 37, 41, 0.05); --press: rgba(33, 37, 41, 0.09);
  --line: #e2e5e9; --line-strong: #cfd4da; --rule: #dee2e6;
  --text: #212529; --text-2: #4a5059; --text-3: #6c737c; --ink: #212529;
  --brand: #714b67; --brand-ink: #5d3d55; --brand-hi: #84597a; --brand-soft: #f3ecf1; --brand-line: #c8a9bf; --on-brand: #ffffff;
  --link: #017e84; --radius: 5px; --radius-sm: 4px;
}
:root[data-layout="odoo"][data-theme="dark"] {
  --bg: #1b1d22; --paper: #202228; --surface: #24262d; --surface-2: #202228; --sunk: #1a1c21;
  --hover: rgba(230, 232, 236, 0.055); --press: rgba(230, 232, 236, 0.09);
  --line: #33363f; --line-strong: #444852; --rule: #3a3e47;
  --text: #e6e8ec; --text-2: #b3b8c1; --text-3: #8f959f; --ink: #e6e8ec;
  --brand: #b98aae; --brand-ink: #cfa3c4; --brand-hi: #c799bb; --brand-soft: rgba(185, 138, 174, 0.14); --brand-line: rgba(185, 138, 174, 0.45);
  --on-brand: #1b1d22; --link: #4fb8bd;
}
@media (prefers-color-scheme: dark) {
  :root[data-layout="odoo"]:not([data-theme="light"]) {
    --bg: #1b1d22; --paper: #202228; --surface: #24262d; --surface-2: #202228; --sunk: #1a1c21;
    --hover: rgba(230, 232, 236, 0.055); --press: rgba(230, 232, 236, 0.09);
    --line: #33363f; --line-strong: #444852; --rule: #3a3e47;
    --text: #e6e8ec; --text-2: #b3b8c1; --text-3: #8f959f; --ink: #e6e8ec;
    --brand: #b98aae; --brand-ink: #cfa3c4; --brand-hi: #c799bb; --brand-soft: rgba(185, 138, 174, 0.14); --brand-line: rgba(185, 138, 174, 0.45);
    --on-brand: #1b1d22; --link: #4fb8bd;
  }
}
:root[data-layout="odoo"] .shell { display: flex; flex-direction: column; }
.onav {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 4px; height: 48px; padding: 0 12px 0 6px;
  background: var(--surface); border-bottom: 1px solid var(--line); color: var(--text);
}
.onav-apps {
  display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: var(--radius-sm); background: none;
  color: var(--text-2); cursor: pointer;
}
.onav-apps:hover, .onav-apps[aria-expanded="true"] { background: var(--hover); color: var(--text); }
.onav-app { font-size: 16px; font-weight: 500; color: var(--text); text-decoration: none; padding: 0 12px 0 6px; white-space: nowrap; }
.onav-menu { display: flex; align-items: stretch; height: 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.onav-menu::-webkit-scrollbar { display: none; }
.onav-link {
  display: flex; align-items: center; gap: 6px; padding: 0 12px; font-size: 14px; color: var(--text-2); text-decoration: none; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.onav-link:hover { color: var(--text); background: var(--hover); }
.onav-link[aria-current="page"] { color: var(--text); border-bottom-color: var(--brand); }
.onav-link .badge-count { color: var(--brand-ink); }
.onav-right { display: flex; align-items: center; gap: 4px; margin-left: auto; flex: none; }
.onav-right > .icon-btn, .onav-right > .pop-wrap > .icon-btn { border-color: transparent; background: transparent; }
.onav-right > .icon-btn:hover, .onav-right > .pop-wrap > .icon-btn:hover { background: var(--hover); }
.onav .gsearch:focus-within { width: min(320px, 40vw); }
.onav .gs-kbd { display: none; }
.onav .user { margin: 0; }
.onav .user-btn { padding: 3px; border: 0; background: none; color: var(--text); }
.onav .user-btn:hover { background: var(--hover); }
.onav .user-text, .onav .user-chev { display: none; }
.onav .user .pop { top: calc(100% + 6px); bottom: auto; left: auto; right: 0; transform-origin: top right; }
.apps-pop {
  top: calc(100% + 6px); left: 0; width: min(560px, calc(100vw - 24px)); padding: 12px; transform-origin: top left;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 4px;
}
.app-tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px 12px; border-radius: var(--radius);
  color: var(--text); text-decoration: none; font-size: 13px; text-align: center;
}
.app-tile:hover { background: var(--hover); }
.app-tile .app-ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: var(--sunk); color: var(--text-2); border: 1px solid var(--line); }
.app-tile:hover .app-ico, .app-tile[aria-current="page"] .app-ico { color: var(--brand-ink); border-color: var(--brand-line); --ic-mark: var(--brand); }
:root[data-layout="odoo"] .top {
  top: 48px; padding: 10px 24px; background: var(--surface); border-bottom: 1px solid var(--line); min-height: 56px; z-index: 30;
}
:root[data-layout="odoo"] .top::after { display: none; }
:root[data-layout="odoo"] .top.stuck { background: var(--surface); }
:root[data-layout="odoo"] .top-head { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 0; }
:root[data-layout="odoo"] .crumbs { display: contents; font-size: 18px; }
:root[data-layout="odoo"] .crumb { color: var(--link); font-size: 18px; max-width: 280px; }
:root[data-layout="odoo"] .crumb::after { content: "/"; margin: 0 8px; color: var(--text-3); }
:root[data-layout="odoo"] .top-title { font-size: 18px; font-weight: 500; letter-spacing: 0; }
:root[data-layout="odoo"] .top-sub { display: none; }
:root[data-layout="odoo"] .shortcut-bar { padding: 8px 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
:root[data-layout="odoo"] .content { padding: 16px 24px 48px; max-width: none; }
:root[data-layout="odoo"] .page { gap: 12px; }
:root[data-layout="odoo"] .page > * { animation: none; }
:root[data-layout="odoo"] .page-head > .btn.primary { order: -1; margin-left: 0; }
:root[data-layout="odoo"] .btn { min-height: 32px; padding: 0 12px; }
:root[data-layout="odoo"] .card { padding: 14px 16px; box-shadow: none; }
:root[data-layout="odoo"] .table { font-size: 13.5px; }
:root[data-layout="odoo"] .table th { padding: 8px 12px; color: var(--text); font-weight: 500; background: var(--surface-2); }
:root[data-layout="odoo"] .table td { padding: 6px 12px; }
:root[data-layout="odoo"] .table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); }
:root[data-layout="odoo"] .table tr.click:hover td { background: var(--sunk); }
:root[data-layout="odoo"] .toolbar.folded { gap: 0; flex: 0 1 560px; }
:root[data-layout="odoo"] .toolbar.folded > .search { max-width: none; flex: 1 1 auto; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
:root[data-layout="odoo"] .toolbar.folded > .flt > .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-left: -1px; min-height: 34px; }
:root[data-layout="odoo"] .toolbar.folded > .keep { margin-left: 8px; }
:root[data-layout="odoo"] .bnav { background: var(--surface); border-top-color: var(--line); }
:root[data-layout="odoo"] .bnav-link { color: var(--text-3); --ic-mark: var(--text-3); }
:root[data-layout="odoo"] .bnav-link[aria-current="page"] { color: var(--brand-ink); background: var(--brand-soft); --ic-mark: var(--brand); }
:root[data-layout="odoo"] .bnav-link[aria-current="page"]::after { background: var(--brand); }
@media (max-width: 900px) {
  .onav { padding: 0 8px 0 4px; }
  .onav-app { padding: 0 6px; }
  :root[data-layout="odoo"] .top, :root[data-layout="odoo"] .shortcut-bar { padding-left: 16px; padding-right: 16px; }
  :root[data-layout="odoo"] .content { padding: 12px 16px 104px; }
}
@media (max-width: 700px) {
  .onav-menu { display: none; }
  .onav .gsearch:focus-within { width: calc(100vw - 150px); }
  :root[data-layout="odoo"] .top-actions { width: auto; }
}
:root[data-layout="odoo"] .flt-pop { left: auto; right: 0; transform-origin: top right; }
:root[data-layout="odoo"] .main:has(.page-head > .btn.primary) .top-actions > .pop-wrap:has(.new-btn) { display: none; }
.card.foldable > .card-head { justify-content: flex-start; }
.card.foldable > .card-head > :first-child { margin-right: auto; }
/* menus opened from a page head stay above the blocks that follow it */
.page-head { position: relative; z-index: 5; }
/* the drawer always shows names, even where the side rail shows icons only */
.drawer .nav-group { margin-top: 10px; padding-top: 0; border-top: 0; }
.drawer .nav-title, .drawer .lbl { display: block; }
.drawer .nav-link { justify-content: flex-start; padding: 0 10px 0 12px; height: 40px; }
.drawer .badge-slot, .drawer .nav-count { position: static; margin-left: auto; font-size: 12px; }
.docno-txt.draft { color: var(--text-3); font-weight: 400; }
.more-pop { top: calc(100% + 6px); right: 0; min-width: 200px; display: flex; flex-direction: column; gap: 2px; transform-origin: top right; }
.more-pop .btn { width: 100%; justify-content: flex-start; border-color: transparent; background: none; font-weight: 400; }
.more-pop .btn:hover { background: var(--hover); }
.more-pop > .pop-wrap { display: block; }
/* a page block holding an open menu is lifted above the blocks around it */
.page > *:has(.pop:not([hidden])), .page > * > *:has(.pop:not([hidden])) { position: relative; z-index: 6; }

/* ---- time off and timesheets ---------------------------------------------------------------------- */
.acts { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.table td.row-acts { text-align: right; white-space: nowrap; }
.hr-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.hr-inline .input { width: auto; flex: 1 1 160px; min-width: 0; }
.hr-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.hr-holidays { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.hr-holidays li { display: flex; align-items: center; gap: 12px; padding: 7px 8px 7px 12px; border-top: 1px solid var(--line); font-size: 14px; }
.hr-holidays li:first-child { border-top: 0; }
.ts-grid th[scope="row"] { font-weight: 400; white-space: nowrap; }
.ts-grid th.today { color: var(--brand-ink); }
.ts-grid td { padding: 4px 6px; }
.ts-cell { width: 64px; min-height: 30px; padding: 0 6px; text-align: right; font-variant-numeric: tabular-nums; }
.ts-grid td.locked .ts-cell { background: var(--sunk); color: var(--text-3); }
.ts-grid tfoot td, .ts-grid tfoot th { border-top: 1px solid var(--line-strong); padding: 8px 12px; font-weight: 500; }
.ts-week .seg-btn { min-height: 30px; }

/* ---- e-invoice simulation and the way back to Odoo -------------------------------------------------- */
.sim-banner { display: flex; align-items: flex-start; gap: 9px; margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13.5px; line-height: 1.45;
  background: var(--ok-bg); color: var(--ok-ink); }
.sim-banner .ic { flex: none; margin-top: 1px; }
.sim-banner.is-info { background: var(--info-bg); color: var(--info-ink); }
.sim-banner.is-bad { background: var(--warn-bg); color: var(--warn-ink); }
.sim-checks, .sim-steps { margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.sim-checks { list-style: none; }
.sim-checks li { display: flex; align-items: flex-start; gap: 8px; }
.sim-checks li .ic { flex: none; margin-top: 2px; }
.sim-checks li.ok .ic { color: var(--st-good); }
.sim-checks li.bad { color: var(--bad-ink); }
.sim-checks li.skip { color: var(--text-3); }
.sim-steps { padding-left: 20px; }
.sim-sub { margin: 4px 0 6px; font-size: 12.5px; font-weight: 500; color: var(--text-3); }
.sim-request { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sim-request h3 { width: 100%; }
.sim-xml { max-height: 260px; overflow: auto; margin: 0; padding: 10px 12px; background: var(--sunk); border-radius: var(--radius-sm); font-size: 11.5px; white-space: pre; }
.dialog:has(.sim) { width: min(640px, 100%); }
.dialog .dialog-body:has(.sim), .dialog .dialog-body:has(.sim-banner) { max-height: min(70vh, 680px); overflow: auto; }
.odoo-warn { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--warn-ink); }
.odoo-warn li { display: flex; gap: 6px; align-items: flex-start; }

/* ---- Kutera frame (Standard and Minimal) ------------------------------------------------------------
   The night-navy frame holds the side menu and wraps the working sheet like a window; the sheet scrolls under
   it. Gold marks the primary action; the open place takes its module's hue. The Odoo-like layout keeps
   Odoo's own look and is not touched by anything below. */
:root:not([data-layout="odoo"]) {
  --side-w: 248px;
  --inset: 10px;
  background: var(--frame);
  scrollbar-color: #33455f var(--frame);
  & body { background: var(--frame); }
  & .shell { background: var(--frame); }
  & .shell::after {
    content: ""; position: fixed; z-index: 25; pointer-events: none;
    top: var(--inset); right: var(--inset); bottom: var(--inset); left: var(--side-w);
    border-radius: var(--radius-lg); box-shadow: 0 0 0 100vmax var(--frame);
  }
  & .main {
    margin: var(--inset) var(--inset) var(--inset) 0; min-height: calc(100vh - 2 * var(--inset));
    background: var(--bg); border-radius: var(--radius-lg);
  }
  & .top { top: var(--inset); background: var(--bg); padding-top: 22px; }
  & .top.stuck { background: color-mix(in srgb, var(--bg) 90%, transparent); }
  & .top-title { font-weight: 620; font-stretch: 112%; letter-spacing: -0.022em; }

  /* the side menu on the frame; a lit pill travels to the open place */
  & .side { background: var(--frame); border-right: 0; }
  & .drawer-panel, & .bnav { background: var(--frame); }
  & .nav-link { border-radius: 9px; }
  & .nav-ind {
    left: 0; right: 0; width: auto; height: 34px; border-radius: 9px;
    background: color-mix(in srgb, var(--m-spine) 15%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--m-spine) 22%, transparent);
    transition: transform 0.38s var(--ease-out), height 0.2s var(--ease), opacity 0.2s var(--ease), background 0.3s var(--ease);
  }
  & .side:has(.nav-ind.on) .nav-link[aria-current="page"] { background: transparent; }
  & .nav-link[aria-current="page"] { font-weight: 560; }
  & .about-origin { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
  & .about-origin b { font-weight: 640; font-stretch: 118%; color: var(--ochre); }

  /* surfaces: white sheets on the cool ground, separated by fill and an even hairline */
  & .card, & .kpi-grid, & .table-wrap { border-radius: var(--radius); box-shadow: none; }
  & a.card { transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.18s var(--ease); }
  & a.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-lift); transform: translateY(-1px); }
  & .card-title { font-weight: 600; }
  & .card-title .glyph.ct { background: var(--m-soft); color: var(--m-ink); --ic-mark: var(--m); border-radius: 9px; }
  & .kpi-label .ic { color: var(--m); }

  /* figures: Archivo's wide cut, tabular */
  & .kpi-value, & .lc-value, & .big, & .stat-value {
    font-weight: 600; font-stretch: 116%; letter-spacing: -0.012em; font-variant-numeric: tabular-nums;
  }
  & .table th { background: var(--surface-2); color: var(--text-2); font-weight: 600; }
  & .table tr.click:hover td { background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }

  /* controls */
  & .btn { border-radius: 10px; }
  & .btn.primary, & .new-btn { background: var(--kut); border-color: var(--kut); color: var(--on-kut); font-weight: 600; }
  & .btn.primary:hover, & .new-btn:hover { background: var(--kut-hi); border-color: var(--kut-hi); }
  & .btn.primary:active, & .new-btn:active { background: var(--kut-deep); border-color: var(--kut-deep); }
  & .btn.primary .ic, & .new-btn .ic { color: inherit; --ic-mark: currentColor; }
  & .btn.primary:focus-visible, & .new-btn:focus-visible { outline-color: var(--brand); }
  /* one gold action per screen: row actions inside tables take a tint of it */
  & .table .btn.primary { background: color-mix(in srgb, var(--kut) 16%, var(--surface)); border-color: color-mix(in srgb, var(--kut) 50%, transparent); color: var(--text); }
  & .table .btn.primary:hover { background: color-mix(in srgb, var(--kut) 30%, var(--surface)); border-color: var(--kut); }
  & .apps-home .app-tile { max-width: none; }
  & .apps-home .app-name { overflow-wrap: normal; }
  & .seg { border-radius: 11px; background: var(--sunk); border-color: transparent; }
  & .seg-btn { border-radius: 8px; }
  & .seg-btn[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(11, 22, 38, 0.06); }
  & .input { border-radius: 10px; }
  & .input:focus, & .input:focus-visible { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); outline: none; }
}
@media (max-width: 1100px) { :root:not([data-layout="odoo"]) { --side-w: 68px; } }
@media (max-width: 700px) {
  :root:not([data-layout="odoo"]) {
    --inset: 0px;
    & .shell::after { display: none; }
    & .main { border-radius: 0; margin: 0; min-height: 100vh; }
    & .top { padding-top: 12px; }
  }
}
/* the Odoo-like sign-in: Odoo's plain centred card */
.login.odoo { grid-template-columns: minmax(0, 1fr); place-items: center; padding: 24px 16px; color: var(--text); }
.login.odoo .login-card { display: block; border-radius: 6px; }
.login.odoo .login-card > * { max-width: none; }
.login.odoo .login-brand { flex-direction: column; }
.login.odoo .login-brand h1 { font-weight: 500; font-stretch: 100%; letter-spacing: 0; }
