/* 神州租车 · 顺风车看板（深色）— 无框架、无外部依赖 */
:root {
  --bg: #0b0f18;
  --bg-soft: #101725;
  --card: #131b29;
  --card-hi: #182131;
  --line: #223047;
  --line-hi: #2c3d59;
  --text: #e8eef7;
  --muted: #8d9cb3;
  --dim: #66748b;
  --accent: #37d68a;
  --accent-2: #1f9d63;
  --gold: #ffc94d;
  --warn: #ff9f45;
  --danger: #ff6b6b;
  --ev: #37d68a;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1200px 500px at 15% -10%, rgba(55, 214, 138, 0.08), transparent 60%),
    radial-gradient(900px 400px at 90% 0%, rgba(60, 130, 246, 0.09), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 15, 24, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1560px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.brand-logo {
  width: 38px; height: 38px; flex: 0 0 38px;
  display: grid; place-items: center;
  font-size: 19px;
  border-radius: 11px;
  background: linear-gradient(145deg, #1d2a3f, #141d2c);
  border: 1px solid var(--line-hi);
}
.brand-text { min-width: 0; }
.brand-text h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-sub {
  margin: 2px 0 0;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dot {
  width: 7px; height: 7px; flex: 0 0 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(55, 214, 138, 0.16);
  animation: pulse 2.4s ease-in-out infinite;
}
.dot.is-idle { background: var(--dim); box-shadow: none; animation: none; }
.dot.is-busy { background: var(--gold); box-shadow: 0 0 0 3px rgba(255, 201, 77, 0.18); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

.tabs { display: flex; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: #0d1421; }
.tab {
  padding: 7px 15px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.tab:hover { color: var(--text); background: #182131; }
.tab.on {
  background: linear-gradient(180deg, rgba(55, 214, 138, 0.22), rgba(31, 157, 99, 0.12));
  color: #d9ffec;
  font-weight: 600;
}
.scan-box { display: flex; align-items: center; gap: 14px; }
.progress { display: flex; align-items: center; gap: 9px; }
.progress-bar {
  width: 160px; height: 6px;
  border-radius: 999px;
  background: #1b2740;
  overflow: hidden;
}
.progress-bar i {
  display: block; height: 100%; width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transition: width 0.35s ease;
}
.progress-bar i.is-indet {
  width: 40% !important;
  animation: indet 1.2s linear infinite;
}
@keyframes indet { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
.progress-text { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.btn-scan {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px;
  border: 1px solid rgba(55, 214, 138, 0.45);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(55, 214, 138, 0.22), rgba(31, 157, 99, 0.16));
  color: #d7ffe9;
  font-weight: 600;
  transition: transform 0.12s ease, background 0.2s ease, opacity 0.2s ease;
}
.btn-scan:hover { background: linear-gradient(180deg, rgba(55, 214, 138, 0.32), rgba(31, 157, 99, 0.22)); }
.btn-scan:active { transform: translateY(1px); }
.btn-scan:disabled { opacity: 0.65; cursor: progress; }

/* ---------- 布局 ---------- */
.page { max-width: 1560px; margin: 0 auto; padding: 18px 20px 40px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 322px; gap: 18px; align-items: start; }
.col-main { min-width: 0; }
.col-aside { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 14px; }

/* ---------- 筛选条 ---------- */
.filters {
  position: sticky;
  top: 74px;
  z-index: 30;
  background: linear-gradient(180deg, rgba(16, 23, 37, 0.98), rgba(13, 19, 30, 0.98));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 11px 13px;
  align-items: end;
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 11.5px; letter-spacing: 0.4px; color: var(--dim); text-transform: uppercase; }
.field-wide { grid-column: span 2; }
.field select,
.field input[type="search"],
.field input[type="text"],
.combo-input {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0d1421;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field select:focus,
.field input:focus,
.combo-input:focus {
  border-color: rgba(55, 214, 138, 0.55);
  box-shadow: 0 0 0 3px rgba(55, 214, 138, 0.12);
}
.field 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% - 16px) 52%, calc(100% - 11px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
}

/* 价格快捷按钮 */
.field-quick .quick { display: flex; gap: 5px; flex-wrap: wrap; }
.quick button {
  flex: 1 1 auto;
  min-width: 40px;
  padding: 8px 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0d1421;
  color: var(--muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: all 0.15s ease;
}
.quick button:hover { border-color: var(--line-hi); color: var(--text); }
.quick button.on {
  border-color: rgba(55, 214, 138, 0.6);
  background: linear-gradient(180deg, rgba(55, 214, 138, 0.22), rgba(31, 157, 99, 0.12));
  color: #d9ffec;
}

/* 滑块 */
.field-range { gap: 7px; }
.range-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.range-value { color: var(--accent); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.field-range input[type="range"] {
  width: 100%;
  height: 5px;
  appearance: none;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(55, 214, 138, 0.5), #1b2740);
  outline: none;
}
.field-range input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #0b0f18;
  box-shadow: 0 0 0 3px rgba(55, 214, 138, 0.18);
}
.range-scale { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--dim); }

/* 城市搜索下拉 */
.combo { position: relative; }
.combo-input { padding-right: 30px; }
.combo-clear {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  width: 20px; height: 20px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--dim);
  font-size: 11px;
  line-height: 1;
}
.combo-clear:hover { background: #1b2740; color: var(--text); }
.combo-list {
  position: absolute;
  z-index: 60;
  left: 0; right: 0; top: calc(100% + 5px);
  max-height: 264px;
  overflow-y: auto;
  margin: 0;
  padding: 5px;
  list-style: none;
  background: #0f1725;
  border: 1px solid var(--line-hi);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.combo-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 9px;
  border-radius: 7px;
  font-size: 13px;
  cursor: pointer;
}
.combo-list li:hover { background: #182131; }
.combo-list li b { color: var(--dim); font-weight: 500; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.combo-list li.combo-empty { color: var(--dim); cursor: default; justify-content: center; }
.combo.is-open .combo-input { border-color: rgba(55, 214, 138, 0.55); }

/* 分段按钮 */
.seg {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0d1421;
}
.seg button {
  flex: 1 1 0;
  padding: 6px 4px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.seg button:hover { color: var(--text); }
.seg button.on {
  background: linear-gradient(180deg, rgba(55, 214, 138, 0.24), rgba(31, 157, 99, 0.14));
  color: #d9ffec;
  font-weight: 600;
}

/* 开关 */
.switch {
  display: flex; align-items: center; gap: 9px;
  align-self: end;
  padding: 8px 2px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
  width: 38px; height: 21px;
  flex: 0 0 38px;
  border-radius: 999px;
  background: #1b2740;
  border: 1px solid var(--line);
  position: relative;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: #6f7d92;
  transition: transform 0.18s ease, background 0.18s ease;
}
.switch input:checked + .switch-track { background: rgba(55, 214, 138, 0.25); border-color: rgba(55, 214, 138, 0.5); }
.switch input:checked + .switch-track::after { transform: translateX(17px); background: var(--accent); }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px rgba(55, 214, 138, 0.2); }

/* ---------- 错误条 ---------- */
.alert {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 107, 107, 0.4);
  border-radius: 11px;
  background: rgba(255, 107, 107, 0.1);
  color: #ffd4d4;
  font-size: 13px;
}
.alert-text { flex: 1; min-width: 0; }
.alert-close {
  border: 0; background: transparent; color: #ffb4b4;
  width: 22px; height: 22px; border-radius: 6px; line-height: 1;
}
.alert-close:hover { background: rgba(255, 107, 107, 0.18); }

/* ---------- 列表头 ---------- */
.list-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin: 4px 2px 12px;
}
.list-head h2 { margin: 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.list-head .count { color: var(--text); font-variant-numeric: tabular-nums; }
.btn-ghost {
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #101725;
  color: var(--muted);
  font-size: 12.5px;
  transition: all 0.15s ease;
}
.btn-ghost:hover { color: var(--text); border-color: var(--line-hi); background: #182131; }

/* ---------- 卡片 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 13px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 15px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card), #101724);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--dim);
  opacity: 0.75;
}
.card[data-band="high"]::before { background: linear-gradient(180deg, #37d68a, #1f9d63); }
.card[data-band="mid"]::before { background: linear-gradient(180deg, #4b9dff, #2f6ecb); }
.card[data-band="low"]::before { background: linear-gradient(180deg, #ffc94d, #c99a20); }
.card[data-band="bad"]::before { background: linear-gradient(180deg, #ff6b6b, #b83c3c); }
.card:hover {
  border-color: var(--line-hi);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
}

.card-top { display: flex; align-items: flex-start; gap: 10px; }
.route-big {
  flex: 1;
  min-width: 0;
  font-size: 18px;
  font-weight: 680;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.thumb {
  position: relative;
  flex: 0 0 74px;
  width: 74px; height: 54px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #0d1421;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.thumb-ph { font-size: 20px; opacity: 0.5; }
.thumb-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  background: #0d1421;
}
.thumb-img.is-broken { display: none; }

.dates {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dept { display: flex; flex-direction: column; gap: 1px; }
.dept-line {
  font-size: 11.5px;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 1px; }
.model { margin: 0; font-size: 14.5px; font-weight: 620; }
.desc { margin: 0; font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.badge-ev {
  color: #04231a;
  background: linear-gradient(180deg, #4ff0a0, #23ba75);
  box-shadow: 0 0 0 1px rgba(55, 214, 138, 0.28), 0 2px 8px rgba(55, 214, 138, 0.22);
}
.badge-fuel {
  color: #a9b6c9;
  background: #182131;
  border: 1px solid #24334c;
  font-weight: 500;
}

/* 价格区 */
.price-block { margin-top: 2px; }
.price-main { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.price-total {
  font-size: 34px;
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.price-total[data-tier="one"] {
  color: #ffe38a;
  text-shadow: 0 0 22px rgba(255, 201, 77, 0.45);
}
.price-total[data-tier="ten"] {
  color: #7dfbbc;
  text-shadow: 0 0 20px rgba(55, 214, 138, 0.35);
}
.price-total[data-tier="fifty"] { color: #a9e8c9; }
.price-orig {
  color: var(--dim);
  font-size: 13px;
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}
.save-chip {
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 650;
  color: #06321f;
  background: linear-gradient(180deg, #9df7c6, #4bd693);
}
.price-sub { margin-top: 1px; font-size: 11.5px; color: var(--dim); }

.baf {
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid rgba(255, 201, 77, 0.45);
  background: rgba(255, 201, 77, 0.17);
  color: #ffe9b8;
  font-size: 11.5px;
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 2px 8px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #0f1725;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.tag-one { color: #ffe38a; border-color: rgba(255, 201, 77, 0.45); background: rgba(255, 201, 77, 0.12); font-weight: 650; }
.tag-save { color: #9df7c6; border-color: rgba(55, 214, 138, 0.42); background: rgba(55, 214, 138, 0.12); font-weight: 600; }
.tag-ev { color: #9df7c6; border-color: rgba(55, 214, 138, 0.3); }
.tag-new { color: #8fc4ff; border-color: rgba(75, 157, 255, 0.4); background: rgba(75, 157, 255, 0.12); }
.tag-today { color: #ffd9a8; border-color: rgba(255, 159, 69, 0.36); background: rgba(255, 159, 69, 0.1); }

.card-foot {
  display: flex; align-items: center; gap: 10px;
  margin-top: 2px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
}
.foot-meta { display: flex; flex-direction: column; gap: 1px; font-size: 11.5px; color: var(--dim); }
.foot-meta .seen { color: #4d5a70; }

/* 分数环 */
.ring { position: relative; width: 44px; height: 44px; flex: 0 0 44px; }
.ring svg { transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3.4; }
.ring-bg { stroke: #1c2740; }
.ring-fg { stroke: var(--dim); stroke-linecap: round; transition: stroke-dashoffset 0.4s ease; }
.ring[data-band="high"] .ring-fg { stroke: #37d68a; }
.ring[data-band="mid"] .ring-fg { stroke: #4b9dff; }
.ring[data-band="low"] .ring-fg { stroke: #ffc94d; }
.ring[data-band="bad"] .ring-fg { stroke: #ff6b6b; }
.ring b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

/* ---------- 侧栏面板 ---------- */
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card), #101724);
  padding: 14px;
}
.panel-title { margin: 0 0 11px; font-size: 13px; font-weight: 620; color: var(--text); }
.sub-title { margin: 14px 0 9px; font-size: 11.5px; color: var(--dim); font-weight: 500; letter-spacing: 0.3px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.stat {
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0d1421;
}
.stat span { display: block; font-size: 11px; color: var(--dim); margin-bottom: 3px; }
.stat b { font-size: 17px; font-variant-numeric: tabular-nums; letter-spacing: -0.3px; }

.dist { display: flex; flex-direction: column; gap: 7px; }
.dist-row { display: flex; align-items: center; gap: 8px; font-size: 11.5px; }
.dist-key { width: 34px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dist-bar { flex: 1; height: 7px; border-radius: 999px; background: #1b2740; overflow: hidden; }
.dist-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2f6ecb, #4b9dff); }
.dist-bar i[data-k="1"] { background: linear-gradient(90deg, #c99a20, #ffc94d); }
.dist-bar i[data-k="10"] { background: linear-gradient(90deg, #1f9d63, #37d68a); }
.dist-val { width: 62px; text-align: right; color: var(--dim); font-variant-numeric: tabular-nums; }

.cfg-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.cfg-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.cfg-list li span { color: var(--muted); }
.cfg-list li b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.cfg-list li.cfg-empty { color: var(--dim); justify-content: center; }

.legend { margin: 0 0 10px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 8px; }
.lg-price { color: #ffe38a; font-size: 14px; }
.lg-strike { color: var(--dim); }
.tip { margin: 0; font-size: 11.5px; color: var(--dim); line-height: 1.65; }

/* ---------- 状态卡 ---------- */
.state-wrap { display: grid; place-items: center; padding: 34px 12px; }
.state-card {
  max-width: 460px;
  text-align: center;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0f1725;
}
.state-icon { font-size: 30px; margin-bottom: 8px; }
.state-card h2 { margin: 0 0 7px; font-size: 15px; }
.state-card p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.state-actions { margin-top: 14px; }

/* ---------- 页脚 ---------- */
.foot {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--dim);
  text-align: center;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1199px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .col-aside { position: static; flex-direction: row; flex-wrap: wrap; }
  .col-aside .panel { flex: 1 1 300px; }
  .filters { top: 68px; }
}
@media (max-width: 767px) {
  .page { padding: 12px 12px 28px; }
  .topbar-inner { flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
  .brand-text h1 { font-size: 14px; }
  .scan-box { width: 100%; justify-content: space-between; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .field-wide { grid-column: span 2; }
  .grid { grid-template-columns: 1fr; }
  .price-total { font-size: 30px; }
  .filters { position: static; }
}
