/* ==========================================================================
   AUTO LEASE GLOBAL — Unified Design System
   One stylesheet for the public website and the staff console.
   Tokens first, then base, components, console layout, website layout, print.
   ========================================================================== */

:root {
  /* Brand */
  --brand-950: #07111f;
  --brand-900: #0b1a30;
  --brand-800: #112645;
  --brand-700: #18345c;
  --brand-600: #1f4f8f;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #e8f0fe;
  --accent: #f59e0b;
  --accent-hover: #d97f06;

  /* Module colours — used for nav markers, badges and page accents so
     Sales, Leasing, BHPH and Service are visually distinct everywhere. */
  --m-sales: #059669;   --m-sales-soft: #e3f6ef;
  --m-lease: #2563eb;   --m-lease-soft: #e8f0fe;
  --m-bhph: #7c3aed;    --m-bhph-soft: #f0eafe;
  --m-service: #ea580c; --m-service-soft: #fdeee4;
  --m-recovery: #dc2626;--m-recovery-soft: #fdeaea;
  --m-crm: #0891b2;     --m-crm-soft: #e2f5f9;
  --m-admin: #475569;   --m-admin-soft: #eef1f5;

  /* Neutrals */
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e3e8f0;
  --border-strong: #cdd6e3;
  --text: #0f1b2d;
  --text-2: #334155;
  --muted: #64748b;
  --faint: #94a3b8;

  /* Status tones */
  --success: #15803d; --success-soft: #e6f6ec;
  --warning: #b45309; --warning-soft: #fdf3e1;
  --danger: #c02637;  --danger-soft: #fdebed;
  --info: #1d4ed8;    --info-soft: #e8f0fe;

  /* Shape & depth */
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, .06);
  --shadow: 0 4px 16px rgba(15, 27, 45, .07);
  --shadow-lg: 0 24px 64px rgba(7, 17, 31, .22);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --side-w: 256px;
}

/* ---------- Base ---------- */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 26px; } h2 { font-size: 20px; } h3 { font-size: 16px; } h4 { font-size: 14px; }
p { margin: 0 0 .8em; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.money, .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid rgba(37, 99, 235, .45); outline-offset: 2px; }

/* ---------- Layout helpers ---------- */
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.c5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .grid.c5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid.c2, .grid.c3, .grid.c4, .grid.c5 { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 9px 16px; border-radius: var(--r-sm); border: 1px solid transparent; background: var(--primary); color: #fff; font-weight: 600; font-size: 14px; line-height: 1.2; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { background: var(--primary-hover); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.secondary { background: var(--surface); color: var(--text-2); border-color: var(--border-strong); }
.btn.secondary:hover { background: var(--surface-2); border-color: var(--faint); }
.btn.ghost { background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #a11d2d; }
.btn.success { background: var(--success); }
.btn.success:hover { background: #116632; }
.btn.accent { background: var(--accent); color: var(--brand-950); }
.btn.accent:hover { background: var(--accent-hover); }
.btn.sm { min-height: 32px; padding: 6px 11px; font-size: 13px; }
.btn.lg { min-height: 48px; padding: 12px 22px; font-size: 15px; }
.btn.block { width: 100%; }
.btn.icon { padding: 0; width: 36px; min-height: 36px; }
.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Cards / panels ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-sm); padding: 20px; min-width: 0; }
.card + .card { margin-top: 16px; }
.grid > .card + .card, .split > .card + .card { margin-top: 0; }
.split > div > .card + .card { margin-top: 16px; }
.card.flush { padding: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.section-gap { margin-top: 16px; }

/* ---------- Stats ---------- */
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; min-width: 0; }
.stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--tone, var(--primary)); }
.stat .label { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font-family: var(--font-display); font-size: 26px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat .hint { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.4; white-space: nowrap; background: var(--m-admin-soft); color: var(--text-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .75; }
.badge.plain::before { display: none; }
.badge.success { background: var(--success-soft); color: var(--success); }
.badge.warning { background: var(--warning-soft); color: var(--warning); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.violet { background: var(--m-bhph-soft); color: var(--m-bhph); }
.badge.orange { background: var(--m-service-soft); color: var(--m-service); }
.badge.teal { background: var(--m-crm-soft); color: var(--m-crm); }
.badge.green { background: var(--m-sales-soft); color: var(--m-sales); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.tag.sales { background: var(--m-sales-soft); color: var(--m-sales); }
.tag.lease { background: var(--m-lease-soft); color: var(--m-lease); }
.tag.bhph { background: var(--m-bhph-soft); color: var(--m-bhph); }
.tag.service { background: var(--m-service-soft); color: var(--m-service); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label-text { font-size: 12px; font-weight: 600; color: var(--text-2); }
.field .help { font-size: 12px; color: var(--muted); }
.req::after { content: " *"; color: var(--danger); }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea, select.input, textarea.input {
  width: 100%; min-height: 40px; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--text); transition: border-color .15s, box-shadow .15s;
}
.field textarea, textarea.input { min-height: 84px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .18); }
.field input[readonly], .field input:disabled, .field select:disabled { background: var(--surface-2); color: var(--muted); }
.field input[type=file] { font-size: 13px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--primary); }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-all { grid-column: 1 / -1; }
.form-section { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--border); font-weight: 700; font-size: 13px; color: var(--text); text-transform: uppercase; letter-spacing: .04em; }
.form-section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
@media (max-width: 900px) { .form-grid, .form-grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .form-grid, .form-grid.c2, .form-grid.c4 { grid-template-columns: 1fr; } .form-grid .span-2 { grid-column: auto; } }

/* ---------- Notices ---------- */
.notice { padding: 12px 14px; border-radius: var(--r-sm); background: var(--info-soft); color: #1e3a8a; font-size: 13px; border: 1px solid rgba(37, 99, 235, .15); }
.notice.warning { background: var(--warning-soft); color: #7c3d0a; border-color: rgba(180, 83, 9, .2); }
.notice.danger { background: var(--danger-soft); color: #8a1624; border-color: rgba(192, 38, 55, .2); }
.notice.success { background: var(--success-soft); color: #14532d; border-color: rgba(21, 128, 61, .2); }
.notice + .notice { margin-top: 10px; }

/* ---------- Toolbar (search + filters + primary action on one row) ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); margin-bottom: 14px; }
.toolbar .search { position: relative; flex: 1 1 260px; min-width: 200px; }
.toolbar .search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.toolbar .search input { width: 100%; min-height: 40px; padding: 9px 12px 9px 34px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface); }
.toolbar select { flex: 0 1 180px; min-width: 140px; min-height: 40px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface); }
.toolbar input:focus, .toolbar select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .18); }
.toolbar .spacer { flex: 1 1 auto; }
.toolbar .btn { margin-left: auto; }
@media (max-width: 640px) { .toolbar select { flex: 1 1 140px; } .toolbar .btn { margin-left: 0; flex: 1 1 100%; } }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 11px 14px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; position: sticky; top: 0; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fafcff; }
.table tbody tr.clickable { cursor: pointer; }
.table td.actions { text-align: right; white-space: nowrap; }
.table td.actions .btn + .btn { margin-left: 6px; }
.table .primary-cell { font-weight: 600; color: var(--text); }
.table td > a:first-child, .table td > a > b { white-space: nowrap; }
.table .sub { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.table tfoot td { font-weight: 700; background: var(--surface-2); }
.table.compact th, .table.compact td { padding: 8px 10px; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 2px 0; color: var(--muted); font-size: 13px; }
.table-foot .pager { display: flex; align-items: center; gap: 8px; }
.table-foot select { min-height: 32px; padding: 4px 8px; border: 1px solid var(--border-strong); border-radius: 7px; background: var(--surface); }
.empty { padding: 36px 18px; text-align: center; color: var(--muted); }
.empty svg { width: 34px; height: 34px; color: var(--faint); margin: 0 auto 8px; display: block; }

/* ---------- Key/value details ---------- */
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px 20px; }
.kv > div { min-width: 0; }
.kv dt, .kv .k { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.kv dd, .kv .v { margin: 0; font-size: 14px; color: var(--text); overflow-wrap: anywhere; }
.totals { width: 100%; max-width: 380px; margin-left: auto; border-collapse: collapse; }
.totals td { padding: 6px 0; font-size: 14px; }
.totals td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.totals tr.grand td { border-top: 2px solid var(--text); font-weight: 800; font-size: 16px; padding-top: 10px; }
.totals tr.minor td { color: var(--muted); font-size: 13px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.tabs .count { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: var(--surface-2); font-size: 11px; color: var(--muted); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.timeline li::after { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 2px; background: var(--border); }
.timeline li:last-child::after { display: none; }
.timeline .when { font-size: 12px; color: var(--muted); }
.timeline .what { font-size: 14px; }

/* ---------- Progress ---------- */
.progress { height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--tone, var(--primary)); border-radius: inherit; }

/* ---------- Modal ---------- */
dialog.modal { border: 0; padding: 0; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 32px); background: var(--surface); color: var(--text); }
dialog.modal.wide { width: min(1080px, calc(100vw - 24px)); }
dialog.modal.narrow { width: min(480px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(7, 17, 31, .55); backdrop-filter: blur(2px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-body { padding: 20px 22px; }
.modal-body .form-actions { position: sticky; bottom: -20px; background: var(--surface); margin: 20px -22px -20px; padding: 14px 22px; }

/* ---------- Toasts ---------- */
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 1000; max-width: min(420px, calc(100vw - 36px)); }
.toast { background: var(--brand-900); color: #fff; padding: 12px 16px; border-radius: var(--r-sm); box-shadow: var(--shadow-lg); font-size: 14px; display: flex; gap: 10px; align-items: flex-start; animation: toast-in .2s ease-out; }
.toast.error { background: #8a1624; }
.toast.success { background: #14532d; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Kanban (Service board) ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.kanban-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); padding: 10px; min-height: 160px; }
.kanban-col h4 { display: flex; justify-content: space-between; align-items: center; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 4px 4px 10px; }
.kanban-card { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--tone, var(--m-service)); border-radius: var(--r-sm); padding: 10px 12px; margin-bottom: 8px; box-shadow: var(--shadow-sm); cursor: pointer; }
.kanban-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.kanban-card .t { font-weight: 700; font-size: 13px; }
.kanban-card .s { font-size: 12px; color: var(--muted); }

/* ---------- Schedule (Service appointments) ---------- */
.schedule { display: grid; grid-template-columns: 64px repeat(var(--days, 7), minmax(130px, 1fr)); border: 1px solid var(--border); border-radius: var(--r); overflow: auto; background: var(--surface); }
.schedule .hcell { position: sticky; top: 0; background: var(--surface-2); padding: 8px; font-size: 12px; font-weight: 700; border-bottom: 1px solid var(--border); border-left: 1px solid var(--border); text-align: center; z-index: 1; }
.schedule .hcell.today { color: var(--primary); }
.schedule .tcell { font-size: 11px; color: var(--muted); padding: 4px 6px; border-bottom: 1px solid var(--border); text-align: right; }
.schedule .cell { border-left: 1px solid var(--border); border-bottom: 1px solid var(--border); min-height: 52px; padding: 3px; }
.appt { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--tone, var(--m-service)); background: var(--m-service-soft); color: var(--text); border-radius: 6px; padding: 4px 6px; font-size: 11.5px; line-height: 1.3; margin-bottom: 3px; cursor: pointer; }
.appt b { display: block; font-size: 12px; }

/* ==========================================================================
   STAFF CONSOLE LAYOUT
   ========================================================================== */
.console { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--brand-900); color: #c9d5e6; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; text-decoration: none; }
.side-brand:hover { text-decoration: none; }
.logo-mark { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), #60a5fa); display: grid; place-items: center; color: #fff; font-weight: 800; font-family: var(--font-display); flex: none; }
.logo-mark svg { width: 20px; height: 20px; }
.side-brand .name { font-family: var(--font-display); font-weight: 800; font-size: 15px; line-height: 1.1; }
.side-brand .sub { font-size: 11px; color: #8ea3c0; letter-spacing: .06em; text-transform: uppercase; }
.side nav { padding: 6px 10px 16px; flex: 1; }
.nav-group { margin-top: 14px; }
.nav-group > .gl { display: flex; align-items: center; gap: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #7d93b2; padding: 0 10px 6px; font-weight: 700; }
.nav-group > .gl::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--g, #7d93b2); }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: #c9d5e6; font-weight: 500; font-size: 14px; text-decoration: none; position: relative; }
.nav-link svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.nav-link.active { background: rgba(255, 255, 255, .11); color: #fff; }
.nav-link.active::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--g, var(--primary)); }
.nav-link .count { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 0 7px; line-height: 18px; }
.side-foot { padding: 14px 16px; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-700); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.side-foot .who { min-width: 0; flex: 1; }
.side-foot .who b { display: block; color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who span { font-size: 12px; color: #8ea3c0; text-transform: capitalize; }
.side-foot button { background: rgba(255, 255, 255, .07); border: 0; color: #c9d5e6; border-radius: 8px; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; }
.side-foot button:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.side-foot svg { width: 17px; height: 17px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(244, 246, 250, .9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); padding: 12px 28px; display: flex; align-items: center; gap: 14px; }
.topbar .crumbs { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.topbar .crumbs a { color: var(--muted); }
.topbar .crumbs b { color: var(--text); font-weight: 600; }
.topbar .grow { flex: 1; }
.menu-btn { display: none; }
.content { padding: 24px 28px 48px; width: 100%; max-width: 1560px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-head .desc { color: var(--muted); margin-top: 4px; max-width: 760px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.module-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 3px 9px; border-radius: 999px; background: var(--chip-soft, var(--primary-soft)); color: var(--chip, var(--primary)); vertical-align: middle; }
.demo-banner { background: #fff7e6; color: #7c3d0a; border-bottom: 1px solid #f6d9a8; padding: 8px 28px; font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.demo-banner b { font-weight: 700; }

@media (max-width: 980px) {
  .console { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(var(--side-w), 86vw); z-index: 60; transform: translateX(-100%); transition: transform .2s; }
  .console.nav-open .side { transform: none; box-shadow: var(--shadow-lg); }
  .console.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(7, 17, 31, .45); z-index: 50; }
  .menu-btn { display: inline-flex; }
  .topbar, .content, .demo-banner { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Login ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-art { background: radial-gradient(1200px 600px at 10% 10%, #1f4f8f 0%, transparent 60%), linear-gradient(160deg, var(--brand-900), var(--brand-950)); color: #dbe6f5; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-art h2 { color: #fff; font-size: 34px; max-width: 460px; }
.auth-art .mods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 520px; }
.auth-art .mod { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--r); padding: 14px; }
.auth-art .mod b { display: flex; align-items: center; gap: 8px; color: #fff; }
.auth-art .mod b::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--g); }
.auth-art .mod span { font-size: 13px; color: #a9bbd4; }
.auth-form { display: grid; place-items: center; padding: 32px 20px; background: var(--surface); }
.auth-form form { width: min(400px, 100%); }
.auth-form h1 { font-size: 28px; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* Shared form helpers (console + website) */
.form-card { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px; background: var(--surface); box-shadow: var(--shadow-sm); min-width: 0; }
.calc-out { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); padding: 14px; }
.calc-out .big { font-family: var(--font-display); font-size: 28px; font-weight: 800; }

/* Website Content → Page text editor */
.text-editor { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.text-pages { position: sticky; top: 76px; padding: 12px; }
.text-pages .toolbar .search { min-width: 0; }
.text-pages nav { display: flex; flex-direction: column; gap: 2px; }
.text-pages nav button { display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; background: none; border: 0; border-radius: 8px; padding: 9px 10px; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; }
.text-pages nav button:hover { background: var(--surface-2); }
.text-pages nav button.active { background: var(--primary-soft, var(--surface-2)); color: var(--primary); }
.text-pages .count { padding: 0 7px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 11px; }
.text-field textarea { min-height: 0; resize: vertical; }
.text-field .edited { color: var(--primary); font-weight: 600; }
.pairs { display: flex; flex-direction: column; gap: 8px; }
.pair-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto; gap: 8px; align-items: start; }
.text-save { position: sticky; bottom: 0; background: var(--surface); padding: 12px 0 4px; display: flex; justify-content: flex-end; align-items: center; gap: 12px; border-top: 1px solid var(--border); }
@media (max-width: 900px) {
  .text-editor { grid-template-columns: 1fr; }
  .text-pages { position: static; }
  .text-pages nav { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .text-pages nav button { white-space: nowrap; flex: none; }
  .pair-row { grid-template-columns: minmax(0, 1fr) auto; }
  .pair-row textarea { grid-column: 1 / -1; }
  .pair-row [data-rmrow] { grid-row: 1; grid-column: 2; }
}

/* Public website styles live in shared/css/site.css (same tokens). */

/* ==========================================================================
   PRINT
   ========================================================================== */
@media print {
  .side, .topbar, .demo-banner, .no-print, #toasts, .site-header, .site-footer, .site-top { display: none !important; }
  .console { display: block; }
  .content { padding: 0; }
  body { background: #fff; }
  .card { box-shadow: none; }
}

/* Phones: KPI tiles two per row */
@media (max-width: 640px) {
  .grid.c3:has(> .stat), .grid.c4:has(> .stat), .grid.c5:has(> .stat) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px 14px; }
  .stat .value { font-size: 20px; }
}
.logo-img { width: 38px; height: 38px; flex: none; display: block; border-radius: 9px; }

/* Vehicle form: photos & video */
.media-ed { display: flex; flex-direction: column; gap: 14px; }
.media-ed .drop { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 22px 16px; border: 2px dashed var(--border-strong); border-radius: var(--r); background: var(--surface-2); cursor: pointer; transition: .15s; }
.media-ed .drop svg { width: 26px; height: 26px; color: var(--primary); }
.media-ed .drop span { font-size: 13px; color: var(--muted); max-width: 460px; }
.media-ed .drop:hover, .media-ed .drop.over { border-color: var(--primary); background: var(--primary-soft); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.media-item { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); aspect-ratio: 4 / 3; background: var(--surface-2); }
.media-item.main { border: 3px solid var(--primary); }
.media-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-item .badge { position: absolute; top: 6px; left: 6px; }
.media-item .badge.new { left: auto; right: 6px; }
.media-act { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 4px; justify-content: flex-end; padding: 6px; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); }
.media-act .btn { min-height: 28px; padding: 3px 8px; font-size: 12px; }
.media-act .btn svg { width: 14px; height: 14px; }
.video-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.video-card { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.video-card video { width: 320px; max-width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; }

/* On/off switch */
.switch-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.switch-card h3 { margin: 0 0 2px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 700; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { width: 48px; height: 28px; border-radius: 999px; background: var(--border-strong); position: relative; transition: .2s; flex: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: .2s; }
.switch input:checked + span { background: var(--success); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.switch input:disabled + span { opacity: .5; }
.slot-group { margin: 22px 0 10px; font-size: 16px; }
.form-actions .preview-btn { margin-right: auto; }

/* Contracts */
.ct-list { display: flex; flex-direction: column; gap: 10px; }
.ct-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; border: 1px solid var(--border); border-radius: var(--r); padding: 12px 14px; }
.ct-main { min-width: 0; flex: 1 1 340px; display: flex; flex-direction: column; gap: 4px; }
.ct-acts { gap: 6px; flex-wrap: wrap; }
.ct-preview { border: 1px solid var(--border); border-radius: var(--r); padding: 18px 20px; max-height: 460px; overflow: auto; background: #fff; }
.ct-editor { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ct-editor textarea { font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; min-height: 520px; }
.ct-side { position: sticky; top: 76px; }
.ct-side .ct-preview { max-height: 520px; }
.ct-fields { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.ct-fields b { width: 100%; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ct-fields button { border: 1px solid var(--border); background: var(--surface-2); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12px; cursor: pointer; color: var(--text-2); }
.ct-fields button:hover { border-color: var(--primary); color: var(--primary); }
@media (max-width: 1100px) { .ct-editor { grid-template-columns: 1fr; } .ct-side { position: static; } }
.btn.danger-text { color: var(--danger); } .btn.danger-text:hover { background: var(--danger-soft); }

/* Inbox */
.mail-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.mail-bar .seg { display: flex; gap: 4px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 4px; }
.mail-bar .seg button { border: 0; background: none; padding: 7px 12px; border-radius: 7px; font: inherit; font-weight: 600; color: var(--text-2); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.mail-bar .seg button.on { background: var(--primary); color: #fff; }
.mail-bar .seg .count { background: var(--danger); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 6px; }
.mail-bar .search { position: relative; flex: 0 1 280px; } .mail-bar .search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; color: var(--faint); }
.mail-bar .search input { width: 100%; padding: 8px 10px 8px 32px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); }
.mail-bar select { padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface); }
.mail-layout { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 14px; align-items: start; }
.mail-list { padding: 6px; max-height: calc(100vh - 230px); overflow: auto; position: sticky; top: 76px; }
.mail-item { display: flex; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 10px; border-radius: 10px; cursor: pointer; font: inherit; color: var(--text); border-bottom: 1px solid var(--border); }
.mail-item:hover { background: var(--surface-2); } .mail-item.on { background: var(--primary-soft); }
.mail-item.unread b, .mail-item.unread .mail-subj { font-weight: 800; }
.mail-item.unread .mail-ava::after { content: ""; position: absolute; top: -2px; right: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); border: 2px solid var(--surface); }
.mail-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mail-item small { color: var(--muted); white-space: nowrap; }
.mail-subj, .mail-snip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; } .mail-snip { color: var(--muted); font-size: 13px; }
.mail-subj svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 3px; }
.mail-ava { position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--tone, var(--primary)); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.mail-ava.sm { width: 30px; height: 30px; font-size: 12px; }
.mail-read { min-height: 420px; padding: 0; overflow: hidden; }
.mail-head { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: flex-start; }
.mail-title { flex: 1 1 320px; min-width: 0; } .mail-title h2 { margin: 0 0 6px; font-size: 19px; }
.mail-tools { gap: 6px; flex-wrap: wrap; } .mail-tools select { padding: 6px 8px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); max-width: 200px; }
.mail-back { display: none; }
.mail-msgs { padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; background: var(--surface-2); }
.mail-msg { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 12px 14px; }
.mail-msg.out { border-left: 3px solid var(--primary); }
.mail-msg header { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; } .mail-msg header > div { flex: 1; min-width: 0; }
.mail-text { white-space: pre-wrap; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.mail-html { width: 100%; border: 0; min-height: 80px; background: #fff; }
.mail-atts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.mail-compose { padding: 14px 18px 18px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 900px) {
  .mail-layout { grid-template-columns: 1fr; }
  .mail-list { position: static; max-height: none; }
  .mail-layout.reading .mail-list { display: none; }
  .mail-layout:not(.reading) .mail-read { display: none; }
  .mail-back { display: inline-flex; }
}

/* Newsletters & automations */
.nl-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.nl-preview { position: sticky; top: 76px; }
.nl-preview iframe, .auto-preview { width: 100%; height: 640px; border: 1px solid var(--border); border-radius: var(--r); background: #f5f5f6; }
.auto-preview { height: 380px; }
.aud-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.check.aud { align-items: flex-start; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 9px 10px; gap: 8px; }
.check.aud span { display: flex; flex-direction: column; } .check.aud small { color: var(--muted); font-size: 12px; font-weight: 400; }
.check.aud:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.auto-list { display: flex; flex-direction: column; gap: 10px; }
.auto-card { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; }
.auto-main { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 1000px) { .nl-grid { grid-template-columns: 1fr; } .nl-preview { position: static; } }

/* ---------- Promotions (console list + editor; .promo-card is also used on the website) ---------- */
.promo-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.promo-admin { padding: 0; overflow: hidden; color: inherit; text-decoration: none; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.promo-admin:hover { box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.pa-img { position: relative; aspect-ratio: 2 / 1; background: #111113; display: grid; place-items: center; color: #fff; }
.pa-img img { width: 100%; height: 100%; object-fit: cover; }
.pa-img > span svg { width: 34px; height: 34px; opacity: .5; }
.pa-offer, .pc-offer { position: absolute; left: 12px; bottom: 12px; background: #d4111b; color: #fff; font-weight: 800; font-size: 14px; padding: 5px 11px; border-radius: 8px; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.pa-body { padding: 14px 16px 16px; display: grid; gap: 6px; }
.pa-body h3 { margin: 2px 0 0; font-size: 16px; }
.pa-flags { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); margin-top: 4px; }
.pa-flags span { display: inline-flex; align-items: center; gap: 4px; } .pa-flags svg { width: 14px; height: 14px; }
.promo-switches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.promo-switches .check { align-items: flex-start; border: 1px solid var(--border); border-radius: var(--r); padding: 10px 12px; }
.promo-switches .check span { display: grid; } .promo-switches small { color: var(--muted); font-size: 12px; }
.promo-pic { aspect-ratio: 2 / 1; border: 1px dashed var(--border); border-radius: var(--r); overflow: hidden; display: grid; place-items: center; background: var(--surface-2, #f6f7f9); }
.promo-pic img { width: 100%; height: 100%; object-fit: cover; }
.promo-vlist { max-height: 300px; overflow: auto; display: grid; gap: 4px; }
.promo-vlist .check { padding: 6px 8px; border-radius: 8px; align-items: flex-start; } .promo-vlist .check:hover { background: var(--surface-2, #f6f7f9); }
.promo-vlist .check span { display: grid; } .promo-vlist small { color: var(--muted); }
.promo-card { background: #fff; color: #111113; border: 1px solid #e6e6e9; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 6px 20px rgba(10, 10, 12, .06); }
.pc-img { position: relative; aspect-ratio: 2 / 1; background: #070708; }
.pc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-noimg { aspect-ratio: auto; min-height: 92px; background: linear-gradient(120deg, #070708 0 60%, #d4111b 60%); }
.pc-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pc-cat { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #d4111b; }
.pc-body h3 { margin: 0; font-size: 19px; line-height: 1.25; overflow-wrap: anywhere; }
.pc-text p { margin: 0 0 8px; color: #45454c; font-size: 14.5px; line-height: 1.55; }
.pc-cars { margin: 0; padding-left: 18px; font-size: 13.5px; color: #45454c; }
.pc-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: #63636b; }
.pc-code { background: #fdecec; color: #a80d15; border: 1px dashed #d4111b; border-radius: 6px; padding: 2px 8px; }
.pc-body .btn { align-self: flex-start; margin-top: auto; background: #d4111b; border-color: #d4111b; color: #fff; }
.pc-terms { margin: 4px 0 0; font-size: 11.5px; color: #8a8a92; line-height: 1.45; }
@media (max-width: 760px) { .promo-switches { grid-template-columns: 1fr; } }

/* Countersign: signature options */
.sig-modes { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.sig-modes label { cursor: pointer; }
.sig-modes input { position: absolute; opacity: 0; pointer-events: none; }
.sig-modes span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--text-2); background: var(--surface); }
.sig-modes span svg { width: 15px; height: 15px; }
.sig-modes input:checked + span { background: #111113; color: #fff; border-color: #111113; }
.sig-modes input:disabled + span { opacity: .45; cursor: not-allowed; }
.sig-modes input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.sig-saved { border: 1px solid var(--border); border-radius: 12px; background: #fff; min-height: 110px; display: grid; place-items: center; padding: 10px; margin-bottom: 8px; }
.sig-saved img { max-height: 96px; max-width: 100%; }

/* Inbox: designed email signature builder */
.sig-builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.sig-extras { margin-top: 10px; display: grid; gap: 2px; }
.sig-preview { position: sticky; top: 0; }
.sig-box { border: 1px solid var(--border); border-radius: 12px; padding: 16px; background: #fff; overflow-x: auto; }
@media (max-width: 860px) { .sig-builder { grid-template-columns: 1fr; } .sig-preview { position: static; } }

/* ---------- GPS tracking ---------- */
.gps-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: stretch; }
.gps-mapcard { padding: 0; overflow: hidden; }
.gps-map { height: 64vh; min-height: 420px; background: #e9ecef; }
.gps-map.sm { height: 280px; min-height: 0; border-radius: var(--r); }
.gps-side { display: flex; flex-direction: column; gap: 10px; max-height: calc(64vh + 2px); min-height: 420px; }
.gps-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 5px 11px; font: 600 12.5px var(--font, inherit); cursor: pointer; color: var(--text-2); }
.chip-btn.on { background: #111113; border-color: #111113; color: #fff; }
.gps-list { overflow: auto; display: grid; gap: 4px; align-content: start; flex: 1; }
.gps-row { display: flex; gap: 10px; align-items: flex-start; text-align: left; border: 1px solid transparent; background: none; padding: 9px 10px; border-radius: 10px; cursor: pointer; font: inherit; color: inherit; }
.gps-row:hover { background: var(--surface-2, #f6f7f9); } .gps-row.on { border-color: var(--primary); background: var(--primary-soft); }
.gps-row-main { display: grid; gap: 1px; min-width: 0; } .gps-row-main small { color: var(--muted); font-size: 12px; }
.gps-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex: none; }
.gps-dot.parked, .gps-pin.parked { background: #16a34a; } .gps-dot.moving, .gps-pin.moving { background: #2563eb; }
.gps-dot.offline, .gps-pin.offline { background: #8a8a92; } .gps-dot.off, .gps-pin.off { background: #e1121c; }
.gps-st { font-weight: 700; } .gps-st.parked { color: #15803d; } .gps-st.moving { color: #1d4ed8; } .gps-st.offline { color: #63636b; } .gps-st.off { color: #c10f18; }
.late { color: var(--danger); }
.gps-pin { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .35); }
.gps-pin svg { width: 17px; height: 17px; }
.gps-pin-label { position: absolute; left: 50%; top: 36px; transform: translateX(-50%); background: #111113; color: #fff; font: 700 10.5px Arial, sans-serif; padding: 1px 6px; border-radius: 5px; white-space: nowrap; }
.gps-detail { margin-top: 16px; }
.gps-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 16px; margin-top: 12px; }
.gps-facts div { display: grid; gap: 1px; } .gps-facts span { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; } .gps-facts b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 960px) { .gps-layout { grid-template-columns: 1fr; } .gps-side { max-height: none; min-height: 0; } .gps-map { height: 52vh; min-height: 320px; } }
