/* ============================================================
   2026-11 体验升级：导航折叠 / 分析中心 / 大屏 / 手机端 / 弹窗最大化
   在 app.css 之后加载，覆盖基础样式
   ============================================================ */

:root {
  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-base: 13px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 19px;
  --fs-kpi: 23px;
}
body { font-size: var(--fs-base); }
.page-title { font-size: var(--fs-xl); font-weight: 660; }
.page-sub { font-size: var(--fs-sm); line-height: 1.75; }
.card-head h3 { font-size: var(--fs-md); }
.tbl th { font-size: var(--fs-xs); letter-spacing: .02em; }
.tbl td { font-size: var(--fs-sm); }
.tiny { font-size: var(--fs-xs); }
.small { font-size: var(--fs-sm); }
.btn { font-size: var(--fs-sm); }
.input, .select, textarea { font-size: var(--fs-sm); }

/* ---------- 侧栏收起 ---------- */
.side-collapse {
  margin-left: auto; width: 24px; height: 24px; border-radius: 6px; border: 0;
  background: rgba(255,255,255,.06); color: #8ea6bd; display: grid; place-items: center; cursor: pointer;
}
.side-collapse:hover { background: rgba(255,255,255,.14); color: #fff; }
.side-collapse svg { width: 14px; height: 14px; }
.collapse-btn { display: grid; }
body.side-collapsed .side { width: 0; transform: translateX(-100%); overflow: hidden; }
body.side-collapsed .main { margin-left: 0; }
.main { transition: margin-left .2s ease; }
.side { transition: transform .22s ease, width .2s ease; }
.nav-search { position: relative; padding: 8px 10px 4px; }
.nav-search svg { position: absolute; left: 19px; top: 15px; width: 14px; height: 14px; color: #6d8299; }
.nav-search input {
  width: 100%; height: 30px; border-radius: 7px; border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04); color: #dbe6f0; padding: 0 8px 0 30px; font-size: 12px; outline: none;
}
.nav-search input::placeholder { color: #63788d; }
.nav-search input:focus { border-color: rgba(53,208,189,.4); background: rgba(255,255,255,.07); }

/* 手风琴分组 */
.nav-group { margin: 2px 0; }
.nav-group-head {
  width: 100%; display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border: 0; border-radius: 7px; background: transparent;
  color: #a9bccd; font: inherit; font-size: 12.5px; font-weight: 560; cursor: pointer; text-align: left;
}
.nav-group-head:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-group-head .ng-ico { display: grid; place-items: center; width: 16px; height: 16px; opacity: .75; }
.nav-group-head .ng-ico svg { width: 15px; height: 15px; }
.nav-group-head .ng-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-group-head .ng-no { font-size: 10px; color: #5f7488; font-variant-numeric: tabular-nums; }
.nav-group-head .ng-arrow { display: grid; place-items: center; transition: transform .18s ease; opacity: .5; }
.nav-group-head .ng-arrow svg { width: 12px; height: 12px; }
.nav-group.open > .nav-group-head { color: #fff; background: rgba(255,255,255,.05); }
.nav-group.open > .nav-group-head .ng-arrow { transform: rotate(180deg); }
.nav-group-body { display: none; padding: 2px 0 6px 6px; margin-left: 9px; border-left: 1px solid rgba(255,255,255,.07); }
.nav-group.open > .nav-group-body { display: block; }
.nav-item { padding: 6px 9px; font-size: 12.2px; }
.nav-item .ico { width: 15px; height: 15px; flex: 0 0 15px; }
.nav-item .nav-ext { margin-left: auto; font-style: normal; font-size: 10px; color: #4f9c93; }
.nav-empty { padding: 14px 12px; color: #63788d; font-size: 12px; }
.side-foot .sf-row { display: flex; gap: 10px; margin-bottom: 5px; }
.side-foot .sf-row a { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; }
.side-foot .sf-row svg { width: 13px; height: 13px; }
.side-foot .sf-note { color: #4d5f71; font-size: 10.5px; }
.side-foot .sf-note .vendor-link { color: #7d94a8; }
.side-foot .sf-note .vendor-link:hover { color: #cfe0ec; text-decoration: none; }
.side-foot .sf-sub { color: #44576a; font-size: 10px; margin-top: 2px; }

/* ---------- 全站水印（页面平铺，不挡点击） ---------- */
.wf-wm {
  position: fixed; inset: 0; z-index: 20; pointer-events: none;
  overflow: hidden; opacity: .052;
  background-repeat: repeat; background-position: center top;
}
@media print { .wf-wm { opacity: .085; } }
@media (max-width: 1080px) { .page-foot { padding-bottom: calc(66px + env(safe-area-inset-bottom)); } }

/* ---------- 页脚版权 ---------- */
.page-foot { margin-top: auto; border-top: 1px solid var(--line-2, #e6ebf1); padding: 12px 20px 18px; }
.page-foot .pf-in {
  max-width: 1560px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 11.5px; color: var(--ink-4, #8a99a8);
}
.page-foot .pf-sep { color: #cfd8e2; }
.vendor-link { color: inherit; text-decoration: none; }
.vendor-link:hover { color: var(--brand-700, #12a594); text-decoration: underline; }

/* 登录页页脚 */
.login-foot {
  position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  padding: 0 16px 22px; font-size: 11.5px; color: #7e90a2;
}
.login-foot .pf-sep { color: #b9c5d1; }
.login-hero .lf .lt { margin-top: 3px; }
.login-hero .lf .vendor-link { color: #8fb6c9; }
.login-hero .lf .vendor-link:hover { color: #48d9c6; }

/* ---------- 顶栏快捷 ---------- */
.tb-chip {
  display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 9px;
  border-radius: 8px; color: var(--ink-2); font-size: 12px; text-decoration: none; position: relative;
}
.tb-chip:hover { background: #f1f5f9; color: var(--ink); text-decoration: none; }
.tb-chip svg { width: 15px; height: 15px; }
.tb-chip .dot {
  position: absolute; top: 1px; right: 1px; min-width: 14px; height: 14px; padding: 0 3px;
  background: var(--red); color: #fff; border-radius: 8px; font-size: 9px; display: grid; place-items: center;
  font-weight: 700; border: 2px solid #fff;
}
.back-btn { color: var(--ink-3); }
.who-txt { line-height: 1.2; }
.role-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 4px; padding: 2px 6px 6px; }
.role-grid form { margin: 0; }
.role-btn {
  width: 100%; justify-content: center; padding: 6px 4px; border: 1px solid var(--line);
  border-radius: 6px; background: #fff; font-size: 11.5px; color: var(--ink-2); cursor: pointer;
}
.role-btn:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }
.role-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- 页面说明抽屉 ---------- */
.help-drawer {
  position: fixed; z-index: 60; top: 0; right: 0; bottom: 0; width: 360px; max-width: 92vw;
  background: #fff; border-left: 1px solid var(--line); box-shadow: -18px 0 48px rgba(11,31,51,.14);
  transform: translateX(102%); transition: transform .22s ease; display: flex; flex-direction: column;
}
.help-drawer.open { transform: none; }
.help-mask { position: fixed; inset: 0; z-index: 55; background: rgba(11,31,51,.28); }
.help-mask[hidden] { display: none; }
.hd-head { display: flex; align-items: flex-start; gap: 10px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line-2); }
.hd-title { font-size: 15px; font-weight: 660; }
.hd-sub { font-size: 11px; color: var(--ink-4); margin-top: 2px; }
.hd-head .icon-btn { margin-left: auto; font-size: 20px; line-height: 1; }
.hd-body { padding: 14px 18px 30px; overflow-y: auto; }
.hd-intro { font-size: 12.5px; color: var(--ink-2); line-height: 1.8; }
.hd-sec { font-size: 11px; font-weight: 700; color: var(--ink-4); letter-spacing: .08em; margin: 16px 0 7px; }
.hd-list { margin: 0; padding-left: 17px; color: var(--ink-2); font-size: 12.5px; line-height: 1.85; }
.hd-list li { margin-bottom: 4px; }
.hd-short { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; }
.hd-short a {
  display: flex; align-items: center; gap: 6px; padding: 7px 8px; border: 1px solid var(--line);
  border-radius: 7px; font-size: 12px; color: var(--ink-2);
}
.hd-short a:hover { border-color: var(--accent); color: var(--accent-dark); text-decoration: none; background: var(--accent-soft); }
.hd-short svg { width: 14px; height: 14px; }
.hd-foot { margin-top: 22px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 11px; color: var(--ink-4); line-height: 1.8; }

/* ---------- 模块切换 / 分析中心 ---------- */
.mod-switch { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 4px; }
.ms-item {
  display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; border-radius: 20px;
  background: #fff; border: 1px solid var(--line); font-size: 12px; color: var(--ink-2); white-space: nowrap;
}
.ms-item:hover { border-color: #c9d6e3; text-decoration: none; }
.ms-item.active { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.ms-item svg { width: 14px; height: 14px; }
.kpi-link { color: inherit; text-decoration: none; display: block; transition: box-shadow .16s ease, transform .16s ease; }
.kpi-link:hover { text-decoration: none; box-shadow: 0 8px 22px rgba(16,41,63,.1); transform: translateY(-1px); }
.kpi .k-go { position: absolute; right: 12px; bottom: 9px; font-size: 10.5px; color: var(--ink-4); opacity: 0; transition: opacity .16s; }
.kpi-link:hover .k-go { opacity: 1; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.dash-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-grid > .card + .card { margin-top: 0; }
.lg-dot { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-4); }
.lg-dot i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.chart-bars-lg { height: 220px; }
.chart-bars .cb { text-decoration: none; color: inherit; }
.chart-bars .cb:hover { text-decoration: none; }
.chart-bars .cb:hover .cb-bars i { filter: brightness(1.08); }
.cb-bars { flex: 1; display: flex; gap: 4px; align-items: flex-end; justify-content: center; width: 100%; height: 100%; }
.cb-bars i { width: 42%; max-width: 24px; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, #35d0bd, #12a594); min-height: 2px; }
.cb-bars i.alt { background: linear-gradient(180deg, #8fb4f5, #2f6fed); }
.bar-list { display: flex; flex-direction: column; gap: 5px; }
.bar-row { display: grid; grid-template-columns: 108px minmax(0,1fr) 92px; gap: 9px; align-items: center; text-decoration: none; color: inherit; padding: 2px 0; }
.bar-row:hover { text-decoration: none; }
.bar-row:hover .bar-lb { color: var(--accent-dark); }
.bar-lb { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 8px; border-radius: 4px; background: #eef3f8; overflow: hidden; }
.bar-track .bar { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #12a594, #4fb3a6); }
.bar-v { font-size: 11.5px; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
.bar-v em { font-style: normal; color: var(--ink-4); font-size: 10px; }
.donut-wrap { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.donut { width: 132px; height: 132px; border-radius: 50%; position: relative; flex: 0 0 132px; display: block; }
.donut-hole {
  position: absolute; inset: 22px; background: #fff; border-radius: 50%; display: grid; place-items: center;
  align-content: center; box-shadow: inset 0 0 0 1px var(--line-2);
}
.donut-hole b { font-size: 18px; font-weight: 660; line-height: 1.2; }
.donut-hole em { font-style: normal; font-size: 10px; color: var(--ink-4); }
.donut-legend { flex: 1 1 150px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dl-row { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); padding: 2px 0; }
.dl-row:hover { text-decoration: none; color: var(--accent-dark); }
.dl-row i { width: 8px; height: 8px; border-radius: 2px; flex: 0 0 8px; }
.dl-row .dl-l { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-row .dl-v { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.alert-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px; }
.alert-cell {
  border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; display: flex;
  align-items: center; justify-content: space-between; gap: 6px; color: inherit; background: #fbfcfe;
}
.alert-cell:hover { text-decoration: none; border-color: #cbd9e6; }
.alert-cell.has { background: #fff7f7; border-color: #f5d5d5; }
.alert-cell .ac-label { font-size: 11.5px; color: var(--ink-3); }
.alert-cell .ac-num { font-size: 15px; font-weight: 660; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.alert-cell.has .ac-num { color: var(--red); }
.src-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; }
.src-item { display: flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid var(--line-2); border-radius: 7px; background: #fbfcfe; font-size: 11.5px; }
.src-item code { color: var(--accent-dark); background: transparent; }
.src-item span { color: var(--ink-3); }

/* 分析中心入口 */
.screen-entry { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.se-card {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line);
  border-radius: 9px; color: inherit; background: #fbfcfe;
}
.se-card:hover { text-decoration: none; border-color: var(--accent); background: var(--accent-soft); }
.se-ico { width: 32px; height: 32px; border-radius: 8px; background: var(--brand-700); color: #7fe6d8; display: grid; place-items: center; }
.se-ico svg { width: 16px; height: 16px; }
.se-t { font-size: 12.5px; font-weight: 600; }
.se-d { font-size: 11px; color: var(--ink-4); }
.se-go { margin-left: auto; font-size: 10.5px; color: var(--ink-4); }
.mini-kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 9px; }
.mk { border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 11px; color: inherit; background: #fbfcfe; }
.mk:hover { text-decoration: none; border-color: #cbd9e6; background: #fff; }
.mk-l { font-size: 11px; color: var(--ink-3); }
.mk-v { font-size: 18px; font-weight: 660; font-variant-numeric: tabular-nums; margin: 1px 0; }
.mk-v em { font-style: normal; font-size: 10.5px; color: var(--ink-4); font-weight: 400; margin-left: 2px; }
.mk-f { font-size: 10.5px; color: var(--ink-4); }
.mini-charts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 12px; }
.mc { border: 1px solid var(--line-2); border-radius: 8px; padding: 10px; }
.mc-t { font-size: 11.5px; color: var(--ink-3); margin-bottom: 6px; }
.mc .chart-bars { height: 110px; }
.mc .alert-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.spark { width: 100%; height: 28px; display: block; }

/* 结果集筛选 */
.drill-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.df-item { display: flex; flex-direction: column; gap: 3px; font-size: 10.5px; color: var(--ink-4); }
.df-item .input, .df-item .select { height: 30px; min-width: 120px; }
.df-item.df-kw .input { min-width: 180px; }
.df-check { flex-direction: row; align-items: center; gap: 5px; height: 30px; font-size: 12px; color: var(--ink-2); }

/* ---------- 大屏 ---------- */
.screen-body { background: #061019; color: #dbe8f3; overflow: hidden; height: 100vh; }
.screen {
  height: 100vh; padding: 14px 18px 10px; display: flex; flex-direction: column; gap: 12px;
  background:
    radial-gradient(1200px 500px at 20% -10%, rgba(18,165,148,.18), transparent 60%),
    radial-gradient(900px 420px at 90% 0%, rgba(47,111,237,.16), transparent 60%),
    #061019;
}
.screen-head { display: flex; align-items: center; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sh-left { display: flex; align-items: center; gap: 10px; }
.sh-logo { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(140deg,#18c2ad,#0b7c92); display: grid; place-items: center; font-weight: 700; color: #fff; }
.sh-left h1 { font-size: 19px; color: #fff; letter-spacing: .04em; }
.sh-left p { margin: 1px 0 0; font-size: 11px; color: #7f9ab1; }
.sh-tabs { display: flex; gap: 6px; margin-left: 12px; flex-wrap: wrap; }
.sh-tabs a { padding: 5px 11px; border-radius: 16px; font-size: 11.5px; color: #8ba6bc; border: 1px solid rgba(255,255,255,.1); }
.sh-tabs a:hover { text-decoration: none; color: #fff; border-color: rgba(53,208,189,.5); }
.sh-tabs a.on { background: rgba(18,165,148,.22); color: #6ff0dd; border-color: rgba(53,208,189,.55); }
.sh-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sh-clock { font-family: var(--mono); font-size: 20px; color: #6ff0dd; font-variant-numeric: tabular-nums; }
.sh-date { font-size: 11px; color: #6d879d; }
.sh-btn { padding: 5px 10px; border: 1px solid rgba(255,255,255,.14); border-radius: 7px; font-size: 11.5px; color: #b9cddc; }
.sh-btn:hover { text-decoration: none; color: #fff; border-color: rgba(53,208,189,.5); }
.screen-kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.sk {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 10px; color: inherit;
  background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.09); position: relative; overflow: hidden;
}
.sk:hover { text-decoration: none; border-color: rgba(53,208,189,.5); }
.sk::after { content: ""; position: absolute; right: -16px; top: -16px; width: 70px; height: 70px; border-radius: 50%; background: rgba(53,208,189,.1); }
.sk-label { font-size: 11px; color: #8ba6bc; }
.sk-value { font-size: 26px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.sk-value em { font-style: normal; font-size: 11px; color: #7f9ab1; font-weight: 400; margin-left: 3px; }
.sk-foot { font-size: 10.5px; color: #6d879d; }
.screen-main { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr) minmax(0,1fr); grid-template-rows: minmax(0,1.2fr) minmax(0,1fr); gap: 10px; }
@media (max-height: 800px) and (min-width: 1081px) {
  .screen { padding: 8px 14px 8px; gap: 8px; }
  .screen-head { padding-bottom: 7px; }
  .screen-kpis { gap: 8px; }
  .sk { padding: 7px 12px; }
  .sk-value { font-size: 21px; }
  .screen-main { gap: 8px; }
  .sp-card { padding: 8px 10px; }
  .sc-ring { width: 96px; height: 96px; flex-basis: 96px; }
  .sc-hole { inset: 20px; }
}
.sp-card { border: 1px solid rgba(255,255,255,.09); border-radius: 10px; background: rgba(255,255,255,.03); padding: 10px 12px; min-height: 0; display: flex; flex-direction: column; }
.sp-trend { grid-row: span 2; }
.sp-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.sp-head h3 { font-size: 12.5px; color: #cfe1ef; }
.sp-head span { font-size: 10px; color: #5f798f; }
.screen-bars { flex: 1; display: flex; align-items: flex-end; gap: 10px; padding: 4px 0 0; min-height: 0; }
.sb { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; color: inherit; text-decoration: none; }
.sb:hover { text-decoration: none; }
.sb-bars { flex: 1; display: flex; gap: 4px; align-items: flex-end; width: 100%; justify-content: center; }
.sb-bars i { width: 38%; max-width: 22px; border-radius: 3px 3px 1px 1px; background: linear-gradient(180deg,#35d0bd,#0d867a); }
.sb-bars i.alt { background: linear-gradient(180deg,#8fb4f5,#2f6fed); }
.sb-v { font-size: 10px; color: #8ba6bc; font-variant-numeric: tabular-nums; }
.sb-l { font-size: 10.5px; color: #a9c2d3; }
.sb-sub { font-size: 9.5px; color: #5f798f; }
.sc-donut { flex: 1; display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; min-height: 0; }
.sc-donut:hover { text-decoration: none; }
.sc-ring { width: 118px; height: 118px; border-radius: 50%; position: relative; flex: 0 0 118px; }
.sc-hole { position: absolute; inset: 24px; border-radius: 50%; background: #0a1825; display: grid; place-items: center; align-content: center; }
.sc-hole b { font-size: 16px; color: #fff; }
.sc-hole em { font-style: normal; font-size: 9px; color: #6d879d; }
.sc-legend { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.scl { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: #a9c2d3; }
.scl i { width: 7px; height: 7px; border-radius: 2px; flex: 0 0 7px; }
.scl b { margin-left: auto; color: #dbe8f3; font-variant-numeric: tabular-nums; }
.screen-rank { flex: 1; display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.sr-row { display: grid; grid-template-columns: 16px 84px minmax(0,1fr) 56px; gap: 7px; align-items: center; color: inherit; text-decoration: none; font-size: 10.5px; }
.sr-row:hover { text-decoration: none; }
.sr-no { width: 15px; height: 15px; border-radius: 4px; background: rgba(255,255,255,.08); display: grid; place-items: center; font-size: 9px; color: #8ba6bc; }
.sr-row:nth-child(1) .sr-no { background: rgba(53,208,189,.28); color: #6ff0dd; }
.sr-l { color: #b9cddc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-track { height: 7px; background: rgba(255,255,255,.07); border-radius: 4px; overflow: hidden; }
.sr-track i { display: block; height: 100%; background: linear-gradient(90deg,#12a594,#4fd7c6); border-radius: 4px; }
.sr-v { text-align: right; color: #dbe8f3; font-variant-numeric: tabular-nums; }
.screen-alerts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; align-content: start; }
.sa { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 8px; border-radius: 7px; background: rgba(255,255,255,.04); color: #a9c2d3; font-size: 10.5px; }
.sa:hover { text-decoration: none; color: #fff; }
.sa b { font-size: 14px; color: #8ba6bc; font-variant-numeric: tabular-nums; }
.sa.has { background: rgba(214,69,69,.14); color: #ffb4b4; }
.sa.has b { color: #ff8f8f; }
.screen-tip { margin-top: auto; font-size: 10px; color: #4f6a80; padding-top: 6px; }
.screen-foot { display: flex; justify-content: space-between; font-size: 10px; color: #3f586d; padding-top: 2px; }

/* ---------- 手机端 ---------- */
.m-tabbar { display: none; }
.m-page { padding-bottom: 70px; }
.m-hero { background: linear-gradient(135deg, #0f2d45, #134653); color: #fff; border-radius: 14px; padding: 16px 16px 14px; margin-bottom: 12px; }
.m-hero .mh-hello { font-size: 17px; font-weight: 650; }
.m-hero .mh-sub { font-size: 11.5px; color: #a9c2d3; margin-top: 2px; }
.m-hero .mh-kpis { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin-top: 12px; }
.mh-k { background: rgba(255,255,255,.08); border-radius: 8px; padding: 8px 9px; }
.mh-k b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.mh-k span { font-size: 10.5px; color: #a9c2d3; }
.m-quick { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.mq { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 11px 4px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink-2); font-size: 11px; }
.mq:hover { text-decoration: none; border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }
.mq svg { width: 19px; height: 19px; }
.m-list { display: flex; flex-direction: column; }
.m-item { display: flex; gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--line-2); color: inherit; }
.m-item:last-child { border-bottom: 0; }
.m-item:hover { text-decoration: none; }
.m-item .mi-main { flex: 1; min-width: 0; }
.m-item .mi-t { font-size: 12.5px; font-weight: 550; line-height: 1.5; }
.m-item .mi-s { font-size: 11px; color: var(--ink-4); margin-top: 2px; }
.m-item .mi-r { font-size: 11px; color: var(--ink-4); white-space: nowrap; }
.qr-box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; text-align: center; }
.qr-box svg { width: 220px; height: 220px; max-width: 70vw; height: auto; }
.qr-link { margin-top: 10px; display: flex; gap: 6px; }
.qr-link input { flex: 1; height: 34px; border: 1px solid var(--line); border-radius: 7px; padding: 0 9px; font-size: 11.5px; font-family: var(--mono); color: var(--ink-2); background: #f8fafc; }
.m-form-tip { font-size: 11.5px; color: var(--ink-4); line-height: 1.8; margin-top: 10px; }
.m-scan-box { border: 2px dashed #cbd9e6; border-radius: 14px; padding: 26px 16px; text-align: center; color: var(--ink-3); background: #fbfcfe; }
.m-scan-box svg { width: 34px; height: 34px; color: #9fb2c4; margin-bottom: 6px; }

@media (max-width: 1080px) {
  .m-tabbar {
    display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); position: fixed; z-index: 45;
    left: 0; right: 0; bottom: 0; background: rgba(255,255,255,.98);
    border-top: 1px solid var(--line); padding: 5px 2px calc(5px + env(safe-area-inset-bottom));
    backdrop-filter: blur(8px);
  }
  .mt-item { display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 10px; color: var(--ink-4); padding: 3px 0; }
  .mt-item.on { color: var(--accent-dark); }
  .mt-item svg { width: 19px; height: 19px; }
  .mt-item:hover { text-decoration: none; }
  .page { padding-bottom: 76px; }
  .collapse-btn { display: none; }
  body.side-collapsed .side { width: var(--side-w); }
  .help-drawer { width: 100%; max-width: 100%; }
  .dash-grid, .dash-grid-3 { grid-template-columns: minmax(0,1fr); }
  .mini-charts { grid-template-columns: minmax(0,1fr); }
  .mini-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .screen-entry { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .tb-chip span { display: none; }
  .tb-chip { padding: 0 7px; }
  .screen-main { grid-template-columns: minmax(0,1fr); grid-template-rows: auto; overflow-y: auto; }
  .sp-trend { grid-row: auto; }
  .screen-body { overflow: auto; height: auto; }
  .screen { height: auto; min-height: 100vh; }
  .screen-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .sh-tabs { display: none; }
}

@media (max-width: 720px) {
  .page { padding: 12px 12px 80px; }
  .page-head { gap: 8px; }
  .page-title { font-size: 17px; }
  .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .kpi .k-value { font-size: 19px; }
  .card-body { padding: 11px; }
  .alert-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .bar-row { grid-template-columns: 84px minmax(0,1fr) 74px; }
  .src-list { grid-template-columns: minmax(0,1fr); }
  .screen-entry { grid-template-columns: minmax(0,1fr); }
  .donut { width: 108px; height: 108px; flex-basis: 108px; }
  .donut-hole { inset: 18px; }
  .who-txt { display: none; }
  .search-box { display: none; }
  .mod-switch { margin: 0 -12px 6px; padding: 0 12px 8px; }
  .m-quick { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .tbl td, .tbl th { white-space: nowrap; }
  .df-item, .df-item .input, .df-item .select { min-width: 0; width: 100%; }
  .drill-filter { gap: 6px; }
  .df-item { flex: 1 1 46%; }
  .df-kw { flex-basis: 100%; }
}

/* ---------- 弹窗最大化 ---------- */
dialog.modal { max-width: min(720px, 94vw); width: 100%; }
dialog.modal.modal-lg { max-width: min(880px, 94vw); }
dialog.modal.maximized {
  max-width: 98vw !important; width: 98vw !important; height: 94vh !important;
  max-height: 94vh !important; margin: 3vh auto !important; padding: 0;
  display: flex; flex-direction: column;
}
dialog.modal.maximized .m-body { max-height: none; flex: 1 1 auto; overflow: auto; }
.modal-max-btn {
  position: absolute; right: 38px; top: 9px; width: 24px; height: 24px; border: 0; border-radius: 6px;
  background: transparent; color: var(--ink-4); cursor: pointer; display: grid; place-items: center; font-size: 13px;
}
.modal-max-btn:hover { background: #f1f5f9; color: var(--ink); }
dialog.modal > .m-head { position: relative; }
dialog.modal > .m-head, dialog.modal .m-head { padding-right: 70px; }
body.modal-open { overflow: hidden; }

/* ---------- 骨架屏 / 懒加载 ---------- */
.skeleton { background: linear-gradient(90deg, #eef2f7 25%, #f6f9fc 37%, #eef2f7 63%); background-size: 400% 100%; animation: sk 1.2s ease infinite; border-radius: 6px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.lazy-section[data-lazy]:empty::after { content: ""; display: block; height: 120px; margin: 8px 0; border-radius: 8px; background: linear-gradient(90deg,#eef2f7 25%,#f6f9fc 37%,#eef2f7 63%); background-size: 400% 100%; animation: sk 1.2s ease infinite; }

/* ---------- 密度 ---------- */
.density-compact .page { padding-top: 12px; }
.density-compact .card-body { padding: 10px 12px; }
.density-compact .tbl td { padding: 6px 9px; }
.density-compact .kpi { padding: 10px 12px; }
.density-loose .page { padding-top: 24px; }
.density-loose .tbl td { padding: 12px 10px; }

/* ---------- 打印：批量单据 ---------- */
.batch-sheet { background: #fff; width: 210mm; margin: 12px auto; padding: 12mm 13mm; box-shadow: var(--shadow-lg); font-size: 11.5px; page-break-after: always; }
.batch-sheet:last-child { page-break-after: auto; }
.batch-sheet h2 { font-size: 16px; text-align: center; letter-spacing: .12em; margin-bottom: 2px; }
.batch-sheet .bs-sub { text-align: center; font-size: 10.5px; color: #555; margin-bottom: 10px; }
.batch-sheet .bs-meta { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 2px 16px; font-size: 11px; margin-bottom: 8px; }
.batch-sheet table { width: 100%; border-collapse: collapse; }
.batch-sheet th, .batch-sheet td { border: 1px solid #333; padding: 3px 5px; font-size: 10.5px; }
.batch-sheet th { background: #f2f2f2; }
.batch-sheet .bs-sign { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin-top: 20px; font-size: 11px; }
.label-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 4mm; }
.label-card { border: 1px dashed #999; border-radius: 4px; padding: 4mm 3mm; text-align: center; }
.label-card .lc-no { font-family: var(--mono); font-size: 10px; }
.label-card .lc-name { font-size: 11px; font-weight: 600; margin: 1mm 0; }
.label-card .lc-sub { font-size: 9px; color: #444; }
.label-card svg { width: 22mm; height: 22mm; }
@media print {
  .batch-sheet { box-shadow: none; margin: 0; width: auto; padding: 0; }
  .m-tabbar, .help-drawer, .help-mask { display: none !important; }
}

/* ---------- 图表细节修正 ---------- */
.donut::after { display: none; }
.donut .donut-hole { z-index: 1; }
.chart-bars .cb-bars { flex: 1 1 auto; min-height: 0; height: auto; }
.chart-bars .cb { justify-content: flex-end; }
.bar-track .bar { display: block; height: 100%; }
.screen .bar-track { height: 7px; }
.sp-card .bar-row { grid-template-columns: 92px minmax(0,1fr) 92px; }

/* ---------- 单据全景（trace） ---------- */
.trace-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tc-node { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 7px; background: #fbfcfe; }
.tc-label { font-size: 10.5px; color: var(--ink-4); }
.tc-value { font-size: 12px; font-weight: 600; color: var(--ink); }
.tc-value.is-cur { color: var(--accent-dark); }
.tc-arrow { color: #b6c3d1; font-size: 12px; }
.dl.dl-grid { grid-template-columns: 96px minmax(0,1fr) 96px minmax(0,1fr); gap: 8px 18px; }
@media (max-width: 1180px) { .dl.dl-grid { grid-template-columns: 96px minmax(0,1fr); } }
.att-row { display: flex; gap: 9px; align-items: center; padding: 8px 2px; border-bottom: 1px solid var(--line-2); color: inherit; }
.att-row:last-child { border-bottom: 0; }
.att-row:hover .att-name { color: var(--accent-dark); }
.att-ico { width: 26px; height: 26px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-dark); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.att-main { display: flex; flex-direction: column; min-width: 0; }
.att-name { font-size: 12px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-sub { font-size: 10.5px; color: var(--ink-4); }