/* Orient Agent design system.
   Type: Montserrat (headings, numbers — matches the logo's geometric letters) + Manrope (UI text).
   Dark (default): deep navy surfaces, steel-blue accents, near-white type.
   Light: white / cool-gray surfaces, navy accents. The logo keeps its own navy + gold.
   2026-10-20: the gold accent was replaced by steel blue at the user's request ("gold … bachkana"); the --gold*
   names stay as the accent tokens so every rule follows. --acc-rgb is the accent for rgb(var(--acc-rgb) / a). */
@font-face { font-family: 'Manrope'; font-style: normal; font-display: swap; font-weight: 200 900; src: url(/vendor/fonts/manrope-latin-wght-normal.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; }
@font-face { font-family: 'Manrope'; font-style: normal; font-display: swap; font-weight: 200 900; src: url(/vendor/fonts/manrope-latin-ext-wght-normal.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: 'Manrope'; font-style: normal; font-display: swap; font-weight: 200 900; src: url(/vendor/fonts/manrope-cyrillic-wght-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-display: swap; font-weight: 200 900; src: url(/vendor/fonts/montserrat-latin-wght-normal.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; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-display: swap; font-weight: 200 900; src: url(/vendor/fonts/montserrat-latin-ext-wght-normal.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: 'Montserrat'; font-style: normal; font-display: swap; font-weight: 200 900; src: url(/vendor/fonts/montserrat-cyrillic-wght-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }

/* ------------------------------------------------------------------ tokens: dark (default) */
/* Logo palette (navy #043E66, gold, cream) stays in the logo only; the UI accent is steel blue. */
:root {
  --font: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Montserrat', 'Manrope', ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace;

  --logo-navy: #043e66;
  --logo-gold: #c29416;
  --logo-cream: #edf2f8;

  --acc-rgb: 111 168 220;
  --on-accent: #ffffff;
  --gold: #6fa8dc;
  --gold-2: #9cc4ec;
  --gold-3: #4a86c0;
  --gold-grad: linear-gradient(180deg, #4f8ccb 0%, #3b74ae 100%);
  --gold-text: linear-gradient(120deg, #b9d6f2 0%, #8fbde8 45%, #6fa8dc 100%);
  --gold-line: linear-gradient(90deg, transparent, rgba(111, 168, 220, .55), transparent);

  --bg: #021526;
  --bg-2: #031b30;
  --surface: #052340;
  --surface-2: #062848;
  --surface-3: #0a3156;
  --card-bg: linear-gradient(180deg, #06294b 0%, #04203b 100%);
  --input-bg: #031a2f;
  --border: rgba(150, 195, 240, .1);
  --border-2: rgba(150, 195, 240, .17);
  --border-gold: rgba(111, 168, 220, .32);
  --text: #edf2f8;
  --text-2: #a9b8c8;
  --text-3: #6d84a0;

  --brand: #6fa8dc;
  --brand-2: #9cc4ec;
  --brand-ink: #ffffff;
  --brand-soft: rgba(111, 168, 220, .12);
  --brand-line: rgba(111, 168, 220, .3);
  --gold-soft: rgba(111, 168, 220, .14);
  --gold-ink: #a9cdf0;

  --btn-primary-bg: var(--gold-grad);
  --btn-primary-fg: #ffffff;
  --btn-primary-shadow: 0 6px 18px -8px rgba(59, 116, 174, .6), inset 0 1px 0 rgba(255, 255, 255, .16);

  --green: #6ee7a8; --green-soft: rgba(52, 211, 153, .12); --green-dot: #34d399;
  --amber: #f5c46b; --amber-soft: rgba(245, 158, 11, .13); --amber-dot: #f59e0b;
  --red: #f88f8f; --red-soft: rgba(239, 68, 68, .13); --red-dot: #ef4444;
  --blue: #9cc8ff; --blue-soft: rgba(96, 165, 250, .13); --blue-dot: #60a5fa;
  --violet: #c9b8ff; --violet-soft: rgba(167, 139, 250, .13);
  --gray-soft: rgba(150, 195, 240, .08); --gray-dot: #6d84a0;

  --side-bg: #021a30;
  --side-text: rgba(237, 242, 248, .62);
  --side-text-strong: #edf2f8;
  --side-hover: rgba(150, 195, 240, .06);
  --side-active: rgba(111, 168, 220, .12);
  --side-border: rgba(111, 168, 220, .14);

  --radius-xs: 6px; --radius-sm: 8px; --radius: 12px; --radius-lg: 16px; --radius-xl: 20px;
  --shadow-xs: 0 1px 2px rgba(0, 6, 16, .45);
  --shadow-sm: 0 2px 6px rgba(0, 6, 16, .5);
  --shadow: 0 10px 30px -10px rgba(0, 6, 16, .75);
  --shadow-lg: 0 30px 60px -20px rgba(0, 6, 16, .88), 0 0 0 1px rgba(111, 168, 220, .1);
  --ring: 0 0 0 3px rgba(111, 168, 220, .3);
  --glass: rgba(3, 22, 40, .84);
  --backdrop: rgba(1, 10, 20, .68);
  --page-glow: radial-gradient(900px 520px at 88% -140px, rgba(111, 168, 220, .08), transparent 70%), radial-gradient(1100px 620px at -10% 115%, rgba(8, 82, 140, .38), transparent 70%), radial-gradient(800px 500px at 40% 40%, rgba(4, 62, 102, .22), transparent 75%);

  --side-w: 256px;
  --top-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

/* ------------------------------------------------------------------ tokens: light ivory */
:root[data-theme='light'] {
  --acc-rgb: 47 100 150;
  --on-accent: #ffffff;
  --gold: #2f6496;
  --gold-2: #3d72a6;
  --gold-3: #0b3a63;
  --gold-grad: linear-gradient(180deg, #3d72a6 0%, #2a5a8a 100%);
  --gold-text: linear-gradient(120deg, #3d72a6 0%, #0b3a63 100%);
  --gold-line: linear-gradient(90deg, transparent, rgba(47, 100, 150, .4), transparent);
  --bg: #f3f5f8;
  --bg-2: #e9edf2;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef2f6;
  --card-bg: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  --input-bg: #ffffff;
  --border: #e2e7ed;
  --border-2: #d1d9e2;
  --border-gold: rgba(47, 100, 150, .3);
  --text: #0b2236;
  --text-2: #4a5d70;
  --text-3: #8697a8;
  --brand: #043e66;
  --brand-2: #0a5288;
  --brand-ink: #ffffff;
  --brand-soft: #e7eef5;
  --brand-line: #c4d4e3;
  --gold-soft: #e6eef6;
  --gold-ink: #0b3a63;
  --btn-primary-bg: linear-gradient(180deg, #0a5288, #043e66);
  --btn-primary-fg: #ffffff;
  --btn-primary-shadow: 0 6px 16px -8px rgba(4, 62, 102, .55), inset 0 1px 0 rgba(255, 255, 255, .14);
  --green: #157a46; --green-soft: #e5f3ea; --green-dot: #22c55e;
  --amber: #a85e07; --amber-soft: #fbefd9; --amber-dot: #f59e0b;
  --red: #b42318; --red-soft: #fbe9e7; --red-dot: #ef4444;
  --blue: #0a4f86; --blue-soft: #e5eef7; --blue-dot: #2f7fd0;
  --violet: #6b3fd1; --violet-soft: #f0eafd;
  --gray-soft: #eef1f5; --gray-dot: #94a0ad;
  --side-bg: #032844;
  --side-text: rgba(237, 242, 248, .66);
  --side-text-strong: #edf2f8;
  --side-hover: rgba(237, 242, 248, .06);
  --side-active: rgba(111, 168, 220, .16);
  --side-border: rgba(111, 168, 220, .2);
  --shadow-xs: 0 1px 2px rgba(4, 40, 70, .06);
  --shadow-sm: 0 1px 3px rgba(4, 40, 70, .08);
  --shadow: 0 10px 28px -12px rgba(4, 40, 70, .22);
  --shadow-lg: 0 30px 60px -24px rgba(4, 30, 55, .35), 0 0 0 1px rgba(47, 100, 150, .12);
  --ring: 0 0 0 3px rgba(4, 62, 102, .2);
  --glass: rgba(255, 255, 255, .9);
  --backdrop: rgba(3, 20, 36, .45);
  --page-glow: radial-gradient(900px 480px at 85% -120px, rgba(47, 100, 150, .07), transparent 70%), radial-gradient(900px 520px at -10% 110%, rgba(4, 62, 102, .08), transparent 70%);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14px; font-weight: 500; line-height: 1.5; color: var(--text);
  background: var(--page-glow), var(--bg); background-attachment: fixed;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
::selection { background: rgb(var(--acc-rgb) / .35); color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); letter-spacing: -.015em; }
p { margin: 0; }
.num, .tabular { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.gold-text { background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.display { font-family: var(--display); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

* { scrollbar-width: thin; scrollbar-color: rgb(var(--acc-rgb) / .22) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgb(var(--acc-rgb) / .2); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgb(var(--acc-rgb) / .35); }

.boot { position: fixed; inset: 0; display: grid; place-items: center; background: #021526; }
.boot-mark { width: 52px; height: 52px; border-radius: 14px; background: url(/assets/favicon.svg) center/cover; animation: pulse 1.4s var(--ease) infinite; box-shadow: 0 0 40px rgb(var(--acc-rgb) / .25); }
@keyframes pulse { 50% { transform: scale(.92); opacity: .7; } }

/* ------------------------------------------------------------------ shell */
.shell { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; color: var(--side-text);
  background: radial-gradient(140% 50% at 0% 0%, rgb(var(--acc-rgb) / .12), transparent 55%), radial-gradient(120% 60% at 100% 100%, rgba(10, 82, 140, .35), transparent 70%), linear-gradient(180deg, #032340, var(--side-bg));
  border-right: 1px solid var(--side-border); z-index: 30;
}
.side::after { content: ''; position: absolute; top: 0; right: -1px; width: 1px; height: 40%; background: linear-gradient(180deg, rgb(var(--acc-rgb) / .55), transparent); }
.side-brand { display: flex; align-items: center; padding: 22px 24px 20px; position: relative; }
.brand-logo { display: block; width: auto; user-select: none; -webkit-user-drag: none; }
.brand-logo.md { height: 34px; }
.brand-logo.lg { height: 42px; }
.side-brand:hover .brand-logo { filter: brightness(1.12); }
.side-brand::after { content: ''; position: absolute; left: 20px; right: 20px; bottom: 0; height: 1px; background: var(--gold-line); opacity: .7; }
.side-nav { flex: 1; overflow-y: auto; padding: 8px 12px 16px; }
.nav-group { margin-top: 20px; }
.nav-group:first-child { margin-top: 6px; }
.nav-label { padding: 0 12px 7px; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgb(var(--acc-rgb) / .55); }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; margin: 2px 0; border-radius: 11px; font-size: 15px; font-weight: 600; color: var(--side-text); transition: background .18s, color .18s; }
.nav-item svg { width: 20px; height: 20px; stroke-width: 1.75; opacity: .7; flex: none; transition: color .18s, opacity .18s; }
.nav-item:hover { background: var(--side-hover); color: var(--side-text-strong); }
.nav-item:hover svg { opacity: 1; }
.nav-item.active { background: linear-gradient(90deg, rgb(var(--acc-rgb) / .14), rgb(var(--acc-rgb) / .03)); color: var(--gold-ink); box-shadow: inset 0 0 0 1px rgb(var(--acc-rgb) / .18); }
.nav-item.active svg { opacity: 1; color: var(--gold-2); filter: drop-shadow(0 0 6px rgb(var(--acc-rgb) / .45)); }
.nav-item.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold-grad); box-shadow: 0 0 12px rgb(var(--acc-rgb) / .7); }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--on-accent); background: var(--gold-grad); box-shadow: 0 0 12px rgb(var(--acc-rgb) / .35); }
.nav-live { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-2); box-shadow: 0 0 0 3px rgb(var(--acc-rgb) / .16), 0 0 10px rgb(var(--acc-rgb) / .6); }
.side-foot { padding: 12px; position: relative; }
.side-foot::before { content: ''; position: absolute; left: 20px; right: 20px; top: 0; height: 1px; background: var(--gold-line); opacity: .5; }
.side-user { display: flex; align-items: center; gap: 11px; padding: 9px; border-radius: 13px; cursor: pointer; transition: background .15s; width: 100%; background: none; border: 0; text-align: left; }
.side-user:hover { background: var(--side-hover); }
.side-user .who b { display: block; color: var(--side-text-strong); font-size: 14px; font-weight: 600; }
.side-user .who span { display: block; font-size: 12.5px; color: rgb(var(--acc-rgb) / .75); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 32px; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.topbar.scrolled { border-bottom-color: var(--border); }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); min-width: 0; letter-spacing: .02em; }
.crumbs b { color: var(--text); font-weight: 600; }
.crumbs svg { width: 14px; height: 14px; color: var(--gold); opacity: .7; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search-trigger { display: flex; align-items: center; gap: 10px; height: 40px; width: 320px; padding: 0 10px 0 14px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--input-bg); color: var(--text-3); cursor: pointer; font-size: 13px; transition: border-color .2s, box-shadow .2s; }
.search-trigger:hover { border-color: var(--border-gold); box-shadow: 0 0 0 4px rgb(var(--acc-rgb) / .06); }
.search-trigger svg { width: 16px; height: 16px; color: var(--gold); }
.search-trigger kbd { margin-left: auto; }
kbd { font-family: var(--font); font-size: 10.5px; font-weight: 600; color: var(--text-3); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--border-2); background: var(--surface-2); }
.live-pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 16px; background: var(--input-bg); border: 1px solid var(--border-2); font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--text-2); }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--gray-dot); }
.live-pill.on { border-color: var(--border-gold); color: var(--gold-ink); }
.live-pill.on i { background: var(--gold-2); animation: goldPing 2s infinite; }
.live-pill.err i { background: var(--red-dot); }
@keyframes goldPing { 0% { box-shadow: 0 0 0 0 rgb(var(--acc-rgb) / .55); } 70% { box-shadow: 0 0 0 8px rgb(var(--acc-rgb) / 0); } 100% { box-shadow: 0 0 0 0 rgb(var(--acc-rgb) / 0); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .5); } 70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.btn.menu-btn { display: none; }

.page { padding: 10px 32px 56px; max-width: 1500px; width: 100%; margin: 0 auto; animation: pageIn .4s var(--ease); }
.page.wide { max-width: none; }
@keyframes pageIn { from { transform: translateY(8px); } }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin: 14px 0 26px; flex-wrap: wrap; }
.page-head h1 { font-size: 28px; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; }
.page-head p { margin-top: 6px; color: var(--text-2); font-size: 13.5px; }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ primitives */
.btn { --b-bg: var(--surface-2); --b-fg: var(--text); --b-bd: var(--border-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 11px;
  border: 1px solid var(--b-bd); background: var(--b-bg); color: var(--b-fg); font-size: 13.5px; font-weight: 700; letter-spacing: 0;
  cursor: pointer; white-space: nowrap; transition: background .2s, border-color .2s, box-shadow .2s, transform .06s, opacity .15s, filter .2s; user-select: none; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:hover { border-color: var(--border-gold); background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.loading { opacity: .5; pointer-events: none; }
.btn.primary, .btn.gold { --b-fg: var(--btn-primary-fg); --b-bd: transparent; background: var(--btn-primary-bg); box-shadow: var(--btn-primary-shadow); }
.btn.gold { --b-fg: var(--on-accent); background: var(--gold-grad); box-shadow: 0 6px 18px -6px rgb(var(--acc-rgb) / .45), inset 0 1px 0 rgba(255, 255, 255, .45); }
.btn.primary:hover, .btn.gold:hover { filter: brightness(1.08); background: var(--btn-primary-bg); }
.btn.gold:hover { background: var(--gold-grad); }
.btn.danger { --b-fg: var(--red); }
.btn.danger.solid { --b-bg: #b42318; --b-fg: #fff; --b-bd: transparent; }
.btn.ghost { --b-bg: transparent; --b-bd: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--surface-3); border-color: transparent; }
.btn.sm { height: 33px; padding: 0 12px; font-size: 12.5px; border-radius: 10px; }
.btn.xs { height: 27px; padding: 0 9px; font-size: 12px; border-radius: 8px; gap: 5px; }
.btn.xs svg { width: 14px; height: 14px; }
.btn.icon { width: 40px; padding: 0; }
.btn.sm.icon { width: 33px; }
.btn.block { width: 100%; }
.btn .spin { width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.card { position: relative; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .03); }
:root[data-theme='light'] .card { box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px 0; min-height: 52px; }
.card-head h3 { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; }
.card-head .sub { font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.card-head .right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.card-body { padding: 16px 22px 22px; }
.card-body.tight { padding: 8px 8px 10px; }
.card-foot { padding: 12px 22px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }

.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); }
.g-side { grid-template-columns: minmax(0, 1fr) 360px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.mt { margin-top: 18px; } .mt-s { margin-top: 8px; } .mt-l { margin-top: 26px; }

/* stat tiles */
.stat { padding: 20px 22px; overflow: hidden; transition: border-color .2s, transform .2s var(--ease); }
.stat::before { content: ''; position: absolute; left: 22px; right: 22px; top: 0; height: 1px; background: var(--gold-line); opacity: .55; }
.stat[style*='cursor'] :hover, .stat[style*='cursor']:hover { border-color: var(--border-gold); }
.stat .label { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.stat .label .ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: transparent; color: var(--gold); box-shadow: inset 0 0 0 1px var(--border-gold); }
.stat .label .ic svg { width: 15px; height: 15px; }
.stat .label .ic.gold { color: var(--gold-2); background: rgb(var(--acc-rgb) / .07); }
:root[data-theme='light'] .stat .label .ic.gold { color: var(--gold-3); }
.stat .label .ic.green { color: var(--green); background: var(--green-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 30%, transparent); }
.stat .label .ic.red { color: var(--red); background: var(--red-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--red) 30%, transparent); }
.stat .label .ic.amber { color: var(--amber); background: var(--amber-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--amber) 30%, transparent); }
.stat .label .ic.blue { color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 30%, transparent); }
.stat .label .ic.violet { color: var(--violet); background: var(--violet-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--violet) 30%, transparent); }
.stat .label .ic.gray { color: var(--text-2); background: var(--gray-soft); box-shadow: inset 0 0 0 1px var(--border-2); }
.stat .value { margin-top: 16px; font-family: var(--display); font-size: 32px; line-height: 1; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat .value small { font-family: var(--font); font-size: 13.5px; font-weight: 600; color: var(--text-3); letter-spacing: 0; margin-left: 6px; }
.stat .hint { margin-top: 12px; font-size: 12.5px; color: var(--text-3); display: flex; gap: 12px; flex-wrap: wrap; }
.stat .hint b { color: var(--gold-ink); font-weight: 600; }
.stat .ring { position: absolute; right: 20px; top: 20px; }

/* badges & chips */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--gray-soft); color: var(--text-2); letter-spacing: .01em; }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.navy { background: var(--brand-soft); color: var(--gold-ink); box-shadow: inset 0 0 0 1px rgb(var(--acc-rgb) / .18); }
.badge.gold { background: var(--gold-soft); color: var(--gold-ink); box-shadow: inset 0 0 0 1px rgb(var(--acc-rgb) / .25); }
.badge.violet { background: var(--violet-soft); color: var(--violet); }
.badge.sm { height: 20px; padding: 0 8px; font-size: 10.5px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--border-2); background: var(--input-bg); font-size: 12.5px; font-weight: 500; color: var(--text-2); cursor: pointer; transition: all .18s; }
.chip:hover { border-color: var(--border-gold); color: var(--text); }
.chip.on { background: var(--gold-grad); border-color: transparent; color: var(--on-accent); font-weight: 600; box-shadow: 0 4px 14px -6px rgb(var(--acc-rgb) / .55); }
.chip svg { width: 14px; height: 14px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gray-dot); flex: none; }
.dot.green { background: var(--green-dot); } .dot.amber { background: var(--amber-dot); } .dot.red { background: var(--red-dot); } .dot.blue { background: var(--blue-dot); } .dot.gold { background: var(--gold-2); }
.dot.pulse { animation: ping 2s infinite; }

/* Uzbek licence plate (kept realistic: white plate, black type) */
.plate { display: inline-flex; align-items: stretch; height: 26px; border: 1.5px solid #111; border-radius: 5px; background: linear-gradient(180deg, #fff, #f1f1f1); color: #111; font-family: var(--font); font-weight: 700; font-size: 13px; letter-spacing: .04em; overflow: hidden; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); font-variant-numeric: tabular-nums; flex: none; }
.plate .reg { display: grid; place-items: center; padding: 0 6px; border-right: 1.5px solid #111; }
.plate .num { display: grid; place-items: center; padding: 0 7px; white-space: nowrap; }
.plate .uz { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0 5px 0 0; font-size: 7px; font-weight: 800; }
.plate .flag { width: 11px; height: 7px; border-radius: 1px; background: linear-gradient(#1eb5e0 0 32%, #ce1126 32% 36%, #fff 36% 64%, #ce1126 64% 68%, #1eb53a 68%); box-shadow: 0 0 0 .5px rgba(0, 0, 0, .25); }
.plate.lg { height: 34px; font-size: 17px; border-width: 2px; border-radius: 6px; }
.plate.lg .reg, .plate.lg .uz { border-right-width: 2px; }
.plate.lg .uz { font-size: 8.5px; }
.plate.lg .flag { width: 14px; height: 9px; }
.plate.sm { height: 22px; font-size: 11.5px; }

/* tables */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.tbl th { position: sticky; top: 0; z-index: 1; text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--gold); padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border-gold); white-space: nowrap; }
.tbl th:first-child { border-top-left-radius: 15px; } .tbl th:last-child { border-top-right-radius: 15px; }
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr { transition: background .15s; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr:hover { background: rgb(var(--acc-rgb) / .045); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl td.c, .tbl th.c { text-align: center; }
.tbl .strong { font-weight: 600; }
.tbl-card { padding: 0; overflow: hidden; }
.cell-car { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cell-car .t b { display: block; font-weight: 600; font-size: 13.5px; }
/* Only the line itself: a plate or chips placed inside keep their own spans ("01" alone was this rule). */
.cell-car .t > span { display: block; font-size: 12px; color: var(--text-3); }

/* lists */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; transition: background .15s; }
.li + .li { margin-top: 2px; }
.li.click { cursor: pointer; }
.li.click:hover { background: rgb(var(--acc-rgb) / .05); }
.li .meta { min-width: 0; flex: 1; }
.li .meta b { display: block; font-weight: 600; font-size: 13.5px; }
.li .meta span { display: block; font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .aside { text-align: right; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.ic-box { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border); }
.ic-box svg { width: 17px; height: 17px; }
.ic-box.navy, .ic-box.gold { background: rgb(var(--acc-rgb) / .08); color: var(--gold-2); box-shadow: inset 0 0 0 1px rgb(var(--acc-rgb) / .22); }
:root[data-theme='light'] .ic-box.navy, :root[data-theme='light'] .ic-box.gold { color: var(--gold-3); }
.ic-box.green { background: var(--green-soft); color: var(--green); box-shadow: none; }
.ic-box.red { background: var(--red-soft); color: var(--red); box-shadow: none; }
.ic-box.amber { background: var(--amber-soft); color: var(--amber); box-shadow: none; }
.ic-box.blue { background: var(--blue-soft); color: var(--blue); box-shadow: none; }
.ic-box.violet { background: var(--violet-soft); color: var(--violet); box-shadow: none; }
.ic-box.gray { background: var(--gray-soft); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border); }

/* forms */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label, .field > .lbl { font-size: 12.5px; font-weight: 600; color: var(--text-2); display: flex; gap: 6px; align-items: center; }
.field > label .req { color: var(--gold); }
.field .help { font-size: 12px; color: var(--text-3); }
.field .err { font-size: 12px; color: var(--red); font-weight: 500; }
.input, .select, .textarea { width: 100%; height: 42px; padding: 0 13px; border-radius: 11px; border: 1px solid var(--border-2); background: var(--input-bg); color: var(--text); font-size: 14px; transition: border-color .2s, box-shadow .2s; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: color-mix(in srgb, var(--gold) 30%, var(--border-2)); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--gold); box-shadow: var(--ring); }
.input.bad, .select.bad, .textarea.bad { border-color: var(--red-dot); }
.input[readonly] { background: var(--surface-2); }
.textarea { height: auto; min-height: 90px; padding: 11px 13px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23c9a24a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.select option { background: var(--surface); color: var(--text); }
.input-group { position: relative; display: flex; align-items: center; }
.input-group > svg { position: absolute; left: 13px; width: 16px; height: 16px; color: var(--gold); opacity: .8; pointer-events: none; }
.input-group > .input { padding-left: 38px; }
.input-group .suffix { position: absolute; right: 13px; font-size: 12.5px; color: var(--text-3); pointer-events: none; }
.input-group .input.has-suffix { padding-right: 54px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-section { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); grid-column: 1 / -1; margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--border); }
.form-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 11px; cursor: pointer; font-size: 13.5px; font-weight: 500; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 40px; height: 23px; border-radius: 12px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border-2); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ''; position: absolute; left: 3px; top: 3px; width: 17px; height: 17px; border-radius: 50%; background: #e7ecf2; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); transition: transform .2s var(--ease), background .2s; }
.switch input:checked + .track { background: var(--gold-grad); box-shadow: 0 0 12px rgb(var(--acc-rgb) / .35); }
.switch input:checked + .track::after { transform: translateX(17px); background: var(--on-accent); }
.switch input:focus-visible + .track { box-shadow: var(--ring); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; }
.check input { width: 16px; height: 16px; accent-color: var(--gold); }

.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--input-bg); border: 1px solid var(--border-2); gap: 2px; }
.seg button { height: 31px; padding: 0 13px; border: 0; background: transparent; border-radius: 9px; font-size: 12.5px; font-weight: 700; color: var(--text-3); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: all .18s; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button.on { background: linear-gradient(180deg, rgb(var(--acc-rgb) / .18), rgb(var(--acc-rgb) / .08)); color: var(--gold-ink); box-shadow: inset 0 0 0 1px rgb(var(--acc-rgb) / .35); }
.seg button .n { font-size: 11px; color: var(--text-3); font-weight: 600; }
.seg button.on .n { color: var(--gold); }
.seg button svg { width: 15px; height: 15px; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; height: 44px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--text-3); white-space: nowrap; transition: color .2s; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--gold-ink); }
.tab.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--gold-grad); box-shadow: 0 0 10px rgb(var(--acc-rgb) / .6); }
.tab svg { width: 16px; height: 16px; }
.tab .count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center; font-size: 11px; background: var(--surface-3); color: var(--text-2); }
.tab .count.hot { background: var(--gold-grad); color: var(--on-accent); }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar .input-group { width: 310px; max-width: 100%; }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 52px 24px; color: var(--text-2); }
.empty .em-ic { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 30% 25%, rgb(var(--acc-rgb) / .22), rgb(var(--acc-rgb) / .04)); color: var(--gold-2); margin-bottom: 18px; box-shadow: inset 0 0 0 1px rgb(var(--acc-rgb) / .3), 0 0 30px -8px rgb(var(--acc-rgb) / .4); }
:root[data-theme='light'] .empty .em-ic { color: var(--gold-3); }
.empty .em-ic svg { width: 26px; height: 26px; }
.empty h4 { font-size: 17px; font-weight: 700; color: var(--text); }
.empty p { margin-top: 8px; font-size: 13.5px; max-width: 460px; line-height: 1.6; }
.empty .actions { margin-top: 20px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.empty.sm { padding: 30px 16px; }
.empty.sm .em-ic { width: 46px; height: 46px; margin-bottom: 12px; }
.empty.sm h4 { font-size: 15.5px; }
.skel { position: relative; overflow: hidden; background: var(--surface-3); border-radius: 8px; }
.skel::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgb(var(--acc-rgb) / .07), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* overlays */
.overlay { position: fixed; inset: 0; z-index: 100; background: var(--backdrop); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; padding: 24px; animation: fadeIn .2s var(--ease); }
@keyframes fadeIn { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); border: 1px solid var(--border-gold); animation: modalIn .24s var(--ease); overflow: hidden; position: relative; }
.modal::before, .drawer::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--gold-line); z-index: 1; }
.modal.lg { width: min(840px, 100%); }
.modal.xl { width: min(1100px, 100%); }
.modal.sm { width: min(420px, 100%); }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 22px 24px 6px; }
.modal-head h3 { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.modal-head p { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.modal-head .x { margin-left: auto; }
.modal-body { padding: 18px 24px 22px; overflow-y: auto; }
.modal-foot { padding: 14px 24px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; justify-content: flex-end; background: var(--surface-2); }
.drawer-wrap { position: fixed; inset: 0; z-index: 90; background: var(--backdrop); animation: fadeIn .2s var(--ease); }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--surface); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: drawerIn .28s var(--ease); border-left: 1px solid var(--border-gold); }
.drawer.wide { width: min(780px, 100%); }
@keyframes drawerIn { from { transform: translateX(28px); opacity: 0; } }

.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 440px; padding: 13px 16px; border-radius: 14px; background: #04213a; color: #edf2f8; box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .7), inset 0 0 0 1px rgb(var(--acc-rgb) / .3); font-size: 13.5px; font-weight: 500; animation: toastIn .3s var(--ease); }
.toast svg { width: 18px; height: 18px; flex: none; }
.toast.ok svg { color: var(--gold-2); } .toast.err svg { color: #f87171; } .toast.info svg { color: var(--gold-2); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }

.menu { position: absolute; z-index: 60; min-width: 210px; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border-gold); box-shadow: var(--shadow-lg); animation: modalIn .16s var(--ease); }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; width: 100%; height: 37px; padding: 0 10px; border: 0; background: none; border-radius: 9px; font-size: 13.5px; font-weight: 500; color: var(--text); cursor: pointer; text-align: left; }
.menu button:hover, .menu a:hover { background: rgb(var(--acc-rgb) / .08); }
.menu svg { width: 16px; height: 16px; color: var(--gold); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 6px 4px; }
.menu .danger, .menu .danger svg { color: var(--red); }

.palette { width: min(660px, 100%); align-self: start; margin-top: 10vh; background: var(--surface); border-radius: 20px; border: 1px solid var(--border-gold); box-shadow: var(--shadow-lg); overflow: hidden; animation: modalIn .2s var(--ease); }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 0 20px; height: 60px; border-bottom: 1px solid var(--border); }
.palette-input svg { width: 18px; height: 18px; color: var(--gold); }
.palette-input input { flex: 1; border: 0; background: none; outline: none; font-size: 16px; color: var(--text); }
.palette-list { max-height: 440px; overflow-y: auto; padding: 8px; }
.palette-group { padding: 10px 10px 5px; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 11px; cursor: pointer; }
.palette-item.on { background: rgb(var(--acc-rgb) / .1); box-shadow: inset 0 0 0 1px rgb(var(--acc-rgb) / .22); }
.palette-item .meta b { display: block; font-size: 14px; font-weight: 600; }
.palette-item .meta span { display: block; font-size: 12px; color: var(--text-3); }

.bar { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; box-shadow: inset 0 0 0 1px var(--border); }
.bar > i { display: block; height: 100%; border-radius: 6px; background: var(--gold-grad); transition: width .6s var(--ease); }
.bar.green > i { background: linear-gradient(90deg, #2bb673, #6ee7a8); } .bar.amber > i { background: linear-gradient(90deg, #d97706, #f5c46b); } .bar.red > i { background: linear-gradient(90deg, #b91c1c, #f87171); } .bar.gold > i { background: var(--gold-grad); }

.kv { display: grid; grid-template-columns: minmax(84px, 36%) minmax(0, 1fr); gap: 11px 16px; font-size: 13.5px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: break-word; }

.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; background: linear-gradient(135deg, rgb(var(--acc-rgb) / .09), rgb(var(--acc-rgb) / .03)); color: var(--text); font-size: 13.5px; border: 1px solid rgb(var(--acc-rgb) / .22); line-height: 1.55; }
.notice svg { width: 18px; height: 18px; flex: none; color: var(--gold-2); margin-top: 1px; }
:root[data-theme='light'] .notice svg { color: var(--gold-3); }
.notice.gold { background: linear-gradient(135deg, rgb(var(--acc-rgb) / .14), rgb(var(--acc-rgb) / .05)); border-color: rgb(var(--acc-rgb) / .32); }
.notice.red { background: var(--red-soft); border-color: color-mix(in srgb, var(--red-dot) 30%, transparent); }
.notice.red svg { color: var(--red); }
.notice.blue { background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue-dot) 30%, transparent); }
.notice.blue svg { color: var(--blue); }
.notice.green { background: var(--green-soft); border-color: color-mix(in srgb, var(--green-dot) 30%, transparent); }
.notice.green svg { color: var(--green); }
.notice.amber { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber-dot) 30%, transparent); }
.notice.amber svg { color: var(--amber); }
.notice > div > .btn { margin-left: 6px; vertical-align: middle; }
.notice b { font-weight: 650; }
.notice ol { margin: 8px 0 0; padding-left: 18px; }
.notice li { margin: 3px 0; }

.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; color: var(--gold-2); background: radial-gradient(circle at 30% 25%, #2a2416, #0b0b0c); letter-spacing: .04em; box-shadow: inset 0 0 0 1px rgb(var(--acc-rgb) / .4); }
.avatar.gold { background: var(--gold-grad); color: var(--on-accent); box-shadow: 0 0 14px -2px rgb(var(--acc-rgb) / .5); }
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
:root[data-theme='light'] .avatar:not(.gold) { background: #043e66; color: #ffffff; }

/* ------------------------------------------------------------------ sign-in (studio photo, form on the right) */
.auth { --auth-gold: #8fbde8; --auth-gold-2: #b9d6f2; --auth-text: #f2f0ec; --auth-muted: #a3a3a6; position: relative; min-height: 100vh; overflow: hidden; background: #18191d; color: var(--auth-text); font-family: var(--font); }
.auth-bg { position: absolute; inset: 0; background: url(/assets/login-bg.jpg) left center / cover no-repeat; }
.auth-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 15, 18, 0) 55%, rgba(14, 15, 18, .28) 100%); }
.auth-top { position: absolute; z-index: 2; left: 0; right: 0; top: 0; display: flex; align-items: flex-start; justify-content: space-between; padding: clamp(28px, 4.6vh, 52px) clamp(28px, 3.5vw, 64px); }
.auth-wordmark { display: flex; flex-direction: column; align-items: center; color: #c9ab7d; user-select: none; }
.auth-wordmark b { font-family: var(--display); font-weight: 500; font-size: clamp(19px, 1.62vw, 30px); letter-spacing: .32em; margin-right: -.32em; line-height: 1; }
.auth-wordmark span { margin-top: clamp(5px, .5vw, 9px); font-family: var(--display); font-weight: 500; font-size: clamp(7.5px, .62vw, 11px); letter-spacing: .42em; margin-right: -.42em; color: #b9a07a; }
.auth-lang { display: flex; align-items: center; gap: 10px; font-size: clamp(12.5px, 1vw, 15px); font-weight: 600; letter-spacing: .04em; color: #8f8f93; margin-top: 6px; }
.auth-lang button { border: 0; background: none; padding: 2px 0; cursor: pointer; color: #9c9ca0; font: inherit; letter-spacing: inherit; transition: color .2s; }
.auth-lang button:hover { color: var(--auth-text); }
.auth-lang button.on { color: var(--auth-gold); }
.auth-form { position: absolute; z-index: 2; right: clamp(24px, 3.4vw, 72px); top: 50%; transform: translateY(-50%); width: clamp(320px, 26vw, 500px); display: flex; flex-direction: column; animation: authIn .6s var(--ease) both; }
@keyframes authIn { from { opacity: 0; transform: translate(12px, -50%); } }
.auth-form h1 { font-family: var(--font); font-size: clamp(30px, 2.85vw, 52px); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; color: #fff; }
.auth-sub { margin-top: clamp(8px, .9vh, 12px); font-size: clamp(15px, 1.33vw, 22px); font-weight: 500; color: var(--auth-muted); }
.auth-label { margin-top: clamp(26px, 3.2vh, 40px); margin-bottom: 10px; font-size: clamp(14px, 1.1vw, 18px); font-weight: 500; color: #e9e8e5; }
.auth-sub + .auth-label { margin-top: clamp(34px, 4.6vh, 56px); }
.auth-input { width: 100%; height: clamp(46px, 3.6vw, 60px); padding: 0 clamp(14px, 1.15vw, 20px); border-radius: 7px; border: 1px solid #3b3c41; background: rgba(38, 39, 44, .78); color: #f2f0ec; font: inherit; font-size: clamp(14px, 1.1vw, 18px); font-weight: 500; transition: border-color .2s, box-shadow .2s, background .2s; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.auth-input::placeholder { color: #8e8e93; font-weight: 500; }
.auth-input:hover { border-color: #4a4b51; }
.auth-input:focus { outline: none; border-color: var(--auth-gold); box-shadow: 0 0 0 3px rgba(111, 168, 220, .25); background: rgba(40, 41, 46, .92); }
.auth-input:-webkit-autofill, .auth-input:-webkit-autofill:hover, .auth-input:-webkit-autofill:focus { -webkit-text-fill-color: #f2f0ec; -webkit-box-shadow: 0 0 0 100px #26272c inset; caret-color: #f2f0ec; transition: background-color 9999s; }
.auth-pass { position: relative; }
.auth-pass .auth-input { padding-right: 52px; letter-spacing: .02em; }
.auth-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; border-radius: 8px; background: none; color: #b8b8bc; display: grid; place-items: center; cursor: pointer; transition: color .2s, background .2s; }
.auth-eye:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.auth-eye svg { width: clamp(18px, 1.35vw, 22px); height: clamp(18px, 1.35vw, 22px); }
.auth-row { margin-top: clamp(24px, 3vh, 34px); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-check { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: clamp(13.5px, 1.05vw, 17px); font-weight: 500; color: #e9e8e5; user-select: none; }
.auth-check input { position: absolute; opacity: 0; pointer-events: none; }
.auth-check .box { width: 20px; height: 20px; border-radius: 4px; border: 1.5px solid #7c7c80; display: grid; place-items: center; transition: background .2s, border-color .2s; }
.auth-check .box svg { width: 14px; height: 14px; color: #17181b; opacity: 0; transition: opacity .15s; stroke-width: 3; }
.auth-check input:checked + .box { background: var(--auth-gold); border-color: var(--auth-gold); }
.auth-check input:checked + .box svg { opacity: 1; }
.auth-check input:focus-visible + .box { box-shadow: 0 0 0 3px rgba(111, 168, 220, .3); }
.auth-link { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; font-size: clamp(13px, 1vw, 16px); font-weight: 500; color: var(--auth-gold); transition: color .2s; }
.auth-link:hover { color: var(--auth-gold-2); text-decoration: underline; text-underline-offset: 3px; }
.auth-msg { margin-top: 18px; padding: 11px 14px; border-radius: 7px; font-size: 13.5px; line-height: 1.5; color: #e9e8e5; background: rgba(111, 168, 220, .1); border: 1px solid rgba(111, 168, 220, .3); }
.auth-msg.err { color: #ffb4ad; background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .35); }
.auth-btn { margin-top: clamp(26px, 3.6vh, 40px); height: clamp(48px, 3.7vw, 62px); border: 0; border-radius: 7px; background: linear-gradient(180deg, #4f8ccb, #3b74ae); color: #ffffff; font: inherit; font-size: clamp(15px, 1.15vw, 19px); font-weight: 700; letter-spacing: .01em; cursor: pointer; display: grid; place-items: center; box-shadow: 0 10px 26px -14px rgba(111, 168, 220, .7), inset 0 1px 0 rgba(255, 255, 255, .28); transition: filter .2s, transform .06s, box-shadow .2s; }
.auth-btn:hover { filter: brightness(1.06); box-shadow: 0 14px 30px -14px rgba(111, 168, 220, .85), inset 0 1px 0 rgba(255, 255, 255, .3); }
.auth-btn:active { transform: translateY(1px); }
.auth-btn:disabled { opacity: .75; cursor: progress; }
.auth-btn .spin { width: 20px; height: 20px; border: 2.5px solid #19191b; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.auth-help { margin-top: clamp(22px, 3vh, 32px); align-self: center; border: 0; background: none; padding: 4px 8px; cursor: pointer; font: inherit; font-size: clamp(13.5px, 1.05vw, 17px); font-weight: 500; color: #b7b2a8; transition: color .2s; }
.auth-help:hover { color: var(--auth-gold); }
@media (max-width: 860px) {
  .auth { display: flex; flex-direction: column; }
  .auth-bg { position: relative; inset: auto; height: 46vh; min-height: 280px; background-position: 22% 62%; background-size: cover; }
  .auth-bg::after { background: linear-gradient(180deg, rgba(24, 25, 29, 0) 55%, #18191d 100%); }
  .auth-form { position: relative; right: auto; top: auto; transform: none; width: auto; padding: 0 24px 40px; margin-top: -24px; animation: none; }
  .auth-top { padding: 22px 22px; }
}
@media (max-width: 860px) and (orientation: landscape) { .auth-bg { height: 60vh; } }

/* ------------------------------------------------------------------ map */
.map-page { position: relative; height: calc(100vh - var(--top-h)); }
.map-page .map-canvas { position: absolute; inset: 0; background: #031627; }
.map-panel { position: absolute; z-index: 5; top: 18px; left: 18px; bottom: 18px; width: 356px; display: flex; flex-direction: column; border-radius: 20px; background: var(--glass); backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%); border: 1px solid var(--border-gold); box-shadow: var(--shadow-lg); overflow: hidden; }
.map-panel::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--gold-line); }
.map-panel-head { padding: 18px 18px 14px; border-bottom: 1px solid var(--border); }
.map-panel-head h2 { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.map-panel-head h2 svg { color: var(--gold); }
.map-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.map-stat { padding: 10px 11px; border-radius: 13px; background: var(--input-bg); border: 1px solid var(--border-2); cursor: pointer; transition: all .2s; text-align: left; color: var(--text); }
.map-stat:hover { border-color: var(--border-gold); }
.map-stat.on { border-color: var(--gold); box-shadow: var(--ring); }
.map-stat b { display: block; font-family: var(--display); font-size: 21px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.map-stat span { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-3); font-weight: 600; margin-top: 3px; }
.map-list { flex: 1; overflow-y: auto; padding: 8px; }
.map-car { display: flex; align-items: center; gap: 11px; padding: 11px; border-radius: 13px; cursor: pointer; transition: background .15s; }
.map-car:hover { background: rgb(var(--acc-rgb) / .05); }
.map-car.on { background: rgb(var(--acc-rgb) / .09); box-shadow: inset 0 0 0 1px rgb(var(--acc-rgb) / .3); }
.map-car .meta { flex: 1; min-width: 0; }
.map-car .meta b { display: block; font-size: 13.5px; font-weight: 600; }
.map-car .meta span { display: block; font-size: 12px; color: var(--text-3); }
.map-car .spd { font-size: 12.5px; font-weight: 600; color: var(--gold-ink); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.map-car .spd small { display: block; font-weight: 500; color: var(--text-3); font-size: 11px; }
.map-float { position: absolute; z-index: 5; right: 18px; top: 18px; display: flex; gap: 8px; }
.map-float .btn { background: var(--glass); backdrop-filter: blur(12px); border-color: var(--border-gold); }
.map-detail { position: absolute; z-index: 6; left: 392px; bottom: 18px; width: min(460px, calc(100% - 412px)); border-radius: 20px; background: var(--glass); backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%); border: 1px solid var(--border-gold); box-shadow: var(--shadow-lg); padding: 18px; animation: modalIn .24s var(--ease); }
.map-detail h3 { letter-spacing: -.02em; }
.map-detail .grid { gap: 10px; }
.mini-kv { padding: 11px 13px; border-radius: 13px; background: var(--input-bg); border: 1px solid var(--border); container-type: inline-size; min-width: 0; }
.mini-kv span { display: block; font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.mini-kv b { display: block; margin-top: 3px; font-family: var(--display); font-size: clamp(13px, 13cqi, 15.5px); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-empty { position: absolute; z-index: 7; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(470px, calc(100% - 32px)); }
.map-empty .card { box-shadow: var(--shadow-lg); border-color: var(--border-gold); }

/* car marker — black disc with a gold ring */
.cm { position: relative; cursor: pointer; }
.cm-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #0d4a7a, #02182b); border: 2px solid var(--gold); box-shadow: 0 6px 14px rgba(0, 0, 0, .55); transition: transform .25s var(--ease), box-shadow .25s; }
.cm-dot svg { width: 15px; height: 15px; color: var(--gold-2); }
.cm.moving .cm-dot { background: linear-gradient(135deg, #cfe3f7, #6fa8dc 45%, #3b74ae); border-color: #e8f2fc; animation: markerGlow 2.2s infinite; }
.cm.moving .cm-dot svg { color: var(--on-accent); }
.cm.offline .cm-dot { background: #0b2a45; border-color: #55524d; }
.cm.offline .cm-dot svg { color: #7c776f; }
.cm.on .cm-dot { transform: scale(1.22); box-shadow: 0 0 0 7px rgb(var(--acc-rgb) / .28), 0 10px 22px rgba(0, 0, 0, .6); }
@keyframes markerGlow { 0% { box-shadow: 0 0 0 0 rgb(var(--acc-rgb) / .55), 0 6px 14px rgba(0, 0, 0, .5); } 70% { box-shadow: 0 0 0 12px rgb(var(--acc-rgb) / 0), 0 6px 14px rgba(0, 0, 0, .5); } 100% { box-shadow: 0 0 0 0 rgb(var(--acc-rgb) / 0), 0 6px 14px rgba(0, 0, 0, .5); } }
.cm-arrow { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.cm-arrow::before { content: ''; position: absolute; left: -6px; top: -27px; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 9px solid var(--gold-2); filter: drop-shadow(0 0 4px rgb(var(--acc-rgb) / .8)); }
.cm-label { position: absolute; left: 50%; top: 36px; transform: translateX(-50%); padding: 2px 8px; border-radius: 8px; background: rgba(2, 18, 33, .92); color: var(--gold-2); font-size: 10.5px; font-weight: 700; white-space: nowrap; box-shadow: 0 4px 10px rgba(0, 0, 0, .45), inset 0 0 0 1px rgb(var(--acc-rgb) / .35); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.maplibregl-ctrl-bottom-right, .maplibregl-ctrl-top-right { z-index: 4; }
.maplibregl-ctrl-group { border-radius: 12px !important; box-shadow: var(--shadow) !important; overflow: hidden; background: var(--glass) !important; border: 1px solid var(--border-gold); }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--border) !important; }
:root:not([data-theme='light']) .maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(78%) sepia(40%) saturate(500%) hue-rotate(5deg); }
.maplibregl-ctrl-attrib { font-size: 10px; border-radius: 8px 0 0 0; background: rgba(2, 18, 33, .7) !important; color: #8d877d; }
.maplibregl-ctrl-attrib a { color: #8796a8 !important; }
:root[data-theme='light'] .maplibregl-ctrl-attrib { background: rgba(255, 255, 255, .7) !important; }
.map-mini { position: relative; height: 350px; border-radius: 0 0 var(--radius-lg) var(--radius-lg); overflow: hidden; }

/* ------------------------------------------------------------------ fleet */
.car-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.car-card { padding: 18px; cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; display: flex; flex-direction: column; gap: 15px; overflow: hidden; }
.car-card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(400px 120px at 100% 0%, rgb(var(--acc-rgb) / .09), transparent 70%); pointer-events: none; opacity: 0; transition: opacity .3s; }
.car-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-gold); }
.car-card:hover::after { opacity: 1; }
.car-card .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.car-card h4 { font-size: 16.5px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.car-card .sub { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.car-card .plate { align-self: flex-start; }
.car-card .facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.car-card .fact { padding: 9px 11px; border-radius: 11px; background: var(--input-bg); border: 1px solid var(--border); }
.car-card .fact span { display: block; font-size: 11px; color: var(--text-3); font-weight: 600; }
.car-card .fact b { display: block; margin-top: 2px; font-family: var(--display); font-size: 13.5px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.car-card .foot { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); border-top: 1px solid var(--border); padding-top: 13px; }

.car-hero { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.car-hero .car-icon { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 30% 25%, rgb(var(--acc-rgb) / .25), rgb(var(--acc-rgb) / .03)); color: var(--gold-2); box-shadow: inset 0 0 0 1px rgb(var(--acc-rgb) / .4), 0 0 30px -10px rgb(var(--acc-rgb) / .6); }
:root[data-theme='light'] .car-hero .car-icon { color: var(--gold-3); }
.car-hero .car-icon svg { width: 30px; height: 30px; }
.car-hero h1 { font-size: 26px; font-weight: 700; letter-spacing: -.025em; }
.car-hero .hero-main { flex: 1 1 260px; min-width: 0; }
.car-hero .meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.hero-card { padding: 22px 24px !important; overflow: clip; }
.hero-card::after { content: ''; position: absolute; right: -80px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgb(var(--acc-rgb) / .12), transparent 65%); pointer-events: none; }

.due-card { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.due-card .t { display: flex; align-items: center; gap: 10px; }
.due-card .t b { font-size: 14px; font-weight: 650; }
.due-card .nums { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; gap: 8px; }
.due-card .big { font-family: var(--display); font-size: 23px; font-weight: 700; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }

.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 10px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(180deg, rgb(var(--acc-rgb) / .6), rgb(var(--acc-rgb) / .08)); }
.tl-item { position: relative; padding: 0 0 20px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item .pin { position: absolute; left: -28px; top: 1px; width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1.5px solid var(--gold); box-shadow: 0 0 10px -2px rgb(var(--acc-rgb) / .5); }
.tl-item .pin svg { width: 10px; height: 10px; color: var(--gold); }
.tl-item.tg .pin { border-color: #2aabee; box-shadow: 0 0 10px -2px rgba(42, 171, 238, .5); } .tl-item.tg .pin svg { color: #2aabee; }
.tl-item .when { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tl-item .what { font-weight: 600; font-size: 14px; margin-top: 2px; }
.tl-item .detail { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.tl-item .quote { margin-top: 8px; padding: 9px 12px; border-radius: 11px; background: var(--input-bg); border: 1px solid var(--border); border-left: 2px solid #2aabee; font-size: 12.5px; color: var(--text-2); white-space: pre-wrap; }

/* ------------------------------------------------------------------ bookings timeline */
.gantt { position: relative; overflow: auto; max-height: calc(100vh - 270px); }
.gantt-grid { display: grid; min-width: max-content; }
.g-cell { height: 54px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); }
.g-head { position: sticky; top: 0; z-index: 3; height: 56px; background: var(--surface-2); border-bottom: 1px solid var(--border-gold); border-right: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 10.5px; color: var(--text-3); font-weight: 700; letter-spacing: .04em; }
.g-head b { font-family: var(--display); font-size: 16px; color: var(--text); font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.g-head.today { background: linear-gradient(180deg, rgb(var(--acc-rgb) / .2), rgb(var(--acc-rgb) / .06)); color: var(--gold-ink); }
.g-head.today b { color: var(--gold-ink); }
.g-head.weekend b { color: var(--gold); }
.g-car { position: sticky; left: 0; z-index: 2; background: var(--surface); display: flex; align-items: center; gap: 10px; padding: 0 14px; border-right: 1px solid var(--border-gold); border-bottom: 1px solid var(--border); height: 54px; }
.g-car .t { min-width: 0; }
.g-car .t b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-car .t span { display: block; font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-corner { position: sticky; left: 0; top: 0; z-index: 4; background: var(--surface-2); border-right: 1px solid var(--border-gold); border-bottom: 1px solid var(--border-gold); display: flex; align-items: center; padding: 0 14px; font-size: 11px; font-weight: 700; color: var(--gold); letter-spacing: .08em; text-transform: uppercase; }
.g-slot { cursor: copy; transition: background .15s; }
.g-slot:hover { background: rgb(var(--acc-rgb) / .07); }
.g-slot.today { background: rgb(var(--acc-rgb) / .045); }
.g-bar { position: absolute; height: 36px; border-radius: 11px; padding: 0 12px; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; cursor: pointer; overflow: hidden; white-space: nowrap; transition: transform .15s, box-shadow .15s; z-index: 1; }
.g-bar:hover { transform: translateY(-1px); z-index: 2; }
.g-bar.pending { background: repeating-linear-gradient(135deg, rgb(var(--acc-rgb) / .16), rgb(var(--acc-rgb) / .16) 7px, rgb(var(--acc-rgb) / .07) 7px, rgb(var(--acc-rgb) / .07) 14px); color: var(--gold-ink); box-shadow: inset 0 0 0 1px rgb(var(--acc-rgb) / .55); }
.g-bar.confirmed { background: var(--gold-grad); color: var(--on-accent); box-shadow: 0 6px 16px -6px rgb(var(--acc-rgb) / .55); }
.g-bar.active { background: linear-gradient(135deg, #dbe7f3, #b9cde2); color: #0b3a63; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .6), inset 0 0 0 1px rgb(var(--acc-rgb) / .6); }
:root[data-theme='light'] .g-bar.active { background: linear-gradient(135deg, #0a5288, #043e66); color: #ffffff; }
.g-bar.completed { background: var(--surface-3); color: var(--text-3); box-shadow: inset 0 0 0 1px var(--border-2); }
.g-bar span { overflow: hidden; text-overflow: ellipsis; }
.legend { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.legend i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-right: 7px; vertical-align: 0; }

.stepper { display: flex; align-items: center; }
.step { display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 600; color: var(--text-3); white-space: nowrap; }
.step .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; border: 1.5px solid var(--border-2); background: var(--surface); }
.step.done { color: var(--text); }
.step.done .n { background: var(--gold-grad); border-color: transparent; color: var(--on-accent); }
.step.cur .n { border-color: var(--gold); color: var(--gold-ink); box-shadow: 0 0 0 4px rgb(var(--acc-rgb) / .14), 0 0 14px rgb(var(--acc-rgb) / .35); }
.step.cur { color: var(--gold-ink); }
.step-line { flex: 1; height: 1px; min-width: 18px; margin: 0 12px; background: var(--border-2); }
.step-line.done { background: var(--gold-grad); height: 2px; }

.summary { position: relative; border-radius: 18px; background: radial-gradient(120% 80% at 100% 0%, rgb(var(--acc-rgb) / .16), transparent 60%), linear-gradient(170deg, #073058, #021526); color: #edf2f8; padding: 20px; border: 1px solid rgb(var(--acc-rgb) / .3); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .8); overflow: hidden; }
.summary::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--gold-line); }
.summary .ln { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: rgba(237, 242, 248, .6); padding: 5px 0; font-variant-numeric: tabular-nums; }
.summary .ln b { color: #edf2f8; font-weight: 600; }
.summary .tot { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid rgb(var(--acc-rgb) / .22); margin-top: 12px; padding-top: 14px; }
.summary .tot b { font-family: var(--display); font-size: 26px; font-weight: 800; letter-spacing: -.03em; background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: lining-nums tabular-nums; }
.summary-title { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 700; }

/* kanban */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; scroll-snap-type: x proximity; }
.kanban > .k-col { scroll-snap-align: start; }
.k-result { gap: 0; }
.k-zone { display: flex; flex-direction: column; min-height: 0; max-height: calc((100vh - 240px) / 2); border-radius: 18px; transition: background .2s, box-shadow .2s; }
.k-zone + .k-zone { border-top: 1px solid var(--border); }
.k-zone.over { background: rgb(var(--acc-rgb) / .07); box-shadow: inset 0 0 0 1px var(--gold); }
.k-empty { font-size: 12.5px; text-align: center; padding: 18px 6px; border: 1.5px dashed var(--border-2); border-radius: 12px; color: var(--text-3); }
.k-card b { overflow-wrap: anywhere; }
@media (max-width: 1100px) { .kanban { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(250px, 78vw); } }
.k-col { background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--border); border-radius: 18px; display: flex; flex-direction: column; max-height: calc(100vh - 240px); transition: background .2s, border-color .2s; }
.k-col.over { background: rgb(var(--acc-rgb) / .07); border-color: var(--gold); }
.k-head { display: flex; align-items: center; gap: 9px; padding: 14px 16px 10px; font-family: var(--display); font-size: 13px; font-weight: 700; letter-spacing: -.01em; color: var(--text); border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.k-head .n { margin-left: auto; font-size: 13px; color: var(--gold-ink); font-weight: 700; }
.k-list { flex: 1; overflow-y: auto; padding: 4px 10px 12px; display: flex; flex-direction: column; gap: 9px; min-height: 60px; }
.k-card { padding: 13px; border-radius: 14px; background: var(--card-bg); border: 1px solid var(--border-2); cursor: grab; transition: box-shadow .2s, transform .2s, border-color .2s; }
.k-card:hover { box-shadow: var(--shadow); border-color: var(--border-gold); }
.k-card.dragging { opacity: .5; transform: rotate(1.5deg); }
.k-card b { display: block; font-size: 14px; font-weight: 700; }
.k-card .ph { font-size: 12.5px; color: var(--text-2); margin-top: 3px; font-variant-numeric: tabular-nums; }
.k-card .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.k-card .ft { display: flex; align-items: center; justify-content: space-between; margin-top: 11px; font-size: 11.5px; color: var(--text-3); }

/* agent chat */
.chat { display: grid; grid-template-columns: 310px 1fr; gap: 18px; height: calc(100vh - var(--top-h) - 150px); min-height: 480px; }
.chat-side { padding: 20px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.chat-side h3 { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.suggest { text-align: left; padding: 12px 14px; border-radius: 13px; border: 1px solid var(--border-2); background: var(--input-bg); cursor: pointer; font-size: 13px; color: var(--text); line-height: 1.45; transition: all .2s; }
.suggest:hover { border-color: var(--border-gold); background: rgb(var(--acc-rgb) / .06); }
.chat-main { display: flex; flex-direction: column; overflow: hidden; }
.chat-log { flex: 1; overflow-y: auto; padding: 26px; display: flex; flex-direction: column; gap: 18px; }
.msg { display: flex; gap: 12px; max-width: 780px; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg .bubble { padding: 13px 16px; border-radius: 18px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.me .bubble { background: var(--gold-grad); color: var(--on-accent); border-bottom-right-radius: 6px; font-weight: 500; }
.msg.ai .bubble { background: var(--surface-2); border: 1px solid var(--border-2); border-bottom-left-radius: 6px; }
.msg .tools { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.ai-av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: radial-gradient(circle at 30% 25%, #0d4a7a, #02182b); color: var(--gold-2); box-shadow: inset 0 0 0 1px rgb(var(--acc-rgb) / .45), 0 0 16px -4px rgb(var(--acc-rgb) / .5); }
.ai-av svg { width: 17px; height: 17px; }
.typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.chat-input { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--border); background: var(--surface-2); }
.chat-input .textarea { min-height: 48px; max-height: 160px; resize: none; }

/* contract template editor */
.tpl-editor { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; }
.rte-bar { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--border); flex-wrap: wrap; background: var(--surface-2); }
.rte-bar button { height: 31px; min-width: 31px; padding: 0 8px; border: 0; border-radius: 8px; background: none; cursor: pointer; font-weight: 700; font-size: 13px; color: var(--text-2); }
.rte-bar button:hover { background: rgb(var(--acc-rgb) / .1); color: var(--gold-ink); }
.rte { min-height: 560px; max-height: calc(100vh - 320px); overflow-y: auto; padding: 34px 40px; outline: none; font-size: 13.5px; line-height: 1.65; background: #ffffff; color: #161616; }
.rte h1 { font-size: 18px; margin: 0 0 12px; } .rte h2 { font-size: 15px; margin: 18px 0 8px; color: #0b3a63; }
.rte table { width: 100%; border-collapse: collapse; margin: 8px 0; } .rte td, .rte th { border: 1px solid #d3dbe4; padding: 5px 8px; vertical-align: top; text-align: left; } .rte th { background: #eef2f6; font-weight: 600; width: 22%; }
.rte table.plain td, .rte table.parties td { border: 0; }
.rte .note { padding: 10px 12px; border: 1px dashed #6f98c4; border-radius: 8px; background: #eef4fa; }
.ph-list { max-height: calc(100vh - 320px); overflow-y: auto; }
.ph-group { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin: 16px 0 6px; }
.ph-group:first-child { margin-top: 0; }
.ph { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; border: 0; border-radius: 9px; background: none; cursor: pointer; font-size: 12.5px; text-align: left; color: var(--text); }
.ph:hover { background: rgb(var(--acc-rgb) / .08); }
.ph code { font-family: var(--mono); font-size: 10.5px; color: var(--text-3); }
.contract-preview { background: #fff; color: #111; padding: 34px; border-radius: 12px; font-size: 13px; line-height: 1.55; }
.contract-preview table { width: 100%; border-collapse: collapse; } .contract-preview td, .contract-preview th { border: 1px solid #cfcfcf; padding: 5px 8px; text-align: left; vertical-align: top; }
.contract-preview .blank { display: inline-block; min-width: 90px; border-bottom: 1px solid #555; }

/* telegram inbox */
.tg-msg { padding: 18px; display: grid; grid-template-columns: 1fr 340px; gap: 20px; }
.tg-bubble { padding: 13px 15px; border-radius: 4px 16px 16px 16px; background: var(--input-bg); border: 1px solid var(--border-2); font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tg-from { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); margin-bottom: 9px; flex-wrap: wrap; }
.tg-from b { color: #2aabee; font-weight: 650; }
.parse-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 11px; align-items: center; }

.steps-list { counter-reset: s; display: flex; flex-direction: column; gap: 12px; }
.steps-list > div { counter-increment: s; position: relative; padding-left: 38px; min-height: 26px; font-size: 13.5px; line-height: 1.6; padding-top: 2px; }
.steps-list > div::before { content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 12px; font-weight: 700; color: var(--gold-2); box-shadow: inset 0 0 0 1px rgb(var(--acc-rgb) / .45); background: rgb(var(--acc-rgb) / .06); }
:root[data-theme='light'] .steps-list > div::before { color: var(--gold-3); }
.code-inline { font-family: var(--mono); font-size: 12px; padding: 1px 6px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--border); }
.ring-chart circle { transition: stroke-dashoffset .9s var(--ease); }
.ring-chart text { font-family: var(--display); }

/* combobox selected value */
button.input .meta { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex: 1; }
button.input .meta b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
button.input .meta span { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field.mono .input { font-family: var(--mono); }
.field.mono > label { font-family: var(--font); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1280px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tg-msg { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .g-main, .g-side, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .tpl-editor { grid-template-columns: 1fr; }
  .chat { grid-template-columns: 1fr; }
  .chat-side { display: none; }
}
@media (max-width: 1024px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 284px; transform: translateX(-100%); transition: transform .28s var(--ease); }
  .shell.nav-open .side { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, .8); }
  .nav-scrim { position: fixed; inset: 0; z-index: 25; background: var(--backdrop); }
  .btn.menu-btn { display: inline-flex; }
  .search-trigger { width: 40px; padding: 0; justify-content: center; }
  .search-trigger span, .search-trigger kbd { display: none; }
}
@media (max-width: 720px) {
  .topbar { padding: 0 16px; }
  .page { padding: 4px 16px 44px; }
  .page-head h1 { font-size: 24px; }
  .page-head .actions { margin-left: 0; }
  .g-2, .g-4, .form-grid, .form-grid.g3 { grid-template-columns: minmax(0, 1fr); }
  .g-4.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpis .stat { padding: 15px; }
  .kpis .stat::before { left: 15px; right: 15px; }
  .kpis .stat .value { font-size: 26px; margin-top: 12px; }
  .kpis .stat .ring, .kpis .stat .label .ic { display: none; }
  .live-pill span { display: none; }
  .map-panel { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; height: 46%; }
  .map-detail { left: 8px; right: 8px; width: auto; bottom: calc(46% + 16px); }
  .toolbar .input-group { width: 100%; }
  .modal-body, .modal-head, .modal-foot { padding-left: 16px; padding-right: 16px; }
  .toasts { left: 16px; right: 16px; bottom: 16px; align-items: stretch; }
  .crumbs .hide-sm { display: none; }
  .car-hero h1 { font-size: 22px; }
  .car-hero .hero-photo, .car-hero .photo-edit { width: 100%; }
  .car-hero .car-thumb.xl { width: 100%; height: auto; aspect-ratio: 16 / 9; }
  .hero-card { padding: 16px !important; }
  .car-hero > .row.wrap { width: 100%; gap: 6px; flex-wrap: nowrap; }
  .car-hero > .row.wrap > .btn { flex: 1 1 auto; padding: 0 10px; }
  .stepper .step:not(.cur) .l { display: none; }
  .hero-card > .row.wrap > .row.wrap { width: 100%; gap: 6px; }
  .hero-card > .row.wrap > .row.wrap > .btn { flex: 1 1 auto; padding: 0 10px; }
  .step-line { margin: 0 8px; min-width: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ------------------------------------------------------------------ car imagery (photo or body-type silhouette) */
.car-thumb { position: relative; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 10px; background: radial-gradient(130% 110% at 50% 100%, #0b3a63 0%, #052340 62%, #031a2f 100%); box-shadow: inset 0 0 0 1px var(--border); color: #7f93a8; }
.car-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.car-thumb .sil { width: 84%; height: auto; }
.car-thumb.sm { width: 92px; height: 52px; border-radius: 9px; }
.car-thumb.md { width: 120px; height: 68px; }
.car-thumb.lg { width: 100%; height: auto; aspect-ratio: 16 / 8.6; border-radius: 0; box-shadow: none; }
.car-thumb.lg .sil { width: 60%; }
.car-thumb.xl { width: 268px; height: 150px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--border-gold); }
.car-thumb.xl .sil { width: 72%; }
:root[data-theme='light'] .car-thumb { background: radial-gradient(130% 110% at 50% 100%, #e3eaf2 0%, #f5f8fb 70%); color: #8a9bb0; }
.spec { display: inline-flex; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--text-3); font-weight: 500; }
.spec i { display: inline-block; width: 1px; height: 11px; background: var(--border-2); margin: 0 8px; }
.cell-car .t .spec { display: flex; margin-top: 2px; }
.cell-car .t span.spec { white-space: nowrap; }
.car-card { padding: 0; gap: 0; overflow: hidden; }
.car-card .media { position: relative; border-bottom: 1px solid var(--border); }
.car-card .media .badge { position: absolute; top: 12px; right: 12px; backdrop-filter: blur(6px); }
.car-card .media .plate { position: absolute; left: 12px; bottom: 12px; }
.car-card .inner { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.car-card .inner .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.photo-edit { position: relative; display: block; cursor: pointer; border-radius: 14px; }
.photo-edit input { display: none; }
.photo-edit .ov { position: absolute; inset: 0; border-radius: inherit; display: flex; align-items: center; justify-content: center; gap: 8px; background: rgba(2, 16, 30, .62); color: #edf2f8; font-size: 12.5px; font-weight: 700; opacity: 0; transition: opacity .2s; }
.photo-edit .ov svg { width: 16px; height: 16px; color: var(--gold-2); }
.photo-edit:hover .ov, .photo-edit.busy .ov { opacity: 1; }
.rentals .tbl td { padding-top: 10px; padding-bottom: 10px; }
.g-car .car-thumb.sm { width: 76px; height: 44px; }
.map-car .car-thumb.sm { width: 64px; height: 38px; border-radius: 8px; }
.card-body.flush { padding: 14px 0 0; }
.car-thumb.xs { width: 64px; height: 38px; border-radius: 8px; }
.li .meta b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-car .t b, .cell-car .t .spec { white-space: nowrap; }
.cell-car .t .spec { display: flex; flex-wrap: nowrap; }
.cell-two { min-width: 0; }
.cell-two b { display: block; max-width: 230px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-two > span { display: block; margin-top: 2px; font-size: 12px; color: var(--text-3); letter-spacing: .02em; }
.rentals .tbl td .badge { white-space: nowrap; }
.rentals .tbl th, .rentals .tbl td { padding-left: 12px; padding-right: 12px; }
.rentals .tbl th:first-child, .rentals .tbl td:first-child { padding-left: 20px; }
.rentals .tbl th:last-child, .rentals .tbl td:last-child { padding-right: 20px; }
.rentals .cell-two b { max-width: 210px; }
.map-car .meta > span.row { display: flex; white-space: nowrap; }
.map-car .meta span.dot { display: inline-block; }
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: none; }

/* ------------------------------------------------------------------ avtopark showroom (brand strip, refine panel, car cards) */
h1.duo em { font-style: normal; background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

.brand-strip { display: flex; align-items: stretch; margin-bottom: 24px; padding: 6px; border-radius: 20px; background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .008)), var(--surface); border: 1px solid var(--border); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), var(--shadow); overflow-x: auto; scrollbar-width: none; }
.brand-strip::-webkit-scrollbar { display: none; }
.brand-mark { position: relative; flex: 1 0 auto; min-width: 100px; height: 66px; padding: 0 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 0; border-radius: 14px; background: transparent; color: var(--text-2); cursor: pointer; transition: background .2s, color .2s; }
.brand-mark + .brand-mark::before { content: ''; position: absolute; left: 0; top: 18px; bottom: 18px; width: 1px; background: linear-gradient(180deg, transparent, rgb(var(--acc-rgb) / .3), transparent); transition: opacity .2s; }
.brand-mark b { font-family: var(--display); font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; }
.brand-mark span { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; color: var(--text-3); }
.brand-mark:hover { color: var(--text); background: rgba(255, 255, 255, .025); }
.brand-mark.on { color: var(--gold-ink); background: linear-gradient(180deg, rgb(var(--acc-rgb) / .15), rgb(var(--acc-rgb) / .04)); box-shadow: inset 0 0 0 1px rgb(var(--acc-rgb) / .38); }
.brand-mark.on::before, .brand-mark.on + .brand-mark::before { opacity: 0; }
.brand-mark.on span { color: var(--gold); }
.brand-mark:focus-visible, .chip-btn:focus-visible, .fc-btn:focus-visible { outline: none; box-shadow: var(--ring); }

.fleet-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; }
.refine { position: sticky; top: calc(var(--top-h) + 18px); display: flex; flex-direction: column; gap: 22px; }
.refine-head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.refine-head h3 { flex: 1; font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.refine-clear { border: 0; background: none; padding: 4px 0; cursor: pointer; font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.refine-clear:hover { color: var(--gold-2); }
.refine-close { display: none; }
.refine-label { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; font-size: 10.5px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; color: var(--text-2); }
.refine-label svg { width: 14px; height: 14px; color: var(--gold); }
.refine .input-group { width: 100%; }
.chip-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.chip-btn { height: 38px; padding: 0 10px; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 11px; border: 1px solid var(--border-2); background: var(--input-bg); color: var(--text-2); font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; cursor: pointer; transition: color .18s, border-color .18s, background .18s; }
.chip-btn span { font-size: 10.5px; font-weight: 700; color: var(--text-3); }
.chip-btn:hover { color: var(--text); border-color: rgb(var(--acc-rgb) / .32); }
.chip-btn.on { color: var(--gold-ink); border-color: rgb(var(--acc-rgb) / .55); background: linear-gradient(180deg, rgb(var(--acc-rgb) / .17), rgb(var(--acc-rgb) / .05)); }
.chip-btn.on span { color: var(--gold); }
.check-list { display: flex; flex-direction: column; gap: 1px; }
.check-row { position: relative; display: flex; align-items: center; gap: 11px; padding: 7px 4px; border-radius: 9px; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.check-row:hover { color: var(--text); }
.check-row input { position: absolute; opacity: 0; pointer-events: none; }
.check-row .box { width: 18px; height: 18px; flex: none; display: grid; place-items: center; border-radius: 5px; border: 1.5px solid var(--border-2); transition: background .15s, border-color .15s; }
.check-row .box svg { width: 12px; height: 12px; opacity: 0; color: var(--on-accent); stroke-width: 3; }
.check-row:hover .box { border-color: rgb(var(--acc-rgb) / .45); }
.check-row input:checked + .box { background: var(--gold-grad); border-color: transparent; }
.check-row input:checked + .box svg { opacity: 1; }
.check-row input:focus-visible + .box { box-shadow: var(--ring); }
.check-row .t { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.check-row input:checked ~ .t { color: var(--text); }
.check-row .n { font-size: 11px; font-weight: 700; color: var(--text-3); }

.fleet-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.fleet-count { font-size: 13px; color: var(--text-3); }
.fleet-count b { font-family: var(--display); color: var(--text); }
.sort-select { width: 200px; height: 38px; font-size: 13px; }
.refine-toggle { display: none; }
.refine-scrim { display: none; }
.refine-toggle.on { border-color: rgb(var(--acc-rgb) / .5); color: var(--gold-ink); }

.fc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 22px; }
.fc { position: relative; container-type: inline-size; overflow: hidden; border-radius: 22px; background: linear-gradient(180deg, #08305a 0%, #052340 100%); border: 1px solid rgba(255, 255, 255, .07); box-shadow: 0 24px 50px -26px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .04); cursor: pointer; outline: none; transition: transform .35s var(--ease), border-color .35s, box-shadow .35s; }
.fc:hover, .fc:focus-visible { transform: translateY(-3px); border-color: rgb(var(--acc-rgb) / .42); box-shadow: 0 34px 64px -28px rgba(0, 0, 0, .9), 0 0 0 1px rgb(var(--acc-rgb) / .08), 0 0 50px -24px rgb(var(--acc-rgb) / .35); }
.fc-in { display: contents; }
/* photo sits inside the card on its own studio plate */
.fc-media { position: relative; padding: 12px; }
.fc-media .car-thumb.lg { width: 100%; aspect-ratio: 3 / 2; border-radius: 16px; box-shadow: inset 0 0 0 1px rgb(var(--acc-rgb) / .22), 0 14px 30px -18px rgba(0, 0, 0, .9); }
.fc-media .car-thumb.lg img { border-radius: inherit; }
.fc-media .car-thumb.lg .sil { width: 74%; }
.fc-media .car-thumb img { transition: opacity .45s var(--ease), transform .9s var(--ease); }
.fc:hover .fc-media .car-thumb img { transform: scale(1.03); }
.fc-badge { position: absolute; top: 24px; left: 24px; height: 30px; padding: 0 12px; display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; background: rgba(3, 22, 40, .8); border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 8px 20px rgba(0, 0, 0, .25); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.fc-body { display: flex; flex-direction: column; min-width: 0; padding: 6px 20px 20px; }
.fc-name h4 { font-family: var(--display); font-size: 20px; font-weight: 800; line-height: 1.2; letter-spacing: -.02em; color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.fc-name .sub { margin-top: 4px; font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-price { display: flex; align-items: baseline; gap: 7px; margin-top: 8px; white-space: nowrap; }
.fc-price b { font-family: var(--display); font-size: 22px; font-weight: 800; letter-spacing: -.02em; background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.fc-price span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.fc-price.none span { font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.fc-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; margin-top: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.fc-specs span { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 13.5px; font-weight: 600; color: rgba(237, 242, 248, .88); }
.fc-specs svg { width: 18px; height: 18px; flex: none; color: var(--gold-2); stroke-width: 1.7; }
.fc-specs em, .fc-chip em { font-style: normal; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.fc-chip { height: 26px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; border-radius: 999px; background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .08); font-size: 11.5px; font-weight: 700; color: var(--text-2); }
.fc-chip svg { width: 13px; height: 13px; flex: none; color: var(--gold); }
.fc-chip.live { color: var(--green); } .fc-chip.live svg { color: var(--green); }
.fc-chip.warn { color: var(--amber); } .fc-chip.warn svg { color: var(--amber); }
.fc-chip.warn.bad { color: var(--red); } .fc-chip.warn.bad svg { color: var(--red); }
.fc-actions { margin-top: auto; padding-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fc-actions.one { grid-template-columns: 1fr; }
.fc-btn { height: 44px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; font-family: var(--display); font-size: 12.5px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: filter .2s, border-color .2s, background .2s, transform .15s; }
.fc-btn svg { width: 16px; height: 16px; }
.fc-btn.dark { color: var(--text); background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .14); }
.fc-btn.dark svg { color: var(--gold-2); }
.fc-btn.dark:hover { border-color: rgb(var(--acc-rgb) / .55); background: rgb(var(--acc-rgb) / .06); }
.fc-btn.gold { color: var(--on-accent); background: var(--gold-grad); border: 1px solid rgba(255, 255, 255, .4); box-shadow: 0 10px 24px -10px rgb(var(--acc-rgb) / .6), inset 0 1px 0 rgba(255, 255, 255, .45); }
.fc-btn.gold:hover { filter: brightness(1.07); }
.fc-btn:active { transform: translateY(1px); }
/* wide card: photo left, details right — like a showroom listing */
@container (min-width: 540px) {
  .fc-in { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); align-items: stretch; }
  .fc-media { padding: 14px 0 14px 14px; }
  .fc-media .car-thumb.lg { height: 100%; min-height: 100%; }
  .fc-body { padding: 20px 22px 20px 24px; }
  .fc-name h4 { font-size: 22px; }
}

:root[data-theme='light'] .fc { background: #fff; border-color: rgb(var(--acc-rgb) / .3); box-shadow: 0 18px 40px -24px rgba(4, 40, 70, .4); }
:root[data-theme='light'] .fc-chip { background: rgba(0, 0, 0, .035); border-color: rgba(0, 0, 0, .08); }
:root[data-theme='light'] .fc-btn.dark { background: #fff; border-color: rgba(0, 0, 0, .14); }
:root[data-theme='light'] .fc-specs span { color: var(--text); }
:root[data-theme='light'] .fc-specs svg { color: var(--gold-3); }
:root[data-theme='light'] .brand-strip { background: #fff; }

@media (max-width: 1100px) {
  .fleet-layout { grid-template-columns: minmax(0, 1fr); }
  .refine { position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; width: min(320px, 88vw); padding: 20px 18px 28px; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--border-gold); box-shadow: 0 0 60px rgba(0, 0, 0, .7); transform: translateX(-104%); transition: transform .28s var(--ease); }
  .fleet-layout.refine-open .refine { transform: none; }
  .refine-scrim { display: block; position: fixed; inset: 0; z-index: 39; background: var(--backdrop); }
  .refine-close, .refine-toggle { display: inline-flex; }
}
@media (max-width: 720px) {
  .brand-strip { margin-bottom: 18px; border-radius: 16px; }
  .brand-mark { min-width: 98px; height: 56px; padding: 0 16px; }
  .fleet-bar { flex-wrap: wrap; }
  .fleet-bar .spacer { display: none; }
  .fleet-count { order: 5; flex-basis: 100%; }
  .sort-select { flex: 1; width: auto; min-width: 0; }
  .fc-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
:root[data-theme='light'] .fc-price b { background: linear-gradient(120deg, var(--gold-3), var(--gold-3)); -webkit-background-clip: text; background-clip: text; }
.fleet-main { min-width: 0; container-type: inline-size; }
@container (max-width: 700px) {
  .fleet-main .tbl .opt { display: none; }
  .fleet-main .tbl .cell-car .t b { white-space: normal; }
  .fleet-main .tbl th, .fleet-main .tbl td { padding-left: 11px; padding-right: 11px; }
}
/* studio photos: the same grey set shows while a photo is still loading */
.car-thumb.photo { background: radial-gradient(120% 90% at 50% 30%, #2a2014 0%, #0d0b09 60%, #060505 100%); }
.car-thumb.photo::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgb(var(--acc-rgb) / .2); pointer-events: none; }
.car-thumb img { opacity: 0; transition: opacity .45s var(--ease); }
.car-thumb img.in { opacity: 1; }

/* Yandex map: centre our car markers on the point, and our own zoom buttons */
.cm.cm-ya { transform: translate(-50%, -50%); }
.map-zoom { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); z-index: 20; display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; background: var(--glass); border: 1px solid var(--border-2); box-shadow: var(--shadow); backdrop-filter: blur(8px); }
.map-zoom button { width: 38px; height: 38px; border: 0; background: transparent; color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; }
.map-zoom button + button { border-top: 1px solid var(--border); }
.map-zoom button:hover { background: rgb(var(--acc-rgb) / .1); color: var(--gold-ink); }
/* settings: many tabs wrap onto two rows instead of hiding off-screen */
.tabs.wrap { flex-wrap: wrap; overflow: visible; row-gap: 0; }
.wialon-signin { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: 14px; background: var(--gold-soft); border: 1px solid var(--border-gold); }
.wialon-signin > div { flex: 1 1 240px; min-width: 0; }
.wialon-signin b { display: block; font-size: 14px; }
.wialon-signin span { display: block; margin-top: 3px; font-size: 12.5px; color: var(--text-2); }
/* car markers by state: moving green, parked brand gold ring, offline grey; labels hidden when zoomed out */
.cm.moving .cm-dot { background: linear-gradient(135deg, #4ade80, #16a34a); border-color: #dcfce7; animation: markerGlowGreen 2.2s infinite; }
.cm.moving .cm-dot svg { color: #052e16; }
.cm.moving .cm-arrow::before { border-bottom-color: #22c55e; filter: drop-shadow(0 0 4px rgba(34, 197, 94, .8)); }
.cm.moving .cm-label { color: #bbf7d0; box-shadow: 0 4px 10px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(74, 222, 128, .45); }
.cm.offline .cm-label { color: #a8a29e; box-shadow: 0 4px 10px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .12); }
@keyframes markerGlowGreen { 0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55), 0 6px 14px rgba(0, 0, 0, .45); } 50% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0), 0 6px 14px rgba(0, 0, 0, .45); } }
.map-far .cm-label { display: none; }
.map-far .cm:hover .cm-label, .map-far .cm.on .cm-label { display: block; z-index: 2; }
.map-far .cm-dot { width: 26px; height: 26px; }
.map-far .cm-dot svg { width: 13px; height: 13px; }
/* fleet: models of the chosen brand, single-choice brand list */
.model-row { display: flex; gap: 8px; flex-wrap: wrap; margin: -10px 0 22px; }
.model-chip { height: 36px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 700; cursor: pointer; transition: color .18s, border-color .18s, background .18s; }
.model-chip span { font-size: 11px; color: var(--text-3); font-weight: 700; }
.model-chip:hover { color: var(--text); border-color: rgb(var(--acc-rgb) / .35); }
.model-chip.on { color: var(--gold-ink); border-color: rgb(var(--acc-rgb) / .6); background: rgb(var(--acc-rgb) / .1); }
.model-chip.on span { color: var(--gold); }
.check-row.radio .box { border-radius: 50%; }
.check-row.radio input:checked + .box { background: transparent; border-color: var(--gold); box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 9px var(--gold); }
.rec-tbl td { padding-top: 8px; padding-bottom: 8px; }
.rec-tbl .input { width: 120px; height: 36px; text-align: right; }
.rec-tbl tr.off td:not(:first-child) { opacity: .4; }
.rec-tbl input[type='checkbox'] { width: 16px; height: 16px; accent-color: var(--gold); }
/* LIVE map: brand/model sections, clusters, base layer switch */
.map-groups { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-top: 12px; padding-bottom: 2px; }
.map-groups::-webkit-scrollbar { display: none; }
.map-groups.models { margin-top: 8px; }
.map-group { flex: none; height: 30px; padding: 0 11px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--input-bg); color: var(--text-2); font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: color .15s, border-color .15s, background .15s; }
.map-group span { font-size: 10.5px; color: var(--text-3); }
.map-group:hover { color: var(--text); }
.map-group.on { color: var(--gold-ink); border-color: rgb(var(--acc-rgb) / .55); background: rgb(var(--acc-rgb) / .1); }
.map-group.on span { color: var(--gold); }
.map-groups.models .map-group { height: 27px; font-size: 11.5px; }
.cm-cluster { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--gold-2); background: radial-gradient(circle at 35% 30%, #0d4a7a, #02182b); color: #edf2f8; font: 800 13px/1 var(--display); cursor: pointer; box-shadow: 0 0 0 5px rgb(var(--acc-rgb) / .22), 0 8px 18px rgba(0, 0, 0, .5); transform: translate(-50%, -50%); }
.maplibregl-marker .cm-cluster, .maplibregl-marker.cm-cluster { transform: none; }
.cm-cluster b { position: relative; z-index: 1; }
.cm-cluster i { position: absolute; top: -6px; right: -8px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #16a34a; color: #fff; font: 800 10px/18px var(--font); font-style: normal; box-shadow: 0 0 0 2px #050505; }
.cm-cluster.has-moving { border-color: #4ade80; box-shadow: 0 0 0 5px rgba(34, 197, 94, .2), 0 8px 18px rgba(0, 0, 0, .5); }
.cm-cluster:hover { filter: brightness(1.15); }
.map-float { display: flex; gap: 8px; align-items: center; }
.map-base { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--glass); border: 1px solid var(--border-2); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.map-base button { height: 30px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.map-base button.on { background: var(--gold-grad); color: var(--on-accent); }

/* Booking form: form + live price summary side by side; stacked on phones (summary below the fields). */
.bk-form-grid { grid-template-columns: minmax(0, 1fr) 250px; gap: 20px; }
@media (max-width: 760px) { .bk-form-grid { grid-template-columns: minmax(0, 1fr); } }

/* Map performance. The map canvas redraws every frame while it pans or zooms: a blurred "glass" layer
   over it would be re-blurred every frame, and box-shadow pulses repaint the page non-stop. Overlays on
   the map are therefore solid, and the moving-car pulse is a ring animated with transform/opacity only. */
:root { --map-glass: rgba(3, 22, 40, .95); }
:root[data-theme='light'] { --map-glass: rgba(255, 253, 248, .97); }
.map-panel, .map-detail, .map-float .btn, .map-zoom, .map-base, .maplibregl-ctrl-group { background: var(--map-glass) !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
.cm.moving .cm-dot { animation: none; position: relative; }
.cm.moving .cm-dot::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid rgba(34, 197, 94, .7); animation: markerRing 2.2s ease-out infinite; will-change: transform, opacity; pointer-events: none; }
@keyframes markerRing { from { transform: scale(1); opacity: .9; } to { transform: scale(1.7); opacity: 0; } }
.maplibregl-marker { contain: layout style; }
@media (prefers-reduced-motion: reduce) { .cm.moving .cm-dot::after { animation: none; opacity: 0; } }
.doc-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 12px; border-top: 1px solid var(--border); }

/* Sotuv varag‘i */
.sale-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
@media (max-width: 980px) { .sale-grid { grid-template-columns: minmax(0, 1fr); } .sale-grid > div:last-child .stack { position: static !important; } }
.sale-done { max-width: 760px; margin: 24px auto; padding: 36px 28px; text-align: center; }
.sale-done .em-ic { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.sale-done .em-ic svg { width: 30px; height: 30px; }
.sale-done h2 { font-family: var(--display); font-size: 24px; margin: 0 0 6px; }
.sale-docs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 24px 0 18px; }
@media (max-width: 640px) { .sale-docs { grid-template-columns: minmax(0, 1fr); } }
.doc-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 12px; border-radius: 16px; border: 1px solid var(--border-gold); background: var(--card-bg); color: var(--text); text-decoration: none; transition: transform .15s var(--ease), box-shadow .15s; }
.doc-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.doc-tile svg { width: 26px; height: 26px; color: var(--gold-2); }
.doc-tile b { font-size: 15px; }
.doc-tile span { font-size: 12px; color: var(--text-3); }

/* ---------- Hisobotlar ---------- */
.chart-wrap { min-width: 0; }
.month-chart { display: block; }
.month-chart .grid-line { stroke: var(--border); stroke-dasharray: 3 5; }
.month-chart text { font-family: var(--font); }
.month-chart .v { font-size: 11px; font-weight: 700; fill: var(--text-2); }
.month-chart .m { font-size: 11.5px; font-weight: 600; fill: var(--text-2); }
.month-chart .y { font-size: 10.5px; font-weight: 700; fill: var(--gold); letter-spacing: .04em; }
.month-chart .bar-g rect:nth-child(2) { transition: opacity .15s, filter .15s; }
.month-chart:hover .bar-g rect:nth-child(2) { opacity: .55; }
.month-chart .bar-g.on rect:nth-child(2) { opacity: 1; filter: drop-shadow(0 0 6px rgb(var(--acc-rgb) / .55)); }
.month-chart .bar-g.on .v, .month-chart .bar-g.on .m { fill: var(--text); }
.chart-tip { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; min-height: 40px; margin-top: 10px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--gray-soft); border: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.chart-tip b { color: var(--text); font-weight: 700; text-transform: capitalize; }
.hbars { display: flex; flex-direction: column; gap: 14px; }
.hb-top, .hb-sub { display: flex; justify-content: space-between; gap: 12px; }
.hb-top { font-size: 13.5px; margin-bottom: 7px; }
.hb-top b { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-top .num { font-weight: 700; white-space: nowrap; }
.hb .bar { height: 8px; }
.hb-sub { margin-top: 5px; font-size: 12px; color: var(--text-3); }
.dow-bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: end; height: 190px; padding-top: 4px; }
.dow-bars .dw { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.dow-bars .dw .num { font-size: 12px; font-weight: 700; color: var(--text-2); }
.dow-bars .col { flex: 1; width: 100%; max-width: 42px; display: flex; align-items: flex-end; border-radius: 8px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; }
.dow-bars .col i { display: block; width: 100%; border-radius: 8px; background: var(--gold-grad); transition: height .6s var(--ease); }
.dow-bars .dw b { font-size: 12px; color: var(--text-2); font-weight: 600; }
@media (max-width: 720px) { .dow-bars { gap: 5px; height: 160px; } }
.reports .toolbar > .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.reports .toolbar > .seg::-webkit-scrollbar { display: none; }
@media (max-width: 720px) {
  .reports .card-head { flex-wrap: wrap; }
  .reports .card-head .right { width: 100%; margin-left: 0; }
  .reports .card-head .right .seg { width: 100%; }
  .reports .card-head .right .seg button { flex: 1; justify-content: center; }
}

/* ---------- Bosh sahifa: "Bugun e’tibor bering" ---------- */
.attn { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.attn-i { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border-2); background: var(--gray-soft); color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.attn-i:hover { border-color: var(--border-gold); background: var(--brand-soft); transform: translateY(-1px); }
.attn-i > svg:first-child { flex: none; width: 34px; height: 34px; padding: 8px; border-radius: 10px; }
.attn-i > span { flex: 1; min-width: 0; line-height: 1.35; }
.attn-i > span b { font-family: var(--display); font-size: 15.5px; }
.attn-i > svg:last-child { flex: none; width: 16px; height: 16px; color: var(--text-3); }
.attn-i.red > svg:first-child { background: var(--red-soft); color: var(--red); }
.attn-i.gold > svg:first-child { background: var(--gold-soft); color: var(--gold-ink); }
.attn-i.blue > svg:first-child { background: var(--blue-soft); color: var(--blue); }
.attn-i.amber > svg:first-child { background: var(--amber-soft); color: var(--amber); }
.attn-i.violet > svg:first-child { background: var(--violet-soft); color: var(--violet); }
.li-more { display: flex; align-items: center; justify-content: center; gap: 6px; width: calc(100% - 16px); margin: 6px 8px 4px; padding: 9px; border: 1px dashed var(--border-2); border-radius: var(--radius-sm); background: transparent; color: var(--gold-ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.li-more:hover { border-color: var(--border-gold); background: var(--brand-soft); }
@media (max-width: 720px) { .attn { grid-template-columns: minmax(0, 1fr); } }
.dash-map { display: flex; flex-direction: column; }
.dash-map > .card-body { flex: 1; display: flex; }
.dash-map-in { flex: 1; display: flex; margin: -8px -8px -10px; }
.dash-map-in > .map-mini { flex: 1; height: auto; min-height: 340px; }
@media (max-width: 420px) { .g-4.kpis .stat .value { font-size: 23px; white-space: nowrap; } }

/* ---------- Bildirishnomalar ---------- */
.bell-wrap { position: relative; display: inline-flex; }
.bell-btn { position: relative; width: 40px; height: 40px; padding: 0; justify-content: center; }
.bell-btn svg { width: 19px; height: 19px; }
.bell-btn.has svg { color: var(--gold-ink); }
.bell-n { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red-dot); color: #fff; font-size: 10.5px; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.notify-panel { z-index: 70; width: min(400px, calc(100vw - 16px)); max-height: min(560px, calc(100vh - 90px)); display: flex; flex-direction: column; border-radius: 16px; background: var(--surface); border: 1px solid var(--border-gold); box-shadow: var(--shadow-lg); animation: modalIn .16s var(--ease); overflow: hidden; }
.np-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 12px; border-bottom: 1px solid var(--border); }
.np-head b { font-family: var(--display); font-size: 15px; }
.np-count { font-size: 12px; font-weight: 700; color: var(--gold-ink); background: var(--gold-soft); padding: 2px 8px; border-radius: 999px; }
.np-link { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--gold-ink); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 4px 2px; }
.np-link svg { width: 14px; height: 14px; }
.np-link:hover { text-decoration: underline; }
.np-list { overflow-y: auto; padding: 6px; }
.np-item { display: flex; gap: 12px; width: 100%; padding: 11px 10px; border: 0; border-radius: 12px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.np-item:hover { background: rgb(var(--acc-rgb) / .07); }
.np-item.unread { background: rgb(var(--acc-rgb) / .06); }
.np-item.unread .np-t b::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 7px; border-radius: 50%; background: var(--gold); vertical-align: middle; }
.np-ic { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--gray-soft); color: var(--text-2); }
.np-ic svg { width: 17px; height: 17px; }
.np-ic.red { background: var(--red-soft); color: var(--red); } .np-ic.green { background: var(--green-soft); color: var(--green); }
.np-ic.gold { background: var(--gold-soft); color: var(--gold-ink); } .np-ic.blue { background: var(--blue-soft); color: var(--blue); }
.np-ic.amber { background: var(--amber-soft); color: var(--amber); } .np-ic.violet { background: var(--violet-soft); color: var(--violet); }
.np-t { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.np-t b { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.np-item:not(.unread) .np-t b { font-weight: 500; color: var(--text-2); }
.np-t em { font-style: normal; font-size: 12.5px; color: var(--text-2); line-height: 1.4; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.np-t small { font-size: 11.5px; color: var(--text-3); }
.np-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 20px; text-align: center; color: var(--text-2); font-size: 13px; }
.np-empty svg { width: 28px; height: 28px; color: var(--gold); margin-bottom: 4px; }
.np-empty b { color: var(--text); font-size: 14px; }
.np-foot { border-top: 1px solid var(--border); padding: 10px 16px; display: flex; }
.np-foot .np-link { margin-left: 0; }
/* Settings → Bildirishnomalar */
.notify-table td { vertical-align: middle; }
.notify-table .nk { display: flex; gap: 12px; align-items: center; }
.notify-table .nk b { display: block; font-weight: 600; }
.notify-table .nk span { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.notify-table td.sw { width: 120px; text-align: center; }
@media (max-width: 720px) { .notify-table td.sw { width: 74px; } .notify-table .nk .np-ic { display: none; } }
.switch:has(input:disabled) { cursor: not-allowed; }
.switch input:disabled + .track { opacity: .38; filter: grayscale(.6); box-shadow: inset 0 0 0 1px var(--border-2); }
.np-count, .np-link { white-space: nowrap; }

/* Short screens (laptop with browser toolbars): the whole menu fits without scrolling. */
@media (min-width: 1025px) and (max-height: 940px) {
  .side-brand { padding: 14px 24px 12px; }
  .side-nav { padding: 4px 12px 8px; }
  .nav-group { margin-top: 10px; }
  .nav-label { padding-bottom: 4px; }
  .nav-item { height: 35px; margin: 1px 0; }
  .side-foot { padding: 6px 12px; }
  .side-user { padding: 6px 9px; }
}
@media (min-width: 1025px) and (max-height: 680px) {
  .nav-item { height: 30px; font-size: 14px; }
  .nav-group { margin-top: 7px; }
  .nav-label { font-size: 10.5px; padding-bottom: 2px; }
  .side-foot { display: none; }   /* the profile menu stays in the top bar */
}
/* Long menus still scroll; a soft fade shows there is more below. */
.side-nav { scrollbar-width: thin; mask-image: linear-gradient(180deg, #000 calc(100% - 18px), transparent); -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 18px), transparent); }

/* ---------- Sotuvlar (ledger) ---------- */
.ledger-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.ledger-bar > .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.ledger-bar > .seg::-webkit-scrollbar { display: none; }
.ledger-bar input[type="date"] { width: 160px; }
.ledger-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.ledger-filters .input-group { flex: 1 1 300px; max-width: 420px; }
.ledger-filters .select { height: 40px; width: auto; min-width: 150px; max-width: 230px; }
.ledger-tbl td { padding-top: 11px; padding-bottom: 11px; }
.ledger-tbl .cell-two b { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.ledger-tbl tfoot td { padding: 13px 16px; border-top: 1px solid var(--border-gold); background: var(--surface-2); font-size: 13.5px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; font-size: 13px; color: var(--text-2); }
@media (max-width: 720px) {
  .ledger-filters .select { flex: 1 1 46%; max-width: none; min-width: 0; }
  .ledger-filters .input-group { flex-basis: 100%; max-width: none; }
}
.ledger-tbl .lg-car b { display: block; font-weight: 600; white-space: nowrap; max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.ledger-tbl .lg-plate { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.ledger-tbl .lg-plate em { font-style: normal; font-size: 11.5px; color: var(--text-3); }
.ledger-tbl .cell-two b { max-width: 175px; }
.ledger-tbl th, .ledger-tbl td { padding-left: 12px; padding-right: 12px; }
/* Phones: each sale is a small card instead of a wide table row. */
@media (max-width: 720px) {
  .ledger-tbl thead { display: none; }
  .ledger-tbl, .ledger-tbl tbody, .ledger-tbl tfoot { display: block; width: 100%; }
  .ledger-tbl tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "cust sum" "car term" "date no" "seller dep"; gap: 8px 14px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
  .ledger-tbl tbody td { display: block; padding: 0; border: 0; min-width: 0; }
  .ledger-tbl tbody td:nth-child(1) { grid-area: date; }
  .ledger-tbl tbody td:nth-child(2) { grid-area: no; text-align: right; }
  .ledger-tbl tbody td:nth-child(3) { grid-area: cust; }
  .ledger-tbl tbody td:nth-child(4) { grid-area: car; }
  .ledger-tbl tbody td:nth-child(5) { grid-area: term; text-align: right; }
  .ledger-tbl tbody td:nth-child(6) { grid-area: sum; }
  .ledger-tbl tbody td:nth-child(7) { grid-area: dep; }
  .ledger-tbl tbody td:nth-child(7):not(:empty)::before { content: 'Zalog: '; color: var(--text-3); font-size: 12px; }
  .ledger-tbl tbody td:nth-child(8) { grid-area: seller; }
  .ledger-tbl .cell-two b, .ledger-tbl .lg-car b { max-width: 100%; }
  .ledger-tbl tfoot tr { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 12px 16px; }
  .ledger-tbl tfoot td { display: block; padding: 0; border: 0; background: none; }
  .ledger-tbl tfoot td:empty { display: none; }
  .ledger .table-wrap { overflow-x: visible; }
}

/* ---------- Shablon muharriri: fields as gold labels, plain-word toolbar ---------- */
.tk { display: inline-block; margin: 0 1px; padding: 0 7px; border-radius: 6px; background: #e6eef6; border: 1px solid #b9cde2; color: #0b3a63; font-size: .9em; font-weight: 600; line-height: 1.55; white-space: nowrap; vertical-align: baseline; cursor: default; user-select: all; -webkit-user-select: all; }
.rte .tk:hover { background: #d6e4f2; border-color: #6f98c4; }
.tk.demo { cursor: auto; user-select: auto; font-size: 11px; padding: 0 5px; }
.rte-bar { gap: 2px; align-items: center; }
.rte-bar button { font-weight: 600; font-size: 12.5px; padding: 0 10px; white-space: nowrap; }
.rte-sep { width: 1px; height: 20px; margin: 0 4px; background: var(--border-2); }
.ph-card { padding: 14px; align-self: start; position: sticky; top: 76px; }
.ph-card .ph { color: var(--text); }
.ph-card .ph svg { width: 14px; height: 14px; color: var(--gold); opacity: .55; flex: none; }
.ph-card .ph:hover svg { opacity: 1; }

/* ---------- Hujjatlar (Settings → Shartnoma shabloni): A4 preview + locked editing ---------- */
.doc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.doc-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border-2); background: var(--card-bg); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.doc-card:hover:not(:disabled) { border-color: var(--border-gold); transform: translateY(-1px); }
.doc-card.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 10px 24px -14px rgb(var(--acc-rgb) / .6); }
.doc-card:disabled { opacity: .45; cursor: not-allowed; }
.dc-ic { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--gold-soft); color: var(--gold-ink); }
.dc-ic svg { width: 18px; height: 18px; }
.dc-t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dc-t b { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.dc-t em { font-style: normal; font-size: 12px; color: var(--text-3); }
.doc-view { overflow: hidden; }
.doc-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.doc-bar.editing { background: linear-gradient(90deg, var(--gold-soft), transparent); }
.db-t { min-width: 0; flex: 1 1 280px; display: flex; flex-direction: column; gap: 3px; }
.db-t b { font-family: var(--display); font-size: 16px; }
.db-t span { font-size: 12.5px; color: var(--text-3); }
.db-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.doc-sub { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.doc-sample { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); min-width: 0; }
.doc-sample .select { height: 36px; max-width: 420px; }
.a4-box { padding: 22px 12px 4px; background: #e9e7e1; min-width: 0; }
.a4-frame { display: block; width: 100%; height: 900px; border: 0; background: transparent; }
.ed-tools { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.ed-tools button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--text-2); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.ed-tools button:hover { background: rgb(var(--acc-rgb) / .1); color: var(--gold-ink); }
.ed-tools button svg { width: 15px; height: 15px; }
.ed-tools button > span { font-size: 12px; }
.ed-warn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.ed-warn svg { width: 14px; height: 14px; color: var(--gold); }
@media (max-width: 720px) { .ed-warn { margin-left: 0; } .doc-cards { grid-template-columns: 1fr 1fr; } .a4-box { padding: 12px 4px 0; } }
.db-note { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); }
.db-note svg { width: 15px; height: 15px; color: var(--gold); }

/* ------------------------------------------------------------------ Hisobotlar (reports) */
/* The two top-15 tables sit side by side only when both fit; otherwise one under the other (no cut-off columns). */
.reports .grid.pair { grid-template-columns: repeat(auto-fit, minmax(min(100%, 600px), 1fr)); }
.reports .tbl td.r, .reports .tbl th.r { white-space: nowrap; }
.plate-line { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
@media (max-width: 1100px) { .reports .g-3.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .reports .g-3.kpis { grid-template-columns: minmax(0, 1fr); } }
.reports .odd-note { display: flex; gap: 8px; align-items: flex-start; margin: 0 18px 12px; padding: 10px 12px; border-radius: 10px; background: var(--amber-soft, rgba(245, 158, 11, .1)); color: var(--text-2); font-size: 12.5px; line-height: 1.5; }
.reports .odd-note svg { flex: none; margin-top: 2px; color: var(--amber, #d97706); }
.reports .foot-note { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; }
.reports .foot-note svg { flex: none; margin-top: 2px; }
/* A long name or a broken plate in the sheet must not stretch a table off the screen. */
.cell-car .t { min-width: 0; }
.cell-car .t > b, .cell-car .t > span { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl b.mono { white-space: nowrap; }
.tbl .cell-car .t > b { white-space: normal; max-width: 220px; line-height: 1.3; }
.tbl .cell-car .t > span { max-width: 220px; }
@media (max-width: 1400px) { .tbl td, .tbl th { padding-left: 12px; padding-right: 12px; } }
.tbl .cell-car .t > span { max-width: 140px; }
@media (max-width: 1400px) { .tbl .car-thumb.sm { width: 72px; height: 42px; border-radius: 8px; } .tbl .cell-car { gap: 10px; } }
/* Next to a side panel the table gets narrow: the car photo goes, the columns stay. */
@media (max-width: 1400px) { .g-main .tbl .car-thumb, .g-side .tbl .car-thumb { display: none; } }
/* Murojaatlar: all five columns visible from ~1100px up (they were 200px each and pushed «Sotildi / Bo‘lmadi» off screen). */
@media (min-width: 1101px) and (max-width: 1500px) { .kanban { grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 10px; } }
/* Sotuvlar on mid-size screens (721–1500px): names wrap to two lines instead of forcing the table wider than the page. */
@media (min-width: 721px) and (max-width: 1500px) {
  .tbl.ledger-tbl .cell-two > b, .tbl.ledger-tbl .lg-car > b { white-space: normal; max-width: 170px; line-height: 1.3; }
  .tbl.ledger-tbl td.nowrap .badge { display: flex; width: max-content; margin-top: 4px; }
}
@media (min-width: 721px) and (max-width: 1500px) { .tbl.ledger-tbl th, .tbl.ledger-tbl td { padding-left: 9px; padding-right: 9px; } }
.fill-note { display: flex; align-items: flex-start; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--border); background: var(--gold-soft); font-size: 13px; line-height: 1.45; color: var(--text); }
.fill-note svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--gold-ink); }

/* ------------------------------------------------------------------ Light theme: the sidebar follows the page */
/* (it used to stay navy in the light theme). Logo: ivory version on dark surfaces, the original colours on light. */
.brand-logo.on-light { display: none; }
:root[data-theme='light'] .side .brand-logo.on-dark { display: none; }
:root[data-theme='light'] .side .brand-logo.on-light { display: block; }
:root[data-theme='light'] {
  --side-bg: #f4f6f9;
  --side-text: #4a5d70;
  --side-text-strong: #0b2236;
  --side-hover: rgba(4, 62, 102, .06);
  --side-active: rgb(var(--acc-rgb) / .16);
  --side-border: #dfe5ec;
}
:root[data-theme='light'] .side { background: radial-gradient(140% 38% at 0% 0%, rgb(var(--acc-rgb) / .10), transparent 60%), linear-gradient(180deg, #ffffff, var(--side-bg)); }
:root[data-theme='light'] .side::after { background: linear-gradient(180deg, rgb(var(--acc-rgb) / .45), transparent); }
:root[data-theme='light'] .nav-label { color: #5f7a96; }
:root[data-theme='light'] .nav-item svg { opacity: .75; }
:root[data-theme='light'] .nav-item.active { color: var(--brand); font-weight: 700; background: #fff; box-shadow: inset 0 0 0 1px rgb(var(--acc-rgb) / .32), 0 1px 3px rgba(4, 62, 102, .06); }
:root[data-theme='light'] .nav-item.active svg { color: var(--gold); filter: none; }
:root[data-theme='light'] .nav-item.active::before { left: 0; top: 28%; bottom: 28%; width: 4px; border-radius: 0 4px 4px 0; box-shadow: none; }
:root[data-theme='light'] .side-user .who span { color: var(--gold); }
:root[data-theme='light'] .shell.nav-open .side { box-shadow: 0 0 60px rgba(4, 30, 55, .25); }
/* Car photos are the company's white-studio side views: they sit on a soft light studio plate in both themes. The
   white blends into the plate (multiply), and the whole car always shows (contain) whatever shape the box has. */
.car-thumb.photo { isolation: isolate; background: radial-gradient(125% 100% at 50% 34%, #ffffff 0%, #f2f4f7 52%, #dfe4ea 100%); }
.car-thumb.photo img { object-fit: contain; mix-blend-mode: multiply; }
.car-thumb.photo::after { box-shadow: inset 0 0 0 1px rgb(var(--acc-rgb) / .28); }
:root[data-theme='light'] .car-thumb.photo { background: radial-gradient(125% 100% at 50% 34%, #ffffff 0%, #f5f6f8 55%, #e7eaee 100%); }
:root[data-theme='light'] .car-thumb.photo::after { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }

/* ------------------------------------------------------------------ Hisobotlar v2 (premium report: .rp) */
.rp .print-head { display: none; }
.rp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: -8px 0 22px; padding: 10px; border-radius: 18px; background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .005)), var(--surface); border: 1px solid var(--border); }
.rp-periods { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; max-width: 100%; }
.rp-dates { display: flex; align-items: center; gap: 8px; }
.rp-dates .input { width: 158px; height: 38px; }
.rp-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-left: auto; }
.rp-filters .select { width: 190px; height: 38px; }
.rp-cmp { display: flex; align-items: center; gap: 8px; }
.rp-cmp > span { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }

/* delta chip: ▲ green / ▼ red */
.dl { display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; background: var(--gray-soft); color: var(--text-2); }
.dl.up { background: var(--green-soft); color: var(--green); }
.dl.down { background: var(--red-soft); color: var(--red); }
.dl.none { color: var(--text-3); font-weight: 700; }
.dl.sm { height: 20px; padding: 0 7px; font-size: 11px; }

/* KPI block: a hero for income, four cards beside it */
.rp-kpis { display: grid; grid-template-columns: minmax(0, 1.45fr) repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(0, auto); gap: 18px; }
.rp-kpis .card { padding: 20px 22px; min-width: 0; }
.rp-kpis .lbl { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.rp-kpis .lbl .ic-box { width: 30px; height: 30px; border-radius: 9px; }
.rp-kpis .lbl em { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-kpis .val { display: flex; align-items: baseline; gap: 8px; margin-top: 14px; }
.rp-kpis .val b { font-family: var(--display); font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-kpis .val small { font-size: 13px; font-weight: 700; color: var(--text-3); }
.rp-kpis .cmp { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; font-size: 12.5px; color: var(--text-3); }
.rp-kpis .foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-3); }
.rp-kpis .foot b, .rp-kpis .cmp b { color: var(--text); font-weight: 700; }
.rp-kpis .rp-k.click { cursor: pointer; transition: border-color .2s, transform .2s var(--ease); }
.rp-kpis .rp-k.click:hover { border-color: var(--border-gold); transform: translateY(-2px); }
.rp-hero { grid-row: span 2; display: flex; flex-direction: column; background: radial-gradient(120% 90% at 100% 0%, rgb(var(--acc-rgb) / .16), transparent 55%), var(--card-bg); border-color: var(--border-gold); }
.rp-hero .val b { font-size: 46px; background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rp-hero .val small { font-size: 15px; }
.rp-hero .cmp { font-size: 13px; }
.spark { margin: 18px -4px 0; flex: 1; min-height: 64px; display: flex; align-items: flex-end; }
.spark svg { display: block; overflow: visible; }
.spark .cur { fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.spark .ly { fill: none; stroke: var(--text-3); stroke-width: 1.4; stroke-dasharray: 4 4; opacity: .8; }
.spark .dot { fill: var(--gold-2); stroke: var(--surface); stroke-width: 2; }
.rp-fcast { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: var(--blue-soft); color: var(--text-2); font-size: 12.5px; line-height: 1.45; }
.rp-fcast svg { flex: none; margin-top: 1px; color: var(--blue); }
.rp-fcast b { color: var(--text); }
@media (max-width: 1180px) {
  .rp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-hero { grid-column: 1 / -1; grid-row: auto; }
}
@media (max-width: 600px) {
  .rp-kpis { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .rp-hero .val b { font-size: 36px; }
  .rp-kpis .val b { font-size: 27px; }
  .rp-filters { margin-left: 0; width: 100%; }
  .rp-filters .select { flex: 1 1 140px; width: auto; }
  .rp-cmp { width: 100%; justify-content: space-between; }
}

/* takeaways */
.ins-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 10px 14px; }
.ins-list li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--gray-soft); border: 1px solid var(--border); }
.ins-list li .ic-box { width: 30px; height: 30px; border-radius: 9px; }
.ins-list li p { flex: 1; min-width: 0; margin: 4px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.ins-list li p b { color: var(--text); font-weight: 700; }
.ins-list li.click { cursor: pointer; transition: border-color .2s; }
.ins-list li.click:hover { border-color: var(--border-gold); }
.ins-list li .go { flex: none; margin-top: 6px; color: var(--text-3); }
.ins-list li.amber { background: color-mix(in srgb, var(--amber-soft) 70%, transparent); }

/* trend chart */
.trend-chart { display: block; }
.trend-chart text { font-family: var(--font); }
.trend-chart .grid-line { stroke: var(--border); stroke-dasharray: 3 5; }
.trend-chart .v { font-size: 11px; font-weight: 700; fill: var(--text-2); }
.trend-chart .m { font-size: 11.5px; font-weight: 600; fill: var(--text-2); }
.trend-chart .y { font-size: 10.5px; font-weight: 800; fill: var(--gold); letter-spacing: .04em; }
.trend-chart .bar-g rect:nth-child(2) { transition: opacity .15s, filter .15s; }
.trend-chart:hover .bar-g rect:nth-child(2) { opacity: .55; }
.trend-chart .bar-g.on rect:nth-child(2) { opacity: 1; filter: drop-shadow(0 0 6px rgb(var(--acc-rgb) / .55)); }
.trend-chart .bar-g.on .v, .trend-chart .bar-g.on .m { fill: var(--text); }
.trend-chart .fut { fill: var(--border-2); }
.trend-chart .ly-line { fill: none; stroke: #8fb8e8; stroke-width: 1.8; stroke-dasharray: 5 4; pointer-events: none; }
.trend-chart .ly-dot { fill: var(--surface); stroke: #8fb8e8; stroke-width: 1.8; pointer-events: none; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; font-size: 12px; color: var(--text-3); }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; }
.chart-legend .lg-bar { background: var(--gold-grad); }
.chart-legend .lg-line { height: 0; border-top: 2px dashed #8fb8e8; border-radius: 0; }
.chart-legend .lg-part { background: repeating-linear-gradient(45deg, rgb(var(--acc-rgb) / .4) 0 3px, var(--gold-2) 3px 5px); }
.chart-legend .lg-new { background: var(--gold-grad); }
.chart-legend .lg-back { background: #4f8fd8; }

/* months × years */
.tbl.pivot td, .tbl.pivot th { padding-top: 9px; padding-bottom: 9px; }
.tbl.pivot td.heat { background: rgb(var(--acc-rgb) / var(--h, 0)); background-clip: padding-box; font-weight: 600; }
.tbl.pivot td.heat em { display: block; font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--gold); }
.tbl.pivot td.now { box-shadow: inset 0 0 0 1.5px var(--border-gold); }
.tbl.pivot tfoot td { padding: 12px 16px; border-top: 1px solid var(--border-gold); background: var(--surface-2); }

/* share cards (branches / firms / classes) */
.rp-three { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 18px; }
.share-wrap { display: flex; align-items: center; gap: 16px; }
.donut { flex: none; }
.donut .track { fill: none; stroke: var(--surface-3); stroke-width: 16; }
.donut .seg-arc { fill: none; stroke-width: 16; }
.donut .d-v { font-family: var(--display); font-size: 24px; font-weight: 800; fill: var(--text); }
.donut .d-l { font-size: 11px; font-weight: 700; fill: var(--text-3); }
.share-list { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.share-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; grid-template-areas: 'dot nm v' '. sh d'; align-items: center; gap: 1px 8px; width: 100%; padding: 7px 8px; border: 0; border-radius: 10px; background: none; text-align: left; color: var(--text); cursor: default; }
.share-row.click { cursor: pointer; }
.share-row.click:hover { background: var(--gray-soft); }
.share-row i { grid-area: dot; width: 9px; height: 9px; border-radius: 3px; }
.share-row .nm { grid-area: nm; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.share-row b { grid-area: v; font-size: 13px; font-weight: 700; white-space: nowrap; }
.share-row .sh { grid-area: sh; font-size: 11.5px; color: var(--text-3); }
.share-row .d { grid-area: d; justify-self: end; }
@media (max-width: 420px) { .share-wrap { flex-direction: column; align-items: stretch; } .donut { align-self: center; } }

/* fleet efficiency */
.fleet-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 16px 22px 4px; }
.fleet-sum > div { padding: 12px 14px; border-radius: 12px; background: var(--gray-soft); border: 1px solid var(--border); min-width: 0; }
.fleet-sum span { display: block; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.fleet-sum b { display: block; margin-top: 4px; font-family: var(--display); font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.fleet-sum em { display: block; margin-top: 2px; font-style: normal; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fleet-tabs { padding: 10px 22px 0; }
.fleet-tabs .tabs { margin-bottom: 0; }
.util { display: flex; align-items: center; gap: 10px; }
.util .bar { flex: 1; min-width: 60px; }
.util .num { width: 46px; text-align: right; font-weight: 700; font-size: 12.5px; }
.sm-line { font-size: 11.5px; margin-top: 1px; }
.more-row { display: flex; justify-content: center; padding: 10px; border-top: 1px solid var(--border); }
.more-note { padding: 10px 18px; font-size: 12.5px; }
@media (max-width: 900px) { .fleet-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.rp-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 18px; }
/* new vs returning customers by month */
.nr-bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; align-items: end; height: 200px; }
.nr-bars .nr { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; min-width: 0; }
.nr-bars .nr .num { font-size: 11.5px; font-weight: 700; color: var(--text-2); }
.nr-bars .col { flex: 1; width: 100%; max-width: 34px; display: flex; flex-direction: column-reverse; justify-content: flex-start; border-radius: 8px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; }
.nr-bars .col i { display: block; width: 100%; }
.nr-bars .col i.back { background: #4f8fd8; }
.nr-bars .col i.new { background: var(--gold-grad); }
.nr-bars .nr b { font-size: 11.5px; color: var(--text-2); font-weight: 600; }
.dow-bars .dw.top .col i { box-shadow: 0 0 12px rgb(var(--acc-rgb) / .5); }
.dow-bars .dw.top b { color: var(--gold-ink); }

/* rows to check: collapsed by default */
.rp-odd .odd-head { width: 100%; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; padding-bottom: 16px; }
.rp-odd .odd-head h3 { color: var(--text); }
.rp-odd .odd-note { margin-top: 0; }

/* print / Save as PDF: white paper, no app chrome, cards kept whole */
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  html.printing, html.printing body { background: #fff !important; }
  html.printing .side, html.printing .topbar, html.printing .rp-bar, html.printing .page-head .actions, html.printing .toasts, html.printing .card-head .right .seg,
  html.printing .more-row, html.printing .fleet-tabs, html.printing .chart-tip, html.printing .odd-head .right { display: none !important; }
  html.printing .shell { display: block; }
  html.printing .page { padding: 0; max-width: none; animation: none; }
  html.printing .rp .print-head { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: baseline; padding-bottom: 8px; margin-bottom: 10px; border-bottom: 2px solid var(--gold); font-size: 11px; color: #555; }
  html.printing .rp .print-head b { font-size: 15px; color: #052340; margin-right: auto; }
  html.printing .page-head { margin: 0 0 10px; }
  html.printing .card { box-shadow: none !important; break-inside: avoid; page-break-inside: avoid; border-color: #ddd; }
  html.printing .rp-fleet, html.printing .rp-years, html.printing .tbl-card { break-inside: auto; page-break-inside: auto; }
  html.printing .tbl tr { break-inside: avoid; }
  html.printing .tbl th { position: static; }
  html.printing .rp-hero .val b { color: var(--gold-3); -webkit-text-fill-color: var(--gold-3); background: none; }
  html.printing * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.share-row { grid-template-columns: 10px minmax(0, 1fr) auto; grid-template-areas: 'dot nm nm' '. vl d'; gap: 2px 8px; }
.share-row .nm { white-space: normal; overflow: visible; line-height: 1.3; }
.share-row .vl { grid-area: vl; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.share-row .vl b { font-size: 13px; font-weight: 700; white-space: nowrap; }
.cu-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.cu-kpis > div { padding: 12px 14px; border-radius: 12px; background: var(--gray-soft); border: 1px solid var(--border); min-width: 0; }
.cu-kpis span { display: block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.cu-kpis b { display: block; margin-top: 4px; font-family: var(--display); font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.cu-kpis em { display: block; margin-top: 3px; font-style: normal; font-size: 12px; color: var(--text-3); }
.dow-note { margin: 16px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--gray-soft); font-size: 13px; color: var(--text-2); line-height: 1.5; }
.dow-note b { color: var(--text); }
.rp .dow-bars { height: 230px; }
/* share cards v2: donut + total on top, full-width rows below */
.share-top { display: flex; align-items: center; gap: 18px; padding-bottom: 14px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.share-sum span { display: block; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.share-sum b { display: block; margin-top: 2px; font-family: var(--display); font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.share-sum em { display: block; font-style: normal; font-size: 12px; color: var(--text-3); }
.rp .share-row { grid-template-columns: 10px minmax(0, 1fr) auto; grid-template-areas: 'dot nm v' '. meta d'; gap: 3px 10px; padding: 9px 8px; }
.rp .share-row .nm { grid-area: nm; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
.rp .share-row .v { grid-area: v; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.rp .share-row .meta { grid-area: meta; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp .share-row .d { grid-area: d; justify-self: end; }
.rp .share-row + .share-row { border-top: 1px solid var(--border); border-radius: 0; }
.rp .donut .d-v { font-size: 20px; }
.rp .donut .d-l { font-size: 10px; }
@media print {
  html.printing .rp-kpis { grid-template-columns: minmax(0, 1.45fr) repeat(2, minmax(0, 1fr)); gap: 10px; }
  html.printing .rp-hero { grid-column: auto; grid-row: span 2; }
  html.printing .rp-kpis .card { padding: 14px 16px; }
  html.printing .ins-list li .go { display: none; }
}
/* LIVE xarita: fleet count and the working cars that have no GPS unit */
.map-fleet-note { margin-top: 10px; font-size: 12.5px; color: var(--text-3); }
.map-fleet-note b { color: var(--text); }
.map-nogps { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
.map-nogps .nav-label { padding: 0 8px 6px; }
.map-car.nogps { width: 100%; border: 0; background: none; text-align: left; color: inherit; opacity: .8; }
.map-car.nogps .meta span { color: var(--text-3); }

/* ---------- Orient Agent: formatted answers (ui/richtext.js) — headings, lists, tables, phone links ---------- */
.msg.ai { max-width: min(100%, 980px); }
.msg > div { min-width: 0; }
.msg .bubble.rt-bubble { white-space: normal; padding: 14px 18px; }
.rt { display: flex; flex-direction: column; gap: 10px; }
.rt p { margin: 0; }
.rt .rt-h { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; font-size: 14px; font-weight: 700; line-height: 1.35; color: var(--text); }
.rt .rt-h:first-child { margin-top: 0; }
.rt .rt-h::before { content: ''; flex: none; width: 3px; height: 15px; border-radius: 2px; background: var(--gold); }
.rt ul, .rt ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; }
.rt li { padding-left: 2px; }
.rt li::marker { color: var(--gold); font-weight: 700; }
.rt b { font-weight: 700; color: var(--text); }
.rt code { font-family: var(--mono); font-size: 12.5px; padding: 1px 6px; border-radius: 6px; background: var(--surface-3); }
.rt hr { width: 100%; border: 0; border-top: 1px solid var(--border); margin: 2px 0; }
.rt-tw { overflow-x: auto; border: 1px solid var(--border-2); border-radius: 12px; background: var(--surface); }
.rt-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.45; }
.rt-table th { text-align: left; padding: 9px 12px; font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--surface-2); border-bottom: 1px solid var(--border-2); white-space: nowrap; }
.rt-table td { padding: 9px 12px; border-top: 1px solid var(--border); vertical-align: top; }
.rt-table tbody tr:first-child td { border-top: 0; }
.rt-table tbody tr:hover td { background: var(--gold-soft); }
.rt-table td.num, .rt-table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rt-table td.nw { white-space: nowrap; font-variant-numeric: tabular-nums; }
.rt-tel { color: inherit; text-decoration: none; white-space: nowrap; border-bottom: 1px dashed var(--border-gold); }
.rt-tel:hover { color: var(--gold-text); }
.rt-table th, .rt-table td { overflow-wrap: normal; word-break: normal; }
/* Phones: each table row becomes a small card ("Vaqt  19:24", "Mashina  01 B 832 BB …"). */
@media (max-width: 640px) {
  .msg .bubble.rt-bubble { padding: 12px 14px; }
  .msg.ai > .ai-av { display: none; }
  .rt-table thead { display: none; }
  .rt-table, .rt-table tbody, .rt-table tr { display: block; width: 100%; }
  .rt-table tr { padding: 9px 12px; border-top: 1px solid var(--border); }
  .rt-table tbody tr:first-child { border-top: 0; }
  .rt-table tbody tr:hover td { background: none; }
  .rt-table td { display: flex; gap: 10px; padding: 2px 0; border: 0; text-align: left !important; white-space: normal; font-size: 13px; }
  .rt-table td::before { content: attr(data-label); flex: none; width: 72px; color: var(--text-3); font-size: 12px; padding-top: 1px; }
  .rt-table td:first-child { font-weight: 700; }
}

/* Orient Agent avatar: the company logo (same picture as the Telegram bot's profile photo). */
.ai-av.logo { padding: 0; overflow: hidden; background: #f6f1e8; box-shadow: inset 0 0 0 1px rgb(var(--acc-rgb) / .45), 0 0 16px -4px rgb(var(--acc-rgb) / .5); }
.ai-av.logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
/* Hisobotlar → Avtopark samaradorligi: today's fleet or every car of the period */
.rp .fleet-tabs { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 8px 16px; }
.rp .fleet-tabs .tabs { flex: 1 1 auto; min-width: 0; }
.rp .fleet-scope { padding-bottom: 6px; }

/* ---------- Hisobotlar v3 colours: every section its own calm colour (no gold) ----------
   .tint-<name> sets --c (and --c-soft) for a card; its icon, bars, lines and numbers draw in it. Muted hues that sit
   well on navy and on white. Green/red stay for ▲▼ changes, amber for warnings. --ch-* are kept as aliases. */
:root {
  --rp-blue: #6fa8dc; --rp-teal: #4fbfb3; --rp-indigo: #8d9cf4; --rp-emerald: #5ccc95;
  --rp-violet: #b39bee; --rp-sky: #5bbfe8; --rp-rose: #ec8f9e; --rp-slate: #8796a8;
  --ch-1: var(--rp-blue); --ch-2: #4a86c0; --ch-3: #a7c7e7; --ch-4: #2f6396; --ch-5: #d0e1f2;
  --ch-6: #8796a8; --ch-7: #5d6d80; --ch-8: #3f4e60; --ch-top: #9cc4ec; --ch-bot: #2f6396;
  --ch-cmp: var(--rp-slate); --ch-soft: rgba(111, 168, 220, .14);
}
:root[data-theme='light'] {
  --rp-blue: #2f6496; --rp-teal: #12807a; --rp-indigo: #4a58c4; --rp-emerald: #1b8253;
  --rp-violet: #6a4cc2; --rp-sky: #1a7aa8; --rp-rose: #b54459; --rp-slate: #6b7a8c;
  --ch-1: #0b3a63; --ch-2: #2f6496; --ch-3: #6f98c4; --ch-4: #a9c3df; --ch-5: #d3e1ef;
  --ch-6: #8a96a3; --ch-7: #b4bdc7; --ch-8: #d5dbe1; --ch-top: #3d72a6; --ch-bot: #0b3a63;
  --ch-cmp: var(--rp-slate); --ch-soft: #e6eef6;
}
.rp { --c: var(--rp-blue); }
.rp .tint-blue { --c: var(--rp-blue); } .rp .tint-teal { --c: var(--rp-teal); } .rp .tint-indigo { --c: var(--rp-indigo); }
.rp .tint-emerald { --c: var(--rp-emerald); } .rp .tint-violet { --c: var(--rp-violet); } .rp .tint-sky { --c: var(--rp-sky); }
.rp .tint-rose { --c: var(--rp-rose); } .rp .tint-slate { --c: var(--rp-slate); }
.rp [class*='tint-'] { --c-soft: color-mix(in srgb, var(--c) 14%, transparent); --c-line: color-mix(in srgb, var(--c) 38%, transparent); }

/* Card icons take their card's colour; a thin coloured line on top of each KPI card. */
.rp [class*='tint-'] > .card-head .ic-box, .rp-kpis [class*='tint-'] .lbl .ic-box { background: var(--c-soft) !important; color: var(--c) !important; box-shadow: none !important; }
.rp-kpis .card[class*='tint-'] { border-top: 2px solid var(--c-line); }
.rp-kpis .card[class*='tint-'] .val b { color: var(--c); }
.rp-kpis .rp-k.click:hover, .rp .ins-list li.click:hover { border-color: var(--c-line); }
.rp-hero { background: radial-gradient(120% 90% at 100% 0%, var(--c-soft), transparent 55%), var(--card-bg); border-color: var(--border-2); }
.rp-hero .val b { background: none; -webkit-text-fill-color: currentColor; }
.rp-fcast { background: var(--gray-soft); border: 1px solid var(--border); border-left: 3px solid var(--rp-sky); }
.rp-fcast svg { color: var(--rp-sky); }

/* Small pictures in the KPI cards. */
.rp .mini { margin-top: 14px; min-height: 44px; }
.rp .mini svg { display: block; overflow: visible; }
.rp .mini rect { fill: color-mix(in srgb, var(--c) 34%, transparent); }
.rp .mini rect.last { fill: var(--c); }
.rp .mini .ml { fill: none; stroke: var(--c); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.rp .mini .ma { fill: color-mix(in srgb, var(--c) 12%, transparent); }
.rp .mini .md { fill: var(--c); stroke: var(--surface); stroke-width: 2; }
.rp .meter { position: relative; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; align-items: end; min-height: 0; height: 44px; padding-top: 22px; }
.rp .meter i { height: 14px; border-radius: 4px; background: color-mix(in srgb, var(--c) 16%, transparent); }
.rp .meter i.on { background: var(--c); }
.rp .meter b { position: absolute; bottom: -4px; width: 2px; height: 26px; margin-left: -1px; border-radius: 2px; background: var(--text-3); }
.rp .split { min-height: 0; }
.rp .split .track { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: color-mix(in srgb, var(--c) 12%, transparent); }
.rp .split .track i { display: block; height: 100%; }
.rp .split i.a { background: var(--c); }
.rp .split i.b { background: color-mix(in srgb, var(--c) 40%, transparent); }
.rp .split .keys { display: flex; gap: 16px; margin-top: 8px; font-size: 12px; color: var(--text-3); }
.rp .split .keys span { display: inline-flex; align-items: center; gap: 6px; }
.rp .split .keys i { width: 9px; height: 9px; border-radius: 3px; }

/* Revenue line in the hero: its colour; last year in slate. */
.spark .cur { stroke: var(--c); }
.spark .dot { fill: var(--c); }
.spark .ly { stroke: var(--rp-slate); }

/* The trend chart takes the colour of the figure shown (Tushum blue, Ijaralar teal, Kunlar emerald, O‘rtacha chek indigo). */
.rp-trend .trend-chart .y { fill: var(--c); }
.rp-trend .trend-chart .bar-g.on rect:nth-child(2) { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--c) 50%, transparent)); }
.trend-chart .ly-line { stroke: var(--rp-slate); stroke-width: 1.6; }
.trend-chart .ly-dot { stroke: var(--rp-slate); }
.rp-trend .chart-legend .lg-bar { background: linear-gradient(180deg, color-mix(in srgb, var(--c) 62%, #ffffff), var(--c)); }
.rp-trend .chart-legend .lg-part { background: repeating-linear-gradient(45deg, var(--c-soft) 0 3px, var(--c) 3px 5px); }
.chart-legend .lg-line { border-top-color: var(--rp-slate); }

/* Months × years: heat in the card's colour. */
.rp .tbl.pivot td.heat { background: color-mix(in srgb, var(--c) calc(var(--h, 0) * 100%), transparent); }
.rp .tbl.pivot td.heat em { color: var(--c); }
.rp .tbl.pivot td.now { box-shadow: inset 0 0 0 1.5px var(--c-line); }
.rp .tbl.pivot tfoot td { border-top-color: var(--border-2); }

/* Bars in a card take its colour; utilisation keeps its meaning: good emerald, middle blue, low rose. */
.rp [class*='tint-'] .bar > i, .rp [class*='tint-'] .hbars .bar > i { background: var(--c); }
.rp-fleet .util .bar.green > i { background: var(--rp-emerald); }
.rp-fleet .util .bar > i { background: var(--rp-blue); }
.rp-fleet .util .bar.amber > i { background: var(--rp-rose); }
.rp-fleet .fleet-sum > div { border-top: 2px solid var(--c-line); }
.rp-fleet .fleet-sum > div:nth-child(2) b { color: var(--rp-emerald); }
.rp .cu-kpis > div { border-top: 2px solid var(--c-line); }

/* New vs returning customers, weekdays. */
.nr-bars .col i.new, .chart-legend .lg-new { background: var(--rp-violet); }
.nr-bars .col i.back, .chart-legend .lg-back { background: color-mix(in srgb, var(--rp-violet) 35%, var(--rp-slate)); }
.rp .dow-bars .col i { background: linear-gradient(180deg, color-mix(in srgb, var(--c) 55%, #ffffff), var(--c)); opacity: .55; }
.rp .dow-bars .dw.top .col i { opacity: 1; box-shadow: none; }
.rp .dow-bars .dw.top b { color: var(--c); }

/* Sellers: the first three ranks in blue, teal and violet. */
.rp .rank-1 .avatar { background: var(--rp-blue); color: #fff; box-shadow: none; }
.rp .rank-2 .avatar { background: var(--rp-teal); color: #fff; box-shadow: none; }
.rp .rank-3 .avatar { background: var(--rp-violet); color: #fff; box-shadow: none; }

/* Insights keep their own tones (green up, red down, amber check, violet people…). */
.rp .ins-list li.amber { background: var(--gray-soft); border-left: 3px solid var(--amber); }
.rp .ins-list li.red { border-left: 3px solid var(--red); }
.rp .ins-list li.green { border-left: 3px solid var(--green); }

/* Donuts and legends. */
.donut .track { stroke: color-mix(in srgb, var(--surface-3) 80%, transparent); }
.share-row i { border-radius: 50%; width: 9px; height: 9px; }
/* ▲▼ chips: calm greens and reds. */
.rp .dl.up { background: color-mix(in srgb, var(--green) 12%, transparent); color: var(--green); }
.rp .dl.down { background: color-mix(in srgb, var(--red) 11%, transparent); color: var(--red); }

/* Telegram link: app, Telegram Web, or the /start code sent by hand. */
.tg-link { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.tg-code { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--gray-soft); border: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); }
.tg-code code { flex: 1; min-width: 0; padding: 6px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border-2); font-family: var(--mono); font-size: 13px; color: var(--text); user-select: all; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-share .share-sum b { color: var(--c); }

/* ------------------------------------------------------------------ pre-handover QA pass (2026-10-20) */
/* Codes, passports and contract numbers read in the UI font (tabular figures), not a typewriter font; inputs for
   tokens and keys keep the monospace face. */
.mono { font-family: var(--font); font-variant-numeric: tabular-nums; letter-spacing: .02em; font-size: inherit; font-weight: 600; }
/* Inputs for numbers, accounts and tokens use the UI font too (tabular figures); only code snippets stay monospace. */
.input.mono, .textarea.mono, .field.mono .input { font-family: var(--font); font-variant-numeric: tabular-nums; letter-spacing: .03em; font-weight: 600; }
.code-inline, .rt code { font-family: var(--mono); font-weight: 500; letter-spacing: 0; }
/* Murojaatlar: all six stages in one row (scrolls sideways on small screens). */
.kanban { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr); }
/* Phone top bar: the page name on one line. */
.crumbs b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs { flex: 1 1 auto; }
/* Card titles never squeeze into two short lines: on a phone the right-hand controls move under the title. */
.card-head > div:not(.right):not(.ic-box) { min-width: 0; }
@media (max-width: 600px) {
  .card-head { flex-wrap: wrap; row-gap: 10px; }
  .card-head > div:not(.right):not(.ic-box) { flex: 1 1 auto; min-width: min(100%, 170px); }
  .card-head .right:empty { display: none; }
}
/* Typography scale (one system for every section): Montserrat for titles and figures, Manrope for text.
   28 page title · 15.5 card title · 14 text and page subtitles · 12.5–13 secondary · 11 uppercase labels — nothing
   smaller than 11 px except plate lettering and chart ticks. */
.page-head p { font-size: 14px; line-height: 1.5; }
.card-head h3 { font-size: 15.5px; line-height: 1.3; }
.card-head .sub { line-height: 1.45; }
.badge.sm, .palette-group, .ph-group, .refine-label, .refine-clear, .chip-btn span, .map-group span, .brand-mark span, .avatar.sm, kbd { font-size: 11px; }
.trend-chart .y, .month-chart .y, .tbl.pivot td.heat em { font-size: 11px; }
.rp .donut .d-l { font-size: 10.5px; }
.stat .label, .rp-kpis .lbl { letter-spacing: .005em; }
/* Phones: the LIVE dot gives its place to the page name in the top bar. */
@media (max-width: 430px) { .topbar .live-pill { display: none; } }
/* Sozlamalar has ten tabs: on laptop widths they drop their icons so all fit on one line. */
@media (min-width: 900px) and (max-width: 1599px) { .tabs.wrap .tab svg { display: none; } .tabs.wrap .tab { padding: 0 12px; } }
/* Car specs in table cells ("Krossover | 1.2 Turbo | Benzin") wrap instead of being cut mid-word. */
.cell-car .t .spec, .cell-car .t span.spec { flex-wrap: wrap; white-space: normal; row-gap: 1px; }

/* ---------------------------------------------------------------------------------------------------------------
   Bronlar calendar v2 (pages/bookings.js Timeline). Tiles count the fleet by where each car stands now and filter
   the rows; every car says its state in words; bars use the same colours: blue = ijarada, red = kechikkan (running
   on to now, striped past the agreed return, until the return is recorded), violet = bron, dashed = tasdiqlanmagan,
   grey = done. */
.cal-tiles { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.cal-tile { --tone: var(--text-3); --tone-ink: var(--text-2); display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; padding: 12px 14px 13px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.cal-tile:hover { border-color: color-mix(in srgb, var(--tone) 55%, var(--border)); }
.cal-tile .l { display: flex; align-items: center; gap: 7px; max-width: 100%; font-size: 12.5px; font-weight: 600; color: var(--tone-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-tile .l svg { flex: none; width: 15px; height: 15px; color: var(--tone); }
.cal-tile .n { font-family: var(--display); font-size: 26px; line-height: 1; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.cal-tile.zero .n { color: var(--text-3); opacity: .7; }
.cal-tile.on { border-color: var(--tone); box-shadow: inset 0 0 0 1px var(--tone); background: color-mix(in srgb, var(--tone) 9%, var(--surface)); }
.t-all { --tone: var(--text-3); --tone-ink: var(--text-2); }
.t-rent { --tone: var(--blue-dot); --tone-ink: var(--blue); }
.t-late { --tone: var(--red-dot); --tone-ink: var(--red); }
.t-booked { --tone: #8b5cf6; --tone-ink: var(--violet); }
.t-due { --tone: var(--amber-dot); --tone-ink: var(--amber); }
.t-free { --tone: var(--green-dot); --tone-ink: var(--green); }
.t-service { --tone: var(--amber-dot); --tone-ink: var(--amber); }

.cal2 .cal-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 18px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.cal2 .cal-range { margin-left: 6px; font-size: 15px; font-weight: 700; white-space: nowrap; }
.cal2 .cal-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; }
.cal2 .cal-search { width: 260px; }
.cal-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.cal-legend i.g-bar2 { position: static; display: inline-block; width: 18px; height: 11px; padding: 0; border-radius: 3px; box-shadow: none; cursor: default; }
.cal-legend i.g-bar2.pending { outline-width: 1.2px; }

.cal2 .gantt { max-height: calc(100vh - 330px); min-height: 320px; }
.cal2 .gantt-grid { position: relative; }
.cal2 .g-corner { font-size: 11px; letter-spacing: .06em; }
.cal2 .g-head { position: sticky; height: 62px; gap: 0; justify-content: flex-end; padding-bottom: 7px; }
.cal2 .g-head em { display: block; height: 12px; line-height: 12px; font-style: normal; font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.cal2 .g-head span { line-height: 14px; }
.cal2 .g-head.past { opacity: .62; }
.cal2 .g-head.today { box-shadow: inset 0 -2px 0 var(--gold); }
.cal2 .g-car { height: 64px; padding: 0 14px 0 12px; cursor: pointer; transition: background .15s; }
.cal2 .g-car:hover { background: var(--surface-2); }
.cal2 .g-car .car-thumb.sm { width: 64px; height: 40px; flex: none; }
.cal2 .g-car .t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal2 .g-car .t b { font-size: 13px; line-height: 1.2; }
.cal2 .g-car .t .pl { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.cal2 .g-car .t .st { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 11.5px; font-weight: 650; color: var(--tone-ink); white-space: nowrap; overflow: hidden; }
.cal2 .g-car .t .st i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone) 18%, transparent); }
.cal2 .g-car .t .st em { font-style: normal; font-weight: 500; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; }
.cal2 .g-car .t .st em::before { content: '·'; margin-right: 6px; color: var(--text-3); }
.cal2 .g-row { position: relative; display: grid; }
.cal2 .g-cell { position: relative; height: 64px; }
.cal2 .g-cell.weekend { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.cal2 .g-cell.past { background: color-mix(in srgb, var(--surface-2) 80%, transparent); }
.cal2 .g-cell.today { background: rgb(var(--acc-rgb) / .06); }
.cal2 .g-slot:hover { background: rgb(var(--acc-rgb) / .1); }
.cal2 .g-slot:hover::after { content: '+'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 20px; font-weight: 500; color: var(--gold); }
.cal2 .g-head.today { background: linear-gradient(180deg, rgb(var(--acc-rgb) / .2), rgb(var(--acc-rgb) / .06)), var(--surface-2); }
.g-now { position: absolute; top: 62px; bottom: 0; width: 2px; margin-left: -1px; background: var(--gold); opacity: .75; z-index: 1; pointer-events: none; }

.g-bar2 { position: absolute; top: 15px; height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border-radius: 9px; font-size: 12px; font-weight: 650; white-space: nowrap; overflow: hidden; cursor: pointer; z-index: 2; transition: transform .15s, box-shadow .15s; }
.g-bar2:hover { transform: translateY(-1px); z-index: 3; }
.g-bar2 .nm { overflow: hidden; text-overflow: ellipsis; }
.g-bar2 .dt { margin-left: auto; font-size: 11px; font-weight: 500; opacity: .82; font-variant-numeric: tabular-nums; }
.g-bar2 svg { flex: none; width: 13px; height: 13px; margin: 0 -3px; opacity: .85; }
.g-bar2.cut-l { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.g-bar2.cut-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.g-bar2.rent { background: linear-gradient(135deg, #3a86d1, #0a4f86); color: #fff; box-shadow: 0 6px 14px -9px rgba(10, 79, 134, .8); }
.g-bar2.late { background: linear-gradient(135deg, #e5484d, #b42318); color: #fff; box-shadow: 0 6px 14px -9px rgba(180, 35, 24, .8); }
.g-bar2.booked { background: linear-gradient(135deg, #9b7bf0, #6b3fd1); color: #fff; box-shadow: 0 6px 14px -9px rgba(107, 63, 209, .8); }
.g-bar2.pending { background: var(--violet-soft); color: var(--violet); outline: 1.5px dashed color-mix(in srgb, var(--violet) 70%, transparent); outline-offset: -1.5px; }
.g-bar2.done { top: 19px; height: 26px; background: var(--gray-soft); color: var(--text-3); box-shadow: inset 0 0 0 1px var(--border-2); font-weight: 600; }
.g-bar2.over::after { content: ''; position: absolute; top: 0; bottom: 0; left: var(--due, 0); right: 0; border-left: 1.5px solid rgba(255, 255, 255, .55); background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .26) 0 6px, transparent 6px 12px); pointer-events: none; }
.g-bar2 > * { position: relative; z-index: 1; }

@media (max-width: 1599px) { .cal-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .cal-tiles { display: flex; overflow-x: auto; gap: 8px; margin: 0 -16px 12px; padding: 0 16px 2px; scrollbar-width: none; }
  .cal-tiles::-webkit-scrollbar { display: none; }
  .cal-tile { flex: 0 0 auto; min-width: 116px; padding: 10px 12px; }
  .cal-tile .n { font-size: 22px; }
  .cal2 .cal-head { padding: 12px; }
  .cal2 .cal-tools, .cal2 .cal-search { width: 100%; }
  .cal-legend { gap: 6px 10px; font-size: 11.5px; }
  .cal2 .gantt { max-height: calc(100vh - 250px); }
  .cal2 .g-car { padding: 0 10px; }
  .cal2 .g-car .t b { font-size: 12.5px; }
  .g-bar2 { padding: 0 7px; font-size: 11.5px; }
}

/* ---------------------------------------------------------------------------------------------------------------
   Orqaga: one back button in the top bar of every page except Bosh sahifa — back to the previous screen (same scroll
   position), or up to the parent section when the page was opened directly. The crumbs above the page are links. */
.back-btn { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px 0 10px; border-radius: 11px; border: 1px solid var(--border-2); background: var(--input-bg); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .01em; cursor: pointer; transition: border-color .2s, background .2s, transform .15s; }
.back-btn svg { width: 17px; height: 17px; color: var(--gold); transition: transform .2s var(--ease); }
.back-btn:hover { border-color: var(--border-gold); background: rgb(var(--acc-rgb) / .08); }
.back-btn:hover svg { transform: translateX(-2px); }
.back-btn:active { transform: scale(.97); }
.back-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.crumbs a { color: var(--text-3); text-decoration: none; white-space: nowrap; transition: color .15s; }
.crumbs a:hover { color: var(--gold-ink); }
.crumbs a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
@media (max-width: 720px) {
  .back-btn { width: 38px; height: 38px; padding: 0; justify-content: center; border-radius: 12px; }
  .back-btn span { display: none; }
  .topbar { gap: 8px; }
  .top-actions { gap: 2px; }
  /* The page name gets the room: on a phone the colour theme is switched from the profile menu. */
  .topbar .theme-btn { display: none; }
  .crumbs b { font-size: 14.5px; }
}
/* A booking's code (B-2026-3315) stays on one line; its badges move under it when there is no room. */
.hero-card .row:has(> h1) { flex-wrap: wrap; row-gap: 6px; }
.hero-card .row > h1 { white-space: nowrap; }

/* Sozlamalar → Filiallar / Sotuvchilar: the pick lists as tables (settings.js PickTable). */
.pick-lists { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.lt-count { font-size: 12.5px; font-weight: 700; color: var(--text-3); padding: 4px 10px; border-radius: 999px; background: rgb(var(--acc-rgb) / .08); }
.tbl.lt td { padding: 10px 14px; }
.tbl.lt th { padding: 11px 14px; }
.tbl.lt .lt-n { width: 44px; text-align: center; padding-left: 10px; padding-right: 0; }
.lt-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lt-name b, .lt-name span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-ic { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 9px; color: var(--gold); background: rgb(var(--acc-rgb) / .1); }
.lt-month { display: inline-block; min-width: 28px; padding: 2px 8px; border-radius: 999px; font-weight: 700; color: var(--green); background: var(--green-soft); }
.lt-acts { display: inline-flex; gap: 2px; opacity: .55; transition: opacity .15s; }
.tbl.lt tbody tr:hover .lt-acts, .tbl.lt tbody tr:focus-within .lt-acts { opacity: 1; }
.lt-acts .lt-del:hover { color: var(--red); }
.lt-edit { display: flex; align-items: center; gap: 6px; }
.lt-edit .input, .lt-add .input { height: 36px; }
.tbl.lt tr.editing { background: rgb(var(--acc-rgb) / .06); }
.tbl.lt tfoot td { padding: 12px 14px; border-top: 1px solid var(--border); background: rgb(var(--acc-rgb) / .025); }
.lt-add { display: flex; gap: 8px; align-items: center; }
.lt-add .input { flex: 1; min-width: 0; }
.lt-empty { text-align: center; padding: 22px 14px !important; }
.lt-old { border-top: 1px solid var(--border); }
.lt-old-head { display: flex; align-items: center; gap: 9px; width: 100%; padding: 12px 16px; border: 0; background: none; color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.lt-old-head:hover { background: rgb(var(--acc-rgb) / .04); }
.lt-old-head span { flex: 1; }
.lt-old-head b { font-size: 12px; color: var(--text-3); }
.tbl.lt-oldtbl td { padding: 8px 14px; font-size: 13px; color: var(--text-2); }
.tbl.lt-oldtbl tr:first-child td { border-top: 1px solid var(--border); }
@media (max-width: 720px) { .lt-acts { opacity: 1; } .tbl.lt th:nth-child(5), .tbl.lt td:nth-child(5) { display: none; } }

/* Hisobotlar printed on portrait paper too (Safari ignores "@page size: landscape"): nothing is cut at the right edge.
   Scroll boxes open up and the tables tighten, so the browser scales the whole report to the paper width. */
@media print {
  html.printing .rp .table-wrap, html.printing .rp .tbl-card { overflow: visible !important; }
  /* Charts were drawn for the screen width: on paper they scale to their box (every chart has a viewBox). */
  html.printing .rp svg:not(.donut) { width: 100%; max-width: 100%; height: auto; }
  html.printing .rp .tbl { font-size: 10.5px; }
  html.printing .rp .tbl th, html.printing .rp .tbl td { padding: 5px 7px; }
}

/* ---------------------------------------------------------------------------------------------------------------
   Hisobotlar: money from the finance sheet (pages/reports.js PnlCard, the Tushum source line). The P&L keeps the
   article names in a sticky first column; sub-totals are bold, the result row is green/red. */
.rp-hero .rp-src { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 11.5px; color: var(--text-3); }
.rp-hero .rp-src svg { flex: none; }
.rp-pnl .tbl.pnl { min-width: max-content; }
.rp-pnl .tbl.pnl th, .rp-pnl .tbl.pnl td { white-space: nowrap; }
.rp-pnl .tbl.pnl thead th small { display: block; font-size: 10.5px; font-weight: 500; color: var(--text-3); }
.rp-pnl .tbl.pnl tbody th { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; font-weight: 500; min-width: 210px; text-transform: none; letter-spacing: normal; font-size: 13px; color: var(--text); }
.rp-pnl .tbl.pnl tbody tr.cost th { padding-left: 26px; color: var(--text-2); font-weight: 400; }
.rp-pnl .tbl.pnl tbody tr.cost td { color: var(--text-2); }
.rp-pnl .tbl.pnl tbody tr.in th, .rp-pnl .tbl.pnl tbody tr.in td { font-weight: 650; }
.rp-pnl .tbl.pnl tbody tr.sub th, .rp-pnl .tbl.pnl tbody tr.sub td { font-weight: 700; background: var(--surface-2); }
.rp-pnl .tbl.pnl tbody tr.sub th { background: var(--surface-2); }
.rp-pnl .tbl.pnl tbody tr.res th, .rp-pnl .tbl.pnl tbody tr.res td { font-weight: 800; border-top: 2px solid var(--border-2); }
.rp-pnl .tbl.pnl td.pos { color: var(--green); }
.rp-pnl .tbl.pnl td.neg { color: var(--red); }
.rp-pnl .tbl.pnl tbody tr.pct th, .rp-pnl .tbl.pnl tbody tr.pct td { font-size: 12px; color: var(--text-3); }
.rp-pnl .tbl.pnl tbody tr.note th, .rp-pnl .tbl.pnl tbody tr.note td { font-size: 12.5px; color: var(--text-2); font-style: italic; }
.rp-pnl .tbl.pnl tbody tr:last-child th { border-bottom: 0; }
.rp-pnl .pnl-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 12px 18px 16px; font-size: 12px; line-height: 1.5; }
.rp-pnl .pnl-note svg { flex: none; margin-top: 2px; }
@media (max-width: 640px) { .rp-pnl .tbl.pnl tbody th { min-width: 150px; max-width: 170px; white-space: normal; } }
@media print { .rp-pnl .tbl.pnl tbody th { position: static; } }
