:root {
  --bg: #0a0d12;
  --bg-2: #0e131a;
  --panel: #131a24;
  --panel-2: #18212d;
  --line: #222d3c;
  --line-2: #2f3d4f;
  --text: #e9eff8;
  --muted: #8b9ab0;
  --dim: #5d6b80;
  --accent: #ff9f1c;
  --accent-2: #ffcf70;
  --accent-soft: rgba(255, 159, 28, .12);
  --green: #3ddc97;
  --red: #ff5d73;
  --blue: #58b6ff;
  --radius: 14px;
  --shadow: 0 24px 60px rgba(0, 0, 0, .38);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1000px 520px at 82% -10%, rgba(255, 159, 28, .07), transparent 60%),
    radial-gradient(800px 500px at -10% 20%, rgba(88, 182, 255, .05), transparent 55%),
    var(--bg);
  color: var(--text);
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
::selection { background: rgba(255, 159, 28, .3); }

.shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }

/* rail */
.rail {
  position: sticky; top: 0; height: 100vh; padding: 22px 16px 18px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(19, 26, 36, .9), rgba(10, 13, 18, .9));
  display: flex; flex-direction: column; gap: 6px;
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; }
.mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--accent), #e67e00);
  box-shadow: 0 8px 22px rgba(255, 159, 28, .28);
}
.mark span { width: 10px; height: 10px; border: 2px solid #1a1206; border-radius: 2px; }
.brand-text { font-size: 16px; font-weight: 800; letter-spacing: .12em; }
.brand-text span { color: var(--accent); }
.rail-label {
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--dim); padding: 6px 10px 8px;
}
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 11px; border-radius: 10px;
  color: var(--muted); font-weight: 500; border: 1px solid transparent;
}
.nav a em {
  margin-left: auto; font-style: normal; font-size: 10px; color: var(--dim);
  background: var(--panel-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 99px;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .025); }
.nav a.on {
  color: var(--text); background: var(--accent-soft); border-color: rgba(255, 159, 28, .25);
}
.nav a.on .i { color: var(--accent); }
.i { flex: 0 0 auto; }
.rail-foot {
  margin-top: auto; display: flex; flex-direction: column; gap: 4px;
  padding: 14px 10px 0; border-top: 1px solid var(--line); color: var(--dim);
}
.live { display: flex; align-items: center; gap: 7px; color: var(--green); font-size: 12px; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.tiny { font-size: 11px; }
.tiny.muted, .muted { color: var(--muted); }

/* main */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px;
  padding: 18px 30px 16px; border-bottom: 1px solid var(--line);
  background: rgba(10, 13, 18, .78); backdrop-filter: blur(14px);
}
.top-title { min-width: 0; }
.eyebrow {
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 3px; font-weight: 600;
}
.eyebrow.accent { color: var(--accent); }
h1 { font-size: 23px; line-height: 1.2; margin: 0; letter-spacing: -.02em; }
h2 { font-size: 24px; line-height: 1.25; margin: 6px 0 8px; letter-spacing: -.02em; }
h3 { font-size: 15px; margin: 0; letter-spacing: -.01em; }
.top-actions { margin-left: auto; display: flex; gap: 9px; align-items: center; }
.content { padding: 26px 30px 60px; max-width: 1560px; width: 100%; margin: 0 auto; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--text); font-weight: 600; font-size: 13px;
  cursor: pointer; transition: .15s ease; white-space: nowrap;
}
.btn:hover { border-color: #40506a; background: #1d2836; transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(180deg, #ffac33, #f08a00); border-color: #ffb347;
  color: #171006; box-shadow: 0 8px 24px rgba(255, 159, 28, .22);
}
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; }
.btn.lg { height: 46px; padding: 0 20px; font-size: 14px; }
.btn.sm { height: 32px; padding: 0 11px; font-size: 12px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.icon-btn.danger:hover { color: var(--red); }
.menu { display: none; }
.rail-close { display: none; position: absolute; right: 10px; top: 14px; }
.link {
  color: var(--accent); font-size: 12.5px; font-weight: 600; display: inline-flex;
  align-items: center; gap: 5px; background: none; border: 0; cursor: pointer; padding: 0;
}
.link:hover { color: var(--accent-2); }
.as-btn { font-family: inherit; }

/* cards */
.card {
  background: linear-gradient(180deg, rgba(24, 33, 45, .85), rgba(19, 26, 36, .85));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 18px; box-shadow: 0 1px 0 rgba(255, 255, 255, .02) inset;
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-top: 1px solid var(--line); margin-top: 12px; padding-top: 11px; font-size: 12px;
}
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.cols-2 > .card { margin-bottom: 18px; }

/* hero */
.hero {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 26px 28px; border-radius: 18px; margin-bottom: 18px;
  background:
    radial-gradient(600px 220px at 88% 0%, rgba(255, 159, 28, .16), transparent 60%),
    linear-gradient(160deg, #1a2330, #111720 65%);
  border: 1px solid #2a3647;
}
.hero p { margin: 0; color: var(--muted); max-width: 720px; }
.hero strong { color: var(--text); }
.hero .btn { flex: 0 0 auto; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 16px; display: flex; flex-direction: column; gap: 3px; min-height: 104px;
}
.stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: .16em; color: var(--dim); font-weight: 700; }
.stat strong { font-size: 27px; letter-spacing: -.03em; line-height: 1.1; }
.stat small { color: var(--muted); font-size: 11.5px; }
.stat .unit { font-size: 13px; color: var(--muted); margin-left: 3px; }
.accent-text { color: var(--accent); }
.neg { color: var(--red); }

/* tables */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; padding: 8px 10px; font-size: 10px; letter-spacing: .13em;
  text-transform: uppercase; color: var(--dim); border-bottom: 1px solid var(--line-2);
  font-weight: 700; white-space: nowrap;
}
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(255, 255, 255, .022); }
.table.compact td { padding: 8px 10px; }
.table .right { text-align: right; }
.table .mono, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.table .strong { font-weight: 700; }
tr.clickable { cursor: pointer; }
tr.chosen { background: rgba(255, 159, 28, .045); }
.veh { font-weight: 600; }
.veh small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.ellipsis { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, .025);
  font-size: 11px; color: var(--muted); white-space: nowrap;
}
.chip.accent, .chip.ok { color: var(--green); border-color: rgba(61, 220, 151, .3); background: rgba(61, 220, 151, .08); }
.pill {
  display: inline-block; padding: 3px 8px; border-radius: 7px; font-size: 11px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
}
.tier { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; padding: 3px 7px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); }
.tier.premium { color: var(--accent); border-color: rgba(255, 159, 28, .35); background: var(--accent-soft); }
.tier.mid { color: var(--blue); border-color: rgba(88, 182, 255, .3); }
.tier.base { color: var(--dim); }
.flag {
  display: inline-block; font-size: 9px; letter-spacing: .12em; font-weight: 800;
  padding: 2px 6px; border-radius: 5px; background: var(--panel-2); color: var(--dim);
  border: 1px solid var(--line);
}
.flag.new { background: var(--accent); color: #171006; border-color: var(--accent); }

/* stops list */
.stops { display: flex; flex-direction: column; }
.stop {
  display: flex; align-items: center; gap: 12px; padding: 11px 6px;
  border-bottom: 1px solid var(--line); color: var(--text);
}
.stop:last-child { border-bottom: 0; }
.stop:hover { background: rgba(255, 255, 255, .02); }
.stop .num {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 12px;
  border: 1px solid rgba(255, 159, 28, .25); flex: 0 0 auto;
}
.stop-main { min-width: 0; flex: 1; }
.stop-main strong { display: block; font-size: 13.5px; }
.stop-main span { display: block; color: var(--muted); font-size: 11.5px; }
.money { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; color: var(--accent); }

/* bars */
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 42px; align-items: center; gap: 10px; font-size: 12px; }
.bar-label { color: var(--muted); }
.bar { height: 7px; background: var(--panel-2); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; }

/* filters */
.filters {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px;
  padding: 14px 16px; margin-bottom: 14px;
}
.field { display: flex; flex-direction: column; gap: 5px; min-width: 120px; }
.field.grow { flex: 1 1 240px; }
.field.xs { min-width: 86px; width: 96px; }
.field label { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); font-weight: 700; }
.field input, .field select {
  height: 36px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg-2);
  padding: 0 10px; outline: none; font-size: 13px;
}
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 159, 28, .12); }
.field.check { min-width: auto; padding-bottom: 9px; }
.field.check label { display: flex; align-items: center; gap: 7px; text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--muted); }
.input-icon { position: relative; display: flex; align-items: center; }
.input-icon .i { position: absolute; left: 10px; color: var(--dim); pointer-events: none; }
.input-icon input { width: 100%; padding-left: 33px; }
.input-icon.narrow input { width: 240px; }

.table-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; }
.table-card .table th { padding-top: 12px; }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px; gap: 12px; }
.pager-btns { display: flex; gap: 8px; }

/* vehicle */
.vehicle-hero { display: flex; gap: 22px; align-items: stretch; padding: 0; overflow: hidden; }
.vehicle-hero .photo { width: 320px; height: 220px; object-fit: cover; background: var(--panel-2); flex: 0 0 auto; }
.vehicle-copy { padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.lede { margin: 0; color: var(--muted); }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: auto; }
.quick span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); }
.quick strong { font-size: 16px; }
.quick .tier { font-size: 11px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin: 0; }
.facts div { border-bottom: 1px solid var(--line); padding-bottom: 7px; }
.facts dt { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); }
.facts dd { margin: 2px 0 0; font-size: 13px; }
.picklist { display: flex; flex-direction: column; }
.pick { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.sumline { display: flex; justify-content: space-between; padding: 11px 0; font-size: 13px; color: var(--muted); }
.sumline strong { color: var(--accent); font-size: 16px; }
.meter { width: 56px; height: 5px; border-radius: 99px; background: var(--panel-2); display: inline-block; vertical-align: middle; margin-right: 7px; overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.note {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  background: rgba(255, 159, 28, .04); color: var(--muted);
  border-radius: 9px; padding: 11px 13px; font-size: 12.5px; margin: 12px 0;
}
.note.warn { border-left-color: var(--blue); background: rgba(88, 182, 255, .05); }
.empty { padding: 28px; text-align: center; color: var(--dim); font-size: 13px; }
.back { color: var(--accent); }

/* plan */
.controls-card { padding: 12px 14px; }
.controls { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.controls .field { min-width: 120px; }
.controls .btn { margin-bottom: 0; }
.map-card { padding-bottom: 8px; }
.route-map { width: 100%; height: auto; display: block; border-radius: 10px; background: rgba(8, 11, 15, .55); border: 1px solid var(--line); }
.grid line { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 7; }
.row-lab { fill: var(--dim); font-size: 10px; text-anchor: end; font-family: ui-monospace, monospace; }
.col-lab { fill: var(--dim); font-size: 10px; text-anchor: middle; font-family: ui-monospace, monospace; }
.route-path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 7 6; opacity: .75; }
.node circle { fill: var(--accent); stroke: #0a0d12; stroke-width: 3; }
.node-num { fill: #171006; font-size: 12px; font-weight: 800; text-anchor: middle; font-family: ui-monospace, monospace; }
.node-lab { fill: var(--text); font-size: 10.5px; font-weight: 600; }
.plan-stops { display: flex; flex-direction: column; }
.stop-card { padding: 0; overflow: hidden; }
.stop-head { display: flex; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.stop-title { display: flex; gap: 13px; align-items: flex-start; }
.num.big { width: 34px; height: 34px; font-size: 14px; border-radius: 10px; }
.stop-title h3 { margin: 1px 0 6px; font-size: 16px; }
.stop-total { text-align: right; flex: 0 0 auto; }
.stop-total strong { display: block; color: var(--accent); font-size: 20px; font-family: ui-monospace, monospace; }
.stop-total span { font-size: 11px; color: var(--muted); }
.stop-card .table { padding: 0; }
.stop-card .table th:first-child, .stop-card .table td:first-child { padding-left: 18px; }
.stop-card .table th:last-child, .stop-card .table td:last-child { padding-right: 18px; }

/* tabs */
.tabs { display: flex; gap: 6px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tab {
  background: none; border: 0; color: var(--muted); padding: 9px 13px; cursor: pointer;
  font-weight: 600; font-size: 13px; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.on { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.on { display: block; }
.platform { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; background: var(--panel); overflow: auto; }
.platform summary {
  list-style: none; cursor: pointer; padding: 14px 16px; display: flex;
  align-items: center; justify-content: space-between; gap: 12px;
}
.platform summary::-webkit-details-marker { display: none; }
.platform[open] summary { border-bottom: 1px solid var(--line); }
.platform summary strong { display: block; font-size: 13.5px; }
.platform .table td:first-child, .platform .table th:first-child { padding-left: 16px; }

/* profiles */
.profiles { display: flex; flex-direction: column; }
.profile { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.profile:last-child { border-bottom: 0; }
.profile > div { flex: 1; min-width: 0; }
.profile .count {
  font-family: ui-monospace, monospace; font-size: 12px; color: var(--accent);
  background: var(--accent-soft); border: 1px solid rgba(255, 159, 28, .25);
  padding: 2px 8px; border-radius: 99px;
}
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* toasts + job */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 80; }
.toast {
  background: var(--panel-2); border: 1px solid var(--line-2); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 10px 14px; font-size: 12.5px; box-shadow: var(--shadow);
  animation: slide .2s ease; max-width: 360px;
}
.toast.ok { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
@keyframes slide { from { opacity: 0; transform: translateY(8px); } }
.job {
  position: fixed; right: 20px; bottom: 20px; width: min(520px, calc(100vw - 40px));
  background: #0c1118; border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: var(--shadow); z-index: 90; overflow: hidden;
}
.job-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.job pre {
  margin: 0; padding: 12px; max-height: 240px; overflow: auto; font-size: 11.5px;
  color: var(--muted); white-space: pre-wrap; font-family: ui-monospace, monospace;
}
.flashes { margin-bottom: 14px; display: flex; flex-direction: column; gap: 8px; }
.flash { padding: 10px 13px; border-radius: 9px; font-size: 12.5px; border: 1px solid var(--line-2); background: var(--panel); }
.flash.ok { border-left: 3px solid var(--green); }
.flash.error { border-left: 3px solid var(--red); }

/* responsive */
@media (max-width: 1100px) {
  .cols-2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .rail {
    position: fixed; z-index: 60; width: 250px; transform: translateX(-102%);
    transition: transform .2s ease; box-shadow: var(--shadow);
  }
  .rail.open { transform: none; }
  .rail-close { display: inline-grid; }
  .menu { display: inline-grid; }
  .topbar { padding: 14px 16px; }
  .content { padding: 18px 16px 50px; }
  .top-actions span { display: none; }
  .hero { flex-direction: column; align-items: flex-start; padding: 20px; }
  .vehicle-hero { flex-direction: column; }
  .vehicle-hero .photo { width: 100%; height: 200px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table th, .table td { white-space: nowrap; }
  .input-icon.narrow input { width: 100%; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat strong { font-size: 22px; }
  .filters .field { flex: 1 1 140px; width: auto; }
  .quick { grid-template-columns: 1fr 1fr; }
}

@media print {
  body { background: #fff !important; color: #111 !important; }
  .rail, .topbar, .controls-card, .no-print, .job, .toasts, .tabs { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; max-width: none; }
  .card, .stat { background: #fff !important; border: 1px solid #ccc !important; box-shadow: none !important; break-inside: avoid; }
  .route-map { background: #fff; border-color: #ccc; }
  .grid line { stroke: #ddd; }
  .row-lab, .col-lab, .node-lab { fill: #333; }
  .node circle { fill: #f59e0b; stroke: #fff; }
  .node-num { fill: #111; }
  .route-path { stroke: #b45309; }
  .table th { color: #555; }
  .table td { border-bottom: 1px solid #eee; color: #111; }
  .money, .accent-text, .stop-total strong { color: #b45309 !important; }
  .stats { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
  .card { overflow-x: auto; }
  .stop-card { overflow: hidden; }
  .stop-card .table { display: block; width: 100%; overflow-x: auto; }
  .stop-head { flex-wrap: wrap; }
  .quick { grid-template-columns: 1fr 1fr; }
  .hero { overflow: hidden; }
}

@media (max-width: 700px) {
  .route-map { min-width: 660px; }
  .map-card { overflow-x: auto; }
}

.ebay {
  display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px;
  border-radius: 6px; border: 1px solid rgba(88, 182, 255, .28);
  background: rgba(88, 182, 255, .07); color: #8fcbff;
  font-size: 10px; font-weight: 800; letter-spacing: .04em; white-space: nowrap;
}
.ebay:hover { background: rgba(88, 182, 255, .16); color: #c3e5ff; border-color: rgba(88, 182, 255, .5); }
.query-link { color: var(--text); }
.query-link:hover { color: var(--accent); }

/* photos */
.gallery {
  flex: 0 0 360px; padding: 12px; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px; background: rgba(0, 0, 0, .16);
}
.gallery-main { display: block; border-radius: 9px; overflow: hidden; background: var(--panel-2); }
.gallery-main img { width: 100%; height: 212px; object-fit: cover; display: block; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.thumb {
  padding: 0; border: 1px solid var(--line); border-radius: 5px; overflow: hidden;
  background: var(--panel-2); cursor: pointer; opacity: .65; aspect-ratio: 1 / 1;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:hover { opacity: 1; }
.thumb.on { border-color: var(--accent); opacity: 1; box-shadow: 0 0 0 1px var(--accent); }
.veh-cell { display: flex; align-items: center; gap: 10px; }
.thumb-sm {
  width: 58px; height: 42px; object-fit: cover; border-radius: 6px;
  border: 1px solid var(--line); background: var(--panel-2); flex: 0 0 auto;
}
.link-chip:hover { color: var(--accent); border-color: rgba(255, 159, 28, .4); }
.yard-link { color: var(--dim); border-top: 1px solid var(--line); padding-top: 6px; margin-top: 3px; }
.yard-link:hover { color: var(--accent); }
@media (max-width: 860px) {
  .gallery { flex: 0 0 auto; width: 100%; border-right: 0; border-bottom: 1px solid var(--line); }
  .gallery-main img { height: 220px; }
}

/* similar cars */
.similar-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.similar-card {
  position: relative; border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; background: var(--panel-2); display: flex; flex-direction: column;
  transition: .15s ease;
}
.similar-card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.similar-photo { height: 100px; background: #0c1118; }
.similar-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.similar-body { padding: 9px 10px 10px; display: flex; flex-direction: column; gap: 2px; }
.similar-body strong { font-size: 12.5px; line-height: 1.3; }
.similar-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 5px; }
.similar-foot .chip { font-size: 10px; padding: 2px 6px; }
.similar-foot .mono { color: var(--accent); font-size: 11px; }
.kind {
  position: absolute; top: 7px; left: 7px; z-index: 2;
  font-size: 8.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 800;
  background: rgba(10, 13, 18, .82); border: 1px solid var(--line-2);
  padding: 2px 6px; border-radius: 5px; color: var(--muted);
}
.kind.model { color: var(--accent); border-color: rgba(255, 159, 28, .4); }
@media (max-width: 1100px) { .similar-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .similar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .similar-photo { height: 86px; } }

.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.stop-total .ebay { margin-top: 6px; }

/* yards */
.yard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.yard-card { display: flex; flex-direction: column; gap: 12px; margin-bottom: 0; }
.yard-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.yard-head h3 { font-size: 16px; }
.yard-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.yard-stats span { display: block; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.yard-stats strong { font-size: 16px; }
.yard-stats .unit { font-size: 11px; color: var(--muted); margin-left: 2px; }
.yard-stops { display: flex; flex-direction: column; gap: 5px; }
.yard-stop { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.yard-stop em { font-style: normal; color: var(--dim); font-family: ui-monospace, monospace; font-size: 11px; }
.yard-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.yard-actions .link { margin-left: auto; }
@media (max-width: 1000px) { .yard-grid { grid-template-columns: 1fr; } }

.stale-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; margin-bottom: 16px; border-radius: 10px;
  background: rgba(255, 159, 28, .08); border: 1px solid rgba(255, 159, 28, .3);
  color: var(--muted); font-size: 12.5px;
}
.stale-banner strong { color: var(--accent); }

/* automation */
.auto-card { border-color: rgba(255, 159, 28, .22); }
.auto-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.auto-form .field { min-width: 130px; }
.auto-form .switch { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); padding-bottom: 9px; }
.auto-form .switch input { accent-color: var(--accent); }
.auto-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 11.5px; color: var(--dim); font-family: ui-monospace, monospace; }
