:root{color-scheme:light;--page: #f3f6fa;--surface: #ffffff;--surface-soft: #f7f9fc;--surface-hover: #f3f7fb;--surface-edit: #eef4fb;--ink: #24303d;--muted: #687586;--line: #dce3eb;--line-strong: #cbd5e1;--accent: #365f8d;--accent-dark: #294c73;--accent-soft: #eaf2fb;--success: #287653;--success-soft: #e8f5ee;--warning: #a96812;--warning-soft: #fff3dc;--pending: #2e6f9e;--pending-soft: #e8f2fa;--closed: #727b87;--closed-soft: #eef1f4;--danger: #b5473c;--danger-soft: #fbeceb;--shadow-soft: 0 8px 24px rgba(37, 55, 76, .07)}.login-shell{min-height:100vh;background:#eef2f5}.login-page{min-height:100vh;display:grid;place-items:center;padding:24px}.login-panel{width:min(420px,100%);border:1px solid #cfd8df;border-radius:8px;background:#fff;box-shadow:0 18px 50px #23313a21;overflow:hidden}.login-brand{padding:22px 24px;border-bottom:1px solid #e4e9ed;background:#f8fafb}.login-brand .brand-lockup h1{font-size:15px}.login-brand .brand-lockup h1 small{display:none}.login-copy{padding:28px 28px 8px}.login-copy p{margin:0 0 6px;color:#63717a;font-size:12px}.login-copy h2{margin:0;color:#202b33;font-size:24px;font-weight:650}.login-form{display:grid;gap:16px;padding:20px 28px 30px}.login-form label{display:grid;gap:7px;color:#34434d;font-size:13px;font-weight:600}.login-form input{width:100%;height:42px;border:1px solid #b9c5cc;border-radius:5px;padding:0 12px;background:#fff;color:#1d2930;font:inherit}.login-form input:focus{border-color:#147d72;outline:3px solid rgba(20,125,114,.12)}.login-error{min-height:18px;margin:-4px 0 0;color:#b42318;font-size:12px}.login-submit{height:42px;border:0;border-radius:5px;background:#147d72;color:#fff;font:inherit;font-weight:650;cursor:pointer}.login-submit:hover{background:#0f6c63}.login-submit:disabled{cursor:wait;opacity:.65}.logout-button{color:#7a2f2a}*,*:before,*:after{box-sizing:border-box}html{min-width:320px;min-height:100%;background:var(--page);color:var(--ink)}body{min-width:320px;min-height:100vh;margin:0;overflow-x:hidden;background:var(--page);color:var(--ink);font-family:Microsoft YaHei UI,PingFang SC,Noto Sans SC,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:13px;line-height:1.45;-webkit-font-smoothing:antialiased}button,input,select,textarea{font:inherit}button,select{color:inherit}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:2px solid rgba(31,95,191,.28);outline-offset:1px}[hidden]{display:none!important}.boot-screen,.loading-screen{min-height:100vh;display:grid;place-items:center;background:var(--page);color:var(--muted)}.ledger-app{min-height:100vh;background:var(--page)}.ledger-topbar{position:sticky;top:0;z-index:50;height:48px;min-height:48px;padding:0 14px 0 18px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #ccd9e7;background:linear-gradient(104deg,#fffffffa,#f0f6fcfa 54%,#f9fcfffa);box-shadow:0 2px 12px #25374c14;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.ledger-topbar:after{position:absolute;right:auto;bottom:-1px;left:0;width:190px;height:2px;background:linear-gradient(90deg,#315f8e,#4c8aac 58%,#4c8aac00);content:"";pointer-events:none}.brand-lockup{min-width:0;display:flex;flex:1 1 auto;align-items:center;gap:9px}.brand-mark{position:relative;width:32px;height:32px;display:grid;flex:0 0 32px;overflow:hidden;place-items:center;border:1px solid rgba(255,255,255,.5);border-radius:11px 11px 11px 4px;background:radial-gradient(circle at 76% 18%,rgba(129,220,190,.5),transparent 29%),linear-gradient(145deg,#467ea8,#2e5c87 48%,#213f66);box-shadow:0 4px 11px #20416542,inset 0 1px #ffffff3d;color:#fff}.brand-mark:before{position:absolute;width:24px;height:42px;background:linear-gradient(90deg,transparent,rgba(255,255,255,.1),transparent);content:"";transform:translate(-15px,-4px) rotate(28deg)}.brand-mark svg{position:relative;z-index:1;width:28px;height:28px;overflow:visible;fill:none}.brand-mark .brand-tile{fill:#ffffff14;stroke:currentColor;stroke-width:1.45}.brand-mark .brand-tile-accent{fill:#a8ebce}.ledger-topbar h1{min-width:0;margin:0;overflow:hidden;color:#1d232b;font-size:16px;font-weight:700;line-height:1.2;letter-spacing:.01em;text-overflow:ellipsis;white-space:nowrap}.ledger-topbar h1 small{margin-left:5px;color:var(--muted);font-size:10px;font-weight:500}.topbar-actions{min-width:0;display:flex;align-items:center;justify-content:flex-end;gap:7px}.ledger-contextbar{position:sticky;top:48px;z-index:42;height:44px;min-height:44px;padding:5px 12px;display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line);background:#f7f9fcf5;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.primary-tabs{min-width:0;display:flex;align-self:stretch;align-items:center;gap:3px;padding:3px;border:1px solid var(--line);border-radius:7px;background:#eef2f6}.primary-tab{height:28px;min-width:98px;padding:0 11px;display:inline-flex;align-items:center;justify-content:center;gap:6px;border:0;border-radius:5px;background:transparent;color:#596779;cursor:pointer;font-weight:600;line-height:28px;white-space:nowrap}.primary-tab:hover{background:#ffffffa8;color:var(--ink)}.primary-tab.active,.primary-tab[aria-selected=true]{background:var(--surface);color:var(--accent-dark);box-shadow:0 1px 4px #25374c1f}.tab-count{min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#dde5ee;color:#617083;font-size:10px;font-weight:700;line-height:18px;text-align:center}.primary-tab.active .tab-count,.primary-tab[aria-selected=true] .tab-count{background:var(--accent-soft);color:var(--accent-dark)}.primary-tab:before{width:7px;height:7px;flex:0 0 7px;border-radius:50%;background:#8794a3;content:""}.primary-tab.tab-contracts:before{background:#3f6f9f}.primary-tab.tab-projects:before{background:#31815d}.primary-tab.tab-expenses:before{background:#b67524}.primary-tab.tab-accounts:before{background:#4c7f87}.primary-tab.tab-memo:before{background:#7a62a6}.primary-tab.tab-contracts.active{background:#eaf2fb;color:#294f77}.primary-tab.tab-projects.active{background:#e8f5ee;color:#256748}.primary-tab.tab-expenses.active{background:#fff3dc;color:#8b570f}.primary-tab.tab-accounts.active{background:#e8f3f4;color:#35666e}.primary-tab.tab-memo.active{background:#f1ecf8;color:#644b8f}.primary-tab.tab-contracts.active .tab-count{background:#dceafb;color:#294f77}.primary-tab.tab-projects.active .tab-count{background:#d8ede2;color:#256748}.primary-tab.tab-expenses.active .tab-count{background:#f9e4bb;color:#8b570f}.primary-tab.tab-accounts.active .tab-count{background:#d6eaec;color:#35666e}.primary-tab.tab-memo{min-width:78px}.summary-strip{min-width:0;margin-left:auto;display:flex;align-items:stretch;justify-content:flex-end;gap:5px}.summary-cards{min-width:0;display:flex;align-items:stretch;gap:5px}.summary-card.compact{min-width:84px;padding-right:7px;padding-left:7px}.summary-item{min-width:108px;height:34px;padding:4px 9px 3px;display:grid;grid-template-columns:auto;align-content:center;border:1px solid var(--line);border-radius:6px;background:var(--surface)}.summary-label{overflow:hidden;color:var(--muted);font-size:10px;line-height:11px;text-overflow:ellipsis;white-space:nowrap}.summary-value{overflow:hidden;color:#26384a;font-size:14px;font-weight:750;font-variant-numeric:tabular-nums;line-height:16px;text-overflow:ellipsis;white-space:nowrap}.ledger-content{height:calc(100vh - 92px);min-height:430px;padding:10px 12px 12px;background:var(--page)}.ledger-content>.ledger-panel{height:100%}.plain-button,.data-button,.edit-button,.add-row-button{height:30px;padding:0 10px;border:1px solid var(--line-strong);border-radius:4px;background:#fff;color:#343a43;cursor:pointer;font-weight:500;line-height:28px;white-space:nowrap}.plain-button:hover,.data-button:hover,.add-row-button:hover{border-color:#9da6b0;background:var(--surface-soft)}.plain-button:active,.data-button:active,.add-row-button:active{background:#eef1f4}.edit-button{min-width:78px;border-color:var(--accent);background:var(--accent);color:#fff}.edit-button:hover,.edit-button.active,.edit-button[aria-pressed=true]{border-color:var(--accent-dark);background:var(--accent-dark)}.edit-button.confirm{border-color:var(--danger);background:var(--danger)}.data-button{color:#4c5561}.add-row-button{height:28px;padding:0 8px;border-color:#b8cbe7;color:var(--accent);line-height:26px}.save-state{max-width:150px;overflow:hidden;color:var(--muted);font-size:11px;text-overflow:ellipsis;white-space:nowrap}.save-state:before{width:6px;height:6px;margin-right:5px;display:inline-block;border-radius:50%;background:#a5adb6;content:"";vertical-align:1px}.save-state.save-saving:before,.save-saving:before{background:var(--warning)}.save-state.save-saved:before,.save-saved:before{background:var(--success)}.save-state.save-error,.save-error{color:var(--danger)}.save-state.save-error:before,.save-error:before{background:var(--danger)}.error-strip{min-height:34px;padding:6px 18px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #efc8c4;background:#fff6f5;color:var(--danger)}.error-strip button{padding:0;border:0;background:transparent;color:inherit;cursor:pointer;text-decoration:underline}.ledger-workspace{height:calc(100vh - 92px);min-height:430px;padding:10px 12px 12px;display:grid;grid-template-columns:minmax(0,1fr);background:var(--page)}.ledger-panel{min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--line-strong);border-radius:7px;background:var(--surface);box-shadow:var(--shadow-soft)}.contract-panel,.side-panel{height:100%}.contract-panel{width:100%}.project-panel,.expense-panel,.account-panel{width:100%;height:100%}.memo-panel{width:100%;height:100%;background:#fff}.management-panel{width:100%;height:100%;flex-direction:row;background:#fff}.management-notes-pane,.management-files-pane{min-width:0;min-height:0;display:flex;flex-direction:column}.management-notes-pane{flex:3 1 58%;border-right:1px solid var(--line-strong)}.management-files-pane{flex:2 1 42%;background:#fbfcfe}.management-pane-head{min-height:43px;padding:7px 11px 7px 14px;display:flex;align-items:center;justify-content:space-between;gap:10px;flex:0 0 auto;border-bottom:1px solid var(--line);background:var(--surface)}.management-pane-head h2{margin:0;color:#313944;font-size:13px;font-weight:700}.management-pane-head h2 span{margin-left:5px;color:var(--muted);font-size:10px;font-weight:600}.panel-bar{min-height:40px;padding:5px 8px 5px 11px;display:flex;align-items:center;justify-content:space-between;gap:9px;flex:0 0 auto;border-bottom:1px solid var(--line);background:var(--surface)}.panel-bar h2{min-width:0;margin:0;overflow:hidden;font-size:13px;font-weight:700;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}.panel-bar h2 span,.table-tabs span{color:var(--muted);font-size:10px;font-weight:500}.panel-actions{min-width:0;display:flex;align-items:center;gap:5px}.nature-filter-group{width:100%;min-width:0;max-width:none;min-height:43px;padding:7px 10px;display:flex;align-items:center;align-content:center;gap:6px;flex-wrap:wrap;overflow-x:visible;border-bottom:1px solid #e8edf3;background:#fbfcfe}.nature-filter-group::-webkit-scrollbar{display:none}.nature-filter-label{margin-right:2px;color:var(--muted);font-size:10px;white-space:nowrap}.nature-filter-chip,.contract-nature-chip{height:28px;min-width:max-content;padding:0 10px;display:inline-flex;align-items:center;gap:4px;flex:0 0 auto;border:1px solid var(--line);border-radius:13px;background:#f8fafc;color:#617083;cursor:pointer;font-size:11px;font-weight:600;line-height:26px;white-space:nowrap}.nature-filter-chip:before,.contract-nature-chip:before{width:6px;height:6px;flex:0 0 6px;border-radius:50%;background:#a8b3bf;content:""}.nature-filter-chip:hover,.contract-nature-chip:hover{border-color:#b9c8d7;background:var(--surface);color:var(--ink)}.nature-filter-chip.active,.nature-filter-chip[aria-pressed=true],.contract-nature-chip.active,.contract-nature-chip[aria-pressed=true]{border-color:#aec5dd;background:var(--accent-soft);color:var(--accent-dark)}.nature-filter-chip.active:before,.nature-filter-chip[aria-pressed=true]:before,.contract-nature-chip.active:before,.contract-nature-chip[aria-pressed=true]:before{background:var(--accent);box-shadow:0 0 0 2px #365f8d1f}.nature-filter-count{color:inherit;font-size:9px;font-variant-numeric:tabular-nums;opacity:.78}.nature-filter-chip small{color:inherit;font-size:9px;font-weight:600;font-variant-numeric:tabular-nums;opacity:.72}.nature-filter-chip[data-nature=未实现]:before{background:var(--danger)}.nature-filter-chip[data-nature=陪标]:before{background:var(--closed)}.nature-filter-chip[data-nature=协助]:before{background:var(--warning)}.nature-filter-chip[data-nature=收款合同]:before{background:var(--success)}.nature-filter-chip[data-nature=支付合同]:before{background:#88539b}.nature-filter-chip[data-nature=沟通中]:before{background:var(--pending)}.nature-filter-chip[data-nature=沟通中][aria-pressed=true]{border-color:#b9d4e6;background:var(--pending-soft);color:var(--pending)}.project-panel .status-filter-group{background:#f8fcfa}.expense-panel .status-filter-group{background:#fffcf6}.account-panel .status-filter-group{background:#f7fbfb}.status-filter-chip[data-status=已收全]:before,.status-filter-chip[data-status=已结算]:before{background:var(--success)}.status-filter-chip[data-status=部分收款]:before,.status-filter-chip[data-status=待结算]:before{background:var(--warning)}.status-filter-chip[data-status=未收款]:before,.status-filter-chip[data-status=待支付]:before{background:var(--pending)}.status-filter-chip[data-status=建设中]:before{background:var(--warning)}.status-filter-chip[data-status=已交付]:before{background:var(--success)}.status-filter-chip[data-status=已废弃]:before{background:var(--closed)}.status-filter-chip[data-status=已收全][aria-pressed=true],.status-filter-chip[data-status=已结算][aria-pressed=true]{border-color:#b8dcc8;background:var(--success-soft);color:var(--success)}.status-filter-chip[data-status=部分收款][aria-pressed=true],.status-filter-chip[data-status=待结算][aria-pressed=true]{border-color:#ead09b;background:var(--warning-soft);color:#8b570f}.status-filter-chip[data-status=未收款][aria-pressed=true],.status-filter-chip[data-status=待支付][aria-pressed=true]{border-color:#b9d4e6;background:var(--pending-soft);color:var(--pending)}.status-filter-chip[data-status=建设中][aria-pressed=true]{border-color:#ead09b;background:var(--warning-soft);color:#8b570f}.status-filter-chip[data-status=已交付][aria-pressed=true]{border-color:#b8dcc8;background:var(--success-soft);color:var(--success)}.status-filter-chip[data-status=已废弃][aria-pressed=true]{border-color:#ccd2d9;background:var(--closed-soft);color:#5f6874}.nature-filter-chip[data-nature=未实现][aria-pressed=true]{border-color:#e5b8b3;background:var(--danger-soft);color:#963a32}.nature-filter-chip[data-nature=协助][aria-pressed=true]{border-color:#ead09b;background:var(--warning-soft);color:#8b570f}.nature-filter-chip[data-nature=收款合同][aria-pressed=true]{border-color:#b8dcc8;background:var(--success-soft);color:var(--success)}.nature-filter-chip[data-nature=支付合同][aria-pressed=true]{border-color:#d8c1df;background:#f5edf8;color:#704180}.compact-select{max-width:150px;height:28px;padding:0 24px 0 7px;border:1px solid var(--line);border-radius:3px;background-color:#fff;color:#414853}.status-legend{min-width:0;display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:10px;white-space:nowrap}.legend-item{display:inline-flex;align-items:center;gap:4px}.legend-dot,.status-dot{width:7px;height:7px;flex:0 0 7px;display:inline-block;border-radius:50%;background:var(--closed)}.legend-dot.done,.status-dot.status-complete{background:var(--success)}.legend-dot.progress,.status-dot.status-progress{background:var(--warning)}.legend-dot.pending,.status-dot.status-pending{background:var(--pending)}.legend-dot.closed,.status-dot.status-muted{background:var(--closed)}.status-dot.status-risk{background:var(--danger)}.status-dot.status-income{background:var(--success)}.status-dot.status-expense{background:#88539b}.status-dot.status-communication{background:var(--pending)}.status-chip{max-width:100%;min-height:20px;padding:1px 7px;display:inline-flex;align-items:center;overflow:hidden;border:1px solid transparent;border-radius:10px;font-size:10px;font-weight:650;line-height:16px;text-overflow:ellipsis;white-space:nowrap}.status-chip.done,.status-chip.status-done,.status-chip.status-complete{border-color:#c8e6d6;background:var(--success-soft);color:var(--success)}.status-chip.progress,.status-chip.status-progress{border-color:#f0d8a7;background:var(--warning-soft);color:var(--warning)}.status-chip.pending,.status-chip.status-pending{border-color:#c8deed;background:var(--pending-soft);color:var(--pending)}.status-chip.closed,.status-chip.status-closed,.status-chip.status-muted{border-color:#dbe0e5;background:var(--closed-soft);color:var(--closed)}.status-chip.status-income{border-color:#b8dcc8;background:var(--success-soft);color:var(--success)}.status-chip.status-expense{border-color:#d8c1df;background:#f5edf8;color:#704180}.status-chip.status-communication{border-color:#b9d4e6;background:var(--pending-soft);color:var(--pending)}.status-chip.status-risk{border-color:#efc9c6;background:var(--danger-soft);color:var(--danger)}.table-tabs{align-self:stretch;display:flex;align-items:stretch;gap:15px}.table-tabs button{position:relative;padding:0 1px;border:0;background:transparent;color:var(--muted);cursor:pointer}.table-tabs button:hover{color:#343a43}.table-tabs button.active,.table-tabs button[aria-selected=true]{color:var(--ink);font-weight:700}.table-tabs button.active:after,.table-tabs button[aria-selected=true]:after{position:absolute;right:0;bottom:-6px;left:0;height:2px;background:var(--accent);content:""}.table-wrap{min-height:0;flex:1 1 auto;overflow:auto;overscroll-behavior:contain;scrollbar-color:#c6ccd3 transparent;scrollbar-width:thin}.table-wrap::-webkit-scrollbar{width:9px;height:9px}.table-wrap::-webkit-scrollbar-thumb{border:2px solid #fff;border-radius:8px;background:#c6ccd3}.ledger-table{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;background:#fff;color:#2d333b;font-size:12px}.contract-table{min-width:1120px}.project-table,.receipt-table{min-width:760px}.expense-table{min-width:1020px}.ledger-table th{position:sticky;top:0;z-index:12;height:32px;padding:0 6px;overflow:hidden;border-right:1px solid #e9edf1;border-bottom:1px solid var(--line-strong);background:#f1f5f9;color:#566577;font-size:12px;font-weight:600;line-height:32px;text-align:left;text-overflow:ellipsis;white-space:nowrap}.sort-button{width:100%;height:31px;padding:0;display:inline-flex;align-items:center;justify-content:flex-start;gap:4px;overflow:hidden;border:0;background:transparent;color:inherit;cursor:pointer;font:inherit;font-weight:inherit;line-height:31px;text-align:inherit;text-overflow:ellipsis;white-space:nowrap}th.align-right .sort-button,.sort-button.align-right{justify-content:flex-end}.sort-button:hover,.sort-button.active{color:var(--accent-dark)}.sort-indicator{width:10px;flex:0 0 10px;color:#98a4b1;font-size:10px;font-variant-numeric:tabular-nums;line-height:1;text-align:center}.sort-button.active .sort-indicator,th[aria-sort=ascending] .sort-indicator,th[aria-sort=descending] .sort-indicator{color:var(--accent)}.ledger-table td{height:34px;max-height:34px;padding:3px 6px;overflow:hidden;border-right:1px solid #edf0f3;border-bottom:1px solid #e5e9ed;background:#fff;line-height:26px;vertical-align:middle}.ledger-table th:last-child,.ledger-table td:last-child{border-right:0}.ledger-table tbody tr:hover td{background:var(--surface-hover)}.ledger-table tbody>tr:nth-child(2n)>td{background:#f8fafc}.ledger-table tbody>tr:nth-child(2n):hover>td,.ledger-table tbody>tr:hover>td{background:#f1f6fb}.ledger-table tbody tr.status-done>td:first-child,.ledger-table tbody tr.row-status-complete>td:first-child{box-shadow:inset 3px 0 0 var(--success)}.ledger-table tbody tr.status-progress>td:first-child,.ledger-table tbody tr.row-status-progress>td:first-child{box-shadow:inset 3px 0 0 var(--warning)}.ledger-table tbody tr.row-status-income>td:first-child{box-shadow:inset 3px 0 0 var(--success)}.ledger-table tbody tr.row-status-expense>td:first-child{box-shadow:inset 3px 0 #88539b}.ledger-table tbody tr.row-status-communication>td:first-child{box-shadow:inset 3px 0 0 var(--pending)}.ledger-table tbody tr.status-pending>td:first-child,.ledger-table tbody tr.row-status-pending>td:first-child{box-shadow:inset 3px 0 0 var(--pending)}.ledger-table tbody tr.status-closed>td:first-child,.ledger-table tbody tr.row-status-muted>td:first-child{box-shadow:inset 3px 0 0 var(--closed)}.ledger-table tbody tr.row-status-risk>td:first-child{box-shadow:inset 3px 0 0 var(--danger)}.ledger-table .draft-row td{background:var(--accent-soft)}.ledger-table .draft-row:hover td{background:#e8f1ff}.ledger-table .align-right{text-align:right;font-variant-numeric:tabular-nums}.ledger-table .number-cell{position:relative;padding-left:16px;padding-right:21px}.ledger-table .number-cell>.status-dot{position:absolute;top:50%;left:5px;transform:translateY(-50%)}.cell-text,.cell-date,.cell-money{min-height:18px;display:block;overflow:hidden;line-height:26px;text-overflow:ellipsis;white-space:nowrap}.cell-date,.cell-money{font-variant-numeric:tabular-nums}.cell-money.calculated{color:#5e6671}.cell-input{width:100%;height:25px;min-width:0;padding:2px 5px;border:1px solid transparent;border-radius:3px;background:var(--surface-edit);color:var(--ink);line-height:19px}select.cell-input{padding-right:20px}.cell-input:hover{border-color:#c6ced7}.cell-input:focus{border-color:#7ba3db;outline:2px solid rgba(31,95,191,.12);background:#fff}.cell-date-input{padding:1px 3px}.cell-money-input{text-align:right;font-variant-numeric:tabular-nums}.ledger-table td.wrap-cell{height:auto;max-height:none;overflow:visible;vertical-align:top}.wrap-cell .multiline-text{min-height:26px;padding:4px 0;overflow:visible;line-height:18px;overflow-wrap:anywhere;text-overflow:clip;white-space:pre-wrap;word-break:break-word}.cell-multiline-input{height:58px;min-height:58px;padding:5px 6px;resize:vertical;line-height:18px;white-space:pre-wrap}.expense-notes-wrap{min-width:0;display:flex;align-items:flex-start;gap:4px}.invoice-info-button{min-width:64px;height:24px;padding:0 7px;border:1px solid #cbd5df;border-radius:4px;background:#fff;color:#5f6f81;cursor:pointer;font-size:10px;line-height:22px;white-space:nowrap}.invoice-info-button:hover{border-color:#9fb8d1;background:var(--accent-soft);color:var(--accent-dark)}.invoice-info-button.has-info{border-color:#b9cfdf;background:#eef5fb;color:#35678f}.memo-editor{width:100%;height:auto;min-height:0;flex:1 1 auto;padding:26px 30px;resize:none;border:0;outline:0;background:#fff;color:var(--ink);font-size:15px;line-height:1.9}.memo-editor::placeholder{color:#a0a8b2}.memo-editor:focus{box-shadow:inset 0 0 0 2px #365f8d14}.management-upload{height:28px;padding:1px 10px;line-height:24px}.management-file-list{min-height:0;padding:7px 10px 14px;flex:1 1 auto;overflow:auto}.management-file-row{min-height:38px;display:flex;align-items:center;gap:6px;border-bottom:1px solid #e9edf2}.management-file-row:nth-child(2n){background:#f7f9fc}.management-file-row.missing{background:#fff1ef}.management-file-name{min-width:0;padding:6px 8px 6px 25px;position:relative;flex:1 1 auto;overflow:hidden;border:0;background:transparent;color:#344150;cursor:pointer;font:inherit;font-size:12px;line-height:20px;text-align:left;text-overflow:ellipsis;white-space:nowrap}.management-file-name:before{position:absolute;top:8px;left:8px;color:#b54c45;content:"PDF";font-size:8px;font-weight:800;letter-spacing:-.3px}.management-file-name:hover{color:var(--accent);text-decoration:underline}.management-file-delete{height:24px;padding:0 7px;flex:0 0 auto;opacity:0;border:1px solid #d8dde3;border-radius:4px;background:#fff;color:#7b858f;cursor:pointer;font-size:10px;transition:opacity .12s ease}.management-file-row:hover .management-file-delete,.management-file-delete:focus,.management-file-delete.confirm{opacity:1}.management-file-delete.confirm{border-color:#d6a19b;background:var(--danger-soft);color:var(--danger)}.management-files-empty{padding:46px 16px;color:var(--muted);font-size:12px;text-align:center}.expense-notes-wrap .cell-input,.expense-notes-wrap .cell-text{min-width:0;flex:1 1 auto}.settlement-toggle{height:23px;padding:0 6px;flex:0 0 auto;border:1px solid #cbd4dd;border-radius:11px;background:#fff;color:#718091;cursor:pointer;font-size:9px;font-weight:650;line-height:21px;white-space:nowrap}.settlement-toggle:hover{border-color:#9eb5aa;color:var(--success)}.settlement-toggle.active,.settlement-toggle[aria-pressed=true]{border-color:#b8d7c6;background:var(--success-soft);color:var(--success)}.delete-row{position:absolute;top:50%;right:2px;width:17px;height:21px;padding:0;transform:translateY(-50%);border:0;background:transparent;color:#9ba3ad;cursor:pointer;font-size:15px;line-height:20px}.delete-row:hover{color:var(--danger)}.delete-row.confirm{width:20px;border-radius:3px;background:var(--danger);color:#fff;font-size:10px}.file-cell{min-width:0;display:flex;align-items:center;gap:4px}.file-cell>a,.file-cell>span{min-width:0;flex:1 1 auto;overflow:hidden;color:var(--accent);line-height:24px;text-overflow:ellipsis;white-space:nowrap}.file-cell>span{color:#515963}.upload-button{flex:0 0 auto;padding:1px 5px;border:1px solid #b9cbe4;border-radius:3px;background:#fff;color:var(--accent);cursor:pointer;font-size:10px;line-height:19px;white-space:nowrap}.upload-button:hover{background:var(--accent-soft)}.upload-button.disabled,.upload-button[aria-disabled=true]{border-color:var(--line);color:#9ca3ad;cursor:not-allowed}.upload-button input{display:none}.other-files-button{min-width:56px;height:24px;padding:0 7px;border:1px solid var(--line);border-radius:4px;background:#fff;color:#5d6a79;cursor:pointer;font-size:10px;white-space:nowrap}.other-files-button:hover,.other-files-button.has-files{border-color:#b9cbe4;background:var(--accent-soft);color:var(--accent)}.other-files-button.has-missing{border-color:#e3b5af;background:var(--danger-soft);color:var(--danger)}.empty-cell{height:88px!important;color:#9299a3;text-align:center}.col-no{width:55px}.col-date{width:92px}.col-project{width:112px}.col-project-name{width:126px}.col-party{width:107px}.col-invoice{width:104px}.col-stage{width:82px}.col-money{width:100px}.col-file{width:120px}.col-other-file{width:110px}.col-folder{width:auto}.col-entity{width:100px}.col-notes{width:auto}.col-expense-content{width:210px}.col-person{width:104px}.col-address{width:240px}.col-account{width:160px}.col-password{width:180px}.account-table .col-notes{width:auto}.contract-table tbody td:nth-child(3) .cell-text,.contract-table tbody td:nth-child(3) .cell-input,.project-table tbody td:nth-child(2) .cell-text,.project-table tbody td:nth-child(2) .cell-input,.expense-table tbody td:nth-child(3) .cell-text,.expense-table tbody td:nth-child(3) .cell-input,.account-table tbody td:nth-child(2) .cell-text,.account-table tbody td:nth-child(2) .cell-input{font-weight:700}.password-cell{min-width:0;display:flex;align-items:center;gap:5px}.password-cell .cell-text,.password-cell .cell-input{min-width:0;flex:1 1 auto}.password-text{letter-spacing:.08em}.password-input{letter-spacing:.04em}.password-toggle{height:23px;padding:0 6px;flex:0 0 auto;border:1px solid var(--line);border-radius:4px;background:#fff;color:var(--muted);cursor:pointer;font-size:10px}.password-toggle:hover{border-color:#b9cbe4;background:var(--accent-soft);color:var(--accent)}.app-tabs{min-width:0;display:flex;align-self:stretch;align-items:center;gap:3px;padding:3px;border:1px solid var(--line);border-radius:7px;background:#eef2f6}.summary-card{min-width:108px;height:34px;padding:4px 9px 3px;display:grid;grid-template-columns:auto;align-content:center;border:1px solid var(--line);border-radius:6px;background:var(--surface)}.summary-note{color:var(--muted);font-size:10px;line-height:12px;white-space:nowrap}.receipt-row td,.receipt-child-row td{height:31px;max-height:31px;background:#f8fafc;color:#596779;line-height:23px}.receipt-row:hover td,.receipt-child-row:hover td{background:#f1f6fb!important}.receipt-row>td:first-child,.receipt-child-row>td:first-child{box-shadow:inset 3px 0 #aec6dc}.ledger-table tbody tr.row-settled>td,.project-table tbody tr.row-status-complete>td{background:#e9edf1!important;color:#77818c}.ledger-table tbody tr.row-settled>td:first-child,.project-table tbody tr.row-status-complete>td:first-child{box-shadow:inset 3px 0 #929ca7}.ledger-table tbody tr.row-settled .cell-text,.ledger-table tbody tr.row-settled .cell-date,.ledger-table tbody tr.row-settled .cell-money,.ledger-table tbody tr.row-settled .receipt-summary,.project-table tbody tr.row-status-complete .cell-text,.project-table tbody tr.row-status-complete .cell-date,.project-table tbody tr.row-status-complete .cell-money,.project-table tbody tr.row-status-complete .receipt-summary{color:#727d88;opacity:.76}.ledger-table tbody tr.row-settled:hover>td,.project-table tbody tr.row-status-complete:hover>td{background:#e3e8ed!important}.ledger-app.editing .ledger-table tbody tr.row-settled>td,.ledger-app.is-editing .ledger-table tbody tr.row-settled>td,.ledger-app.editing .project-table tbody tr.row-status-complete>td,.ledger-app.is-editing .project-table tbody tr.row-status-complete>td,body:has(.edit-button[aria-pressed=true]) .ledger-table tbody tr.row-settled>td,body:has(.edit-button[aria-pressed=true]) .project-table tbody tr.row-status-complete>td{background:#eef1f4!important;color:var(--ink)}.ledger-app.editing .ledger-table tbody tr.row-settled .cell-input,.ledger-app.is-editing .ledger-table tbody tr.row-settled .cell-input,.ledger-app.editing .project-table tbody tr.row-status-complete .cell-input,.ledger-app.is-editing .project-table tbody tr.row-status-complete .cell-input,body:has(.edit-button[aria-pressed=true]) .ledger-table tbody tr.row-settled .cell-input,body:has(.edit-button[aria-pressed=true]) .project-table tbody tr.row-status-complete .cell-input{border-color:#bdc8d3;background:#fff;color:var(--ink);opacity:1}.ledger-app.editing .ledger-table tbody tr.row-settled .cell-text,.ledger-app.editing .ledger-table tbody tr.row-settled .cell-date,.ledger-app.editing .ledger-table tbody tr.row-settled .cell-money,.ledger-app.is-editing .ledger-table tbody tr.row-settled .cell-text,.ledger-app.is-editing .ledger-table tbody tr.row-settled .cell-date,.ledger-app.is-editing .ledger-table tbody tr.row-settled .cell-money,body:has(.edit-button[aria-pressed=true]) .ledger-table tbody tr.row-settled .cell-text,body:has(.edit-button[aria-pressed=true]) .ledger-table tbody tr.row-settled .cell-date,body:has(.edit-button[aria-pressed=true]) .ledger-table tbody tr.row-settled .cell-money{color:var(--ink);opacity:1}.ledger-app.editing .ledger-table tbody tr.row-settled .receipt-summary,.ledger-app.is-editing .ledger-table tbody tr.row-settled .receipt-summary,.ledger-app.editing .project-table tbody tr.row-status-complete .receipt-summary,.ledger-app.is-editing .project-table tbody tr.row-status-complete .receipt-summary,body:has(.edit-button[aria-pressed=true]) .ledger-table tbody tr.row-settled .receipt-summary,body:has(.edit-button[aria-pressed=true]) .project-table tbody tr.row-status-complete .receipt-summary{color:var(--ink);opacity:1}.receipt-group-label td{min-width:0;height:31px;padding-left:10px;background:#f1f5f9;color:#5c7590;font-size:11px;font-weight:650}.receipt-group-label td:before{width:12px;height:8px;margin-left:5px;display:inline-block;border-bottom:1px solid #b7c7d6;border-left:1px solid #b7c7d6;content:""}.receipt-summary{min-width:0;display:flex;align-items:center;justify-content:flex-end;gap:4px}.receipt-toggle{width:auto;min-width:0;height:22px;padding:0 4px;display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;overflow:hidden;border:0;border-radius:4px;background:transparent;color:var(--accent);cursor:pointer;font-size:12px;line-height:20px;font-variant-numeric:tabular-nums;text-overflow:ellipsis;white-space:nowrap}.receipt-toggle small{color:var(--muted);font-size:9px}.receipt-toggle:hover,.receipt-toggle[aria-expanded=true]{border-color:#b7c9dc;background:var(--accent-soft)}.orphan-panel{margin:8px 0 0;overflow:hidden;border:1px dashed #c8d5e2;border-radius:6px;background:#f7fafc}.orphan-panel>summary{padding:7px 9px;color:#53677c;cursor:pointer;font-size:11px;font-weight:650}.modal-backdrop{position:fixed;inset:0;z-index:89;border:0;background:#1c293747;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.invoice-modal{position:fixed;top:50%;left:50%;z-index:90;width:min(640px,calc(100vw - 28px));max-height:calc(100vh - 40px);display:flex;flex-direction:column;overflow:hidden;transform:translate(-50%,-50%);border:1px solid var(--line-strong);border-radius:10px;background:#fff;box-shadow:0 24px 70px #1b2a3b3d}.invoice-modal-head{min-height:62px;padding:11px 13px 10px 17px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);background:var(--surface-soft)}.invoice-modal-head h2{margin:0 0 3px;font-size:16px}.invoice-modal-head small{display:block;overflow:hidden;color:var(--muted);font-size:11px;text-overflow:ellipsis;white-space:nowrap}.invoice-info-editor{width:100%;min-height:300px;padding:18px;resize:vertical;border:0;outline:0;background:#fff;color:var(--ink);font-size:14px;line-height:1.75;white-space:pre-wrap}.invoice-info-editor:focus{box-shadow:inset 0 0 0 2px #365f8d1a}.invoice-modal-actions{padding:10px 13px;display:flex;justify-content:flex-end;gap:7px;border-top:1px solid var(--line);background:var(--surface-soft)}.other-files-modal{width:min(720px,calc(100vw - 28px))}.other-files-toolbar{min-height:48px;padding:9px 14px;display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--line);background:#fff}.other-files-toolbar small{color:var(--muted);font-size:10px}.other-files-add{padding:2px 9px;font-size:11px;line-height:22px}.other-files-list{min-height:150px;max-height:min(520px,calc(100vh - 190px));padding:8px 12px 12px;overflow-y:auto;background:#fff}.other-file-item{min-height:50px;padding:7px 8px 7px 11px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #e8edf2}.other-file-item:nth-child(2n){background:#f8fafc}.other-file-item.missing{background:var(--danger-soft)}.other-file-meta{min-width:0;display:grid;gap:2px}.other-file-meta strong{overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.other-file-meta small{color:var(--muted);font-size:10px}.other-file-actions{display:flex;flex:0 0 auto;gap:6px}.other-files-empty{min-height:130px;display:grid;place-items:center;color:#939ba5}.archive-backdrop{position:fixed;inset:0;z-index:79;border:0;background:#1c29373d;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px)}.archive-drawer{position:fixed;top:0;right:0;z-index:80;width:min(440px,100vw);height:100vh;display:flex;flex-direction:column;overflow:hidden;border-left:1px solid var(--line);background:var(--surface);box-shadow:-18px 0 46px #1c2b3d29}.archive-head{min-height:50px;padding:9px 12px 9px 15px;display:flex;align-items:center;justify-content:space-between;gap:10px;flex:0 0 auto;border-bottom:1px solid var(--line);background:var(--surface-soft)}.archive-head h2,.archive-head h3{margin:0;font-size:15px;line-height:1.2}.archive-create,.archive-form{padding:11px 12px;display:flex;align-items:center;gap:7px;flex:0 0 auto;border-bottom:1px solid var(--line)}.archive-create input,.archive-form input{min-width:0;height:30px;padding:4px 8px;flex:1 1 auto;border:1px solid var(--line-strong);border-radius:5px;background:var(--surface);color:var(--ink)}.archive-list{min-height:0;padding:10px 12px 14px;display:grid;align-content:start;gap:7px;flex:1 1 auto;overflow:auto;background:var(--page)}.archive-item{padding:9px 10px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:9px;border:1px solid var(--line);border-radius:7px;background:var(--surface)}.archive-item:hover{border-color:#c4d1de;box-shadow:0 4px 13px #25374c0f}.archive-item strong{min-width:0;display:block;overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.archive-item-actions{display:flex;align-items:center;gap:5px}.archive-item-actions .plain-button{height:26px;padding:0 7px;font-size:11px;line-height:24px}.archive-item-actions .confirm{border-color:var(--danger);background:var(--danger);color:#fff}.archive-meta{margin-top:2px;display:block;color:var(--muted);font-size:10px;line-height:14px}.archive-preview{min-height:0;margin:10px 12px;padding:10px;flex:1 1 auto;overflow:auto;border:1px solid var(--line);border-radius:7px;background:var(--surface-soft);color:#405064;font-family:ui-monospace,Cascadia Mono,Microsoft YaHei UI,monospace;font-size:11px;line-height:1.55;white-space:pre-wrap}.archive-actions{min-height:50px;padding:9px 12px;display:flex;align-items:center;justify-content:flex-end;gap:7px;flex:0 0 auto;border-top:1px solid var(--line);background:var(--surface)}.expense-panel{width:100%;height:100%;min-height:0;margin:0;scroll-margin-top:92px}@media(max-width:1180px){.summary-item,.summary-card{min-width:96px;padding-right:7px;padding-left:7px}.status-legend{gap:6px}}@media(max-width:1280px){.ledger-contextbar{overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:thin}.primary-tabs,.app-tabs,.summary-strip{flex:0 0 auto}}@media(max-width:920px){.ledger-topbar h1 small,.summary-note{display:none}.ledger-contextbar{overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:thin}.primary-tabs,.app-tabs,.summary-strip{flex:0 0 auto}.save-state{max-width:92px}.panel-actions{max-width:74%}.nature-filter-group{max-width:100%}}@media(max-width:680px){body{font-size:12px}.ledger-topbar{height:48px;min-height:48px;padding:5px 7px 5px 9px;gap:7px}.ledger-topbar h1{font-size:14px}.topbar-actions{gap:4px}.save-state{max-width:68px}.plain-button,.data-button,.edit-button{height:29px;padding:0 7px;line-height:27px}.data-button{display:none}.ledger-contextbar{padding-right:7px;padding-left:7px;gap:7px}.primary-tab{min-width:84px;padding:0 8px}.summary-item,.summary-card{min-width:90px}.ledger-workspace,.ledger-content{padding:7px}.memo-editor{padding:18px 16px;font-size:14px}.management-panel{flex-direction:column}.management-notes-pane{min-height:250px;flex:3 1 56%;border-right:0;border-bottom:1px solid var(--line-strong)}.management-files-pane{min-height:210px;flex:2 1 44%}.invoice-info-editor{min-height:240px;padding:14px}.contract-panel,.side-panel{height:100%;min-height:0}.panel-bar{padding-right:6px}.panel-actions{max-width:76%}.nature-filter-group{max-width:100%}.nature-filter-label{display:none}.nature-filter-chip,.contract-nature-chip{padding-right:7px;padding-left:7px}.compact-select{max-width:106px}.expense-panel{width:100%;min-height:0;margin:0;scroll-margin-top:92px}.archive-drawer{width:100vw;border-left:0}.archive-create,.archive-form{align-items:stretch;flex-direction:column}.archive-create button,.archive-form button{align-self:flex-end}}@media print{.ledger-topbar{position:static}.ledger-contextbar,.archive-backdrop,.archive-drawer,.modal-backdrop,.invoice-modal,.topbar-actions,.panel-actions,.add-row-button,.delete-row,.upload-button{display:none!important}.ledger-workspace{height:auto;display:block}.ledger-panel{height:auto;margin-bottom:10px;overflow:visible;break-inside:avoid}.table-wrap{overflow:visible}.ledger-table{min-width:0}.ledger-table th{position:static}}
