/* Game On Wildlife — driver & office portal
   Brand: bush-night green, burnished gold, ivory. Display: Anton. Body: Manrope. */

@font-face { font-family: 'Anton'; src: url('../assets/fonts/anton-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('../assets/fonts/manrope-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('../assets/fonts/manrope-500.woff2') format('woff2'); font-weight: 500 600; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('../assets/fonts/manrope-700.woff2') format('woff2'); font-weight: 700 800; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('../assets/fonts/instrument-italic.woff2') format('woff2'); font-style: italic; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #060f0a;
  --bg-2: #0a1810;
  --surface: #0f1d15;
  --surface-2: #142619;
  --surface-3: #1a2f20;
  --glass: rgba(16, 32, 22, .62);
  --line: rgba(212, 175, 55, .13);
  --line-2: rgba(212, 175, 55, .26);
  --line-soft: rgba(244, 236, 216, .07);
  --gold: #d4af37;
  --gold-hi: #f6dc8a;
  --gold-lo: #9c7a1c;
  --gold-ink: #e3c25f;
  --gold-grad: linear-gradient(135deg, #f8e3a0 0%, #e2bf57 32%, #c99b2c 62%, #8f6d17 100%);
  --text: #f4ecd8;
  --text-2: #cfc6ad;
  --muted: #8f8a74;
  --faint: #5f6152;
  --green: #3fb27f;
  --green-bg: rgba(63, 178, 127, .14);
  --red: #ec6a5e;
  --red-bg: rgba(236, 106, 94, .14);
  --amber: #f0ad4e;
  --amber-bg: rgba(240, 173, 78, .14);
  --blue: #5aa2e6;
  --blue-bg: rgba(90, 162, 230, .14);
  --sunset: #e8902c;
  --shadow: 0 18px 50px -18px rgba(0, 0, 0, .7), 0 2px 8px rgba(0, 0, 0, .3);
  --shadow-gold: 0 10px 30px -10px rgba(212, 175, 55, .45);
  --r: 18px;
  --r-sm: 12px;
  --f-display: 'Anton', 'Impact', 'Arial Narrow Bold', sans-serif;
  --f-body: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --f-serif: 'Instrument Serif', Georgia, serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --sidebar: 264px;
  --chart-grid: rgba(244, 236, 216, .07);
  --chart-axis: #8f8a74;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4efe2;
  --bg-2: #ece5d3;
  --surface: #fffdf7;
  --surface-2: #f8f3e6;
  --surface-3: #f1e9d6;
  --glass: rgba(255, 252, 244, .78);
  --line: rgba(140, 104, 20, .16);
  --line-2: rgba(140, 104, 20, .32);
  --line-soft: rgba(30, 30, 20, .08);
  --gold: #b58e22;
  --gold-hi: #d9b347;
  --gold-lo: #7c5e12;
  --gold-ink: #8a6912;
  --text: #17170f;
  --text-2: #45432f;
  --muted: #77735e;
  --faint: #a6a28c;
  --green: #217a52;
  --green-bg: rgba(33, 122, 82, .12);
  --red: #c4372b;
  --red-bg: rgba(196, 55, 43, .1);
  --amber: #b26b06;
  --amber-bg: rgba(178, 107, 6, .12);
  --blue: #2563a8;
  --blue-bg: rgba(37, 99, 168, .1);
  --shadow: 0 16px 40px -20px rgba(60, 45, 10, .35), 0 2px 6px rgba(60, 45, 10, .08);
  --shadow-gold: 0 10px 26px -12px rgba(160, 120, 20, .5);
  --chart-grid: rgba(30, 30, 20, .08);
  --chart-axis: #77735e;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 500 15px/1.5 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--gold-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: rgba(212, 175, 55, .35); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.hide-s { display: inline; }
@media (max-width: 560px) { .hide-s { display: none; } .today-meta { flex-basis: 100%; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- ambient background ---------- */
.bg-fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-fx .glow-a, .bg-fx .glow-b {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5;
}
.bg-fx .glow-a { width: 60vw; height: 60vw; left: -20vw; top: -25vw; background: radial-gradient(circle, rgba(212, 175, 55, .16), transparent 65%); animation: drift 26s ease-in-out infinite alternate; }
.bg-fx .glow-b { width: 55vw; height: 55vw; right: -22vw; bottom: -30vw; background: radial-gradient(circle, rgba(232, 144, 44, .12), transparent 65%); animation: drift 32s ease-in-out infinite alternate-reverse; }
.bg-fx .topo { position: absolute; inset: -10%; background-size: 900px 900px; opacity: .55; animation: topo 140s linear infinite; }
.bg-fx .grain { position: absolute; inset: 0; opacity: .05; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
:root[data-theme="light"] .bg-fx .glow-a { background: radial-gradient(circle, rgba(212, 175, 55, .22), transparent 65%); }
:root[data-theme="light"] .bg-fx .topo { opacity: .5; }
@keyframes drift { to { transform: translate(8vw, 6vw) scale(1.08); } }
@keyframes topo { to { background-position: 900px 450px; } }

/* ---------- shell ---------- */
.shell { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px;
  padding: 22px 16px 16px; border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 24, 16, .92), rgba(6, 15, 10, .96));
  backdrop-filter: blur(12px);
}
:root[data-theme="light"] .sidebar { background: linear-gradient(180deg, #0f2318, #0a1810); color: #f4ecd8; --text: #f4ecd8; --text-2: #cfc6ad; --muted: #9a957e; --line: rgba(212, 175, 55, .16); }
.sidebar .brand { display: block; padding: 4px 8px 18px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.sidebar .brand img { width: 100%; max-width: 210px; margin: 0 auto; filter: drop-shadow(0 6px 20px rgba(212, 175, 55, .18)); }
.sidebar .brand .sub { display: block; text-align: center; margin-top: 8px; font: italic 15px/1 var(--f-serif); color: var(--muted); letter-spacing: .2px; }
.nav-label { font: 700 10.5px/1 var(--f-body); letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); padding: 14px 12px 6px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: var(--text-2); font-weight: 600; font-size: 14.5px; text-decoration: none; transition: background .2s, color .2s, transform .2s var(--ease);
}
.nav a svg { width: 20px; height: 20px; flex: none; opacity: .85; }
.nav a:hover { background: rgba(212, 175, 55, .07); color: var(--text); transform: translateX(2px); }
.nav a.active { color: #120d02; background: var(--gold-grad); box-shadow: var(--shadow-gold); }
.nav a.active svg { opacity: 1; }
.nav a .count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 10px; background: var(--red); color: #fff; font: 800 11px/20px var(--f-body); text-align: center; }
.nav a.active .count { background: #120d02; color: var(--gold-hi); }
.sidebar .spacer { flex: 1; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.side-user .who { min-width: 0; flex: 1; }
.side-user .who b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .who span { font-size: 12px; color: var(--muted); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  padding: 14px 28px; min-height: 72px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 92%, transparent), color-mix(in srgb, var(--bg) 70%, transparent));
  backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid var(--line-soft);
}
.topbar .mobile-logo { display: none; height: 34px; width: auto; }
.topbar .crumbs { min-width: 0; flex: 1; }
.topbar .crumbs .eyebrow { font: 700 11px/1 var(--f-body); letter-spacing: 1.8px; text-transform: uppercase; color: var(--gold-ink); }
.topbar .crumbs h1 { margin: 4px 0 0; font: 400 26px/1.05 var(--f-display); letter-spacing: .6px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2); cursor: pointer; transition: all .2s var(--ease);
}
.icon-btn:hover { color: var(--gold-ink); border-color: var(--line-2); transform: translateY(-1px); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .dot { position: absolute; top: 7px; right: 7px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font: 800 10px/17px var(--f-body); text-align: center; box-shadow: 0 0 0 3px var(--bg); }
.icon-btn .dot.pop { animation: pop .5s var(--spring); }
@keyframes pop { 0% { transform: scale(0); } 100% { transform: scale(1); } }
.live-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; font: 800 11px/1 var(--f-body); letter-spacing: 1.2px; color: var(--green); background: var(--green-bg); text-transform: uppercase; }
.pulse-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pulse-dot::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid currentColor; animation: ping 1.8s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }

.view { position: relative; padding: 26px 28px 48px; max-width: 1480px; width: 100%; margin: 0 auto; }
.view.enter > * { animation: rise .55s var(--ease) both; }
.view.enter > *:nth-child(2) { animation-delay: .05s; }
.view.enter > *:nth-child(3) { animation-delay: .1s; }
.view.enter > *:nth-child(4) { animation-delay: .15s; }
.view.enter > *:nth-child(5) { animation-delay: .2s; }
.view.enter > *:nth-child(n+6) { animation-delay: .25s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.reveal { animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }

/* mobile tab bar */
.tabbar { display: none; }
@media (max-width: 1023px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .topbar { padding: 10px 16px; min-height: 62px; }
  .topbar .mobile-logo { display: block; }
  .topbar .crumbs h1 { font-size: 21px; }
  .topbar .crumbs .eyebrow { display: none; }
  .topbar .live-pill { display: none; }
  .card-head { flex-wrap: wrap; }
  .view { padding: 18px 16px calc(110px + env(safe-area-inset-bottom)); }
  .tabbar {
    position: fixed; z-index: 40; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: center;
    height: 66px; padding: 0 6px; border-radius: 22px; border: 1px solid var(--line-2);
    background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(18px) saturate(1.3);
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .65);
  }
  .tabbar a { display: grid; justify-items: center; gap: 3px; color: var(--muted); font: 700 10.5px/1 var(--f-body); text-decoration: none; padding: 8px 0; border-radius: 14px; transition: color .2s; }
  .tabbar a svg { width: 22px; height: 22px; transition: transform .3s var(--spring); }
  .tabbar a.active { color: var(--gold-ink); }
  .tabbar a.active svg { transform: translateY(-2px) scale(1.12); }
  .tabbar .fab { justify-self: center; display: grid; place-items: center; width: 56px; height: 56px; margin-top: -26px; border-radius: 18px; background: var(--gold-grad); color: #140f02; box-shadow: var(--shadow-gold), 0 0 0 6px var(--bg); border: 0; cursor: pointer; transition: transform .3s var(--spring); }
  .tabbar .fab:active { transform: scale(.92); }
  .tabbar .fab svg { width: 26px; height: 26px; }
}

/* ---------- type ---------- */
.display { font: 400 clamp(30px, 4.2vw, 46px)/1 var(--f-display); letter-spacing: .5px; text-transform: uppercase; margin: 0; }
.h2 { font: 400 22px/1.1 var(--f-display); letter-spacing: .6px; text-transform: uppercase; margin: 0; }
.h3 { font: 800 15px/1.3 var(--f-body); margin: 0; }
.serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; }
.eyebrow { font: 800 11px/1 var(--f-body); letter-spacing: 1.8px; text-transform: uppercase; color: var(--gold-ink); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.num { font-variant-numeric: tabular-nums; }
.gold-text { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brush {
  position: relative; display: inline-block; padding: 6px 18px 4px 12px; isolation: isolate;
}
.brush::before {
  content: ''; position: absolute; inset: 0 -6px; z-index: -1; border-radius: 4px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 60' preserveAspectRatio='none'%3E%3Cpath d='M6 14 C60 4 120 9 190 6 S330 3 396 10 L392 22 C340 20 380 30 398 34 L388 50 C300 54 220 49 150 56 S40 52 4 50 L10 40 C2 34 14 28 2 24 Z' fill='%23173b25'/%3E%3C/svg%3E") center/100% 100% no-repeat;
  transform-origin: left center; animation: brush .8s var(--ease) both .1s;
}
@keyframes brush { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }

/* ---------- layout ---------- */
.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-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
@media (max-width: 1280px) { .g-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .span-3 { grid-column: span 2; } }
@media (max-width: 720px) {
  .g-2, .g-3, .g-4 { grid-template-columns: minmax(0, 1fr); }
  .g-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-2, .span-3, .span-4 { grid-column: auto; }
  .grid { gap: 14px; }
}
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: 12px; }
.mt { margin-top: 18px; }
.mt-s { margin-top: 10px; }
.grow { flex: 1; min-width: 0; }

/* ---------- cards ---------- */
.card {
  position: relative; border-radius: var(--r); border: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 70%, transparent), var(--surface));
  box-shadow: var(--shadow); padding: 20px; min-width: 0; overflow: hidden;
  --mx: 50%; --my: 0%;
}
.card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(212, 175, 55, .09), transparent 45%);
}
.card:hover::before { opacity: 1; }
.card.flat { box-shadow: none; }
.card.tight { padding: 14px; }
.card.pad-0 { padding: 0; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-head .h2, .card-head .h3 { flex: 1; min-width: 0; }
.card-head .sub { display: block; font: 600 12.5px/1.3 var(--f-body); color: var(--muted); text-transform: none; letter-spacing: 0; margin-top: 3px; }
.card.gold { border-color: var(--line-2); background: radial-gradient(120% 140% at 0% 0%, rgba(212, 175, 55, .16), transparent 55%), linear-gradient(180deg, var(--surface-2), var(--surface)); }
.card.link { cursor: pointer; transition: transform .25s var(--ease), border-color .25s; }
.card.link:hover { transform: translateY(-3px); border-color: var(--line-2); }

/* KPI tiles */
.kpi { padding: 18px 18px 14px; display: flex; flex-direction: column; gap: 6px; min-height: 148px; }
.kpi .label { display: flex; align-items: center; gap: 8px; font: 700 12px/1.2 var(--f-body); letter-spacing: .6px; color: var(--text-2); text-transform: uppercase; }
.kpi .label svg { width: 17px; height: 17px; color: var(--gold-ink); }
.kpi .value { font: 400 34px/1 var(--f-display); letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.kpi .value small { font: 700 14px/1 var(--f-body); color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.kpi .foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; line-height: 1.3; color: var(--muted); margin-top: auto; }
.delta { white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 999px; font: 800 11.5px/1.4 var(--f-body); }
.delta.up { color: var(--green); background: var(--green-bg); }
.delta.down { color: var(--red); background: var(--red-bg); }
.delta.flat { color: var(--muted); background: var(--line-soft); }
.kpi .spark { height: 34px; margin: 2px -4px 0; }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px;
  border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text);
  font: 800 14px/1 var(--f-body); letter-spacing: .2px; cursor: pointer; text-decoration: none; white-space: nowrap; overflow: hidden;
  flex-shrink: 0; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s, background .2s;
}
.btn:hover { text-decoration: none; border-color: var(--gold); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.primary { background: var(--gold-grad); color: #140f02; border-color: transparent; box-shadow: var(--shadow-gold); }
.btn.primary::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-20deg);
}
.btn.primary:hover::after { animation: sheen .9s var(--ease); }
@keyframes sheen { to { left: 130%; } }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); background: transparent; }
.btn.success { background: var(--green); color: #fff; border-color: transparent; }
.btn.wa { background: #1fa855; color: #fff; border-color: transparent; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.lg { height: 56px; padding: 0 24px; font-size: 16px; border-radius: 16px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.busy { opacity: .6; pointer-events: none; }
.btn.busy::before { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-btn { background: none; border: 0; padding: 0; color: var(--gold-ink); font-weight: 700; cursor: pointer; }

.seg { display: inline-flex; padding: 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); gap: 2px; max-width: 100%; overflow-x: auto; }
.seg button { height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: none; color: var(--text-2); font: 700 13px/1 var(--f-body); cursor: pointer; white-space: nowrap; transition: all .2s; }
.seg button.on { background: var(--gold-grad); color: #140f02; box-shadow: var(--shadow-gold); }

/* ---------- chips / badges ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font: 700 12.5px/1 var(--f-body); color: var(--text-2); white-space: nowrap; }
.chip svg { width: 14px; height: 14px; color: var(--gold-ink); }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font: 800 11px/1 var(--f-body); letter-spacing: .6px; text-transform: uppercase; white-space: nowrap; }
.badge svg { width: 13px; height: 13px; }
.badge.gold { color: var(--gold-ink); background: rgba(212, 175, 55, .14); }
.badge.green { color: var(--green); background: var(--green-bg); }
.badge.red { color: var(--red); background: var(--red-bg); }
.badge.amber { color: var(--amber); background: var(--amber-bg); }
.badge.blue { color: var(--blue); background: var(--blue-bg); }
.badge.grey { color: var(--muted); background: var(--line-soft); }
.avatar {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  font: 800 14px/1 var(--f-body); color: #fff; background: var(--c, #b08a1e);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px color-mix(in srgb, var(--c, #b08a1e) 70%, transparent);
}
.avatar.sm { width: 30px; height: 30px; font-size: 11.5px; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .label-s { font: 800 11.5px/1.2 var(--f-body); letter-spacing: .8px; text-transform: uppercase; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--bg-2); color: var(--text); font-size: 16px; font-weight: 600; transition: border-color .2s, box-shadow .2s, background .2s;
}
textarea.input { height: auto; min-height: 96px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(212, 175, 55, .16); background: var(--surface); }
.input::placeholder { color: var(--faint); font-weight: 500; }
.input[readonly] { opacity: .75; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23d4af37' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 52px; }
.input-wrap .addon { position: absolute; right: 6px; top: 6px; height: 36px; padding: 0 10px; border-radius: 9px; border: 0; background: rgba(212, 175, 55, .14); color: var(--gold-ink); font: 800 12px/1 var(--f-body); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.input-wrap .addon svg { width: 18px; height: 18px; }
.input-wrap .prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 800; pointer-events: none; }
.input-wrap.has-prefix .input { padding-left: 32px; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: minmax(0, 1fr); } .form-grid.keep-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle .track { position: relative; flex: none; width: 48px; height: 28px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-2); transition: background .25s; }
.toggle .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--text-2); transition: transform .3s var(--spring), background .25s; }
.toggle input:checked + .track { background: var(--gold-grad); border-color: transparent; }
.toggle input:checked + .track::after { transform: translateX(20px); background: #140f02; }
.toggle .txt b { display: block; font-size: 14.5px; }
.toggle .txt span { font-size: 12.5px; color: var(--muted); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--bg-2); }
.stepper button { width: 42px; height: 44px; border: 0; background: none; color: var(--gold-ink); font: 800 20px/1 var(--f-body); cursor: pointer; }
.stepper button:active { background: rgba(212, 175, 55, .12); }
.stepper input { width: 56px; height: 44px; border: 0; background: none; text-align: center; font: 800 17px/1 var(--f-body); color: var(--text); -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ---------- tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-sm); }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
table.t th { position: sticky; top: 0; text-align: left; padding: 11px 12px; font: 800 11px/1.2 var(--f-body); letter-spacing: .9px; text-transform: uppercase; color: var(--muted); background: var(--surface); border-bottom: 1px solid var(--line-2); white-space: nowrap; }
table.t td { padding: 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.t tr.click { cursor: pointer; transition: background .15s; }
table.t tr.click:hover td { background: rgba(212, 175, 55, .05); }
table.t .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t tfoot td { font-weight: 800; border-top: 1px solid var(--line-2); border-bottom: 0; color: var(--text); }
table.t .nowrap { white-space: nowrap; }

/* ---------- lists ---------- */
.list { display: grid; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.list-item:last-child { border-bottom: 0; }
.list-item .meta { min-width: 0; flex: 1; }
.list-item > svg, .chev { width: 18px; height: 18px; flex: none; color: var(--muted); }
.list-item .meta b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .meta span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item.click { cursor: pointer; border-radius: 12px; padding-left: 8px; padding-right: 8px; transition: background .15s; }
.list-item.click:hover { background: rgba(212, 175, 55, .05); }
.ico-tile { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(212, 175, 55, .1); color: var(--gold-ink); }
.ico-tile svg { width: 20px; height: 20px; }
.ico-tile.green { background: var(--green-bg); color: var(--green); }
.ico-tile.red { background: var(--red-bg); color: var(--red); }
.ico-tile.blue { background: var(--blue-bg); color: var(--blue); }
.ico-tile.amber { background: var(--amber-bg); color: var(--amber); }
.empty { display: grid; justify-items: center; gap: 10px; padding: 34px 16px; text-align: center; color: var(--muted); }
.empty svg { width: 46px; height: 46px; color: var(--gold-ink); opacity: .7; }
.empty b { color: var(--text); font-size: 16px; }

/* ---------- toasts / modals ---------- */
#toasts { position: fixed; z-index: 120; right: 18px; bottom: 18px; display: grid; gap: 10px; width: min(380px, calc(100vw - 36px)); }
@media (max-width: 1023px) { #toasts { left: 16px; right: 16px; width: auto; bottom: calc(92px + env(safe-area-inset-bottom)); } }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: color-mix(in srgb, var(--surface-2) 94%, transparent); backdrop-filter: blur(14px); box-shadow: var(--shadow); animation: toastIn .5s var(--spring) both; font-size: 14px; }
.toast.out { animation: toastOut .3s var(--ease) forwards; }
.toast svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.toast.ok svg { color: var(--green); }
.toast.err svg { color: var(--red); }
.toast.info svg { color: var(--gold-ink); }
.toast b { display: block; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.96); } }

.modal-back { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; background: rgba(2, 6, 4, .66); backdrop-filter: blur(6px); animation: fade .25s both; }
.modal-back.closing { animation: fade .2s reverse both; }
@keyframes fade { from { opacity: 0; } }
.modal {
  position: relative; width: min(620px, 100%); max-height: calc(100vh - 36px); overflow-y: auto; border-radius: 22px;
  border: 1px solid var(--line-2); background: linear-gradient(180deg, var(--surface-2), var(--surface)); box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .8);
  animation: modalIn .45s var(--spring) both;
}
.modal.wide { width: min(920px, 100%); }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface-2) 92%, transparent); backdrop-filter: blur(10px); }
.modal-head h3 { flex: 1; margin: 0; font: 400 21px/1.1 var(--f-display); letter-spacing: .5px; text-transform: uppercase; }
.modal-body { padding: 20px; }
.modal-foot { position: sticky; bottom: 0; display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); }
@keyframes modalIn { from { opacity: 0; transform: translateY(30px) scale(.96); } }
@media (max-width: 640px) {
  .modal-back { place-items: end stretch; padding: 0; }
  .modal { width: 100%; max-height: 92vh; border-radius: 24px 24px 0 0; animation: sheetIn .45s var(--ease) both; }
  .modal-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex: 1; }
  @keyframes sheetIn { from { transform: translateY(100%); } }
}

/* notifications panel */
.panel { position: absolute; z-index: 60; top: calc(100% + 8px); right: 0; width: min(380px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; border-radius: 18px; border: 1px solid var(--line-2); background: var(--surface); box-shadow: var(--shadow); animation: modalIn .35s var(--spring) both; }
.panel .list-item { padding: 12px 14px; }
.panel .list-item.unread { background: rgba(212, 175, 55, .06); }

/* ---------- loader: bakkie + trailer ---------- */
.loader { display: grid; justify-items: center; gap: 12px; padding: 60px 0; color: var(--muted); font-weight: 700; font-size: 13px; letter-spacing: .5px; }
.loader .road { position: relative; width: 220px; height: 46px; overflow: hidden; }
.loader .road::after { content: ''; position: absolute; left: 0; right: 0; bottom: 6px; height: 2px; background: repeating-linear-gradient(90deg, var(--gold) 0 14px, transparent 14px 26px); animation: road .6s linear infinite; opacity: .7; }
.loader .rig { position: absolute; left: 50%; bottom: 8px; width: 120px; transform: translateX(-50%); animation: bounce .5s ease-in-out infinite alternate; color: var(--gold); }
@keyframes road { to { background-position: -26px 0; } }
@keyframes bounce { to { transform: translate(-50%, -1.5px); } }
.skeleton { border-radius: 12px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- login ---------- */
.login { position: fixed; inset: 0; z-index: 5; overflow: hidden; background: #050b07; }
.login canvas, .login svg.scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.login .scrim { position: absolute; inset: 0; background: radial-gradient(80% 60% at 50% 40%, transparent 30%, rgba(3, 7, 5, .55) 100%); pointer-events: none; }
.login-card {
  position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -54%);
  width: min(420px, calc(100vw - 32px)); padding: 30px 28px 26px; border-radius: 26px;
  border: 1px solid rgba(212, 175, 55, .32); background: rgba(8, 18, 12, .58); backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 240, 200, .08);
  animation: cardIn 1.1s var(--ease) both .5s; color: #f4ecd8;
  --text: #f4ecd8; --text-2: #d8cfb6; --muted: #9b957e; --bg-2: rgba(4, 10, 6, .55); --surface: rgba(10, 22, 14, .9); --line-2: rgba(212, 175, 55, .3);
}
@keyframes cardIn { from { opacity: 0; transform: translate(-50%, -44%) scale(.96); filter: blur(6px); } }
.login-card .logo-wrap { position: relative; width: 82%; margin: 0 auto 6px; }
.login-card .logo-wrap img { width: 100%; filter: drop-shadow(0 10px 30px rgba(212, 175, 55, .25)); }
.shimmer-mask { position: absolute; inset: 0; pointer-events: none; -webkit-mask: var(--logo) center/contain no-repeat; mask: var(--logo) center/contain no-repeat;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 248, 220, .85) 50%, transparent 65%) -150% 0/250% 100% no-repeat; animation: logoShine 5s ease-in-out infinite 1.6s; mix-blend-mode: overlay; }
@keyframes logoShine { 0%, 55% { background-position: -150% 0; } 100% { background-position: 150% 0; } }
.login-card .tag { text-align: center; margin: 2px 0 22px; font: italic 19px/1.2 var(--f-serif); color: #e7d9b4; }
.login-card .tag b { font: 800 10.5px/1 var(--f-body); letter-spacing: 2.4px; text-transform: uppercase; display: block; color: var(--gold); margin-bottom: 8px; font-style: normal; }
.login-card form { display: grid; gap: 14px; }
.login-card .err { min-height: 20px; font-size: 13px; color: #ff8f84; text-align: center; font-weight: 700; }
.login-card.shake { animation: shake .5s; }
@keyframes shake { 20%, 60% { transform: translate(calc(-50% - 8px), -54%); } 40%, 80% { transform: translate(calc(-50% + 8px), -54%); } }
.login-foot { position: absolute; z-index: 3; left: 0; right: 0; bottom: 16px; text-align: center; font-size: 12px; color: rgba(244, 236, 216, .5); letter-spacing: .4px; }
.login-foot b { color: rgba(212, 175, 55, .8); }

/* ---------- driver home ---------- */
.hero { position: relative; overflow: hidden; border-radius: 24px; padding: 26px; border: 1px solid var(--line-2);
  background: radial-gradient(120% 120% at 100% 0%, rgba(232, 144, 44, .28), transparent 50%), radial-gradient(100% 140% at 0% 100%, rgba(212, 175, 55, .16), transparent 55%), linear-gradient(160deg, #13301f, #0a1a11 70%);
  color: #f4ecd8; box-shadow: var(--shadow); }
.hero .eyebrow { color: #e9c766; }
.hero h2 { margin: 6px 0 4px; font: 400 clamp(30px, 6vw, 44px)/1 var(--f-display); text-transform: uppercase; letter-spacing: .6px; }
.hero p { margin: 0; color: #cfc6ad; }
.hero .sil { position: absolute; right: -10px; bottom: -4px; width: 52%; max-width: 420px; opacity: .55; pointer-events: none; }
.hero .sun { position: absolute; right: 12%; top: -50px; width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 200, 100, .55), rgba(232, 144, 44, .15) 45%, transparent 70%); animation: sunPulse 6s ease-in-out infinite; pointer-events: none; }
@keyframes sunPulse { 50% { transform: scale(1.12); opacity: .8; } }
.hero > *:not(.sil):not(.sun) { position: relative; }
.today-card { padding: 22px; }
.status-on { display: inline-flex; align-items: center; gap: 8px; color: var(--green); font: 800 12px/1 var(--f-body); letter-spacing: 1.4px; text-transform: uppercase; }
.odo { display: inline-flex; gap: 3px; padding: 6px; border-radius: 10px; background: #050a07; border: 1px solid rgba(212, 175, 55, .3); box-shadow: inset 0 2px 8px rgba(0, 0, 0, .8); }
.odo span { position: relative; display: block; width: 22px; height: 32px; overflow: hidden; border-radius: 4px; background: linear-gradient(180deg, #1b1b14, #0c0c08 50%, #1b1b14); }
.odo span i { position: absolute; left: 0; right: 0; top: 0; display: grid; font: 400 22px/32px var(--f-display); color: #f6dc8a; text-align: center; font-style: normal; transition: transform 1.6s var(--ease); }
.odo span i b { display: block; height: 32px; font-weight: 400; }
.odo .u { align-self: end; font: 800 10px/1 var(--f-body); color: var(--muted); padding: 0 2px 4px 4px; background: none; width: auto; height: auto; }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 520px) { .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.quick button { display: grid; justify-items: center; gap: 8px; padding: 16px 8px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font: 800 13px/1.2 var(--f-body); cursor: pointer; transition: transform .25s var(--spring), border-color .2s, background .2s; }
.quick button svg { width: 26px; height: 26px; color: var(--gold-ink); transition: transform .3s var(--spring); }
.quick button:hover { border-color: var(--gold); transform: translateY(-3px); }
.quick button:hover svg { transform: scale(1.15) rotate(-6deg); }
.quick button.end { background: var(--gold-grad); color: #140f02; border-color: transparent; box-shadow: var(--shadow-gold); }
.quick button.end svg { color: #140f02; }
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.week-strip .d { display: grid; justify-items: center; gap: 6px; padding: 10px 0 8px; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--bg-2); font: 700 11px/1 var(--f-body); color: var(--muted); }
.week-strip .d .bar { width: 8px; height: 56px; border-radius: 6px; background: var(--line-soft); position: relative; overflow: hidden; }
.week-strip .d .bar i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 6px; background: var(--gold-grad); height: 0; transition: height 1.2s var(--ease); }
.week-strip .d.today { border-color: var(--gold); color: var(--gold-ink); }
.week-strip .d b { font-size: 12px; color: var(--text); }
.money-big { font: 400 46px/1 var(--f-display); letter-spacing: .5px; }

/* ---------- document look (client sheet / invoice) ---------- */
.doc { border-radius: 18px; background: #fffdf6; color: #1b1a14; padding: 26px; box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .8); border: 1px solid #e8dcb9; --muted: #7a7560; --line-soft: #efe6cf; --text: #1b1a14; --gold-ink: #8a6912; }
.doc .doc-head { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; padding-bottom: 16px; border-bottom: 2px solid #c9a227; margin-bottom: 16px; flex-wrap: wrap; }
.doc .doc-head img { width: 180px; }
.doc .doc-title { text-align: right; }
.doc .doc-title h2 { margin: 0; font: 400 30px/1 var(--f-display); letter-spacing: 1px; color: #0f2a1a; text-transform: uppercase; }
.doc .kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; margin-bottom: 16px; }
@media (max-width: 640px) { .doc { padding: 18px; } .doc .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); } .doc .doc-title { text-align: left; } }
.doc .kv div span { display: block; font: 800 10px/1.2 var(--f-body); letter-spacing: 1px; text-transform: uppercase; color: #8a8170; }
.doc .kv div b { font-size: 14.5px; }
.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .doc-layout { grid-template-columns: minmax(0, 1fr); } }
.doc table.t td, .doc table.t th { padding: 10px 9px; }
.doc table.t td { font-size: 13.5px; }
.doc table.t .wide { min-width: 150px; }
.doc table.t th { background: #0f2a1a; color: #f3dc8f; border: 0; }
.doc table.t th:first-child { border-radius: 8px 0 0 8px; }
.doc table.t th:last-child { border-radius: 0 8px 8px 0; }
.doc table.t td { border-bottom: 1px solid #efe6cf; color: #1b1a14; }
.doc table.t tfoot td { color: #0f2a1a; border-top: 2px solid #c9a227; }
.doc .agree { padding: 14px 16px; border-radius: 12px; background: #f7f1e1; font-size: 13.5px; line-height: 1.6; color: #3a382c; }
.doc .agree h4 { margin: 0 0 6px; font: 400 16px/1 var(--f-display); letter-spacing: .6px; text-transform: uppercase; color: #0f2a1a; }
.doc .sigbox { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
@media (max-width: 640px) { .doc .sigbox { grid-template-columns: minmax(0, 1fr); } }
.doc .sigbox .s { border-bottom: 1px solid #cfc3a2; padding: 6px 0; }
.doc .sigbox .s span { display: block; font: 800 10px/1.2 var(--f-body); letter-spacing: 1px; text-transform: uppercase; color: #8a8170; }
.doc .sigimg { height: 90px; width: auto; max-width: 100%; }
.stamp {
  position: absolute; right: 22px; top: 92px; padding: 8px 16px; border: 3px solid currentColor; border-radius: 10px;
  font: 400 26px/1 var(--f-display); letter-spacing: 2px; text-transform: uppercase; transform: rotate(-12deg); opacity: .85;
  animation: stamp .6s var(--spring) both .3s; pointer-events: none; mix-blend-mode: multiply;
}
.stamp.green { color: #2e7d32; } .stamp.red { color: #c62828; } .stamp.gold { color: #a8841f; }
@keyframes stamp { from { opacity: 0; transform: rotate(-12deg) scale(2.2); } }

/* client sheet form */
.load-card { border: 1px dashed var(--line-2); border-radius: 16px; padding: 16px; background: var(--bg-2); position: relative; }
.load-card .n { position: absolute; top: -12px; left: 14px; padding: 3px 10px; border-radius: 8px; background: var(--gold-grad); color: #140f02; font: 400 13px/1.2 var(--f-display); letter-spacing: 1px; }
.species { display: flex; flex-wrap: wrap; gap: 8px; }
.species button { height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font: 700 13px/1 var(--f-body); cursor: pointer; transition: all .2s var(--spring); }
.species button:hover { border-color: var(--gold); color: var(--text); transform: translateY(-1px); }
.animal-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); animation: rise .35s var(--ease) both; }
.animal-row b { flex: 1; min-width: 0; }
.sticky-actions { position: sticky; bottom: 0; z-index: 20; display: flex; gap: 10px; padding: 14px 0; margin-top: 18px; background: linear-gradient(0deg, var(--bg) 60%, transparent); }
@media (max-width: 1023px) { .sticky-actions { bottom: calc(84px + env(safe-area-inset-bottom)); } }
.sticky-actions .btn { flex: 1; }

/* signing screen */
.sign-screen { position: fixed; inset: 0; z-index: 110; overflow-y: auto; background: #f7f1e1; color: #1b1a14; animation: fade .3s both; --text: #1b1a14; --muted: #7a7560; --line-2: #d8c99f; --bg-2: #fffdf6; --surface: #fff; --gold-ink: #8a6912; color-scheme: light; }
.sign-screen .inner { max-width: 780px; margin: 0 auto; padding: 20px 16px 40px; }
.sign-screen .top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sign-screen .top img { height: 54px; width: auto; }
.sign-screen h2 { margin: 0; font: 400 26px/1 var(--f-display); text-transform: uppercase; letter-spacing: .6px; color: #0f2a1a; }
.sigpad-wrap { position: relative; border-radius: 16px; border: 2px dashed #c9a227; background: #fff; touch-action: none; overflow: hidden; }
.sigpad-wrap canvas { display: block; width: 100%; height: 220px; cursor: crosshair; }
.sigpad-wrap .base { position: absolute; left: 24px; right: 24px; bottom: 46px; border-bottom: 1.5px solid #d8c99f; pointer-events: none; }
.sigpad-wrap .x { position: absolute; left: 20px; bottom: 50px; font: 400 26px/1 var(--f-display); color: #c9a227; pointer-events: none; }
.sigpad-wrap .hint { position: absolute; inset: 0; display: grid; place-items: center; color: #b9ad8c; font: italic 22px/1 var(--f-serif); pointer-events: none; transition: opacity .3s; }
.sigpad-wrap.has-ink .hint { opacity: 0; }
.sigpad-wrap .clear { position: absolute; right: 10px; top: 10px; }
.geo-box { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid #e3d6b2; }
.geo-box .ico-tile { background: rgba(201, 162, 39, .14); color: #8a6912; }
.geo-box .ico-tile.locating svg { animation: spin 1.2s linear infinite; }

/* success burst */
.success { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 26px 10px 8px; }
.success svg.check { width: 96px; height: 96px; }
.success svg.check circle { stroke-dasharray: 290; stroke-dashoffset: 290; animation: draw .8s var(--ease) forwards; }
.success svg.check path { stroke-dasharray: 80; stroke-dashoffset: 80; animation: draw .5s var(--ease) forwards .65s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.confetti { position: fixed; inset: 0; z-index: 150; pointer-events: none; }

/* charts */
.chart { position: relative; width: 100%; }
.chart svg { overflow: visible; }
.chart .tip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 150px; padding: 10px 12px; border-radius: 12px; font-size: 12.5px;
  background: color-mix(in srgb, var(--surface-2) 96%, transparent); border: 1px solid var(--line-2); box-shadow: var(--shadow); opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s;
}
.chart .tip.on { opacity: 1; transform: none; }
.chart .tip b { display: block; margin-bottom: 4px; font-size: 12px; color: var(--muted); }
.chart .tip .r { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chart .tip .r span { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.chart .tip .r strong { font-variant-numeric: tabular-nums; }
.hbar { display: grid; gap: 12px; }
.hbar .b { display: grid; grid-template-columns: minmax(90px, 150px) minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: 13.5px; }
.hbar .b .name { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 700; }
.hbar .b .name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar .b .track { height: 12px; border-radius: 6px; background: var(--line-soft); overflow: hidden; }
.hbar .b .track i { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--c, var(--gold)); transition: width 1.3s var(--ease); }
.hbar .b .v { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 72px; text-align: right; }
.heat { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.heat .h { aspect-ratio: 1 / .78; border-radius: 10px; padding: 6px 7px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line-soft); background: var(--bg-2); font-size: 11px; color: var(--muted); cursor: default; transition: transform .2s var(--spring); min-width: 0; }
.heat .h:hover { transform: scale(1.06); z-index: 2; }
.heat .h b { font-size: 12px; color: var(--text); }
.heat .h.off { opacity: .35; }
.heat .h.click { cursor: pointer; }
.heat .h .km { font-weight: 800; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.heat .dow { text-align: center; font: 800 10.5px/1 var(--f-body); color: var(--muted); letter-spacing: 1px; text-transform: uppercase; padding-bottom: 2px; }

/* map */
.map { height: 420px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #0b1610; }
.map .leaflet-tile-pane { filter: grayscale(1) invert(.92) sepia(.35) hue-rotate(60deg) saturate(.7) brightness(.82) contrast(1.05); }
:root[data-theme="light"] .map .leaflet-tile-pane { filter: sepia(.25) saturate(.8); }
.map .leaflet-container { background: #0b1610; font: 600 13px/1.4 var(--f-body); }
.map .leaflet-popup-content-wrapper, .map .leaflet-popup-tip { background: #132519; color: #f4ecd8; border: 1px solid rgba(212, 175, 55, .3); }
.map .leaflet-popup-content { margin: 12px 14px; }
.map .leaflet-control-attribution { background: rgba(6, 15, 10, .7); color: #8f8a74; }
.map .leaflet-control-attribution a { color: #d4af37; }
.map .leaflet-bar a { background: #132519; color: #d4af37; border-color: rgba(212, 175, 55, .25); }
.pin { position: relative; width: 16px; height: 16px; border-radius: 50%; background: var(--c, #d4af37); border: 2px solid #fff6d9; box-shadow: 0 0 12px var(--c, #d4af37); }
.pin::after { content: ''; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--c, #d4af37); animation: ping 2.4s var(--ease) infinite; animation-delay: var(--d, 0s); }

/* misc */
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.kv-list { display: grid; gap: 0; }
.kv-list > div { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.kv-list > div:last-child { border-bottom: 0; }
.kv-list > div span { color: var(--muted); }
.kv-list > div b { text-align: right; font-variant-numeric: tabular-nums; }
.kv-list > div.total { font-size: 17px; padding-top: 14px; }
.kv-list > div.total b { font: 400 26px/1 var(--f-display); letter-spacing: .5px; }
.timeline { display: flex; align-items: center; gap: 0; margin: 4px 0 2px; }
.timeline .st { display: grid; justify-items: center; gap: 6px; flex: none; font: 800 11px/1 var(--f-body); color: var(--muted); letter-spacing: .5px; text-transform: uppercase; }
.timeline .st i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--bg-2); font-style: normal; }
.timeline .st i svg { width: 15px; height: 15px; }
.timeline .st.done { color: var(--gold-ink); }
.timeline .st.done i { background: var(--gold-grad); color: #140f02; border-color: transparent; box-shadow: var(--shadow-gold); }
.timeline .ln { flex: 1; height: 2px; background: var(--line-2); margin: 0 6px 18px; position: relative; overflow: hidden; }
.timeline .ln.done::after { content: ''; position: absolute; inset: 0; background: var(--gold-grad); animation: brush .8s var(--ease) both; transform-origin: left; }
.pw-box { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 14px; border: 1px dashed var(--gold); background: rgba(212, 175, 55, .08); font: 800 20px/1 ui-monospace, Consolas, monospace; letter-spacing: .5px; }
.pw-box span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.photo-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line-2); cursor: zoom-in; }
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(212, 175, 55, .07); font-size: 14px; }
.callout svg { width: 20px; height: 20px; flex: none; color: var(--gold-ink); margin-top: 1px; }
.callout.warn { border-color: color-mix(in srgb, var(--amber) 45%, transparent); background: var(--amber-bg); }
.callout.warn svg { color: var(--amber); }
.callout.err { border-color: color-mix(in srgb, var(--red) 45%, transparent); background: var(--red-bg); }
.callout.err svg { color: var(--red); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 16px; }
.filters .field { min-width: 150px; flex: 1; max-width: 240px; }
.filters .input { height: 42px; font-size: 14px; }
@media (max-width: 560px) { .filters .field { max-width: none; min-width: calc(50% - 5px); } }
.period-nav { display: flex; align-items: center; gap: 8px; }
.period-nav .label { min-width: 0; font: 400 20px/1.1 var(--f-display); letter-spacing: .5px; text-transform: uppercase; text-align: center; flex: 1; }
.day-block { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); }
.day-block .dh { display: grid; grid-template-columns: 130px repeat(4, minmax(0, 1fr)) minmax(0, 2fr); gap: 0; background: rgba(212, 175, 55, .08); border-bottom: 1px solid var(--line); }
.day-block .dh > div, .day-block .dv > div { padding: 10px 12px; min-width: 0; }
.day-block .dh > div { font: 800 10.5px/1.2 var(--f-body); letter-spacing: .8px; text-transform: uppercase; color: var(--gold-ink); }
.day-block .dv { display: grid; grid-template-columns: 130px repeat(4, minmax(0, 1fr)) minmax(0, 2fr); font-size: 14px; font-weight: 700; }
.day-block .dv > div { overflow-wrap: anywhere; }
.day-block .sub { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px dashed var(--line); }
.day-block .sub > div { padding: 10px 12px; font-size: 13px; }
.day-block .sub > div + div { border-left: 1px dashed var(--line); }
.day-block .sub .label-s { display: block; margin-bottom: 6px; }
.day-block.empty-day { opacity: .5; }
@media (max-width: 760px) {
  .day-block .dh { display: none; }
  .day-block .dv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .day-block .dv > div::before { content: attr(data-l); display: block; font: 800 10px/1.2 var(--f-body); letter-spacing: .8px; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 3px; }
  .day-block .dv > div:first-child, .day-block .dv > div:last-child { grid-column: 1 / -1; }
  .day-block .sub { grid-template-columns: minmax(0, 1fr); }
  .day-block .sub > div + div { border-left: 0; border-top: 1px dashed var(--line); }
}
.zoom-img { max-width: min(92vw, 900px); max-height: 80vh; border-radius: 12px; margin: 0 auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
  .sidebar, .topbar, .tabbar, .bg-fx, .sticky-actions, #toasts, .no-print { display: none !important; }
  .shell { display: block; }
  body { background: #fff; color: #000; }
  .view { padding: 0; }
}
