/* ==========================================================================
   应用框架：侧边导航 / 顶部栏 / 页面主体 / 页脚 / 业务组件
   ========================================================================== */
.app-shell { min-height: 100vh; background: radial-gradient(1200px 500px at 100% -10%, #e7f3f7 0%, transparent 60%), var(--bg); }

/* ---------------- 侧边栏 ---------------- */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0b2137 0%, #0a1c2f 55%, #081827 100%);
  color: #cfe0ee;
  transition: width .2s ease, transform .24s ease;
  box-shadow: 8px 0 30px rgba(7, 22, 37, .12);
}
.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(120, 190, 210, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(120, 190, 210, .045) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
}
.sidebar-brand { position: relative; display: flex; align-items: center; gap: 10px; height: var(--topbar-h); padding: 0 18px; border-bottom: 1px solid rgba(140, 190, 220, .12); flex: none; }
.brand-mark { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 9px; background: linear-gradient(145deg, #11a4bd, #0b6a84); box-shadow: 0 6px 16px rgba(11, 106, 132, .4); }
.brand-mark svg { width: 20px; height: 20px; }
.brand-text { min-width: 0; }
.brand-text b { display: block; font-size: 12.5px; font-weight: 700; color: #f3f9ff; letter-spacing: .01em; line-height: 1.42; white-space: normal; }
.brand-text b .brand-ver { display: inline-block; margin-left: 5px; padding: 0 5px; border-radius: 4px; background: rgba(159, 233, 245, .16); border: 1px solid rgba(159, 233, 245, .3); color: #9fe9f5; font-size: 9.5px; font-weight: 700; letter-spacing: .03em; vertical-align: 1px; line-height: 1.5; }
.brand-text span { display: block; font-size: 9.5px; color: #7fa4c2; letter-spacing: .1em; white-space: nowrap; margin-top: 3px; }
.sidebar-collapse { margin-left: auto; width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 6px; color: #7fa4c2; }
.sidebar-collapse:hover { background: rgba(255, 255, 255, .07); color: #dbe9f5; }
.sidebar-nav { position: relative; flex: 1; overflow-y: auto; overflow-x: hidden; padding: 12px 10px 10px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(160, 200, 225, .2); background-clip: content-box; }
.menu-group { margin-bottom: 8px; }
.menu-group-label { padding: 10px 12px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; color: #5f819f; white-space: nowrap; }
.menu-item { display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 12px; margin: 2px 0; border-radius: 9px; color: #aec6d9; font-size: 13px; font-weight: 500; white-space: nowrap; position: relative; transition: background .14s, color .14s; }
.menu-item .icon { width: 18px; height: 18px; color: #7fa4c2; transition: color .14s; }
.menu-item:hover { background: rgba(255, 255, 255, .055); color: #eaf4fc; }
.menu-item:hover .icon { color: #b9d7e8; }
.menu-item.active { background: linear-gradient(90deg, rgba(17, 164, 189, .22), rgba(17, 164, 189, .06)); color: #fff; font-weight: 600; }
.menu-item.active::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #18bcd8; box-shadow: 0 0 10px rgba(24, 188, 216, .7); }
.menu-item.active .icon { color: #35d0e8; }
.menu-item .menu-text { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.menu-item .menu-dot { width: 6px; height: 6px; border-radius: 50%; background: #f2a93b; flex: none; }
.sidebar-foot { position: relative; flex: none; padding: 12px; border-top: 1px solid rgba(140, 190, 220, .12); }
.sidebar-tip { padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .045); border: 1px solid rgba(140, 190, 220, .12); }
.sidebar-tip .t { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #9fc0d8; font-weight: 600; }
.sidebar-tip .d { font-size: 10.5px; color: #6f93af; margin-top: 3px; line-height: 1.5; }
.sidebar-tip .icon { width: 14px; height: 14px; color: #35d0e8; }

.app-shell.collapsed .sidebar { width: var(--sidebar-w-collapsed); }
.app-shell.collapsed .brand-text, .app-shell.collapsed .menu-group-label, .app-shell.collapsed .menu-text, .app-shell.collapsed .menu-dot, .app-shell.collapsed .sidebar-tip { display: none; }
.app-shell.collapsed .sidebar-brand { justify-content: center; padding: 0; }
.app-shell.collapsed .sidebar-collapse { display: none; }
.app-shell.collapsed .menu-item { justify-content: center; padding: 0; }
.app-shell.collapsed .menu-item.active::before { left: 0; }
.app-shell.collapsed .sidebar-foot { display: none; }
.app-shell.collapsed .app-main { margin-left: var(--sidebar-w-collapsed); }

/* ---------------- 主区域 ---------------- */
.app-main { display: flex; flex-direction: column; min-height: 100vh; margin-left: var(--sidebar-w); transition: margin-left .2s ease; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.menu-toggle { display: none; width: 34px; height: 34px; place-items: center; border-radius: 8px; color: var(--ink-2); border: 1px solid var(--line); background: #fff; }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-4); white-space: nowrap; }
.crumb b { color: var(--ink); font-weight: 600; }
.crumb .sep { color: #c4d2e0; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.global-search { position: relative; width: 250px; }
.global-search .input { height: 34px; background: #f5f8fb; border-color: transparent; padding-left: 34px; font-size: 12.5px; }
.global-search .input:focus { background: #fff; border-color: var(--brand); }
.global-search > .icon { position: absolute; left: 11px; top: 9px; color: var(--ink-4); width: 16px; height: 16px; }
.search-pop { position: absolute; top: 40px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; z-index: 80; min-width: 300px; }
.search-pop .sp-head { font-size: 10.5px; color: var(--ink-4); padding: 5px 9px; letter-spacing: .05em; }
.search-pop a { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 7px; color: var(--ink-2); font-size: 12.5px; }
.search-pop a:hover { background: #f3f8fb; }
.search-pop a b { font-weight: 600; color: var(--ink); }
.search-pop a .sp-meta { margin-left: auto; font-size: 11px; color: var(--ink-4); }
.top-icon-btn { position: relative; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: var(--ink-3); border: 1px solid transparent; }
.top-icon-btn:hover { background: #f2f6fa; color: var(--ink); }
.top-icon-btn .icon { width: 18px; height: 18px; }
.top-icon-btn .dot-badge { position: absolute; top: 4px; right: 3px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 99px; background: #e2494f; color: #fff; font-size: 9.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.top-date { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; padding: 0 6px; border-left: 1px solid var(--line); margin-left: 4px; }
.top-date b { font-size: 11.5px; color: var(--ink-2); font-weight: 600; }
.top-date span { font-size: 10.5px; color: var(--ink-4); }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 4px 8px 4px 4px; border-radius: 99px; border: 1px solid transparent; }
.user-chip:hover { background: #f3f7fb; border-color: var(--line); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, #0e7490, #0b5d75); color: #fff; font-size: 12px; font-weight: 700; flex: none; }
.user-chip .u { line-height: 1.25; text-align: left; }
.user-chip .u b { display: block; font-size: 12.5px; color: var(--ink); font-weight: 600; }
.user-chip .u span { display: block; font-size: 10.5px; color: var(--ink-4); }
.user-chip .chev { color: var(--ink-4); }

.popover { position: absolute; top: 58px; right: 18px; z-index: 90; width: 330px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); animation: popIn .16s ease; }
.popover.pop-user { width: 220px; }
@keyframes popIn { from { opacity: 0; transform: translateY(-5px); } }
.pop-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 15px 10px; border-bottom: 1px solid #eef3f8; }
.pop-head b { font-size: 13px; }
.pop-head span { font-size: 11px; color: var(--ink-4); }
.pop-list { padding: 6px; max-height: 320px; overflow-y: auto; }
.pop-item { display: flex; gap: 9px; padding: 9px 10px; border-radius: 8px; }
.pop-item:hover { background: #f6fafc; }
.pop-item .pi-icon { width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--amber-soft); color: var(--amber); }
.pop-item .pi-icon .icon { width: 15px; height: 15px; }
.pop-item .pi-main { min-width: 0; font-size: 12px; color: var(--ink-2); }
.pop-item .pi-main b { font-weight: 600; color: var(--ink); }
.pop-item .pi-main span { display: block; color: var(--ink-4); font-size: 11px; }
.pop-foot { padding: 9px 15px; border-top: 1px solid #eef3f8; text-align: center; }
.pop-menu { padding: 6px; }
.pop-menu button, .pop-menu a { display: flex; width: 100%; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 8px; font-size: 12.5px; color: var(--ink-2); text-align: left; }
.pop-menu button:hover, .pop-menu a:hover { background: #f4f8fb; color: var(--ink); }
.pop-menu .danger:hover { background: var(--red-soft); color: var(--red); }
.pop-menu .icon { width: 16px; height: 16px; color: var(--ink-4); }
.pop-menu .danger .icon { color: var(--red); }

.view { flex: 1; padding: 22px 26px 34px; min-width: 0; animation: pageIn .22s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(5px); } }
.app-footer { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 26px; border-top: 1px solid var(--line); color: var(--ink-4); font-size: 11.5px; background: rgba(255, 255, 255, .6); flex-wrap: wrap; }
.app-footer .fl { display: flex; align-items: center; gap: 7px; }
.app-footer .sep { color: #ccd9e5; }

/* ---------------- 页面头部 ---------------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.page-head .desc { font-size: 12.5px; color: var(--ink-4); margin-top: 4px; max-width: 760px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------------- 筛选栏 ---------------- */
.filter-bar { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; padding: 13px 15px; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.filter-bar .f-item { display: flex; flex-direction: column; gap: 4px; }
.filter-bar .f-item > label { font-size: 10.5px; color: var(--ink-4); font-weight: 600; padding-left: 2px; }
.filter-bar .input, .filter-bar .select { height: 34px; font-size: 12.5px; }
.filter-bar .f-search { width: 220px; }
.filter-bar .f-sm { width: 130px; }
.filter-bar .f-md { width: 150px; }
.filter-spacer { flex: 1; }
.filter-bar .btn { height: 34px; }

/* ---------------- 数据卡片 ---------------- */
.panel { background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-sm); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 17px; border-bottom: 1px solid #eef3f8; }
.panel-head h3 { font-size: 14px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.panel-head h3 .count { font-size: 11px; font-weight: 600; color: var(--brand); background: var(--brand-soft); border-radius: 99px; padding: 2px 8px; }
.panel-head .right { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-4); }
.panel-body { padding: 16px 17px; }
.panel-body.flush { padding: 0; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid #eef3f8; font-size: 12px; color: var(--ink-4); }
.pager .pages { display: flex; gap: 4px; }
.pager button { min-width: 28px; height: 28px; padding: 0 7px; border-radius: 6px; border: 1px solid var(--line); background: #fff; font-size: 12px; color: var(--ink-3); }
.pager button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager button:disabled { opacity: .45; cursor: not-allowed; }
.pager-btns { display: flex; gap: 6px; }
.pager-btns .btn { height: 30px; padding: 0 10px; font-size: 12px; }
.ledger-filter { align-items: flex-end; }
.ledger-preset { display: flex; align-items: center; gap: 6px; margin: -4px 0 12px; padding: 8px 12px; border: 1px solid #cfe9f0; background: var(--brand-soft); border-radius: 9px; color: #0b6173; font-size: 12px; }
.ledger-preset .icon { width: 14px; height: 14px; flex: none; }
.trace-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.trace-type { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 99px; background: var(--brand-soft); color: #0b6173; font-size: 11.5px; font-weight: 700; }
.log-detail { display: block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-size: 12px; }
.log-detail-box { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #f9fbfd; }
.log-detail-box .k { font-size: 11.5px; color: var(--ink-4); margin-bottom: 5px; }
.log-detail-box p { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.7; word-break: break-word; }

/* ---------------- KPI 卡片 ---------------- */
.kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 15px 16px; box-shadow: var(--shadow-sm); overflow: hidden; }
.kpi-card::after { content: ""; position: absolute; right: -26px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--brand-soft); opacity: .55; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: relative; z-index: 1; }
.kpi-label { font-size: 12px; color: var(--ink-4); font-weight: 600; }
.kpi-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.kpi-ico .icon { width: 16px; height: 16px; }
.kpi-ico.amber { background: var(--amber-soft); color: var(--amber); }
.kpi-ico.green { background: var(--green-soft); color: var(--green); }
.kpi-ico.red { background: var(--red-soft); color: var(--red); }
.kpi-ico.purple { background: var(--purple-soft); color: var(--purple); }
.kpi-value { position: relative; z-index: 1; font-size: 25px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); line-height: 1.25; margin-top: 9px; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 12px; color: var(--ink-4); font-weight: 500; margin-left: 2px; }
.kpi-foot { position: relative; z-index: 1; font-size: 11px; color: var(--ink-4); margin-top: 4px; display: flex; align-items: center; gap: 5px; }

/* ---------------- 工作台 ---------------- */
.hero-band { position: relative; overflow: hidden; border-radius: 16px; padding: 22px 24px; margin-bottom: 14px; color: #eaf6fb; background: linear-gradient(115deg, #0b2c44 0%, #0e4960 55%, #0e7490 120%); box-shadow: 0 16px 40px rgba(10, 45, 68, .22); }
.hero-band::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle at 80% 20%, rgba(53, 208, 232, .22), transparent 38%), linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px); background-size: auto, 30px 30px, 30px 30px; mask-image: linear-gradient(90deg, transparent 30%, #000 100%); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.hero-band .eyebrow { font-size: 10.5px; letter-spacing: .14em; color: #7fd6e7; font-weight: 700; }
.hero-band h2 { font-size: 21px; font-weight: 700; margin-top: 5px; letter-spacing: .01em; }
.hero-band p { font-size: 12.5px; color: #a9d0df; margin-top: 5px; max-width: 640px; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-actions .btn { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); color: #eaf6fb; height: 34px; font-size: 12.5px; backdrop-filter: blur(4px); }
.hero-actions .btn:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.hero-actions .btn-accent { background: linear-gradient(135deg, #f7ab24, #e08a00); border-color: transparent; color: #fff; }
.hero-meta { display: flex; gap: 20px; margin-top: 14px; flex-wrap: wrap; }
.hero-meta .hm { display: flex; flex-direction: column; gap: 1px; }
.hero-meta .hm span { font-size: 10.5px; color: #7fa9bf; }
.hero-meta .hm b { font-size: 15px; color: #f2fbff; font-weight: 700; font-variant-numeric: tabular-nums; }

.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.dash-grid .span-8 { grid-column: span 8; }
.dash-grid .span-4 { grid-column: span 4; }
.chart-box { position: relative; height: 258px; }
.chart-box canvas { width: 100%; height: 100%; }
.chart-tip { position: absolute; pointer-events: none; z-index: 10; min-width: 118px; padding: 8px 10px; border-radius: 8px; background: rgba(11, 33, 55, .94); color: #eaf6fb; font-size: 11.5px; box-shadow: 0 10px 26px rgba(8, 24, 42, .28); transform: translate(-50%, -112%); display: none; }
.chart-tip b { color: #fff; }
.chart-tip .row { display: flex; justify-content: space-between; gap: 14px; }
.chart-legend { display: flex; align-items: center; gap: 14px; font-size: 11.5px; color: var(--ink-3); }
.chart-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: 1px; }
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut-canvas { width: 150px; height: 150px; flex: none; }
.donut-legend { flex: 1; min-width: 130px; display: flex; flex-direction: column; gap: 7px; }
.donut-legend .dl { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-3); }
.donut-legend .dl i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.donut-legend .dl b { margin-left: auto; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed #edf2f7; }
.list-row:last-child { border-bottom: 0; }
.list-row .lr-ico { width: 30px; height: 30px; border-radius: 8px; flex: none; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.list-row .lr-ico.warn { background: var(--amber-soft); color: var(--amber); }
.list-row .lr-ico .icon { width: 15px; height: 15px; }
.list-row .lr-main { flex: 1; min-width: 0; }
.list-row .lr-main b { display: block; font-size: 12.5px; color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .lr-main span { display: block; font-size: 11px; color: var(--ink-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .lr-val { text-align: right; flex: none; font-size: 12.5px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.list-row .lr-val span { display: block; font-size: 10.5px; color: var(--ink-4); font-weight: 400; }
.activity-line { margin: 12px 0; }
.activity-line .al-top { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; margin-bottom: 5px; }
.activity-line .al-top b { font-weight: 600; color: var(--ink); }
.activity-line .al-top span { color: var(--ink-4); font-size: 11px; }
.activity-line .al-meta { display: flex; justify-content: space-between; margin-top: 5px; font-size: 10.5px; color: var(--ink-4); }

/* ---------------- 详情 / 明细 ---------------- */
.detail-section { margin-bottom: 18px; }
.detail-section:last-child { margin-bottom: 0; }
.detail-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 9px; }
.detail-title .sub { font-size: 11px; color: var(--ink-4); font-weight: 400; }
.mini-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.mini-metric { background: #f7fafc; border: 1px solid #edf2f7; border-radius: 9px; padding: 10px 12px; }
.mini-metric span { display: block; font-size: 10.5px; color: var(--ink-4); }
.mini-metric b { display: block; font-size: 17px; font-weight: 700; color: var(--ink); margin-top: 2px; font-variant-numeric: tabular-nums; }
.mini-metric b.green { color: var(--green); } .mini-metric b.red { color: var(--red); } .mini-metric b.amber { color: var(--amber); }
@media (max-width: 560px) { .mini-metrics { grid-template-columns: repeat(2, 1fr); } }
.route-visual { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #f7fafc; border: 1px solid #edf2f7; border-radius: 10px; margin-bottom: 14px; }
.route-visual .wh { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink); }
.route-visual .wh .icon { color: var(--brand); }
.route-arrow { flex: 1; position: relative; height: 1px; background: repeating-linear-gradient(90deg, #b9cddd 0 6px, transparent 6px 11px); }
.route-arrow .icon { position: absolute; left: 50%; top: -9px; transform: translateX(-50%); background: #f7fafc; padding: 0 4px; color: var(--brand); }
.status-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.status-step { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-4); }
.status-step .dot { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 9px; color: var(--ink-4); background: #fff; }
.status-step.done { color: var(--ink-2); }
.status-step.done .dot { background: var(--green); border-color: var(--green); color: #fff; }
.status-step.current .dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.status-line .line { width: 18px; height: 1px; background: var(--line-strong); }
.item-editor { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.item-editor table { font-size: 12.5px; }
.item-editor thead th { background: #f6f9fc; padding: 8px 10px; font-size: 11px; color: var(--ink-3); text-align: left; font-weight: 700; }
.item-editor tbody td { padding: 7px 8px; border-top: 1px solid #eef3f8; vertical-align: top; }
.item-editor .input, .item-editor .select { height: 32px; font-size: 12px; padding: 0 9px; border-radius: 7px; }
.item-editor .select { padding-right: 26px; background-position: right 8px center; }
.item-editor .row-total { font-size: 12px; font-weight: 600; color: var(--ink); text-align: right; padding-top: 14px; font-variant-numeric: tabular-nums; }
.item-editor .rm { color: var(--ink-4); width: 26px; height: 32px; display: grid; place-items: center; border-radius: 6px; }
.item-editor .rm:hover { color: var(--red); background: var(--red-soft); }
.editor-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border-top: 1px solid #eef3f8; background: #fbfdff; font-size: 11.5px; color: var(--ink-4); }
.editor-foot b { color: var(--ink); font-size: 13px; }

/* ---------------- 供应商 / 预警等 ---------------- */
.warn-meter { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.warn-meter .progress { flex: 1; }
.warn-meter span { font-size: 11px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.check-row { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); cursor: pointer; }
.check-row input { width: 15px; height: 15px; accent-color: var(--brand); }
.checkbox { width: 15px; height: 15px; accent-color: var(--brand); }
.suggest-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.suggest-toolbar .coef-input { width: 74px; height: 32px; text-align: center; }
.suggest-note { font-size: 11px; color: var(--ink-4); }
.lock-progress { min-width: 130px; }
.lock-progress .lp-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--ink-4); margin-top: 3px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .dash-grid .span-8 { grid-column: span 12; }
  .dash-grid .span-4 { grid-column: span 6; }
}
@media (max-width: 1000px) {
  .global-search { display: none; }
  .top-date { display: none; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); width: var(--sidebar-w); }
  .app-shell.menu-open .sidebar { transform: translateX(0); }
  .app-shell.collapsed .sidebar { width: var(--sidebar-w); }
  .app-main, .app-shell.collapsed .app-main { margin-left: 0; }
  .menu-toggle { display: grid; }
  .sidebar-collapse { display: none; }
  .app-shell.collapsed .brand-text, .app-shell.collapsed .menu-group-label,
  .app-shell.collapsed .menu-text, .app-shell.collapsed .sidebar-tip { display: block; }
  .app-shell.collapsed .menu-item { justify-content: flex-start; padding: 0 12px; }
  .app-shell.collapsed .sidebar-foot { display: block; }
  .app-shell.collapsed .sidebar-brand { padding: 0 18px; }
  .view { padding: 18px 16px 28px; }
  .topbar { padding: 0 14px; }
  .dash-grid .span-4 { grid-column: span 12; }
}
@media (max-width: 720px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .page-head h1 { font-size: 19px; }
  .filter-bar .f-search { width: 100%; }
  .filter-bar .f-item { flex: 1; min-width: 130px; }
  .filter-bar .f-search { min-width: 100%; }
  .user-chip .u { display: none; }
  .crumb { display: none; }
  .app-footer { justify-content: center; text-align: center; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi-value { font-size: 21px; }
  .topbar-right { gap: 2px; }
  .top-icon-btn { width: 30px; }
  .hero-band { padding: 18px; }
  .hero-band h2 { font-size: 18px; }
}

/* 移动端遮罩 */
.sidebar-mask { display: none; }
@media (max-width: 900px) {
  .app-shell.menu-open .sidebar-mask { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(5, 18, 31, .45); backdrop-filter: blur(2px); }
}
