/* 绠楁暟路娴疯緯 浜屾墜杞� 鈥斺�� 鍦� 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???????????? */
/* ---------- 列表 / 统计 ---------- */
/* 指标卡统一走 biz.css 的 .stat（见设计原则 1），这里不再单独维护一套 */

.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; }
.stack-xs { display: grid; gap: 8px; }
.stack-xs .form-control { width: 100%; }

.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; } }

/* ------------------------------------------------------------------ 看板（整备工单等） */
.kb-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.kb-col { background: var(--surface-2, #f3f5f8); border: 1px solid var(--line, #e3e8ee); border-radius: 12px; padding: 10px; min-height: 220px; transition: box-shadow .15s, border-color .15s; }
.kb-col.is-drop-on { border-color: var(--accent, #1668c1); box-shadow: 0 0 0 3px rgba(22,104,193,.12); }
.kb-col-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 4px 10px; }
.kb-col-head h3 { margin: 0; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.kb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--kb-color, #8a97a5); }
.kb-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; background: var(--surface, #fff); border: 1px solid var(--line, #e3e8ee); font-size: 11px; font-weight: 600; }
.kb-hint { font-size: 11px; color: var(--muted, #7c8b9a); margin-left: auto; }
.kb-list { display: flex; flex-direction: column; gap: 8px; }
.kb-card { background: var(--surface, #fff); border: 1px solid var(--line, #e3e8ee); border-left: 3px solid #8a97a5; border-radius: 10px; padding: 10px 11px; cursor: grab; }
.kb-col[data-kb-col="working"] .kb-card { border-left-color: #e0a728; }
.kb-col[data-kb-col="done"] .kb-card { border-left-color: #1c9457; }
.kb-col[data-kb-col="done"] .kb-list { max-height: 520px; overflow-y: auto; padding-right: 2px; }
.kb-card.is-overdue { border-left-color: var(--danger, #c0392b); background: #fff8f7; }
.kb-card.is-dragging { opacity: .55; cursor: grabbing; }
.kb-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kb-code { font-size: 11px; color: var(--muted, #7c8b9a); }
.kb-vehicle { display: flex; align-items: baseline; gap: 8px; margin: 5px 0 4px; font-size: 13px; font-weight: 600; }
.kb-vehicle a { color: inherit; }
.kb-vehicle .mono { font-weight: 500; font-size: 11px; color: var(--muted, #7c8b9a); }
.kb-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11px; color: var(--muted, #7c8b9a); }
.kb-late { color: var(--danger, #c0392b); font-weight: 600; }
.kb-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding-top: 7px; border-top: 1px dashed var(--line, #e3e8ee); font-size: 11px; color: var(--muted, #7c8b9a); }
.kb-foot b { color: var(--ink, #1d2733); }
.kb-link { margin-left: auto; color: var(--accent, #1668c1); }
.kb-empty { padding: 18px 8px; text-align: center; font-size: 12px; color: var(--muted, #7c8b9a); border: 1px dashed var(--line, #e3e8ee); border-radius: 8px; }
@media (max-width: 900px) { .kb-board { grid-template-columns: 1fr; } }


/* ------------------------------------------------------------------ 证照到期 */
.text-danger { color: var(--danger, #c0392b); }
.is-danger { color: var(--danger, #c0392b); font-weight: 600; }
.is-warn { color: #b9770e; font-weight: 600; }
.is-info { color: #1f6f9c; }
.is-muted, .is-muted .cell-sub { color: var(--muted, #7c8b9a); }
.inline-details { display: inline-block; position: relative; }
.inline-details > summary { list-style: none; cursor: pointer; display: inline-block; }
.inline-details > summary::-webkit-details-marker { display: none; }
.inline-details[open] > summary { visibility: hidden; height: 0; overflow: hidden; }
.inline-form-stack { position: absolute; right: 0; top: 0; z-index: 20; display: flex; flex-direction: column; gap: 6px; padding: 10px; width: 190px; background: var(--surface, #fff); border: 1px solid var(--line, #e3e8ee); border-radius: 10px; box-shadow: 0 10px 30px rgba(16, 32, 48, .16); }
.inline-form-stack label { font-size: 11px; color: var(--muted, #7c8b9a); display: flex; flex-direction: column; gap: 3px; }

/* ------------------------------------------------------------------ 交车检查单 */
.cl-sheet { background: #fff; border: 1px solid var(--line, #e3e8ee); border-radius: 12px; padding: 22px 24px; max-width: 860px; margin: 0 auto; box-shadow: 0 8px 26px rgba(20, 38, 58, .06); }
.cl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--ink, #1d2733); }
.cl-brand { font-size: 12px; color: var(--muted, #7c8b9a); letter-spacing: .08em; }
.cl-head h2 { margin: 4px 0 0; font-size: 22px; letter-spacing: .06em; }
.cl-no { text-align: right; font-size: 12px; color: var(--muted, #7c8b9a); line-height: 1.7; }
.cl-sec { padding-top: 16px; }
.cl-sec h3 { display: flex; align-items: center; gap: 10px; font-size: 14px; margin: 0 0 10px; padding-left: 8px; border-left: 3px solid var(--accent, #1668c1); }
.cl-tag { margin-left: auto; font-size: 11px; font-weight: 500; color: var(--muted, #7c8b9a); }
.cl-tag.is-ok { color: var(--success, #1c9457); }
.cl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; font-size: 12px; }
.cl-grid > div { display: flex; gap: 8px; padding: 4px 0; border-bottom: 1px dotted var(--line, #e3e8ee); }
.cl-grid span { color: var(--muted, #7c8b9a); min-width: 62px; }
.cl-grid b { font-weight: 600; word-break: break-all; }
.cl-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
.cl-list-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cl-list li label { display: flex; align-items: center; gap: 7px; font-size: 12px; padding: 5px 7px; border: 1px solid var(--line, #e3e8ee); border-radius: 7px; }
.cl-list li em { margin-left: auto; font-style: normal; font-size: 10px; color: var(--muted, #7c8b9a); }
.cl-list li em.is-ok { color: var(--success, #1c9457); }
.cl-list input[type="checkbox"] { width: 14px; height: 14px; accent-color: var(--accent, #1668c1); }
.cl-hint { font-size: 12px; color: var(--muted, #7c8b9a); margin: 10px 0 0; }
.cl-terms { font-size: 12px; line-height: 1.9; color: #44505f; background: var(--surface-2, #f6f8fa); border-radius: 8px; padding: 10px 12px; margin: 0 0 14px; }
.cl-sign { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.cl-sign > div { display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.cl-sign span { color: var(--muted, #7c8b9a); }
.cl-sign b { font-weight: 600; border-bottom: 1px solid var(--ink, #1d2733); padding-bottom: 4px; min-height: 26px; }
.cl-sign em { font-style: normal; color: var(--muted, #7c8b9a); }
.cl-sign-input { max-width: 240px; }
.cl-foot { display: flex; justify-content: space-between; margin-top: 18px; padding-top: 10px; border-top: 1px dashed var(--line, #e3e8ee); font-size: 11px; color: var(--muted, #7c8b9a); }
.cl-actions { display: flex; align-items: center; gap: 10px; margin: 16px auto 0; max-width: 860px; }
@media print {
  .cl-sheet { border: 0; box-shadow: none; padding: 0; max-width: none; border-radius: 0; }
  .cl-sec { break-inside: avoid; }
  .cl-list li label { border-color: #bbb; }
  .cl-sign b { min-height: 34px; }
  .content, .main, body { background: #fff !important; }
}
@media (max-width: 860px) {
  .cl-grid, .cl-list, .cl-list-3, .cl-sign { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ 异常预警 */
.anomaly-list { display: flex; flex-direction: column; }
.anomaly-item { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--line, #e6ebf1); align-items: flex-start; }
.anomaly-item:last-child { border-bottom: 0; }
.anomaly-item.is-acked { background: rgba(16, 185, 129, .045); }
.anomaly-flag { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.anomaly-type { font-size: 12px; color: var(--muted, #7c8b9a); }
.anomaly-title { font-weight: 600; font-size: 14px; color: var(--text, #1f2937); margin-bottom: 4px; }
.anomaly-detail { font-size: 13px; line-height: 1.65; color: var(--muted, #5b6b7c); }
.anomaly-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; font-size: 12px; color: var(--muted, #7c8b9a); align-items: center; }
.anomaly-meta a { color: var(--primary, #2563eb); }
.anomaly-act { min-width: 98px; text-align: right; }
@media (max-width: 860px) {
  .anomaly-item { grid-template-columns: 1fr; gap: 10px; }
  .anomaly-act { text-align: left; }
}

/* 费用分类可点击下钻 */
.cost-lines > a { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--border-soft); font-size: 12.5px; color: inherit; text-decoration: none; }
.cost-lines > a:hover { background: var(--panel-2); }
.cost-lines > a span { color: var(--muted); }
.cost-lines > a b { font-variant-numeric: tabular-nums; font-weight: 500; }
a.badge { text-decoration: none; }

/* ------------------------------------------------------------------ ³µ´ûºó CRM ±íµ¥ */
.form-grid + .form-section, .form-section + .form-grid { margin-top: 0; }
.form-section { font-size: 13px; font-weight: 600; color: var(--text-2, #334155); margin: 18px 0 10px; padding-bottom: 6px; border-bottom: 1px dashed var(--border, #e6ebf1); grid-column: 1 / -1; }
.form-grid > .form-section:first-child { margin-top: 0; }
.kv-grid-1 { grid-template-columns: 1fr; }
.card-body h4 { font-size: 12.5px; font-weight: 600; color: var(--text-2, #334155); margin: 0 0 6px; }
.card-body .table + h4 { margin-top: 16px; }

/* ------------------------------------------------------------------ ÐÐÄڲÙ×÷¸¡²ã / ÐÐ״̬ */
.inline-pop { position: relative; display: inline-block; }
.inline-pop > summary { list-style: none; cursor: pointer; }
.inline-pop > summary::-webkit-details-marker { display: none; }
.inline-pop-body { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 230px; display: grid; gap: 7px; padding: 12px; border: 1px solid var(--border, #e6ebf1); border-radius: 10px; background: var(--panel, #fff); box-shadow: 0 12px 30px rgba(15, 23, 42, .16); text-align: left; }
.inline-pop-body .form-label { margin-bottom: -3px; }
.inline-pop-body .form-control { height: 30px; font-size: 12.5px; }
.check-line { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted, #64748b); }
.table tr.is-risk td { background: rgba(220, 38, 38, .035); }
.bucket-card { transition: border-color .12s, box-shadow .12s; }
.bucket-card:hover { border-color: var(--primary, #2563eb); text-decoration: none; box-shadow: 0 4px 14px rgba(37, 99, 235, .08); }
.bucket-card.is-on { border-color: var(--primary, #2563eb); box-shadow: inset 0 0 0 1px var(--primary, #2563eb); }

/* ------------------------------------------------------------------ ÏîĿ / Îĵµ / ȨÏÞ */
.stage-grid { align-items: stretch; }
.stage-col { border: 1px solid var(--border, #e6ebf1); border-radius: 10px; padding: 10px 12px; background: var(--panel-2, #f8fafc); }
.stage-col .timeline li { font-size: 11.5px; }
.stage-col .timeline li b { font-size: 12px; }
.doc-item { padding: 12px 0; border-bottom: 1px dashed var(--border, #e6ebf1); }
.doc-item:last-child { border-bottom: 0; padding-bottom: 0; }
.doc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.version-list { list-style: none; margin: 8px 0; padding: 0 0 0 2px; display: grid; gap: 5px; }
.version-list li { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12px; color: var(--muted, #64748b); }
.photo-item { display: block; border: 1px solid var(--border, #e6ebf1); border-radius: 8px; overflow: hidden; }
.photo-item img { width: 100%; height: 104px; object-fit: cover; display: block; }
.perm-role { border: 1px solid var(--border, #e6ebf1); border-radius: 10px; padding: 10px 12px; }
.perm-role > summary { cursor: pointer; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.perm-role > summary::-webkit-details-marker { display: none; }
.perm-form { margin-top: 10px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 12px; font-size: 12px; }
.alert { display: flex; flex-direction: column; gap: 3px; padding: 12px 16px; border-radius: 10px; margin-bottom: 14px; font-size: 12.5px; }
.alert b { font-size: 13.5px; }
.alert-danger { background: rgba(220, 38, 38, .06); border: 1px solid rgba(220, 38, 38, .22); color: #b91c1c; }
.alert-warn { background: rgba(217, 119, 6, .07); border: 1px solid rgba(217, 119, 6, .22); color: #b45309; }

/* 项目甘特图 */
.gantt { display: flex; flex-direction: column; gap: 10px; }
.gantt-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); border-bottom: 1px dashed var(--border); padding-bottom: 4px; }
.gantt-row { display: grid; grid-template-columns: 210px 1fr 70px; gap: 12px; align-items: center; }
.gantt-name { font-size: 12px; font-weight: 600; }
.gantt-track { position: relative; height: 26px; background: var(--surface-2, #f3f6fa); border-radius: 6px; overflow: hidden; }
.gantt-bar { position: absolute; left: 0; height: 9px; border-radius: 5px; }
.gantt-bar.is-plan { top: 4px; background: #9db7db; }
.gantt-bar.is-actual { top: 14px; background: var(--success); }
.gantt-status { text-align: right; }
@media (max-width: 760px) {
    .gantt-row { grid-template-columns: 1fr; gap: 4px; }
    .gantt-status { text-align: left; }
}

/* ==========================================================================
   经营分析（/analytics/*）：范围切换、下钻条形图、排行榜
   约 3KB，随 extra.css 一起缓存
   ========================================================================== */
.an-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; padding: 5px; background: var(--panel-3); border-radius: 10px; }
.an-tab { padding: 6px 12px; border-radius: 7px; font-size: 13px; color: var(--text-2); text-decoration: none; white-space: nowrap; }
.an-tab:hover { background: var(--panel); color: var(--text); }
.an-tab.is-on { background: var(--panel); color: var(--primary); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.an-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.an-lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.an-grid .card, .an-lists .card { padding: 0; overflow: hidden; }

.an-bars { padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.an-bar { display: grid; grid-template-columns: 104px minmax(0, 1fr) 92px; align-items: center; gap: 8px; text-decoration: none; color: inherit; border-radius: 6px; padding: 2px 4px; margin: 0 -4px; }
a.an-bar:hover { background: var(--panel-2); }
.an-bar-label { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-bar-track { height: 8px; background: var(--panel-3); border-radius: 5px; overflow: hidden; }
.an-bar-track i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--primary), #60a5fa); min-width: 2px; transition: width .35s ease; }
.an-bar:nth-child(3n+2) .an-bar-track i { background: linear-gradient(90deg, #0ea5e9, #38bdf8); }
.an-bar:nth-child(3n) .an-bar-track i { background: linear-gradient(90deg, var(--purple), #c084fc); }
.an-bar-val { font-size: 12.5px; text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }
.an-empty { padding: 22px 14px; text-align: center; color: var(--muted); font-size: 13px; }

.an-table { font-size: 12.5px; }
.an-table th { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.an-table td { padding: 7px 10px; }
.an-table .rank-no { color: var(--muted); width: 26px; }
.an-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.an-table .is-strong { font-weight: 600; }
.an-table .is-green { color: var(--success); }
.an-table .is-amber { color: var(--warn); }
.an-table .is-danger { color: var(--danger); }
.an-table a { color: inherit; text-decoration: none; }
.an-table a:hover { color: var(--primary); }
.an-table .tag-mini { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 11px; background: var(--panel-3); color: var(--text-2); }

.an-next { margin-top: 12px; }
.an-next-links { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px 14px; }
.an-next-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; color: var(--text); text-decoration: none; background: var(--panel-2); }
.an-next-link:hover { border-color: var(--primary); color: var(--primary); }
.an-next-link b { color: var(--muted); }

.card-foot { padding: 8px 14px 12px; border-top: 1px solid var(--line); font-size: 12.5px; }

@media (max-width: 1200px) {
    .an-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .an-grid, .an-lists { grid-template-columns: 1fr; }
    .an-bar { grid-template-columns: 88px minmax(0, 1fr) 78px; }
}
@media (max-width: 560px) {
    .an-bar { grid-template-columns: 76px minmax(0, 1fr) 66px; gap: 6px; }
    .an-bar-label, .an-bar-val { font-size: 11.5px; }
    .an-tabs { overflow-x: auto; flex-wrap: nowrap; }
}

/* ==========================================================================
   数据字典（/settings/dict）：左侧分类 + 右侧选项维护
   ========================================================================== */
.dict-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 12px; align-items: start; }
.dict-side { position: sticky; top: 12px; padding: 0; overflow: hidden; }
.dict-list { display: flex; flex-direction: column; max-height: 62vh; overflow: auto; }
.dict-key { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 13px; border-bottom: 1px solid var(--line, #eef1f5); font-size: 13px; color: var(--text-2); text-decoration: none; }
.dict-key:last-child { border-bottom: 0; }
.dict-key small { display: block; font-size: 10.5px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; margin-top: 1px; }
.dict-key b { font-size: 11.5px; color: var(--muted); background: var(--panel-3); border-radius: 9px; padding: 1px 7px; }
.dict-key:hover { background: var(--panel-2); }
.dict-key.is-on { background: var(--primary-soft, rgba(59,130,246,.1)); color: var(--primary); font-weight: 600; }
.dict-key.is-on b { background: var(--primary); color: #fff; }
.dict-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.dict-form { padding: 4px 14px 16px; }
.dict-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dict-form .btn { margin-top: 10px; }

@media (max-width: 900px) {
    .dict-layout { grid-template-columns: 1fr; }
    .dict-side { position: static; }
    .dict-list { flex-direction: row; overflow-x: auto; max-height: none; }
    .dict-key { border-bottom: 0; border-right: 1px solid var(--line, #eef1f5); white-space: nowrap; }
    .dict-form-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .dict-form-grid { grid-template-columns: 1fr; }
}

/* 系统参数（/settings/system） */
.sys-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sys-body { padding: 4px 16px 16px; }
.sys-body .form-label { margin-top: 10px; }
.sys-body .form-label:first-child { margin-top: 0; }
.code-block { margin-top: 10px; border: 1px solid var(--line, #eef1f5); border-radius: 8px; overflow: hidden; background: var(--panel-2); }
.code-block-head { padding: 6px 10px; font-size: 11.5px; color: var(--muted); border-bottom: 1px solid var(--line, #eef1f5); }
.code-block pre { margin: 0; padding: 10px; font-size: 12px; overflow: auto; }
@media (max-width: 900px) { .sys-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   AI 演示（/ai）：场景卡、派单打分、质检、风险、话术、问答
   ========================================================================== */
.ai-note { display:flex; align-items:center; gap:9px; padding:9px 13px; margin-bottom:12px; border-radius:9px;
    background: linear-gradient(135deg, rgba(59,130,246,.09), rgba(168,85,247,.07)); border:1px solid rgba(59,130,246,.18);
    font-size:12.5px; color:var(--text-2); }
.ai-badge { flex:0 0 auto; padding:2px 8px; border-radius:6px; background:linear-gradient(135deg,#3b82f6,#a855f7); color:#fff; font-size:11px; font-weight:600; letter-spacing:.4px; }

.ai-scenes { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:10px; margin-bottom:12px; }
.ai-scene { position:relative; display:block; padding:13px 14px; border-radius:11px; background:var(--panel);
    border:1px solid var(--line, #eef1f5); text-decoration:none; color:inherit; overflow:hidden; transition:transform .14s, border-color .14s; }
.ai-scene:hover { transform:translateY(-2px); border-color:var(--primary); }
.ai-scene::after { content:""; position:absolute; right:-20px; top:-20px; width:60px; height:60px; border-radius:50%; background:var(--primary-soft, rgba(59,130,246,.1)); }
.ai-scene.tone-green::after { background:rgba(34,197,94,.12); }
.ai-scene.tone-amber::after { background:rgba(245,158,11,.14); }
.ai-scene.tone-red::after { background:rgba(239,68,68,.12); }
.ai-scene.tone-purple::after { background:rgba(168,85,247,.13); }
.ai-scene-top { display:flex; align-items:center; gap:8px; margin-bottom:6px; position:relative; z-index:1; }
.ai-scene-ico { width:26px; height:26px; border-radius:7px; display:grid; place-items:center; font-size:13px;
    background:var(--primary-soft, rgba(59,130,246,.12)); color:var(--primary); }
.ai-scene-top b { font-size:14px; }
.ai-scene p { margin:0 0 6px; font-size:12px; color:var(--text-2); line-height:1.6; position:relative; z-index:1; }
.ai-scene em { font-style:normal; font-size:11.5px; color:var(--success); position:relative; z-index:1; }

.ai-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:12px; }
.ai-body { padding: 6px 14px 14px; }

.ai-case { padding:10px 0; border-bottom:1px dashed var(--line, #eef1f5); }
.ai-case:last-of-type { border-bottom:0; }
.ai-case-head { display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:13px; margin-bottom:7px; }
.ai-case-head .muted { font-size:11.5px; }
.ai-picks { display:flex; flex-direction:column; gap:5px; }
.ai-pick { display:grid; grid-template-columns:46px minmax(0,auto) 46px minmax(0,1fr); align-items:center; gap:8px;
    padding:5px 8px; border-radius:7px; background:var(--panel-2); font-size:12px; }
.ai-pick.is-best { background:linear-gradient(90deg, rgba(34,197,94,.12), transparent); outline:1px solid rgba(34,197,94,.35); }
.ai-pick-rank { font-size:10.5px; color:var(--muted); }
.ai-pick.is-best .ai-pick-rank { color:var(--success); font-weight:700; }
.ai-pick-name { font-weight:600; }
.ai-pick-score { text-align:right; font-weight:700; color:var(--primary); font-variant-numeric:tabular-nums; }
.ai-pick-score small { font-size:10px; font-weight:400; color:var(--muted); margin-left:1px; }
.ai-pick-why { font-size:11px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.ai-quality { padding:9px 0; border-bottom:1px dashed var(--line, #eef1f5); }
.ai-quality:last-of-type { border-bottom:0; }
.ai-quality-head { display:flex; align-items:center; gap:8px; font-size:13px; flex-wrap:wrap; }
.ai-quality-head .muted { font-size:11.5px; }
.ai-qc-score { margin-left:auto; font-weight:700; font-size:13px; padding:1px 8px; border-radius:6px; }
.ai-qc-score.is-ok { background:rgba(34,197,94,.12); color:var(--success); }
.ai-qc-score.is-warn { background:rgba(245,158,11,.14); color:var(--warn); }
.ai-qc-score.is-bad { background:rgba(239,68,68,.12); color:var(--danger); }
.ai-tags { display:flex; flex-wrap:wrap; gap:5px; margin:6px 0; }
.ai-suggest { margin:0; padding-left:16px; font-size:11.5px; color:var(--text-2); line-height:1.7; }

.ai-risk { display:grid; grid-template-columns:38px minmax(0,1fr) 120px; align-items:center; gap:10px;
    padding:8px 6px; border-bottom:1px dashed var(--line, #eef1f5); text-decoration:none; color:inherit; border-radius:6px; }
.ai-risk:hover { background:var(--panel-2); }
.ai-risk:last-of-type { border-bottom:0; }
.ai-risk-score { width:34px; height:34px; border-radius:9px; display:grid; place-items:center; font-weight:800; font-size:13px; }
.ai-risk-score.is-ok { background:rgba(34,197,94,.12); color:var(--success); }
.ai-risk-score.is-warn { background:rgba(245,158,11,.15); color:var(--warn); }
.ai-risk-score.is-bad { background:rgba(239,68,68,.12); color:var(--danger); }
.ai-risk-main { min-width:0; }
.ai-risk-main b { font-size:13px; display:block; }
.ai-risk-main b small { font-size:10.5px; font-weight:500; color:var(--muted); margin-left:5px; }
.ai-risk-main em { font-style:normal; font-size:11px; color:var(--muted); display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ai-risk-act { text-align:right; font-size:11.5px; }
.ai-risk-act b { display:block; color:var(--danger); font-variant-numeric:tabular-nums; }
.ai-risk-act small { color:var(--muted); font-size:10.5px; }

.ai-script-meta { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px; }
.ai-line { margin-bottom:9px; }
.ai-line-t { display:inline-block; font-size:11px; font-weight:600; color:var(--primary); margin-bottom:2px; }
.ai-line p { margin:0; font-size:12.5px; line-height:1.75; color:var(--text); background:var(--panel-2); padding:8px 10px; border-radius:7px; border-left:2px solid var(--primary); }
.ai-compliance { margin:10px 0; padding:9px 12px; border-radius:8px; background:rgba(239,68,68,.05); border:1px dashed rgba(239,68,68,.3); }
.ai-compliance b { font-size:12px; color:var(--danger); }
.ai-compliance ul, .ai-compliance-list { margin:5px 0 0; padding-left:16px; font-size:11.5px; color:var(--text-2); line-height:1.8; }

.ai-ask-form { display:flex; gap:8px; }
.ai-ask-form input { flex:1 1 auto; }
.ai-samples { display:flex; flex-wrap:wrap; gap:6px; margin-top:9px; }
.ai-sample { padding:4px 10px; border-radius:16px; background:var(--panel-2); border:1px solid var(--line, #eef1f5); font-size:11.5px; color:var(--text-2); text-decoration:none; }
.ai-sample:hover { border-color:var(--primary); color:var(--primary); }

.ai-road { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:10px; margin-bottom:6px; }
.ai-road > div { padding:10px 12px; border-radius:9px; background:var(--panel-2); border:1px solid var(--line, #eef1f5); }
.ai-road b { font-size:12.5px; color:var(--primary); }
.ai-road p { margin:4px 0 0; font-size:11.5px; color:var(--text-2); line-height:1.65; }
.ai-order-grid { display:grid; grid-template-columns: 1fr 1fr; gap:12px; }

@media (max-width: 1100px) {
    .ai-scenes { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .ai-road { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .ai-grid, .ai-order-grid { grid-template-columns: 1fr; }
    .ai-scenes { grid-template-columns: 1fr; }
    .ai-risk { grid-template-columns: 34px minmax(0,1fr); }
    .ai-risk-act { grid-column: 2; text-align:left; display:flex; gap:8px; align-items:baseline; }
    .ai-pick { grid-template-columns: 40px minmax(0,1fr) 44px; }
    .ai-pick-why { display:none; }
}

/* ---------------- 批量选择 / 批量打印 ---------------- */
.col-check { width: 34px; text-align: center; padding-left: 6px !important; padding-right: 6px !important; }
.col-check input { width: 15px; height: 15px; cursor: pointer; accent-color: var(--primary); vertical-align: middle; }
.batch-bar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; margin: 0 0 8px; border-radius: 8px; background: rgba(37,99,235,.06); border: 1px solid rgba(37,99,235,.2); }
.batch-bar .batch-count { font-size: 12.5px; color: var(--text-2); margin-right: auto; }
.batch-bar .batch-count b { color: var(--primary); font-variant-numeric: tabular-nums; }

.form-hint { margin: 6px 0 0; font-size: 11.5px; color: var(--muted); }
.issue-list { margin: 10px 0 0; padding-left: 18px; font-size: 12px; color: var(--danger); line-height: 1.8; }
.text-success { color: var(--success, #16a34a) !important; }

/* ---------------- 主题强调色（系统设置可切） ---------------- */
html[data-accent="blue"]   { --primary:#3b82f6; --primary-2:#2563eb; --primary-soft:rgba(59,130,246,.14); }
html[data-accent="green"]  { --primary:#22c55e; --primary-2:#16a34a; --primary-soft:rgba(34,197,94,.14); }
html[data-accent="purple"] { --primary:#a855f7; --primary-2:#7c3aed; --primary-soft:rgba(168,85,247,.14); }
html[data-accent="amber"]  { --primary:#f59e0b; --primary-2:#d97706; --primary-soft:rgba(245,158,11,.14); }
html[data-theme="light"][data-accent="blue"]   { --primary-soft:rgba(59,130,246,.09); }
html[data-theme="light"][data-accent="green"]  { --primary-soft:rgba(34,197,94,.10); }
html[data-theme="light"][data-accent="purple"] { --primary-soft:rgba(168,85,247,.10); }
html[data-theme="light"][data-accent="amber"]  { --primary-soft:rgba(245,158,11,.10); }

/* ---------------- 布局密度（系统设置可切） ---------------- */
html[data-density="compact"] .content { padding-top: 12px; }
html[data-density="compact"] .page-head { margin-bottom: 10px; }
html[data-density="compact"] .card-body { padding: 12px 14px; }
html[data-density="compact"] .card-head { padding: 10px 14px; }
html[data-density="compact"] table.table th,
html[data-density="compact"] table.table td { padding-top: 6px; padding-bottom: 6px; }
html[data-density="compact"] .stat-strip { gap: 8px; }
html[data-density="roomy"] .content { padding-top: 22px; }
html[data-density="roomy"] table.table th,
html[data-density="roomy"] table.table td { padding-top: 12px; padding-bottom: 12px; }

/* ---------------- 顶栏：消息与待办 ---------------- */
.todo-bell { position: relative; }
.todo-bell > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 2px; height: 34px; padding: 0 8px; border-radius: 8px; position: relative; }
.todo-bell > summary::-webkit-details-marker { display: none; }
.todo-bell > summary:hover { background: var(--panel-3); }
.tb-bell { font-size: 15px; line-height: 1; filter: grayscale(.15); }
.tb-bell-n { position: absolute; top: 2px; right: 0; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; line-height: 15px; text-align: center; font-style: normal; }
.todo-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 320px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); z-index: 60; overflow: hidden; }
.todo-head { display: flex; align-items: baseline; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--border-soft); }
.todo-head b { font-size: 12.5px; }
.todo-head span { font-size: 11px; color: var(--muted); }
.todo-list { max-height: 320px; overflow: auto; }
.todo-row { display: flex; align-items: center; gap: 10px; padding: 9px 14px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--border-soft); }
.todo-row:hover { background: var(--panel-2); }
.todo-txt { flex: 1 1 auto; min-width: 0; }
.todo-txt b { display: block; font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo-txt small { display: block; font-size: 10.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo-n { flex: 0 0 auto; min-width: 20px; height: 19px; padding: 0 6px; border-radius: 10px; background: var(--panel-3); color: var(--text-2); font-size: 11px; font-weight: 700; line-height: 19px; text-align: center; }
.todo-row.is-warn .todo-n { background: rgba(245,158,11,.16); color: #b45309; }
.todo-row.is-danger .todo-n { background: rgba(239,68,68,.14); color: var(--danger); }
.todo-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.todo-empty { padding: 16px 14px; font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.todo-foot { display: flex; justify-content: space-between; padding: 8px 14px; background: var(--panel-2); }
.todo-foot a { font-size: 11px; color: var(--primary); text-decoration: none; }
@media (max-width: 720px) { .todo-panel { width: 280px; } }

/* 色调别名：数据字典里用 amber / teal 等命名，与内置徽标类对齐 */
.badge-amber { background: rgba(245, 158, 11, .18); color: #fbbf24; }
.badge-teal { background: rgba(20, 184, 166, .18); color: #2dd4bf; }
.badge-rose { background: rgba(244, 63, 94, .18); color: #fb7185; }
html[data-theme="light"] .badge-amber { background: rgba(180, 83, 9, .10); color: #b45309; }
html[data-theme="light"] .badge-teal { background: rgba(13, 148, 136, .10); color: #0f766e; }
html[data-theme="light"] .badge-rose { background: rgba(190, 18, 60, .10); color: #be123c; }

/* ---------------- 省 / 市 / 详细地址 ---------------- */
.region-picker .rp-row { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 6px; margin-bottom: 6px; }
.region-picker .rp-final { font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .region-picker .rp-row { grid-template-columns: 1fr 1fr; } .region-picker .rp-row input { grid-column: 1 / -1; } }

/* 兼容新版 Chrome：details 关闭时仍会保留布局，这里显式隐藏面板 */
details.todo-bell:not([open]) > .todo-panel,
details.role-switch:not([open]) > .role-menu,
details.user-menu:not([open]) > .um-panel { display: none; }
