/* ==========================================================================
   Evox Dispatch design system — original, technology-first SaaS.
   Tokens → primitives → components → layouts. No external fonts (CSP self).
   ========================================================================== */
:root {
  /* brand */
  --brand: #fd5305; --brand-600: #e04a04; --brand-700: #b83c03; --brand-100: #ffe8dc; --brand-50: #fff4ee;
  --ink: #0f1115; --ink-2: #1b1f27; --ink-3: #2b313d;
  /* neutrals (cool, slightly blue to make orange pop) */
  --n0: #ffffff; --n50: #f7f8fa; --n100: #eef0f4; --n200: #dfe3ea; --n300: #c6ccd6; --n400: #98a1b0;
  --n500: #6b7482; --n600: #4b5362; --n700: #343b48; --n800: #232833; --n900: #14171e;
  /* semantic */
  --success: #148a4b; --success-bg: #e5f6ec; --warning: #b26a00; --warning-bg: #fff4dc;
  --danger: #c62828; --danger-bg: #fdeaea; --info: #1f5fbf; --info-bg: #e6eefb;
  /* surfaces */
  --bg: var(--n50); --surface: var(--n0); --surface-2: var(--n100); --border: var(--n200); --border-strong: var(--n300);
  --text: var(--ink); --text-2: var(--n600); --text-3: var(--n500); --text-inverse: #fff;
  /* type */
  --font: "Inter", "SF Pro Text", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --fs-xs: .75rem; --fs-sm: .8125rem; --fs-md: .9375rem; --fs-lg: 1.0625rem; --fs-xl: 1.375rem; --fs-2xl: 1.75rem; --fs-3xl: 2.5rem;
  /* spacing / radii / shadows */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px; --s16: 64px; --s20: 80px; --s24: 96px;
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-full: 999px;
  --sh-1: 0 1px 2px rgba(15,17,21,.06); --sh-2: 0 4px 12px rgba(15,17,21,.08); --sh-3: 0 16px 40px rgba(15,17,21,.14);
  --ring: 0 0 0 3px rgba(253,83,5,.28);
  --sidebar-w: 248px; --topbar-h: 60px; --content-max: 1280px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: light; } } /* single-look product; dark deferred */

/* ---- reset ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: var(--fs-md); line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
a { color: var(--brand-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 var(--s2); line-height: 1.2; letter-spacing: -.01em; font-weight: 650; }
h1 { font-size: var(--fs-2xl); } h2 { font-size: var(--fs-xl); } h3 { font-size: var(--fs-lg); } h4 { font-size: var(--fs-md); }
p { margin: 0 0 var(--s3); }
small, .muted { color: var(--text-3); font-size: var(--fs-sm); }
code, .mono { font-family: var(--mono); font-size: .875em; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--s6) 0; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: var(--r-sm); z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---- layout primitives -------------------------------------------------- */
.container { width: 100%; max-width: var(--content-max); margin: 0 auto; padding-inline: var(--s6); }
.stack > * + * { margin-top: var(--s4); }
.stack-sm > * + * { margin-top: var(--s2); }
.stack-lg > * + * { margin-top: var(--s8); }
.row { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: var(--s3); align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid { display: grid; gap: var(--s4); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
.grid-fit { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
/* two-column pages stack once the content area gets narrow (iPad landscape with the sidebar open) */
@media (max-width: 1180px) { .grid-main { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4, .grid-main { grid-template-columns: 1fr; } }
.flex-1 { flex: 1 1 auto; min-width: 0; }
.text-right { text-align: right; } .text-center { text-align: center; } .nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-0 { margin-top: 0 !important; } .mb-0 { margin-bottom: 0 !important; } .mt-2 { margin-top: var(--s2); } .mt-4 { margin-top: var(--s4); } .mt-6 { margin-top: var(--s6); } .mb-4 { margin-bottom: var(--s4); } .mb-6 { margin-bottom: var(--s6); }
.w-full { width: 100%; }

/* ---- buttons ------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); height: 40px; padding: 0 var(--s4); border-radius: var(--r-md); border: 1px solid transparent; font: inherit; font-weight: 600; font-size: var(--fs-sm); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; text-decoration: none !important; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--sh-1); }
.btn-primary:hover { background: var(--brand-600); }
.btn-dark { background: var(--ink); color: #fff; } .btn-dark:hover { background: var(--ink-3); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--n100); }
.btn-ghost { background: transparent; color: var(--text-2); } .btn-ghost:hover { background: var(--n100); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; } .btn-danger:hover { background: #a91f1f; }
.btn-danger-soft { background: var(--danger-bg); color: var(--danger); } .btn-danger-soft:hover { background: #f9d6d6; }
.btn-sm { height: 32px; padding: 0 var(--s3); font-size: var(--fs-xs); border-radius: var(--r-sm); }
.btn-lg { height: 48px; padding: 0 var(--s6); font-size: var(--fs-md); border-radius: var(--r-lg); }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--r-md); }
.btn .spinner { display: none; } .btn.htmx-request .spinner { display: inline-block; } .btn.htmx-request .label { opacity: .6; }
.btn-block { width: 100%; }

/* ---- forms -------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); }
.field .hint { font-size: var(--fs-xs); color: var(--text-3); }
.field .error { font-size: var(--fs-xs); color: var(--danger); font-weight: 500; }
.input, .select, .textarea { width: 100%; height: 42px; padding: 0 var(--s3); border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface); font: inherit; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.textarea { height: auto; min-height: 96px; padding: var(--s3); resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b7482' stroke-width='2'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.input[aria-invalid="true"], .field.has-error .input, .field.has-error .select { border-color: var(--danger); }
.input:disabled, .select:disabled { background: var(--n100); color: var(--text-3); }
.input.is-locked, .input[data-vin-locked] { background: var(--n50); color: var(--text); border-color: var(--border); cursor: not-allowed; }
.input-group { display: flex; } .input-group .input { border-radius: var(--r-md) 0 0 var(--r-md); } .input-group .btn { border-radius: 0 var(--r-md) var(--r-md) 0; height: 42px; }
.check { display: flex; gap: var(--s3); align-items: flex-start; font-size: var(--fs-sm); color: var(--text-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.route-estimate { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; padding: 10px 12px; border-radius: var(--r-md); background: var(--brand-50); border: 1px solid var(--brand-100); font-size: var(--fs-sm); } .route-estimate strong { font-size: var(--fs-base); }
.photo-placeholder { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; background: var(--n100); border: 1px dashed var(--border-strong); border-radius: var(--r-md); color: var(--text-3); font-size: var(--fs-xs); text-align: center; padding: var(--s2); }
.contact-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s8); padding: var(--s6) var(--s8); margin: var(--s4) 0 var(--s8); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.contact-card address { font-style: normal; line-height: 1.7; color: var(--text); }
.contact-list { display: grid; grid-template-columns: auto 1fr; gap: 6px var(--s4); margin: 2px 0 0; }
.contact-list dt { color: var(--text-3); font-size: var(--fs-sm); } .contact-list dd { margin: 0; font-size: var(--fs-sm); }
@media (max-width: 640px) { .contact-card { grid-template-columns: 1fr; gap: var(--s5); padding: var(--s5); } .contact-list { grid-template-columns: 1fr; gap: 2px; } .contact-list dd { margin-bottom: 8px; } }
.ack-list { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; font-size: var(--fs-sm); color: var(--text-2); line-height: 1.55; } .ack-list strong { color: var(--text); }
.ack-check { padding-top: var(--s2); border-top: 1px solid var(--border); margin-top: var(--s2); color: var(--text); font-weight: 500; }
.has-error .ack-check input { outline: 2px solid var(--danger); outline-offset: 2px; border-radius: 3px; }
.radio-cards { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.radio-card { position: relative; border: 1px solid var(--border-strong); border-radius: var(--r-md); padding: var(--s3) var(--s4); cursor: pointer; background: var(--surface); }
.radio-card input { position: absolute; opacity: 0; inset: 0; }
.radio-card:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); background: var(--brand-50); }
.radio-card:has(input:focus-visible) { box-shadow: var(--ring); }
.radio-card strong { display: block; font-size: var(--fs-sm); }
.radio-card span { font-size: var(--fs-xs); color: var(--text-3); }
.otp { display: flex; gap: var(--s2); }
.otp .input { text-align: center; font-size: 1.5rem; font-family: var(--mono); letter-spacing: .5em; height: 56px; }
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--r-lg); padding: var(--s8); text-align: center; color: var(--text-3); background: var(--surface); transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--brand); background: var(--brand-50); }
.dropzone input { display: none; }
.form-actions { display: flex; gap: var(--s3); justify-content: flex-end; padding-top: var(--s4); border-top: 1px solid var(--border); margin-top: var(--s6); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 650; font-size: var(--fs-lg); margin-bottom: var(--s3); }

/* ---- cards / panels ----------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.card-body { padding: var(--s5) var(--s6); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s4) var(--s6); border-bottom: 1px solid var(--border); }
.card-header h3 { margin: 0; }
.card-footer { padding: var(--s4) var(--s6); border-top: 1px solid var(--border); background: var(--n50); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.card-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.card-dark .muted { color: var(--n400); }
.panel { background: var(--surface-2); border-radius: var(--r-md); padding: var(--s4); }
.stat { padding: var(--s4) var(--s5); }
.stat .stat-label { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 600; }
.stat .stat-value { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin-top: 4px; }
.stat .stat-delta { font-size: var(--fs-xs); color: var(--text-3); margin-top: 4px; }
.stat-accent { border-left: 3px solid var(--brand); }

/* ---- badges / status ---------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; background: var(--n100); color: var(--text-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge-neutral { background: var(--n100); color: var(--text-2); }
.badge-brand { background: var(--brand-100); color: var(--brand-700); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-plain::before { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-full); border: 1px solid var(--border-strong); background: var(--surface); font-size: var(--fs-xs); font-weight: 500; }
.chip.is-active { border-color: var(--brand); background: var(--brand-50); color: var(--brand-700); }
.load-id { font-family: var(--mono); font-weight: 600; letter-spacing: .02em; color: var(--ink); background: var(--n100); padding: 2px 8px; border-radius: var(--r-sm); font-size: var(--fs-sm); }
.avatar { width: 36px; height: 36px; border-radius: var(--r-full); background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-xs); font-weight: 700; flex: none; }
.avatar-sm { width: 28px; height: 28px; font-size: 10px; }
.avatar-brand { background: var(--brand); }

/* ---- alerts / callouts -------------------------------------------------- */
.alert { display: flex; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-md); border: 1px solid; font-size: var(--fs-sm); }
.alert strong { display: block; }
.alert-info { background: var(--info-bg); border-color: #c5d6f5; color: #173f80; }
.alert-success { background: var(--success-bg); border-color: #b8e5c8; color: #0d5a31; }
.alert-warning { background: var(--warning-bg); border-color: #f5dea6; color: #6e4200; }
.alert-danger { background: var(--danger-bg); border-color: #f2bcbc; color: #7f1717; }
.banner { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s3) var(--s6); font-size: var(--fs-sm); font-weight: 500; }
.banner-brand { background: var(--brand); color: #fff; } .banner-brand a { color: #fff; text-decoration: underline; }
.banner-warning { background: var(--warning-bg); color: #6e4200; }
.banner-danger { background: var(--danger); color: #fff; }
.callout { border-left: 3px solid var(--brand); background: var(--brand-50); padding: var(--s3) var(--s4); border-radius: 0 var(--r-md) var(--r-md) 0; font-size: var(--fs-sm); }

/* ---- tables ------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th { text-align: left; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 600; padding: var(--s3) var(--s4); background: var(--n50); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--n50); }
.table tr.is-clickable { cursor: pointer; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-compact td, .table-compact th { padding: var(--s2) var(--s3); }
.kv { display: grid; grid-template-columns: minmax(72px, max-content) minmax(0, 1fr); gap: var(--s2) var(--s4); font-size: var(--fs-sm); }
.kv dt { color: var(--text-3); font-weight: 500; } .kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 640px) { .kv { grid-template-columns: 1fr; gap: 2px var(--s4); } .kv dd { margin-bottom: var(--s2); } }

/* ---- navigation / app shell --------------------------------------------- */
.topbar { height: var(--topbar-h); background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
.topbar .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s4); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none !important; }
.brand img { height: 26px; width: auto; }
.nav-links { display: flex; gap: var(--s1); align-items: center; }
.nav-links a { padding: 8px 12px; border-radius: var(--r-md); color: var(--text-2); font-weight: 500; font-size: var(--fs-sm); text-decoration: none !important; }
.nav-links a:hover, .nav-links a.is-active { background: var(--n100); color: var(--text); }
.topbar .brand { flex: none; }
.topbar-actions { flex: none; flex-wrap: nowrap; }
.nav-toggle, .nav-login, .nav-toggle-close { display: none; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .topbar-login { display: none; }
  .topbar .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px;
    padding: var(--s3) var(--s4) var(--s5); background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--sh-2); }
  .topbar.is-open .nav-links { display: flex; }
  .topbar.is-open .nav-toggle-open { display: none; } .topbar.is-open .nav-toggle-close { display: inline-flex; }
  .topbar .nav-links a { padding: 12px; font-size: var(--fs-base); }
  .topbar .nav-links .nav-login { display: block; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--border); border-radius: 0; }
}
@media (max-width: 380px) { .topbar .btn-primary { padding-inline: 12px; } }
@media (min-width: 641px) and (max-width: 960px) { .plan-grid > :last-child:nth-child(3) { grid-column: 1 / -1; } }
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--ink); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar-brand { padding: var(--s5) var(--s5) var(--s4); border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-brand img { height: 24px; }
.sidebar-nav { padding: var(--s3); flex: 1; overflow-y: auto; }
.sidebar-section { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--n500); font-weight: 700; padding: var(--s4) var(--s3) var(--s2); }
.sidebar-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-md); color: var(--n300); font-size: var(--fs-sm); font-weight: 500; text-decoration: none !important; }
.sidebar-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-nav a.is-active { background: rgba(253,83,5,.16); color: #fff; box-shadow: inset 3px 0 0 var(--brand); }
.sidebar-nav a .count { margin-left: auto; background: var(--brand); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: var(--r-full); }
.sidebar-nav svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.sidebar-footer { padding: var(--s4); border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.sidebar-user .name { font-size: var(--fs-sm); font-weight: 600; } .sidebar-user .role { font-size: var(--fs-xs); color: var(--n500); }
.main { display: flex; flex-direction: column; min-width: 0; }
.main-header { height: var(--topbar-h); display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: 0 var(--s8); background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.main-header > .row { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; }
.main-header .page-title { min-width: 0; flex-wrap: wrap; row-gap: 2px; }
.main-header .page-actions { flex: none; }
.load-id { white-space: nowrap; }
@media (max-width: 640px) {
  .main-header { height: auto; min-height: var(--topbar-h); padding-block: 8px; gap: var(--s2); }
  .main-header .page-title h1 { font-size: var(--fs-md); line-height: 1.25; }
  .main-header .page-actions .btn { padding-inline: 12px; }
  .grid.grid-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
  .table-wrap > .table { min-width: 640px; }
  .table-wrap > .table.feed { min-width: 520px; }
  .grid-stats .stat { padding: var(--s3) var(--s4); }
  .hide-sm { display: none !important; }
  /* load board filters: even two-column grid instead of ragged fixed widths */
  form.filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); align-items: center; }
  form.filters > .input, form.filters > .select { width: 100% !important; min-width: 0 !important; height: 40px; }
  form.filters > .check, form.filters > .btn-primary { grid-column: 1 / -1; }
  form.filters > .btn-primary { height: 42px; }
  form.filters > .htmx-indicator { position: absolute; }
}
.main-body { padding: var(--s8); flex: 1; width: 100%; max-width: 1480px; margin-inline: auto; }
.page-narrow { width: 100%; max-width: 880px; margin-inline: auto; } .page-narrow-sm { width: 100%; max-width: 640px; margin-inline: auto; } .page-narrow-md { width: 100%; max-width: 720px; margin-inline: auto; }
/* control overview: 5 stat columns; activity spans 3, attention spans 2 so edges line up with the cards */
.grid-control-dash { grid-template-columns: repeat(5, minmax(0, 1fr)); } .grid-control-dash > :first-child { grid-column: span 3; min-width: 0; } .grid-control-dash > :last-child { grid-column: span 2; min-width: 0; }
@media (max-width: 1180px) { .grid-control-dash { grid-template-columns: minmax(0, 1fr); } .grid-control-dash > :first-child, .grid-control-dash > :last-child { grid-column: auto; } }
/* admin overview: ten counters stay two rows of five down to tablet width */
@media (min-width: 641px) and (max-width: 1180px) { .grid.grid-5.grid-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s3); } .grid-5.grid-stats .stat { padding: var(--s3); } .grid-5.grid-stats .stat-label { font-size: 10px; letter-spacing: .04em; } }
@media (max-width: 960px) { .grid-control-dash { grid-template-columns: 1fr; } .grid-control-dash > :first-child, .grid-control-dash > :last-child { grid-column: auto; } }
.table.feed td { white-space: nowrap; } .table.feed td.truncate { overflow: hidden; text-overflow: ellipsis; }
/* dashboard: same 4 columns as the stat row so the side column lines up with the 4th card */
.grid-dash { grid-template-columns: repeat(4, minmax(0, 1fr)); } .grid-dash > :first-child { grid-column: span 3; } .grid-dash > :last-child { grid-column: span 1; min-width: 0; }
@media (max-width: 1180px) { .grid-dash { grid-template-columns: minmax(0, 1fr); } .grid-dash > :first-child, .grid-dash > :last-child { grid-column: auto; } }
@media (max-width: 960px) { .grid-dash { grid-template-columns: 1fr; } .grid-dash > :first-child, .grid-dash > :last-child { grid-column: auto; } }
.page-title { display: flex; align-items: center; gap: var(--s3); }
.page-title h1 { font-size: var(--fs-xl); margin: 0; }
.page-actions { display: flex; gap: var(--s2); align-items: center; }
.breadcrumb { display: flex; gap: 6px; font-size: var(--fs-sm); color: var(--text-3); }
.breadcrumb a { color: var(--text-3); } .breadcrumb span::before { content: "/"; margin-right: 6px; color: var(--n300); }
.sidebar-toggle { display: none; }
.control .sidebar { background: #0b0d12; }
.control .sidebar-brand::after { content: "CONTROL CENTER"; display: block; margin-top: 6px; font-size: 10px; letter-spacing: .12em; color: var(--brand); font-weight: 700; }
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); transform: translateX(-100%); transition: transform .2s; z-index: 50; }
  .sidebar.is-open { transform: none; box-shadow: var(--sh-3); }
  .sidebar-toggle { display: inline-flex; }
  .main-header { padding: 0 var(--s4); } .main-body { padding: var(--s4); }
}
.command { flex: 1; max-width: 520px; position: relative; }
.command .input { height: 38px; padding-left: 38px; background: var(--n50); border-color: var(--border); }
.command svg { position: absolute; left: 12px; top: 11px; width: 16px; height: 16px; color: var(--text-3); }
.command kbd { position: absolute; right: 10px; top: 9px; font-size: 10px; border: 1px solid var(--border-strong); border-radius: 4px; padding: 1px 5px; color: var(--text-3); background: var(--surface); }

/* ---- tabs / stepper / timeline ----------------------------------------- */
.tabs { display: flex; gap: var(--s1); border-bottom: 1px solid var(--border); margin-bottom: var(--s5); overflow-x: auto; }
.tabs a, .tabs button { padding: 10px 14px; font-size: var(--fs-sm); font-weight: 600; color: var(--text-3); border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; text-decoration: none !important; font-family: inherit; }
.tabs a.is-active, .tabs button.is-active { color: var(--brand-700); border-bottom-color: var(--brand); }
.stepper { display: flex; gap: var(--s2); counter-reset: step; }
.step { flex: 1; display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--text-3); }
.step::before { counter-increment: step; content: counter(step); width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border-strong); display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-xs); font-weight: 700; flex: none; }
.step.is-done::before { background: var(--success); border-color: var(--success); color: #fff; content: "✓"; }
.step.is-active { color: var(--text); font-weight: 600; } .step.is-active::before { border-color: var(--brand); color: var(--brand); }
.step::after { content: ""; flex: 1; height: 2px; background: var(--border); } .step:last-child::after { display: none; }
@media (max-width: 640px) { .step span { display: none; } }
.progress { height: 8px; background: var(--n100); border-radius: var(--r-full); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand); border-radius: var(--r-full); }
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding-bottom: var(--s5); }
.tl-item::before { content: ""; position: absolute; left: -24px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--n400); }
.tl-item.is-brand::before { border-color: var(--brand); background: var(--brand); }
.tl-item.is-success::before { border-color: var(--success); background: var(--success); }
.tl-item.is-danger::before { border-color: var(--danger); background: var(--danger); }
.tl-item.is-warning::before { border-color: var(--warning); background: var(--warning); }
.tl-head { display: flex; justify-content: space-between; gap: var(--s3); font-size: var(--fs-sm); }
.tl-head strong { font-weight: 600; } .tl-head time { color: var(--text-3); white-space: nowrap; font-size: var(--fs-xs); }
.tl-body { font-size: var(--fs-sm); color: var(--text-2); margin-top: 2px; }
.tl-meta { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: 6px; }
.status-track { display: flex; gap: 4px; }
.status-track span { flex: 1; height: 6px; border-radius: 3px; background: var(--n200); }
.status-track span.is-done { background: var(--success); } .status-track span.is-current { background: var(--brand); }

/* ---- load card / board -------------------------------------------------- */
.load-card { display: grid; grid-template-columns: 1fr auto; gap: var(--s3) var(--s5); padding: var(--s4) var(--s5); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.load-card:hover { border-color: var(--n400); box-shadow: var(--sh-2); }
.load-card .route { display: flex; align-items: center; gap: var(--s3); font-weight: 600; }
.load-card .route .arrow { color: var(--brand); font-weight: 700; }
.load-card .route small { display: block; font-weight: 400; color: var(--text-3); }
.load-card .price { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -.02em; text-align: right; }
.load-card .price small { display: block; font-size: var(--fs-xs); font-weight: 500; color: var(--text-3); }
.load-card .meta { display: flex; gap: var(--s4); flex-wrap: wrap; font-size: var(--fs-sm); color: var(--text-2); grid-column: 1 / -1; }
.load-card .meta span::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--n300); margin: 0 8px 3px 0; }
.load-card .meta span:first-child::before { display: none; }
@media (max-width: 640px) { .load-card { grid-template-columns: 1fr; } .load-card .price { text-align: left; } }
.filters { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.filters .select, .filters .input { height: 36px; width: auto; min-width: 140px; font-size: var(--fs-sm); }
.protected { position: relative; filter: blur(5px); user-select: none; pointer-events: none; }
.protected-wrap { position: relative; }
.protected-wrap .unlock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }

/* ---- empty / loading / skeleton ---------------------------------------- */
.empty { text-align: center; padding: var(--s12) var(--s6); color: var(--text-3); }
.empty .icon { width: 56px; height: 56px; border-radius: var(--r-lg); background: var(--n100); display: inline-flex; align-items: center; justify-content: center; margin-bottom: var(--s4); color: var(--n500); }
.empty h3 { color: var(--text); }
.skeleton { background: linear-gradient(90deg, var(--n100) 25%, var(--n200) 37%, var(--n100) 63%); background-size: 400% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r-sm); height: 14px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; }
.spinner-dark { border-color: var(--n200); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }
.htmx-indicator { display: none; } .htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline-flex; }

/* ---- modal / drawer / dropdown / toast --------------------------------- */
dialog.modal { border: 0; border-radius: var(--r-xl); padding: 0; width: min(560px, calc(100% - 32px)); box-shadow: var(--sh-3); background: var(--surface); color: var(--text); }
dialog.modal::backdrop { background: rgba(15,17,21,.55); backdrop-filter: blur(2px); }
.modal-lg { width: min(860px, calc(100% - 32px)) !important; }
.modal-header { padding: var(--s5) var(--s6) var(--s3); display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s4); }
.modal-header h3 { margin: 0; }
.modal-body { padding: 0 var(--s6) var(--s5); }
.modal-footer { padding: var(--s4) var(--s6); border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: var(--s2); background: var(--n50); border-radius: 0 0 var(--r-xl) var(--r-xl); }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--sh-2); padding: 6px; z-index: 40; }
.dropdown-menu a, .dropdown-menu button { display: flex; width: 100%; text-align: left; padding: 8px 10px; border-radius: var(--r-sm); font-size: var(--fs-sm); color: var(--text); background: none; border: 0; cursor: pointer; font-family: inherit; text-decoration: none !important; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--n100); }
.dropdown-menu .danger { color: var(--danger); }
.field.places { position: relative; }
.places-menu { position: absolute; left: 0; right: 0; top: calc(100% - 2px); z-index: 30; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--sh-3); padding: 4px; max-height: 280px; overflow-y: auto; }
.places-menu button { display: flex; flex-direction: column; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: none; font: inherit; cursor: pointer; color: var(--text); }
.places-menu button strong { font-size: var(--fs-sm); font-weight: 600; } .places-menu button span { font-size: var(--fs-xs); color: var(--text-3); }
.places-menu button:hover, .places-menu button.is-active { background: var(--n100); }
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--r-md); box-shadow: var(--sh-3); font-size: var(--fs-sm); min-width: 260px; max-width: 380px; display: flex; gap: 10px; align-items: flex-start; animation: rise .2s ease-out; }
.toast-success { border-left: 3px solid #3ddc84; } .toast-danger { border-left: 3px solid #ff6b6b; } .toast-warning { border-left: 3px solid #ffc857; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

/* ---- notification / inbox ---------------------------------------------- */
.notif { display: flex; gap: var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border); }
.notif.is-unread { background: var(--brand-50); }
.notif .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 8px; flex: none; }
.notif.is-read .dot { background: transparent; }
.notif .title { font-weight: 600; font-size: var(--fs-sm); } .notif .body { font-size: var(--fs-sm); color: var(--text-2); }
.inbox-item { display: grid; grid-template-columns: 6px 1fr auto; gap: var(--s3); padding: var(--s3) var(--s4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); align-items: center; }
.inbox-item .pri { width: 6px; height: 100%; min-height: 40px; border-radius: 3px; background: var(--n300); }
.inbox-item .pri.p1 { background: var(--danger); } .inbox-item .pri.p2 { background: var(--warning); } .inbox-item .pri.p3 { background: var(--info); }

/* ---- public / marketing ------------------------------------------------- */
.hero { padding: var(--s24) 0 var(--s20); }
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -.03em; max-width: 14ch; line-height: 1.05; }
.hero p.lead { font-size: var(--fs-lg); color: var(--text-2); max-width: 52ch; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--s16); align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: var(--s10); } .hero { padding: var(--s12) 0; } .section { padding: var(--s16) 0; } }
.globe-wrap { display: flex; flex-direction: column; align-items: center; gap: var(--s3); width: 100%; }
.globe { width: min(100%, 520px); aspect-ratio: 1 / 1; display: block; filter: drop-shadow(0 0 18px rgba(253,83,5,.38)); }
.usmap { width: 100%; max-width: 620px; aspect-ratio: 1.62 / 1; display: block; }
.globe-feed { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px; pointer-events: none; min-height: 68px; }
.globe-card { background: #0f1115; color: #fff; border: 1px solid rgba(255,255,255,.08); border-radius: var(--r-md); padding: 8px 12px; font-size: var(--fs-xs); display: flex; flex-direction: column; gap: 2px; min-width: 220px; box-shadow: var(--sh-2); animation: rise .35s ease-out; }
.globe-card strong { font-size: var(--fs-sm); } .globe-card .arrow { color: var(--brand); } .globe-card .muted { color: var(--n400); } .globe-card b { color: #fff; }
.globe-card-id { font-size: 10px; letter-spacing: .12em; font-weight: 700; color: var(--brand); }
@media (max-width: 960px) { .globe { width: min(100%, 380px); } }
.section { padding: var(--s24) 0; }
.section .grid-2, .section .grid-3, .section .grid-4 { gap: var(--s6); }
.section + .section { border-top: 0; }
.section-title { max-width: 40ch; margin-bottom: var(--s12); }
.hero-center .stack { text-align: center; align-items: center; display: flex; flex-direction: column; max-width: 720px; margin-inline: auto; }
.hero-center h1 { max-width: 18ch; }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-5 { grid-template-columns: 1fr; } }
.step-no { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: var(--fs-sm); margin-bottom: var(--s4); }
.section-title h2 { font-size: var(--fs-2xl); }
.eyebrow { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: var(--s2); }
/* hero eyebrow: slides in, then a bright light sweep glides across the letters continuously */
.eyebrow-shine { display: inline-block; font-size: var(--fs-sm); animation: eyebrow-in .7s cubic-bezier(.2,.8,.2,1) both; }
.eyebrow-shine span { display: inline-block; background: linear-gradient(100deg, var(--brand) 0%, var(--brand) 40%, var(--ink) 50%, var(--brand) 60%, var(--brand) 100%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: eyebrow-sweep 2.2s ease-in-out infinite; }
@keyframes eyebrow-in { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes eyebrow-sweep { 0% { background-position: 120% 0; } 70%, 100% { background-position: -20% 0; } }
@media (prefers-reduced-motion: reduce) { .eyebrow-shine, .eyebrow-shine span { animation: none; } .eyebrow-shine span { color: var(--brand); background: none; } }
.feature { padding: var(--s6) var(--s6) var(--s8); }
.feature .icon { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--brand-100); color: var(--brand-700); display: inline-flex; align-items: center; justify-content: center; margin-bottom: var(--s5); }
.feature h3 { margin-bottom: var(--s3); }
.feature p { line-height: 1.6; }
.segmented { display: inline-flex; background: var(--n100); border-radius: var(--r-full); padding: 4px; gap: 4px; margin: 0 auto var(--s10); position: relative; left: 50%; transform: translateX(-50%); }
.segmented button { border: 0; background: transparent; font: inherit; font-weight: 600; font-size: var(--fs-sm); color: var(--text-2); padding: 10px 22px; border-radius: var(--r-full); cursor: pointer; transition: background .15s, color .15s; }
.segmented button.is-active { background: var(--ink); color: #fff; box-shadow: var(--sh-1); }
.segmented button:focus-visible { box-shadow: var(--ring); }
.price-card { position: relative; }
.price-card.is-featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--sh-2); }
.price-card .price { font-size: var(--fs-3xl); font-weight: 700; letter-spacing: -.03em; } .price-card .price small { font-size: var(--fs-sm); font-weight: 500; color: var(--text-3); }
.price-card ul { list-style: none; padding: 0; margin: var(--s4) 0; } .price-card li { padding: 6px 0; font-size: var(--fs-sm); display: flex; gap: 8px; }
.price-card li::before { content: "✓"; color: var(--success); font-weight: 700; }
/* public footer: white band with the brand accent line and a soft orange glow */
.footer { position: relative; overflow: hidden; background: var(--surface); color: var(--text-3); font-size: var(--fs-sm); margin-top: var(--s12); border-top: 1px solid var(--border); }
.footer::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--brand), var(--brand-600) 40%, transparent); z-index: 1; }
.footer::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(15,17,21,.10) 1px, transparent 1.3px), radial-gradient(620px 300px at 92% -10%, rgba(253,83,5,.12), transparent 70%);
  background-size: 16px 16px, auto;
  -webkit-mask-image: linear-gradient(200deg, #000, transparent 58%); mask-image: linear-gradient(200deg, #000, transparent 58%); }
.footer .container { position: relative; z-index: 1; }
.footer-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s6) var(--s12); padding-block: var(--s16) var(--s12); border-bottom: 1px solid var(--border); }
.footer-headline { margin: 0; max-width: 18em; font-size: clamp(1.5rem, 3.2vw, 2.25rem); font-weight: 650; line-height: 1.15; letter-spacing: -.02em; color: var(--ink); }
.footer-headline span { display: block; color: var(--brand); }
.footer-cta-actions { display: flex; flex-wrap: wrap; gap: var(--s3); }
.footer-main { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: var(--s10) var(--s8); padding-block: var(--s12); }
.footer-logo { height: 30px; width: auto; }
.footer-address { font-style: normal; line-height: 1.7; color: var(--text-2); margin-top: var(--s5); }
.footer-email { display: inline-block; margin-top: var(--s3); color: var(--ink); font-weight: 500; border-bottom: 1px solid rgba(253,83,5,.7); padding-bottom: 1px; text-decoration: none !important; transition: color .15s; }
.footer-email:hover { color: var(--brand-700); }
.footer-col strong { display: block; margin-bottom: var(--s3); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.footer-col a { display: block; padding: 6px 0; color: var(--text-2); text-decoration: none !important; transition: color .15s, transform .15s; }
@media (hover: hover) { .footer-col a:hover { color: var(--brand-700); transform: translateX(3px); } }
.footer a:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3) var(--s10); padding-block: var(--s6) var(--s8); border-top: 1px solid var(--border); font-size: var(--fs-xs); line-height: 1.6; color: var(--text-3); }
.footer-copy { white-space: nowrap; }
.footer-legal { margin: 0; flex: 1 1 320px; max-width: 640px; text-align: right; }
@media (max-width: 860px) {
  .footer-main { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .footer-legal { text-align: left; flex-basis: 100%; max-width: none; }
}
@media (max-width: 560px) {
  .footer-cta { padding-block: var(--s12) var(--s8); }
  .footer-cta-actions { width: 100%; } .footer-cta-actions .btn { flex: 1 1 0; padding-inline: var(--s3); }
  .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-block: var(--s8); gap: var(--s8) var(--s6); }
}
@media (prefers-reduced-motion: reduce) { .footer-col a, .footer-col a:hover { transition: none; transform: none; } }
.legal-note { font-size: var(--fs-xs); color: var(--text-3); max-width: 80ch; }
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: var(--s12) var(--s4) var(--s10); background: radial-gradient(900px 500px at 85% -10%, rgba(253,83,5,.10), transparent 60%), radial-gradient(700px 400px at -10% 110%, rgba(15,17,21,.06), transparent 60%), var(--bg); }
.auth-logo img { height: 30px; width: auto; margin-bottom: var(--s10); }
.auth-card { position: relative; overflow: hidden; width: 100%; max-width: 480px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--sh-2); padding: var(--s10) var(--s10) var(--s8); }
.auth-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--brand), var(--brand-600)); }
.auth-card h1 { font-size: var(--fs-2xl); }
.auth-card-wide { max-width: 760px; }
.auth-card fieldset { border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s6); }
@media (max-width: 640px) { .auth-card fieldset > legend { padding: 0; } .auth-card fieldset { border: 0; border-radius: 0; padding: 0; } .auth-card fieldset + fieldset { border-top: 1px solid var(--border); padding-top: var(--s5); } }
.auth-card legend { padding: 0 var(--s2); margin: 0; font-size: var(--fs-md); font-weight: 650; }
.auth-foot { margin-top: var(--s8); font-size: var(--fs-xs); color: var(--text-3); text-align: center; max-width: 60ch; }
.auth-foot a { color: var(--text-2); }
@media (max-width: 640px) { .auth { padding: var(--s6) var(--s4); } .auth-card { padding: var(--s6) var(--s5); } .auth-logo img { margin-bottom: var(--s6); } }
.prose { max-width: 76ch; } .prose h2 { margin-top: var(--s8); } .prose li { margin-bottom: 6px; }

/* ---- prototype bar (DEBUG only) ---------------------------------------- */
.proto-bar { position: fixed; bottom: 0; left: 0; right: 0; background: #111; color: #ddd; font-size: 12px; padding: 6px 12px; display: flex; gap: 12px; align-items: center; z-index: 90; overflow-x: auto; }
.proto-bar a { color: #fff; opacity: .7; white-space: nowrap; } .proto-bar a.is-active { opacity: 1; color: var(--brand); }
.signature-pad { border: 1px solid var(--border-strong); border-radius: var(--r-md); background: #fff; touch-action: none; width: 100%; height: 180px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--s2); }
.photo-grid figure { margin: 0; position: relative; aspect-ratio: 4/3; border-radius: var(--r-md); overflow: hidden; background: var(--n100); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid figcaption { position: absolute; bottom: 0; left: 0; right: 0; font-size: 10px; padding: 4px 6px; background: rgba(0,0,0,.55); color: #fff; }
@media print { .sidebar, .main-header, .proto-bar, .toasts, .btn { display: none !important; } .app { display: block; } .main-body { padding: 0; } }

/* ---- overflow guards ---------------------------------------------------- */
.grid > * { min-width: 0; }
small.mono, .kv dd .mono { word-break: break-all; }

/* ---- inspection photos with damage pins ---------------------------------- */
.photo-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s3); }
.photo-slot { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); position: relative; }
.photo-slot-pick { display: flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 44px; padding: var(--s2) var(--s3); border: 1px dashed var(--border-strong); border-radius: var(--r-md); color: var(--text-2); font-weight: 600; cursor: pointer; text-align: center; position: relative; }
.photo-slot-pick:hover { border-color: var(--brand); color: var(--brand-700); background: var(--brand-50); }
.photo-slot-pick input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.pin-stage { position: relative; display: block; line-height: 0; border-radius: var(--r-md); overflow: hidden; background: var(--n100); }
.pin-stage[hidden] { display: none; }
.pin-stage img { width: 100%; height: auto; display: block; cursor: crosshair; }
a.pin-stage img { cursor: zoom-in; }
.pin { position: absolute; transform: translate(-50%, -50%); min-width: 26px; height: 26px; padding: 0 6px; border-radius: var(--r-full); background: var(--brand); color: #fff; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); font: 700 12px/22px var(--font); text-align: center; pointer-events: none; }
.pin-pending { background: var(--ink); }
.pin-inline { position: static; transform: none; display: inline-block; box-shadow: none; border: 0; line-height: 26px; }
.pin-picker { display: flex; flex-wrap: wrap; gap: var(--s1); padding: var(--s2); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--sh-2); }
.pin-picker[hidden] { display: none; }
.pin-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.pin-list[hidden] { display: none; }
.pin-list li { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.pin-list li .input { flex: 1 1 180px; min-height: 36px; }
.pin-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s3); }
.pin-figure { margin: 0; display: flex; flex-direction: column; gap: var(--s1); }
.pin-figure figcaption { font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); }
.checklist { list-style: none; margin: 0 0 var(--s2); padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); }
.checklist li { display: flex; align-items: center; gap: var(--s2); }
.checklist .is-done { color: var(--success); }
.checklist .is-todo { color: var(--text-2); }
.checklist .is-todo svg { color: var(--danger); }

/* ---- legal pages (shared with the pre-launch site) ---------------------- */
.legal-body p, .legal-body li { line-height: 1.65; }
.legal-body [id] { scroll-margin-top: calc(var(--topbar-h) + var(--s4)); }
.legal-callout { padding: var(--s4); border: 1px solid #f5dea6; background: var(--warning-bg); border-radius: var(--r-md); color: #6e4200; }
.legal-body .table-wrap { margin: var(--s4) 0 var(--s6); }
.legal-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border); }
.legal-table thead th { background: var(--n50); font-weight: 600; }
.legal-table tbody th { font-weight: 600; }
.legal-table tbody tr:last-child th, .legal-table tbody tr:last-child td { border-bottom: 0; }
