/* 算数·海辕 二手车 —— 在 app.css 基础上补充的页面级样式 */

:root {
  --car-blue: #2563eb;
  --car-teal: #0f766e;
  --car-ink: #0f172a;
}

body { -webkit-font-smoothing: antialiased; }

/* ---------- 登录 / 注册 ---------- */
.auth-body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 15% 10%, rgba(37, 99, 235, .18), transparent 60%),
    radial-gradient(900px 500px at 90% 90%, rgba(15, 118, 110, .16), transparent 55%),
    var(--bg, #f6f8fb);
}
.auth-wrap { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100vh; }
.auth-side {
  padding: 64px 60px;
  background: linear-gradient(155deg, #0b1220 0%, #102344 52%, #0d3b3a 100%);
  color: #fff;
  display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.auth-side::after {
  content: ""; position: absolute; right: -80px; bottom: -120px; width: 420px; height: 420px;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 0 0 48px rgba(255,255,255,.04), 0 0 0 96px rgba(255,255,255,.03);
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 34px; }
.auth-brand .brand-logo {
  width: 46px; height: 46px; border-radius: 13px; background: #fff; color: #102344;
  display: grid; place-items: center; font-weight: 800; font-size: 22px;
}
.auth-product { font-size: 17px; font-weight: 700; letter-spacing: .02em; }
.auth-tag { font-size: 12px; color: rgba(255,255,255,.62); margin-top: 2px; }
.auth-side h1 { font-size: 42px; line-height: 1.22; letter-spacing: -.02em; margin: 0 0 18px; }
.auth-side p { color: rgba(255,255,255,.72); line-height: 1.9; font-size: 14px; max-width: 470px; }
.auth-points { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 11px; max-width: 500px; }
.auth-points li { font-size: 13px; color: rgba(255,255,255,.78); padding-left: 18px; position: relative; line-height: 1.7; }
.auth-points li::before { content: "→"; position: absolute; left: 0; color: #5eead4; }
.auth-points b { color: #fff; font-weight: 600; }
.auth-foot { margin-top: 46px; font-size: 11.5px; color: rgba(255,255,255,.42); }
.auth-card-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-card {
  width: 100%; max-width: 392px; background: var(--card, #fff); border: 1px solid var(--border);
  border-radius: 18px; padding: 30px 30px 24px; box-shadow: 0 18px 60px rgba(15, 23, 42, .10);
}
.auth-card h2 { margin: 0 0 5px; font-size: 21px; }
.auth-card .sub { color: var(--muted); font-size: 12.5px; margin-bottom: 22px; }
.auth-card .form-item { grid-column: span 12; }
.auth-card .btn { width: 100%; height: 42px; margin-top: 6px; }
.auth-hint { max-width: 392px; margin-top: 14px; font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.7; }
.auth-links { display: flex; justify-content: space-between; font-size: 12.5px; margin-top: 14px; }
.demo-accounts { margin-top: 18px; border-top: 1px dashed var(--border); padding-top: 14px; }
.demo-accounts .da-title { font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
.demo-accounts .da-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.demo-accounts button { text-align: left; border: 1px solid var(--border); background: var(--panel-2, #f8fafc); border-radius: 8px; padding: 7px 9px; font-size: 11.5px; cursor: pointer; }
.demo-accounts button b { display: block; font-size: 12px; }
.demo-accounts button:hover { border-color: var(--primary); }
@media (max-width: 980px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}

/* ---------- ?????? app.css?PC / ?????/ ?? ---------- */
.site-footer {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 22px; border-top: 1px solid var(--border-soft);
  color: var(--muted); font-size: 11.5px; position: relative; z-index: 2;
}
.vendor-link { color: var(--muted); text-decoration: none; font-weight: 600; }
.vendor-link:hover { color: var(--primary); text-decoration: underline; }
.sales-contact a, .sidebar-brand .sb-tel a { color: inherit; text-decoration: none; font-weight: 600; }
.sales-contact a:hover, .sidebar-brand .sb-tel a:hover { color: var(--primary); text-decoration: underline; }
/* ???????? app.css???????????? */
/* ---------- 列表 / 统计 ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 13px 15px;
  position: relative; overflow: hidden;
}
.stat-card::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--primary); opacity: .8; }
.stat-card.green::after { background: var(--success); }
.stat-card.warn::after { background: var(--warn); }
.stat-card.danger::after { background: var(--danger); }
.stat-card.purple::after { background: var(--purple); }
.stat-card .sc-label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat-card .sc-value { font-size: 23px; font-weight: 700; margin-top: 4px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stat-card .sc-value small { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 3px; }
.stat-card .sc-foot { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

.filter-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px;
}
.filter-bar .form-control { height: 32px; font-size: 12.5px; }
.filter-bar .spacer { flex: 1 1 auto; }

.table td .cell-main { font-weight: 600; color: var(--text); }
.table td .cell-sub { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tr.is-warn td { background: rgba(245, 158, 11, .055); }
.table tr.is-danger td { background: rgba(239, 68, 68, .06); }
.table tr.is-muted td { opacity: .62; }
.table a.row-link { color: var(--text); font-weight: 600; }
.table a.row-link:hover { color: var(--primary); }

.money-pos { color: var(--success); font-variant-numeric: tabular-nums; }
.money-neg { color: var(--danger); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 11.5px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }

/* ---------- 详情页 ---------- */
.detail-hero {
  display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap;
  background: linear-gradient(120deg, var(--card), var(--panel-2, #f8fafc));
  border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin-bottom: 14px;
}
.detail-hero .dh-title { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.detail-hero .dh-sub { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.detail-hero .dh-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.detail-hero .dh-money { text-align: right; }
.detail-hero .dh-money .big { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.detail-hero .dh-money .lbl { font-size: 11.5px; color: var(--muted); }

.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 18px; }
.kv-item .k { font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.kv-item .v { font-size: 13.5px; font-weight: 500; word-break: break-word; }
.kv-item .v.big { font-size: 16px; font-weight: 700; }

.cost-table td { padding: 7px 10px; }
.cost-table tr.total td { border-top: 2px solid var(--border); font-weight: 700; font-size: 14px; }

.section-title { font-size: 13px; font-weight: 700; color: var(--text-2); margin: 18px 0 8px; display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--primary); }

.empty-inline { padding: 18px 10px; text-align: center; color: var(--muted); font-size: 12.5px; }

/* ---------- 逆流向导 ---------- */
.flow-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.flow-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: var(--card); }
.flow-card h4 { margin: 0 0 4px; font-size: 13.5px; }
.flow-card .fc-scene { font-family: ui-monospace, monospace; font-size: 11px; color: var(--muted); }
.flow-card .fc-body { font-size: 12px; color: var(--muted); line-height: 1.7; margin: 7px 0 10px; }
.flow-card .fc-effects { list-style: none; padding: 0; margin: 0 0 10px; font-size: 11.5px; }
.flow-card .fc-effects li { display: flex; gap: 6px; padding: 3px 0; border-bottom: 1px dashed var(--border-soft); }
.flow-card .fc-effects li:last-child { border-bottom: 0; }
.flow-card .fc-effects .e-name { color: var(--muted); flex: 0 0 72px; }

/* ---------- 进度 / 图表补充 ---------- */
.mini-bars { display: flex; gap: 4px; align-items: flex-end; height: 42px; }
.mini-bars span { flex: 1; background: var(--primary-soft); border-radius: 3px 3px 0 0; min-height: 3px; }
.mini-bars span.is-on { background: var(--primary); }

.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.chart-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 5px; }

.aging-row { display: grid; grid-template-columns: 90px 1fr 100px; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px dashed var(--border-soft); font-size: 12.5px; }
.aging-row:last-child { border-bottom: 0; }

/* ---------- 平台后台 ---------- */
.platform-bar { background: #0b1220; color: #fff; padding: 12px 22px; display: flex; align-items: center; gap: 16px; }
.platform-bar a { color: rgba(255,255,255,.75); font-size: 13px; }
.platform-bar a.on { color: #fff; font-weight: 600; }
.platform-bar .spacer { flex: 1; }

/* ---------- 响应 ---------- */
@media (max-width: 1100px) {
  .sidebar { width: 210px; }
  .content { padding: 16px 14px 50px; }
}
@media (max-width: 860px) {
  .layout { display: block; }
  .sidebar { position: static; width: 100%; height: auto; }
  .nav-list { max-height: none; }
  .topbar .crumb { display: none; }
}

/* ---------- 打印 ---------- */
@media print {
  .sidebar, .topbar, .site-footer, .no-print, .toast-wrap, .watermark { display: none !important; }
  .layout { display: block; }
  .content { padding: 0; }
  .card { break-inside: avoid; box-shadow: none; }
}

/* ---------- ҵÎñҳÃæͨÓðæʽ£¨Áбí / ÏêÇé / ±íµ¥£© ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { font-size: 22px; letter-spacing: -.01em; margin: 0; }
.page-desc { color: var(--muted); font-size: 12.5px; margin-top: 5px; line-height: 1.7; max-width: 760px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.title-row h1 { margin: 0; }
.stack-form { display: grid; gap: 14px; }

.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(172px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.stat-label { display: block; font-size: 11.5px; color: var(--muted); }
.stat b { display: block; font-size: 21px; font-weight: 700; margin-top: 3px; font-variant-numeric: tabular-nums; }
.stat em { display: block; font-style: normal; font-size: 11px; color: var(--muted); margin-top: 2px; }

.tab-strip { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 12px; overflow-x: auto; }
.tab-strip .tab { padding: 8px 12px; font-size: 12.5px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab-strip .tab:hover { color: var(--text); text-decoration: none; }
.tab-strip .tab.is-on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-row .form-control { height: 33px; font-size: 12.5px; }
.filter-row .filter-kw { min-width: 230px; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 14px; align-items: start; }
.detail-main, .detail-side { display: grid; gap: 14px; min-width: 0; }
@media (max-width: 1060px) { .detail-grid { grid-template-columns: 1fr; } }

.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 18px; }
.kv-grid > div > span { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.kv-grid > div > b { font-size: 13px; font-weight: 500; word-break: break-word; }

.cost-lines { display: grid; gap: 2px; }
.cost-lines > div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--border-soft); font-size: 12.5px; }
.cost-lines > div span { color: var(--muted); }
.cost-lines > div b { font-variant-numeric: tabular-nums; }
.cost-lines .cost-total { border-bottom: 0; border-top: 2px solid var(--border); margin-top: 4px; padding-top: 9px; font-size: 13.5px; }
.cost-lines .cost-total b { font-size: 16px; font-weight: 700; }
.masked-box { text-align: center; padding: 16px 8px; border: 1px dashed var(--border); border-radius: 10px; background: var(--panel-2); }
.masked-box b { display: block; font-size: 19px; letter-spacing: .12em; color: var(--muted); }
.masked-box span { display: block; font-size: 11px; color: var(--muted); margin-top: 5px; }
.mini-kpi { margin-top: 8px; }
.mini-kpi > div { display: flex; justify-content: space-between; align-items: center; font-size: 12px; padding: 5px 0; }
.mini-kpi > div span { color: var(--muted); }

.profit-lines { display: grid; gap: 1px; }
.profit-line { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--border-soft); font-size: 12.5px; }
.profit-line .tone-in { color: var(--success); }
.profit-line .tone-out { color: var(--muted); }
.profit-line b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.profit-line.profit-total { border-bottom: 0; border-top: 2px solid var(--border); margin-top: 4px; padding-top: 9px; font-size: 13.5px; font-weight: 600; }

.form-subtitle { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin: 0 0 8px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.inline-form .form-control { height: 33px; font-size: 12.5px; min-width: 110px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid.cols-3 > .form-item, .form-grid.cols-4 > .form-item { grid-column: span 1; }
@media (max-width: 1000px) { .form-grid.cols-3, .form-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .form-grid.cols-3, .form-grid.cols-4 { grid-template-columns: 1fr; } }

.note-box { margin-top: 10px; padding: 10px 12px; border-radius: 9px; background: var(--panel-2); border: 1px dashed var(--border); font-size: 12.5px; line-height: 1.75; color: var(--text-2); }
.empty.small { padding: 14px; font-size: 12px; color: var(--muted); text-align: center; }

.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--panel-2); }
.seg-item { padding: 6px 11px; font-size: 12px; color: var(--muted); border-right: 1px solid var(--border); }
.seg-item:last-child { border-right: 0; }
.seg-item:hover { color: var(--text); text-decoration: none; }
.seg-item.is-on { background: var(--primary); color: #fff; font-weight: 600; }

.kpi-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kpi-icon { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--primary-soft); color: var(--primary); }
.kpi-icon.i-green { background: rgba(34,197,94,.14); color: var(--success); }
.kpi-icon.i-indigo { background: rgba(99,102,241,.16); color: #818cf8; }
.kpi-icon.i-amber { background: rgba(245,158,11,.16); color: var(--warn); }
.kpi-value.is-masked { letter-spacing: .1em; color: var(--muted); }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; margin-bottom: 12px; font-size: 12.5px; line-height: 1.7; }
.alert > span:first-child { font-weight: 700; }
.alert-info { background: var(--primary-soft); border-color: rgba(59,130,246,.4); }
.alert-danger { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.35); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 6px 0 6px 16px; font-size: 12px; color: var(--muted); }
.timeline li::before { content: ""; position: absolute; left: 0; top: 11px; width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.timeline li.is-past { color: var(--text-2); }
.timeline li.is-past::before { background: var(--success); }
.timeline li.is-current { color: var(--primary); font-weight: 600; }
.timeline li.is-current::before { background: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

.text-red { color: var(--danger) !important; }
.text-green { color: var(--success) !important; }
.text-orange { color: var(--warn) !important; }

/* 批量操作 / 角色权限矩阵 */
.batch-bar { margin-bottom: 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.batch-bar > summary { cursor: pointer; padding: 10px 14px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.batch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 0 14px 14px; }
.batch-box { border: 1px dashed var(--border); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.batch-box .form-subtitle { margin: 0; }
.perm-table { display: grid; gap: 6px; margin-top: 8px; }
.perm-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px dashed var(--border); }
.perm-row:last-child { border-bottom: 0; }
.perm-row .check { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.perm-row .perm-manage { color: var(--muted); }
@media (max-width: 900px) { .batch-grid { grid-template-columns: 1fr; } }
