:root{--bg: #f5f7f6;--surface: #ffffff;--surface-strong: #fbfcfb;--sidebar: #17221d;--text: #1f2b26;--muted: #708079;--line: #dfe7e2;--accent: #1b8a63;--accent-strong: #126646;--accent-soft: #e9f6f1;--gold: #b88835;--shadow: 0 14px 40px rgba(30, 42, 36, .08);font-family:Inter,Microsoft YaHei,PingFang SC,system-ui,sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text)}html,body{width:100%;max-width:100%;overflow-x:hidden}button,input,select{font:inherit}button{cursor:pointer}svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.app-shell{width:100%;max-width:100vw;min-height:100vh;display:block}.sidebar{position:fixed;top:0;left:0;z-index:20;width:248px;height:100vh;padding:18px 14px;background:var(--sidebar);color:#fff;transition:width .18s ease}.sidebar.is-collapsed{width:84px}.brand{width:100%;height:56px;border:0;border-radius:8px;display:flex;align-items:center;gap:12px;padding:0 10px;color:#fff;background:#ffffff14;text-align:left}.brand-mark{width:40px;height:40px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 40px;overflow:hidden;background:#fff}.brand-mark img{width:100%;height:100%;object-fit:cover;display:block}.brand-copy{display:grid;gap:3px;white-space:nowrap}.brand-copy small{color:#abc3b8}.nav-list{display:grid;gap:8px;margin-top:22px}.nav-item{height:44px;border:0;border-radius:8px;display:flex;align-items:center;gap:12px;padding:0 14px;color:#bed0c8;background:transparent;text-align:left}.nav-item:hover{background:#ffffff12;color:#fff}.nav-item.is-active{background:var(--accent);color:#fff}.sidebar.is-collapsed .nav-item span,.sidebar.is-collapsed .brand-copy{width:0;opacity:0;overflow:hidden;pointer-events:none}.sidebar.is-collapsed .nav-item,.sidebar.is-collapsed .brand{justify-content:center;gap:0}.workspace{min-width:0;max-width:100%;margin-left:248px;padding:28px;transition:margin-left .18s ease}.sidebar.is-collapsed+.workspace{margin-left:84px}.topbar,.panel-heading,.table-footer{display:flex;justify-content:space-between;align-items:center;gap:16px}.topbar{margin-bottom:24px}.eyebrow{margin:0 0 6px;color:var(--muted);font-size:12px;text-transform:uppercase}h1,h2,p{margin-top:0}h1{margin-bottom:0;font-size:28px}h2{margin-bottom:0;font-size:18px}.status-pill{height:36px;display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:999px;padding:0 14px;background:var(--surface);color:var(--muted)}.status-dot{width:8px;height:8px;border-radius:50%;background:var(--accent)}.view{min-width:0;display:grid;gap:18px}.metric-grid,.panel-grid,.rules-grid{display:grid;gap:14px}.metric-grid{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:18px}.dashboard-grid,.rules-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.rules-editor-grid{grid-template-columns:minmax(0,1fr)}.metric-card,.tool-panel{border:1px solid var(--line);border-radius:8px;background:var(--surface);box-shadow:var(--shadow)}.metric-card{min-height:112px;padding:18px;display:grid;align-content:space-between}.metric-card span,.panel-heading span,.table-count{color:var(--muted)}.metric-card strong{font-size:26px;overflow-wrap:anywhere}.tool-panel{padding:20px;min-width:0;display:grid;gap:18px}.compact-panel p{color:var(--muted);line-height:1.7}.panel-heading span{color:var(--gold);font-size:13px;white-space:nowrap}.calc-form,.upload-form{display:grid;gap:14px;align-items:end}.calc-form{grid-template-columns:repeat(3,minmax(0,1fr)) auto}.compact-calc-form{grid-template-columns:minmax(240px,360px) auto;justify-content:start}.upload-form{grid-template-columns:minmax(260px,420px) auto auto auto;justify-content:start}label{display:grid;gap:8px;color:var(--muted);font-size:14px}input,select{width:100%;height:44px;border:1px solid var(--line);border-radius:8px;padding:0 12px;background:var(--surface-strong);color:var(--text);outline:none}input:focus,select:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.primary-action,.ghost-button{height:44px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 16px;border:1px solid transparent;white-space:nowrap}.primary-action{background:var(--accent);color:#fff}.primary-action:hover{background:var(--accent-strong)}.ghost-button{background:var(--accent-soft);color:var(--accent-strong);border-color:#cbe6dc}.primary-action:disabled,.ghost-button:disabled{cursor:not-allowed;opacity:.5}.result-box{border:1px solid #cbe6dc;border-radius:8px;background:var(--accent-soft);padding:18px;display:grid;gap:12px}.result-main{display:flex;align-items:end;justify-content:space-between;gap:14px}.result-main strong{font-size:34px;color:var(--accent-strong)}.result-detail{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.result-chip{border-radius:8px;background:#ffffffb8;padding:10px;min-height:58px}.result-chip span{display:block;color:var(--muted);font-size:12px;margin-bottom:4px}.rule-builder-grid{min-width:0;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr);gap:18px}.rule-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:end}.rule-form .tier-editor,.rule-form .empty-state,.rule-form .primary-action{grid-column:1 / -1}.tier-editor{min-width:0;display:grid;gap:10px;border:1px solid var(--line);border-radius:8px;padding:14px;background:var(--surface-strong)}.tier-editor-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.tier-row{min-width:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr)) auto;gap:10px;align-items:center}.tier-row-head{color:var(--muted);font-size:13px}.tier-row .page-button{min-width:66px}.inline-actions{display:inline-flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}.rules-editor-grid .panel-heading{align-items:flex-start;flex-wrap:wrap}.editable-rules-table{min-width:760px;table-layout:auto}.monthly-rules-table{min-width:1040px}.salary-rules-table{min-width:820px}.editable-rules-table th,.editable-rules-table td{overflow:visible;text-overflow:clip}.editable-rules-table input{min-width:96px;height:36px;padding:0 9px}.editable-rules-table .page-button{height:36px;padding:0 10px}.custom-rule-list{display:grid;gap:10px}.custom-rule-item{min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 14px;align-items:center;border:1px solid var(--line);border-radius:8px;padding:14px;background:var(--surface-strong)}.custom-rule-item strong,.custom-rule-item small{display:block}.custom-rule-item small{margin-top:5px;color:var(--muted)}.custom-rule-item p{grid-column:1 / -1;margin:0;color:var(--text);line-height:1.6;overflow-wrap:anywhere}.upload-result{min-width:0;display:grid;gap:16px}.upload-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}.upload-summary .metric-card{min-height:92px;padding:16px}.upload-summary .metric-card strong{font-size:18px}.table-tools{display:grid;gap:14px;border:1px solid var(--line);border-radius:8px;padding:14px;background:var(--surface-strong)}.table-toolbar{display:grid;grid-template-columns:minmax(220px,1fr) minmax(170px,220px) minmax(150px,200px) minmax(140px,180px);gap:12px;align-items:end}.group-filter{display:grid;gap:8px}.group-filter>span{color:var(--muted);font-size:14px}.group-options{display:flex;flex-wrap:wrap;gap:8px}.group-option{min-height:34px;display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:999px;padding:0 12px;background:#fff;color:#33423b}.group-option input{width:14px;height:14px;padding:0;accent-color:var(--accent)}.display-options{display:flex;justify-content:flex-start}.toggle-option{min-height:40px;display:inline-grid;grid-template-columns:auto auto auto;align-items:center;column-gap:10px;row-gap:2px;border:1px solid var(--line);border-radius:8px;padding:8px 12px;background:#fff;color:var(--text)}.toggle-option input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.toggle-track{width:42px;height:24px;border-radius:999px;padding:3px;background:#cbd7d1;transition:background .16s ease}.toggle-track span{width:18px;height:18px;display:block;border-radius:50%;background:#fff;box-shadow:0 2px 6px #1f2b2633;transition:transform .16s ease}.toggle-option input:checked+.toggle-track{background:var(--accent)}.toggle-option input:checked+.toggle-track span{transform:translate(18px)}.toggle-option strong{font-size:14px}.toggle-option small{grid-column:2 / 4;color:var(--muted)}.table-footer{flex-wrap:wrap}.pagination{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:var(--muted);font-size:13px}.pagination .ghost-button{height:34px;padding:0 12px}.table-wrap{width:100%;min-width:0;max-height:560px;overflow-x:hidden;overflow-y:auto;border:1px solid var(--line);border-radius:8px;white-space:nowrap}.table-wrap.editable-table-wrap{width:100%;max-width:100%;overflow-x:auto;overflow-y:auto;overscroll-behavior:contain}.table-wrap.is-full-table{overflow:auto}.table-wrap.tall{max-height:680px}table{width:100%;min-width:100%;border-collapse:collapse;table-layout:fixed}.table-wrap.is-full-table table{width:max-content;table-layout:auto}th,td{padding:12px;border-bottom:1px solid var(--line);text-align:left;white-space:nowrap;word-break:keep-all;overflow-wrap:normal;background:#fff;overflow:hidden;text-overflow:ellipsis}.full-upload-table th:nth-child(1),.full-upload-table td:nth-child(1){width:150px}.full-upload-table th:nth-child(2),.full-upload-table td:nth-child(2){width:110px}.full-upload-table th:nth-child(3),.full-upload-table td:nth-child(3){width:min(34vw,420px)}.full-upload-table th:nth-child(4),.full-upload-table td:nth-child(4){width:72px}.table-wrap.is-full-table th,.table-wrap.is-full-table td{width:auto;overflow:visible;text-overflow:clip}.source-cell{font-variant-numeric:tabular-nums;white-space:pre}th{position:sticky;top:0;z-index:2;background:#eef3ef;color:#3b4943;font-size:13px}.account-cell{color:var(--text);font-weight:700}.match-list{min-width:0;display:flex;flex-wrap:nowrap;gap:6px;max-width:100%;white-space:nowrap}.match-tag{min-width:0;display:inline-block;align-items:center;max-width:100%;min-height:26px;border-radius:999px;padding:0 10px;background:var(--accent-soft);color:var(--accent-strong);font-size:12px;white-space:nowrap;word-break:keep-all;overflow:hidden;text-overflow:ellipsis}.match-tag.is-muted{background:#f1f3f1;color:var(--muted)}.status-tag{display:inline-flex;align-items:center;justify-content:center;min-width:54px;min-height:26px;border-radius:999px;padding:0 10px;font-size:12px;font-weight:700}.status-tag.is-ok{background:var(--accent-soft);color:var(--accent-strong)}.status-tag.is-no{background:#f2f3f2;color:#6b746f}.history-list{display:grid;gap:10px}.history-item{display:grid;grid-template-columns:minmax(120px,180px) 1fr auto;gap:14px;align-items:center;border:1px solid var(--line);border-radius:8px;padding:14px;background:var(--surface-strong)}.history-item small{color:var(--muted)}.history-item strong{color:var(--accent-strong);font-size:20px}.empty-state{border:1px dashed var(--line);border-radius:8px;padding:22px;color:var(--muted);text-align:center}@media(max-width:980px){.sidebar{width:84px;padding:14px 10px}.workspace,.sidebar.is-collapsed+.workspace{margin-left:84px}.sidebar .nav-item span,.sidebar .brand-copy{width:0;opacity:0;overflow:hidden;pointer-events:none}.sidebar .nav-item,.sidebar .brand{justify-content:center;gap:0}.metric-grid,.dashboard-grid,.rules-grid,.rule-builder-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.rules-editor-grid{grid-template-columns:minmax(0,1fr)}.calc-form,.compact-calc-form,.upload-form,.table-toolbar,.upload-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:680px){.sidebar{position:relative;width:100%;height:auto;display:grid;grid-template-columns:auto 1fr;gap:10px}.sidebar.is-collapsed{width:100%}.brand{width:64px}.nav-list{margin-top:0;display:flex;overflow-x:auto}.nav-item{flex:0 0 48px}.workspace{margin-left:0;padding:18px}.sidebar.is-collapsed+.workspace{margin-left:0}.status-pill{display:none}.metric-grid,.dashboard-grid,.rules-grid,.rule-builder-grid,.rule-form,.calc-form,.compact-calc-form,.upload-form,.table-toolbar,.upload-summary,.result-detail,.history-item,.custom-rule-item,.tier-row{grid-template-columns:1fr}.inline-actions{justify-content:flex-start}}
