:root {
  --bg: #f3f5fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff6ff;
  --success: #16a34a;
  --success-soft: #f0fdf4;
  --warn: #d97706;
  --warn-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --paused: #64748b;
  --paused-soft: #f1f5f9;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 16px -8px rgba(15, 23, 42, .12);
  --shadow-lg: 0 8px 32px -8px rgba(15, 23, 42, .22);
  --sidebar-w: 232px;
  --font: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; }
p { margin: 0; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }
[hidden] { display: none !important; }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 14px;
  background: #0f1e3d;
  color: #dbe4f5;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  padding: 4px 8px 14px;
  letter-spacing: .3px;
}
.brand-logo {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-radius: 9px;
  font-size: 15px;
}
.brand-sub { display: block; font-size: 11px; font-weight: 400; color: #7d90b5; letter-spacing: 0; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: #b6c4e0;
  font-weight: 500;
}
.nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.nav a.active { background: var(--primary); color: #fff; }
.nav .badge { margin-left: auto; }
.sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.user-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, .06);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #e2e9f7;
}
.user-chip .avatar {
  width: 28px; height: 28px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  color: #fff; font-weight: 700; font-size: 13px;
}
.user-chip .role { font-size: 11px; color: #7d90b5; }
.logout-btn {
  border: 1px solid rgba(255, 255, 255, .14);
  background: transparent;
  color: #b6c4e0;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.logout-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.main { flex: 1; min-width: 0; padding: 22px 26px 48px; }
.view { max-width: 1180px; margin: 0 auto; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.page-head h1 { font-size: 22px; }
.page-head .sub { color: var(--text-2); margin-top: 3px; font-size: 13px; }
.page-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }

/* ---------- 卡片与通用 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.card + .card { margin-top: 14px; }
.card-title { font-size: 15px; font-weight: 650; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card-title .muted { font-weight: 400; font-size: 12px; color: var(--text-3); }

.muted { color: var(--text-2); }
.tiny { font-size: 12px; color: var(--text-3); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

.empty {
  padding: 42px 20px;
  text-align: center;
  color: var(--text-2);
}
.empty .big { font-size: 34px; margin-bottom: 8px; }
.empty h3 { margin-bottom: 6px; font-size: 16px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 550;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  text-decoration: none;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-danger { color: var(--danger); border-color: #fca5a5; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--paused-soft); color: var(--text); }
.btn-sm { padding: 4px 10px; font-size: 12.5px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn .spin { width: 13px; height: 13px; }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--text-3); }
.input, .select, textarea.input {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, textarea.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}
textarea.input { min-height: 74px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.check {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  cursor: pointer;
  font-size: 13.5px;
}
.check input { margin-top: 3px; }
.check .desc { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.radio-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-tabs label {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  cursor: pointer;
  font-weight: 550;
  font-size: 13.5px;
  background: var(--surface);
}
.radio-tabs label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-hover); }
.radio-tabs input { position: absolute; opacity: 0; pointer-events: none; }

/* ---------- 徽标 / 状态 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--paused-soft);
  color: var(--text-2);
  white-space: nowrap;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-numeric { background: var(--danger); color: #fff; font-size: 11px; padding: 1px 7px; }
.tone-success { background: var(--success-soft); color: var(--success); }
.tone-warn { background: var(--warn-soft); color: var(--warn); }
.tone-danger { background: var(--danger-soft); color: var(--danger); }
.tone-running { background: var(--primary-soft); color: var(--primary); }
.tone-paused { background: var(--paused-soft); color: var(--paused); }
.tone-neutral { background: var(--paused-soft); color: var(--text-2); }

/* ---------- 状态点 ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
}
.stat-card .label { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.stat-card .value { font-size: 24px; font-weight: 700; margin-top: 3px; letter-spacing: -.3px; }
.stat-card .value small { font-size: 13px; font-weight: 500; color: var(--text-3); margin-left: 3px; }
.stat-card .foot { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ---------- 任务卡 ---------- */
.task-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.task-card:hover { border-color: var(--border-strong); }
.task-card + .task-card { margin-top: 12px; }
.task-card .info { flex: 1; min-width: 0; }
.task-card .title-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.task-card .title-row h3 { font-size: 15.5px; }
.task-card .title-row a { color: var(--text); }
.task-card .title-row a:hover { color: var(--primary); text-decoration: none; }
.task-card .meta { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 7px; }
.task-card .meta .tag {
  font-size: 12px;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 1.5px 8px;
  border-radius: 999px;
}
.task-card .foot { display: flex; gap: 14px; margin-top: 9px; font-size: 12.5px; color: var(--text-3); flex-wrap: wrap; }
.task-card .price-col { text-align: right; flex: none; min-width: 108px; }
.task-card .price-col .cur { font-size: 21px; font-weight: 750; letter-spacing: -.4px; }
.task-card .price-col .low { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.task-card .actions { display: flex; flex-direction: column; gap: 6px; flex: none; }

/* ---------- 报价卡 ---------- */
.offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.offer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.offer-card .route { font-weight: 650; font-size: 14.5px; display: flex; align-items: center; gap: 7px; }
.offer-card .route .arrow { color: var(--text-3); }
.offer-card .dates { font-size: 12.5px; color: var(--text-2); }
.offer-card .price { font-size: 22px; font-weight: 750; letter-spacing: -.4px; display: flex; align-items: baseline; gap: 8px; }
.offer-card .price .old { font-size: 13px; font-weight: 500; color: var(--text-3); text-decoration: line-through; }
.offer-card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }

.hero-offer {
  background: linear-gradient(120deg, #1e3a8a, #2563eb 60%, #3b82f6);
  color: #fff;
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
}
.hero-offer .label { font-size: 12.5px; opacity: .82; }
.hero-offer .route { font-size: 18px; font-weight: 700; margin-top: 2px; }
.hero-offer .price { font-size: 34px; font-weight: 800; letter-spacing: -1px; }
.hero-offer .btn { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.35); color: #fff; }
.hero-offer .btn:hover { background: rgba(255,255,255,.28); }

/* ---------- 列表 / 表格 ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left;
  font-size: 12px;
  color: var(--text-3);
  font-weight: 600;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--surface-2); }

.list > * + * { margin-top: 10px; }

.alert-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.alert-item.unread { border-left: 3px solid var(--primary); }
.alert-item .body { flex: 1; min-width: 0; }
.alert-item .top-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.alert-item .top-row h3 { font-size: 14.5px; }
.alert-item .detail { margin-top: 6px; display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.alert-item .price-box { flex: none; text-align: right; min-width: 96px; }
.alert-item .price-box .cur { font-size: 20px; font-weight: 750; }
.alert-item .price-box .old { font-size: 12px; color: var(--text-3); text-decoration: line-through; }
.alert-item .side-actions { flex: none; display: flex; flex-direction: column; gap: 6px; }

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
  overflow-x: auto;
}
.tabs button {
  border: none;
  background: none;
  padding: 9px 15px;
  font-size: 14px;
  font-weight: 550;
  color: var(--text-2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.tabs button:hover { color: var(--text); }
.tabs button .badge { margin-left: 5px; }

/* ---------- 筛选 chips ---------- */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.chip-btn {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
}
.chip-btn:hover { background: var(--surface-2); }
.chip-btn.active { background: var(--text); border-color: var(--text); color: #fff; }
.chip-btn .count { opacity: .65; font-weight: 400; margin-left: 3px; }

/* ---------- 选中 chips ---------- */
.chip-list { display: flex; gap: 7px; flex-wrap: wrap; }
.chip-list .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-soft);
  color: var(--primary-hover);
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 3px 6px 3px 11px;
  font-size: 13px;
  font-weight: 550;
}
.chip-list .chip button {
  border: none; background: none; cursor: pointer;
  color: inherit; opacity: .55; font-size: 14px; padding: 0 4px; line-height: 1;
}
.chip-list .chip button:hover { opacity: 1; }

/* ---------- 城市选择器 ---------- */
.city-picker { position: relative; }
.city-picker .search-row { display: flex; gap: 8px; }
.city-drop {
  position: absolute;
  z-index: 30;
  top: calc(100% + 5px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  max-height: 262px;
  overflow-y: auto;
  padding: 5px;
}
.city-drop .city-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 7px;
  cursor: pointer;
}
.city-drop .city-opt:hover { background: var(--primary-soft); }
.city-drop .city-opt .code { color: var(--text-3); font-family: var(--mono); font-size: 12px; }
.city-drop .drop-head { padding: 5px 10px 3px; font-size: 11.5px; color: var(--text-3); font-weight: 600; }

/* ---------- 星期选择 ---------- */
.weekday-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.weekday-picker button {
  width: 36px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
}
.weekday-picker button.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 650; }

/* ---------- 日期模式卡 ---------- */
.mode-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 10px; }
.mode-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  cursor: pointer;
  background: var(--surface);
  transition: border-color .15s, background .15s;
}
.mode-card:hover { border-color: var(--border-strong); }
.mode-card.on { border-color: var(--primary); background: var(--primary-soft); }
.mode-card.disabled { opacity: .45; cursor: not-allowed; }
.mode-card .name { font-weight: 650; font-size: 13.5px; display: flex; justify-content: space-between; gap: 6px; }
.mode-card .name .short { font-size: 11.5px; color: var(--primary); font-weight: 600; white-space: nowrap; }
.mode-card:not(.on) .name .short { color: var(--text-3); }
.mode-card .desc { font-size: 12px; color: var(--text-2); margin-top: 4px; line-height: 1.45; }

/* ---------- 预览面板 ---------- */
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.preview-panel { position: sticky; top: 20px; }
.preview-panel .kv { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.preview-panel .kv:last-of-type { border-bottom: none; }
.preview-panel .kv b { font-weight: 700; }
.preview-notes { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; }
.preview-notes .note { font-size: 12.5px; color: var(--text-2); display: flex; gap: 6px; }
.preview-notes .note::before { content: "·"; font-weight: 700; color: var(--text-3); }
.sample-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.sample-item {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12.5px;
}
.sample-item .hl { color: var(--warn); font-size: 12px; }
.form-section { padding: 18px; }
.form-section .card-title { margin-bottom: 14px; }
.section-stack > * + * { margin-top: 14px; }

/* ---------- 设置 ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; }
.settings-grid .cell { padding: 13px 16px; border-bottom: 1px solid var(--border); }
.settings-grid .cell .k { font-size: 12.5px; color: var(--text-3); }
.settings-grid .cell .v { margin-top: 2px; font-weight: 600; font-size: 14px; word-break: break-all; }
.settings-grid .cell .v.ok { color: var(--success); }
.settings-grid .cell .v.err { color: var(--danger); }
.provider-card .head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.provider-card .head h3 { font-size: 15px; }
.switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch .track {
  width: 36px; height: 21px;
  background: var(--border-strong);
  border-radius: 999px;
  transition: background .15s;
  position: relative;
  flex: none;
}
.switch .track::after {
  content: "";
  position: absolute;
  top: 2.5px; left: 3px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: left .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.switch input:checked + .track { background: var(--success); }
.switch input:checked + .track::after { left: 17px; }

/* ---------- 对话框 ---------- */
dialog.dialog {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0;
  width: min(460px, calc(100vw - 40px));
}
dialog.dialog::backdrop { background: rgba(15, 23, 42, .45); }
.dialog .dialog-head {
  padding: 15px 18px 0;
  font-size: 16px;
  font-weight: 650;
}
.dialog form { padding: 14px 18px 18px; }
.dialog .dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 16px; }

/* ---------- Toast ---------- */
.toasts {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: min(380px, calc(100vw - 36px));
}
.toast {
  background: #0f172a;
  color: #f1f5f9;
  border-radius: 11px;
  padding: 11px 15px;
  font-size: 13.5px;
  box-shadow: var(--shadow-lg);
  display: flex;
  gap: 9px;
  align-items: flex-start;
  animation: toast-in .22s ease;
}
.toast.leaving { opacity: 0; transform: translateY(-6px); transition: all .25s; }
.toast .ico { flex: none; font-size: 14px; }
.toast-success .ico { color: #4ade80; }
.toast-error .ico { color: #f87171; }
.toast-info .ico { color: #93c5fd; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- 认证页 ---------- */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(1000px 460px at 85% -10%, rgba(37, 99, 235, .16), transparent),
    radial-gradient(760px 380px at 10% 110%, rgba(59, 130, 246, .12), transparent),
    var(--bg);
  padding: 20px;
}
.auth-card {
  width: min(400px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 30px 30px 26px;
}
.auth-card .brand-row { display: flex; align-items: center; gap: 11px; margin-bottom: 6px; }
.auth-card .brand-row .brand-logo { width: 38px; height: 38px; font-size: 18px; border-radius: 11px; }
.auth-card h1 { font-size: 20px; }
.auth-card .sub { color: var(--text-2); font-size: 13px; margin-bottom: 20px; }
.auth-error {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13px;
  margin-bottom: 14px;
}

/* ---------- 其它 ---------- */
.spinner {
  width: 26px; height: 26px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 46px auto;
}
.spinner.small { width: 14px; height: 14px; border-width: 2px; margin: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin-wrap { display: flex; align-items: center; gap: 8px; }
.live-bar {
  display: flex; align-items: center; gap: 9px;
  background: var(--primary-soft);
  color: var(--primary-hover);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 550;
  margin-bottom: 14px;
}
.filter-bar { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filter-bar .input { width: auto; min-width: 150px; }
.filter-bar .select { width: auto; }
.detail-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 22px; }
.detail-meta .item .k { font-size: 12px; color: var(--text-3); }
.detail-meta .item .v { margin-top: 2px; font-weight: 550; font-size: 13.5px; }
.inline-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.divider { border: none; border-top: 1px solid var(--border); margin: 14px 0; }
.kv-inline { display: inline-flex; gap: 5px; align-items: baseline; }
.link-danger { color: var(--danger); cursor: pointer; background: none; border: none; font-size: inherit; padding: 0; }
.link-danger:hover { text-decoration: underline; }
.price-drop { color: var(--success); font-weight: 650; }
.price-low-badge { color: var(--warn); font-weight: 650; font-size: 12px; }
.best-row { background: color-mix(in srgb, var(--warn) 8%, transparent); }
.price-text { color: var(--danger); }

/* ---------- 响应式 ---------- */
@media (max-width: 1020px) {
  .form-layout { grid-template-columns: 1fr; }
  .preview-panel { position: static; }
}
@media (max-width: 880px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    padding: 10px 14px;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
  }
  .brand { padding: 0; font-size: 15px; }
  .brand-sub { display: none; }
  .nav { flex-direction: row; }
  .nav a { padding: 7px 11px; white-space: nowrap; }
  .sidebar-footer { margin: 0 0 0 auto; flex-direction: row; align-items: center; }
  .user-chip { padding: 4px 8px; }
  .user-chip .role { display: none; }
  .main { padding: 16px 14px 40px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .task-card { flex-wrap: wrap; }
  .task-card .price-col { text-align: left; }
}
