.statistics-page{padding:18px 20px 24px;background:#fff;min-width:0}
.cash-purchase-lines [data-cp-product] .store-combobox>input{width:100%;padding-right:30px}
.cost-warning{padding:12px 16px;margin-bottom:12px;background:#fff6de;border:1px solid #e6ca7e;border-radius:8px;color:#795a1c;font-size:13px}
.cost-warning.complete{background:#edf8f3;border-color:#b7ddca;color:#26654b}
.cost-warning>button{margin-left:12px}.cost-warning details{margin-top:9px}.cost-warning summary{cursor:pointer}
.cost-missing-list{max-height:220px;overflow:auto;margin-top:8px}.cost-missing-list>div{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:5px 0;border-top:1px solid #ecdcb2}.cost-missing-list button{flex:none}
.cost-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:end;margin:12px 0}.cost-toolbar>label:not(.cost-check){display:flex;flex-direction:column;gap:5px;font-size:12px;color:#536780}
.cost-check{display:flex;align-items:center;gap:6px;min-height:36px;font-size:13px}.cost-check input,.cost-filter-tag input{width:16px!important;height:16px!important;min-height:0;min-width:0;margin:0}
.cost-filter-tabs{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:13px;max-height:140px;overflow:auto;padding:3px}.cost-filter-tag{display:flex;align-items:center;gap:5px}.cost-filter-tag button.active{background:#e5f0ff;border-color:#7ea8e2;color:#1a5fa8}
.cost-summary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:12px;margin:14px 0}.cost-summary{display:flex;flex-direction:column;gap:6px;border:1px solid #dce6f2;border-radius:9px;background:#f8faff;padding:14px}.cost-summary b{font-size:23px;color:#253e60}.cost-summary>span{font-size:13px;color:#586d85}.cost-summary small{font-size:11px;line-height:1.6;color:#74869c}
.cost-legend{display:flex;gap:10px 16px;flex-wrap:wrap;font-size:12px;color:#52647e}.cost-legend span{display:inline-flex;align-items:center;gap:5px}.cost-legend i{width:12px;height:12px;border-radius:2px;display:inline-block}
.cost-chart-scroll{overflow:auto;max-width:100%;background:#fff;border-radius:6px}.cost-chart-scroll svg{display:block;height:420px;max-width:none}
.cost-caption{font-size:12px;color:#71839a;line-height:1.7;margin:10px 0}.cost-detail{margin:12px 0;border:1px solid #e0e7f0;border-radius:8px;background:#fff}.cost-detail>summary{cursor:pointer;padding:12px;font-weight:600;color:#435d7a}.cost-detail>.statistics-table-scroll{max-height:430px;border-top:1px solid #e0e7f0}.cost-detail th{position:sticky;top:0;background:#f1f5fc;z-index:1;white-space:nowrap}.cost-detail td{white-space:nowrap}.cost-detail-table{min-width:1550px}.cost-detail-table td:nth-child(n+3){text-align:right}
.cost-config-help{grid-column:1/-1;line-height:1.6;color:#71839a}
.modal.editor.cost-stocktake-editor{width:min(1700px,96vw);max-width:none;height:93vh;max-height:93vh}
.modal.editor.cost-stocktake-editor .modal-body{display:flex;flex:1;min-height:0;overflow:hidden;padding:12px 18px}
.cost-stocktake-form,.cost-stocktake-fields{display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;width:100%;gap:10px;margin:0;padding:0;border:0}
.cost-stocktake-meta{display:grid;grid-template-columns:minmax(250px,1fr) minmax(160px,.6fr) minmax(220px,1fr);gap:12px;flex:none}
.cost-entry-form>label,.cost-entry-form>div>label{display:block;min-width:0;font-size:13px;color:#536b84}.cost-entry-form>label>input,.cost-entry-form>label>select{margin-top:6px}.cost-entry-form>label:has([name=note]),.cost-entry-form>small{grid-column:1/-1}.cost-entry-form>small{color:#71839a;line-height:1.7}.cost-entry-form .store-combobox{width:100%}
.cost-stocktake-meta label,.cost-stocktake-meta>div>label{display:block;font-size:13px;color:#536b84;margin-bottom:5px}
.cost-stocktake-meta input,.cost-stocktake-meta .store-combobox{width:100%}
.cost-stocktake-detail{display:flex;flex:1;flex-direction:column;min-height:0;gap:8px}
.cost-stocktake-detail[hidden],[data-stocktake-legacy][hidden]{display:none}
.cost-stocktake-help{flex:none;margin:0;color:#71839a;line-height:1.6;font-size:12px}
.cost-stocktake-scroll{flex:1;min-height:120px;overflow:auto;border:1px solid #dbe5f0;border-radius:6px}
.cost-stocktake-table{min-width:1230px;width:100%;table-layout:fixed}
.cost-stocktake-table th{position:sticky;top:0;z-index:2;background:#eef5fd;white-space:nowrap}
.cost-stocktake-table th:nth-child(1){width:55px}.cost-stocktake-table th:nth-child(2){width:310px}.cost-stocktake-table th:nth-child(3){width:115px}.cost-stocktake-table th:nth-child(4){width:90px}.cost-stocktake-table th:nth-child(5),.cost-stocktake-table th:nth-child(6){width:130px}.cost-stocktake-table th:nth-child(7){width:110px}.cost-stocktake-table th:nth-child(8){width:160px}.cost-stocktake-table th:nth-child(9){width:70px}
.cost-stocktake-table td{vertical-align:top;overflow-wrap:anywhere}.cost-stocktake-table input,.cost-stocktake-table select{width:100%;min-width:0;padding:8px}.cost-stocktake-table .store-combobox{width:100%}.cost-stocktake-table .store-combobox>input{padding-right:30px}.cost-stocktake-table small{display:block;color:#71839a;font-size:11px;margin-top:4px}.cost-stocktake-table [data-stocktake-price-help]{color:#b46215}
.cost-stocktake-footer{display:flex;flex:none;align-items:center;gap:14px;flex-wrap:wrap;padding:8px;background:#f3f8ff;border:1px solid #dbe5f0;border-radius:6px}.cost-stocktake-footer strong{margin-left:auto;color:#143d70}.cost-stocktake-error{flex:none;min-height:16px;color:#c13d39;margin:0;font-size:13px}
[data-stocktake-legacy]>label{display:block;max-width:350px;margin:12px 0}[data-stocktake-legacy] input{width:100%}
@media(max-width:800px){.cost-stocktake-meta{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.cost-stocktake-meta>label:last-child{grid-column:1/-1}.modal.editor.cost-stocktake-editor .modal-body{padding:10px}.cost-stocktake-footer strong{margin-left:0}.cost-stocktake-help{font-size:11px}}
@media(max-width:800px){.cost-summary-grid{grid-template-columns:1fr}.cost-toolbar{align-items:stretch}.cost-warning>button{margin:8px 0 0}.cost-missing-list>div{align-items:start}.cost-summary b{font-size:20px}}
.statistics-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.statistics-heading h2{margin:0 0 4px;color:#253b58;font-size:22px}
.statistics-heading p{margin:0;color:#75869d;font-size:12px}
.statistics-tabs{margin-bottom:14px}
.statistics-filters{display:flex;align-items:end;flex-wrap:wrap;gap:10px;margin:12px 0;padding:12px;background:#f4f7fb;border:1px solid #e0e8f2;border-radius:8px}
.statistics-filters label{display:flex;flex-direction:column;align-items:stretch;gap:5px;min-width:130px;color:#536780;font-size:12px}
.statistics-filters label select,.statistics-filters label input{min-width:125px;padding:7px 9px;font-size:12px}
.statistics-store-picker,.statistics-product-picker{display:flex;flex:1 1 210px;flex-direction:column;gap:5px;min-width:190px;color:#536780;font-size:12px}
.statistics-store-picker{position:relative;gap:0}
#statistics-store-picker .store-picker-field{display:flex;flex-direction:column;align-items:stretch;gap:5px}
#statistics-store-picker .store-picker-field>label{min-width:0}
#statistics-store-picker .store-combobox input,.statistics-product-picker .store-combobox input{box-sizing:border-box;width:100%;padding:7px 30px 7px 9px;font-size:12px}
#statistics-store-picker .store-picker-selection{position:absolute;top:100%;left:0;right:0;z-index:10;margin-top:3px}
.statistics-product-picker>label{color:#536780}
.statistics-product-picker #statistics-product-picker .store-combobox{width:100%}
.statistics-product-picker .store-options{z-index:30}
.statistics-product-picker .tall-picker-options{position:fixed;right:auto;z-index:10000}
.statistics-filters button{white-space:nowrap}
.statistics-table-scroll{max-width:100%;overflow:auto}
.revenue-entry-table{min-width:600px}
.revenue-entry-table th,.revenue-entry-table td{padding:10px 12px}
.revenue-entry-table td:first-child small{display:block;font-size:11px}
.revenue-entry-table input{width:100%;min-width:145px}
.revenue-entry-table .revenue-effective{font-weight:650;color:#126dc5;white-space:nowrap}
.revenue-entry-table tfoot th{background:#edf5ff;color:#263f62;text-align:right}
.revenue-entry-table tfoot th:first-child{text-align:left}
.revenue-entry-table .revenue-group-disabled .revenue-group-head th{background:#f3f5f8;color:#7a8699}
.revenue-entry-table .revenue-group-off td{color:#7a8699}
.revenue-entry-table .revenue-group-off input:disabled{background:#f3f5f8;color:#7a8699;cursor:not-allowed}
.statistics-note{display:flex;align-items:center;gap:9px;max-width:700px;margin:13px 0;color:#536780;font-size:12px}
.statistics-note input{flex:1}
.statistics-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:12px 0}
.statistics-actions small{font-size:11px}
.revenue-import-notice{margin:8px 0;padding:9px 12px;border-left:3px solid #25956f;background:#effaf6;color:#256b57;font-size:12px}
.revenue-capture-drop{margin:12px 0;padding:18px;text-align:center;border:1px dashed #9eb5d0;border-radius:8px;background:#f5f9fe;color:#36516f;cursor:pointer;line-height:1.8}
.revenue-capture-drop small{color:#7b8da3}
.revenue-capture-drop img{display:block;max-width:100%;max-height:250px;margin:10px auto;border-radius:5px}
.revenue-capture-text{display:block;color:#536780;font-size:12px}
.revenue-capture-text textarea{display:block;box-sizing:border-box;width:100%;min-height:110px;margin-top:6px;padding:9px;border:1px solid #d5dfec;border-radius:6px;font:inherit}
.revenue-review-fields{display:flex;flex-wrap:wrap;gap:12px;margin:0 0 13px}
.revenue-review-fields label{display:flex;flex:1 1 180px;flex-direction:column;gap:5px;color:#536780;font-size:12px}
.revenue-review-fields input,.revenue-review-fields select{min-width:0;padding:8px 9px}
.revenue-review-table{min-width:650px}
.revenue-review-table th,.revenue-review-table td{padding:8px}
.revenue-review-table select,.revenue-review-table input{width:100%;min-width:105px;padding:7px}
.revenue-import-warnings{margin-bottom:13px;padding:10px 13px;border:1px solid #f0d7a8;border-radius:7px;background:#fff9eb;color:#795724;font-size:12px}
.revenue-import-warnings ul{margin:5px 0 0;padding-left:20px}
.revenue-import-raw{margin:12px 0;color:#526982;font-size:12px}
.revenue-import-raw pre{max-height:180px;overflow:auto}
.revenue-import-footnote{margin:11px 0 0;color:#78899e;font-size:11px}
.statistics-type-row{display:flex;align-items:center;justify-content:space-between;padding:8px 0;border-bottom:1px solid #e6edf5}
.statistics-result{padding:12px;border:1px solid #e3eaf3;border-radius:8px;background:#fff;min-height:200px}
.statistics-chart-wrap{width:100%;overflow:auto}
.statistics-chart{display:block;width:100%;min-width:640px;height:auto;max-height:520px}
.statistics-chart-empty{min-height:190px;display:grid;place-items:center;color:#8291a5;background:#f8fafc;border-radius:6px}
.statistics-ai-insight{padding:10px 12px;background:#f0f7ff;border-left:3px solid #438cf2;border-radius:3px;color:#405b7a;font-size:13px}
.dashboard-revenue-section{margin:15px 0;padding:14px;border:1px solid #dce6f1;border-radius:8px;background:#fbfdff}
.dashboard-revenue-heading{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.dashboard-revenue-heading>div{margin-right:auto}
.dashboard-revenue-heading h2{margin:0 0 4px;color:#253b58;font-size:17px}
.dashboard-revenue-heading p{margin:0;color:#74859a;font-size:11px}
.dashboard-revenue-heading label{display:flex;align-items:center;gap:7px;font-size:11px}
.dashboard-revenue-heading input{padding:6px 8px;font-size:11px}
.dashboard-revenue-scroll{max-height:430px;overflow:auto}
.dashboard-revenue-table{min-width:760px}
.dashboard-revenue-table th,.dashboard-revenue-table td{padding:8px 10px;white-space:nowrap}
.dashboard-revenue-table tfoot{position:sticky;bottom:0;background:#f0f6ff}
.dashboard-half-share{color:#9a6420;font-weight:650}
.dashboard-revenue-missing{color:#9aa7b6}
@media(max-width:900px){.statistics-page{padding:13px 10px}.statistics-filters{align-items:stretch}.statistics-filters label{flex:1 1 150px}.statistics-store-picker,.statistics-product-picker{flex:1 1 220px}.statistics-store-picker{gap:5px}#statistics-store-picker .store-picker-selection{position:static;margin-top:0}}
@media(max-width:700px){.dashboard-revenue-heading{align-items:flex-start;flex-wrap:wrap}.dashboard-revenue-heading>div{flex-basis:100%}.dashboard-revenue-heading label{flex:1}.dashboard-revenue-heading input{max-width:150px}}
.settlement-summary{display:flex;flex-wrap:wrap;gap:20px;margin-top:20px;padding:16px;background:#f4f8fd;border:1px solid #dce6f2;border-radius:8px}.settlement-summary span{display:flex;flex-direction:column;gap:6px;min-width:160px}.settlement-summary strong{font-size:20px;color:#1677ff}.settlement-summary small,.settlement-hint{color:#667b95;font-size:12px}.cash-purchase-form{display:block;overflow:auto;max-height:calc(100vh - 210px);padding:4px}.cash-purchase-lines{min-width:740px}.cash-purchase-lines td:first-child{min-width:230px}.cash-purchase-lines input[type=number]{width:110px}.cash-purchase-lines input[data-cp-item=unit]{width:70px}.cash-purchase-temporary{display:flex;align-items:center;gap:5px;font-size:12px;margin:5px 0}.cash-purchase-temporary input{width:auto}.cash-purchase-lines input[data-cp-item=name]{width:100%}
.modal.editor.cash-purchase-editor{width:min(1100px,94vw)}.cash-purchase-form{flex:1;min-width:0;width:100%}.cash-purchase-lines{width:100%}.cash-purchase-lines .store-combobox{width:100%}
.cost-stocktake-meta{grid-template-columns:minmax(220px,1fr) minmax(140px,160px) minmax(200px,360px) auto}
.cost-stocktake-ai{display:flex;align-items:flex-end}
.cost-stocktake-ai button{min-height:34px}
.cost-stocktake-ai-panel{display:flex;flex-direction:column;gap:10px;border:1px dashed #c7d6e4;border-radius:8px;padding:12px;background:#f7fafc}
.cost-stocktake-ai-panel[hidden]{display:none}
.cost-stocktake-ai-drop{margin:0;border:2px dashed #a6c5e5;border-radius:10px;background:#f0f7ff;padding:16px;text-align:center;color:#216ebd;cursor:pointer;line-height:1.9}
.cost-stocktake-ai-drop img{display:block;margin:8px auto;max-height:140px;max-width:100%}
.cost-stocktake-ai-text{display:flex;flex-direction:column;gap:6px;font-size:13px;color:#526174}
.cost-stocktake-ai-text textarea{width:100%;resize:vertical}
.cost-stocktake-ai-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.cost-stocktake-ai-warning{color:#a56619}
@media(max-width:900px){.cost-stocktake-meta{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.cost-stocktake-ai{grid-column:2;justify-content:flex-end}}
.cost-stocktake-meta{align-items:end}
.cost-stocktake-ai{align-self:end;margin-bottom:5px}
.cost-stocktake-ai button{height:38px;padding:0 16px}
.cost-stocktake-meta>div{margin-bottom:5px}
.cost-stocktake-ai button{height:40px}
.cost-method{margin:14px 0 4px;border:1px solid #dbe4ed;border-radius:8px;background:#f8fbfe;padding:0 12px}
.cost-method summary{cursor:pointer;padding:10px 0;font-weight:600;color:#245d75}
.cost-method-body{padding:0 0 10px;color:#526174;font-size:13px;line-height:1.7}
.cost-method-body p{margin:6px 0}
.revenue-list-summary{display:flex;align-items:baseline;gap:16px;margin-left:auto;white-space:nowrap;color:#52647e;font-size:12px}.revenue-list-summary strong{font-size:16px;color:#1d63b8;margin-left:4px}
.statistics-filters label.revenue-list-date{flex-direction:row;align-items:center;gap:6px}.revenue-list-summary{font-size:14px;gap:20px}.revenue-list-summary strong{font-size:20px}

.modal.editor.cash-purchase-ai-modal{width:min(760px,94vw);height:auto;max-height:90vh;min-height:0}.modal.editor.cash-purchase-ai-modal .modal-body{display:block;flex:0 1 auto;min-height:0;overflow:auto}
.cash-purchase-ai{display:flex;flex-direction:column;gap:12px;min-width:0}
.cash-purchase-ai-drop{margin:0;padding:18px;text-align:center;border:1px dashed #9eb5d0;border-radius:8px;background:#f5f9fe;color:#36516f;cursor:pointer;line-height:1.8}
.cash-purchase-ai-drop small{color:#7b8da3}
.cash-purchase-ai-drop img{display:block;max-width:100%;max-height:220px;margin:10px auto;border-radius:5px}
.cash-purchase-ai-text{display:flex;flex-direction:column;gap:6px;width:100%;font-size:12px;text-align:left}.cash-purchase-ai-text>span{display:block;text-align:left}.cash-purchase-ai-text textarea{width:100%;min-height:110px;resize:vertical}
.cash-purchase-ai-hint{margin:0;color:#7b8da3;font-size:11px;line-height:1.7}
.cash-purchase-ai-warning{background:#fff8e8;border:1px solid #ecd3a2;border-radius:8px;padding:10px 12px;color:#8a5a12;font-size:12px;line-height:1.7;max-height:180px;overflow:auto}
.cash-purchase-ai-warning ul{margin:5px 0 0;padding-left:18px}
.cash-purchase-ai-warning-text{color:#b45309;font-size:12px;line-height:1.7}

.modal.channel-settings-modal{width:max-content;max-width:min(920px,94vw);height:auto;max-height:90vh;min-height:0}
.modal.channel-settings-modal .modal-title{padding:16px 20px}
.modal.channel-settings-modal .modal-body{display:block;flex:0 1 auto;min-height:0;overflow:auto;padding:16px 20px}
.modal.channel-settings-modal .channel-panel{width:max-content;max-width:100%}
.modal.channel-settings-modal .statistics-filters{width:auto;margin:0 0 10px}
.modal.channel-settings-modal .statistics-table-scroll{width:max-content;max-width:100%}
.modal.channel-settings-modal table.data-table{width:auto;min-width:520px}
.modal.channel-settings-modal .statistics-note{white-space:normal;max-width:560px}
.modal.channel-settings-modal .modal-actions{padding:12px 20px}

.revenue-change-up{color:#c0392b;font-weight:600}
.revenue-change-down{color:#1e7d32;font-weight:600}
.revenue-change-flat{color:#7b8796}

.revenue-change-cell{white-space:nowrap}


.report-filters{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px}
.report-filter-leading{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px;flex:0 1 auto;min-width:0}
.report-filter-leading>label{flex:0 1 auto}
.report-filter-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-left:auto}
.report-filters>span{flex:0 1 auto;white-space:normal}
@media(max-width:900px){.report-filters{align-items:stretch}.report-filter-leading{flex:1 1 100%}.report-filter-leading>label{flex:1 1 150px}.report-filter-actions{flex:1 1 100%}.report-filters>span{flex:1 1 100%}}


.report-filter-leading>label{flex-direction:row;align-items:center;gap:7px;min-width:0;white-space:nowrap}
.report-filter-leading>label select,.report-filter-leading>label input{min-width:112px;font-size:14px}
.report-filter-summary{flex:0 1 auto;white-space:nowrap;color:#536780;font-size:18px;line-height:1.4}
@media(max-width:900px){.report-filter-leading>label{white-space:normal}.report-filter-summary{white-space:normal}}
@media(max-width:900px){
 .statistics-page{padding:0 0 8px}
 .statistics-heading{flex-direction:column;align-items:flex-start;gap:8px;margin-bottom:10px}
 .statistics-heading h2{font-size:20px}
 .statistics-tabs{overflow-x:auto;white-space:nowrap;-webkit-overflow-scrolling:touch}
 .statistics-filters{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px;margin:8px 0}
 .statistics-filters label{min-width:0}
 .statistics-filters label select,.statistics-filters label input{min-width:0;width:100%;font-size:16px;min-height:40px}
 .statistics-store-picker,.statistics-product-picker{grid-column:1/-1;min-width:0}
 .statistics-filters button{min-height:38px}
 .statistics-table-scroll{max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch}
 .statistics-note{flex-direction:column;align-items:stretch;max-width:none}
 .statistics-actions{gap:8px}
 .statistics-actions button{min-height:40px;flex:1 1 auto}
}
/* 现金采购逐项目途 */
.cash-purchase-lines{min-width:860px}
.cash-purchase-lines select[data-cp-item="usage"]{width:110px;padding:5px;border:1px solid #9cc4e8;border-radius:5px;background:#f7fbff;font:inherit;font-size:10px;color:#2466a7;font-weight:600}
