.main-content:has(>#tab-department-spend:not([hidden])){max-width:none;width:100%}
.main-content:has(>#tab-department-spend:not([hidden]))>header{margin-bottom:14px}
.main-content:has(>#tab-department-spend:not([hidden]))>header h1{font-size:24px;margin:0}
.ds-page{display:grid;gap:14px;color:#26374d;font-size:13px;width:100%}.ds-page *{box-sizing:border-box}
.ds-panel{min-width:0;background:#fff;border:1px solid #dde5ef;border-radius:10px;padding:14px 16px}
.ds-muted{color:#63758b;font-size:12px;line-height:1.5}
.ds-page button{font-size:12px;min-height:32px;padding:6px 11px;white-space:nowrap}
.ds-toolbar{width:100%;max-width:1240px}
.ds-filters{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;margin:0}
.ds-filters label{display:grid;gap:6px;margin:0;min-width:0;flex:0 0 180px;color:#52647a;font-size:12px}
.ds-filters label:has([name=partner]){flex-basis:220px}
.ds-filters>button[type=submit]{flex:none;margin:0;min-height:34px;padding:7px 17px}
.ds-filters label:has([name=from]),.ds-filters label:has([name=to]){flex:0 0 143px;min-width:0}
.ds-filters input,.ds-filters select{height:34px;width:100%;margin:0;border:1px solid #cfd9e5;border-radius:6px;padding:0 9px;background:#fff;color:#293e58;font-family:inherit;font-size:13px}
.ds-filters input:focus,.ds-filters select:focus{outline:2px solid #a8c2f5;outline-offset:1px}
.ds-date-separator{padding-bottom:9px;color:#6f8094}
.ds-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin-left:6px}

.ds-toolbar-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;flex-wrap:wrap}
.ds-presets{display:flex;gap:3px;flex-wrap:wrap}.ds-presets button{padding:3px 11px;min-height:27px;border-radius:5px;background:transparent;border-color:transparent;color:#556b85}
.ds-presets button.is-current{background:#edf3ff;color:#235cc0;border-color:#d8e5fa;font-weight:600}
.ds-sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.ds-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1.15fr)) repeat(4,minmax(0,1fr));background:#fff;border:1px solid #dde5ef;border-radius:10px;overflow:hidden}
.ds-stat{padding:13px 16px;min-width:0;border-right:1px solid #e6ecf3}.ds-stat:last-child{border-right:0}
.ds-stat h3{font-size:13px;color:#52647a;font-weight:500;margin:0 0 7px}.ds-stat strong{display:block;font-size:21px;font-weight:650;line-height:1.25;font-variant-numeric:tabular-nums;white-space:nowrap;letter-spacing:-.35px;color:#314c70}
.ds-stat.recharge{background:#fafbfe}.ds-stat.balance{background:#f6f9ff}.ds-stat.balance strong{color:#345b9a}.ds-period{font-size:10px;color:#8091a8;margin-left:3px;white-space:nowrap}.ds-stat.merchant{background:#f5f8ff}.ds-stat.ads{background:#f1f9f6}
.ds-stat.merchant strong{color:#2458ad;font-size:25px}.ds-stat.ads strong{color:#147e70;font-size:25px}.ds-stat.unconnected strong{font-size:16px;font-weight:500;color:#78879b;line-height:1.65;letter-spacing:0}
.ds-notice{border:1px solid #efddb6;background:#fffaf0;padding:9px 12px;color:#835e20;border-radius:7px;font-size:12px;line-height:1.6}
.ds-error{color:#a73243;background:#fff1f2;padding:9px 12px;border-radius:6px;line-height:1.5;margin-top:9px}.ds-error:empty{display:none}
.ds-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.ds-panel-head h3{margin:0;font-size:14px;color:#26374d}
.ds-count{font-size:12px;font-weight:400;color:#6a7d93;margin-left:8px}.ds-details{padding:0;overflow:hidden}.ds-details>.ds-panel-head{padding:13px 16px 11px;margin:0}
.ds-table-wrap{overflow:auto;max-height:520px;scrollbar-width:thin;border-top:1px solid #e0e7f0}.ds-table-wrap:focus-visible{outline:2px solid #8aaee8;outline-offset:-2px}
.ds-page .ds-table{width:100%;min-width:1000px;border-collapse:separate;border-spacing:0;table-layout:fixed;white-space:nowrap;font-size:13px;color:#334861}
.ds-page .ds-table th,.ds-page .ds-table td{padding:9px 14px;text-align:right;line-height:1.45;border:0;border-bottom:1px solid #e8edf4;font-variant-numeric:tabular-nums;vertical-align:middle;overflow:hidden;text-overflow:ellipsis}
.ds-page .ds-table thead th{position:sticky;top:0;z-index:2;background:#f0f4f9;color:#4d617a;font-weight:600;font-size:12px;height:38px;box-shadow:0 1px 0 #dce4ef}
.ds-page .ds-table th:first-child{width:16%;text-align:left}.ds-page .ds-table th:nth-child(n+2):nth-child(-n+5){width:13%}.ds-page .ds-table th:nth-child(6){width:9%}.ds-page .ds-table th:nth-child(7){width:6%}.ds-page .ds-table th:nth-child(8){width:9%}.ds-page .ds-table th:nth-child(9){width:8%}
.ds-page .ds-table tbody th{font-size:13px;color:#263b56;font-weight:600}.ds-page .ds-table tbody td{font-size:14px}
.ds-page .ds-table tbody tr:nth-child(even){background:#f7f9fc}.ds-page .ds-table tbody tr:hover{background:#ecf3fc}.ds-page .ds-table .ds-balance{color:#345b9a}.ds-page .ds-table .ds-merchant{color:#2458ad;font-weight:600}.ds-page .ds-table .ds-ad{color:#137f70;font-weight:600;background:#eaf7f141}.ds-page .ds-table .ds-unavailable{color:#7e8c9f;font-weight:400}
.ds-page .ds-table tfoot th,.ds-page .ds-table tfoot td{position:sticky;bottom:0;z-index:1;background:#edf3fc;font-weight:700;border-top:1px solid #cfdded;border-bottom:0;padding-top:11px;padding-bottom:11px}

.ds-charts{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:12px}.ds-legend{display:flex;align-items:center;gap:12px;font-size:11px;color:#61758e;flex-wrap:wrap}.ds-legend span:before{content:'';display:inline-block;width:7px;height:7px;border-radius:2px;background:#4a79e5;margin-right:5px}.ds-legend span:last-child:before{background:#25a494}
.ds-chart-scroll{overflow-x:auto;scrollbar-width:thin}.ds-chart{display:block;width:100%;height:174px}.ds-chart text{fill:#62758d;font-family:inherit;font-size:10px}.ds-chart .ds-grid{stroke:#e8edf4;stroke-width:1}.ds-chart .ds-axis{stroke:#ced9e6;stroke-width:1}.ds-chart rect:focus,.ds-chart rect:hover{opacity:.8;outline:2px solid #a7bfe9;outline-offset:2px}
.ds-rank{display:grid;gap:9px;overflow:visible;padding-right:3px}.ds-rank-label{display:flex;justify-content:space-between;gap:10px;font-size:12px;margin-bottom:3px;line-height:1.4}.ds-rank-label span:last-child{color:#63758b;font-size:11px;white-space:nowrap;font-variant-numeric:tabular-nums}
.ds-track{height:4px;background:#eef2f7;border-radius:3px;overflow:hidden;margin-top:3px}.ds-track i{display:block;height:100%;background:#4a79e5;border-radius:3px;min-width:0}.ds-track.ads i{background:#25a494}.ds-track.unknown{background:repeating-linear-gradient(135deg,#e7edf4,#e7edf4 5px,#f9fafc 5px,#f9fafc 10px)}
.ds-empty{padding:22px;text-align:center;color:#74859a;font-size:13px}.ds-loading{padding:40px 20px;text-align:center;color:#61758c}.ds-page [hidden]{display:none!important}
@media(max-width:1200px){.ds-filters label:has([name=city]){flex-basis:144px}.ds-filters label:has([name=partner]){flex-basis:180px}.ds-stat{padding:12px}.ds-stat strong{font-size:18px}.ds-stat.merchant strong,.ds-stat.ads strong{font-size:22px}.ds-filters label{min-width:0}.ds-actions{margin-left:0}.ds-charts{grid-template-columns:1fr 1fr}}
@media(max-width:1500px){.ds-summary{grid-template-columns:repeat(4,minmax(0,1fr))}.ds-stat:nth-child(4n){border-right:0}.ds-stat:nth-child(-n+4){border-bottom:1px solid #e6ecf3}}
@media(max-width:1000px){.ds-charts{grid-template-columns:1fr}.ds-chart{height:174px}}
@media(max-width:680px){.main-content:has(>#tab-department-spend:not([hidden])){padding:16px 12px}.ds-panel{padding:12px}.ds-details{padding:0}.ds-filters label:has([name=from]),.ds-filters label:has([name=to]){flex:1 1 125px}.ds-filters label:has([name=city]),.ds-filters label:has([name=partner]){flex:1 1 40%;min-width:0}.ds-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.ds-stat:nth-child(2n){border-right:0}.ds-stat:nth-child(-n+6){border-bottom:1px solid #e6ecf3}.ds-panel-head{flex-wrap:wrap;gap:5px}.ds-toolbar-bottom{gap:6px}.ds-legend{gap:9px}.ds-table-wrap{max-height:500px}}


/* Approved department table: fixed results, channel columns and period total. */
.ds-readable-wrap{height:auto;max-height:none;overflow-x:auto;overflow-y:hidden;scrollbar-width:auto}
.ds-page .ds-readable{width:1858px;min-width:1858px;table-layout:fixed;border-collapse:separate;border-spacing:0}
.ds-page .ds-readable th,.ds-page .ds-readable td{width:auto!important;padding:11px 12px;overflow:hidden;text-overflow:clip}
.ds-page .ds-readable thead th{text-align:center;font-size:13px;height:34px;line-height:1.4;box-shadow:none}
.ds-page .ds-readable thead tr:first-child th{top:0;background:#f0f4f9;border-bottom:1px solid #dce4ef}
.ds-page .ds-readable thead tr:nth-child(2) th{top:50px;height:34px;font-size:12px;font-weight:500;color:#60718a}
.ds-page .ds-readable tbody th,.ds-page .ds-readable tbody td{height:54px;font-size:14px;font-variant-numeric:tabular-nums}
.ds-page .ds-readable .fixed{position:sticky;z-index:3;background:#fff}
.ds-page .ds-readable tbody tr:nth-child(even) .fixed{background:#f7f9fc}
.ds-page .ds-readable .f-dept{left:0;text-align:left!important}
.ds-page .ds-readable .f-recharge{left:140px}
.ds-page .ds-readable .f-balance{left:255px}
.ds-page .ds-readable .f-fee{left:370px}
.ds-page .ds-readable .f-cost{left:482px}
.ds-page .ds-readable .f-profit{left:594px;box-shadow:3px 0 5px -3px #bac9dc}
.ds-page .ds-readable thead .fixed{z-index:6;background:#edf3fb!important}
.ds-page .ds-readable .channel-start{border-left:1px solid #e1e8f0}
.ds-page .ds-readable .total-fee{color:#2458ad;font-weight:650}
.ds-page .ds-readable .total-cost{color:#9c6622;font-weight:650}
.ds-page .ds-readable .total-profit{color:#137e62;font-weight:700}
.ds-page .ds-readable .channel-profit{color:#137e62}
.ds-page .ds-readable .negative{color:#b1424a}
.ds-page .ds-readable tfoot th,.ds-page .ds-readable tfoot td{height:54px;font-size:14px;background:#eaf1fc;border-top:2px solid #c4d5ee;font-weight:700;z-index:4}
.ds-page .ds-readable tfoot .fixed{background:#eaf1fc;z-index:5}
.ds-page .ds-readable tbody tr:hover td,.ds-page .ds-readable tbody tr:hover th{background:#eef4fc}


.ds-readable .col-department{width:140px}.ds-readable .col-total{width:112px}.ds-readable .col-channel{width:96px}.ds-readable .col-account{width:115px}
.ds-head-actions{display:flex;align-items:center;gap:10px}.ds-page .ds-more{padding:0 9px;min-width:30px;min-height:26px;height:26px;line-height:20px;font-size:18px;color:#61758c;border:1px solid #dce5ef;background:#fff;border-radius:5px}
.ds-action-menu{display:grid;gap:8px;min-width:260px}.ds-action-menu button{text-align:left;padding:11px 14px;border:1px solid #dce5ef;border-radius:6px;background:#fff;color:#334861}.ds-action-menu button:hover{background:#f3f7fd}
.ds-page .ds-readable .cell-pending{color:#7b8797;font-weight:400}
