/* Billing UI only: financial values, scopes and mutation controllers are unchanged. */
.app-shell:has(.billing-flat){--sidebar-width:224px;--topbar-height:64px;background:#f5f8fd}
.app-shell:has(.billing-flat) .page-container{padding:30px 32px 48px}
.app-shell #app .billing-flat{max-width:none;min-width:0;margin:0;color:#647e9f;font-family:Inter,"Segoe UI","Microsoft YaHei",sans-serif;font-size:13px;line-height:1.8}
.app-shell #app .billing-flat .page-heading{border:0;margin:0 0 25px;padding:0;gap:20px;align-items:center}
.app-shell #app .billing-flat .page-heading .eyebrow{display:none}
.app-shell #app .billing-flat .page-heading h1{color:#253f62!important;font-size:29px!important;font-weight:650!important;letter-spacing:-.7px;line-height:1.5}
.app-shell #app .billing-flat .page-heading p:not(.eyebrow){margin:8px 0 0;color:#879bb9!important;font-size:14px;line-height:1.9}
.app-shell #app .billing-flat .button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:7px 13px;border:1px solid #e0e8f5;border-radius:7px!important;background:#fff!important;color:#7189ae!important;font-size:13px!important;font-weight:500;line-height:20px;white-space:nowrap;box-shadow:0 2px 5px #2a467405;cursor:pointer}
.app-shell #app .billing-flat .button-primary{color:#fff!important;background:#536cf5!important;border-color:#536cf5;box-shadow:0 3px 9px #4965f124}
.app-shell #app .billing-flat .button:hover:not(:disabled){background:#f2f6ff!important;border-color:#bdcdfa;color:#4965e9!important}
.app-shell #app .billing-flat .button-primary:hover:not(:disabled){color:#fff!important;background:#435ce5!important}
.app-shell #app .billing-flat button:disabled{opacity:.45;cursor:not-allowed;box-shadow:none}
.app-shell #app .billing-flat :is(button,input,textarea,summary):focus-visible{outline:3px solid #b7c7ff;outline-offset:3px}
.app-shell #app .billing-flat .bf-ui-icon{width:16px;height:16px;flex:none}
.app-shell #app .billing-flat .bf-panel{padding:24px;border:1px solid #e2e9f5;border-radius:12px;background:#fff;box-shadow:0 3px 16px #243f6504;min-width:0}
.app-shell #app .billing-flat .bf-tabs{display:inline-flex;align-items:center;width:fit-content;max-width:100%;gap:4px;flex-wrap:wrap;padding:5px;border:1px solid #e7ecf4;border-radius:10px;background:#f3f5f9;margin:0 0 24px;box-sizing:border-box}
.app-shell #app .billing-flat .bf-tabs button{box-sizing:border-box;min-height:36px;padding:8px 16px;border:1px solid transparent!important;border-radius:7px!important;background:transparent!important;color:#69768b!important;font-size:14px!important;font-weight:500!important;line-height:20px;white-space:nowrap;box-shadow:none}
.app-shell #app .billing-flat .bf-tabs button[aria-current=page],.app-shell #app .billing-flat .bf-tabs button[aria-current=page]:hover{color:#315dea!important;background:#fff!important;border:1px solid #e3e9f4!important;border-radius:7px!important;box-shadow:0 2px 5px #2035550c;font-weight:600!important}
.app-shell #app .billing-flat .bf-tabs button:hover:not([aria-current=page]){color:#3f608f!important;background:#eaf0fb!important;border-color:transparent!important}
.app-shell #app .billing-flat .bf-toolbar{gap:16px;margin:0 0 22px;align-items:center}
.app-shell #app .billing-flat .bf-toolbar>form{gap:12px;align-items:center;flex-wrap:wrap}
.app-shell #app .billing-flat .bf-toolbar>label{color:#8b9fba;font-size:13px;gap:12px}
.app-shell #app .billing-flat .bf-toolbar .ic-composer-select{width:180px;flex:0 1 180px}
.app-shell #app .billing-flat .bf-toolbar label>.ic-composer-select{width:210px}
.app-shell #app .billing-flat :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),textarea,select){box-sizing:border-box;min-height:40px;padding:10px 13px!important;border:1px solid #dfe7f5!important;border-radius:7px!important;color:#5e769a;background:#fff;box-shadow:0 2px 6px #283f5d03;font-family:inherit;font-size:13px!important;line-height:1.8;max-width:100%}
.app-shell #app .billing-flat :is(input,textarea)::placeholder{color:#a0aec4;font-weight:400}
.app-shell #app .billing-flat :is(input,textarea):focus{outline:0;border-color:#99adfa!important;box-shadow:0 0 0 3px #536cf510}
.app-shell #app .billing-flat input[type=checkbox]{width:16px;height:16px;min-height:16px;flex:none;accent-color:#536cf5}
.app-shell #app .billing-flat input[type=file]{padding:11px 13px!important;background:#f9fbff;line-height:1.8}
.app-shell #app .billing-flat input[type=file]::file-selector-button{padding:6px 10px;border:1px solid #dce6f8;border-radius:5px;margin-right:12px;background:#f0f5ff;color:#718cbb;font-family:inherit;cursor:pointer}
.app-shell #app .billing-flat .bf-table-wrap{border:1px solid #e7edf7;border-radius:9px;overflow:auto;max-height:none}
.app-shell #app .billing-flat .bf-table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:13px}
.app-shell #app .billing-flat .bf-table th{padding:15px 17px!important;background:#f6f8fd;color:#94a4bc;font-size:12px;font-weight:500;line-height:1.8;border-bottom:1px solid #e7edf7;white-space:normal;overflow-wrap:anywhere}
.app-shell #app .billing-flat .bf-table td{padding:23px 17px!important;color:#758ca9;font-size:13px;line-height:1.9;border-bottom:1px solid #edf1f7;white-space:normal;overflow-wrap:anywhere}
.app-shell #app .billing-flat .bf-table tr:last-child td{border-bottom:0}
.app-shell #app .billing-flat .bf-table tbody tr:hover td{background:#fafbff}
.app-shell #app .billing-flat .bf-table th:first-child{width:25%}
.app-shell #app .billing-flat .bf-table th:last-child{width:18%}
.app-shell #app .billing-flat .bf-table .button{min-height:34px!important;padding:6px 11px!important;border-color:#e4eafb;background:#f8faff!important;color:#6b83db!important;font-size:13px!important;line-height:20px;box-shadow:none;margin:3px 4px 3px 0}
.app-shell #app .billing-flat .bf-table td[data-label*=金额],.app-shell #app .billing-flat .bf-table td[data-label*=点数],.app-shell #app .billing-flat .bf-table td[data-label*=预留]{font-variant-numeric:tabular-nums;font-weight:500;color:#6480ad}
.app-shell #app .billing-flat .bf-table td[data-label=实际已收]{color:#72a48f}
.app-shell #app .billing-flat .bf-identity{display:flex;align-items:center;gap:12px;min-width:0}
.app-shell #app .billing-flat .bf-identity strong{font-size:14px;font-weight:600;color:#526d92;line-height:1.8;overflow-wrap:anywhere}
.app-shell #app .billing-flat .bf-company-icon{display:grid;place-items:center;width:35px;height:38px;flex:none;border:1px solid #e2e9fe;border-radius:8px;background:#f1f5ff;color:#829ad7}
.app-shell #app .billing-flat .bf-company-icon svg{width:19px;height:19px}
.app-shell #app .billing-flat .bf-status{display:inline-flex;align-items:center;gap:6px;padding:4px 9px;border:1px solid #e8edf5;border-radius:5px;color:#94a3b8;background:#f1f4f8;font-size:11px;line-height:18px;font-weight:500;white-space:normal}
.app-shell #app .billing-flat .bf-status::before{content:"";width:5px;height:5px;flex:none;border-radius:50%;background:currentColor}
.app-shell #app .billing-flat .bf-status.is-green{color:#5ca48d;background:#eef9f4;border-color:#e0f0e8}
.app-shell #app .billing-flat .bf-status.is-blue{color:#7793d0;background:#f0f5ff;border-color:#e2ebfc}
.app-shell #app .billing-flat .bf-status.is-amber{color:#c49a56;background:#fff8eb;border-color:#f8ecd5}
.app-shell #app .billing-flat .bf-status.is-rose{color:#cc8192;background:#fff1f5;border-color:#f5e0e7}
.app-shell #app .billing-flat .bf-pagination{gap:16px;margin:0;padding:20px 0 0;color:#98a8be;font-size:12px;font-variant-numeric:tabular-nums;align-items:center;flex-wrap:wrap}
.app-shell #app .billing-flat .bf-pagination>div{gap:12px}
.app-shell #app .billing-flat .bf-muted{margin:18px 0 0;color:#99a9bf;font-size:12px;line-height:1.95;overflow-wrap:anywhere}
.app-shell #app .billing-flat .bf-panel h2{margin:20px 0;color:#4b6488;font-size:19px;font-weight:600;line-height:1.8;overflow-wrap:anywhere}
.app-shell #app .billing-flat .bf-panel h3{margin:27px 0 16px;color:#7289aa;font-size:15px;font-weight:600}
.app-shell #app .billing-flat .bf-detail-heading{gap:15px;margin:0 0 24px;align-items:center}
.app-shell #app .billing-flat .bf-detail-heading h2{margin:0;font-size:20px}
.app-shell #app .billing-flat .bf-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px 24px;margin:0 0 23px;padding:21px 23px;border:1px solid #e6edf9;border-radius:9px;background:#f8faff;color:#96a7bf}
.app-shell #app .billing-flat .bf-facts span{min-width:0;gap:8px;font-size:12px}
.app-shell #app .billing-flat .bf-facts strong{color:#667fa5;font-size:14px;font-weight:500;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.app-shell #app .billing-flat .bf-actions{gap:9px;margin:20px 0 24px}
.app-shell #app .billing-flat .commercial-account-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:22px 0}
.app-shell #app .billing-flat .commercial-account-stats>div{padding:21px 23px;border:1px solid #e5ecf9;border-radius:9px;background:#f6f9ff;color:#96a8c1;font-size:12px}
.app-shell #app .billing-flat .commercial-account-stats strong{margin-top:9px;color:#6b86c6;font-size:28px;font-weight:600;line-height:1.65;font-variant-numeric:tabular-nums}
.app-shell #app .billing-flat .commercial-account-stats>div:nth-child(2){background:#fffaf1;border-color:#f5ecdc}
.app-shell #app .billing-flat .commercial-account-stats>div:nth-child(2) strong{color:#c3a271}
.app-shell #app .billing-flat .commercial-account-stats>div:nth-child(3){background:#f2faf7;border-color:#e3f0e9}
.app-shell #app .billing-flat .commercial-account-stats>div:nth-child(3) strong{color:#75a896}
.app-shell #app .billing-flat .bf-form{box-sizing:border-box;display:grid;gap:20px;max-width:760px;width:100%;margin:20px 0;padding:24px;border:1px solid #e5ecf8;border-radius:9px;background:#f9fbff}
.app-shell #app .billing-flat .bf-form label{color:#8398b6;font-size:13px;font-weight:500;line-height:1.9;gap:8px}
.app-shell #app .billing-flat .bf-form>.bf-check{font-size:12px;line-height:1.8;font-weight:400;align-items:flex-start}
.app-shell #app .billing-flat .bf-form input[readonly]{background:#f1f5fb;color:#9babc2}
.app-shell #app .billing-flat .commercial-dialog-backdrop{padding:24px;background:#162e4e55;backdrop-filter:blur(4px)}
.app-shell #app .billing-flat .commercial-dialog{display:flex;flex-direction:column;width:min(760px,100%);max-height:calc(100dvh - 48px);border:1px solid #e1e8f5;border-radius:13px;background:#fff;box-shadow:0 28px 100px #18325730;overflow:hidden}
.app-shell #app .billing-flat .commercial-dialog-header{padding:22px 26px;flex:none;border-color:#e9eef7;gap:18px}
.app-shell #app .billing-flat .commercial-dialog-header span{color:#96a6bf;font-size:12px;font-weight:400}
.app-shell #app .billing-flat .commercial-dialog-header h2{margin:6px 0 0;color:#3c557b;font-size:21px;font-weight:600;line-height:1.65}
.app-shell #app .billing-flat .commercial-dialog-x{width:32px;height:32px;flex:none;border:1px solid #e8edf6;border-radius:7px;background:#f7f9fd;color:#9cadc4;font-size:21px}
.app-shell #app .billing-flat .commercial-dialog-form{margin:0;padding:24px 26px;gap:21px 23px;overflow:auto;min-height:0;overscroll-behavior:contain}
.app-shell #app .billing-flat .commercial-field{min-width:0;gap:8px;color:#8398b6;font-size:13px;font-weight:500}
.app-shell #app .billing-flat .commercial-field textarea{min-height:100px;resize:vertical}
.app-shell #app .billing-flat .commercial-form-hint{margin:0;color:#9aabc2;font-size:12px;line-height:1.9}
.app-shell #app .billing-flat .commercial-dialog-actions{margin:0;padding-top:20px;border-top:1px solid #e9eef7;gap:10px;align-items:center}
.app-shell #app .billing-flat .commercial-dialog-message{padding:0 26px 18px;color:#c49a56;font-size:13px;line-height:1.9}
.app-shell #app .billing-flat .commercial-history-filter{gap:12px;margin:18px 0;min-width:0}
.app-shell #app .billing-flat .commercial-history-filter label{color:#8b9fba;font-size:12px;gap:8px;min-width:0}
.app-shell #app .billing-flat .commercial-account-record{border:0;border-bottom:1px solid #eaf0f7;padding:20px 0;box-shadow:none;color:#8197b4}
.app-shell #app .billing-flat .commercial-account-record h4{margin:0 0 9px;color:#607b9f;font-size:14px;font-weight:600}
.app-shell #app .billing-flat .ic-composer-select{width:100%;min-width:0;max-width:100%;font-weight:400}
.app-shell #app .billing-flat .ic-composer-trigger{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:42px;padding:10px 13px;border:1px solid #dfe7f5;border-radius:7px;color:#7087aa;background:#fff;font-family:inherit;font-size:13px;line-height:20px;box-shadow:none;text-align:left;cursor:pointer}
.app-shell #app .billing-flat .ic-composer-trigger[aria-invalid=true]{border-color:#d48595}
.app-shell #app .billing-flat .ic-composer-trigger:disabled{opacity:.5;cursor:not-allowed;background:#f7f9fd}
.app-shell #app .billing-flat .ic-composer-trigger svg{width:14px;color:#9cadd1}
.app-shell #app .billing-flat .ic-composer-popover{border:1px solid #dfe7f8;border-radius:10px;padding:8px;background:#fff;box-shadow:0 15px 45px #183b7020;max-width:calc(100vw - 24px)}
.app-shell #app .billing-flat [role=option]{min-height:38px;padding:9px 12px;border-radius:6px;color:#7c91b1;font-size:13px;line-height:20px;white-space:normal;overflow-wrap:anywhere}
.app-shell #app .billing-flat [role=option] strong{font-size:13px;font-weight:500;line-height:1.8}
.app-shell #app .billing-flat [role=option][aria-selected=true]{color:#5874e5;background:#f1f5ff}
.app-shell #app .billing-flat .ic-composer-option-icon{width:25px;height:29px;font-size:15px;border-radius:5px}
.app-shell #app .billing-flat .bf-select-error{display:block;margin-top:6px;color:#cc8192;font-size:12px;font-weight:400}
.app-shell #app .billing-flat select[hidden]{display:none!important}
@media(max-width:1250px){.app-shell #app .billing-flat .bf-company-icon{display:none}.app-shell #app .billing-flat .bf-toolbar>form{width:100%}.app-shell #app .billing-flat .bf-toolbar input[type=search]{width:280px}}
@media(max-width:1100px){
 .app-shell #app .billing-flat .bf-table,.app-shell #app .billing-flat .bf-table tbody{display:block}
 .app-shell #app .billing-flat .bf-table thead{display:none}
 .app-shell #app .billing-flat .bf-table tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:11px 20px;padding:22px 18px;border-bottom:1px solid #eaf0f8}
 .app-shell #app .billing-flat .bf-table td{display:block;padding:0!important;border:0!important;min-width:0;grid-column:1;grid-row:auto}
 .app-shell #app .billing-flat .bf-table td:first-child{grid-column:1;grid-row:1;font-weight:600}
 .app-shell #app .billing-flat .bf-table td:last-child:not([colspan]){grid-column:2;grid-row:1 / span 3;max-width:180px}
 .app-shell #app .billing-flat .bf-table td[data-label]:not(:first-child):not(:last-child)::before{content:attr(data-label)'：';display:inline;font-size:12px;color:#a0aec2;font-weight:400;margin:0}
 .app-shell #app .billing-flat .bf-table td[colspan]{grid-column:1 / -1}
 .app-shell #app .billing-flat .bf-facts{grid-template-columns:repeat(2,minmax(0,1fr))}
 .app-shell #app .billing-flat .commercial-account-stats strong{font-size:24px}
}
@media(max-width:760px){
 .app-shell:has(.billing-flat) .page-container{padding:22px 16px 40px}
 .app-shell #app .billing-flat .page-heading{align-items:flex-start;flex-direction:column;gap:18px}
 .app-shell #app .billing-flat .page-heading h1{font-size:26px!important}
 .app-shell #app .billing-flat .page-heading p:not(.eyebrow){font-size:13px}
 .app-shell #app .billing-flat .bf-panel{padding:18px 16px}
 .app-shell #app .billing-flat .bf-tabs{gap:4px;margin-bottom:21px}
 .app-shell #app .billing-flat .bf-tabs button{padding:8px 11px!important;font-size:13px!important}
 .app-shell #app .billing-flat .bf-toolbar>form{gap:10px}
 .app-shell #app .billing-flat .bf-toolbar input[type=search]{width:100%;flex:1 1 100%}
 .app-shell #app .billing-flat .bf-toolbar .ic-composer-select{width:auto;flex:1 1 140px}
 .app-shell #app .billing-flat .bf-toolbar .button{flex:none}
 .app-shell #app .billing-flat .bf-table tr{grid-template-columns:minmax(0,1fr);gap:10px;padding:20px 15px}
 .app-shell #app .billing-flat .bf-table td:last-child:not([colspan]){grid-column:1;grid-row:auto;max-width:none;margin-top:5px}
 .app-shell #app .billing-flat .bf-pagination{align-items:flex-start;flex-direction:column;gap:14px}
 .app-shell #app .billing-flat .bf-pagination>div{width:100%;justify-content:space-between;gap:8px}
 .app-shell #app .billing-flat .bf-detail-heading h2{flex-basis:100%;font-size:18px}
 .app-shell #app .billing-flat .bf-facts{grid-template-columns:minmax(0,1fr);padding:18px;gap:20px}
 .app-shell #app .billing-flat .commercial-account-stats{grid-template-columns:minmax(0,1fr);gap:12px}
 .app-shell #app .billing-flat .bf-form{padding:18px;gap:18px}
 .app-shell #app .billing-flat .commercial-dialog-backdrop{padding:12px}
 .app-shell #app .billing-flat .commercial-dialog{width:100%;max-height:calc(100dvh - 24px)}
 .app-shell #app .billing-flat .commercial-dialog-header{padding:20px 18px}
 .app-shell #app .billing-flat .commercial-dialog-form{grid-template-columns:minmax(0,1fr);padding:20px 18px}
 .app-shell #app .billing-flat .commercial-dialog-header h2{font-size:19px}
 .app-shell #app .billing-flat .commercial-dialog-message{padding:0 18px 16px}
 .app-shell #app .billing-flat .commercial-history-filter{grid-template-columns:minmax(0,1fr)}
}
