/*! Selvar — the revenue desk of a commercial solar company — © 2026 Hasib (OVERSHOOT). All rights reserved. Licensed to gusttavo.gimenis@byotti.com.br (order INS-959E4F60), not sold: see LICENSE.md. */
/* =========================================================================
   SELVAR — shell + shared kit. Page styles live in css/<page>.css and are
   imported by their page module.

   Look: a calm cool-grey desk. One solid page colour, solid cards with a
   hairline edge and a soft lift, a floating ink-navy sidebar with a cream
   pill for the current page. Cobalt leads, amber supports (it is a solar
   company: amber is daylight), colour otherwise means something — a stage,
   a status, a risk. Urbanist carries everything (house dashboard type: 500
   body, 600 titles and figures, 700 only for badges, counts and the brand),
   with tabular figures in every column.
   ========================================================================= */

:root {
  --font: 'Urbanist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* house dashboard type scale */
  --fs-2xs: 11px; --fs-xs: 12px; --fs-sm: 12.5px; --fs-md: 13.5px;
  --fs-base: 14px; --fs-lg: 15px; --fs-xl: 17px; --fs-2xl: 20px;
  --fs-3xl: 22px; --fs-4xl: 26px; --fs-display: 34px;

  --bg: #eceef2;
  --card: #fbfbfc;
  --card-2: #f3f4f7;
  --well: rgba(21, 28, 46, .055);
  --line: rgba(21, 28, 46, .08);
  --line-2: rgba(21, 28, 46, .15);
  --shadow: 0 1px 2px rgba(21, 28, 46, .04), 0 12px 32px -22px rgba(21, 28, 46, .28);
  --shadow-pop: 0 24px 60px -18px rgba(21, 28, 46, .32), 0 2px 8px rgba(21, 28, 46, .08);

  --text: #151a26;
  --muted: #586073;
  --faint: #767e90;

  --primary: #2a4fd0; --on-primary: #f6f8ff;
  --ink: #151a26; --on-ink: #f3f4f7;
  /* chrome: deep navy, the brand's own hue (≈224°) taken almost to black */
  --side: #10182b; --side-top: #182440; --side-rim: rgba(16, 24, 43, .9);
  --on-side: #e8ecf5; --side-dim: rgba(221, 228, 243, .68); --side-faint: rgba(221, 228, 243, .5);
  --side-hover: rgba(255, 255, 255, .06); --side-line: rgba(255, 255, 255, .08); --side-line-2: rgba(255, 255, 255, .16);
  --side-pill: #eef2fb; --on-side-pill: #10182b; --side-pill-chip: #dbe3f7; --side-accent: #2f56d6; --side-accent-2: #7d97ff;
  --c-amber-solid: #ec9f33;

  /* data colours (marks, dots, fills) */
  --c-cobalt: #2f56d6; --c-amber: #e3952a; --c-sky: #6b98ee; --c-coral: #e0705a; --c-teal: #17948a;
  --c-slate: #8890a3; --c-sand: #c4a275; --c-good: #138a70; --c-warn: #c27c12; --c-bad: #cf4436; --c-info: #2f56d6;
  /* the same tones as readable text on their own tint */
  --t-cobalt: #2546b8; --t-amber: #875100; --t-sky: #2a5bb4; --t-coral: #a83c27; --t-teal: #0a675e;
  --t-slate: #4b5468; --t-sand: #74552a; --t-good: #0a6853; --t-warn: #855000; --t-bad: #ad3327; --t-info: #2546b8;
  --tint: 14%;

  /* the KPI row: soft tiles in light, deep muted blocks in dark */
  /* tints come only from the two brand hues; the focal KPI tile is solid cobalt */
  --tile-sky: #dfe6fb; --tile-butter: #f6e8c8; --on-tile: #151a26; --on-tile-dim: rgba(21, 26, 38, .66);
  --tile-feature: #2a4fd0; --tile-feature-top: #3a62e6; --on-feature: #f4f6fd; --on-feature-dim: rgba(244, 246, 253, .78);

  /* avatars read the same in both themes */
  --av-cobalt: #d7defa; --av-cobalt-t: #233f9e; --av-amber: #f6e2bb; --av-amber-t: #6f4400; --av-sky: #d9e7fd; --av-sky-t: #24508f;
  --av-coral: #f7d8cf; --av-coral-t: #8f3320; --av-teal: #cfe9e5; --av-teal-t: #0b5c54; --av-sand: #eee2cf; --av-sand-t: #634621; --av-slate: #e0e3ea; --av-slate-t: #3e4658;

  --r-card: 22px; --r-tile: 18px; --r-ctl: 12px;
  --gap: 16px;
  --side-w: 256px;
  --gutter: clamp(16px, 2vw, 32px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0c0f14;
  --card: #151a22;
  --card-2: #1b2129;
  --well: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .15);
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 16px 40px -26px rgba(0, 0, 0, .9);
  --shadow-pop: 0 24px 60px -18px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .08);
  --text: #eceef3; --muted: #a2a9b9; --faint: #858c9d;
  --primary: #8ea6ff; --on-primary: #0d1430;
  --ink: #eceef3; --on-ink: #121620;
  --side: #111827; --side-top: #172138; --side-rim: rgba(255, 255, 255, .07);
  --on-side: #e8ecf5; --side-dim: rgba(221, 228, 243, .64); --side-faint: rgba(221, 228, 243, .46);
  --side-hover: rgba(255, 255, 255, .06); --side-line: rgba(255, 255, 255, .07); --side-line-2: rgba(255, 255, 255, .14);
  --side-pill: #26334f; --on-side-pill: #f2f5fb; --side-pill-chip: rgba(255, 255, 255, .14); --side-accent: #93a9ff; --side-accent-2: #7d97ff;
  --c-cobalt: #7b95ff; --c-amber: #f0b45a; --c-sky: #8db4ff; --c-coral: #f08f78; --c-teal: #4cc2b0;
  --c-slate: #98a1b4; --c-sand: #d6b98d; --c-good: #4fcfae; --c-warn: #f0bd64; --c-bad: #f3887a; --c-info: #7b95ff;
  --t-cobalt: #b2c2ff; --t-amber: #f5ca86; --t-sky: #b0cbff; --t-coral: #f8b1a1; --t-teal: #7fdccd;
  --t-slate: #c3c9d5; --t-sand: #e6cfaa; --t-good: #7fe0c6; --t-warn: #f5cc85; --t-bad: #f9aa9e; --t-info: #b2c2ff;
  --tint: 18%;
  --tile-sky: #1c2648; --tile-butter: #33290f; --on-tile: #eef0f5; --on-tile-dim: rgba(238, 240, 245, .7);
  --tile-feature: #22377f; --tile-feature-top: #2c4596; --on-feature: #eef1fb; --on-feature-dim: rgba(238, 241, 251, .76);
  color-scheme: dark;
}

/* ── Base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; color: var(--text); background: var(--bg);
  font: 500 var(--fs-base)/1.45 var(--font); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; overflow-x: hidden; overflow-wrap: break-word;
}
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl, dd, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
[hidden] { display: none !important; }
small { font-size: var(--fs-xs); }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus { outline: none; }
.is-kb :focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: var(--on-ink); font-weight: 600; }
.skip:focus { top: 12px; }
::selection { background: color-mix(in srgb, var(--c-amber) 40%, transparent); }
mark { background: color-mix(in srgb, var(--c-amber) 38%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--card-2); font: 600 var(--fs-2xs) var(--font); color: var(--muted); }
.link { display: inline-block; padding: 3px 0; color: var(--primary); font-weight: 600; font-size: var(--fs-sm); }
.link:hover { text-decoration: underline; }
[popover] { margin: 0; inset: auto; border: 0; padding: 0; background: none; color: inherit; overflow: visible; }

/* load gate: the shell is hidden until main.tsx plays the entrance */
html.js:not(.failsafe):not(.is-ready) .app { visibility: hidden; }
/* the theme wipe: no cross-fade underneath the circle */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ── Tone helpers ─────────────────────────────────────────────────────── */
.tone--cobalt { --c: var(--c-cobalt); --t: var(--t-cobalt); } .tone--amber { --c: var(--c-amber); --t: var(--t-amber); }
.tone--sky { --c: var(--c-sky); --t: var(--t-sky); } .tone--coral { --c: var(--c-coral); --t: var(--t-coral); }
.tone--teal { --c: var(--c-teal); --t: var(--t-teal); } .tone--slate { --c: var(--c-slate); --t: var(--t-slate); }
.tone--sand { --c: var(--c-sand); --t: var(--t-sand); } .tone--good { --c: var(--c-good); --t: var(--t-good); }
.tone--warn { --c: var(--c-warn); --t: var(--t-warn); } .tone--bad { --c: var(--c-bad); --t: var(--t-bad); } .tone--info { --c: var(--c-info); --t: var(--t-info); }

/* ── Shell ────────────────────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100dvh; overflow-x: clip; }
:root:is(.is-rail, .is-narrow) { --side-w: 92px; }
.main { min-width: 0; padding: 0 var(--gutter) 64px; }
.view { display: block; min-height: 60vh; }
.view:focus { outline: none; }
.view__wait { min-height: 60vh; }

/* sidebar: a floating ink panel. Navy is analogous to the cobalt brand (same
   hue family, far darker), so the chrome recedes and the content leads. The
   current page is a light pill with the icon in the brand colour; amber only
   ever means "needs you" (Copilot's count, the pace tick). */
.side {
  position: sticky; top: 12px; align-self: start; height: calc(100dvh - 24px); margin: 12px 0 12px 12px;
  display: flex; flex-direction: column; gap: 14px; padding: 16px 12px 12px; border-radius: 24px;
  background: linear-gradient(180deg, var(--side-top), var(--side) 42%); color: var(--on-side);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 0 0 1px var(--side-rim), 0 24px 50px -30px rgba(10, 14, 24, .75);
  overflow: hidden auto; scrollbar-width: none; z-index: 30;
}
.side::-webkit-scrollbar { display: none; }
.side__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px 0 4px; }
.side__brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.side__brand-text { display: grid; line-height: 1.15; min-width: 0; }
.side__brand-text b { font-weight: 700; font-size: 21px; letter-spacing: -.02em; }
.side__brand-text small { color: var(--side-dim); font-size: var(--fs-xs); font-weight: 500; white-space: nowrap; }
.brand__mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: linear-gradient(160deg, #f4b14e, var(--c-amber-solid)); color: #1b1404; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.brand__mark .ico { width: 22px; height: 22px; stroke-width: 2.2; }
.brand__mark--lg { width: 52px; height: 52px; border-radius: 16px; }
.brand__mark--lg .ico { width: 30px; height: 30px; }
/* the collapse button: ringed, in the sidebar's full text colour */
.side .side__rail { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; color: var(--on-side); border: 1px solid rgba(232, 236, 245, .16); background: rgba(255, 255, 255, .05); }
.side .side__rail:hover { background: rgba(255, 255, 255, .1); }
.side .side__rail .ico { width: 18px; height: 18px; }
.is-rail .side--panel .side__rail .ico { transform: scaleX(-1); }
.is-narrow .side--panel .side__rail { display: none; }

.side__search {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px 0 12px; border-radius: 12px; flex: none;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--side-line); color: var(--side-dim); font-size: var(--fs-md); font-weight: 600;
}
.side__search:hover { color: var(--on-side); background: rgba(255, 255, 255, .08); }
.side__search span { flex: 1; text-align: left; }
.side__search .ico { width: 17px; height: 17px; }
.side__search kbd { background: rgba(255, 255, 255, .07); border-color: var(--side-line); color: var(--side-dim); }

.side__nav { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; margin: 0 -4px; padding: 0 4px; }
.side__nav::-webkit-scrollbar { display: none; }
:root:is(.is-rail, .is-narrow) .side--panel .side__nav { overflow: visible; }
.nav__track { position: relative; display: flex; flex-direction: column; gap: 14px; min-height: 100%; }
.nav__pill { position: absolute; inset: 0; background: var(--side-pill); box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .5); z-index: 0; pointer-events: none; opacity: 0; }
.nav__group ul { display: grid; gap: 2px; }
.nav__group--foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--side-line); }
.side__group { padding: 0 12px 6px; font-size: var(--fs-2xs); font-weight: 600; color: var(--side-faint); letter-spacing: .08em; text-transform: uppercase; }
.nav__item {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 10px 0 6px; border-radius: 13px;
  color: var(--side-dim); font-weight: 600; font-size: var(--fs-md); white-space: nowrap;
}
.nav__ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.nav__item:hover:not([aria-current]) { color: var(--on-side); background: var(--side-hover); }
.nav__item[aria-current] { color: var(--on-side-pill); }
.nav__item[aria-current] .nav__ico { color: var(--side-accent); }
.nav__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav__count { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; font-size: var(--fs-2xs); font-weight: 700; background: rgba(255, 255, 255, .1); color: var(--on-side); }
.nav__item[aria-current] .nav__count { background: var(--side-pill-chip); color: var(--on-side-pill); }
.nav__count--alert, .nav__item[aria-current] .nav__count--alert { background: var(--c-amber-solid); color: #1b1404; }
.nav__chev { width: 15px; height: 15px; opacity: .6; }
.nav__chev.is-open { transform: rotate(180deg); }
/* sub-pages: a tree that hangs off the parent's icon */
.nav__subs { position: relative; margin: 4px 0 6px 20px; padding-left: 12px; display: grid; gap: 1px; }
.nav__subs::before { content: ''; position: absolute; left: 0; top: 0; bottom: 18px; width: 1px; background: var(--side-line-2); }
.nav__subs li { position: relative; }
.nav__subs li::before { content: ''; position: absolute; left: -12px; top: 0; width: 10px; height: 18px; border: solid var(--side-line-2); border-width: 0 0 1px 1px; border-bottom-left-radius: 8px; }
.nav__sub { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 10px; color: var(--side-dim); font-size: var(--fs-sm); font-weight: 600; }
.nav__sub:hover { color: var(--on-side); background: var(--side-hover); }
.nav__sub[aria-current] { color: var(--on-side); background: rgba(255, 255, 255, .08); }
.nav__sub[aria-current]::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--side-accent-2); margin-left: auto; }

/* the quarter, at a glance */
.side__quota { display: grid; gap: 8px; padding: 12px; border-radius: 16px; flex: none; background: rgba(255, 255, 255, .045); border: 1px solid var(--side-line); }
.side__quota:hover { background: rgba(255, 255, 255, .07); }
.side__quota-k { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--fs-xs); font-weight: 600; color: var(--side-dim); }
.side__quota-k b { font-size: var(--fs-lg); font-weight: 600; color: var(--on-side); letter-spacing: -.01em; }
.side__quota-bar { position: relative; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .1); }
.side__quota-bar i { position: absolute; inset: 0; border-radius: inherit; background: var(--side-accent-2); transform-origin: left; transform: scaleX(0); }
.side__quota-bar em { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--c-amber-solid); }
.side__quota small { color: var(--side-dim); font-size: var(--fs-2xs); font-weight: 500; }

.side__me { display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 16px; background: rgba(255, 255, 255, .045); border: 1px solid var(--side-line); flex: none; }
.side__me-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px; border-radius: 12px; }
.side__me-link:hover { background: var(--side-hover); }
.side__me-text { display: grid; line-height: 1.2; min-width: 0; }
.side__me-text b { font-weight: 600; font-size: var(--fs-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side__me-text small { color: var(--side-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side__me-more { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--side-dim); flex: none; }
.side__me-more:hover { color: var(--on-side); background: var(--side-hover); }

/* rail mode (panel only): icons only, counts become dots, everything names itself in a tooltip */
:root:is(.is-rail, .is-narrow) .side--panel { padding-inline: 12px; align-items: stretch; overflow: visible; }
/* short screens: the quota card yields its room to the pages */
@media (max-height: 760px) {
  .side--panel .side__quota { display: none; }
  .side--panel { gap: 10px; padding-block: 12px 10px; }
  .side--panel .side__search { height: 36px; }
  .side--panel .nav__track { gap: 8px; }
  .side--panel .nav__item { height: 38px; }
  .side--panel .nav__ico { width: 28px; height: 28px; }
  .side--panel .nav__sub { height: 30px; }
  .side--panel .side__group { padding-bottom: 4px; }
  .side--panel .nav__group--foot { padding-top: 6px; }
}
:root:is(.is-rail, .is-narrow) .side--panel .side__head { flex-direction: column; gap: 12px; padding: 0; }
:root:is(.is-rail, .is-narrow) .side--panel :is(.side__brand-text, .nav__label, .nav__chev, .nav__subs, .side__me-text, .side__quota, .side__me-more, .side__search span, .side__search kbd) { display: none; }
:root:is(.is-rail, .is-narrow) .side--panel .side__search { justify-content: center; padding: 0; height: 44px; }
:root:is(.is-rail, .is-narrow) .side--panel .side__group { height: 1px; padding: 0; margin: 0 14px 8px; background: var(--side-line); color: transparent; overflow: hidden; }
:root:is(.is-rail, .is-narrow) .side--panel .nav__item { justify-content: center; padding: 0; height: 46px; }
:root:is(.is-rail, .is-narrow) .side--panel .nav__count { position: absolute; top: 7px; right: 10px; min-width: 9px; height: 9px; padding: 0; font-size: 0; background: var(--side-accent-2); box-shadow: 0 0 0 2px var(--side); }
:root:is(.is-rail, .is-narrow) .side--panel .nav__count--alert { background: var(--c-amber-solid); }
:root:is(.is-rail, .is-narrow) .side--panel .side__me { justify-content: center; padding: 4px; background: none; border: 0; }
:root:is(.is-rail, .is-narrow) .side--panel .side__me-link { flex: none; }
:root:is(.is-rail, .is-narrow) .side--panel [data-tip] { position: relative; }
.side--panel [data-tip]::after {
  content: attr(data-tip); position: absolute; left: calc(100% + 14px); top: 50%; translate: 0 -50%; z-index: 40; white-space: pre;
  padding: 6px 10px; border-radius: 9px; background: var(--ink); color: var(--on-ink); font: 600 var(--fs-xs)/1.2 var(--font);
  opacity: 0; pointer-events: none; transition: opacity .15s; box-shadow: var(--shadow-pop);
}
:root:not(.is-rail):not(.is-narrow) .side--panel :is(.nav__item, .side__me-link, .side__search)[data-tip]::after { display: none; }
.side--panel [data-tip]:is(:hover, :focus-visible)::after { opacity: 1; transition-delay: .2s; }
:root:not(.is-rail):not(.is-narrow) .side--panel .side__rail[data-tip]::after { left: auto; right: 0; top: calc(100% + 8px); translate: 0 0; }

/* the phone drawer: the same panel, sliding in over a scrim */
.mobnav { --scrim: 0; position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(9, 12, 20, calc(var(--scrim) * .5)); }
.mobnav::backdrop { background: transparent; }
.mobnav .side { position: absolute; top: 10px; bottom: auto; left: 10px; height: calc(100% - 20px); max-height: calc(100% - 20px); margin: 0; width: min(320px, calc(100vw - 56px)); padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
.mobnav .nav__item { height: 48px; }
.mobnav .nav__sub { height: 42px; }

/* top bar */
.top { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 14px 0; background: var(--bg); }
.top__left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.top__brand { display: none; }
.crumbs { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: var(--fs-md); color: var(--muted); white-space: nowrap; }
.crumbs__item { display: inline-flex; align-items: center; gap: 4px; }
.crumbs__item .ico { width: 14px; height: 14px; opacity: .6; }
.crumbs b { color: var(--text); font-weight: 600; }
.crumbs a:hover { color: var(--text); }
.top__search {
  display: flex; align-items: center; gap: 10px; width: min(380px, 32vw); height: 44px; padding: 0 8px 0 14px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line); color: var(--muted); font-size: var(--fs-md); box-shadow: var(--shadow);
}
.top__search span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top__search:hover { border-color: var(--line-2); }
.top__right { display: flex; align-items: center; gap: 8px; }
.top__date { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }
.top__date .ico { width: 16px; height: 16px; color: var(--muted); }
.ibtn.top__find-phone, .ibtn.top__menu { display: none; }
.top__bell { position: relative; }
.badge { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; display: grid; place-items: center; background: var(--c-bad); color: #fff8f6; font-size: var(--fs-2xs); font-weight: 700; box-shadow: 0 0 0 2px var(--bg); }
.top__me { display: flex; align-items: center; gap: 9px; height: 44px; padding: 0 8px 0 4px; border-radius: 14px; }
.top__me:hover { background: var(--well); }
.top__me-text { display: grid; text-align: left; line-height: 1.15; }
.top__me-text b { font-weight: 600; font-size: var(--fs-md); }
.top__me-text small { color: var(--muted); }
.top__me > .ico { width: 15px; height: 15px; color: var(--muted); }

/* phone tab bar */
.phonebar { display: none; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r-ctl);
  border: 1px solid var(--line-2); background: var(--card); color: var(--text); font-weight: 600; font-size: var(--fs-md); white-space: nowrap;
}
.btn .ico { width: 17px; height: 17px; }
.btn:hover:not(:disabled) { background: var(--card-2); }
.btn:disabled { opacity: .5; }
.btn--primary { background: var(--primary); border-color: transparent; color: var(--on-primary); }
.btn--primary:hover:not(:disabled) { background: color-mix(in srgb, var(--primary) 88%, var(--text)); }
.btn--ink { background: var(--ink); border-color: transparent; color: var(--on-ink); }
.btn--ink:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 86%, var(--bg)); }
.btn--ghost { border-color: transparent; background: none; }
.btn--ghost:hover:not(:disabled) { background: var(--well); }
.btn--danger { background: var(--c-bad); border-color: transparent; color: #fff8f6; }
:root[data-theme="dark"] .btn--danger { color: #2a0b06; }
.btn--sm { height: 32px; padding: 0 12px; font-size: var(--fs-sm); border-radius: 10px; }
.ibtn { width: 40px; height: 40px; border-radius: var(--r-ctl); display: grid; place-items: center; flex: none; border: 1px solid var(--line); background: var(--card); color: var(--text); }
.ibtn:hover { background: var(--card-2); border-color: var(--line-2); }
.ibtn--sm { width: 32px; height: 32px; border-radius: 10px; }
.ibtn--ghost { border-color: transparent; background: none; }

/* ── Page head + sub-tabs ─────────────────────────────────────────────── */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 24px; flex-wrap: wrap; margin: 4px 0 22px; }
.head__text { min-width: 0; max-width: 760px; }
.head__eyebrow { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; margin-bottom: 8px; }
.head__title { font-weight: 600; font-size: clamp(28px, 2.6vw, 38px); line-height: 1.04; letter-spacing: -.025em; }
.head__title .word { display: inline-block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; vertical-align: top; }
.head__title .ch { display: inline-block; }
.head__sub { margin-top: 10px; color: var(--muted); font-size: var(--fs-base); max-width: 64ch; }
.head__sub b { color: var(--text); font-weight: 600; }
.head__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.subtabs { position: relative; display: inline-flex; gap: 2px; padding: 4px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs__pill { position: absolute; inset: 0; background: var(--ink); pointer-events: none; opacity: 0; }
.subtab { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 10px; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); white-space: nowrap; }
.subtab:hover:not([aria-current]) { color: var(--text); }
.subtab[aria-current] { color: var(--on-ink); }
.subtab__count { font-size: var(--fs-2xs); font-weight: 700; min-width: 20px; height: 18px; padding: 0 5px; border-radius: 99px; display: grid; place-items: center; background: var(--well); color: inherit; }
.subtab[aria-current] .subtab__count { background: rgba(255, 255, 255, .16); }
:root[data-theme="dark"] .subtab[aria-current] .subtab__count { background: rgba(0, 0, 0, .12); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.bar__tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* filter chips + hints */
.chip { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--card); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }
.chip:hover { border-color: var(--line-2); }
.chip > .ico { width: 16px; height: 16px; color: var(--muted); }
.chip.is-on { background: color-mix(in srgb, var(--c-cobalt) var(--tint), var(--card)); border-color: color-mix(in srgb, var(--c-cobalt) 35%, transparent); color: var(--t-cobalt); }
.chip.is-on > .ico { color: currentColor; }
.hint { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.hint .ico { width: 16px; height: 16px; }
.bar .search { width: 260px; max-width: 100%; }

/* ── Cards ────────────────────────────────────────────────────────────── */
.card { position: relative; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 20px; }
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card__title { font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.005em; line-height: 1.25; }
.card__sub { margin-top: 3px; font-size: var(--fs-sm); color: var(--muted); }
.card__tools { display: flex; align-items: center; gap: 6px; flex: none; }
.grid { display: grid; gap: var(--gap); }

/* ── Segmented ────────────────────────────────────────────────────────── */
.seg { position: relative; display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--well); flex: none; }
.seg__thumb { position: absolute; inset: 0; padding: 3px; display: flex; gap: 2px; pointer-events: none; z-index: 1; background: var(--card); box-shadow: 0 0 0 1px var(--line-2) inset; opacity: 0; }
:root[data-theme="dark"] .seg__thumb { background: #262d38; }
.seg__opt { display: inline-flex; align-items: center; justify-content: center; height: 30px; padding: 0 12px; border-radius: 9px; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); white-space: nowrap; }
.seg__thumb .seg__opt { color: var(--text); }
.seg--sm .seg__opt { height: 26px; padding: 0 10px; font-size: var(--fs-xs); }
.seg__opt:hover { color: var(--text); }

/* ── Pills, deltas, avatars, meters ───────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; background: color-mix(in srgb, var(--c) var(--tint), var(--card)); color: var(--t); }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); flex: none; }
.pill--cobalt { --c: var(--c-cobalt); --t: var(--t-cobalt); } .pill--amber { --c: var(--c-amber); --t: var(--t-amber); }
.pill--sky { --c: var(--c-sky); --t: var(--t-sky); } .pill--coral { --c: var(--c-coral); --t: var(--t-coral); }
.pill--teal { --c: var(--c-teal); --t: var(--t-teal); } .pill--slate { --c: var(--c-slate); --t: var(--t-slate); }
.pill--sand { --c: var(--c-sand); --t: var(--t-sand); } .pill--good { --c: var(--c-good); --t: var(--t-good); }
.pill--warn { --c: var(--c-warn); --t: var(--t-warn); } .pill--bad { --c: var(--c-bad); --t: var(--t-bad); } .pill--info { --c: var(--c-info); --t: var(--t-info); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; }
.delta .ico { width: 14px; height: 14px; stroke-width: 2; }
.delta small { font-weight: 500; color: var(--muted); margin-left: 3px; }
.delta--good { color: var(--t-good); } .delta--bad { color: var(--t-bad); }
.av { display: inline-grid; place-items: center; flex: none; border-radius: 50%; font-weight: 700; letter-spacing: -.01em; background: var(--av-slate); color: var(--av-slate-t); }
.av--xs { width: 24px; height: 24px; font-size: 10px; } .av--sm { width: 32px; height: 32px; font-size: var(--fs-2xs); }
.av--md { width: 40px; height: 40px; font-size: var(--fs-sm); } .av--lg { width: 52px; height: 52px; font-size: var(--fs-lg); } .av--xl { width: 72px; height: 72px; font-size: var(--fs-2xl); }
.av--cobalt { background: var(--av-cobalt); color: var(--av-cobalt-t); } .av--amber { background: var(--av-amber); color: var(--av-amber-t); }
.av--sky { background: var(--av-sky); color: var(--av-sky-t); } .av--coral { background: var(--av-coral); color: var(--av-coral-t); }
.av--teal { background: var(--av-teal); color: var(--av-teal-t); } .av--sand { background: var(--av-sand); color: var(--av-sand-t); }
.av--ring { box-shadow: 0 0 0 2px var(--side), 0 0 0 3.5px var(--c-amber); }
.av--more { background: var(--well); color: var(--muted); }
.avstack { display: inline-flex; }
.avstack .av { box-shadow: 0 0 0 2px var(--card); }
.avstack .av + .av { margin-left: -7px; }
.meter { display: block; height: 6px; border-radius: 99px; background: var(--well); overflow: hidden; }
.meter__fill { display: block; height: 100%; border-radius: inherit; background: var(--c-cobalt); transform-origin: left; transform: scaleX(0); }
.meter--amber .meter__fill { background: var(--c-amber); } .meter--good .meter__fill { background: var(--c-good); } .meter--bad .meter__fill { background: var(--c-bad); }
.meter--teal .meter__fill { background: var(--c-teal); } .meter--slate .meter__fill { background: var(--c-slate); } .meter--cobalt .meter__fill { background: var(--c-cobalt); } .meter--coral .meter__fill { background: var(--c-coral); } .meter--sky .meter__fill { background: var(--c-sky); } .meter--warn .meter__fill { background: var(--c-warn); }
.lead { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--well); color: var(--text); }
.lead[class*="tone--"] { background: color-mix(in srgb, var(--c) var(--tint), var(--card)); color: var(--t); }
.lead--act { background: color-mix(in srgb, var(--c-amber) var(--tint), var(--card)); color: var(--t-amber); }
.is-flash { animation: none; }
.float-up { position: fixed; z-index: 90; pointer-events: none; font-weight: 700; font-size: var(--fs-md); color: var(--t-good); white-space: nowrap; }

/* ── Tables ───────────────────────────────────────────────────────────── */
.tablewrap { overflow-x: auto; margin: 0 -20px -8px; padding: 0 20px 8px; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-md); }
.table th { text-align: left; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); padding: 0 12px 10px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.table th button { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.table th button .ico { width: 13px; height: 13px; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover td { background: var(--card-2); }
.table td:first-child, .table th:first-child { padding-left: 4px; }
.table .num, .table .r { text-align: right; }
.table small { display: block; color: var(--muted); font-weight: 500; }
.cell-main { display: flex; align-items: center; gap: 11px; min-width: 0; }
.cell-main b { font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Empty ────────────────────────────────────────────────────────────── */
.empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 36px 16px; }
.empty__ico { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--well); color: var(--muted); margin-bottom: 6px; }
.empty__title { font-weight: 600; font-size: var(--fs-lg); }
.empty__text { color: var(--muted); font-size: var(--fs-md); max-width: 36ch; }
.empty .btn { margin-top: 10px; }

/* ── Inputs ───────────────────────────────────────────────────────────── */
.input, .field input, .field select, .field textarea, .inline-edit input, .note-form input {
  width: 100%; height: 42px; padding: 0 13px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--card); color: var(--text); font-size: var(--fs-md); font-weight: 500;
}
.field textarea { height: auto; padding: 11px 13px; resize: vertical; line-height: 1.45; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
:is(.input, .field input, .field select, .field textarea, .inline-edit input, .note-form input):focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.search { position: relative; display: flex; align-items: center; min-width: 0; }
.search .ico { position: absolute; left: 12px; width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.search input { width: 100%; height: 40px; padding: 0 12px 0 38px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--card); font-size: var(--fs-md); }
.search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.field { display: grid; gap: 6px; min-width: 0; }
.field__label { font-size: var(--fs-sm); font-weight: 600; }
.field__label i { color: var(--t-bad); font-style: normal; }
.field__hint { color: var(--muted); }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.field--wide { grid-column: 1 / -1; }
.form__sub { color: var(--muted); margin-top: 4px; }
.form__err { min-height: 20px; margin-top: 10px; color: var(--t-bad); font-weight: 600; font-size: var(--fs-md); }
.form__foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.switch { position: relative; width: 44px; height: 26px; flex: none; border-radius: 99px; background: var(--line-2); }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fbfbfc; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: translate .25s var(--ease); }
.switch[aria-checked="true"] { background: var(--primary); }
.switch[aria-checked="true"]::after { translate: 18px 0; }

/* ── Overlays ─────────────────────────────────────────────────────────── */
dialog { color: var(--text); }
dialog::backdrop { background: rgba(9, 12, 20, .38); }
.drawer {
  position: fixed; inset: 12px 12px 12px auto; margin: 0; width: min(500px, calc(100vw - 24px)); height: auto; max-height: none; max-width: none;
  padding: 0; border: 1px solid var(--line); border-radius: 24px; background: var(--card); box-shadow: var(--shadow-pop); overflow: hidden;
}
.modal { width: min(600px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--line); border-radius: 22px; background: var(--card); box-shadow: var(--shadow-pop); }
.modal--sm { width: min(440px, calc(100vw - 32px)); } .modal--lg { width: min(820px, calc(100vw - 32px)); }
.dlg { position: relative; height: 100%; max-height: inherit; overflow: auto; padding: 26px; }
.modal .dlg { max-height: calc(100dvh - 48px); }
.dlg__close { position: absolute; top: 16px; right: 16px; z-index: 2; }
.modal__title { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -.015em; padding-right: 44px; }
.drawer__title { font-size: var(--fs-3xl); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.pop { position: fixed; z-index: 60; min-width: 230px; max-width: calc(100vw - 20px); padding: 6px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--card); box-shadow: var(--shadow-pop); }
.menu { display: grid; gap: 1px; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
.menu__item { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: 10px; font-size: var(--fs-md); font-weight: 600; text-align: left; }
.menu__item span { flex: 1; }
.menu__item:hover, .menu__item:focus-visible { background: var(--well); outline: none; }
.menu__item .ico { width: 17px; height: 17px; color: var(--muted); }
.menu__item.is-danger, .menu__item.is-danger .ico { color: var(--t-bad); }
.menu__check { color: var(--primary) !important; }
.toasts { position: fixed; z-index: 95; left: 50%; bottom: 22px; translate: -50% 0; display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 24px); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 6px 6px 8px; border-radius: 16px; background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow-pop); font-weight: 600; font-size: var(--fs-md); max-width: 100%; }
.toast__ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, .1); flex: none; }
:root[data-theme="dark"] .toast__ico { background: rgba(0, 0, 0, .08); }
.toast--good .toast__ico { background: var(--c-amber); color: #1b1404; }
.toast__msg { padding-right: 4px; }
.toast__undo { height: 34px; padding: 0 12px; border-radius: 10px; font-weight: 700; color: var(--c-amber); }
:root[data-theme="dark"] .toast__undo { color: var(--t-cobalt); color: #2546b8; }
.toast__undo:hover { background: rgba(255, 255, 255, .08); }
.toast__x { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; opacity: .6; }
.toast__x:hover { opacity: 1; }
.toast__x .ico { width: 15px; height: 15px; }

/* notifications */
.pop--notices { width: 380px; padding: 0; }
.notices__head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 8px; }
.notices__head b { font-weight: 700; font-size: var(--fs-lg); }
.notices ul { padding: 4px 6px 8px; max-height: 420px; overflow: auto; }
.notice { display: flex; align-items: flex-start; gap: 11px; padding: 10px; border-radius: 12px; }
.notice:hover { background: var(--well); }
.notice > span:nth-child(2) { flex: 1; display: grid; gap: 2px; }
.notice b { font-weight: 500; font-size: var(--fs-md); }
.notice.is-unread b { font-weight: 600; }
.notice small { color: var(--muted); }
.notice__ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--well); flex: none; }
.notice__ico .ico { width: 17px; height: 17px; }
.notice__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-cobalt); margin-top: 6px; flex: none; }

/* ⌘K */
.finder { width: min(640px, calc(100vw - 24px)); margin: 10vh auto auto; padding: 0; border: 1px solid var(--line-2); border-radius: 22px; background: var(--card); box-shadow: var(--shadow-pop); overflow: hidden; }
.finder__field { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 62px; border-bottom: 1px solid var(--line); }
.finder__field .ico { width: 20px; height: 20px; color: var(--muted); }
.finder__field input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; font-size: var(--fs-xl); font-weight: 500; }
.finder__list { max-height: min(460px, 60dvh); overflow: auto; padding: 6px 8px 8px; }
.finder__group { padding: 12px 10px 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.finder__opt { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; cursor: pointer; }
.finder__opt > span:nth-child(2) { flex: 1; min-width: 0; display: grid; }
.finder__opt b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.finder__opt small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.finder__opt .go { opacity: 0; color: var(--muted); }
.finder__opt[aria-selected="true"] { background: var(--well); }
.finder__opt[aria-selected="true"] .go { opacity: 1; }
.finder__foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-xs); }
.finder__foot span { display: inline-flex; align-items: center; gap: 4px; }

/* the More sheet + shortcuts */
.more__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 18px 0; }
.more__item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; border: 1px solid var(--line); font-weight: 600; }
.more .btn { width: 100%; }
.keys { display: grid; gap: 4px; margin-top: 16px; }
.keys div { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.keys dt { display: flex; gap: 4px; }
.keys dd { color: var(--muted); font-size: var(--fs-md); }

/* sign in */
.signin { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.signin__card { width: min(420px, 100%); display: grid; gap: 14px; padding: 34px; border-radius: 26px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-pop); }
.signin__title { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -.015em; margin-top: 6px; }
.signin__go { height: 46px; margin-top: 6px; }
.signin__foot { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: var(--fs-sm); }
.signin__foot .ico { width: 15px; height: 15px; }

/* ── Chart marks ──────────────────────────────────────────────────────── */
.chart { position: relative; min-width: 0; }
.chart svg { overflow: visible; }
.ch-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.ch-tick { fill: var(--muted); font: 500 var(--fs-2xs) var(--font); }
.ch-bar.is-dim { opacity: .38; }
.ch-target { stroke: var(--text); stroke-width: 1.3; stroke-dasharray: 5 5; opacity: .55; }
.ch-target-label { fill: var(--muted); font: 600 var(--fs-2xs) var(--font); }
.ch-line { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ch-line.is-dashed { stroke-dasharray: 6 6; stroke-width: 2; }
.ch-band { fill: var(--c-amber); opacity: .14; }
.ch-now { stroke: var(--c-amber); stroke-width: 1.5; }
.ch-now-label { fill: var(--t-amber); font: 700 var(--fs-2xs) var(--font); }
.ch-cross { stroke: var(--line-2); stroke-width: 1; }
.ch-dot { fill: var(--card); stroke-width: 2.4; }
.tip { position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none; display: grid; gap: 4px; min-width: 150px; padding: 10px 12px; border-radius: 12px; background: var(--ink); color: var(--on-ink); font-size: var(--fs-xs); box-shadow: var(--shadow-pop); opacity: 0; transition: opacity .12s; }
.tip.is-on { opacity: 1; }
.tip b { font-weight: 700; font-size: var(--fs-sm); }
.tip span { display: flex; align-items: center; gap: 6px; }
.tip span i { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.tip em { margin-left: auto; padding-left: 12px; font-style: normal; font-weight: 700; }
.tip__total { padding-top: 4px; border-top: 1px solid rgba(255, 255, 255, .14); }
:root[data-theme="dark"] .tip__total { border-color: rgba(0, 0, 0, .14); }
.spark { width: 100%; height: 34px; overflow: visible; }
.ring { position: relative; flex: none; }
.ring__center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.legend i.is-line { height: 3px; border-radius: 2px; }
.legend i.is-dash { height: 0; border-top: 2px dashed var(--c); background: none; }

/* ── The deal drawer ─────────────────────────────────────────────────── */
.dealx { display: grid; gap: 20px; }
.dealx__head { position: relative; display: flex; gap: 14px; align-items: flex-start; padding-right: 44px; }
.dealx__ico { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--c) var(--tint), var(--card)); color: var(--t); }
.dealx__ico .ico { width: 24px; height: 24px; }
.dealx__meta { color: var(--muted); font-size: var(--fs-sm); margin-bottom: 2px; }
.dealx__pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.dealx__value { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.dealx__figure { font-size: var(--fs-display); font-weight: 600; letter-spacing: -.025em; line-height: 1; }
.dealx__value .muted { font-size: var(--fs-md); }
.dealx__ai { padding: 14px 16px; border-radius: 16px; background: color-mix(in srgb, var(--c-cobalt) 7%, var(--card)); border: 1px solid color-mix(in srgb, var(--c-cobalt) 18%, transparent); font-size: var(--fs-md); }
.dealx__ai-k, .dealx__k { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.dealx__ai-k { color: var(--t-cobalt); }
.dealx__ai-k .ico { width: 15px; height: 15px; }
.stamp { position: absolute; right: 52px; top: 0; padding: 6px 14px; border: 2.5px solid var(--c-good); color: var(--t-good); border-radius: 10px; font-weight: 700; font-size: var(--fs-xl); letter-spacing: .12em; text-transform: uppercase; transform: rotate(-12deg); }
.steps { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); }
.steps__track { position: absolute; left: 10%; right: 10%; top: 15px; height: 2px; background: var(--line-2); }
.steps__fill { position: absolute; inset: 0; background: var(--c-cobalt); transform-origin: left; transform: scaleX(0); }
.steps li { display: grid; justify-items: center; }
.steps__dot { display: grid; justify-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.steps__dot i { position: relative; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: var(--fs-xs); background: var(--card); border: 1.5px solid var(--line-2); }
.steps__dot i .ico { width: 15px; height: 15px; stroke-width: 2.2; }
.steps__dot.is-done i { background: var(--c-cobalt); border-color: var(--c-cobalt); color: var(--on-primary); }
:root[data-theme="dark"] .steps__dot.is-done i { color: #0d1430; }
.steps__dot.is-now i { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-cobalt) 22%, transparent); }
.steps__dot.is-now { color: var(--text); }
.steps__dot:not(:disabled):hover i { border-color: var(--c-cobalt); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border-radius: 16px; overflow: hidden; background: var(--line); border: 1px solid var(--line); }
.facts > div { background: var(--card); padding: 12px 14px; }
.facts dt { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.facts dd { font-weight: 600; margin-top: 3px; display: grid; }
.facts dd small { color: var(--muted); font-weight: 500; }
.facts dd small.is-bad { color: var(--t-bad); font-weight: 600; }
.facts__owner { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; justify-self: start; }
.facts__owner .ico { width: 14px; height: 14px; color: var(--muted); }
.next-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--line-2); text-align: left; font-weight: 600; }
.next-row span { flex: 1; }
.next-row > .ico:first-child { color: var(--c-amber); }
.next-row__edit { opacity: .5; }
.next-row:hover .next-row__edit { opacity: 1; }
.inline-edit, .note-form { display: flex; gap: 8px; }
.person { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--card-2); }
.person > div { flex: 1; min-width: 0; display: grid; }
.person b { font-weight: 600; }
.person small { color: var(--muted); }
.timeline ol { margin-top: 12px; display: grid; }
.timeline li { position: relative; display: flex; gap: 12px; padding-bottom: 14px; }
.timeline li:not(:last-child)::before { content: ''; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 1px; background: var(--line-2); }
.timeline__ico { width: 31px; height: 31px; border-radius: 10px; display: grid; place-items: center; background: var(--well); flex: none; }
.timeline__ico .ico { width: 15px; height: 15px; }
.timeline p { font-weight: 600; font-size: var(--fs-md); }
.timeline small { color: var(--muted); }
.dealx__foot { position: sticky; bottom: -26px; display: flex; justify-content: flex-end; gap: 8px; margin: 0 -26px -26px; padding: 14px 26px; background: var(--card); border-top: 1px solid var(--line); }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1279px) {
  .top__me-text { display: none; }
  .top__search { width: min(300px, 30vw); }
}
@media (max-width: 999px) {
  .top__date { display: none; }
  .top__search span, .top__search kbd { display: none; }
  .top__search { width: 44px; padding: 0; justify-content: center; }
}
@media (max-width: 760px) {
  .app { display: block; }
  .side--panel { display: none; }
  .main { padding: 0 16px calc(96px + env(safe-area-inset-bottom)); }
  .top { min-height: 64px; padding: 10px 0; gap: 8px; }
  .ibtn.top__menu { display: grid; }
  .top__brand { display: none; }
  .top__brand .brand__mark { width: 34px; height: 34px; border-radius: 11px; }
  .crumbs__co, .crumbs__item:not(:last-child) { display: none; }
  .crumbs__item:last-child .ico { display: none; }
  .crumbs { font-size: var(--fs-lg); }
  .top__search { display: none; }
  .ibtn.top__find-phone { display: grid; }
  .top__theme { display: none; }
  .top__me { padding: 0; }
  .top__me > .ico { display: none; }
  .top__new { display: none; }
  .ibtn { width: 44px; height: 44px; }
  .phonebar {
    position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px; border-radius: 22px; background: var(--side); box-shadow: 0 18px 40px -16px rgba(9, 12, 20, .55);
  }
  :root[data-theme="dark"] .phonebar { box-shadow: 0 0 0 1px var(--side-line), 0 18px 40px -16px #000; }
  .phonebar__item { position: relative; display: grid; justify-items: center; gap: 2px; padding: 7px 0 6px; border-radius: 16px; color: var(--side-dim); font-size: var(--fs-2xs); font-weight: 600; }
  .phonebar__item[aria-current] { background: var(--side-pill); color: var(--on-side-pill); }
  .phonebar__item[aria-current] .ico { color: var(--side-accent); }
  .phonebar__item .ico { width: 21px; height: 21px; }
  .phonebar__dot { position: absolute; top: 6px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--c-amber-solid); }
  .toasts { bottom: calc(96px + env(safe-area-inset-bottom)); }
  .head { margin-bottom: 18px; }
  .head__actions { width: 100%; }
  .head__actions .btn { flex: 1; }
  .card { padding: 16px; border-radius: 20px; }
  /* a card's tools drop under its title rather than squeezing it */
  .card__head { flex-wrap: wrap; }
  .card__head > div:first-child { flex: 1 1 180px; min-width: 0; }
  .card__tools { flex-wrap: wrap; max-width: 100%; }
  .card__tools .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .tablewrap { margin: 0 -16px -8px; padding: 0 16px 8px; }
  .form__grid { grid-template-columns: 1fr; }
  .field input, .field select, .field textarea, .search input, .inline-edit input, .note-form input, .finder__field input, .ask input { font-size: 16px; }
  .modal, .modal--sm, .modal--lg { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 24px 24px 0 0; max-height: 92dvh; }
  .modal .dlg { max-height: 92dvh; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }
  .drawer { inset: auto 0 0 0; width: 100%; height: 92dvh; border-radius: 24px 24px 0 0; }
  .drawer .dlg { padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }
  .dealx__foot { margin: 0 -18px -22px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); bottom: -22px; }
  .finder { margin-top: 12px; }
  .pop--notices { width: calc(100vw - 20px); }
  .facts { grid-template-columns: 1fr; }
}
@media (pointer: coarse) {
  .btn { min-height: 44px; }
  .seg__opt { min-height: 36px; }
  .subtab { min-height: 40px; }
  .nav__sub, .menu__item { min-height: 44px; display: flex; align-items: center; }
}
@media (max-height: 560px) and (min-width: 761px) {
  .side { gap: 10px; padding-block: 10px; }
  .nav__item { height: 36px; }
  .side__group { padding-bottom: 2px; }
  .nav__track { gap: 8px; }
}
