:root {
  --bg: #111313;
  --surface: #191c1b;
  --surface-2: #202322;
  --surface-3: #272b2a;
  --line: rgba(233, 243, 239, .1);
  --line-strong: rgba(233, 243, 239, .17);
  --text: #f4f6f3;
  --muted: #99a19e;
  --dim: #707875;
  --accent: #c6ef5d;
  --accent-deep: #9dc837;
  --yellow: #ffcf57;
  --blue: #7aa7ff;
  --green: #71d99a;
  --purple: #c7a6ff;
  --danger: #ff8d83;
  --mono: "DM Mono", monospace;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
a { color: inherit; text-decoration: none; }
html { background: var(--bg); }
body { min-width: 320px; margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body.auth-pending > * { visibility: hidden; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.icon { display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; flex: 0 0 auto; }
.icon svg { width: 100%; height: 100%; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; fill: none; stroke-width: 1.8; }
.app-shell { min-height: 100vh; }
.rail { display: none; }
.main-content { padding: 28px 18px 106px; max-width: 1280px; margin: auto; }
.view { display: none; animation: enter .28s ease both; }
.view.active { display: block; }
@keyframes enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.topbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 24px; }
.topbar h1 { font-size: 29px; line-height: 1.05; letter-spacing: -.055em; margin: 5px 0 0; font-weight: 600; }
.topbar h1 span { color: var(--accent); }
.eyebrow { color: var(--muted); font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .11em; line-height: 1.2; margin: 0; text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-button, .avatar, .draft-button, .back-button, .modal-close { background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; position: relative; }
.icon-button i { width: 7px; height: 7px; background: var(--accent); position: absolute; border: 1.5px solid var(--surface); border-radius: 50%; top: 7px; right: 7px; }
.icon-button i[hidden] { display: none; }
.notification-count { position: absolute; display: grid; place-items: center; min-width: 16px; height: 16px; padding: 0 3px; top: -4px; right: -6px; border-radius: 9px; color: #172009; background: var(--accent); border: 1.5px solid var(--surface); font-family: var(--mono); font-size: 8px; line-height: 1; }
.avatar { width: 40px; height: 40px; border-radius: 50%; color: var(--bg); background: var(--accent); border-color: var(--accent); font-family: var(--mono); font-size: 11px; font-weight: 500; }
.command-strip { display: none; }
.metrics-grid { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.metric-card { min-height: 138px; padding: 17px 15px; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; display: flex; flex-direction: column; justify-content: space-between; }
.metric-card.featured { background: var(--accent); color: #18200b; border-color: var(--accent); }
.metric-top { display: flex; justify-content: space-between; align-items: center; }
.metric-label { font-family: var(--mono); color: var(--muted); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.featured .metric-label, .featured .metric-foot { color: rgba(24, 32, 11, .68); }
.metric-icon { color: var(--muted); opacity: .8; }
.featured .metric-icon { color: #18200b; }
.metric-card strong { font-size: 24px; letter-spacing: -.05em; line-height: 1; font-weight: 600; white-space: nowrap; }
.metric-foot { color: var(--muted); font-size: 11px; line-height: 1.25; }
.metric-foot b { color: var(--text); font-weight: 600; }
.trend { display: inline-flex; align-items: center; gap: 2px; margin-right: 5px; font-family: var(--mono); font-size: 10px; }
.trend .icon { width: 12px; height: 12px; }
.trend.up { color: var(--accent-deep); }
.featured .trend.up { color: #526f14; }
.dashboard-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 24px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 19px; }
.panel-header, .section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.panel h2, .section-heading h2, .form-intro h2, .ledger-section h2 { font-size: 18px; letter-spacing: -.035em; margin: 5px 0 0; line-height: 1; }
.text-button { padding: 0; border: 0; background: transparent; color: var(--accent); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.text-button .icon { width: 15px; height: 15px; }
.breakdown-content { display: flex; align-items: center; gap: 24px; margin-top: 20px; }
.donut-wrap { flex: 0 0 123px; }
.donut { width: 123px; height: 123px; border-radius: 50%; position: relative; background: conic-gradient(var(--surface-3) 0 100%); display: grid; place-items: center; transition: background .4s ease; }
.donut::before { content: ""; position: absolute; width: 88px; height: 88px; background: var(--surface); border-radius: 50%; }
.donut-centre { position: relative; z-index: 1; text-align: center; display: flex; flex-direction: column; }
.donut-centre strong { font-size: 28px; letter-spacing: -.07em; }
.donut-centre span { color: var(--muted); font-size: 9px; font-family: var(--mono); letter-spacing: .1em; }
.breakdown-list { display: grid; gap: 13px; flex: 1; }
.breakdown-item { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.breakdown-name { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.breakdown-dot { height: 7px; width: 7px; border-radius: 50%; }
.breakdown-item strong { font-family: var(--mono); color: var(--text); font-weight: 500; }
.opportunity-panel { background: #e5e8e2; color: #18201d; }
.opportunity-panel .eyebrow { color: #718078; }
.opportunity-panel .focus-icon { color: #3c4942; }
.opportunity-body { display: flex; gap: 14px; margin: 24px 0 22px; }
.priority-number { color: #b4bdaf; font-family: var(--mono); font-size: 28px; line-height: .9; }
.opportunity-title { font-weight: 600; font-size: 16px; letter-spacing: -.025em; margin: 0 0 5px; }
.opportunity-body p:not(.opportunity-title) { color: #65716b; font-size: 12px; line-height: 1.4; margin: 0; }
.secondary-button, .primary-button, .small-primary, .advance-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 9px; min-height: 45px; padding: 0 16px; font-weight: 600; font-size: 13px; }
.secondary-button { background: #202724; color: #edf1e9; width: 100%; }
.primary-button { color: #172009; background: var(--accent); }
.primary-button .icon, .secondary-button .icon, .advance-button .icon { width: 16px; height: 16px; }
.section-heading { margin: 30px 0 13px; align-items: center; }
.attention-list { display: grid; gap: 9px; }
.attention-card { display: grid; grid-template-columns: 42px 1fr auto; gap: 11px; align-items: center; padding: 12px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; cursor: pointer; }
.mini-symbol, .vehicle-symbol { display: grid; place-items: center; color: var(--bg); background: #f0dfc9; font-family: var(--mono); font-weight: 500; }
.mini-symbol { height: 42px; width: 42px; border-radius: 9px; font-size: 14px; }
.attention-title { font-size: 13px; font-weight: 600; margin: 0 0 3px; letter-spacing: -.02em; }
.attention-meta { font-size: 11px; color: var(--muted); margin: 0; }
.attention-card .icon { color: var(--muted); width: 16px; }
.filter-row { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; padding-bottom: 7px; margin: -5px -18px 16px; padding-left: 18px; padding-right: 18px; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip { flex: 0 0 auto; background: var(--surface); color: var(--muted); border: 1px solid var(--line); border-radius: 20px; height: 33px; padding: 0 12px; font-size: 11px; font-weight: 500; }
.filter-chip.active { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.filter-chip span { font-family: var(--mono); opacity: .65; margin-left: 3px; }
.inventory-board { display: grid; gap: 12px; }
.vehicle-card { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; cursor: pointer; transition: border-color .2s, transform .2s; }
.vehicle-card:active { transform: scale(.985); }
.vehicle-card-top { padding: 16px 16px 13px; display: flex; align-items: flex-start; gap: 13px; }
.vehicle-symbol { height: 48px; width: 48px; border-radius: 11px; font-size: 18px; flex: 0 0 48px; }
.vehicle-card-title { min-width: 0; flex: 1; }
.vehicle-card-title h2 { font-size: 16px; margin: 2px 0 5px; line-height: 1.1; letter-spacing: -.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vehicle-card-title p { color: var(--muted); font-size: 11px; margin: 0; }
.vehicle-card-footer { border-top: 1px solid var(--line); padding: 12px 16px 14px; display: grid; gap: 9px; }
.vehicle-card-metrics { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plate { color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .07em; }
.days-badge { color: var(--text); font-family: var(--mono); font-size: 10px; padding: 4px 7px; border-radius: 5px; background: var(--surface-3); white-space: nowrap; }
.status-badge { font-family: var(--mono); font-size: 9px; letter-spacing: .045em; text-transform: uppercase; padding: 5px 7px; border-radius: 5px; border: 0; color: var(--text); white-space: nowrap; }
.status-sourced { background: rgba(199, 166, 255, .15); color: var(--purple); }
.status-progress { background: rgba(255, 207, 87, .14); color: var(--yellow); }
.status-listed { background: rgba(122, 167, 255, .15); color: var(--blue); }
.status-sold { background: rgba(113, 217, 154, .15); color: var(--green); }
.recon-row { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10px; }
.recon-row strong { color: var(--text); font-family: var(--mono); font-weight: 400; }
.progress-line, .budget-track, .progress-track { height: 4px; width: 100%; background: var(--surface-3); border-radius: 10px; overflow: hidden; }
.progress-line > span, .budget-track > span, .progress-track > span { display: block; height: 100%; border-radius: inherit; transition: width .3s ease; }
.progress-line > span, .progress-track > span { background: var(--accent); }
.vehicle-card.over-budget .progress-line > span, .budget-track.over-budget > span { background: var(--danger); }
.compact-add .icon { width: 16px; }

.add-view { max-width: 660px; }
.draft-button, .back-button { height: 37px; border-radius: 8px; color: var(--muted); font-size: 11px; padding: 0 11px; }
.form-progress { margin: 7px 0 30px; }
.progress-meta { display: flex; justify-content: space-between; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .03em; margin-bottom: 9px; }
.progress-meta span:last-child { color: var(--text); }
.form-progress-bar { width: 33.33%; }
.form-step { display: none; }
.form-step.active { display: block; animation: enter .22s ease both; }
.form-intro { margin-bottom: 22px; }
.form-intro h2 { font-size: 22px; }
.form-intro p { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 9px 0 0; }
.form-grid { display: grid; gap: 14px; }
.two-col { grid-template-columns: 1fr; }
label { display: grid; gap: 7px; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
label span { color: var(--dim); font-size: 9px; letter-spacing: 0; text-transform: none; }
input, select { width: 100%; height: 52px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; color: var(--text); padding: 0 13px; outline: none; font-family: var(--sans); font-size: 15px; letter-spacing: 0; text-transform: none; transition: border-color .2s, background .2s; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 22px, calc(100% - 13px) 22px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
input::placeholder { color: #5d6662; }
input:focus, select:focus { border-color: rgba(198, 239, 93, .65); background: #1e221e; }
input[type="date"] { color-scheme: dark; }
.full-label { margin-top: 14px; }
.form-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 31px; }
.form-actions .primary-button { min-width: 145px; margin-left: auto; }
.back-button { visibility: hidden; min-width: 80px; }
.back-button.visible { visibility: visible; }
.form-callout { background: rgba(198, 239, 93, .08); border: 1px solid rgba(198, 239, 93, .14); border-radius: 10px; display: flex; align-items: flex-start; gap: 10px; padding: 13px; color: var(--muted); margin-top: 17px; }
.form-callout .icon { color: var(--accent); width: 16px; margin-top: 1px; }
.form-callout p { margin: 0; font-size: 12px; line-height: 1.45; }

.bottom-nav { position: fixed; z-index: 20; bottom: 0; left: 0; right: 0; height: calc(72px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(25, 28, 27, .94); border-top: 1px solid var(--line); backdrop-filter: blur(15px); }
.bottom-nav-item { border: 0; background: transparent; color: var(--dim); padding: 9px 5px 7px; display: flex; gap: 4px; align-items: center; flex-direction: column; justify-content: center; font-family: var(--sans); font-size: 10px; font-weight: 500; }
.bottom-nav-item .icon { width: 19px; height: 19px; }
.bottom-nav-item.active { color: var(--accent); }
.plus-circle { height: 31px; width: 31px; display: grid; place-items: center; background: var(--accent); color: #172009; border-radius: 50%; margin-top: -14px; box-shadow: 0 2px 0 3px var(--surface); }
.plus-circle .icon { width: 17px; height: 17px; }
.add-action { color: var(--text); }

.profile-overlay, .modal-overlay { position: fixed; display: flex; z-index: 50; inset: 0; background: rgba(2, 4, 3, .64); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.profile-overlay { align-items: flex-end; }
.profile-overlay.open, .modal-overlay.open { opacity: 1; pointer-events: auto; }
.vehicle-profile { height: min(91vh, 820px); width: 100%; background: var(--bg); border-radius: 20px 20px 0 0; transform: translateY(100%); transition: transform .35s cubic-bezier(.2,.8,.2,1); overflow-y: auto; padding: 18px 18px calc(82px + env(safe-area-inset-bottom)); }
.profile-overlay.open .vehicle-profile { transform: translateY(0); }
.profile-top { display: flex; align-items: center; justify-content: space-between; }
.back-profile { border: 0; padding: 5px 0; background: none; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.back-profile .icon { width: 16px; }
.profile-top .icon-button { background: var(--surface); height: 36px; width: 36px; }
.profile-top .icon-button i { display: none; }
.profile-hero { margin-top: 26px; display: grid; grid-template-columns: 54px 1fr; gap: 12px; position: relative; }
.profile-hero .vehicle-symbol { height: 54px; width: 54px; }
.profile-heading h1 { font-size: 21px; letter-spacing: -.045em; margin: 4px 0; line-height: 1.05; }
.profile-heading > p:last-child { color: var(--muted); font-size: 11px; margin: 0; }
.status-control { grid-column: 1 / -1; position: relative; margin-top: 5px; }
.status-control .status-badge { display: inline-flex; gap: 6px; align-items: center; padding: 8px 10px; font-size: 10px; }
.status-control .status-badge .icon { width: 14px; height: 14px; }
.status-menu { display: none; position: absolute; z-index: 2; min-width: 270px; top: calc(100% + 7px); left: 0; background: #292d2b; border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.35); padding: 5px; }
.status-menu.open { display: grid; }
.status-option { text-align: left; padding: 10px; border: 0; background: transparent; border-radius: 6px; color: var(--text); font-size: 11px; }
.status-option:hover { background: var(--surface-3); }
.profile-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-top: 24px; }
.profile-tab { background: transparent; border: 0; padding: 0 0 11px; font-size: 12px; color: var(--muted); position: relative; }
.profile-tab.active { color: var(--text); font-weight: 600; }
.profile-tab.active::after { content: ""; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: var(--accent); }
.profile-content { display: none; }
.profile-content.active { display: block; }
.profit-hero { padding: 24px 0 21px; }
.profit-row { display: flex; gap: 10px; align-items: center; margin-top: 7px; }
.profit-row strong { font-size: 37px; line-height: 1; letter-spacing: -.065em; }
.roi-pill { font-family: var(--mono); font-size: 10px; padding: 5px 7px; background: rgba(113, 217, 154, .14); color: var(--green); border-radius: 5px; }
.roi-pill.negative { color: var(--danger); background: rgba(255,141,131,.12); }
.profit-hero > p:last-child { color: var(--muted); margin: 8px 0 0; font-size: 11px; }
.mini-metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; }
.mini-metrics > div { padding: 0 10px; border-right: 1px solid var(--line); min-width: 0; }
.mini-metrics > div:first-child { padding-left: 0; }
.mini-metrics > div:last-child { border-right: 0; }
.mini-metrics span { display: block; color: var(--muted); font-family: var(--mono); font-size: 9px; line-height: 1.2; text-transform: uppercase; }
.mini-metrics strong { display: block; margin-top: 6px; font-size: 15px; letter-spacing: -.035em; white-space: nowrap; }
.ledger-section { margin-top: 26px; }
.ledger-section .section-heading { margin: 0 0 15px; }
.small-primary { min-height: 34px; padding: 0 11px; font-size: 11px; color: #172009; background: var(--accent); }
.small-primary .icon { width: 14px; }
.budget-block { padding: 13px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.budget-block > div:first-child { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; color: var(--muted); font-size: 11px; }
.budget-block strong { color: var(--text); font-family: var(--mono); font-weight: 400; }
.budget-track { height: 5px; }
.budget-track > span { background: var(--accent); }
.budget-block p { color: var(--accent); font-size: 10px; margin: 8px 0 0; }
.budget-block p.over-budget { color: var(--danger); }
.expense-list { margin-top: 8px; border-top: 1px solid var(--line); }
.expense-row { display: grid; grid-template-columns: 1fr auto; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.expense-title { font-size: 13px; font-weight: 500; margin: 0; }
.expense-source { color: var(--muted); font-size: 10px; margin: 4px 0 0; }
.expense-value { text-align: right; font-family: var(--mono); font-size: 12px; }
.payment-status { display: inline-flex; justify-self: end; font-family: var(--mono); font-size: 9px; letter-spacing: .05em; text-transform: uppercase; padding: 4px 5px; margin-top: 2px; border-radius: 4px; }
.payment-status.paid { color: var(--green); background: rgba(113,217,154,.12); }
.payment-status.pending { color: var(--yellow); background: rgba(255,207,87,.12); }
.expense-empty { color: var(--muted); text-align: center; font-size: 12px; padding: 23px 0; }
.details-grid { padding-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 0; }
.detail-field { padding: 14px 8px 14px 0; border-bottom: 1px solid var(--line); }
.detail-field:nth-child(odd) { border-right: 1px solid var(--line); padding-right: 12px; }
.detail-field:nth-child(even) { padding-left: 12px; }
.detail-field span { color: var(--muted); display: block; font-family: var(--mono); font-size: 9px; text-transform: uppercase; }
.detail-field strong { display: block; margin-top: 5px; font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.sticky-profile-action { position: sticky; z-index: 3; bottom: -18px; margin: 26px -18px calc(-82px - env(safe-area-inset-bottom)); padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to bottom, rgba(17,19,19,.87), var(--bg) 30%); }
.advance-button { width: 100%; color: #172009; background: var(--accent); }
.modal-overlay { justify-content: center; align-items: flex-end; padding: 0; }
.expense-modal { background: #1b1e1d; border: 1px solid var(--line-strong); border-radius: 18px 18px 0 0; padding: 20px 18px calc(22px + env(safe-area-inset-bottom)); width: 100%; transform: translateY(105%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.modal-overlay.open .expense-modal { transform: translateY(0); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
.modal-header h2 { font-size: 21px; letter-spacing: -.045em; margin: 5px 0 0; }
.modal-close { height: 35px; width: 35px; padding: 0; display: grid; place-items: center; border-radius: 50%; }
.modal-close .icon { width: 17px; }
.expense-modal > label, .expense-modal .form-grid { margin-top: 14px; }
.full-button { width: 100%; margin-top: 20px; }
.toast { position: fixed; z-index: 100; bottom: 87px; left: 50%; transform: translate(-50%, 15px); color: var(--bg); background: var(--accent); padding: 10px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; box-shadow: 0 10px 24px rgba(0,0,0,.3); opacity: 0; pointer-events: none; transition: .25s ease; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 620px) {
  .main-content { padding: 38px 30px 105px; }
  .metrics-grid { grid-template-columns: repeat(4, 1fr); }
  .metric-card { min-height: 147px; padding: 19px; }
  .metric-card strong { font-size: 27px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr); }
  .opportunity-panel { min-height: 222px; }
  .inventory-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { grid-template-columns: 1fr 1fr; }
  .profile-overlay { align-items: center; justify-content: center; padding: 24px; }
  .vehicle-profile { width: min(690px, 100%); height: min(88vh, 800px); border-radius: 20px; padding: 22px 24px 90px; }
  .sticky-profile-action { bottom: -22px; margin: 26px -24px -90px; padding: 14px 24px 18px; }
  .modal-overlay { align-items: center; padding: 24px; }
  .expense-modal { width: min(480px, 100%); border-radius: 18px; padding: 22px; }
}

@media (min-width: 980px) {
  .app-shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); }
  .rail { position: fixed; inset: 0 auto 0 0; width: 224px; background: #151716; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 27px 16px 22px; }
  .brand { color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 15px; font-weight: 500; letter-spacing: .02em; padding: 0 8px; }
  .brand-mark { display: grid; place-items: center; width: 27px; height: 27px; color: #172009; background: var(--accent); border-radius: 7px; font-family: var(--sans); font-weight: 700; }
  .brand-slash { color: var(--accent); }
  .rail-nav { display: grid; gap: 5px; margin-top: 54px; }
  .nav-item { border: 0; background: transparent; color: var(--muted); border-radius: 8px; text-align: left; height: 43px; padding: 0 10px; display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 500; }
  .nav-item .icon { width: 17px; }
  .nav-item:hover { color: var(--text); }
  .nav-item.active { color: var(--accent); background: rgba(198,239,93,.08); }
  .rail-bottom { margin-top: auto; padding: 0 8px; }
  .vic-chip { display: inline-flex; gap: 6px; align-items: center; color: var(--accent); font-family: var(--mono); font-size: 9px; letter-spacing: .08em; }
  .pulse { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; display: inline-block; box-shadow: 0 0 0 0 rgba(198,239,93,.5); animation: pulse 1.8s infinite; }
  @keyframes pulse { 60% { box-shadow: 0 0 0 4px rgba(198,239,93,0); } 100% { box-shadow: 0 0 0 0 rgba(198,239,93,0); } }
  .rail-bottom p { color: var(--dim); font-family: var(--mono); font-size: 9px; line-height: 1.6; margin: 10px 0 0; }
  .main-content { grid-column: 2; padding: 42px 48px 60px; width: min(1240px, 100%); }
  .bottom-nav { display: none; }
  .topbar { margin-bottom: 32px; }
  .topbar h1 { font-size: 35px; }
  .command-strip { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 13px 14px 13px 17px; margin-bottom: 13px; display: flex; align-items: center; justify-content: space-between; }
  .command-copy .eyebrow { color: var(--accent); margin-bottom: 5px; }
  .command-copy p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
  .command-copy strong { color: var(--text); }
  .quick-add { min-height: 39px; font-size: 12px; }
  .attention-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .attention-card { min-height: 67px; }
  .inventory-board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vehicle-card:hover { border-color: rgba(198,239,93,.35); transform: translateY(-2px); }
  .filter-row { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
  .profile-overlay { justify-content: flex-end; padding: 0; }
  .vehicle-profile { width: min(600px, 48vw); height: 100vh; border-radius: 0; padding: 24px 28px 90px; }
  .sticky-profile-action { margin-left: -28px; margin-right: -28px; padding-left: 28px; padding-right: 28px; }
}

@media (max-width: 370px) { .metric-card { padding: 14px 12px; } .metric-card strong { font-size: 21px; } .metric-foot { font-size: 10px; } }

/* Cloudflare Pages additions: dedicated routes, account UI, and market research. */
.nav-item { text-decoration: none; }
.icon-button, .avatar { text-decoration: none; }
.bottom-nav-item { text-decoration: none; }
.vehicle-page .profile-overlay { position: static; min-height: 100vh; display: block; opacity: 1; pointer-events: auto; background: var(--bg); }
.vehicle-page .vehicle-profile { height: auto; min-height: 100vh; transform: none; border-radius: 0; }
.market-page { max-width: 1080px; }
.market-intro { background: linear-gradient(125deg, #242c20, #181b19 62%); border: 1px solid rgba(198,239,93,.18); border-radius: 15px; padding: 21px; margin-bottom: 14px; }
.market-intro .eyebrow { color: var(--accent); }
.market-intro h2 { font-size: 23px; letter-spacing: -.045em; margin: 8px 0; }
.market-intro p:last-child { color: var(--muted); max-width: 480px; font-size: 13px; line-height: 1.5; margin: 0; }
.compare-picker { display: grid; gap: 11px; padding: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; }
.compare-picker label { gap: 6px; }
.compare-picker select { height: 47px; }
.compare-vehicle-summary { display: flex; align-items: center; gap: 10px; min-width: 0; }
.compare-vehicle-summary .vehicle-symbol { height: 42px; width: 42px; border-radius: 9px; flex: 0 0 42px; }
.compare-vehicle-summary div { display: grid; gap: 3px; min-width: 0; }
.compare-vehicle-summary strong { font-size: 13px; }
.compare-vehicle-summary div span { color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compare-vehicle-summary a { margin-left: auto; color: var(--accent); font-size: 11px; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.compare-vehicle-summary svg, .source-link svg, .comparable-price a svg { height: 14px; width: 14px; }
.market-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; margin: 12px 0; }
.market-stat-grid article { background: var(--surface); padding: 14px 10px; border-right: 1px solid var(--line); min-width: 0; }
.market-stat-grid article:last-child { border-right: 0; }
.market-stat-grid span { display: block; color: var(--muted); font-family: var(--mono); font-size: 8px; line-height: 1.25; text-transform: uppercase; }
.market-stat-grid strong { display: block; font-size: 15px; letter-spacing: -.04em; margin-top: 6px; white-space: nowrap; }
.market-stat-grid strong.below-market { color: var(--green); }
.market-stat-grid strong.above-market { color: var(--yellow); }
.market-grid { display: grid; gap: 12px; }
.comparable-panel, .source-panel { padding: 17px; }
.comparables-list { margin-top: 15px; }
.comparable-row { display: grid; grid-template-columns: 33px minmax(0,1fr) auto; gap: 9px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.market-logo { height: 33px; width: 33px; display: grid; place-items: center; background: var(--surface-3); border-radius: 8px; color: var(--accent); font-family: var(--mono); font-size: 13px; }
.comparable-copy { min-width: 0; }
.comparable-copy strong { display: block; font-size: 11px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.comparable-copy span, .comparable-price span { color: var(--muted); font-size: 9px; display: block; margin-top: 3px; }
.comparable-price { text-align: right; }
.comparable-price strong { font-family: var(--mono); font-size: 11px; }
.comparable-price a { color: var(--accent); display: inline-flex; align-items: center; justify-content: flex-end; gap: 2px; font-size: 9px; margin-top: 3px; }
.source-panel > p:not(.eyebrow):not(.source-disclaimer) { color: var(--muted); font-size: 12px; line-height: 1.45; margin: 11px 0 17px; }
.source-links { display: grid; gap: 7px; }
.source-link { background: var(--surface-3); border: 1px solid var(--line); border-radius: 8px; min-height: 40px; padding: 0 11px; display: flex; align-items: center; justify-content: space-between; color: var(--text); font-size: 11px; }
.source-link svg { color: var(--accent); }
.source-disclaimer { color: var(--dim); font-size: 9px; line-height: 1.45; margin: 15px 0 0; }

.auth-page, .account-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 17px; background: radial-gradient(circle at 80% 5%, rgba(198,239,93,.13), transparent 30%), var(--bg); }
.auth-card, .account-card { width: min(100%, 450px); background: var(--surface); border: 1px solid var(--line); border-radius: 17px; padding: 24px 20px; }
.auth-brand { margin-bottom: 38px; padding: 0; }
.auth-heading h1, .account-card h1 { font-size: 29px; line-height: 1.05; letter-spacing: -.06em; margin: 7px 0; }
.auth-heading h1 span { color: var(--accent); }
.auth-heading > p:last-child { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 12px 0 0; }
.auth-form { display: grid; gap: 15px; margin-top: 25px; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: -2px; }
.auth-row a, .auth-switch a { color: var(--accent); font-size: 11px; font-weight: 600; }
.checkbox-label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-family: var(--sans); letter-spacing: 0; text-transform: none; font-size: 11px; }
.checkbox-label input { height: 14px; width: 14px; accent-color: var(--accent); }
.form-message { min-height: 15px; color: var(--accent); font-size: 11px; line-height: 1.35; margin: -4px 0 0; }
.form-message.error { color: var(--danger); }
.auth-switch { color: var(--muted); font-size: 12px; text-align: center; margin: 24px 0 0; }
.backup-code-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 24px 0 12px; }
.backup-code-grid code { padding: 11px 8px; background: var(--surface-3); border: 1px solid var(--line); color: var(--text); border-radius: 7px; text-align: center; font-family: var(--mono); font-size: 10px; letter-spacing: .02em; }
.backup-actions { display: flex; gap: 8px; }
.backup-actions .draft-button { flex: 1; }
.recovery-note { display: flex; align-items: flex-start; gap: 10px; background: rgba(198,239,93,.07); color: var(--muted); border: 1px solid rgba(198,239,93,.15); padding: 13px; border-radius: 9px; margin: 25px 0 15px; }
.recovery-note .icon { color: var(--accent); width: 17px; }
.recovery-note p { font-size: 11px; line-height: 1.45; margin: 0; }
.account-card { position: relative; }
.account-card > .back-profile { margin-bottom: 26px; }
.account-avatar { display: grid; place-items: center; height: 57px; width: 57px; background: var(--accent); color: #172009; border-radius: 15px; font-family: var(--mono); font-size: 18px; margin-bottom: 18px; }
.account-email { color: var(--muted); font-size: 12px; margin: 0; }
.avatar-note { color: var(--dim); font-size: 10px; line-height: 1.45; margin: 11px 0 0; }
.account-profile-form { display: grid; gap: 12px; margin-top: 20px; }
.account-profile-form .draft-button { justify-self: start; }
.account-rows { margin: 27px 0 18px; border-top: 1px solid var(--line); }
.account-rows a { display: flex; align-items: center; justify-content: space-between; min-height: 52px; border-bottom: 1px solid var(--line); font-size: 12px; }
.account-rows a > span:first-child { display: inline-flex; align-items: center; gap: 9px; }
.account-rows .icon { color: var(--muted); width: 17px; }
.notification-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin: 26px 0 16px; }
.notification-header h1 { margin-bottom: 0; }
.notification-list { border-top: 1px solid var(--line); }
.notification-row { display: grid; grid-template-columns: 8px 1fr; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.notification-dot { height: 7px; width: 7px; border-radius: 50%; background: transparent; margin-top: 4px; }
.notification-row.unread .notification-dot { background: var(--accent); box-shadow: 0 0 0 3px rgba(198,239,93,.1); }
.notification-row strong { font-size: 12px; }
.notification-row p { color: var(--muted); font-size: 11px; line-height: 1.4; margin: 4px 0; }
.notification-row span:last-child { color: var(--dim); font-family: var(--mono); font-size: 9px; }

@media (min-width: 620px) { .market-grid { grid-template-columns: 1.25fr .75fr; } .compare-picker { grid-template-columns: 1fr 1fr; align-items: end; } }
@media (min-width: 980px) { .vehicle-page .profile-overlay { display: flex; justify-content: center; } .vehicle-page .vehicle-profile { width: min(760px, 100%); padding: 32px 34px 100px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); } .vehicle-page .sticky-profile-action { margin-left: -34px; margin-right: -34px; padding-left: 34px; padding-right: 34px; } }
