/* 226 Precision Workbench: a presentation layer over the existing application. */
:root {
  --ink:#182a41;
  --muted:#58677b;
  --line:#dfe6ef;
  --paper:#fff;
  --bg:#f2f5f9;
  --blue:#2459c4;
  --blue2:#194396;
  --danger:#bb3043;
  --ui-font:"Segoe UI","Microsoft YaHei","PingFang SC",system-ui,sans-serif;
  --number-font:Bahnschrift,"Segoe UI","Microsoft YaHei",sans-serif;
  --radius-control:9px;
  --radius-surface:12px;
  --radius-dialog:18px;
  --ease:cubic-bezier(.2,.7,.2,1);
  --shadow:0 18px 48px rgba(24,42,65,.08);
}
html {scroll-padding-top:100px}
body {font-family:var(--ui-font);line-height:1.5;-webkit-font-smoothing:antialiased}
::selection {background:#cdddf8;color:#163b80}
button,a,input,select,textarea,summary {-webkit-tap-highlight-color:transparent}
button,input,select,textarea {font-family:inherit}
button,a,summary {touch-action:manipulation}
button,a,summary {transition:background-color 150ms var(--ease),border-color 150ms var(--ease),color 150ms var(--ease),box-shadow 150ms var(--ease),transform 150ms var(--ease)}
:where(button,a,input,select,textarea,summary):focus-visible {outline:2px solid var(--blue);outline-offset:3px;box-shadow:0 0 0 4px #2459c414}
input,select,textarea {border-color:#ced8e6;border-radius:var(--radius-control);transition:border-color 140ms var(--ease),box-shadow 140ms var(--ease),background-color 140ms var(--ease)}
input:hover,select:hover,textarea:hover {border-color:#a9b9cf}
input:focus,select:focus,textarea:focus {border-color:var(--blue);box-shadow:0 0 0 3px #2459c414}
input:disabled,select:disabled,textarea:disabled {cursor:not-allowed}
input::placeholder,textarea::placeholder {color:#69768a;opacity:1}
.skip-link {position:fixed;z-index:200;top:12px;left:12px;transform:translateY(-180%);padding:10px 16px;border-radius:8px;background:var(--ink);color:#fff;text-decoration:none;font-size:14px}
.skip-link:focus {transform:translateY(0)}
.eyebrow {font-size:10px;letter-spacing:.13em;font-weight:700;color:var(--blue)}
.primary,.secondary,.link-button {min-height:44px;font-size:14px;line-height:20px;letter-spacing:.01em;border-radius:var(--radius-control);display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;font-weight:650}
.primary {background:var(--blue);box-shadow:0 3px 8px #2459c41a;border:1px solid transparent}
.primary:hover:not(:disabled) {background:var(--blue2);box-shadow:0 5px 13px #19439629;transform:translateY(-1px)}
.primary:active:not(:disabled),.secondary:active,.link-button:active {transform:translateY(1px)}
.secondary,.link-button {border-color:#d3ddeb;color:#354760;box-shadow:0 1px 2px #182a4104}
.secondary:hover,.link-button:hover {color:var(--blue);background:#f4f8ff;border-color:#8ea9d5}
.primary:disabled,.secondary:disabled {cursor:wait;opacity:.65;transform:none}
.icon-btn {display:grid;place-items:center;flex:none;width:38px;height:38px;border:1px solid var(--line);border-radius:9px;background:#f5f7fb;color:#53657e;line-height:1}
.icon-btn:hover {color:var(--ink);background:#e9eef6}
/* Selected 226 signature: a crisp, open wordmark, not an app-tile badge. */
.brand-mark {display:block;flex:none;width:108px;height:44px;border-radius:0;background:transparent;box-shadow:none;color:#102d4b}
.brand-mark.small {width:56px;height:32px;border-radius:0;box-shadow:none;color:#f4f7ff}
.brand-signature {display:block;width:100%;height:100%;fill:currentColor}

/* Architectural linework is quiet identity, not an interactive canvas. */
.login-shell {position:relative;isolation:isolate;overflow:hidden;min-height:100dvh;background:linear-gradient(118deg,#e9eef6 0%,#f6f8fb 48%,#eef3f8 100%)}
.login-shell::before {content:"";position:absolute;z-index:-1;width:min(82vw,1080px);height:min(68vw,780px);left:-12%;top:-18%;border:1px solid #8ea5c32b;transform:rotate(-28deg);background:repeating-linear-gradient(90deg,transparent 0 85px,#8ea5c312 85px 86px),repeating-linear-gradient(0deg,transparent 0 85px,#8ea5c312 85px 86px)}
.login-shell::after {content:"";position:absolute;z-index:-1;width:42vw;height:52vh;right:-13%;bottom:-12%;border:1px solid #8ea5c329;box-shadow:0 0 0 44px #8ea5c30a,0 0 0 88px #8ea5c308;transform:rotate(-28deg)}
.login-card {position:relative;width:min(448px,100%);padding:42px 44px 30px;border:1px solid #dce4ee;border-radius:18px;background:#fff;box-shadow:0 22px 72px #263f6012}
.login-card::before {content:"";position:absolute;top:-1px;left:44px;width:54px;height:3px;background:var(--blue);border-radius:0 0 2px 2px}
.login-card .brand-mark {width:108px;height:44px;margin-bottom:16px}
.login-card .eyebrow {margin-bottom:10px;font-size:10px;letter-spacing:.18em}
.login-card h1 {font-size:28px;line-height:1.35;font-weight:750;letter-spacing:-.055em;margin:0 0 14px;max-width:100%}
.login-card>p.muted {font-size:13px;line-height:1.85;margin:0;color:var(--muted);text-wrap:pretty}
.login-card .stack {gap:17px;margin-top:28px}
.login-card label,.captcha-field label {font-size:12px;font-weight:650;color:#41536d;letter-spacing:.02em}
.login-card input {height:46px;font-size:14px;background:#fcfdff}
.login-card .wide {height:47px;margin-top:3px}
.captcha-question-row strong {font-family:var(--number-font);font-size:17px;color:#1d479e;border-color:#d7e3f7;background:#f3f7fd;letter-spacing:.07em}
.captcha-question-row .secondary {min-height:42px;font-size:12px}
.form-error {font-size:12px;line-height:1.7}

/* The established left navigation / right workspace frame is retained. */
.app>main {min-width:0;background:var(--bg)}
.sidebar {background:radial-gradient(ellipse at 0% 8%,#829eb638,transparent 55%),linear-gradient(162deg,#17233b 0%,#29465e 48%,#315b60 100%);border-right:0;padding:24px 0 24px 16px}
.brand {gap:11px;padding:0 8px 28px}
.brand b {font-size:15px;font-weight:700;letter-spacing:-.025em;color:#f4f7ff}
.brand small {font-size:11px;color:#a8b7ce;letter-spacing:.055em}
.sidebar nav {position:relative;isolation:isolate;gap:0;cursor:pointer}
.nav-item {gap:11px;padding:14px 12px;font-size:13px;line-height:21px;border-radius:0;color:#c4d1e4;font-weight:550;min-height:49px}
.sidebar .nav-item {position:relative;z-index:1;transform:none}
.sidebar .nav-item:focus-visible {outline:2px solid #bcd0f1;outline-offset:-4px;box-shadow:none}
.sidebar .nav-item.active:focus-visible {outline-color:var(--blue)}
.nav-selection-indicator {position:absolute;left:0;top:0;z-index:0;width:0;height:0;border-radius:8px 0 0 8px;background:var(--bg);box-shadow:none;opacity:0;pointer-events:none;will-change:transform}
.nav-selection-indicator.is-visible {opacity:1}
.sidebar nav.has-selection-indicator .nav-item.active {background:transparent;box-shadow:none}
.nav-item>span {display:grid;place-items:center;width:20px;flex:none}
.nav-icon,.search-icon {width:19px;height:19px;display:block;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.nav-item:hover {background:#ffffff0b;color:#f7faff}
.nav-item.active {background:var(--bg);color:var(--ink);box-shadow:none;border-radius:8px 0 0 8px}
.nav-item.active .nav-icon {color:#365779}
.sidebar .nav-divider {display:none}
.sidebar-foot {display:flex;align-items:center;justify-content:space-between;gap:10px;border-color:#dce8f025;padding:16px 8px 0;margin-right:16px}
.sidebar-foot .user-chip {flex:1;min-width:0;gap:0}
.sidebar-foot .user-chip>div {min-width:0}

.sidebar-foot .user-chip b {font-size:12px;font-weight:550;color:#f0f5fa;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sidebar-foot .user-chip small {font-size:10px;line-height:1.4;margin-top:3px;color:#beced9}
.logout-button {display:inline-flex;align-items:center;justify-content:center;gap:6px;flex:none;min-height:44px;padding:8px;border:1px solid transparent;border-radius:8px;background:transparent;color:#d3dfe7;font-size:11px;font-weight:500;line-height:18px}
.account-icon {display:block;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.logout-button:hover {background:#ffffff0d;border-color:#dce8f022;color:#fff}
.logout-button:active {background:#ffffff18;transform:none}
.logout-button:focus-visible {outline:2px solid #d5e5f2;outline-offset:2px;box-shadow:none;color:#fff}
.info-tip {display:inline-grid;place-items:center;vertical-align:middle;width:22px;height:22px;flex:none;padding:0;border:0;border-radius:50%;background:transparent;color:#6d8199;cursor:help;line-height:1}
.info-tip svg {display:block;width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.info-tip:hover {color:var(--blue);background:#2459c40a}
.info-tip:focus-visible {outline:2px solid var(--blue);outline-offset:1px;box-shadow:none}
.form-panel>label>span {color:inherit}
.context-help {position:fixed;z-index:1000;width:max-content;max-width:min(320px,calc(100vw - 24px));padding:12px 14px;border:1px solid #d9e3ef;border-radius:9px;background:#fff;color:#334966;box-shadow:0 10px 30px #182a411c;font-size:12px;font-weight:400;line-height:1.8;white-space:normal;overflow-wrap:anywhere;text-align:left}
.context-help[hidden] {display:none}
#recordForm>.dialog-actions {justify-content:flex-end}

.topbar {position:relative;height:88px;background:#ffffffed;padding:19px 34px;border-color:#dce4ee;gap:16px}
.topbar>div:not(.request-track) {min-width:0}
.topbar .eyebrow {margin-bottom:5px;color:#4b648b;font-size:9px;letter-spacing:.15em}
.topbar h2 {font-size:24px;line-height:1.35;letter-spacing:-.035em;font-weight:700}
.topbar .primary {flex:none;min-height:42px;padding:10px 16px}
.request-track {position:absolute;bottom:-1px;left:0;right:0;height:2px;overflow:hidden;opacity:0;pointer-events:none;transition:opacity 120ms var(--ease)}
.request-track>span {position:absolute;width:32%;height:100%;background:var(--blue);transform:translateX(-110%)}
.is-requesting .request-track {opacity:1;transition-delay:80ms}
.is-requesting .request-track>span {animation:request-travel 1.25s var(--ease) infinite}
@keyframes request-travel {to{transform:translateX(415%)}}
.page {padding:24px 34px}
.page:not(.hidden) {animation:workspace-in 180ms var(--ease) both}
@keyframes workspace-in {from{opacity:.35;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
.panel {border-color:#dce4ee;border-radius:var(--radius-surface);box-shadow:0 2px 8px #263f6004;overflow:visible}
.split-grid,.split-grid>* {min-width:0}
.table-wrap {max-width:100%;border-radius:0 0 12px 12px}
.panel-head {padding:20px 22px;gap:16px;border-color:var(--line)}
.panel-head h3 {font-size:16px;letter-spacing:-.02em;font-weight:700;line-height:1.5}
.panel-head p {font-size:12px;line-height:1.7;color:var(--muted)}
.toolbar {padding:16px;gap:10px;background:#fff;border-radius:12px 12px 0 0;border-color:var(--line)}
.toolbar input,.toolbar select,.toolbar summary {font-size:16px;height:47px}
.toolbar .secondary,.toolbar .link-button {height:47px}
#ledgerPage .toolbar>.search-box {width:453px;flex-basis:453px;padding-inline:12px;gap:10px;min-width:0;border-color:#ced8e6;background:#fcfdff;transition:border-color 140ms var(--ease),box-shadow 140ms var(--ease)}
#ledgerPage .search-box:focus-within {border-color:var(--blue);box-shadow:0 0 0 3px #2459c414;background:#fff}
.search-icon {flex:none;width:17px;height:17px;color:#677994}
#ledgerPage #searchInput {font-size:14px;padding-block:10px;background:transparent}

/* Existing fixed card widths and responsive column budgets are not overridden. */
.summary-card {border-color:#dce4ee;border-radius:var(--radius-surface);box-shadow:none;padding:20px;position:relative}
.summary-card>span {color:#4d5f77;font-size:12px;font-weight:550}
.summary-card>strong {font-family:var(--number-font);font-size:32px;line-height:1.15;font-weight:600;margin:14px 0 0;letter-spacing:-.04em}
.summary-card>strong>em {font-family:var(--ui-font);font-size:11px;margin-left:1px;letter-spacing:0}

.summary-card:hover {background:#fbfdff;border-color:#9ab2d9;box-shadow:0 4px 14px #24436b08;transform:translateY(-1px)}
.summary-card.is-active {border-color:#2d63c9;background:#fff;box-shadow:inset 0 3px 0 #2459c4,0 3px 10px #2459c409}
#ledgerPage .summary-card[data-status="未办理签证"]>span {font-size:14px;color:#293e5d;font-weight:650}
#ledgerPage.price-ledger .summary-card[data-status="退回修改"] {--pricing-status-ink:#ab2639;--pricing-status-bg:#fff5f6}
#ledgerPage.price-ledger .summary-card[data-status="已审批"] {--pricing-status-ink:#176a50;--pricing-status-bg:#f0f8f4}
#ledgerPage.price-ledger .summary-card:is([data-status="退回修改"],[data-status="已审批"])>span,
#ledgerPage.price-ledger .summary-card:is([data-status="退回修改"],[data-status="已审批"])>strong {color:var(--pricing-status-ink)}
#ledgerPage.price-ledger .summary-card:is([data-status="退回修改"],[data-status="已审批"]):hover,
#ledgerPage.price-ledger .summary-card:is([data-status="退回修改"],[data-status="已审批"]).is-active {border-color:var(--pricing-status-ink)}
#ledgerPage.price-ledger .summary-card:is([data-status="退回修改"],[data-status="已审批"]).is-active {background:var(--pricing-status-bg);box-shadow:inset 0 3px 0 var(--pricing-status-ink)}
#ledgerPage .summary-grid>.amount-summary {background:#1d467f;border-radius:12px;box-shadow:none;gap:9px}
#ledgerPage .amount-summary-row>span {font-size:16px;line-height:1.5;font-weight:650;color:#e0eaff}
#ledgerPage .summary-grid .amount-summary strong {font-family:var(--number-font);font-size:20px;letter-spacing:-.015em;font-weight:600}
th {color:#55677f;background:#f7f9fc;font-size:11px;font-weight:650;letter-spacing:.02em;text-transform:none}
th,td {border-bottom-color:#e9eef5}
td {color:#263950}
tbody tr {transition:background-color 120ms var(--ease)}
tbody tr:nth-child(even) {background:#fcfdff}
tbody tr:hover,tbody tr:focus-within {background:#f1f6fd}
.record-number,.attachment-link,.payment-number {text-underline-offset:3px}
.record-number {font-weight:600}
.attachment-category {color:#5c6d84}
.money,.payment-money {font-family:var(--number-font);font-variant-numeric:tabular-nums;letter-spacing:.005em}
.status {letter-spacing:0;font-weight:650}
#ledgerBody .status.已审批未办理签证,#ledgerBody .status.未办理签证 {background:#fcecef;color:#ab2639}
#ledgerBody .status.已办理完结算,#ledgerBody .status.已结算 {background:#e6f4ee;color:#176a50}
#ledgerPage.price-ledger #ledgerBody .status.已审批 {background:#e6f4ee;color:#176a50}
#ledgerPage.price-ledger #ledgerBody .status.退回修改 {background:#fcecef;color:#ab2639}
.empty {padding:48px 20px;font-size:13px;line-height:1.8;color:var(--muted)}

/* The overview has a clearer distinction between scope, values and analysis. */
.overview-page {gap:14px}
.overview-filter-bar {margin-bottom:1px}
.overview-filter-label {font-size:12px;color:#52647d}
.overview-filter-chip {padding:7px 14px;border-color:#d6e0ed;font-size:12px;font-weight:550;line-height:20px}
.overview-filter-chip.is-active {color:#184486;background:#eaf1fc;border-color:#89a8d9}
.overview-kpis {gap:10px}
.overview-kpi {border-color:#dce4ee;border-radius:12px;padding:19px 17px;box-shadow:none;position:relative}
.overview-kpi>span {font-size:12px;color:#50617a}
.overview-kpi>strong {font-family:var(--number-font);font-size:32px;line-height:1.15;letter-spacing:-.035em;font-weight:600;margin:10px 0 6px}
.overview-kpi>small {font-size:10px;line-height:1.6;color:var(--muted)}
.overview-kpi:hover {border-color:#9ab2d9;background:#fbfdff;transform:translateY(-1px)}
.overview-kpi.is-active {background:#1d467f;border-color:#1d467f;color:#fff}
.overview-kpi.is-active>span,.overview-kpi.is-active>small {color:#e0eaff}
.overview-money-grid {gap:12px}
.overview-money-grid article {padding:17px 20px;border-color:#dce5f3;border-radius:10px;background:#eaf0fa}
.overview-money-grid span {color:#465f83;font-size:11px;font-weight:550}
.overview-money-grid strong {font-family:var(--number-font);font-size:23px;line-height:1.25;letter-spacing:-.02em;color:#234777;margin-top:7px;font-weight:600}
.overview-panel .panel-head {padding:18px 20px}
.overview-panel .panel-head h3 {font-size:16px}
.overview-panel .panel-head p {font-size:11px}
.overview-project {border-color:#dfe7f2;background:#fbfcfe;border-radius:10px;padding:18px}
.overview-project-head h4 {font-size:14px;line-height:1.5;color:#263e5e}
.overview-project-head>strong {font-family:var(--number-font);font-size:26px;letter-spacing:-.03em;font-weight:600}
.overview-project-head small {font-size:10px;line-height:1.65;color:#586b85}
.overview-track {background:#eaf0f8}
.overview-track>span,.overview-project-count>div {transition:width 240ms var(--ease)}
.overview-status-list {gap:12px}
.overview-status-name {font-size:11px;color:#334a68}
.overview-status-row>strong {font-family:var(--number-font);font-size:14px;font-weight:550}
.overview-status-row>small {font-size:10px;color:#53667e}
.overview-legend {font-size:12px;gap:13px;color:#334a68}
.overview-legend strong {font-family:var(--number-font);font-size:14px;font-weight:550}
.overview-donut strong {font-family:var(--number-font);font-size:33px;letter-spacing:-.035em;font-weight:600}
.overview-donut small {font-size:11px}

/* Same 300px flow cards and 180px selection controls; stronger value hierarchy. */
#paymentsPage {--payment-filter-height:47px;--payment-filter-font-size:16px}
#paymentsPage .payment-flow>.payment-kpi {border-radius:12px;box-shadow:0 2px 8px #263f6004;padding:18px 18px;border-color:#dce4ee}
#paymentsPage .payment-kpi span {color:#536780;font-size:11px;font-weight:500}
#paymentsPage .payment-kpi small {color:#5d708c;font-size:11px;line-height:1.6}
#paymentsPage .payment-kpi strong {font-family:var(--number-font);font-size:27px;letter-spacing:-.025em;font-weight:600;margin:12px 0 8px;color:#263e5e}
#paymentsPage .payment-flow>.contract {border-top-color:#7085a6}
#paymentsPage .payment-flow>.payable {border-top-color:var(--blue)}
#paymentsPage .payment-flow>.paid {border-top-color:#188167}
#paymentsPage .payment-flow>.paid strong,#paymentsPage .payment-flow>.received strong {color:#146a55}
#paymentsPage .payment-flow>.received {background:#edf7f2;border-color:#c9e2d6;border-left-color:#188167}
#paymentsPage #paymentFlowPaths path {stroke:#7489a5}
#paymentsPage #paymentCurveArrow path {fill:#7489a5}
#paymentsPage #paymentScopeHint {font-size:12px;line-height:1.8;color:#536780;letter-spacing:.01em}
#paymentsPage .payment-project-bar label,#paymentsPage .payment-filter-label {color:#334966;font-size:12px;font-weight:600}
#paymentsPage .payment-toolbar {gap:10px}
#paymentsPage #paymentProjectFilter,#paymentsPage #paymentIncludeOffset,#paymentsPage #paymentStatusFilter,#paymentsPage #paymentSearch,#paymentsPage .payment-multiselect summary,#paymentsPage .payment-type-picker summary {border-color:#ced8e6;background:#fff}
#paymentsPage #paymentSearch {font-size:14px}
#paymentsPage .payment-type-options {border-color:#d5deeb;box-shadow:0 12px 30px #1b35541a;border-radius:10px;padding:8px}
#paymentsPage .payment-type-options label {font-size:14px;color:#334966;padding-block:9px}
#paymentsPage .payment-type-options label:hover {background:#edf3fc}
#paymentsPage .payment-type-options label:has(input:focus-visible) {outline:2px solid var(--blue);outline-offset:-1px;background:#edf3fc}
#paymentsPage .payment-type-actions {gap:6px}
#paymentsPage .payment-type-actions button {border:1px solid #d5e1f2;border-radius:6px;background:#f3f7fd;color:#214c97;padding:5px 10px;min-height:28px;font-weight:550}
#paymentsPage #paymentRecordCount {color:#536780;font-size:11px;line-height:1.7}
#paymentsPage .payment-status {font-weight:650}

/* Editors retain their field grids, file groups, validation and sticky actions. */
.record-dialog,#paymentDialog,.small-dialog,.preview-dialog,#paymentPreviewDialog {border-color:#d6e1ed;border-radius:var(--radius-dialog);background:#f4f7fb;box-shadow:0 24px 90px #142b493b}
dialog[open] {animation:dialog-in 160ms var(--ease) both}
@keyframes dialog-in {from{opacity:.4;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
dialog::backdrop,#paymentDialog::backdrop,#paymentPreviewDialog::backdrop {background:#11244085;backdrop-filter:blur(3px)}
.record-dialog>.dialog-head,#paymentDialog .dialog-head,.small-dialog .dialog-head {padding:22px 26px;border-color:#dce4ee}
.dialog-head .eyebrow {font-size:9px;letter-spacing:.14em;margin-bottom:6px}
.dialog-head>div {min-width:0;flex:1}
.record-dialog .dialog-head h2,#paymentDialog .dialog-head h2 {font-size:21px;line-height:1.5;letter-spacing:-.025em;font-weight:700}
.record-section,#recordForm .attachments,#paymentDialog .payment-form-section {border-color:#dce5f0;border-radius:12px;box-shadow:none}
.record-section-heading h3,#paymentDialog .payment-form-section h3 {font-size:14px;font-weight:650;letter-spacing:.01em;color:#334966}
.record-section-heading::before,#paymentDialog .payment-form-section h3::before {width:3px;height:14px;border-radius:1px}
.record-field .field-label,#paymentDialog .payment-form-grid label,#paymentDialog .payment-money-grid label {color:#405673;font-size:12px;font-weight:550}
#paymentDialog .payment-form-grid label>span {color:#405673}
#paymentDialog .payment-form-grid em {color:var(--danger)}
.record-field input,.record-field select,.record-field textarea,#paymentDialog input,#paymentDialog select,#paymentDialog textarea {border-color:#ced9e7;background:#fcfdff;font-size:14px}
.record-field input[type=number],#paymentDialog .payment-money-grid input {font-family:var(--number-font);font-size:15px}
#recordForm .attachment-group,#paymentDialog .payment-attachment-group {background:#f8fafd;border-color:#dce5f0;border-radius:10px}
#recordForm .attachment-group h4,#paymentDialog .payment-attachment-group h4 {font-size:12px;line-height:1.6;font-weight:600;color:#405673}
#recordForm .file-item,#paymentDialog .payment-file-item {border-color:#dce5f0;border-radius:8px;background:#fff}
.handler-picker summary {border-color:#ced9e7;background:#fcfdff}
.handler-options {border-color:#d5deeb;box-shadow:0 12px 30px #1b35541a}
.handler-options label>span {color:#334966}
.dialog-actions,#recordForm>.dialog-actions,#paymentDialog .payment-dialog-actions {border-color:#dce4ee;box-shadow:0 -5px 16px #23446c05}
.danger-button,#paymentDialog .payment-danger {font-size:12px;font-weight:600;border-color:#e3adb7;background:#fff6f7;color:#9e2738;border-radius:8px;min-height:36px;padding:8px 12px}
.danger-button:hover,#paymentDialog .payment-danger:hover {background:#fce9ee;border-color:#cc7c8a}
.record-footer-note {font-size:11px;color:#536780}
.form-panel {border-color:#dce4ee}
.form-panel label {font-size:12px;color:#405673;font-weight:600}
.form-panel input,.form-panel select {font-size:14px;min-height:44px}
.form-panel>button {min-height:44px}
.switch-row input {accent-color:var(--blue);width:17px;height:17px}
.import-notice {background:#edf3fc;color:#33557f;border:1px solid #dce7f7;font-size:12px;line-height:1.85}
.import-summary>div {border-color:#dce5f0;background:#f9fbff;border-radius:9px}
.import-summary strong {font-family:var(--number-font);font-size:25px;font-weight:600;color:#234777}
.import-summary small {font-size:11px;color:#536780}
.toast {border:1px solid #46617f;border-radius:10px;background:#213b5c;box-shadow:0 10px 24px #17385620;font-size:13px;padding:13px 18px;line-height:1.65;max-width:min(420px,calc(100vw - 32px))}
.toast.error {border-color:#b54457;background:#8e2639}
.full-content-tooltip {border-color:#d5e1ef;border-radius:10px;background:#fff;box-shadow:0 16px 45px #1a355823;font-size:13px;color:#334966}

@media (max-width:1100px) {
  .topbar {padding-inline:28px}
  .page {padding:22px 28px}
  .overview-kpis {gap:10px}
  .overview-kpi {padding:17px}
  .adaptive-data-table,.adaptive-data-table tbody,.adaptive-data-table tfoot {display:block;width:100%}
  .adaptive-data-table thead {display:none}
  .adaptive-data-table tr {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px;padding:12px;border-bottom:1px solid var(--line)}
  .adaptive-data-table td {display:grid;grid-template-columns:104px minmax(0,1fr);gap:10px;border:0;padding:7px 2px;min-width:0;white-space:normal;overflow-wrap:anywhere;font-size:12px}
  .adaptive-data-table td::before {content:attr(data-label);font-size:11px;font-weight:550;color:#58677b}
  .adaptive-data-table td.table-actions {display:flex;flex-wrap:wrap;align-items:center;gap:8px;grid-column:1/-1}
  .adaptive-data-table td[data-label="详情"] {grid-column:1/-1}
  .adaptive-data-table .table-actions::before {width:104px;flex:none}
  .adaptive-data-table .table-actions button {min-height:36px}
  .adaptive-data-table td[colspan] {display:block;grid-column:1/-1}
  .adaptive-data-table td[colspan]::before {display:none}
  .adaptive-data-table tfoot {background:#edf3fc;border-radius:0 0 12px 12px}
}
@media (max-width:760px) {
  html {scroll-padding-top:18px}
  .app {grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);align-content:start}
  .sidebar {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:11px;position:static;height:auto;padding:14px 16px 0;min-width:0}
  .sidebar>.brand {grid-column:1;grid-row:1;padding:0;gap:9px}
  .brand-mark.small {width:48px;height:28px;border-radius:0}
  .brand b {font-size:13px;line-height:1.35}
  .brand small {font-size:9px;margin-top:3px}
  .sidebar>.sidebar-foot {display:flex;align-items:center;gap:8px;grid-column:2;grid-row:1;margin:0;padding:0;border:0}
  .sidebar-foot .user-chip {display:flex;min-width:0;max-width:64px;overflow:hidden}
  .sidebar-foot .user-chip>span,.sidebar-foot .user-chip small {display:none}
  .sidebar-foot .user-chip>div {min-width:0}
  .sidebar-foot .user-chip b {font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .logout-button {font-size:10px;gap:5px;padding:6px;min-height:44px}
  .account-icon {width:15px;height:15px}
  .sidebar nav {grid-column:1/-1;display:flex;gap:0;overflow-x:auto;scrollbar-width:none;scroll-snap-type:x proximity;scroll-padding-inline:16px;min-width:0;margin-inline:-16px;padding:0 16px}
  .sidebar nav::-webkit-scrollbar {display:none}
  .sidebar .nav-item {width:auto;flex:0 0 auto;min-height:44px;padding:8px 11px;gap:7px;font-size:11px;line-height:18px;scroll-snap-align:start;white-space:nowrap;box-shadow:none;border-radius:0}
  .sidebar .nav-item.active {background:var(--bg);box-shadow:none;border-radius:8px 0 0 8px}
  .sidebar .nav-selection-indicator {border-radius:8px 0 0 8px;background:var(--bg);box-shadow:none}
  .sidebar .nav-item>span {width:16px}
  .nav-icon {width:16px;height:16px}
  .topbar {height:auto;min-height:76px;padding:16px;gap:10px;align-items:center;background:var(--bg)}
  .topbar .eyebrow {display:block;font-size:8px;line-height:1.5;letter-spacing:.07em;margin-bottom:4px}
  .topbar h2 {font-size:19px;line-height:1.4}
  .topbar .primary {font-size:11px;padding:8px 10px;min-height:38px}
  .page {padding:18px 16px}
  .summary-card {padding:17px}
  .toolbar {gap:8px;padding:12px}
  .toolbar input,.toolbar select,.toolbar summary {font-size:16px}
  .toolbar .secondary,.toolbar .link-button {font-size:12px}
  .login-card input {font-size:16px}
  #ledgerPage .toolbar>.search-box {flex:1 1 100%;width:100%;order:1}
  #ledgerPage .toolbar>button,#ledgerPage .toolbar>.link-button {order:2;flex:1 1 auto}
  #ledgerPage .toolbar>select {min-width:0;flex:1 1 110px}
  #ledgerPage #searchInput {width:100%;flex:1;min-width:0;font-size:16px}
  .panel-head {padding:16px;align-items:flex-start;flex-wrap:wrap;gap:12px}
  .panel-head h3 {font-size:15px}
  .panel-head p {font-size:11px}
  #paymentsPage .payment-flow>.payment-kpi {padding:18px;border-radius:12px}
  #paymentsPage .payment-kpi strong {font-size:25px}
  #paymentsPage .payment-filter-field {width:100%;justify-content:space-between}
  #paymentsPage .payment-filter-field>label,#paymentsPage .payment-filter-label {font-size:12px}
  #paymentsPage .payment-project-bar {gap:9px}
  #paymentsPage .payment-toolbar>details,#paymentsPage .payment-toolbar>select {flex:1 1 140px;max-width:none;min-width:0}
  #paymentsPage #paymentSearch {flex:1 1 100%;width:100%;font-size:16px}
  #paymentsPage .payment-toolbar>button {flex:1 1 auto}
  #paymentsPage #paymentRecordCount {width:100%;text-align:right;font-size:10px}
  .overview-kpis {grid-template-columns:repeat(2,minmax(0,1fr))}
  .overview-kpi {padding:16px;border-radius:10px}
  .overview-kpi strong {font-size:29px}
  .overview-filter-bar {gap:8px;flex-wrap:wrap}
  .overview-filter-label {font-size:11px}
  .overview-project-filters {order:2;flex:1 1 100%}
  #refreshOverview {margin-left:auto;font-size:11px;min-height:36px;padding:6px 10px}
  .overview-projects {padding:12px;gap:10px}
  .overview-project {padding:15px}
  .overview-panel .panel-head {padding:16px}
  .overview-status-list {padding:17px 16px;gap:11px}
  .overview-type-chart {padding:20px 16px;gap:20px}
  .record-dialog>.dialog-head,#paymentDialog .dialog-head,.small-dialog .dialog-head {padding:16px;gap:12px}
  .record-dialog .dialog-head h2,#paymentDialog .dialog-head h2 {font-size:17px}
  .record-field input,.record-field select,.record-field textarea,#paymentDialog input,#paymentDialog select,#paymentDialog textarea,.form-panel input,.form-panel select {font-size:16px}
  #recordForm>.dialog-actions {flex-wrap:wrap;gap:10px}
  .record-footer-buttons {width:auto;flex:1}
  .record-footer-buttons button {min-width:0;padding:9px 12px;font-size:12px}
  .danger-button,#paymentDialog .payment-danger {font-size:11px;padding:8px 10px}
  .toast {right:16px;bottom:16px;font-size:12px}
  .adaptive-data-table,.adaptive-data-table tbody,.adaptive-data-table tfoot {display:block;width:100%}
  .adaptive-data-table thead {display:none}
  .adaptive-data-table tr {display:grid;grid-template-columns:minmax(0,1fr);padding:12px;border-bottom:1px solid var(--line)}
  .adaptive-data-table td {display:grid;grid-template-columns:104px minmax(0,1fr);gap:10px;border:0;padding:7px 2px;min-width:0;white-space:normal;overflow-wrap:anywhere;font-size:12px}
  .adaptive-data-table td::before {content:attr(data-label);font-size:11px;font-weight:550;color:#58677b}
  .adaptive-data-table td.table-actions {display:flex;flex-wrap:wrap;align-items:center;gap:8px}
  .adaptive-data-table .table-actions::before {width:104px;flex:none}
  .adaptive-data-table .table-actions button {min-height:36px}
  .adaptive-data-table td[colspan] {display:block}
  .adaptive-data-table td[colspan]::before {display:none}
  .adaptive-data-table tfoot {background:#edf3fc;border-radius:0 0 12px 12px}
}
@media (max-width:420px) {
  .login-shell {padding:18px}
  .login-card {padding:32px 24px 22px;border-radius:15px}
  .login-card::before {left:24px}
  .login-card h1 {font-size:24px;letter-spacing:-.04em}
  .login-card>p.muted {font-size:12px}
  .login-card .stack {margin-top:23px}
  .topbar h2 {font-size:17px}
  .topbar .eyebrow {font-size:7px;letter-spacing:.05em}
  #ledgerPage .summary-grid {gap:12px}
  .form-panel>label,.form-panel>button {margin-inline:16px}
  .overview-money-grid strong {font-size:22px}
}
@media (pointer:coarse) {
  .icon-btn {width:44px;height:44px;min-width:44px;min-height:44px}
  #paymentsPage .payment-type-actions button {min-height:44px}
  #paymentsPage .payment-type-options label,.handler-options label {min-height:44px}
  .topbar .primary,.dialog-actions button,#paymentDialog .payment-dialog-actions button,.adaptive-data-table .table-actions button {min-height:44px}
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after {animation:none!important;transition:none!important;scroll-behavior:auto!important}
  .is-requesting .request-track>span {width:100%;transform:none}
  .primary:hover:not(:disabled),.summary-card:hover,.overview-kpi:hover {transform:none}
}
