:root {
  --canvas: #eef1f4;
  --paper: #fbfcfd;
  --paper-strong: #ffffff;
  --ink: #17233a;
  --muted: #667085;
  --faint: #98a2b3;
  --rule: #d7dde5;
  --rule-strong: #bdc6d2;
  --blue: #155bd7;
  --blue-dark: #0f429f;
  --blue-soft: #eaf1ff;
  --amber: #b85f00;
  --amber-soft: #fff2d8;
  --red: #c63838;
  --red-soft: #fff0ef;
  --green: #237a52;
  --green-soft: #e8f6ef;
  --shadow: 0 8px 24px rgba(23, 35, 58, .07), 0 2px 5px rgba(23, 35, 58, .05);
  --radius: 12px;
  --rail-width: 224px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif; font-size: 14px; line-height: 1.5; }
button, input, select { font: inherit; }
button { color: inherit; }
::selection { background: #bcd2ff; color: #0b2d68; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #edf0f3; }
::-webkit-scrollbar-thumb { background: #b4bdc8; border: 2px solid #edf0f3; border-radius: 8px; }
:focus-visible { outline: 3px solid rgba(21, 91, 215, .28); outline-offset: 2px; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--rail-width) minmax(0, 1fr); }
.rail { position: sticky; top: 0; height: 100vh; padding: 24px 16px 18px; background: #e8edf2; border-right: 1px solid var(--rule-strong); display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 26px; }
.brand-mark { width: 36px; height: 36px; color: var(--blue); }
.brand-mark svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; }
.brand strong { display: block; font-size: 18px; letter-spacing: -.02em; }
.brand small { color: var(--muted); font-size: 11px; }
.nav-list { display: grid; gap: 6px; }
.nav-item { width: 100%; display: flex; gap: 11px; align-items: center; padding: 11px 12px; border: 1px solid transparent; border-radius: 8px; background: transparent; cursor: pointer; text-align: left; transition: background .16s ease, border-color .16s ease, color .16s ease; }
.nav-item svg, .button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { background: rgba(255,255,255,.62); border-color: rgba(189,198,210,.7); }
.nav-item.is-active { color: var(--blue-dark); background: #fff; border-color: #c9d9f5; box-shadow: 0 3px 8px rgba(23,35,58,.06); font-weight: 650; }
.rail-foot { margin-top: auto; padding: 14px 9px 0; border-top: 1px solid var(--rule-strong); color: var(--muted); font-size: 12px; display: grid; gap: 10px; }
.privacy-note { display: flex; gap: 8px; align-items: center; }
.quit-button { width: max-content; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.quit-button:hover { color: var(--ink); }
.privacy-dot { width: 8px; height: 8px; display: inline-block; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 3px rgba(35,122,82,.12); flex: 0 0 auto; }

.workspace { min-width: 0; }
.topbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px 28px; background: rgba(251,252,253,.96); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 20; }
.topbar-copy h1 { margin: 0; font-size: 21px; line-height: 1.25; letter-spacing: -.025em; }
.topbar-actions { display: flex; align-items: center; gap: 12px; min-width: 0; }
.workbench-return { padding: 8px 10px; border: 1px solid var(--rule-strong); border-radius: 7px; color: var(--blue); font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.workbench-return:hover { background: var(--blue-soft); }
.snapshot-chip { max-width: 420px; padding-right: 16px; border-right: 1px solid var(--rule); }
.snapshot-chip span { display: block; color: var(--muted); font-size: 11px; }
.snapshot-chip strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
main { padding: 24px 28px 48px; }
.view { animation: view-in .22s cubic-bezier(.2,.8,.2,1); }
@keyframes view-in { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }

.button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 7px; border: 1px solid transparent; padding: 8px 14px; cursor: pointer; font-weight: 650; text-decoration: none; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.button:active { transform: translateY(1px); }
.button-primary { color: #fff; background: var(--blue); border-color: var(--blue); box-shadow: 0 4px 10px rgba(21,91,215,.18); }
.button-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.button-primary:disabled { background: #aab5c4; border-color: #aab5c4; box-shadow: none; cursor: not-allowed; }
.button-secondary { color: var(--blue-dark); background: var(--blue-soft); border-color: #b9cef5; }
.button-quiet { background: #fff; border-color: var(--rule-strong); font-weight: 550; }
.button-quiet:hover { border-color: #8492a6; background: #f7f9fb; }
.button-wide { width: 100%; margin-top: 18px; }
.text-button { border: 0; background: transparent; color: var(--blue-dark); padding: 8px 0 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.empty-state { min-height: calc(100vh - 150px); display: grid; grid-template-columns: minmax(260px, 430px) minmax(280px, 520px); justify-content: center; align-items: center; gap: 64px; }
.empty-state h2 { font-size: 32px; line-height: 1.16; margin: 0 0 12px; letter-spacing: -.035em; }
.empty-state p { color: var(--muted); margin: 0 0 24px; max-width: 58ch; }
.empty-art { height: 320px; background: var(--paper-strong); border: 1px solid var(--rule-strong); border-radius: 10px; box-shadow: var(--shadow); position: relative; transform: rotate(-1.2deg); overflow: hidden; }
.empty-art::before { content: "项目交付核验单"; position: absolute; top: 34px; left: 34px; right: 34px; padding-bottom: 16px; border-bottom: 2px solid var(--ink); font-size: 20px; font-weight: 750; }
.sheet-line { position: absolute; left: 34px; right: 34px; height: 1px; background: var(--rule); }
.line-a { top: 114px; }.line-b { top: 162px; }.line-c { top: 210px; }
.stamp { position: absolute; right: 40px; bottom: 38px; padding: 9px 15px; border: 3px double var(--amber); color: var(--amber); font-size: 21px; font-weight: 800; letter-spacing: .12em; transform: rotate(-8deg); }

.manifest-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; background: var(--paper); border: 1px solid var(--rule); border-bottom: 0; padding: 18px 22px; border-radius: var(--radius) var(--radius) 0 0; }
.manifest-label { color: var(--blue-dark); font-weight: 700; margin: 0 0 3px; font-size: 12px; }
.manifest-head h2 { margin: 0 0 3px; font-size: 18px; word-break: break-all; }
.manifest-head p:last-child { color: var(--muted); margin: 0; font-size: 12px; }
.cutoff-block { text-align: right; min-width: 140px; }
.cutoff-block span { display: block; color: var(--muted); font-size: 12px; }
.cutoff-block strong { font-size: 17px; font-variant-numeric: tabular-nums; }

.evidence-strip { list-style: none; margin: 0 0 18px; padding: 14px 22px; display: grid; grid-template-columns: repeat(4, 1fr); background: #f7f9fb; border: 1px solid var(--rule); border-radius: 0 0 var(--radius) var(--radius); }
.evidence-strip li { min-width: 0; display: flex; align-items: center; gap: 10px; position: relative; }
.evidence-strip li:not(:last-child)::after { content: ""; height: 1px; background: var(--rule-strong); position: absolute; left: calc(100% - 28px); right: 14px; top: 17px; }
.evidence-strip li > span { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--rule-strong); border-radius: 50%; background: #fff; color: var(--muted); font-weight: 700; }
.evidence-strip li.is-done > span { color: #fff; background: var(--blue); border-color: var(--blue); }
.evidence-strip li.has-warning > span { color: var(--amber); background: var(--amber-soft); border-color: #e0a654; }
.evidence-strip strong, .evidence-strip small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evidence-strip strong { font-size: 13px; }.evidence-strip small { color: var(--muted); font-size: 11px; }

.metric-ledger { display: grid; grid-template-columns: 1.15fr repeat(5, 1fr); background: var(--paper-strong); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; overflow: hidden; }
.metric { padding: 16px 18px; min-width: 0; position: relative; }
.metric:not(:last-child)::after { content: ""; position: absolute; top: 15px; right: 0; bottom: 15px; width: 1px; background: var(--rule); }
.metric span, .metric small { display: block; color: var(--muted); }
.metric span { font-size: 12px; font-weight: 650; }.metric small { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric strong { display: block; font-size: clamp(23px, 2.2vw, 34px); line-height: 1.15; margin: 2px 0 3px; font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.metric-lead strong { color: var(--blue-dark); }.metric-alert strong { color: var(--amber); }

.dashboard-grid { display: block; }
.ledger-panel, .validation-docket, .summary-sheet, .template-note { background: var(--paper-strong); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); }
.ledger-panel { overflow: hidden; }
.panel-heading { padding: 17px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--rule); }
.panel-heading h2, .docket-head h2, .summary-sheet h2, .analysis-heading h2 { margin: 0; font-size: 16px; letter-spacing: -.015em; }
.panel-heading p, .docket-head p, .analysis-heading p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.count-badge, .local-badge { white-space: nowrap; padding: 4px 9px; border: 1px solid var(--rule); border-radius: 999px; color: var(--muted); font-size: 12px; }
.local-badge { display: inline-flex; align-items: center; gap: 7px; color: var(--green); border-color: #b7ddc9; background: var(--green-soft); }

.filter-row { padding: 12px 16px; display: flex; gap: 10px; flex-wrap: wrap; align-items: end; background: #f8fafc; border-bottom: 1px solid var(--rule); }
.filter-row label, .intake-options label { display: grid; gap: 4px; }
.filter-row label span, .intake-options label span { color: var(--muted); font-size: 11px; font-weight: 650; }
select, input[type="search"], input[type="date"] { min-height: 36px; color: var(--ink); background: #fff; border: 1px solid var(--rule-strong); border-radius: 6px; padding: 6px 30px 6px 9px; }
input[type="search"] { padding-right: 10px; min-width: 190px; }
input::placeholder { color: #7e8999; }
.search-label { flex: 1; min-width: 190px; }.search-label input { width: 100%; }
.table-scroll { overflow: auto; }
.data-table { width: 100%; min-width: 980px; border-collapse: separate; border-spacing: 0; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.data-table th { padding: 9px 10px; color: #536174; background: #f6f8fa; border-bottom: 1px solid var(--rule-strong); text-align: center; font-size: 11px; font-weight: 750; white-space: nowrap; position: sticky; top: 0; z-index: 2; }
.data-table td { padding: 9px 10px; border-bottom: 1px solid #e8ecf1; text-align: center; vertical-align: middle; white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: #f5f8fd; }
.data-table .align-left, .align-left { text-align: left; }
.data-table td.project-name { min-width: 250px; max-width: 410px; white-space: normal; line-height: 1.35; }
.data-table td.agent-name { min-width: 180px; max-width: 260px; white-space: normal; }
.sort-button { border: 0; background: transparent; padding: 0; font: inherit; color: var(--blue-dark); font-weight: 750; cursor: pointer; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.status-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-pill.complete { color: var(--green); background: var(--green-soft); }
.status-pill.partial { color: var(--amber); background: var(--amber-soft); }
.status-pill.none { color: var(--red); background: var(--red-soft); }
.product-text { display: block; min-width: 76px; max-width: 150px; white-space: normal; line-height: 1.3; }
.product-text.pending { color: var(--amber); }.gap-number { color: var(--red); font-weight: 800; }
.empty-row td { color: var(--muted); padding: 32px 16px; }

.validation-docket { padding: 18px; position: sticky; top: 100px; }
.docket-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.docket-head > span { align-self: start; padding: 3px 7px; background: var(--green-soft); color: var(--green); border-radius: 4px; font-size: 11px; font-weight: 750; }
.docket-head > span.has-warning { background: var(--amber-soft); color: var(--amber); }
.docket-score { display: flex; align-items: baseline; gap: 5px; padding: 18px 0 13px; border-bottom: 1px solid var(--rule); }
.docket-score span { color: var(--muted); margin-right: auto; }.docket-score strong { font-size: 32px; color: var(--amber); }.docket-score small { color: var(--muted); }
.docket-stats { display: grid; grid-template-columns: 1fr 1fr; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.docket-stats div { display: grid; grid-template-columns: 10px 1fr; gap: 0 7px; align-items: center; }
.docket-stats small { grid-column: 2; color: var(--muted); font-size: 10px; }
.status-mark { width: 8px; height: 8px; border-radius: 50%; }.status-mark.error { background: var(--red); }.status-mark.warning { background: #e69422; }
.issue-list { display: grid; gap: 0; max-height: 330px; overflow: auto; }
.issue-item { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.issue-item:last-child { border-bottom: 0; }
.issue-item strong { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.issue-item strong span { color: var(--red); }.issue-item.warning strong span { color: var(--amber); }
.issue-item p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }

.dashboard-validation-docket { display: grid; grid-template-columns: minmax(180px, .9fr) minmax(130px, .55fr) minmax(170px, .75fr) minmax(240px, 1.55fr) auto; gap: 18px; align-items: center; margin-top: 18px; padding: 16px 20px; position: static; }
.dashboard-validation-docket .docket-head, .dashboard-validation-docket .docket-score, .dashboard-validation-docket .docket-stats { min-height: 58px; padding: 0; border-bottom: 0; }
.dashboard-validation-docket .docket-head { align-items: start; }.dashboard-validation-docket .docket-head h2 { font-size: 15px; }.dashboard-validation-docket .docket-score { align-items: center; }.dashboard-validation-docket .docket-score strong { font-size: 27px; }
.dashboard-validation-docket .docket-stats { align-items: center; padding-left: 18px; border-left: 1px solid var(--rule); }
.dashboard-validation-docket .issue-list { max-height: 68px; min-width: 0; overflow: auto; }.dashboard-validation-docket .issue-item { padding: 0; border-bottom: 0; }.dashboard-validation-docket .issue-item p { max-width: 46ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-validation-docket .text-button { white-space: nowrap; }

.agent-summary-panel { margin-bottom: 18px; }
.agent-summary-heading { padding: 18px 20px 14px; display: flex; justify-content: space-between; align-items: end; gap: 24px; border-bottom: 1px solid var(--rule); }
.agent-summary-heading h2 { margin: 2px 0 0; font-size: 18px; letter-spacing: -.02em; }.agent-summary-heading p:not(.manifest-label) { max-width: 760px; margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.summary-dimension-label { display: grid; gap: 4px; flex: 0 0 154px; }.summary-dimension-label span { color: var(--muted); font-size: 11px; font-weight: 650; }
.agent-summary-legend { display: flex; flex-wrap: wrap; gap: 16px; padding: 11px 20px; background: #f8fafc; border-bottom: 1px solid var(--rule); color: var(--muted); font-size: 11px; }
.agent-summary-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 2px; vertical-align: 0; }.legend-complete::before { background: var(--green); }.legend-incomplete::before { background: var(--red); }.legend-rate::before { background: var(--blue); }
.agent-summary-columns, .agent-summary-row { display: grid; grid-template-columns: minmax(140px, 210px) minmax(260px, 1.2fr) minmax(270px, 1fr) 54px; gap: 14px; align-items: center; }
.agent-summary-columns { padding: 9px 20px 7px; color: var(--muted); background: #fcfdff; border-bottom: 1px solid var(--rule); font-size: 11px; font-weight: 750; }.agent-summary-columns span:nth-child(n+2), .agent-summary-columns span:last-child { text-align: right; }.agent-summary-columns span:nth-child(2) { text-align: left; }
.agent-summary-list { padding: 0 20px 8px; }.agent-summary-row { min-height: 48px; border-bottom: 1px solid #edf0f3; }.agent-summary-row:last-child { border-bottom: 0; }
.agent-summary-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 650; }
.project-progress { display: flex; height: 20px; min-width: 0; overflow: hidden; background: #edf1f5; border-radius: 3px; }.project-segment { min-width: 0; height: 100%; border: 0; padding: 0; overflow: hidden; color: #fff; background: var(--green); font: 700 11px/20px inherit; text-align: right; cursor: pointer; }.project-segment:not(:empty) { padding-right: 7px; }.project-segment.incomplete { background: var(--red); }.project-segment:focus-visible { outline: 2px solid var(--blue-dark); outline-offset: 2px; }.project-segment:disabled { cursor: default; }
.rate-progress { display: grid; grid-template-columns: minmax(80px, 1fr) auto auto; align-items: center; gap: 8px; min-width: 0; font-variant-numeric: tabular-nums; }.rate-track { display: block; height: 10px; overflow: hidden; background: #edf1f5; border-radius: 999px; }.rate-fill { display: block; height: 100%; border-radius: inherit; transform-origin: left; animation: bar-grow .45s cubic-bezier(.2,.8,.2,1); }.rate-fill.is-low { background: var(--red); }.rate-fill.is-watch { background: var(--amber); }.rate-fill.is-good { background: var(--green); }.rate-value { font-size: 12px; }.rate-value.is-low { color: var(--red); }.rate-value.is-watch { color: var(--amber); }.rate-value.is-good { color: var(--green); }.rate-progress small { color: var(--muted); font-size: 11px; white-space: nowrap; }.summary-gap { color: var(--red); text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }.summary-empty { padding: 24px 0; color: var(--muted); text-align: center; }
@keyframes bar-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.import-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.import-main { display: grid; gap: 18px; }
.drop-zone { margin: 20px; padding: 38px 24px; border: 1.5px dashed #9db4d8; background: #f6f9fe; text-align: center; cursor: pointer; border-radius: 9px; transition: background .16s ease, border-color .16s ease; }
.drop-zone:hover, .drop-zone.is-dragging { background: var(--blue-soft); border-color: var(--blue); }
.drop-zone svg { width: 48px; height: 48px; fill: none; stroke: var(--blue); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.drop-zone h3 { margin: 10px 0 3px; font-size: 18px; }.drop-zone p { color: var(--muted); margin: 0 0 16px; }
.intake-options { display: flex; align-items: end; gap: 16px; padding: 0 20px 20px; border-top: 1px solid var(--rule); padding-top: 16px; }
.intake-options p { color: var(--muted); margin: 0 0 7px; font-size: 12px; }
.summary-sheet { padding: 20px; position: sticky; top: 100px; }
.summary-sheet h2 { padding-bottom: 13px; border-bottom: 2px solid var(--ink); }
.summary-sheet dl { margin: 12px 0; }.summary-sheet dl div { display: grid; grid-template-columns: 86px minmax(0,1fr); gap: 10px; padding: 6px 0; }
.summary-sheet dt { color: var(--muted); }.summary-sheet dd { margin: 0; word-break: break-all; font-weight: 600; }
.summary-numbers { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.summary-numbers div { text-align: center; padding: 15px 5px; }.summary-numbers div:not(:last-child) { border-right: 1px solid var(--rule); }
.summary-numbers span { display: block; color: var(--muted); font-size: 10px; }.summary-numbers strong { font-size: 25px; font-variant-numeric: tabular-nums; }.summary-numbers .danger { color: var(--red); }.summary-numbers .warning-text { color: var(--amber); }
.result-callout { margin-top: 16px; padding: 13px 14px; background: #f3f6f9; border: 1px solid var(--rule); border-radius: 7px; }
.result-callout.is-ready { background: var(--green-soft); border-color: #b9deca; }.result-callout.has-error { background: var(--red-soft); border-color: #efb9b5; }
.result-callout strong { display: block; }.result-callout p, .summary-foot { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.summary-foot { margin-top: 12px; line-height: 1.5; }
.check-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.check-item { padding: 14px 16px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.check-item:nth-child(4n) { border-right: 0; }.check-item:nth-last-child(-n+4) { border-bottom: 0; }
.check-item span { display: block; color: var(--muted); font-size: 11px; }.check-item strong { display: block; margin-top: 3px; }.check-item strong.ok { color: var(--green); }.check-item strong.warn { color: var(--amber); }
.issue-filters { display: flex; gap: 2px; }.issue-filters button { padding: 5px 8px; border: 1px solid transparent; border-radius: 5px; }
.issue-filters button.is-active { color: var(--blue-dark); background: var(--blue-soft); border-color: #c4d6f6; }
.issue-level { padding: 3px 7px; border-radius: 4px; font-size: 11px; font-weight: 750; }.issue-level.error { color: var(--red); background: var(--red-soft); }.issue-level.warning { color: var(--amber); background: var(--amber-soft); }

.history-list { display: grid; }
.history-entry { display: grid; grid-template-columns: 150px minmax(220px, 1fr) repeat(3, 100px) 120px; align-items: center; gap: 18px; padding: 16px 20px; border-bottom: 1px solid var(--rule); }
.history-entry:last-child { border-bottom: 0; }.history-entry:hover { background: #f7f9fc; }
.history-entry time { font-weight: 750; font-variant-numeric: tabular-nums; }.history-entry .file { min-width: 0; }.history-entry .file strong, .history-entry .file small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.history-entry .file small, .history-entry .history-stat span { color: var(--muted); font-size: 11px; }
.history-stat strong, .history-stat span { display: block; }.history-empty { text-align: center; padding: 60px 20px; color: var(--muted); }

.guide-layout { display: grid; grid-template-columns: minmax(0, 760px) 300px; gap: 30px; align-items: start; justify-content: center; }
.guide-article { background: var(--paper-strong); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); padding: 34px 40px; }
.guide-article h2 { font-size: 30px; margin: 0 0 8px; letter-spacing: -.035em; }.guide-article .lead { font-size: 16px; color: var(--muted); max-width: 65ch; }
.guide-article h3 { margin: 34px 0 10px; padding-top: 18px; border-top: 1px solid var(--rule); font-size: 17px; }.guide-article li { margin: 7px 0; }.guide-article p, .guide-article li { max-width: 72ch; }
.template-note { padding: 22px; position: sticky; top: 100px; }.template-note h3 { margin: 0 0 14px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }.template-note div { padding: 12px 0; border-bottom: 1px solid var(--rule); }.template-note p { color: var(--muted); margin: 4px 0 0; }.template-note .small { font-size: 11px; margin-top: 16px; }

.toast { position: fixed; right: 24px; bottom: 24px; max-width: 420px; color: #fff; background: var(--ink); padding: 12px 16px; border-radius: 8px; box-shadow: 0 10px 30px rgba(23,35,58,.22); z-index: 100; }
.shutdown-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }
.shutdown-screen h1 { margin: 0 0 8px; font-size: 30px; letter-spacing: -.035em; }
.shutdown-screen p { margin: 0; color: var(--muted); }

@media (max-width: 1180px) {
  :root { --rail-width: 188px; }
  .metric-ledger { grid-template-columns: repeat(3, 1fr); }
  .metric:nth-child(3)::after { display: none; }.metric:nth-child(-n+3) { border-bottom: 1px solid var(--rule); }
  .validation-docket, .summary-sheet, .template-note { position: static; }
  .dashboard-validation-docket { grid-template-columns: 1.2fr .7fr 1fr; }.dashboard-validation-docket .docket-head, .dashboard-validation-docket .docket-score, .dashboard-validation-docket .docket-stats { border-bottom: 0; }.dashboard-validation-docket .issue-list, .dashboard-validation-docket .text-button { grid-column: 1 / -1; }
  .import-layout { grid-template-columns: 1fr; }.import-summary { order: -1; }
  .history-entry { grid-template-columns: 120px minmax(180px, 1fr) repeat(2, 84px) 110px; }.history-entry .history-stat:nth-of-type(3) { display: none; }
}

@media (max-width: 820px) {
  .app-shell { display: block; }.rail { position: sticky; height: auto; z-index: 30; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--rule-strong); flex-direction: row; align-items: center; gap: 12px; }
  .brand { padding: 0; margin-right: auto; }.brand small, .rail-foot { display: none; }.brand-mark { width: 30px; height: 30px; }.brand strong { font-size: 16px; }
  .nav-list { display: flex; gap: 4px; }.nav-item { width: 42px; height: 42px; padding: 10px; justify-content: center; font-size: 0; }.nav-item span { display: block; font-size: 18px; line-height: 1; }
  .topbar { top: 63px; padding: 10px 16px; min-height: 66px; }.snapshot-chip { display: none !important; }.topbar-copy h1 { font-size: 18px; }
  main { padding: 16px 14px 36px; }.empty-state { grid-template-columns: 1fr; gap: 28px; padding: 30px 10px; }.empty-art { height: 230px; }.empty-state h2 { font-size: 27px; }
  .evidence-strip { grid-template-columns: repeat(2,1fr); gap: 13px; }.evidence-strip li::after { display: none; }
  .metric-ledger { grid-template-columns: repeat(2, 1fr); }.metric:nth-child(3)::after { display: block; }.metric:nth-child(2n)::after { display: none; }.metric:nth-child(-n+4) { border-bottom: 1px solid var(--rule); }
  .agent-summary-heading { align-items: start; flex-direction: column; gap: 12px; }.summary-dimension-label { width: 100%; max-width: 240px; }.agent-summary-columns { display: none; }.agent-summary-list { overflow-x: auto; }.agent-summary-row { min-width: 700px; }.dashboard-validation-docket { display: block; }.dashboard-validation-docket .docket-head, .dashboard-validation-docket .docket-score, .dashboard-validation-docket .docket-stats { min-height: 0; padding: 14px 0; border-bottom: 1px solid var(--rule); }.dashboard-validation-docket .docket-stats { padding-left: 0; border-left: 0; }.dashboard-validation-docket .issue-list { max-height: 140px; padding: 14px 0; }.dashboard-validation-docket .issue-item p { white-space: normal; }.dashboard-validation-docket .text-button { padding-top: 4px; }
  .manifest-head { align-items: start; }.cutoff-block { min-width: 110px; }.panel-heading { align-items: flex-start; flex-direction: column; }
  .check-grid { grid-template-columns: repeat(2,1fr); }.check-item:nth-child(4n) { border-right: 1px solid var(--rule); }.check-item:nth-child(2n) { border-right: 0; }.check-item:nth-last-child(-n+4) { border-bottom: 1px solid var(--rule); }.check-item:nth-last-child(-n+2) { border-bottom: 0; }
  .history-entry { grid-template-columns: 100px minmax(170px,1fr) 84px; }.history-entry .history-stat:nth-of-type(n+2) { display: none; }
  .guide-layout { grid-template-columns: 1fr; }.guide-article { padding: 26px 22px; }
}

@media (max-width: 520px) {
  .topbar-actions .button { padding: 8px 10px; }.topbar-actions .button svg { display: none; }
  .manifest-head { display: block; }.cutoff-block { text-align: left; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--rule); }
  .evidence-strip, .metric-ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-row label, .search-label { width: calc(50% - 5px); min-width: 0; }.filter-row select, .filter-row input { width: 100%; min-width: 0; }
  .intake-options { align-items: stretch; flex-direction: column; }.intake-options input { width: 100%; }
  .summary-numbers strong { font-size: 21px; }.history-entry { grid-template-columns: 1fr auto; }.history-entry time { grid-column: 1 / -1; }
}

/* Two-file dashboard additions.  These supersede the retired validation docket
   and keep the operational summary broad enough for the project register. */
.metric-ledger { grid-template-columns: 1.15fr repeat(3, 1fr); }
.comparison-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 0 18px; padding: 16px 20px; background: #f6f9fe; border: 1px solid #cbd9f0; border-radius: var(--radius); }
.comparison-panel h2 { margin: 0; font-size: 16px; }.comparison-panel p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.comparison-content { display: grid; grid-template-columns: repeat(3, minmax(124px, 1fr)); gap: 1px; background: #d5dfe9; border: 1px solid #d5dfe9; border-radius: 8px; overflow: hidden; }
.compare-cell { padding: 9px 14px; background: #fff; }.compare-cell span { display: block; color: var(--muted); font-size: 11px; }.compare-cell strong { display: block; margin-top: 1px; font-size: 17px; font-variant-numeric: tabular-nums; }.positive { color: var(--green); }.negative { color: var(--red); }.comparison-empty { margin: 0; color: var(--muted); }
.agent-summary-row > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }.project-stack { display: flex; height: 22px; overflow: hidden; border-radius: 4px; background: #edf1f5; }.project-stack button { min-width: 0; border: 0; padding: 0 7px; overflow: hidden; color: #fff; font-size: 11px; font-weight: 700; text-align: right; cursor: pointer; }.stack-complete { background: var(--green); }.stack-incomplete { background: var(--red); }.project-stack button:empty { padding: 0; }.rate-track { display: grid; grid-template-columns: minmax(80px, 1fr) auto auto; align-items: center; gap: 8px; height: auto; overflow: visible; background: transparent; border-radius: 0; }.rate-track .rate-fill { grid-column: 1; grid-row: 1; height: 10px; }.rate-track::before { content: ""; grid-column: 1; grid-row: 1; height: 10px; border-radius: 999px; background: #edf1f5; }.rate-fill.low { background: var(--red); }.rate-fill.mid { background: var(--amber); }.rate-fill.high { background: var(--green); }.rate-track b { grid-column: 2; grid-row: 1; font-size: 12px; }.rate-track b.low { color: var(--red); }.rate-track b.mid { color: var(--amber); }.rate-track b.high { color: var(--green); }.rate-track small { grid-column: 3; grid-row: 1; color: var(--muted); font-size: 11px; white-space: nowrap; }.agent-summary-row em { color: var(--red); font-style: normal; font-weight: 700; text-align: right; }
.status-已完成 { color: var(--green); background: var(--green-soft); }.status-部分交付 { color: var(--amber); background: var(--amber-soft); }.status-尚未交付 { color: var(--red); background: var(--red-soft); }.gap-cell { color: var(--red); font-weight: 750; }.no-data { padding: 32px !important; color: var(--muted); }
.update-layout { max-width: 980px; margin: 0 auto; }.pair-file-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 20px; }.file-card { display: grid; gap: 7px; min-height: 172px; padding: 18px; border: 1px solid #bfcfe5; border-radius: 9px; background: #f8fbff; cursor: pointer; }.file-card:hover { border-color: var(--blue); background: var(--blue-soft); }.file-card span { color: var(--blue-dark); font-size: 11px; font-weight: 750; }.file-card strong { font-size: 18px; }.file-card small { color: var(--muted); }.file-card input { margin-top: auto; max-width: 100%; }.intake-panel > .button-secondary { margin: 0 20px 20px; }.pair-ready { margin: 0 20px 20px; padding: 18px; border: 1px solid #b9deca; border-radius: 9px; background: #f5fbf7; }.pair-ready-head { display: flex; justify-content: space-between; gap: 18px; }.pair-ready h3 { margin: 0; font-size: 16px; }.pair-ready p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }.pair-ready dl { display: grid; grid-template-columns: 1fr 1fr; margin: 16px 0; border-top: 1px solid #cfe3d8; border-left: 1px solid #cfe3d8; }.pair-ready dl div { min-width: 0; padding: 9px 11px; border-right: 1px solid #cfe3d8; border-bottom: 1px solid #cfe3d8; }.pair-ready dt { color: var(--muted); font-size: 11px; }.pair-ready dd { margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }.history-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 17px 20px; border-bottom: 1px solid var(--rule); }.history-row:last-child { border-bottom: 0; }.history-row:hover { background: #f7f9fc; }.history-row h3 { margin: 5px 0 2px; font-size: 14px; }.history-row p { margin: 0; color: var(--muted); font-size: 12px; }.history-meta { display: flex; align-items: center; gap: 14px; white-space: nowrap; color: var(--muted); }.date-badge, .legacy-badge { display: inline-block; padding: 3px 7px; border-radius: 4px; color: var(--blue-dark); background: var(--blue-soft); font-size: 11px; font-weight: 750; }.legacy-badge { color: var(--amber); background: var(--amber-soft); }.history-row.legacy { background: #fcfbf8; }.empty-inline { padding: 24px 20px; color: var(--muted); text-align: center; }
@media (max-width: 1180px) { .comparison-panel { align-items: flex-start; flex-direction: column; }.metric-ledger { grid-template-columns: repeat(2, 1fr); }.metric:nth-child(2n)::after { display: none; } }
@media (max-width: 820px) { .comparison-content { width: 100%; }.pair-file-grid { grid-template-columns: 1fr; }.agent-summary-row { min-width: 700px; }.history-row { align-items: flex-start; flex-direction: column; }.history-meta { width: 100%; justify-content: space-between; }.metric-ledger { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .comparison-content { grid-template-columns: 1fr; }.pair-ready dl { grid-template-columns: 1fr; }.pair-ready-head { align-items: flex-start; flex-direction: column; }.metric:not(:last-child)::after { display: none; } }

/* Core delivery metrics intentionally use five independent, actionable cards.
   Their shared scope is visible above the grid so numbers are never mistaken
   for a fixed "due only" calculation. */
.core-overview { margin-bottom: 18px; }
.core-filter-bar { display: flex; align-items: end; gap: 16px; min-height: 68px; padding: 12px 16px; border: 1px solid #d5dfe9; border-bottom: 0; border-radius: 10px 10px 0 0; background: #f8fafc; }
.core-filter-group { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }.core-filter-label, .core-date-filter > span, .core-month-filter > span { color: var(--muted); font-size: 11px; font-weight: 750; }
.core-segmented { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid #d5dfe9; border-radius: 7px; background: #fff; }.core-scope-button { min-height: 30px; padding: 0 12px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; }.core-scope-button:hover { background: #edf3ff; color: var(--blue-dark); }.core-scope-button.is-active { background: var(--blue); color: #fff; }
.core-date-filter, .core-month-filter { display: grid; gap: 4px; }.core-date-filter { margin-left: auto; }.core-date-filter input, .core-month-filter select { min-width: 136px; }.core-scope-note { margin-left: auto; padding-bottom: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.metric-ledger { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 0; padding: 12px; overflow: visible; border: 1px solid #d5dfe9; border-radius: 0 0 10px 10px; background: #f8fafc; box-shadow: none; }
.metric-card { min-height: 158px; padding: 17px 18px; appearance: none; border: 1px solid #dde5ee; border-radius: 9px; background: #fff; box-shadow: 0 4px 12px rgba(28, 51, 84, .06); color: var(--ink); cursor: pointer; text-align: left; transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease; }.metric-card:hover { transform: translateY(-2px); border-color: #aac6ef; box-shadow: 0 8px 18px rgba(28, 51, 84, .12); }.metric-card:focus-visible { outline: 3px solid rgba(31, 102, 216, .32); outline-offset: 2px; }
.metric-card::after { display: none !important; }.metric-card span { color: #64748b; font-size: 13px; font-weight: 700; }.metric-card strong { margin: 8px 0 5px; color: var(--ink); font-size: clamp(28px, 2.6vw, 38px); }.metric-card small { min-height: 30px; overflow: visible; color: var(--muted); line-height: 1.45; white-space: normal; }.metric-card em { display: block; margin-top: 11px; color: var(--blue); font-size: 11px; font-style: normal; font-weight: 750; }
.metric-complete strong { color: #198754; }.metric-incomplete strong { color: #d92d2d; }.metric-rate strong { color: #c66a00; }.metric-airport strong { color: var(--blue); }
@media (max-width: 1320px) { .metric-ledger { grid-template-columns: repeat(3, minmax(0, 1fr)); }.core-scope-note { margin-left: 0; } }
@media (max-width: 820px) { .core-filter-bar { align-items: flex-start; flex-wrap: wrap; }.core-date-filter { margin-left: 0; }.core-scope-note { width: 100%; padding: 0; }.metric-ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }.metric-card { min-height: 146px; } }
@media (max-width: 520px) { .core-filter-bar { gap: 10px; padding: 12px; }.core-filter-group { align-items: flex-start; flex-direction: column; gap: 7px; }.core-segmented { width: 100%; }.core-scope-button { flex: 1; padding: 0 8px; }.core-date-filter, .core-date-filter input, .core-month-filter, .core-month-filter select { width: 100%; }.metric-ledger { grid-template-columns: 1fr; gap: 9px; padding: 9px; }.metric-card { min-height: 132px; } }

/* Version comparison: one compact two-point trend for each operational metric,
   followed by an auditable project-ID change list. */
.comparison-panel { display: block; padding: 18px 20px; }
.comparison-panel > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.comparison-content { display: block; margin-top: 14px; border: 0; border-radius: 0; background: transparent; overflow: visible; }
.trend-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #d5dfe9; border-radius: 8px; overflow: hidden; background: #d5dfe9; gap: 1px; }
.trend-metric { min-width: 0; display: grid; grid-template-columns: minmax(96px, 1fr) 98px; grid-template-rows: auto auto; gap: 3px 12px; align-items: center; padding: 12px 14px; background: #fff; }
.trend-metric span, .trend-metric small { display: block; color: var(--muted); font-size: 11px; }.trend-metric strong { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.trend-metric small { grid-column: 1 / -1; white-space: nowrap; }.trend-line { width: 98px; height: 40px; grid-column: 2; grid-row: 1; }
.project-change { margin-top: 12px; border: 1px solid #d5dfe9; border-radius: 8px; background: #fff; overflow: hidden; }
.project-change-head { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 11px 14px; background: #f8fafc; border-bottom: 1px solid #dfe6ee; }.project-change-head strong, .project-change-head small { display: block; }.project-change-head strong { font-size: 13px; }.project-change-head small { color: var(--muted); font-size: 11px; }.project-change-head > span { color: var(--blue-dark); font-size: 12px; font-weight: 700; white-space: nowrap; }
.project-change-columns { display: grid; grid-template-columns: 1fr 1fr; }.project-change-columns section { min-width: 0; padding: 11px 14px; }.project-change-columns section + section { border-left: 1px solid #dfe6ee; }.project-change-columns h3 { margin: 0 0 7px; color: var(--muted); font-size: 11px; }.project-change-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }.project-change-list li { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 4px 0; font-size: 12px; }.project-change-list b, .project-change-list span, .project-change-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.project-change-list small { color: var(--muted); }.project-change-list .more-projects { display: block; color: var(--muted); }.project-change-empty { margin: 0; padding: 5px 0; color: var(--muted); font-size: 12px; }
@media (max-width: 1180px) { .trend-grid { grid-template-columns: 1fr; }.trend-metric { grid-template-columns: minmax(120px, 1fr) 110px; }.trend-line { width: 110px; }.project-change-columns { grid-template-columns: 1fr; }.project-change-columns section + section { border-top: 1px solid #dfe6ee; border-left: 0; } }
@media (max-width: 520px) { .comparison-panel > div:first-child, .project-change-head { align-items: flex-start; flex-direction: column; gap: 4px; }.trend-metric { grid-template-columns: minmax(0, 1fr) 86px; }.trend-line { width: 86px; }.project-change-list li { grid-template-columns: 95px minmax(0, 1fr); }.project-change-list small { grid-column: 2; } }

/* Keep all three version trends in one comparison table so the values share a
   stable reading order instead of being interpreted as three separate cards. */
.version-table-wrap { overflow-x: auto; border: 1px solid #d5dfe9; border-radius: 8px; background: #fff; }
.version-trend-table { width: 100%; min-width: 720px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.version-trend-table th, .version-trend-table td { padding: 10px 14px; border-bottom: 1px solid #e3e8ef; text-align: left; white-space: nowrap; }
.version-trend-table thead th { color: var(--muted); background: #f8fafc; font-size: 11px; font-weight: 750; }.version-trend-table tbody th { color: var(--ink); font-size: 12px; }.version-trend-table tbody tr:last-child th, .version-trend-table tbody tr:last-child td { border-bottom: 0; }
.version-trend-table td { font-size: 12px; }.version-trend-table td strong { font-size: 15px; }.version-trend-table td:last-child { width: 118px; padding-top: 3px; padding-bottom: 3px; }.version-trend-table .trend-line { display: block; width: 98px; height: 32px; }
@media (max-width: 520px) { .version-table-wrap { margin-right: -2px; }.version-trend-table th, .version-trend-table td { padding: 9px 11px; } }

/* Historical metrics need their own full-width plotting surface: one table,
   three independently scaled lines, and no miniature chart column. */
.trend-panel { margin: 0 0 18px; }
.history-trend-wrap { overflow-x: auto; }
.history-trend-table { width: 100%; min-width: 720px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.history-trend-table th, .history-trend-table td { padding: 14px 18px; border-bottom: 1px solid #e3e8ef; vertical-align: middle; }
.history-trend-table tr:last-child th, .history-trend-table tr:last-child td { border-bottom: 0; }
.history-trend-table th { width: 148px; text-align: left; background: #f8fafc; }
.history-trend-table th span, .history-trend-table th small { display: block; color: var(--muted); font-size: 11px; font-weight: 650; }
.history-trend-table th strong { display: block; margin: 3px 0 2px; color: var(--ink); font-size: 21px; letter-spacing: -.025em; }
.history-chart { display: block; width: 100%; min-width: 560px; height: 132px; overflow: visible; }
.chart-rule { stroke: #e0e7ef; stroke-width: 1; }.chart-value, .chart-date { fill: #6d7a8d; font-size: 11px; font-family: inherit; }.chart-date { font-size: 10px; }
.summary-controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.summary-dimension-label { display: grid; gap: 4px; }.summary-dimension-label span { color: var(--muted); font-size: 11px; font-weight: 650; }.summary-dimension-label select, .summary-dimension-label input { min-width: 154px; }
.deadline-pill { display: inline-block; padding: 3px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }.deadline-due { color: #9a4c00; background: var(--amber-soft); }.deadline-not-due { color: var(--blue-dark); background: var(--blue-soft); }
@media (max-width: 820px) { .agent-summary-heading { align-items: flex-start; flex-direction: column; }.summary-controls { width: 100%; }.summary-dimension-label { flex: 1; min-width: 148px; }.summary-dimension-label select, .summary-dimension-label input { width: 100%; }.history-trend-table th, .history-trend-table td { padding: 12px 14px; } }
@media (max-width: 520px) { .history-trend-table { min-width: 650px; }.history-trend-table th { width: 126px; }.history-chart { min-width: 490px; }.history-trend-table th, .history-trend-table td { padding: 10px 12px; } }
