:root {
  color-scheme: light;
  --canvas: #f7f9fc;
  --surface: #fff;
  --ink: #0b1c35;
  --muted: #4c5f7a;
  --line: #dce5f3;
  --control-line: #a8b8ca;
  --nav: #0b1c35;
  --nav-muted: #cbd9ee;
  --nav-line: #2d4367;
  --accent: #1d57d2;
  --accent-ink: #fff;
  --accent-hover: #154bb6;
  --workspace-tint: #edf3fe;
  --hero-fill: linear-gradient(110deg, #0b1c35, #172f50);
  --green: #126b48;
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button, a, select, input[type=checkbox] { -webkit-tap-highlight-color: transparent; }
button, select, input[type=checkbox] { cursor: pointer; }
button:disabled { cursor: default; opacity: .52; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.9rem, 4vw, 3.1rem); line-height: 1.03; letter-spacing: -.055em; }
h2 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -.025em; }
h3 { font-size: 1.02rem; }
a { color: inherit; }
.icon { display: inline-block; width: 18px; height: 18px; flex: 0 0 auto; vertical-align: middle; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 1.24rem; font-weight: 750; letter-spacing: -.025em; white-space: nowrap; }
.brand-logo { display: block; width: 140px; max-width: 100%; height: auto; }
.mobile-brand { display: none; }
.shell { min-height: 100dvh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { min-height: 100dvh; position: sticky; top: 0; align-self: start; display: flex; flex-direction: column; color: #f6f8fc; background: var(--nav); padding: 25px 16px 18px; }
.sidebar .brand { margin: 0 7px 29px; }
.sidebar :focus-visible { outline-color: #d7bbfb; }
.workspace { display: flex; align-items: center; gap: 10px; padding: 10px; margin: 0 0 25px; border: 1px solid var(--nav-line); border-radius: 10px; }
.workspace > div { min-width: 0; }
.workspace strong, .workspace small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace small, .sidebar .eyebrow { color: var(--nav-muted); }
.workspace-avatar { display: grid; place-items: center; border-radius: 7px; background: #3c2e4b; color: #ead9fb; width: 31px; height: 31px; flex: 0 0 auto; font-weight: 700; }
.sidebar .eyebrow { padding: 0 11px; margin: 3px 0 9px; }
.eyebrow { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .125em; }
.nav-group { display: grid; gap: 4px; margin-bottom: 22px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 8px; background: transparent; color: #e2daeb; text-align: left; text-decoration: none; padding: 10px 11px; font-weight: 620; }
.nav-item .icon { color: var(--nav-muted); }
.nav-item:hover { color: white; background: #30273c; }
.nav-item[aria-current=page] { color: #281b3a; background: var(--workspace-tint); }
.nav-item[aria-current=page] .icon { color: var(--accent); }
.sidebar-bottom { margin-top: auto; border-top: 1px solid var(--nav-line); padding-top: 13px; }
.sidebar-bottom .nav-item { font-size: .87rem; }
.header { position: relative; display: flex; justify-content: space-between; align-items: center; min-height: 65px; gap: 14px; padding: 12px clamp(16px, 3vw, 40px); background: var(--surface); border-bottom: 1px solid var(--line); }
.header-main, .header-actions { display: flex; align-items: center; gap: 12px; }
.header-main .icon { color: var(--muted); width: 15px; }
.header-actions { flex-wrap: wrap; }
.header-main strong { white-space: nowrap; }
.header-balance { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; white-space: nowrap; }
.header-balance .icon { color: var(--accent); width: 16px; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 100px; padding: 4px 9px; font-size: .73rem; font-weight: 740; white-space: nowrap; background: var(--workspace-tint); color: #522b85; }
.badge .icon { width: 13px; height: 13px; }
.badge.good { background: #e4f5ec; color: var(--green); }
.badge.warn { background: #fff0e2; color: #833f17; }
.main { width: 100%; max-width: 1460px; margin-inline: auto; padding: 27px clamp(16px, 3vw, 40px) 42px; }
.hero { position: relative; overflow: hidden; isolation: isolate; border-radius: 14px; background: var(--hero-fill); color: #fff; padding: 27px 31px 29px; margin-bottom: 21px; }
.hero::after { position: absolute; content: ""; inset: 0; z-index: -1; opacity: .31; pointer-events: none; background: url('route.svg?v=purple-1') right center / auto 125% no-repeat; }
.hero .eyebrow { color: #e8d9f7; margin: 0 0 9px; }
.hero h1, .hero p { max-width: 600px; }
.hero p { color: #e8d9f7; margin-top: 12px; }
.catalog-hero { background: linear-gradient(110deg, #21192e, #392653); }
.catalog-hero::after { opacity: .35; }
.catalog-hero .eyebrow { color: #e2ccff; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.card-pad { padding: 18px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 18px; }
.section-head p { margin-top: 2px; color: var(--muted); }
.filters { margin-bottom: 18px; }
.filters .section-head { padding-bottom: 12px; }
.filter-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 1fr)) auto; align-items: end; gap: 12px; padding: 0 18px 16px; }
.field { display: grid; gap: 5px; min-width: 0; color: #514661; font-weight: 670; font-size: .83rem; }
.field :is(input, select, textarea) { width: 100%; min-width: 0; color: var(--ink); background: var(--surface); border: 1px solid var(--control-line); border-radius: 8px; padding: 9px 10px; font-weight: 500; }
.field textarea { resize: vertical; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 37px; padding: 7px 13px; border-radius: 8px; border: 1px solid var(--control-line); text-decoration: none; background: white; color: #382b46; font-weight: 710; white-space: nowrap; }
.btn:hover { background: #f6f0fc; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.dark { background: #251d30; color: white; border-color: #251d30; }
.btn.dark:hover { background: #3c2b4d; border-color: #3c2b4d; }
.btn.quiet { color: var(--muted); border-color: transparent; padding-inline: 7px; }
.btn.sm { min-height: 31px; padding: 4px 9px; font-size: .82rem; }
.btn .icon { width: 16px; height: 16px; }
.muted { color: var(--muted); }
.flex { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.stack { display: grid; gap: 14px; }
.table-wrap { overflow: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; white-space: nowrap; }
th, td { border-top: 1px solid var(--line); padding: 11px 13px; }
th:first-child, td:first-child { padding-left: 18px; }
th:last-child, td:last-child { padding-right: 18px; }
th { background: #f8f4fc; color: #5b4d6b; font-size: .76rem; font-weight: 760; }
td { font-size: .86rem; }
tbody tr:hover, tbody tr.selected { background: #faf5ff; }
input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); vertical-align: middle; }
.person { display: flex; align-items: center; gap: 9px; font-weight: 730; }
.avatar { width: 31px; height: 31px; border-radius: 8px; background: var(--workspace-tint); color: #59348a; display: grid; place-items: center; font-size: .73rem; font-weight: 800; }
.foot { border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 17px; }
.tray { position: sticky; bottom: 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 15px; margin-top: 13px; border-radius: 10px; background: #291e36; color: white; box-shadow: 0 7px 22px #21182d38; z-index: 2; }
.tray .muted { color: #e8d9f7; }
.tray .quiet { color: white; background: transparent; }
.tray .quiet:hover { background: #493656; }
.tray strong { font-variant-numeric: tabular-nums; }
.empty { padding: 30px 18px; text-align: center; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.stat .eyebrow { color: var(--muted); }
.stat strong { font-size: 1.8rem; line-height: 1.35; letter-spacing: -.04em; }
.admin-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; }
.admin-metrics .stat strong { display: block; font-variant-numeric: tabular-nums; }
.admin-metrics .stat .muted { font-size: .79rem; }
.admin-records table { font-variant-numeric: tabular-nums; }
.owner-operator-catalog > * { min-width: 0; }
.owner-operator-filters summary { width: max-content; cursor: pointer; color: var(--muted); font-size: .83rem; font-weight: 700; }
.owner-operator-filters .research-secondary { margin-top: 9px; }
.fleet-company-record { width: clamp(11rem, 34vw, 20rem); white-space: normal; overflow-wrap: anywhere; }
.fleet-company-address { display: block; margin-top: 3px; color: var(--muted); font-size: .81rem; line-height: 1.35; white-space: pre-line; }
.fleet-company-record .btn { margin-top: 7px; }
.fleet-map > summary { padding: 12px 16px; cursor: pointer; font-weight: 700; }
.fleet-map-content { display: grid; gap: 12px; padding: 0 12px 12px; }
.fleet-map-content > .muted { margin: 4px; }
.admin-row-actions, .admin-account-bar { display: flex; align-items: center; gap: 8px; }
.admin-account-bar { justify-content: space-between; flex-wrap: wrap; }
.admin-row-meta { display: block; color: var(--muted); }
.admin-notes { min-width: 18ch; max-width: 35ch; white-space: normal; overflow-wrap: anywhere; }
.packs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.pack { padding: 16px; }
.pack h3 { margin-bottom: 9px; }
.pack strong { display: block; font-size: 1.75rem; letter-spacing: -.04em; }
.pack .btn { width: 100%; margin-top: 13px; }
.alert { padding: 11px 13px; background: var(--workspace-tint); border: 1px solid var(--control-line); border-radius: 8px; color: #4b3265; }
.credit-estimate { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(280px, 1fr) minmax(400px, 1fr); }
.auth-aside { background: url('route.svg?v=purple-1') right bottom / auto 70% no-repeat, var(--hero-fill); color: white; padding: clamp(22px, 6vw, 80px); }
.auth-aside .brand { margin-bottom: clamp(38px, 17vh, 180px); }
.auth-aside p { color: #e8d9f7; margin-top: 16px; max-width: 370px; }
.auth-content { display: grid; align-items: center; padding: 28px clamp(18px, 6vw, 80px); }
.auth-content > div { width: 100%; max-width: 460px; margin-inline: auto; }
.auth-content h2 { font-size: 1.75rem; }
.mobile-nav { display: none; }
dialog { width: min(calc(100% - 30px), 550px); max-height: calc(100dvh - 30px); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); padding: 0; box-shadow: 0 18px 65px #21182d60; }
dialog::backdrop { background: #1a162387; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 13px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.dialog-body { padding: 18px; }
.dialog-body > p { color: var(--muted); }
.dialog-foot { display: flex; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
#toast:not(:empty) { position: fixed; right: 18px; bottom: 18px; max-width: min(420px, calc(100vw - 36px)); padding: 12px 16px; background: var(--nav); color: #fff; border-radius: 9px; box-shadow: 0 5px 20px #21182d40; z-index: 4; }
.form-error:empty { display: none; }
.form-error { color: #9d301c; font-weight: 650; }
.support-card {
  width: min(100%, 640px);
  margin: clamp(0px, 3vw, 28px) auto 0;
  padding: clamp(18px, 5vw, 32px);
  box-shadow: 0 2px 5px rgb(11 28 53 / 5%);
}
.support-card h1 { font-size: clamp(1.45rem, 3vw, 1.85rem); letter-spacing: -.035em; margin-bottom: 22px; }
.support-form fieldset { display: grid; gap: 15px; border: 0; margin: 0; min-width: 0; padding: 0; }
.support-name-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.support-form .field { gap: 6px; }
.shell .support-form .field :is(input, select, textarea) { min-height: 44px; font-size: 1rem; padding: 10px 12px; }
.support-form textarea { line-height: 1.5; }
.shell .support-form .support-submit { width: 100%; min-height: 46px; border-radius: 8px; }
.support-receipt:empty { display: none; }
.support-receipt { background: #e4f5ec; color: var(--green); border-radius: 8px; margin-top: 14px; padding: 10px 12px; font-weight: 670; }
.support-email { color: var(--muted); font-size: .9rem; text-align: center; margin-top: 16px; overflow-wrap: anywhere; }
.support-email a { color: var(--accent); }
.support-inbox { width: min(100%, 870px); margin-inline: auto; display: grid; gap: 14px; }
.support-inbox > header p { margin-top: 6px; }
.support-ticket { padding: clamp(15px, 3vw, 22px); display: grid; gap: 12px; overflow-wrap: anywhere; }
.support-ticket-header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.support-ticket-header p { margin-top: 3px; }
.support-ticket-message { white-space: pre-wrap; }
.support-ticket-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
@media (max-width: 480px) {
  .support-name-fields { grid-template-columns: 1fr; gap: 15px; }
  .shell .support-form .field :is(input, select, textarea) { font-size: 16px; }
}
@media (max-width: 1050px) {
  .shell { grid-template-columns: 194px minmax(0, 1fr); }
  .packs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  .shell { display: block; }
  .sidebar { display: none; }
  .mobile-nav { display: inline-block; padding: 7px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; max-width: 148px; }
  .header-main > span, .header-main > .icon, .header-main > strong { display: none; }
  .header { min-height: 56px; }
  .main { padding-top: 16px; }
  .hero { padding: 23px 19px; }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-submit { grid-column: 1 / -1; }
  .auth { display: block; }
  .auth-aside { padding: 25px 20px; background-size: auto 100%; }
  .auth-aside .brand { margin-bottom: 19px; }
}
@media (max-width: 460px) {
  .header-actions { gap: 6px; }
  .header-actions .demo-label { display: none; }
  .header-actions .btn { padding: 5px 8px; font-size: .81rem; }
  .stats { grid-template-columns: 1fr; gap: 7px; }
  .section-head, .card-pad { padding-inline: 13px; }
  .filter-grid { padding-inline: 13px; gap: 10px; }
}
