/* 显示模式切换：仅改变视觉，不重新加载筛选与统计。 */
:root{color-scheme:light}.header-actions{display:flex;align-items:center;gap:15px}.theme-switcher{position:relative}.theme-toggle{display:grid;place-items:center;width:36px;height:36px;padding:8px;border:0;border-radius:9px;background:#eef2ff;color:#3668f5;cursor:pointer}.theme-toggle svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.theme-toggle:hover,.theme-toggle[aria-expanded=true]{background:#e4eaff}.theme-menu{position:absolute;right:0;top:calc(100% + 9px);z-index:1400;width:176px;padding:7px;background:#fff;border:1px solid #e1e7f0;border-radius:12px;box-shadow:0 12px 40px #263a5a26}.theme-menu[hidden]{display:none}.theme-menu button{display:flex;align-items:center;gap:10px;width:100%;padding:11px 12px;border:0;border-radius:7px;background:none;color:#4b5c75;font-size:16.7px;text-align:left;cursor:pointer}.theme-menu button>span{font-size:21.8px;width:20px;text-align:center}.theme-menu button[aria-checked=true]{background:#eef2ff;color:#3668f5}.theme-menu button:hover{background:#f3f6fc}.theme-menu button[aria-checked=true]::after{content:'✓';margin-left:auto}.theme-menu button:focus-visible,.theme-toggle:focus-visible{outline:2px solid #7e9df3;outline-offset:1px}.auth-page header{display:flex;position:absolute;top:0;right:0;background:transparent;border:0;justify-content:flex-end;width:100%;z-index:10}.auth-page header>span,.auth-page #account-bar{display:none}
:root[data-theme=dark]{color-scheme:dark;--hb-sidebar:#1b283d;--hb-sidebar-muted:#b1bed2;--hb-border:#334056;background:#101827;color:#e0e7f2}
:root[data-theme=dark] body,:root[data-theme=dark] main{background:#101827;color:#e0e7f2}
:root[data-theme=dark] header{background:#192336;border-color:#2c384c;color:#9aabc2}
:root[data-theme=dark] header b,:root[data-theme=dark] h1,:root[data-theme=dark] h2,:root[data-theme=dark] .dialog-heading h2{color:#e0e7f2}
:root[data-theme=dark] aside{background:var(--hb-sidebar)}
:root[data-theme=dark] .space{background:#29384f;color:#a7b6cc}
:root[data-theme=dark] .space b{color:#dce5f4}
:root[data-theme=dark] .nav-tree>summary{color:#b4c2d8}
:root[data-theme=dark] .nav-tree[open]>summary{color:#edf2fb}
:root[data-theme=dark] .nav-tree :is(button,a[data-page]).active{color:#e3ebff}
:root[data-theme=dark] .card,:root[data-theme=dark] .panel,:root[data-theme=dark] .metric-total{background:#1b2639;border-color:#2d3b51}
:root[data-theme=dark] .metric-card:hover,:root[data-theme=dark] .metric-card:focus{border-color:#6f88cc;box-shadow:0 4px 18px #0002}
:root[data-theme=dark] .metric,:root[data-theme=dark] .metric-total .metric,:root[data-theme=dark] .statistics-table td strong,:root[data-theme=dark] .statistics-table .count-cell,:root[data-theme=dark] .statistics-table tfoot>tr>td:nth-child(2){color:#e0e8f7}
:root[data-theme=dark] .metric-card label,:root[data-theme=dark] .metric-total label{color:#b5c4dd}
:root[data-theme=dark] .metric-card .metric>small,:root[data-theme=dark] .total-note{color:#8494ae}
:root[data-theme=dark] .card-statistics>div,:root[data-theme=dark] .metric-notes,:root[data-theme=dark] p,:root[data-theme=dark] .metric-card .card-description,:root[data-theme=dark] .source-meta,:root[data-theme=dark] .admin-dialog label,:root[data-theme=dark] .login-panel label{color:#9bacC5}
:root[data-theme=dark] .card-statistics b,:root[data-theme=dark] .metric-notes b{color:#c0cfeb}
:root[data-theme=dark] .metric-card .card-statistics,:root[data-theme=dark] .metric-card .card-description,:root[data-theme=dark] .shop-statistics,:root[data-theme=dark] .shop-total-description{border-color:#324056}
:root[data-theme=dark] input,:root[data-theme=dark] select,:root[data-theme=dark] .filters select,:root[data-theme=dark] .dr-trigger,:root[data-theme=dark] .shop-picker-trigger{background:#202d42;color:#c5d1e5;border-color:#394a64}
:root[data-theme=dark] input::placeholder{color:#8295b0}
:root[data-theme=dark] .btn{background:#25334a;border-color:#3a4a64;color:#c4d2e9}
:root[data-theme=dark] .btn.primary{background:#426ce5;color:#fff;border-color:#426ce5}
:root[data-theme=dark] th,:root[data-theme=dark] .statistics-table th,:root[data-theme=dark] .statistics-table tfoot{background:#233047;color:#aebed5}
:root[data-theme=dark] td,:root[data-theme=dark] .statistics-table td,:root[data-theme=dark] .statistics-table tfoot td,:root[data-theme=dark] .statistics-table tfoot th,:root[data-theme=dark] details{border-color:#2e3c52}
:root[data-theme=dark] .statistics-table tbody tr:hover{background:#202e43}
:root[data-theme=dark] .statistics-table .shop-name,:root[data-theme=dark] td:first-child{color:#a5bef5}
:root[data-theme=dark] .team-tag,:root[data-theme=dark] .shop-count{background:#2b3a52;color:#acbdd7}
:root[data-theme=dark] .shop-metric:hover,:root[data-theme=dark] .shop-metric:focus{background:#2a3b5c;box-shadow:0 0 0 1px #435981}
:root[data-theme=dark] .shop-picker-popup,:root[data-theme=dark] .dr-popup,:root[data-theme=dark] .admin-dialog,:root[data-theme=dark] #payment-tooltip{background:#1b2639;color:#dce5f5;border-color:#3a4964;box-shadow:0 16px 50px #0005}
:root[data-theme=dark] .shop-option{color:#aebfd8}
:root[data-theme=dark] .shop-option:hover,:root[data-theme=dark] .shop-option:has(input:checked){background:#2a3c5b;color:#c8d9ff}
:root[data-theme=dark] .shop-clear{color:#9db9ff}
:root[data-theme=dark] #payment-tooltip h3,:root[data-theme=dark] #payment-tooltip td:not(:first-child){color:#d0def6}
:root[data-theme=dark] #payment-tooltip th{background:#26334a;color:#b1c1da}
:root[data-theme=dark] .payment-close:hover{background:#2c3c57;color:#d8e5ff}
:root[data-theme=dark] .subscription-stage-card{background:#24324a;color:#c8d6ee}
:root[data-theme=dark] .subscription-stage-card[aria-pressed=true]{background:#2b3e62;border-color:#7a98f0;box-shadow:0 0 0 1px #7a98f0}
:root[data-theme=dark] .subscription-stage-summary b{color:#c6d6f1}
:root[data-theme=dark] .subscription-stage-summary span{color:#b5c7e4}
:root[data-theme=dark] .dr-presets,:root[data-theme=dark] .dr-footer,:root[data-theme=dark] .dialog-actions,:root[data-theme=dark] .setting{border-color:#34435b}
:root[data-theme=dark] .dr-presets select,:root[data-theme=dark] .dr-popup .ep-btn{background:#24334b;color:#c9d5e9;border-color:#435470}
:root[data-theme=dark] .dr-popup .ep-btn.primary,:root[data-theme=dark] .dr-grid button.selected{background:#4b73df;border-color:#4b73df;color:#fff}
:root[data-theme=dark] .dr-grid button.in-range{background:#2b4067}
:root[data-theme=dark] .dr-grid button.selected{background:#4b73df}
:root[data-theme=dark] .dr-grid button:hover,:root[data-theme=dark] .dr-month button:hover{background:#38517c;color:#fff}
:root[data-theme=dark] .dr-month button{color:#c4d3ed}
:root[data-theme=dark] .dr-grid span{color:#9fb0ca}
:root[data-theme=dark] .admin-table td{color:#b8c8e0}
:root[data-theme=dark] .admin-table button{background:#2b3e63;color:#b5cbff}
:root[data-theme=dark] .permission-tree{border-color:#3a4964}
:root[data-theme=dark] .status-tag{background:#344157;color:#adbbd2}
:root[data-theme=dark] .status-tag.enabled{background:#223f3d;color:#80c9ac}
:root[data-theme=dark] #account-bar{color:#b9c9e1}
:root[data-theme=dark] #account-bar button{color:#9dafca}
:root[data-theme=dark] #account-bar .avatar{background:#2c3c5e;color:#b5c9ff}
:root[data-theme=dark] .auth-page #content{background:#101827}
:root[data-theme=dark] .login-panel{background:#1b2639;border-color:#34435d}
:root[data-theme=dark] pre,:root[data-theme=dark] .setting code{color:#aabfdf}
:root[data-theme=dark] summary{color:#a7bef1}
:root[data-theme=dark] .theme-toggle{background:#2a3d63;color:#b4caff}
:root[data-theme=dark] .theme-toggle:hover,:root[data-theme=dark] .theme-toggle[aria-expanded=true]{background:#354e7b}
:root[data-theme=dark] .theme-menu{background:#202d42;border-color:#3b4c67;box-shadow:0 15px 40px #0005}
:root[data-theme=dark] .theme-menu button{color:#c9d6eb}
:root[data-theme=dark] .theme-menu button:hover{background:#2c3b54}
:root[data-theme=dark] .theme-menu button[aria-checked=true]{background:#2d426a;color:#bdcfff}
:root[data-theme=dark] .form-error{color:#ff9ba9}
@media(max-width:700px){.header-actions{gap:6px}.theme-toggle{width:32px;height:32px}}
:root[data-theme=dark] .report-meta{color:#bac9df}
:root[data-theme=dark] .report-meta>span:last-child{color:#8fa2be}
:root[data-theme=dark] .auth-page header{background:transparent}
:root[data-theme=dark] .daily-subscription-summary{background:#24324a}:root[data-theme=dark] .daily-subscription-summary strong{color:#d0def6}
:root[data-theme=dark] .daily-period{color:#adc5fc}:root[data-theme=dark] .daily-period:hover,:root[data-theme=dark] .daily-period[aria-pressed=true]{background:#2b3e62;color:#d0def6}
:root[data-theme=dark] #success-dialog{background:#1c293e;border-color:#324056}
:root[data-theme=dark] .success-ring::before{background:#1b2639}
:root[data-theme=dark] #success-dialog .success-ring::before{background:#1c293e}
:root[data-theme=dark] .success-ring-card{border-color:#334056}
:root[data-theme=dark] .success-ring-card:hover{border-color:#7e9df3}
:root[data-theme=dark] .overview-group-heading{color:#adbed8}
:root[data-theme=dark] .statistics-table td:first-child{background:#1b2639}
:root[data-theme=dark] .statistics-table th:first-child{background:#202d42}
