:root { --ink:#18212f; --muted:#637083; --line:#dce2e9; --nav:#15263c; --nav-soft:#203854; --page:#f4f6f8; --surface:#ffffff; --blue:#1769aa; --blue-soft:#e8f2fa; --green:#23825d; --green-soft:#e8f6ef; --orange:#aa6a18; --orange-soft:#fff5e4; --red:#b64a4a; --red-soft:#fceced; }
* { box-sizing:border-box; }
.dimension-workspace { background:#fff; border:1px solid var(--line); border-radius:4px; }
.workspace-title { display:flex; align-items:center; gap:16px; padding:12px 16px; }
.workspace-title h2 { font-size:15px; margin:0; }.workspace-title span { color:var(--muted); font-size:12px; }
.dimension-tabs { display:flex; overflow-x:auto; border-bottom:1px solid var(--line); padding:0 12px; gap:8px; }
.dimension-tab { white-space:nowrap; border:0; border-bottom:3px solid transparent; background:transparent; color:var(--muted); padding:10px 14px; font-size:13px; }
.dimension-tab.active { border-bottom-color:var(--blue); color:var(--blue); font-weight:600; background:#f1f7fc; }
.dimension-workspace .dimension-section { margin:0; padding:12px; }
.dimension-workspace .section-heading h2 { font-size:14px; }
.dimension-workspace .table-wrap { max-height:calc(100vh - 425px); min-height:160px; border-radius:2px; }
.dimension-workspace th,.dimension-workspace td { padding:8px 12px; font-size:13px; }
.dimension-workspace th,.detail-table th { position:sticky; top:0; z-index:2; }
.dimension-workspace tfoot td { position:sticky; bottom:0; background:#eef3f7; }
.drawer#drawer { width:min(1440px,96vw); padding:18px 20px; }
.drawer .drawer-header { padding-bottom:12px; }
.drawer .drawer-header h2 { font-size:18px; }.drawer .drawer-context { padding:10px 0; }
.drawer .drawer-list { display:flex; flex-direction:column; overflow:hidden; flex:1; min-height:0; gap:0; }
.detail-table-wrap { overflow:auto; flex:1; min-height:0; border:1px solid var(--line); }
.detail-table { width:100%; min-width:1100px; font-size:12px; }
.detail-table th,.detail-table td { padding:8px 10px; white-space:nowrap; }
.detail-table tbody tr:nth-child(even) { background:#f8fafc; }
.detail-table .badge { font-size:12px; padding:3px 6px; }
.detail-total { padding:12px 0 0; color:var(--muted); font-size:12px; }
@media(min-width:1101px) { .page:has(.dimension-workspace) .focus-grid.hazard { grid-template-columns:repeat(8,minmax(0,1fr)); }.page:has(.dimension-workspace) .focus-card { padding:10px; }.page:has(.dimension-workspace) .focus-value { font-size:24px; }.page:has(.dimension-workspace) { margin-top:16px; } }
@media(max-width:820px) { .dimension-workspace .table-wrap { max-height:55vh; }.workspace-title span { display:none; } }
.sidebar .workspace,.sidebar .sidebar-footer,.sidebar .nav-item { color:#fff; }
.focus-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.focus-card { padding:14px 16px; background:#fff; border:1px solid var(--line); border-top:3px solid currentColor; border-radius:4px; }
.focus-card > span { display:block; font-size:13px; color:var(--ink); }
.drill { background:none; border:0; padding:3px 0; color:inherit; text-align:inherit; }
.drill:hover { text-decoration:underline; }
.drill:focus-visible,button:focus-visible { outline:2px solid var(--blue); outline-offset:3px; }
.focus-value { display:block; font-size:27px; font-weight:700; margin-top:5px; }
.red { color:var(--red); }.orange { color:#945700; }.blue { color:var(--blue); }.green { color:#187149; }.purple { color:#7352a3; }
.badge.green { color:#187149; background:var(--green-soft); }.badge.purple { color:#7352a3; background:#f1ebfa; }
.stat-note,.semantic-legend { font-size:12px; color:#536174; line-height:1.8; }
.home-module { margin-bottom:24px; }
.dimension-section { margin-top:26px; }
tfoot { background:#eef3f7; font-weight:600; }
.data-note { padding:14px; border:1px solid var(--line); border-radius:4px; background:#fff; font-size:12px; color:var(--muted); line-height:1.8; }
.data-note summary { cursor:pointer; }
.detail-row dl { display:grid; grid-template-columns:94px 1fr; gap:9px; font-size:13px; margin-bottom:0; }.detail-row dt { color:var(--muted); }.detail-row dd { margin:0; overflow-wrap:anywhere; }
.detail-row footer .badge { color:inherit; }.detail-row footer .badge.red { color:var(--red); }.detail-row footer .badge.orange { color:#945700; }.detail-row footer .badge.blue { color:var(--blue); }.detail-row footer .badge.green { color:#187149; }.detail-row footer .badge.purple { color:#7352a3; }
.empty { padding:24px; color:var(--muted); text-align:center; }
@media(max-width:1100px) { .focus-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:480px) { .topbar { flex-wrap:wrap; padding:15px 0; }.focus-card { padding:12px; }.section-heading { gap:10px; align-items:flex-start; }.section-heading .breadcrumb { max-width:110px; text-align:right; }.date-control { flex-wrap:wrap; } }
body { margin:0; min-width:320px; color:var(--ink); background:var(--page); font-family:"Microsoft YaHei","Segoe UI",Arial,sans-serif; font-size:14px; }
button,input { font:inherit; }
button { cursor:pointer; }
.app-shell { min-height:100vh; display:grid; grid-template-columns:232px minmax(0,1fr); }
.sidebar { background:var(--nav); color:#d8e3ef; padding:20px 12px; display:flex; flex-direction:column; gap:18px; }
.brand { display:flex; align-items:center; gap:10px; font-size:17px; font-weight:700; color:#fff; padding:0 8px; }
.brand-mark { display:grid; place-items:center; width:26px; height:26px; background:#3c9cda; color:#fff; font-weight:800; border-radius:4px; }
.workspace { margin:0 8px; padding:10px; background:rgba(255,255,255,.08); color:#aebed0; font-size:12px; border-radius:4px; }
.nav-list { display:grid; gap:4px; }
.nav-item { border:0; border-radius:4px; background:transparent; color:#c8d5e4; text-align:left; padding:11px 12px; }
.nav-item:hover,.nav-item.active { background:var(--nav-soft); color:#fff; }
.sidebar-footer { margin-top:auto; color:#9fb1c6; padding:8px; font-size:12px; display:flex; align-items:center; gap:8px; }
.status-dot { width:7px; height:7px; border-radius:50%; background:#5fca95; }
.main-content { min-width:0; padding:0 32px 34px; }
.topbar { min-height:104px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); gap:18px; }
.breadcrumb,.eyebrow { color:var(--muted); font-size:12px; }
h1 { font-size:24px; margin:7px 0 0; font-weight:700; letter-spacing:0; }
h2 { font-size:18px; margin:5px 0 0; }
.date-control { display:flex; align-items:center; gap:9px; color:var(--muted); }
.date-control input { border:1px solid var(--line); background:var(--surface); padding:8px 10px; border-radius:4px; color:var(--ink); }
.page { max-width:1320px; margin:26px auto 0; }
.summary-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.module-card { background:var(--surface); border:1px solid var(--line); border-radius:6px; padding:18px; text-align:left; color:var(--ink); box-shadow:0 1px 2px rgba(24,33,47,.04); min-height:154px; }
.module-card:hover { border-color:#90b5d4; box-shadow:0 4px 12px rgba(24,33,47,.08); }
.module-card-top { display:flex; justify-content:space-between; align-items:start; }
.module-card h2 { font-size:16px; margin:0; }
.metric { font-size:32px; font-weight:700; margin:17px 0 5px; }
.metric-label,.card-note { color:var(--muted); font-size:12px; }
.card-flag { padding:4px 7px; border-radius:3px; font-size:12px; }
.flag-alert { color:var(--red); background:var(--red-soft); }.flag-warn { color:var(--orange); background:var(--orange-soft); }.flag-ok { color:var(--green); background:var(--green-soft); }
.section { margin-top:26px; }
.section-heading { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.section-heading h2 { margin:0; font-size:17px; }
.section-heading button { border:0; background:transparent; color:var(--blue); padding:4px 0; }
.attention-list { background:var(--surface); border:1px solid var(--line); border-radius:6px; }
.attention-row { display:grid; grid-template-columns:100px minmax(0,1fr) 160px 100px; gap:14px; align-items:center; padding:14px 16px; border-bottom:1px solid var(--line); }
.attention-row:last-child { border-bottom:0; }.attention-main { min-width:0; }.attention-main strong { display:block; font-weight:600; }.attention-main span { color:var(--muted); font-size:12px; display:block; margin-top:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.badge { display:inline-flex; align-items:center; width:max-content; padding:4px 7px; border-radius:3px; font-size:12px; }.badge.red { color:var(--red); background:var(--red-soft); }.badge.orange { color:var(--orange); background:var(--orange-soft); }.badge.blue { color:var(--blue); background:var(--blue-soft); }
.link-button { border:0; background:transparent; color:var(--blue); text-align:right; padding:6px; }
.ledger-toolbar { display:flex; gap:12px; align-items:center; justify-content:space-between; margin-bottom:16px; flex-wrap:wrap; }
.segmented { display:flex; background:#e9edf1; padding:3px; border-radius:5px; gap:2px; }.segment { border:0; background:transparent; color:var(--muted); padding:7px 12px; border-radius:3px; }.segment.active { background:var(--surface); color:var(--ink); box-shadow:0 1px 2px rgba(24,33,47,.12); }
.ledger-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); background:var(--surface); border:1px solid var(--line); border-radius:6px; margin-bottom:16px; }
.ledger-summary div { padding:15px 18px; border-right:1px solid var(--line); }.ledger-summary div:last-child { border-right:0; }.ledger-summary strong { display:block; font-size:21px; }.ledger-summary span { color:var(--muted); font-size:12px; }
.table-wrap { background:var(--surface); border:1px solid var(--line); border-radius:6px; overflow:auto; }
table { width:100%; border-collapse:collapse; min-width:740px; } th { background:var(--nav); color:#fff; font-weight:500; text-align:left; padding:11px 14px; white-space:nowrap; } td { padding:12px 14px; border-bottom:1px solid var(--line); color:#303a49; } tbody tr:last-child td { border-bottom:0; } tbody tr:hover { background:#f8fbfd; }.num { text-align:right; font-variant-numeric:tabular-nums; }.rate { color:var(--green); font-weight:600; }.row-action { border:0; background:transparent; color:var(--blue); padding:4px 0; white-space:nowrap; }
.drawer { position:fixed; top:0; right:0; bottom:0; width:min(480px,94vw); background:var(--surface); z-index:20; transform:translateX(105%); transition:transform .2s ease; box-shadow:-12px 0 30px rgba(24,33,47,.18); padding:22px; display:flex; flex-direction:column; }.drawer.open { transform:translateX(0); }.drawer-header { display:flex; justify-content:space-between; align-items:start; padding-bottom:18px; border-bottom:1px solid var(--line); }.icon-button { width:30px; height:30px; border:1px solid var(--line); background:var(--surface); border-radius:4px; color:var(--muted); font-size:20px; line-height:20px; }.drawer-context { padding:14px 0; color:var(--muted); font-size:13px; }.drawer-list { overflow:auto; display:grid; gap:10px; }.detail-row { border:1px solid var(--line); border-radius:5px; padding:13px; }.detail-row strong { display:block; }.detail-row span { display:block; color:var(--muted); font-size:12px; margin-top:5px; }.detail-row footer { display:flex; justify-content:space-between; align-items:center; margin-top:10px; font-size:12px; color:var(--muted); }.scrim { position:fixed; inset:0; background:rgba(24,33,47,.28); opacity:0; visibility:hidden; transition:.2s; z-index:10; }.scrim.show { opacity:1; visibility:visible; }
@media (max-width:820px) { .app-shell { grid-template-columns:1fr; }.sidebar { padding:10px 14px; gap:10px; }.workspace,.sidebar-footer { display:none; }.nav-list { display:flex; overflow:auto; }.nav-item { white-space:nowrap; padding:8px 10px; }.main-content { padding:0 16px 28px; }.topbar { min-height:92px; }.summary-grid { grid-template-columns:1fr; }.attention-row { grid-template-columns:76px minmax(0,1fr) 68px; }.attention-row .link-button { grid-column:2 / 4; text-align:left; }.ledger-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }.ledger-summary div:nth-child(2) { border-right:0; }.ledger-summary div:nth-child(-n+2) { border-bottom:1px solid var(--line); } }
/* 首页：统计台账目录 */
.board { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; align-items:start; }
.index-card { background:var(--surface); border:1px solid var(--line); border-radius:6px; padding:14px; display:grid; gap:10px; align-content:start; }
.index-card header { display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.index-card h2 { font-size:16px; margin:0; }
.index-card header span { font-size:11px; color:var(--muted); }
.enter-button { justify-self:start; border:1px solid var(--blue); background:var(--surface); color:var(--blue); border-radius:4px; padding:6px 12px; font-size:12px; }
.enter-button:hover { background:#f1f7fc; }
/* 统计口径 */
.scope-block { background:var(--surface); border:1px solid var(--line); border-radius:4px; padding:12px 15px; margin-bottom:14px; }
.scope-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:8px; }
.scope-head h2 { font-size:14px; margin:0; }
.scope-head span { font-size:11px; color:var(--muted); }
.scope-list { display:grid; grid-template-columns:76px minmax(0,1fr); gap:6px 10px; margin:0; font-size:12px; line-height:1.7; }
.scope-list dt { color:var(--muted); }
.scope-list dd { margin:0; color:var(--ink); }
.page-foot { display:grid; gap:10px; margin-top:18px; }
.page-foot .semantic-legend { margin:0; }
/* 巡检统计台账：计划完成率与周期穿透 */
.toolbar-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.system-link { color:var(--blue); font-size:12px; text-decoration:none; padding:6px 0; }
.system-link:hover { text-decoration:underline; }
.inspection-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-bottom:14px; }
.inspection-kpis article { background:var(--surface); border:1px solid var(--line); border-top:3px solid var(--blue); border-radius:4px; padding:12px 14px; }
.inspection-kpis article.good { border-top-color:var(--green); }
.inspection-kpis article.warn { border-top-color:var(--orange); }
.inspection-kpis article.bad,.inspection-kpis article.anomaly-kpi { border-top-color:var(--red); }
.inspection-kpis span { display:block; color:var(--muted); font-size:12px; }
.inspection-kpis strong { display:block; margin-top:6px; font-size:23px; color:var(--ink); font-variant-numeric:tabular-nums; }
.inspection-kpis strong small { font-size:12px; color:var(--muted); font-weight:400; }
.inspection-kpis article.good strong { color:var(--green); }.inspection-kpis article.warn strong { color:var(--orange); }.inspection-kpis article.bad strong,.inspection-kpis article.anomaly-kpi strong { color:var(--red); }
.inspection-plan-workspace .table-wrap { max-height:calc(100vh - 390px); min-height:300px; }
.inspection-plan-table { min-width:1180px; }
.inspection-plan-table tbody tr.good { box-shadow:inset 3px 0 var(--green); }
.inspection-plan-table tbody tr.warn { box-shadow:inset 3px 0 var(--orange); }
.inspection-plan-table tbody tr.bad { box-shadow:inset 3px 0 var(--red); }
.plan-link { border:0; background:transparent; color:var(--blue); font-size:13px; font-weight:600; padding:0; text-align:left; }
.plan-link:hover { text-decoration:underline; }
.plan-code { display:block; margin-top:4px; color:var(--muted); font-size:11px; font-weight:400; }
.cycle-label { display:block; font-weight:600; }
.rate-cell { display:grid; gap:5px; min-width:108px; }
.rate-cell > span:first-child { font-weight:700; font-variant-numeric:tabular-nums; }
.completion-meter { display:block; width:100%; height:5px; border-radius:4px; background:#edf1f4; overflow:hidden; }
.completion-meter i { display:block; height:100%; border-radius:4px; background:var(--blue); }
.completion-meter.good i { background:var(--green); }.completion-meter.warn i { background:var(--orange); }.completion-meter.bad i { background:var(--red); }
.completion-meter.good + * { color:var(--green); }
.anomaly-count { border:0; background:var(--red-soft); color:var(--red); border-radius:12px; padding:3px 8px; font-weight:700; }
.anomaly-count:hover { text-decoration:underline; }
.plan-no-due { color:var(--muted); font-size:12px; }
.inspection-rule-note { margin:12px 0 0; color:var(--muted); font-size:12px; line-height:1.7; }
.plan-detail { display:flex; flex-direction:column; min-height:0; flex:1; }
.plan-meta { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.plan-meta > div { padding:10px 12px; border:1px solid var(--line); border-radius:4px; background:#f8fafc; }
.plan-meta span { display:block; color:var(--muted); font-size:11px; }
.plan-meta strong { display:block; margin-top:4px; font-size:12px; }
.plan-detail-summary { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 0; }
.period-note { color:var(--muted); font-size:12px; line-height:1.65; }
.plan-kpis { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.plan-kpis span { padding:6px 9px; border-radius:3px; background:#f2f5f8; color:var(--muted); font-size:11px; white-space:nowrap; }
.plan-kpis b { color:var(--ink); font-size:13px; }
.plan-kpis b.good { color:var(--green); }.plan-kpis b.warn { color:var(--orange); }.plan-kpis b.bad { color:var(--red); }
.result-legend { display:flex; justify-content:space-between; gap:12px; padding:8px 10px; border:1px solid var(--line); border-bottom:0; background:#f4f7fa; font-size:12px; }
.result-legend span { font-weight:700; }.result-legend em { color:var(--muted); font-style:normal; }.result-legend em strong { color:var(--red); }
.cycle-result-table { min-width:1240px; }
.cycle-result-table td { vertical-align:top; }
.actual-period { font-variant-numeric:tabular-nums; white-space:nowrap; }
.cross-day,.shift-chip { display:inline-block; margin-left:5px; padding:2px 5px; border-radius:3px; color:#8a5300; background:var(--orange-soft); font-size:10px; line-height:1.4; }
.shift-chip { margin-left:0; color:var(--blue); background:var(--blue-soft); white-space:nowrap; }
.reading-list { display:flex; flex-wrap:wrap; gap:5px; max-width:570px; }
.reading-chip { display:inline-flex; gap:4px; padding:3px 6px; border-radius:3px; background:#f3f6f8; color:#394759; white-space:nowrap; font-variant-numeric:tabular-nums; }
.reading-chip b { color:var(--muted); font-weight:600; }
.reading-chip.abnormal { background:var(--red-soft); }
.reading-chip.abnormal,.abnormal-value { color:var(--red); font-weight:800; }
.result-empty { color:var(--muted); }
.plan-detail .detail-table-wrap { min-height:0; }
.scope-trigger { border:1px solid #b9cee2; background:var(--surface); color:var(--blue); border-radius:4px; padding:7px 11px; font-size:12px; }
.scope-trigger:hover { background:#f1f7fc; }
.date-control.hidden { display:none; }
.modal { position:fixed; inset:0; z-index:40; display:none; place-items:center; padding:24px; }
.modal.open { display:grid; }
.modal-backdrop { position:absolute; inset:0; border:0; background:rgba(15,27,43,.48); cursor:default; }
.modal-card { position:relative; width:min(720px,96vw); max-height:min(760px,88vh); overflow:auto; background:var(--surface); border-radius:8px; box-shadow:0 24px 70px rgba(5,18,35,.3); padding:20px 22px; }
.modal-card header { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; padding-bottom:12px; border-bottom:1px solid var(--line); }
.modal-card h2 { font-size:19px; margin:5px 0 0; }
.modal-lead { margin:16px 0 12px; color:var(--ink); font-size:13px; line-height:1.7; }
.modal-scope-list { padding:14px; background:#f7f9fb; border:1px solid var(--line); border-radius:5px; }
.modal-note { display:grid; grid-template-columns:80px minmax(0,1fr); gap:12px; margin-top:12px; padding:12px 14px; background:var(--orange-soft); border-left:3px solid var(--orange); font-size:12px; line-height:1.7; }
.modal-note span { color:#72563a; }
.detail-page-toolbar { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.back-button { display:inline-flex; align-items:center; gap:7px; border:1px solid var(--line); border-radius:4px; background:var(--surface); color:var(--ink); padding:8px 13px; font-weight:600; }
.back-button span { color:var(--blue); font-size:17px; line-height:1; }
.back-button:hover { border-color:#9cbdd9; color:var(--blue); }
.plan-detail-filters { display:flex; align-items:flex-end; gap:9px; flex-wrap:wrap; margin-top:12px; padding:12px 14px; background:var(--surface); border:1px solid var(--line); border-radius:4px; }
.plan-detail-filters label { display:grid; gap:5px; color:var(--muted); font-size:11px; }
.plan-detail-filters input,.plan-detail-filters select { min-height:34px; padding:5px 8px; border:1px solid #cfd8e2; border-radius:4px; background:#fff; color:var(--ink); font-size:12px; }
.plan-detail-filters > span:not(.filter-result) { padding-bottom:9px; color:var(--muted); font-size:12px; }
.filter-result { margin-left:auto; padding-bottom:9px; color:var(--muted); font-size:12px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.matrix-wrap { overflow:auto; max-height:calc(100vh - 430px); min-height:260px; background:var(--surface); border:1px solid var(--line); border-top:0; }
.cycle-matrix { width:max-content; border-collapse:separate; border-spacing:0; table-layout:fixed; font-size:12px; }
.cycle-matrix th,.cycle-matrix td { border-right:1px solid var(--line); border-bottom:1px solid var(--line); }
.cycle-matrix thead th { position:sticky; top:0; z-index:3; background:#edf3f8; color:var(--ink); padding:10px; text-align:left; vertical-align:top; }
.cycle-matrix .inspection-item { position:sticky; left:0; z-index:2; width:330px; min-width:330px; background:#f8fafc; padding:10px 12px; text-align:left; vertical-align:top; }
.cycle-matrix thead .inspection-item { z-index:5; background:#e7eef5; }
.cycle-matrix tbody .inspection-item { font-weight:400; }
.inspection-item b { display:block; color:var(--blue); font-size:13px; }
.inspection-item span { display:block; margin-top:3px; color:var(--ink); font-weight:600; }
.inspection-item small { display:block; margin-top:3px; color:var(--muted); font-size:10px; font-weight:400; }
.period-column { width:154px; min-width:154px; }
.period-head { display:grid; gap:3px; }
.period-head > span { color:var(--muted); font-size:10px; }
.period-head > strong { white-space:nowrap; font-size:12px; }
.period-head > small { display:flex; align-items:center; gap:4px; color:var(--muted); white-space:nowrap; font-size:10px; font-weight:400; }
.period-head .badge { justify-self:start; padding:1px 4px; font-size:9px; }
.matrix-cell { width:154px; min-width:154px; height:58px; padding:8px 11px; text-align:center; vertical-align:middle; background:#fff; }
.matrix-value { color:var(--ink); font-size:13px; font-variant-numeric:tabular-nums; }
.matrix-value.abnormal { color:var(--red); font-size:14px; font-weight:900; background:var(--red-soft); padding:3px 6px; border-radius:3px; }
.matrix-empty { color:#919ba8; font-size:11px; }
.matrix-corner { white-space:normal; font-weight:700; }
.empty-period { width:420px; }
/* 图表样式：预留给「首页看板」需求，本版统计台账不渲染 */
.chart-block { background:var(--surface); border:1px solid var(--line); border-radius:6px; padding:13px 15px; }
.chart-head { display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin-bottom:10px; }
.chart-head h3 { font-size:14px; margin:0; }
.chart-head span { font-size:11px; color:var(--muted); white-space:nowrap; }
.chart-body { display:grid; grid-template-columns:150px minmax(0,1fr); gap:14px; align-items:center; }
.chart-svg { width:150px; height:150px; display:block; }
.donut-total { font-size:19px; font-weight:700; fill:var(--ink); }
.chart-legend { list-style:none; margin:0; padding:0; display:grid; gap:3px; }
.legend-item { display:grid; grid-template-columns:10px minmax(0,1fr) 28px 48px; gap:7px; align-items:center; width:100%; border:0; background:none; padding:4px 5px; border-radius:3px; color:var(--ink); font-size:12px; text-align:left; }
.legend-item:hover { background:#f1f6fa; }
.legend-item i { width:10px; height:10px; border-radius:2px; }
.legend-item span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.legend-item b { text-align:right; font-variant-numeric:tabular-nums; }
.legend-item em { font-style:normal; color:var(--muted); font-size:11px; text-align:right; font-variant-numeric:tabular-nums; }
.bar-list { list-style:none; margin:0; padding:0; display:grid; gap:11px; }
.bar-row { display:grid; grid-template-columns:104px minmax(0,1fr); gap:10px; align-items:center; }
.bar-label { border:0; background:none; padding:0; color:var(--ink); font-size:12px; text-align:left; }
.bar-label:hover { color:var(--blue); text-decoration:underline; }
.bar-pair { display:grid; gap:4px; }
.bar-line { display:grid; grid-template-columns:minmax(0,1fr) 30px; gap:7px; align-items:center; }
.bar-track { display:block; height:9px; background:#eef1f5; border-radius:2px; overflow:hidden; }
.bar-fill { display:block; height:100%; border-radius:2px; }
.bar-value { border:0; background:none; padding:0; font-size:11px; color:#3e4d5e; text-align:right; font-variant-numeric:tabular-nums; }
.bar-value:hover { color:var(--blue); text-decoration:underline; }
.series-legend { list-style:none; display:flex; flex-wrap:wrap; gap:14px; margin:10px 0 0; padding:0; font-size:11px; color:var(--muted); }
.series-legend i { display:inline-block; width:8px; height:8px; border-radius:2px; margin-right:5px; }
@media(max-width:1180px) { .board { grid-template-columns:1fr; }.inspection-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:820px) { .plan-meta { grid-template-columns:repeat(2,minmax(0,1fr)); }.plan-detail-summary { align-items:flex-start; flex-direction:column; }.plan-kpis { justify-content:flex-start; }.result-legend { flex-direction:column; gap:3px; } }
@media(max-width:620px) { .chart-body { grid-template-columns:1fr; justify-items:center; }.chart-legend { width:100%; }.scope-list { grid-template-columns:62px minmax(0,1fr); }.inspection-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }.plan-meta { grid-template-columns:1fr; }.toolbar-actions { width:100%; }.drawer#drawer { padding:14px; } }

/* 紧凑巡检视图 */
.app-shell { grid-template-columns:208px minmax(0,1fr); }
.sidebar { padding:14px 8px; gap:12px; }
.main-content { padding:6px 8px 10px; }
.page { max-width:none; margin:0 auto; }
.compact-toolbar { display:flex; align-items:center; gap:7px; min-height:40px; padding:4px 7px; background:var(--surface); border:1px solid var(--line); border-radius:4px; margin-bottom:4px; flex-wrap:wrap; }
.toolbar-title { display:flex; align-items:center; gap:12px; }
.toolbar-title b { font-size:15px; white-space:nowrap; }
.compact-toolbar .scope-trigger { padding:4px 7px; }
.range-filter { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:11px; }
.range-shortcuts { display:inline-flex; padding:2px; border-radius:4px; background:#edf1f5; }
.range-shortcuts button { border:0; border-radius:3px; background:transparent; color:var(--muted); padding:3px 7px; font-size:11px; }
.range-shortcuts button.active { background:#fff; color:var(--blue); box-shadow:0 1px 2px rgba(24,33,47,.14); font-weight:600; }
.range-filter input { height:27px; padding:2px 5px; border:1px solid #cfd8e2; border-radius:4px; background:#fff; color:var(--ink); font-size:11px; }
.compact-toolbar .toolbar-actions { margin-left:auto; gap:10px; }
.data-status-strip { display:flex; align-items:center; gap:8px; min-height:28px; margin-bottom:4px; padding:4px 8px; border:1px solid #d9e2eb; background:#f5f8fb; color:var(--muted); font-size:10px; }
.data-status-strip strong { color:var(--blue); white-space:nowrap; }
.data-status-strip.error { border-color:#efc9c9; background:#fff7f7; }
.data-status-strip.error strong,.data-status-strip .data-failure { color:#b42318; }
.data-status-strip button { border:0; background:transparent; color:var(--blue); padding:0 4px; font-size:10px; text-decoration:underline; white-space:nowrap; }
.data-failure { margin-left:auto; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.inspection-kpis { gap:4px; margin-bottom:4px; }
.inspection-kpis article { display:flex; align-items:baseline; justify-content:space-between; padding:6px 9px; border-top-width:2px; }
.inspection-kpis span { font-size:11px; }
.inspection-kpis strong { margin:0; font-size:20px; }
.inspection-plan-workspace .table-wrap { max-height:calc(100vh - 210px); min-height:300px; }
.inspection-plan-workspace th,.inspection-plan-workspace td { padding:5px 7px; }
.workspace-title { padding:6px 9px; }
.workspace-title h2 { font-size:13px; }
.inspection-plan-table td .plan-link { font-size:12px; }
.inspection-plan-table td .plan-code { margin-top:2px; }
.metric-link { border:0; background:transparent; color:inherit; padding:2px 4px; font:inherit; font-variant-numeric:tabular-nums; }
.metric-link:hover { color:var(--blue); text-decoration:underline; }
.rate-button { width:100%; text-align:left; }
.detail-page-toolbar { margin:0 0 4px; }
.detail-page-toolbar .back-button { padding:4px 7px; font-size:12px; }
.plan-summary-line { margin:0 0 4px; padding:5px 8px; color:var(--muted); background:var(--surface); border:1px solid var(--line); border-radius:4px; font-size:11px; line-height:1.4; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.plan-detail-filters { margin:0; padding:5px 7px; gap:5px; border-radius:0; }
.detail-range-shortcuts { margin-right:2px; }
.detail-filter-toggle { border:1px solid #cfd8e2; border-radius:4px; background:#fff; color:var(--muted); padding:4px 8px; font-size:11px; }
.detail-filter-toggle.active { border-color:#e3a9a9; color:var(--red); background:var(--red-soft); font-weight:600; }
.plan-detail-filters label { display:flex; align-items:center; gap:4px; white-space:nowrap; }
.plan-detail-filters input { width:158px; min-height:27px; padding:2px 5px; font-size:11px; }
.plan-detail-filters > span:not(.filter-result) { padding-bottom:0; }
.filter-result { padding-bottom:0; }
.plan-detail-summary { padding:4px 7px; margin:0; background:var(--surface); border:1px solid var(--line); border-top:0; }
.period-note { font-size:11px; }
.plan-kpis { gap:5px; }
.plan-kpis span { padding:4px 7px; font-size:10px; }
.plan-kpis b { font-size:12px; }
.matrix-wrap { max-height:calc(100vh - 180px); min-height:220px; border-top:1px solid var(--line); }
.cycle-matrix { font-size:11px; }
.cycle-matrix .inspection-item { width:190px; min-width:190px; padding:3px 6px; }
.cycle-matrix thead .inspection-item { vertical-align:middle; }
.inspection-item span { margin-top:0; font-size:11px; }
.inspection-item small { margin-top:1px; font-size:9px; }
.period-column,.matrix-cell { width:90px; min-width:90px; }
.cycle-matrix thead th { padding:3px 5px; }
.period-head { gap:2px; }
.period-head > strong { font-size:10px; }
.person-link { justify-self:start; padding:0; border:0; background:none; color:#2e5cf6; font-size:10px; text-align:left; }
.person-link:hover { text-decoration:underline; }
.inspector-cell { color:#2e5cf6; }
.matrix-cell { height:29px; padding:2px 4px; }
.matrix-value { font-size:11px; font-weight:400; }
.matrix-value.abnormal { color:#ff0000; font-size:13px; font-weight:900; background:transparent; padding:0; }
.detail-total { padding:6px 0 0; font-size:10px; }
.secondary-button { border:1px solid #b9cee2; background:var(--surface); color:var(--blue); border-radius:4px; padding:5px 9px; font-size:11px; }
.secondary-button:hover { background:#f1f7fc; }
.task-modal-card { width:min(1040px,96vw); }
.task-facts { display:grid; grid-template-columns:90px minmax(0,1fr) 90px minmax(0,1fr); gap:7px 10px; margin:14px 0; font-size:12px; }
.task-facts dt { color:var(--muted); }.task-facts dd { margin:0; color:var(--ink); }
.task-results { max-height:330px; overflow:auto; margin:10px 0 14px; border:1px solid var(--line); }
.task-results table { min-width:860px; font-size:11px; }
.task-results th,.task-results td { padding:7px 9px; }
.task-results th,.task-results td:nth-child(n+3) { text-align:center; }
.task-results .empty { padding:18px; }
.task-detail-toolbar { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:8px 0; }
.task-detail-toolbar .task-detail-count,.task-detail-toolbar .data-gap-note { margin:0; }
.abnormal-value { color:#ff0000 !important; font-weight:800; }
.data-gap-note { margin:8px 0; padding:7px 9px; border-left:3px solid var(--orange); background:var(--orange-soft); color:#72563a; font-size:11px; }
.floating-tooltip { position:fixed; z-index:100; display:none; max-width:360px; padding:7px 10px; border-radius:5px; background:#17233b; color:#fff; box-shadow:0 8px 24px rgba(11,25,45,.2); font-size:11px; line-height:1.55; pointer-events:none; }
.floating-tooltip.show { display:block; }
.matrix-value.abnormal { cursor:pointer; }
.system-route-note { display:block; margin-top:8px; color:var(--muted); font-size:10px; }
@media(max-width:820px) {
  .compact-toolbar { align-items:flex-start; }
  .compact-toolbar .toolbar-actions { margin-left:0; }
  .task-facts { grid-template-columns:80px minmax(0,1fr); }
  .plan-summary-line { white-space:normal; }
}

/* 手机端适配 */
@media(max-width:820px) {
  body { overflow-x:hidden; }
  .app-shell { display:flex; min-height:100dvh; flex-direction:column; }
  .sidebar {
    position:sticky;
    top:0;
    z-index:30;
    flex-direction:row;
    align-items:center;
    gap:8px;
    min-height:48px;
    padding:6px 8px;
    box-shadow:0 2px 10px rgba(10,29,51,.18);
  }
  .brand { flex:0 0 auto; gap:7px; padding:0; }
  .brand > span:last-child { display:none; }
  .brand-mark { width:30px; height:30px; }
  .workspace,.sidebar-footer { display:none; }
  .nav-list { flex:1; min-width:0; display:flex; overflow-x:auto; gap:4px; padding-bottom:1px; }
  .nav-item { flex:0 0 auto; padding:7px 10px; border-radius:4px; font-size:12px; }
  .main-content {
    width:100%;
    padding:5px 7px calc(12px + env(safe-area-inset-bottom));
  }
  .page { width:100%; }
  .compact-toolbar { gap:5px; min-height:0; padding:6px; margin-bottom:5px; }
  .toolbar-title { width:100%; justify-content:space-between; }
  .range-filter {
    width:100%;
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto minmax(0,1fr);
    gap:5px;
    font-size:10px;
  }
  .range-shortcuts { grid-column:1 / -1; width:max-content; max-width:100%; }
  .range-filter label { display:contents; }
  .range-filter input { width:100%; min-width:0; height:29px; }
  .compact-toolbar .toolbar-actions {
    width:100%;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:5px;
    margin-left:0;
  }
  .compact-toolbar .toolbar-actions > * { width:100%; text-align:center; }
  .data-status-strip { align-items:flex-start; flex-wrap:wrap; line-height:1.45; }
  .data-status-strip .data-failure { flex:1 1 100%; margin-left:0; white-space:normal; }
  .inspection-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; }
  .inspection-kpis article { min-width:0; padding:7px 9px; }
  .inspection-kpis strong { font-size:19px; }
  .workspace-title { gap:8px; }
  .inspection-plan-workspace .table-wrap { max-height:calc(100dvh - 245px); }
  .inspection-plan-table { min-width:900px; }
  .inspection-plan-workspace th,.inspection-plan-workspace td { padding:6px 7px; font-size:11px; }
  .table-wrap,.matrix-wrap {
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }
  .detail-page-toolbar { gap:6px; flex-wrap:wrap; }
  .detail-page-toolbar .toolbar-actions { width:100%; display:grid; grid-template-columns:1fr 1fr; }
  .detail-page-toolbar .secondary-button,
  .detail-page-toolbar .system-link { width:100%; text-align:center; }
  .plan-summary-line { line-height:1.55; }
  .plan-detail-filters { align-items:stretch; }
  .plan-detail-filters label { min-width:0; }
  .plan-detail-filters input { width:min(158px,42vw); }
  .filter-result { flex:1 1 100%; margin-left:0; padding:2px 0 0; }
  .plan-detail-summary { gap:6px; }
  .plan-kpis { width:100%; justify-content:flex-start; }
  .matrix-wrap { max-height:calc(100dvh - 250px); }
  .drawer#drawer { width:100vw; padding:12px; }
  .drawer .drawer-header { padding-bottom:10px; }
  .drawer .drawer-context { padding:8px 0; }
  .modal { padding:0; }
  .modal-card {
    width:100vw;
    height:100dvh;
    max-height:100dvh;
    border-radius:0;
    padding:12px;
  }
  .modal-card header { position:sticky; top:-12px; z-index:3; padding:4px 0 10px; background:var(--surface); }
  .task-modal-card { width:100vw; }
  .task-facts { grid-template-columns:76px minmax(0,1fr); gap:6px 8px; margin:9px 0; }
  .task-detail-toolbar { flex-wrap:wrap; }
  .task-results { max-height:46dvh; }
  .floating-tooltip { left:8px !important; right:8px; max-width:none; }
}

@media(max-width:560px) {
  .main-content { padding-left:5px; padding-right:5px; }
  .compact-toolbar { padding:5px; }
  .compact-toolbar .scope-trigger { width:100%; text-align:center; }
  .range-filter { grid-template-columns:1fr; }
  .range-filter > span { display:none; }
  .range-filter label { display:grid; grid-template-columns:54px minmax(0,1fr); align-items:center; }
  .range-filter input { height:30px; }
  .inspection-kpis article { display:grid; gap:1px; }
  .inspection-kpis span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .inspection-kpis strong { font-size:18px; }
  .detail-page-toolbar .back-button { width:100%; justify-content:center; }
  .plan-detail-filters { display:grid; grid-template-columns:1fr; padding:6px; gap:5px; }
  .detail-range-shortcuts { width:100%; justify-content:space-between; }
  .detail-range-shortcuts button { flex:1; }
  .plan-detail-filters label { display:grid; grid-template-columns:54px minmax(0,1fr); align-items:center; }
  .plan-detail-filters input { width:100%; }
  .plan-detail-filters > span:not(.filter-result) { display:none; }
  .detail-filter-toggle { width:100%; min-height:31px; }
  .filter-result { width:100%; }
  .plan-detail-summary { padding:6px; }
  .period-note { width:100%; }
  .plan-kpis { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .plan-kpis span { text-align:center; padding:4px; }
  .matrix-wrap { max-height:calc(100dvh - 285px); }
  .cycle-matrix .inspection-item { width:145px; min-width:145px; padding:3px 5px; }
  .inspection-item span { font-size:10px; line-height:1.35; }
  .period-column,.matrix-cell { width:78px; min-width:78px; }
  .period-head > strong { font-size:9px; }
  .person-link { max-width:70px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .task-results table { min-width:720px; }
  .task-results th,.task-results td { padding:6px; }
}

/* 单一页面纵向滚动：表格只横向滚动，不创建嵌套纵向滚动区 */
.table-wrap,
.detail-table-wrap,
.inspection-plan-workspace .table-wrap,
.matrix-wrap,
.task-results {
  max-height:none !important;
  overflow-x:auto;
  overflow-y:clip;
  overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;
}

.matrix-wrap,
.inspection-plan-workspace .table-wrap {
  min-height:0;
}

.drawer-list {
  min-height:0;
}
