/* =====================================================================
 * 三包件检测管理系统 — 高级视觉样式 (Premium Theme)
 * 设计语言：玻璃拟态 + 渐变主色 + 柔和阴影 + 流畅过渡；支持 浅/深/跟随系统
 * ===================================================================== */

/* ----------------------------------------------------------------- 设计令牌 */
:root {
  --primary: #4f46e5;
  --primary-2: #06b6d4;
  --brand: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  --brand-soft: linear-gradient(135deg, rgba(79,70,229,.12), rgba(6,182,212,.12));
  --danger: #ef4444;
  --warn: #f59e0b;
  --ok: #10b981;
  --gray: #94a3b8;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(20,30,60,.18);
  --shadow-lg: 0 24px 60px -20px rgba(20,30,60,.35);
  --ease: cubic-bezier(.16,1,.3,1);
  --sidebar-w: 248px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
}
[data-theme="light"] {
  --bg: #eef1f8;
  --bg-2: #e3e8f4;
  --surface: #ffffff;
  --surface-2: #f4f6fb;
  --text: #1b2235;
  --text-soft: #5a6680;
  --border: rgba(20,30,60,.08);
  --glass: rgba(255,255,255,.62);
  --glass-brd: rgba(255,255,255,.7);
}
[data-theme="dark"] {
  --bg: #0a0f1f;
  --bg-2: #0e1530;
  --surface: #141b30;
  --surface-2: #1a2340;
  --text: #eaeefb;
  --text-soft: #98a4c4;
  --border: rgba(255,255,255,.09);
  --glass: rgba(255,255,255,.045);
  --glass-brd: rgba(255,255,255,.1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--text);
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(6,182,212,.12), transparent 60%),
    radial-gradient(1000px 600px at -10% 110%, rgba(79,70,229,.14), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

/* ----------------------------------------------------------------- 登录页 */
.login-screen {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  position: relative; overflow: hidden;
}
.login-card {
  width: min(960px, 100%); display: grid; grid-template-columns: 1.1fr .9fr;
  background: var(--glass); backdrop-filter: blur(26px) saturate(160%);
  border: 1px solid var(--glass-brd); border-radius: 26px; overflow: hidden;
  box-shadow: var(--shadow-lg); animation: rise .6s var(--ease) both;
}
@keyframes rise { from { opacity:0; transform: translateY(20px) scale(.98);} to {opacity:1; transform:none;} }
.login-hero {
  padding: 46px 42px; color: #fff; position: relative;
  background: linear-gradient(150deg, #4f46e5, #06b6d4 120%);
  display: flex; flex-direction: column; justify-content: space-between;
}
.login-hero h1 { font-size: 30px; margin: 18px 0 8px; letter-spacing:.5px; }
.login-hero p { opacity: .9; line-height: 1.7; font-size: 14px; }
.login-logo { display:flex; align-items:center; gap:12px; font-weight:800; font-size:20px; }
.login-logo .dot { width:38px; height:38px; border-radius:11px; background:rgba(255,255,255,.18); display:grid; place-items:center; font-size:20px; }
.login-feats { margin-top: 26px; display:flex; flex-direction:column; gap:12px; font-size:13px; }
.login-feats div { display:flex; gap:10px; align-items:center; opacity:.95; }
.login-form { padding: 40px 38px; display:flex; flex-direction:column; gap:14px; }
.login-form h2 { margin:0 0 4px; font-size:20px; }
.login-form .sub { color: var(--text-soft); font-size:13px; margin-bottom:6px; }
.role-grid { display:grid; grid-template-columns: repeat(3,1fr); gap:8px; }
.role-chip {
  border:1px solid var(--border); background:var(--surface); border-radius:12px;
  padding:10px 6px; text-align:center; font-size:13px; transition: all .25s var(--ease);
}
.role-chip:hover { transform: translateY(-2px); border-color: var(--primary); }
.role-chip.active { background: var(--brand-soft); border-color: var(--primary); color: var(--primary); font-weight:700; }
.person-list { display:flex; flex-direction:column; gap:8px; max-height:240px; overflow:auto; }
.person-item {
  display:flex; align-items:center; gap:12px; padding:11px 13px; border-radius:12px;
  border:1px solid var(--border); background:var(--surface); transition: all .2s var(--ease);
}
.person-item:hover { border-color: var(--primary); transform: translateX(2px); }
.person-item.disabled { opacity: .5; cursor: not-allowed; }
.person-item.disabled:hover { border-color: var(--border); transform: none; }
.person-item .av { width:34px; height:34px; border-radius:10px; background:var(--brand); color:#fff; display:grid; place-items:center; font-weight:700; }
.qr-box { margin-top:10px; border:1px dashed var(--border); border-radius:14px; padding:16px; text-align:center; color:var(--text-soft); font-size:13px; }
.qr-box .qr { width:120px; height:120px; margin:10px auto; border-radius:12px; background:
  repeating-conic-gradient(#0b1020 0 25%, #fff 0 50%) 0/20px 20px; }

/* ----------------------------------------------------------------- 应用骨架 */
.app-shell { display:grid; grid-template-columns: var(--sidebar-w) 1fr; min-height:100vh; }
.sidebar {
  position: sticky; top:0; height:100vh; padding:16px 12px; display:flex; flex-direction:column; gap:2px;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%); border-right:1px solid rgba(255,255,255,.06);
  color: #cbd5e1; transition: transform .3s var(--ease);
  box-shadow: 4px 0 24px rgba(0,0,0,.06);
}
.sidebar-foot { margin-top:auto; }
.brand { display:flex; align-items:center; gap:11px; padding:8px 10px 18px; }
.brand .logo { width:38px; height:38px; border-radius:11px; background:linear-gradient(135deg,#3b82f6,#6366f1); display:grid; place-items:center; color:#fff; font-size:18px; box-shadow: 0 6px 20px rgba(59,130,246,.4); }
.brand b { font-size:15px; line-height:1.1; color:#fff; }
.brand small { color: rgba(203,213,225,.6); font-size:11px; }

/* 侧边栏扁平菜单 */
.nav-list { display:flex; flex-direction:column; gap:2px; margin-top:6px; }
.nav-item {
  display:flex; align-items:center; gap:12px; padding:11px 14px; border-radius:10px;
  color: rgba(203,213,225,.85); font-size:14px; cursor:pointer; position:relative;
  transition: all .2s var(--ease); user-select:none;
}
.nav-item .ico { width:22px; text-align:center; font-size:16px; line-height:1; }
.nav-item:hover { background: rgba(255,255,255,.06); color:#fff; }
.nav-item.active { background: linear-gradient(90deg, #3b82f6, #2563eb); color:#fff; font-weight:600; box-shadow: 0 4px 14px rgba(59,130,246,.35); }
.nav-item.active .ico { filter: drop-shadow(0 0 6px rgba(255,255,255,.4)); }
.nav-badge {
  margin-left:auto; min-width:22px; height:22px; padding:0 7px;
  background: #ef4444; color:#fff; font-size:11px; font-weight:700;
  border-radius:11px; display:inline-flex; align-items:center; justify-content:center;
  box-shadow: 0 2px 6px rgba(239,68,68,.4);
}
.nav-item.active .nav-badge { background: #fff; color: #2563eb; box-shadow: none; }

/* 兼容旧 nav-group-title（保留以防其他地方引用） */
.nav-group-title { display:none; }

.main { display:flex; flex-direction:column; min-width:0; }
.topbar {
  position: sticky; top:0; z-index:20; display:flex; align-items:center; gap:14px; padding:14px 26px;
  background: var(--glass); backdrop-filter: blur(18px); border-bottom:1px solid var(--border);
}
.topbar h1 { font-size:18px; margin:0; }
.topbar .crumb { color: var(--text-soft); font-size:13px; }
.topbar .spacer { flex:1; }
.content { padding: 26px; max-width: 1280px; width:100%; }

/* ----------------------------------------------------------------- 通用组件 */
.card {
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.card.hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-title { font-size:15px; font-weight:700; margin:0 0 14px; display:flex; align-items:center; gap:8px; }
.glass { background: var(--glass); backdrop-filter: blur(18px); border:1px solid var(--glass-brd); }

.btn {
  display:inline-flex; align-items:center; gap:7px; border:1px solid var(--border);
  background: var(--surface); color: var(--text); padding:9px 15px; border-radius:11px;
  font-size:14px; transition: all .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brand); color:#fff; border:none; box-shadow: var(--shadow); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--danger); color:#fff; border:none; }
.btn-warning { background: #f59e0b; color:#fff; border:none; }
.btn-sm { padding:6px 11px; font-size:13px; border-radius:9px; }
.btn:disabled { opacity:.5; cursor:not-allowed; transform:none; }

.badge { display:inline-flex; align-items:center; gap:5px; padding:3px 10px; border-radius:20px; font-size:12px; font-weight:600; white-space:nowrap; }
.badge.gray  { background: rgba(148,163,184,.16); color:#64748b; }
.badge.blue  { background: rgba(59,130,246,.16);  color:#3b82f6; }
.badge.amber { background: rgba(245,158,11,.16);  color:#d97706; }
.badge.green { background: rgba(16,185,129,.16);  color:#059669; }
.badge.red   { background: rgba(239,68,68,.16);   color:#dc2626; }
.dot { width:7px; height:7px; border-radius:50%; display:inline-block; }

.field { display:flex; flex-direction:column; gap:6px; margin-bottom:14px; }
.field label { font-size:13px; color: var(--text-soft); font-weight:600; }
.input, .select, textarea.input {
  width:100%; padding:10px 12px; border-radius:11px; border:1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-size:14px; transition: border-color .2s, box-shadow .2s;
}
.input:focus, .select:focus, textarea.input:focus { outline:none; border-color: var(--primary); box-shadow:0 0 0 3px rgba(79,70,229,.15); }
.grid-2 { display:grid; grid-template-columns: 1fr 1fr; gap:16px; }
.grid-3 { display:grid; grid-template-columns: repeat(3,1fr); gap:16px; }
.grid-4 { display:grid; grid-template-columns: repeat(4,1fr); gap:16px; }
.grid-5 { display:grid; grid-template-columns: repeat(5,1fr); gap:16px; }
.grid-info-row { display:grid; grid-template-columns: 2fr 2fr 1fr 1fr; gap:16px; }
@media (max-width: 860px){ .grid-2,.grid-3,.grid-4,.grid-5,.grid-info-row{ grid-template-columns:1fr; } .login-card{ grid-template-columns:1fr; } .login-hero{ display:none; } }
@media (min-width:861px) and (max-width:1100px){ .grid-4{ grid-template-columns:1fr 1fr; } .grid-5{ grid-template-columns:1fr 1fr 1fr; } .grid-info-row{ grid-template-columns:1fr 1fr; } }

.table { width:100%; border-collapse: collapse; }
.table th, .table td { text-align:left; padding:13px 14px; border-bottom:1px solid var(--border); font-size:14px; }
.table th { color: var(--text-soft); font-weight:600; font-size:12.5px; letter-spacing:.3px; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--surface-2); }
.table .row-link { cursor:pointer; }

.stat-grid { display:grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); gap:16px; }
.stat-card { position:relative; overflow:hidden; }
.stat-card .ico { position:absolute; right:14px; top:14px; font-size:26px; opacity:.16; }
.stat-card .num { font-size:30px; font-weight:800; letter-spacing:-1px; }
.stat-card .lbl { color: var(--text-soft); font-size:13px; margin-top:2px; }
.stat-card .bar { height:6px; border-radius:6px; background:var(--brand); margin-top:12px; }
.stat-card.clickable { cursor:pointer; transition:all .2s; }
.stat-card.clickable:hover { border-color:var(--primary); transform:translateY(-2px); box-shadow:0 4px 12px rgba(0,0,0,.1); }

.person-link { display:inline-block; padding:2px 8px; background:var(--surface-2); border-radius:6px; font-weight:600; color:var(--primary); cursor:pointer; margin:2px; transition:all .2s; }
.person-link:hover { background:var(--primary); color:#fff; transform:scale(1.05); }

.timeline { position:relative; padding-left:22px; }
.timeline::before { content:""; position:absolute; left:6px; top:4px; bottom:4px; width:2px; background:var(--border); }
.tl-item { position:relative; padding:0 0 16px; }
.tl-item::before { content:""; position:absolute; left:-19px; top:4px; width:11px; height:11px; border-radius:50%; background:var(--primary); box-shadow:0 0 0 3px var(--surface); }
.tl-item .t { font-size:12px; color:var(--text-soft); }
.tl-item .a { font-size:14px; font-weight:600; }
.tl-item .n { font-size:13px; color:var(--text-soft); }

/* 流程时间线 V2（上下结构详情页） */
.timeline-v2 { position:relative; padding-left:20px; }
.timeline-v2::before { content:""; position:absolute; left:5px; top:6px; bottom:6px; width:2px; background:var(--border); }
.tl2-item { position:relative; padding:0 0 22px; }
.tl2-item:last-child { padding-bottom:0; }
.tl2-item::before { content:""; position:absolute; left:-18px; top:5px; width:10px; height:10px; border-radius:50%; background:var(--primary); box-shadow:0 0 0 3px var(--surface); }
.tl2-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.tl2-title { font-size:15px; font-weight:700; color:var(--text); }
.tl2-actor { font-size:13px; color:var(--text-soft); white-space:nowrap; }
.tl2-time { font-size:12px; color:var(--text-soft); margin-top:4px; }
.tl2-note { font-size:13px; color:var(--text-soft); margin-top:6px; line-height:1.6; }

.steps { display:flex; gap:8px; margin:8px 0 18px; flex-wrap:wrap; }
.step-pill { padding:6px 14px; border-radius:20px; font-size:13px; background:var(--surface-2); color:var(--text-soft); border:1px solid var(--border); cursor:pointer; transition: all .2s var(--ease); display:inline-flex; align-items:center; gap:6px; }
.step-pill .step-num { display:inline-flex; align-items:center; justify-content:center; width:20px; height:20px; border-radius:50%; background:var(--border); font-size:11px; font-weight:700; }
.step-pill.active { background:var(--brand); color:#fff; border-color:transparent; }
.step-pill.active .step-num { background:rgba(255,255,255,.25); color:#fff; }
.step-pill.done { background: rgba(16,185,129,.16); color:#059669; border-color:transparent; cursor:default; }
.step-pill.done .step-num { background:rgba(16,185,129,.3); color:#059669; }

.req { color: var(--danger); font-weight: 700; }
.assign-hint { margin-top: 12px; }

/* 确认信息区块 */
.confirm-section { display:grid; gap:16px; }
.confirm-group { border:1px solid var(--border); border-radius:14px; overflow:hidden; }
.confirm-group-title { padding:10px 16px; background:var(--surface-2); font-weight:700; font-size:14px; }
.confirm-row { display:flex; justify-content:space-between; padding:10px 16px; border-top:1px solid var(--border); font-size:14px; }
.confirm-row:first-of-type { border-top:none; }
.confirm-row .muted { min-width:100px; }

/* 文件标签 */
.file-tag { display:inline-flex; align-items:center; gap:4px; padding:4px 10px; border-radius:8px; background:var(--surface-2); font-size:12px; margin:2px; border:1px solid var(--border); }
.file-tag-x { cursor:pointer; color:var(--danger); font-weight:700; padding:0 2px; }
.file-tag-x:hover { background:rgba(239,68,68,.15); border-radius:4px; }

.option-list { display:flex; flex-direction:column; gap:10px; }
.option-btn {
  text-align:left; padding:13px 15px; border-radius:12px; border:1px solid var(--border);
  background:var(--surface); font-size:14px; transition: all .2s var(--ease); display:flex; align-items:flex-start; gap:10px;
}
.option-btn:hover { border-color: var(--primary); transform: translateX(3px); }
.option-btn.active { border-color: var(--primary); background: var(--brand-soft); }
.option-btn .k { flex-shrink:0; width:22px; height:22px; border-radius:7px; background:var(--surface-2); display:grid; place-items:center; font-size:12px; color:var(--text-soft); margin-top:2px; }
.option-btn.active .k { background:var(--primary); color:#fff; }
.steps-vertical { flex-direction:column; align-items:flex-start; gap:8px; }
.steps-vertical .step-pill { width:100%; justify-content:flex-start; }

.modal-mask { position:fixed; inset:0; background:rgba(8,12,24,.5); backdrop-filter: blur(4px); display:grid; place-items:center; z-index:60; padding:20px; animation: fade .2s ease; }
@keyframes fade { from{opacity:0;} to{opacity:1;} }
.modal { width:min(560px,100%); background:var(--surface); border:1px solid var(--border); border-radius:18px; padding:24px; box-shadow:var(--shadow-lg); animation: rise .3s var(--ease) both; }
.modal h3 { margin:0 0 14px; }

.toast-wrap { position:fixed; right:20px; bottom:20px; display:flex; flex-direction:column; gap:10px; z-index:80; }
.toast { background:var(--surface); border:1px solid var(--border); border-left:4px solid var(--ok); padding:12px 16px; border-radius:12px; box-shadow:var(--shadow-lg); font-size:14px; animation: rise .3s var(--ease) both; min-width:220px; }

.section-head { display:flex; align-items:center; gap:12px; margin-bottom:16px; }
.section-head h2 { font-size:18px; margin:0; }
.muted { color: var(--text-soft); }
.pill-tabs { display:flex; gap:6px; flex-wrap:wrap; }
.pill-tab { padding:7px 13px; border-radius:20px; font-size:13px; border:1px solid var(--border); background:var(--surface); color:var(--text-soft); transition: all .2s; }
.pill-tab.active { background:var(--brand); color:#fff; border-color:transparent; }

.empty { text-align:center; color:var(--text-soft); padding:50px 0; }
.toolbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:16px; }

.theme-toggle { display:flex; border:1px solid var(--border); border-radius:11px; overflow:hidden; }
.theme-toggle button { background:var(--surface); border:none; padding:7px 11px; font-size:14px; color:var(--text-soft); transition: all .2s; }
.theme-toggle button.active { background:var(--brand); color:#fff; }

.icon-btn { width:38px; height:38px; border-radius:11px; border:1px solid var(--border); background:var(--surface); display:grid; place-items:center; font-size:16px; position:relative; transition: all .2s; }
.icon-btn:hover { transform: translateY(-1px); }
.icon-btn .dotn { position:absolute; top:-4px; right:-4px; background:var(--danger); color:#fff; font-size:10px; min-width:17px; height:17px; border-radius:9px; display:grid; place-items:center; padding:0 4px; }

.kb-tree { max-height: 420px; overflow:auto; border-right:1px solid var(--border); }
.kb-cat { padding:9px 12px; border-radius:10px; font-size:14px; cursor:pointer; display:flex; justify-content:space-between; transition: all .2s; }
.kb-cat:hover { background:var(--surface-2); }
.kb-cat.active { background:var(--brand-soft); color:var(--primary); font-weight:700; }

/* 常见故障排查 — 新折叠面板样式 */
.kb-cat-tabs { display:flex; flex-wrap:wrap; gap:10px; margin-top:8px; }
.kb-cat-pill { display:inline-flex; align-items:center; gap:8px; padding:10px 16px; border-radius:14px; background:var(--surface); border:1px solid var(--border); font-size:14px; cursor:pointer; transition: all .2s var(--ease); user-select:none; }
.kb-cat-pill:hover { border-color:var(--primary); transform: translateY(-1px); }
.kb-cat-pill.active { background:var(--brand); color:#fff; border-color:transparent; box-shadow: var(--shadow); }
.kb-cat-pill.active .badge { background:rgba(255,255,255,.2) !important; color:#fff !important; }
.kb-cat-ico { font-size:16px; }
.kb-list { display:flex; flex-direction:column; gap:10px; }
.kb-item { padding:0; overflow:hidden; transition: all .2s; }
.kb-item:hover { box-shadow: var(--shadow); }
.kb-head { display:flex; justify-content:space-between; align-items:center; padding:16px 18px; cursor:pointer; user-select:none; }
.kb-head-left { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.kb-title { font-size:15px; color:var(--text); }
.kb-tag { display:inline-block; padding:3px 10px; border-radius:8px; font-size:12px; font-weight:600; }
.kb-tag.cat-启动电池   { background:rgba(245,158,11,.15); color:#d97706; }
.kb-tag.cat-免维护     { background:rgba(59,130,246,.15); color:#2563eb; }
.kb-tag.cat-小锂电     { background:rgba(16,185,129,.15); color:#059669; }
.kb-tag.cat-锂电池     { background:rgba(20,184,166,.15); color:#0d9488; }
.kb-tag.cat-锂电充电机 { background:rgba(139,92,246,.15); color:#7c3aed; }
.kb-tag.cat-铅酸蓄电池 { background:rgba(100,116,139,.18); color:#475569; }
.kb-tag.cat-轮胎       { background:rgba(244,114,182,.15); color:#db2777; }
.kb-tag.cat-轮胎类     { background:rgba(244,114,182,.15); color:#db2777; }
.kb-arrow { display:inline-block; font-size:18px; color:var(--text-soft); transition: transform .25s var(--ease); margin-left:4px; }
.kb-arrow.open { transform: rotate(90deg); color:var(--primary); }
.kb-body { padding:0 18px 18px 18px; border-top:1px dashed var(--border); }
.kb-cause { padding:14px 0; border-bottom:1px dashed var(--border); }
.kb-cause:last-child { border-bottom:none; }
.kb-cause-title { display:flex; align-items:center; gap:8px; margin-bottom:8px; font-size:14px; color:var(--text); }
.kb-cause-num { display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px; border-radius:50%; background:var(--brand-soft); color:var(--primary); font-size:12px; font-weight:700; }
.kb-cause-steps { padding-left:30px; }
.kb-step { font-size:13.5px; color:var(--text); line-height:1.85; padding:2px 0; }
.kb-edit-cause { border:1px dashed var(--border); border-radius:10px; padding:12px; margin-bottom:10px; display:flex; flex-direction:column; gap:8px; }

.fade-enter-active, .fade-leave-active { transition: opacity .25s, transform .25s; }
.fade-enter-from, .fade-leave-to { opacity:0; transform: translateY(8px); }

/* 检测详情 — 流程进度条 */
.stepper { display:flex; align-items:center; gap:0; margin: 4px 0 14px; flex-wrap:wrap; }
.step { display:flex; align-items:center; gap:8px; color:var(--text-soft); font-size:13.5px; }
.step-dot { width:24px; height:24px; border-radius:50%; display:grid; place-items:center; font-size:12px; font-weight:700; background:var(--surface-2); border:1px solid var(--border); color:var(--text-soft); }
.step.done .step-dot { background:var(--brand); color:#fff; border-color:transparent; }
.step.active .step-dot { background:var(--primary); color:#fff; border-color:transparent; box-shadow:0 0 0 4px var(--brand-soft); }
.step.active .step-lbl { color:var(--text); font-weight:700; }
.step:not(:last-child)::after { content:''; width:36px; height:2px; background:var(--border); margin:0 10px; }
.step.done:not(:last-child)::after { background:var(--brand); }

/* 检测详情 — 待办提示横幅 */
.banner { display:flex; align-items:center; gap:10px; padding:12px 16px; border-radius:12px; margin-bottom:16px; font-size:14px; line-height:1.5; }
.banner-info { background:var(--brand-soft); border:1px solid rgba(99,102,241,.25); color:var(--text); }
.banner-warn { background:rgba(245,158,11,.12); border:1px solid rgba(245,158,11,.45); color:#b45309; }
.banner-ico { font-size:16px; }
.banner-text { flex:1; }
.banner-tag { font-size:12px; opacity:.75; }

/* 弹窗 modal */
.modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:200; display:flex; align-items:center; justify-content:center; padding:20px; }
.modal-box { background:var(--surface); border-radius:16px; width:100%; max-width:520px; max-height:85vh; display:flex; flex-direction:column; box-shadow:0 20px 60px rgba(0,0,0,.3); }
.modal-box.modal-lg { max-width:720px; }
.modal-head { display:flex; align-items:center; justify-content:space-between; padding:16px 20px; border-bottom:1px solid var(--border); }
.modal-head h3 { margin:0; font-size:17px; }
.modal-close { background:none; border:none; font-size:18px; cursor:pointer; color:var(--text-soft); padding:4px 8px; border-radius:6px; }
.modal-close:hover { background:var(--surface-2); }
.modal-body { padding:20px; overflow-y:auto; flex:1; }
.modal-foot { display:flex; justify-content:flex-end; gap:8px; padding:12px 20px; border-top:1px solid var(--border); }

/* 回复操作提醒 */
.reply-reminder { margin-top:12px; padding:14px 16px; border-radius:10px; background:rgba(99,102,241,.08); border:1px solid rgba(99,102,241,.3); }
.reply-reminder-title { font-weight:700; font-size:14px; margin-bottom:6px; color:var(--primary); }
.reply-reminder-body { font-size:13.5px; line-height:1.7; color:var(--text); white-space:pre-line; }

/* 纸质报告 */
.paper-report { background:#fff; color:#000; padding:32px; border-radius:4px; font-family:'SimSun','Times New Roman',serif; }
:root[data-theme="dark"] .paper-report { background:#f5f5f5; }
.paper-header { text-align:center; margin-bottom:24px; }
.paper-company { font-size:22px; font-weight:bold; letter-spacing:4px; margin-bottom:10px; color:#000; }
.paper-meta { font-size:12px; color:#555; display:flex; justify-content:center; gap:24px; flex-wrap:wrap; }
.paper-table { width:100%; border-collapse:collapse; margin-bottom:16px; }
.paper-table td { border:1px solid #999; padding:6px 10px; font-size:13.5px; color:#000; }
.paper-label { background:#f0f0f0; font-weight:bold; width:15%; }
.paper-section { margin-bottom:16px; }
.paper-section-title { font-weight:bold; font-size:14px; margin-bottom:6px; border-left:3px solid #333; padding-left:8px; color:#000; }
.paper-section-body { font-size:13.5px; padding-left:8px; line-height:1.8; color:#000; }
.paper-sign { margin-top:40px; display:flex; justify-content:space-between; font-size:13.5px; color:#000; }

/* 可点击行 */
.row-clickable { cursor:pointer; transition:background .15s; }
.row-clickable:hover { background:var(--surface-2); }

/* ===========================================================
 * 待办卡片行（整行可点击进入详情弹窗）
 * =========================================================== */
.todo-list { display:flex; flex-direction:column; gap:10px; }
.todo-card {
  position:relative; overflow:hidden; display:flex; align-items:center; gap:14px;
  padding:14px 16px 14px 20px; background:var(--surface); border:1px solid var(--border);
  border-radius:14px; cursor:pointer; transition:all .22s var(--ease);
}
.todo-card:hover { transform:translateY(-2px); box-shadow:var(--shadow); border-color:var(--primary); }
.todo-card:active { transform:translateY(0); }
.todo-bar { position:absolute; left:0; top:0; bottom:0; width:5px; }
.todo-card.bar-amber .todo-bar { background:var(--warn); }
.todo-card.bar-blue .todo-bar { background:#3b82f6; }
.todo-card.bar-purple .todo-bar { background:#8b5cf6; }
.todo-card.bar-green .todo-bar { background:var(--ok); }
.todo-card.bar-cyan .todo-bar { background:#06b6d4; }
.todo-card.bar-red .todo-bar { background:var(--danger); }
.todo-main { flex:1; min-width:0; }
.todo-no { font-weight:700; font-size:15px; letter-spacing:.3px; }
.todo-sub { font-size:13px; color:var(--text-soft); margin-top:3px; display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.todo-customer { color:var(--text); font-weight:600; }
.todo-actions { display:flex; gap:8px; flex-shrink:0; align-items:center; }

/* ===========================================================
 * 检测详情弹窗（大号抽屉）
 * =========================================================== */
.modal-box.modal-drawer { max-width:920px; max-height:92vh; width:100%; }
.modal-drawer .modal-head { padding:18px 22px; }
.modal-drawer .modal-title { display:flex; align-items:center; gap:12px; flex:1; min-width:0; }
.modal-drawer .modal-title h3 { margin:0; font-size:18px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.modal-drawer .modal-body { padding:20px 24px 24px; }
.modal-drawer .card + .card { margin-top:16px; }

/* 弹窗内产品信息 — 物料明细表 */
.mat-table { width:100%; border-collapse:collapse; margin-top:10px; font-size:13px; }
.mat-table th { text-align:left; color:var(--text-soft); font-weight:600; padding:8px 10px; background:var(--surface-2); border:1px solid var(--border); }
.mat-table td { padding:8px 10px; border:1px solid var(--border); }
.mat-table tr:nth-child(even) td { background:var(--surface-2); }

/* 弹窗内嵌质检表单 */
.qc-embed { background:var(--brand-soft); border:1px solid rgba(99,102,241,.25); border-radius:12px; padding:16px 18px; }
.qc-step-title { font-weight:700; font-size:15px; margin-bottom:4px; }
.qc-step-hint { color:var(--text-soft); font-size:13px; margin-bottom:14px; }
.qc-nav { display:flex; justify-content:space-between; gap:10px; margin-top:18px; }
.qc-mini-steps { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.qc-mini-pill { padding:6px 12px; border-radius:20px; font-size:12.5px; border:1px solid var(--border); background:var(--surface); color:var(--text-soft); }
.qc-mini-pill.active { background:var(--brand); color:#fff; border-color:transparent; }
.qc-mini-pill.done { background:var(--surface-2); color:var(--ok); border-color:transparent; }

/* 弹窗顶部操作栏 */
.modal-actions { display:flex; flex-wrap:wrap; gap:8px; padding:12px 20px; border-bottom:1px solid var(--border); background:var(--surface-2); }
.modal-drawer .modal-actions { padding:12px 24px; }

/* 新建申请单 — 流程说明横幅 */
.process-banner { display:flex; align-items:flex-start; gap:12px; padding:14px 16px; border-radius:12px; background:rgba(59,130,246,.1); border:1px solid rgba(59,130,246,.25); color:var(--text); font-size:14px; line-height:1.6; margin-bottom:18px; }
.process-banner-ico { font-size:18px; flex-shrink:0; }

/* 表单分区标题 */
.form-section-title { display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:15px; font-weight:700; color:var(--text); margin:18px 0 12px; padding-bottom:8px; border-bottom:1px solid var(--border); }
.form-section-title:first-child { margin-top:0; }
.form-hint { font-size:13px; color:var(--text-soft); margin-top:8px; line-height:1.5; }

/* 四列网格 */
.grid-4 { display:grid; grid-template-columns:repeat(4, 1fr); gap:16px; }

/* 产品明细行 */
.product-row { background:var(--surface-2); border:1px solid var(--border); border-radius:12px; padding:14px 16px; margin-bottom:12px; }
.product-row-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.product-row-title { font-size:14px; font-weight:700; color:var(--primary); }

/* 列表整行可点击 */
.clickable-row { cursor:pointer; transition:background .15s var(--ease); }
.clickable-row:hover { background:var(--surface-2); }

@media (max-width: 760px){
  .grid-4 { grid-template-columns:repeat(2, 1fr); }
  .modal-actions { padding:10px 16px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position:fixed; z-index:50; width: var(--sidebar-w); transform: translateX(-100%); }
  .sidebar.open { transform:none; }
  .content { padding:16px; }
  .topbar { padding:12px 16px; }
  .todo-card { flex-wrap:wrap; }
  .todo-actions { width:100%; justify-content:flex-end; }
  .modal-box.modal-drawer { max-width:100%; width:100%; }
  .modal-drawer .modal-body { padding:16px; }
}
