:root{font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif;color:#24342e;background:#f6f7f9;font-size:14px;--green:#247655;--line:#e1e5e9;--muted:#75817c}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer;border:1px solid #d6ddd9;border-radius:5px;background:#fff;color:#36473e;padding:8px 12px;transition:background .15s}button:hover{background:#eef3f0}button:disabled{opacity:.5;cursor:not-allowed}button.primary{background:#247655;border-color:#247655;color:#fff}button.primary:hover{background:#195c41}button.danger{color:#b43b45}button.link{border:0;background:transparent;padding:5px 8px;color:#26745a}input,select,textarea{width:100%;min-width:0;padding:9px 10px;border:1px solid #ced8d2;border-radius:4px;background:#fff;color:#24342e}input:focus,select:focus,textarea:focus{outline:2px solid #99cdb5;outline-offset:1px}button:focus-visible{outline:2px solid #247655;outline-offset:2px}
.master-tabs{display:flex;gap:12px;border-bottom:1px solid var(--line);margin-bottom:24px;overflow:auto}.master-tabs button{white-space:nowrap;border:0;border-radius:0;border-bottom:3px solid transparent;padding:12px 16px;background:transparent}.master-tabs button[aria-selected=true]{color:#247655;border-bottom-color:#247655;font-weight:700}.master-tabs small{color:var(--muted);margin-left:8px}
.department-picker{border:1px solid var(--line);padding:14px;min-width:0}.department-picker legend{font-size:12px}#entryForm .department-picker label{display:flex;align-items:center;margin:8px 0;overflow-wrap:anywhere}.department-picker input[type=checkbox]{width:16px;height:16px;flex-shrink:0}
.year-filter{display:flex;align-items:center;gap:10px;font-size:12px;color:var(--muted)}.year-filter select{width:110px}
.summary-total{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;padding:16px 0;border-top:1px solid var(--line)}.summary-total span{color:var(--muted);font-size:12px}.summary-total strong{font-size:17px;overflow-wrap:anywhere}
.sidebar{position:fixed;inset:0 auto 0 0;width:210px;background:#fff;border-right:1px solid var(--line);padding:28px 18px;display:flex;flex-direction:column}.brand{display:flex;gap:10px;align-items:center;font-size:18px;font-weight:700;margin-bottom:36px}.brand-mark{display:grid;place-items:center;background:#247655;color:white;width:38px;height:38px;border-radius:6px}.brand small{display:block;color:var(--muted);font-size:10px;font-weight:400;margin-top:3px}nav{display:grid;gap:8px}nav button{text-align:left;border:0;padding:12px 18px}nav button.active{background:#e5f2eb;color:#196044;font-weight:700;border-left:3px solid #247655}.sidebar-bottom{margin-top:auto;display:grid;gap:8px}.sidebar-bottom span{font-size:11px;color:var(--muted);margin-bottom:5px}main{margin-left:210px;padding:0 30px}header{min-height:96px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:16px}.eyebrow{font-size:10px;color:var(--muted)}h1{font-size:23px;margin:4px 0 0}h2{font-size:16px;margin:0}h3{font-size:14px;margin:0}.header-actions{display:flex;align-items:center;gap:8px}.header-actions>span{font-size:11px;color:var(--muted);margin-right:12px}#content{padding-top:24px}footer{padding:30px 0;color:#8b9590;font-size:11px}#notice:not(:empty){padding:12px;margin-top:16px;background:#fff5dc;border:1px solid #eedcaa;font-size:12px;border-radius:4px;line-height:1.8}#notice button{margin-left:12px;font-size:12px;padding:4px 8px}.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--line);background:white;margin-bottom:26px}.metric{padding:20px;border-right:1px solid var(--line);min-width:0}.metric:last-child{border:0}.metric span{font-size:12px;color:var(--muted)}.metric strong{display:block;font-size:26px;margin:10px 0;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.metric small{font-size:11px;color:var(--muted)}.metric:nth-child(2) strong{color:#247655}.metric:nth-child(3) strong{color:#b74b55}
.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:13px;gap:12px}.section-head small{color:var(--muted);font-size:11px}.table-wrap{overflow:auto;border:1px solid var(--line);background:#fff;margin-bottom:26px}table{border-collapse:collapse;width:100%;font-size:12px}th{background:#f0f3f6;color:#67756e;font-size:11px;text-align:left;font-weight:500;white-space:nowrap}td,th{padding:13px 14px;border-bottom:1px solid #edf0f2;line-height:1.6}td{vertical-align:middle}tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:#fafcfb}.num{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.nowrap{white-space:nowrap}.muted{color:var(--muted)}.debt{color:#b7404f;font-weight:600}.empty{text-align:center;padding:42px;color:var(--muted)}.pill{display:inline-block;font-size:11px;padding:3px 8px;border-radius:4px;white-space:nowrap;background:#fcecef;color:#b03e4b}.pill.paid{color:#237151;background:#e4f2e9}.pill.partial{color:#95651a;background:#fff2d8}.toolbar{display:flex;gap:10px;align-items:end;margin-bottom:18px;flex-wrap:wrap}.toolbar label{font-size:11px;color:var(--muted);display:grid;gap:5px;max-width:200px;flex:1;min-width:130px}.toolbar .search{max-width:260px}.toolbar input,.toolbar select{font-size:12px;height:37px}.toolbar button{height:37px}.total-line{display:flex;gap:22px;font-size:12px;color:#65756b;margin:14px 0}.bar-track{display:inline-block;width:84px;height:5px;background:#eef0f3;margin-right:10px;vertical-align:middle}.bar-track i{display:block;height:100%;background:#ac83b1;max-width:100%}.actions{white-space:nowrap}.actions button{font-size:11px}.order-no{font-family:ui-monospace,monospace;color:#4e6487}.error{color:#b43b45;background:#fff0f1;padding:10px;grid-column:1/-1;border-radius:4px;font-size:12px}.error:empty{display:none}
table{min-width:650px}table:has(th:nth-child(12)){min-width:1550px}table:has(th:nth-child(8)){min-width:1000px}table:has(th:nth-child(12)){min-width:1550px}td{overflow-wrap:anywhere}td.order-no{white-space:nowrap}.actions button.danger{color:#b43b45}.allocation-row>div{min-width:0;overflow-wrap:anywhere}
dialog{border:1px solid #d8e0dc;border-radius:8px;padding:0;width:min(760px,calc(100% - 28px));max-height:90vh;color:#24342e;box-shadow:0 16px 55px #18322633}dialog::backdrop{background:#16292077}#detail{width:min(1100px,calc(100% - 28px))}.dialog-head{display:flex;justify-content:space-between;align-items:center;padding:18px 24px;border-bottom:1px solid var(--line);background:white;position:sticky;top:0;z-index:1}.dialog-head button{font-size:22px;border:0;padding:0 8px}#entryForm{padding:24px;display:grid;grid-template-columns:1fr 1fr;gap:18px}#entryForm label{display:grid;gap:7px;font-size:12px;min-width:0}label small{color:var(--muted);font-size:11px}.wide{grid-column:1/-1}.form-actions{display:flex;justify-content:flex-end;gap:8px;border-top:1px solid var(--line);padding-top:18px}.allocation-row{display:grid;grid-template-columns:24px 1fr 145px;gap:12px;align-items:center;padding:12px;border-bottom:1px solid var(--line);font-size:12px}.allocation-row input[type=checkbox]{width:16px;height:16px}.allocation-row small{display:block;color:var(--muted);margin-top:4px}.allocation-row input[type=number]{font-size:12px}.allocation-list{max-height:250px;overflow:auto;border:1px solid var(--line);margin:10px 0}.payment-summary{display:flex;justify-content:space-between;gap:12px;font-size:12px;align-items:center}.payment-summary strong{font-size:18px}.detail-body{padding:22px}.detail-body .metric strong{font-size:22px}#toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);background:#263f33;color:white;padding:12px 20px;border-radius:5px;z-index:20;opacity:0;pointer-events:none;max-width:90%;font-size:13px}#toast.show{opacity:1}
@media(max-width:1150px){.header-actions>span{display:none}.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.metric:nth-child(2){border-right:0}.metric:nth-child(-n+2){border-bottom:1px solid var(--line)}main{padding:0 20px}.sidebar{width:180px;padding:22px 14px}main{margin-left:180px}}
@media(max-width:700px){.sidebar{position:static;width:auto;padding:14px;border-right:0;border-bottom:1px solid var(--line)}.brand{margin-bottom:14px}.brand small{display:inline;margin-left:8px}.sidebar nav{display:flex;overflow:auto;gap:4px}nav button{white-space:nowrap;padding:10px}.sidebar-bottom{display:flex;align-items:center;margin-top:14px;flex-wrap:wrap}.sidebar-bottom span{flex:1;font-size:10px}.sidebar-bottom button{font-size:11px;padding:5px 8px}main{margin:0;padding:0 14px}header{flex-wrap:wrap;padding:18px 0}.header-actions{width:100%}.header-actions button{flex:1}.metric{padding:14px}.metric strong{font-size:21px}.total-line{flex-wrap:wrap;gap:10px}.toolbar label{min-width:140px;max-width:none}#entryForm{padding:18px;grid-template-columns:1fr}.wide{grid-column:1}.allocation-row{grid-template-columns:20px 1fr 100px;padding:10px 5px;gap:7px}.section-head{align-items:flex-start}td,th{padding:10px}.detail-body{padding:14px}}
.data-tools{padding:22px;background:#fff;border:1px solid var(--line);border-radius:8px}.data-tools-actions{display:flex;gap:12px;flex-wrap:wrap}.data-tools-actions>span{flex-basis:100%;font-size:12px;color:var(--muted)}.data-tools-actions button{min-height:44px}
