
.account-retained{background:#8099aa0a}.account-retained td{color:#92a5b3}.account-retained small,.retention-countdown{display:block;margin-top:7px;line-height:1.6}.retention-countdown{color:#e8ba7a;font-weight:600}.retention-error,.user-delete summary{color:#ed929b}.user-delete{position:relative}.user-delete form{width:min(290px,70vw);padding:14px;white-space:normal}.user-delete p{line-height:1.6;font-size:12px}.user-delete input{width:100%;min-width:0}.user-delete button.danger{color:#fff;background:#b83d51;border-color:#c34a60}:root[data-theme="light"] .account-retained td{color:#526c80}:root[data-theme="light"] .retention-countdown{color:#946116}
.admin-table .user-delete>summary{color:#f29aa7;border-color:#a8506055;background:#94354b22}
.admin-table .account-actions .user-delete-trigger{color:#f29aa7;border-color:#a8506055;background:#94354b22}.user-delete-dialog form{display:grid;gap:18px}.user-delete-dialog p{margin:0;line-height:1.8;font-size:14px}.user-delete-dialog input{display:block;width:100%;min-width:0;margin-top:10px;box-sizing:border-box}.delete-dialog-actions{display:flex;justify-content:flex-end;gap:12px}.user-delete-dialog button.danger{color:#fff;background:#b83d51;border:1px solid #c34a60}
@media(max-width:760px){.admin-table .account-retained td[data-label="状态"],.admin-table .account-retained td[data-label="操作"]{grid-column:1/-1}.admin-table .account-retained .retention-countdown{white-space:normal}}

#username-settings .password-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
#username-settings .username-rule{display:block;margin:12px 0 0;color:#91adbd;font-size:12px;line-height:1.7}
:root[data-theme="light"] #username-settings .username-rule{color:#5a7280}
@media(max-width:760px){#username-settings .password-grid{grid-template-columns:1fr}}


.admin-table .username-history-trigger{display:inline-flex;gap:5px;align-items:center;margin-top:5px;padding:3px 7px;min-height:25px;border:1px solid #6dd9d432;border-radius:7px;background:#7ee1df0c;color:#8de8e3;font-size:11px;font-weight:600;white-space:nowrap;transform:none}
.admin-table .username-history-trigger:hover{background:#7ee1df22;border-color:#7ee1df66}
.username-history-trigger span{font-size:10px;opacity:.72}
dialog.rename-dialog{width:min(520px,calc(100vw - 32px));max-height:min(660px,calc(100dvh - 40px));padding:0;border:1px solid #476475;border-radius:20px;background:#112735;color:#edf7fb;box-shadow:0 28px 100px #0008;overflow:hidden}
dialog.rename-dialog[open]{display:flex;flex-direction:column}
dialog.rename-dialog::backdrop{background:#030d17aa;backdrop-filter:blur(4px)}
.rename-dialog .rename-dialog-head{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:22px 24px 16px;border-bottom:1px solid #8099aa25;flex:none}
.rename-dialog h2{margin:0;font-size:19px;letter-spacing:-.02em}
.rename-dialog .rename-close{width:34px;height:34px;min-height:34px;padding:0;border:1px solid #8099aa33;border-radius:10px;background:transparent;color:inherit;font-size:24px;font-weight:400;transform:none}
.rename-dialog .rename-close:hover{background:#8099aa20}
.rename-dialog .rename-dialog-content{overflow:auto;overscroll-behavior:contain;padding:20px 24px 24px;min-height:0}
.rename-dialog .rename-identity{padding:14px 16px;border:1px solid #8099aa30;border-radius:12px;background:#7ee1df08;margin-bottom:20px}
.rename-dialog .rename-identity strong{display:block;font-size:16px;overflow-wrap:anywhere}
.rename-dialog .rename-identity small{display:block;font-size:12px;margin-top:5px;color:#91adbd}
.rename-dialog .rename-count{font-size:12px;margin:0 0 14px;color:#91adbd}
.rename-dialog .rename-timeline{list-style:none;margin:0;padding:0 0 0 9px}
.rename-dialog .rename-timeline li{position:relative;padding:0 0 20px 23px;border-left:1px solid #6dd9d440;overflow-wrap:anywhere}
.rename-dialog .rename-timeline li:last-child{padding-bottom:0;border-color:transparent}
.rename-dialog .rename-timeline li:before{content:"";position:absolute;left:-4px;top:7px;width:7px;height:7px;border-radius:50%;background:#7ee1df;box-shadow:0 0 0 4px #7ee1df10}
.rename-dialog .rename-time{display:block;font-size:11px;color:#91adbd;margin-bottom:6px;font-variant-numeric:tabular-nums}
.rename-dialog .rename-names{display:flex;align-items:center;gap:9px;flex-wrap:wrap;font-size:14px;line-height:1.6}
.rename-dialog .rename-old{color:#91adbd}.rename-dialog .rename-new{font-weight:700;color:#edf7fb}.rename-dialog .rename-arrow{color:#6eb9bc;font-size:13px}
:root[data-theme="light"] .admin-table .username-history-trigger{color:#087c8c;border-color:#087c8c30;background:#087c8c08}
:root[data-theme="light"] dialog.rename-dialog{background:#fff;color:#21394a;border-color:#cfdee4}
:root[data-theme="light"] .rename-dialog .rename-new{color:#21394a}
:root[data-theme="light"] .rename-dialog .rename-time,:root[data-theme="light"] .rename-dialog .rename-old,:root[data-theme="light"] .rename-dialog .rename-count,:root[data-theme="light"] .rename-dialog .rename-identity small{color:#5a7280}
@media(max-width:540px){.rename-dialog .rename-dialog-head{padding:18px}.rename-dialog .rename-dialog-content{padding:18px}.rename-dialog .rename-names{font-size:13px}dialog.rename-dialog{border-radius:16px}}
#reset-directory{display:block;width:100%;min-height:46px;padding:11px 13px;border:1px solid #476173;border-radius:11px;background:#0c2030;color:#f4fdff;font:inherit}:root[data-theme="light"] #reset-directory{background:#fff;color:#21394a}:root[data-theme="light"] .username-history summary{color:#087c8c}

.password-field{position:relative}
.password-field input:not([type=hidden]){padding-right:48px}
.password-field .password-toggle{position:absolute;right:4px;top:50%;transform:translateY(-50%);width:38px;height:38px;min-height:0;padding:8px;border:0;background:transparent;color:inherit;border-radius:8px;opacity:.75}
.password-field .password-toggle:hover{background:#7ee1df20;opacity:1;transform:translateY(-50%)}
.password-toggle svg{display:block;width:22px;height:22px}
.password-field input::-ms-reveal{display:none}
.autofill-username{position:absolute!important;width:1px!important;height:1px!important;min-height:0!important;padding:0!important;margin:-1px!important;clip-path:inset(50%);overflow:hidden;white-space:nowrap;border:0!important}

:root{font-family:"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:#edf7fb;background:#08141f;line-height:1.5}
*{box-sizing:border-box}
body{margin:0;min-height:100vh;background:radial-gradient(ellipse 750px 450px at 10% 0%,#123c4b 0%,transparent 70%),radial-gradient(ellipse 690px 530px at 100% 15%,#173044 0%,transparent 75%),#08141f}
a{color:#79dce5;text-decoration:none}a:hover{text-decoration:underline}
button,input,textarea{font:inherit}button{cursor:pointer}
.site-header{min-height:72px;border-bottom:1px solid #ffffff14;background:#0a1b28b8;backdrop-filter:blur(18px)}
.header-inner{max-width:1200px;min-height:72px;margin:auto;padding:0 28px;display:flex;align-items:center;justify-content:space-between;gap:20px}
.brand{display:inline-flex;align-items:center;gap:12px;color:#f3fbfe;font-weight:800;font-size:18px;letter-spacing:.025em}
.brand:hover{text-decoration:none}.brand-mark{display:grid;place-items:center;width:36px;height:36px;border-radius:12px;background:linear-gradient(135deg,#8de8e3,#46b5cb);color:#082936;font-size:23px;box-shadow:0 6px 20px #47d7dd29}
.brand span span{color:#8de8e3;font-weight:500}.header-link{font-size:14px;color:#bfd3dd}
.wrap{max-width:1200px;margin:48px auto 70px;padding:0 28px}.admin-wrap{max-width:1480px}.narrow{max-width:520px;margin:9vh auto}
.auth-shell{max-width:1100px;min-height:calc(100vh - 155px);margin:0 auto;padding:66px 28px 80px;display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,450px);gap:clamp(36px,8vw,120px);align-items:center}
.auth-intro{max-width:520px}.eyebrow{display:inline-block;margin-bottom:15px;color:#8ee5e5;font-size:12px;font-weight:800;letter-spacing:.17em;text-transform:uppercase}
.auth-intro h1{margin:0 0 18px;font-size:clamp(38px,5vw,62px);line-height:1.15;letter-spacing:-.045em}
.auth-intro p{font-size:17px;line-height:1.8;max-width:470px}.feature-list{display:grid;gap:15px;margin-top:38px}
.feature{display:flex;align-items:center;gap:13px;color:#c3d6df;font-size:14px}.feature-icon{display:grid;place-items:center;flex:none;width:32px;height:32px;border:1px solid #73d6d86b;border-radius:10px;background:#1a465064;color:#9dece9;font-weight:700}
.card{border:1px solid #5572855c;border-radius:22px;background:linear-gradient(145deg,#142b3bfa,#102536fa);padding:30px;box-shadow:0 18px 48px #0004;margin-bottom:20px}
.auth-card{padding:36px 38px;box-shadow:0 24px 68px #0005}.card h1,.page-intro h1{font-size:30px;letter-spacing:-.025em;margin:0 0 8px}.card h2{font-size:19px;margin:0 0 14px;letter-spacing:-.01em}
p{color:#a7c0cd;line-height:1.7;margin:8px 0 18px}small,.muted{color:#91adbd}.helper{font-size:13px;color:#91adbd}
label{display:block;margin:19px 0 8px;font-size:13px;font-weight:700;color:#d3e5eb}
input:not([type=hidden]),textarea{display:block;width:100%;min-height:46px;padding:11px 13px;border:1px solid #476173;border-radius:11px;background:#0c2030;color:#f4fdff;font-size:15px;outline:none;transition:border-color .15s,box-shadow .15s}
input:focus,textarea:focus{border-color:#78dee0;box-shadow:0 0 0 3px #6ed5d42e}
button,.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 17px;border:1px solid transparent;border-radius:11px;background:#7ee1df;color:#09252d;font-weight:800;font-size:14px;line-height:1.25;text-decoration:none;transition:background .15s,transform .15s}
button:hover,.button:hover{background:#adf0ea;text-decoration:none;transform:translateY(-1px)}button:focus-visible,.button:focus-visible,a:focus-visible{outline:2px solid #a6efea;outline-offset:3px}
.secondary{border-color:#5a8190;background:#244253;color:#e7f5f8}.secondary:hover{background:#34586a}.danger{background:#b86c7d;color:#fff}
.primary-action{width:100%;margin-top:24px}.auth-footer{margin:24px 0 0;padding-top:20px;border-top:1px solid #ffffff19;font-size:14px}
.auth-footer p{margin:0}.auth-card .eyebrow{margin-bottom:12px}.auth-card>p{margin-bottom:22px}
.form-divider{height:1px;background:#ffffff19;border:0;margin:31px 0}.step-label{display:inline-flex;align-items:center;gap:9px;color:#91e4e4;font-size:13px;font-weight:800}.step-number{display:grid;place-items:center;width:25px;height:25px;border-radius:8px;background:#245565;color:#c5f8f6}
.row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.between{justify-content:space-between}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.page-intro{margin-bottom:30px}.page-intro h1{font-size:clamp(28px,3.5vw,38px)}.page-intro p{max-width:680px;margin:8px 0 0}
.stat-card{min-height:170px}.metric-label{display:block;color:#a6c2cf;font-size:13px;font-weight:700}.metric{display:block;margin:17px 0 13px;color:#f6fcff;font-size:clamp(26px,3vw,34px);font-weight:800;letter-spacing:-.04em}.usage-detail{font-size:12px;color:#91adbd}
.total-card{padding:34px 38px;background:linear-gradient(115deg,#163a45,#142b3b 70%)}.quota-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;margin:20px 0 14px}.quota-item{min-width:0;padding:0 26px;border-right:1px solid #ffffff20}.quota-item:first-child{padding-left:0}.quota-item:last-child{padding-right:0;border-right:0}.quota-item small{display:block;margin-bottom:7px;color:#a6c2cf;font-size:13px;font-weight:700}.quota-item strong{display:block;color:#edf8fb;font-size:clamp(25px,2.5vw,34px);font-weight:750;letter-spacing:-.03em;line-height:1.25;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
@media(max-width:700px){.quota-grid{grid-template-columns:1fr;gap:12px}.quota-item{padding:0 0 12px!important;border-right:0!important;border-bottom:1px solid #ffffff16}.quota-item:last-child{padding-bottom:0!important;border-bottom:0}}
.speed-strip{display:flex;gap:26px;flex-wrap:wrap;margin-top:24px;padding-top:19px;border-top:1px solid #ffffff20}.speed-item{display:grid;gap:6px}.speed-item small{color:#a5c7d1;font-size:12px}.speed-item strong{font-size:19px;font-variant-numeric:tabular-nums}.speed-up{color:#8de8e3}.speed-down{color:#b1c6ff}.speed-cell{white-space:nowrap;font-variant-numeric:tabular-nums}.bandwidth-chip{display:inline-block;padding:5px 9px;border-radius:99px;background:#1d584d;color:#b3efd9;font-size:12px}.bandwidth-chip.warm{background:#625122;color:#ffe4a2}.bandwidth-chip.hot{background:#713842;color:#ffbdc7}
.user-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.user-card{min-width:0;padding:20px;border:1px solid #3c5d6c;border-radius:16px;background:#0d2332;box-shadow:0 8px 24px #0002}.user-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.user-identity{display:flex;align-items:center;gap:12px;min-width:0}.user-avatar{display:grid;place-items:center;flex:none;width:38px;height:38px;border-radius:11px;background:#204c56;color:#adf1e9;font-size:17px;font-weight:800}.user-name{display:block;color:#f2fbff;font-size:16px;font-weight:800;overflow-wrap:anywhere}.user-directory{display:block;color:#8ca9b7;font-size:11px}.user-head-actions{display:flex;align-items:center;gap:8px;flex:none}.user-head-actions .inline button{min-height:30px;padding:5px 10px}.user-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin:18px 0;padding:14px 0;border-top:1px solid #ffffff16;border-bottom:1px solid #ffffff16}.user-metric{min-width:0;padding:0 12px;border-right:1px solid #ffffff16}.user-metric:first-child{padding-left:0}.user-metric:last-child{border:0;padding-right:0}.user-metric small{display:block;margin-bottom:4px;color:#8eacbb;font-size:11px}.user-metric strong{display:block;color:#ecf9fc;font-size:14px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}.user-metric .speed-up{color:#8de8e3}.user-metric .speed-down{color:#b1c6ff}.user-card-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}.remark-line{min-width:0;color:#b7ccd5;font-size:12px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere}.remark-line b{margin-right:8px;color:#7e9ca9;font-weight:600}.remark-line.empty{color:#718e9c}.user-card-links{display:flex;align-items:center;gap:6px;flex:none}.user-expand,.note-editor>summary{display:inline-flex;align-items:center;gap:4px;min-height:30px;padding:4px 7px;border:0;border-radius:7px;background:transparent;color:#8de8e3;font-size:12px;font-weight:700;cursor:pointer;white-space:nowrap}.user-expand:hover,.note-editor>summary:hover{background:#183948;color:#c8f7f3;transform:none}.user-expand[aria-expanded="true"]{background:#183948}.note-editor{position:relative}.note-editor>summary{list-style:none}.note-editor>summary::-webkit-details-marker{display:none}.note-form{position:absolute;right:0;top:36px;z-index:8;width:min(280px,80vw);padding:12px;border:1px solid #4a7080;border-radius:12px;background:#102b3a;box-shadow:0 16px 35px #0008}.note-input{min-height:68px!important;padding:8px 9px!important;font-size:13px!important;line-height:1.4;resize:vertical}.note-form button{min-height:30px;margin-top:8px;padding:5px 11px;font-size:12px}.user-chart{margin-top:16px;padding:14px;border:1px solid #36586a;border-radius:12px;background:#091c2a}.user-chart[hidden]{display:none}.user-chart-head{display:flex;justify-content:space-between;gap:10px;margin-bottom:10px;color:#c9dce4;font-size:12px;font-weight:700}.trend-wrap{padding:10px;border:1px solid #294959;border-radius:9px;background:#0a2030}.trend-wrap svg{display:block;width:100%;height:auto;aspect-ratio:720/190;max-height:220px}.trend-key{display:flex;gap:14px;margin-top:7px;color:#9bb4c0;font-size:11px}.trend-key span:first-child{color:#8de8e3}.trend-key span:last-child{color:#b1c6ff}.trend-grid{stroke:#ffffff1c;stroke-width:1}.trend-axis{fill:#91adbd;font:11px "Segoe UI","Microsoft YaHei",sans-serif}.trend-line{fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}.trend-dot{fill:transparent;stroke:none;cursor:crosshair}.trend-dot:hover{fill:#edfaff;stroke:#08141f;stroke-width:2}.trend-empty{stroke-dasharray:5 5;opacity:.8}
.protocol-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:18px 0 26px}.protocol-card{margin:0;min-height:128px}.protocol-card h3{margin:0 0 12px;font-size:16px}.protocol-port{display:block;margin-top:8px;color:#91adbd;font-size:12px;overflow-wrap:anywhere}.node-groups-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(350px,1fr));gap:16px;margin:18px 0 26px}.node-group-card{margin:0;padding:18px 20px;border:1px solid var(--line,#365668);border-radius:14px;background:var(--card,#0d2332);box-shadow:var(--shadow,0 8px 24px rgba(0,0,0,.15));transition:border-color .15s}.node-group-card:hover{border-color:var(--cyan,#5bc3c5)}.node-group-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding-bottom:12px;margin-bottom:8px;border-bottom:1px solid var(--line,rgba(255,255,255,.08))}.node-group-head h3{margin:0;font-size:16px;font-weight:700;color:var(--ink,#edf7fb);letter-spacing:-.01em}.node-group-head h3 small{margin-left:8px;font-size:12px;font-weight:500;color:var(--muted,#8eacbb)}.node-compact-table{width:100%;border-collapse:collapse;margin:0}.node-compact-table tr{border-bottom:1px solid var(--line,rgba(255,255,255,.06));transition:background .1s}.node-compact-table tr:last-child{border-bottom:none}.node-compact-table tr:hover{background:rgba(255,255,255,.02)}.node-compact-table th{padding:8px 6px;color:var(--muted,#8eacbb);font-size:11px;font-weight:700;text-align:left;letter-spacing:.03em;border-bottom:1px solid var(--line,rgba(255,255,255,.1))}.node-compact-table td{padding:10px 6px;font-size:13px;vertical-align:middle;color:var(--ink,#edf7fb)}.node-compact-table .proto-name{font-weight:600}.node-compact-table .proto-trans{color:var(--muted,#8eacbb);font-size:12px;font-family:ui-monospace,Consolas,monospace}.node-compact-table .proto-port{color:var(--muted,#8eacbb);font-size:12px}.node-compact-table .proto-port code{font-family:ui-monospace,Consolas,monospace;color:var(--blue,#8de8e3);font-size:12px;font-weight:600;background:none;padding:0}.node-compact-table .proto-status{text-align:right;white-space:nowrap}.admin-node-grid{grid-template-columns:repeat(auto-fit,minmax(380px,1fr))}.admin-nodes-overview{display:flex;align-items:center;justify-content:space-between;padding:12px 18px;margin-bottom:16px;border:1px solid var(--line,#365668);border-radius:12px;background:var(--card,#0d2332);color:var(--ink,#edf7fb);font-size:13px}.admin-nodes-overview strong{color:var(--blue,#8de8e3)}.admin-proto-table th{text-align:left}.admin-proto-table th:nth-child(2){text-align:left}.admin-proto-table th:nth-child(3){text-align:left}.admin-proto-table th:nth-child(4){text-align:right}.admin-proto-table td.proto-ports{text-align:left}.admin-proto-table td.proto-status{text-align:right}.port-range{font-family:ui-monospace,Consolas,monospace;font-size:12px;color:var(--blue,#8de8e3);font-weight:600}.admin-port-details{display:inline-block;margin-left:8px;position:relative}.admin-port-details summary{cursor:pointer;color:var(--muted,#8eacbb);font-size:11px;text-decoration:underline;text-underline-offset:2px}.admin-port-details summary:hover{color:var(--blue,#8de8e3)}.admin-port-popover{position:absolute;left:0;top:22px;z-index:20;min-width:240px;max-width:380px;padding:10px 12px;border:1px solid var(--line,#4a7080);border-radius:8px;background:var(--card,#0d2332);box-shadow:var(--shadow,0 12px 28px rgba(0,0,0,.5));font-family:ui-monospace,Consolas,monospace;font-size:11px;line-height:1.6;color:var(--ink,#edf7fb);word-break:break-all}@media(max-width:600px){.node-groups-grid{grid-template-columns:1fr;gap:12px}.node-group-card{padding:14px}.node-compact-table td{padding:8px 4px;font-size:12px}}
.node-card{min-height:126px}.node-card h2{margin:0 0 20px;font-size:17px}.node-state{display:inline-flex;align-items:center;gap:9px;color:#b2ead2;font-size:14px;font-weight:700}.node-state::before{content:"";width:9px;height:9px;border-radius:50%;background:#69d6a7;box-shadow:0 0 0 4px #69d6a722}.node-state.off{color:#e6a9b6}.node-state.off::before{background:#db8594;box-shadow:0 0 0 4px #db859422}.node-state.unknown{color:#ffe4a2}.node-state.unknown::before{background:#e0b86e;box-shadow:0 0 0 4px #e0b86e22}
.ip-list{display:grid;gap:10px}.ip-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 14px;border:1px solid #36566a;border-radius:11px;background:#0c2030}.ip-row code{color:#e9f8fa;overflow-wrap:anywhere}.ip-row small{font-size:12px}.ip-region{color:#93dfe2;font-size:13px}.ip-meta{margin-left:auto;color:#91adbd;font-size:12px}.ip-empty{color:#91adbd;font-size:13px}.ip-details{position:relative}.ip-details summary{cursor:pointer;color:#7ee1df;font-size:13px;font-weight:700;white-space:nowrap}.ip-details .ip-list{position:absolute;right:0;z-index:5;width:min(380px,70vw);margin-top:10px;padding:10px;border:1px solid #456b7d;border-radius:14px;background:#0a1d2b;box-shadow:0 18px 40px #0008}.ip-details .ip-row{display:grid;gap:4px}.ip-details .ip-meta{margin:0}
.ip-location{display:grid;gap:8px}.ip-location+.ip-location{border-top:1px solid #36566a;padding-top:12px}.ip-location h3{margin:0;color:#b8e6ea;font-size:13px}
.section-heading{margin:0 0 20px}.section-heading h2{margin:0 0 5px}.section-heading p{margin:0;font-size:14px}
.codebox{padding:16px;border:1px solid #3c6273;border-radius:12px;background:#071d2c;overflow-wrap:anywhere;word-break:break-all;color:#d8f7f5;line-height:1.65}
code{font-family:ui-monospace,Consolas,monospace;font-size:13px}.action-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:18px 0 15px}.action-row a,.action-row button{min-width:118px}
.data-note{display:block;padding:14px 15px;border-left:3px solid #6adbd8;border-radius:0 9px 9px 0;background:#163b496b;color:#a9c7d1;font-size:13px}
.notice{margin:18px 0;padding:12px 14px;border:1px solid #6adbd866;border-radius:11px;background:#173d49;color:#d6f8f4;font-size:14px;line-height:1.6}
.notice.error{border-color:#d9909a77;background:#52333e;color:#ffe1e5}
.invite-sent{display:flex;align-items:flex-start;gap:12px;margin:20px 0 24px;padding:16px;border:1px solid #67d9b36b;border-radius:13px;background:#174a466b;color:#e7fff5}
.invite-sent-icon{display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:50%;background:#69dab3;color:#103c35;font-weight:900}
.invite-sent strong{display:block;font-size:15px;line-height:28px}
.table-scroll{overflow:visible}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:15px 12px;border-bottom:1px solid #ffffff18;vertical-align:middle;font-size:14px}th{color:#8eacbb;font-size:12px;font-weight:800;letter-spacing:.04em}tbody tr:last-child td{border-bottom:0}
.status-pill{display:inline-block;padding:5px 10px;border-radius:99px;background:#1d584d;color:#a9eed5;font-size:12px;font-weight:800}.status-pill.off{background:#513541;color:#f6b6c3}.status-pill.unknown{background:#58492d;color:#ffe4a2}
.inline{display:inline}.inline button{min-height:34px;padding:7px 12px;font-size:12px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.form-grid .card{margin:0}.footer{margin:26px 0;color:#7897a8;font-size:12px}
.admin-table{width:100%;min-width:0;table-layout:fixed;border-collapse:collapse}.admin-table th{padding:8px 8px 13px;color:#89a9b9;font-size:11px;white-space:nowrap}.admin-table td{padding:12px 8px;font-size:13px;overflow-wrap:anywhere}.admin-table .account-row{transition:background .15s}.admin-table .account-row:hover{background:#1d3c4a55}.admin-table .user-expand{max-width:100%;white-space:normal;overflow-wrap:anywhere;line-height:1.45;padding:0;min-height:0;color:#8de8e3;font-size:14px;font-weight:800}.admin-table .user-expand span{font-size:12px;transition:transform .15s}.admin-table .user-expand[aria-expanded="true"] span{transform:rotate(180deg)}.admin-table .user-directory{margin-top:3px}.admin-table .account-state{display:flex;flex-wrap:wrap;align-items:center;gap:5px}.admin-table .status-pill{padding:3px 8px;font-size:11px}.admin-table .bandwidth-chip{padding:0;background:none;color:#91aebc;font-size:11px}.admin-table .bandwidth-chip.warm{color:#ffe4a2}.admin-table .bandwidth-chip.hot{color:#ffbdc7}.admin-table .account-number{white-space:normal;font-variant-numeric:tabular-nums}.admin-table .account-note{display:flex;align-items:center;gap:7px;min-width:0}.admin-table .remark-line{display:block;flex:1;min-width:0;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;-webkit-line-clamp:unset;line-height:1.6;font-size:12px}.admin-table .note-editor{flex:none}.admin-table .note-editor>summary{min-height:26px;padding:3px 5px;font-size:11px}.admin-table .note-form{text-align:left}.admin-table .trend-row[hidden]{display:none}.admin-table .trend-row td{padding:0 8px 14px;border-bottom:1px solid #ffffff18}.admin-table .user-chart{max-width:800px;margin:0 auto;padding:13px 16px}.admin-table .user-chart[hidden]{display:none}.admin-table .ip-details summary{font-size:12px;white-space:normal;overflow-wrap:anywhere;line-height:1.6}.admin-table .ip-details .ip-list{right:auto;left:0}
.admin-table th,.admin-table td{text-align:center}.admin-table .account-state,.admin-table .account-note{justify-content:center}.admin-table .user-expand{justify-content:center}.admin-table .remark-line{flex:0 1 auto;max-width:calc(100% - 70px);text-align:center}.admin-table .note-form{text-align:left}
.admin-table .account-action{min-width:58px;min-height:30px;padding:5px 10px;border:1px solid #805263;border-radius:8px;background:#3b2833;color:#f4b9c5;font-size:12px;font-weight:700;box-shadow:none}.admin-table .account-action:hover{border-color:#bc788b;background:#563441;color:#ffe0e5}.admin-table .account-action.is-enable{border-color:#4c8978;background:#1c433b;color:#b4efda}.admin-table .account-action.is-enable:hover{border-color:#73cba9;background:#275d4e;color:#e1fff0}
.admin-table .usage-pair{display:grid;grid-template-columns:minmax(0,1fr);min-width:0;max-width:100%;gap:3px}.admin-table .usage-pair .usage-detail{display:block;max-width:100%;white-space:normal;overflow-wrap:anywhere;line-height:1.55}.admin-table .usage-pair span{display:block;white-space:normal;overflow-wrap:anywhere;color:#ecf9fc;font-size:12px;font-weight:700}.admin-table .usage-pair span:last-child{color:#91adbd;font-weight:600}
.traffic-form{width:min(290px,85vw)!important}.traffic-form label{margin:7px 0 4px;font-size:11px}.traffic-form input:not([type=hidden]){min-height:34px;padding:5px 8px;font-size:13px}.quota-reached{color:#ffbdc7!important}
.admin-table .account-actions{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:6px;white-space:nowrap}.admin-table .account-actions .note-editor>summary{min-height:30px;padding:5px 8px;border:1px solid #4d7c89;border-radius:8px;background:#1b3d4b;color:#a7e8e5;font-size:12px;font-weight:700}.admin-table .account-actions .note-editor>summary:hover{border-color:#77c1c5;background:#275362;color:#e0fffb}.admin-table .account-actions .note-form{right:0;top:36px}
.admin-table td[data-label="备注"] .remark-line{max-width:100%;margin-inline:auto}.admin-table .note-form button{border-color:#4d7c89;border-radius:8px;background:#1b3d4b;color:#a7e8e5}.admin-table .note-form button:hover{border-color:#77c1c5;background:#275362;color:#e0fffb}
@media(max-width:1200px){.admin-table colgroup,.admin-table thead{display:none}.admin-table,.admin-table tbody{display:block}.admin-table .account-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 18px;padding:15px;margin-bottom:10px;border:1px solid #38596a;border-radius:12px}.admin-table .account-row td{display:block;min-width:0;padding:0;border:0}.admin-table .account-number{white-space:normal}.admin-table .account-row td::before{content:attr(data-label);display:block;margin-bottom:3px;color:#7898a8;font-size:10px;font-weight:800}.admin-table .trend-row{display:block;margin:-10px 0 10px}.admin-table .trend-row[hidden]{display:none}.admin-table .trend-row td{display:block;padding:0 10px 12px}.admin-table .ip-details .ip-list{position:static;width:auto}.admin-table .account-note{max-width:100%}}
@media(max-width:1250px){.user-grid{grid-template-columns:1fr}.user-card{max-width:none}}
@media(max-width:850px){.auth-shell{grid-template-columns:1fr;gap:28px;max-width:580px;min-height:auto;padding-top:52px}.auth-intro h1{font-size:40px}.feature-list{grid-template-columns:1fr 1fr;gap:12px}.grid{grid-template-columns:1fr 1fr}.protocol-grid{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}}
@media(max-width:600px){.header-inner{min-height:64px;padding:0 18px}.site-header{min-height:64px}.brand{font-size:16px}.brand-mark{width:32px;height:32px;border-radius:10px}.wrap{margin:30px auto 52px;padding:0 18px}.auth-shell{padding:38px 18px 54px}.auth-intro h1{font-size:35px}.auth-intro p{font-size:15px}.feature-list{grid-template-columns:1fr;margin-top:25px}.auth-card,.card{padding:23px;border-radius:18px}.grid{grid-template-columns:1fr;gap:12px}.stat-card{min-height:145px}.total-card{padding:27px}.node-card{min-height:112px}.action-row button,.action-row a{flex:1}.page-intro{margin-bottom:22px}.page-intro h1{font-size:29px}.admin-table .account-row{grid-template-columns:1fr 1fr}.admin-table .account-row td:first-child,.admin-table .account-row td:nth-child(7){grid-column:1/-1}.admin-table .note-form{left:0;right:auto}.ip-details .ip-list{position:static;width:auto}}
.switch-card{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;margin-bottom:25px}.switch-card strong{display:block;font-size:15px}.switch-card small{display:block;margin-top:3px}.switch-card .row{flex:none}.trial-note{border:1px solid #d8ba6d77;border-radius:11px;background:#52452266;color:#ffe5aa;padding:12px 15px;margin-bottom:22px;font-size:13px}.codex-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.codex-grid .card{margin:0}.codex-progress{height:9px;border-radius:99px;background:#36515d;overflow:hidden}.codex-progress span{display:block;height:100%;background:#7ee1df}.codex-status{color:#a9eed5}.codex-error{color:#ffbdc7}.codex-code{font-size:26px;letter-spacing:.14em}.codex-log{max-height:240px;overflow:auto;white-space:pre-wrap;font-size:12px;color:#b8d3dd}.codex-actions{display:flex;gap:10px;flex-wrap:wrap}.codex-actions button{min-width:100px}.codex-settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.codex-settings label{margin:8px 0}.codex-settings input[type=checkbox]{width:auto;min-height:0;display:inline-block;margin-right:8px}.codex-settings .full{grid-column:1/-1}@media(max-width:700px){.switch-card{display:block}.switch-card .row{margin-top:12px}.codex-grid,.codex-settings{grid-template-columns:1fr}.codex-settings .full{grid-column:auto}}
.trial-isolated .account-actions,.trial-isolated .form-grid{display:none}

.admin-table .account-actions .service-settings .service-custom-months[hidden]{display:none!important}
:root[data-theme="light"] .admin-table .account-actions .service-settings input:not([type="hidden"]),:root[data-theme="light"] .admin-table .account-actions .service-settings select{background:#fff;color:#1d3546;border-color:#b8cbd5;color-scheme:light}
.admin-table .account-actions .service-settings input:focus-visible,.admin-table .account-actions .service-settings select:focus-visible{outline:2px solid #69b9bc;outline-offset:2px}

.admin-table .account-actions .service-settings{white-space:normal;text-align:left;line-height:1.6;overflow-x:hidden}
.admin-table .account-actions .service-settings *{box-sizing:border-box;max-width:100%}
.admin-table .account-actions .service-settings>strong{display:block;margin-bottom:4px}
.admin-table .account-actions .service-settings form{display:block;margin:10px 0}
.admin-table .account-actions .service-settings label{display:block;margin:8px 0 4px;font-size:12px}
.admin-table .account-actions .service-settings input:not([type="hidden"]),.admin-table .account-actions .service-settings select{display:block;width:100%;min-width:0;min-height:38px;padding:8px;border:1px solid #4a7080;border-radius:8px;background:#0b2130;color:#e8f5fb;font-size:13px}
.admin-table .account-actions .service-settings button{display:flex;width:100%;margin:10px 0;white-space:normal}
.admin-table .account-actions .service-settings small{display:block;white-space:normal;overflow-wrap:anywhere}
.admin-table .account-actions .service-settings details{display:block;margin-top:10px}
.admin-table .account-actions .service-settings .service-close{display:none}
@media(max-width:600px){.admin-table .account-actions .service-settings{position:fixed;left:16px!important;right:16px!important;top:12vh!important;width:auto!important;max-height:76vh!important;z-index:40}.admin-table .account-actions .service-settings .service-close{display:flex;width:100%;margin-top:12px;justify-content:center}}

.card.service-expiry-card{border:1px solid #47798a;border-left-width:4px;padding:20px 24px}
.service-expiry-card .service-expiry-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.service-expiry-card h2{margin:0;font-size:18px}
.service-expiry-card .service-expiry-status{font-size:14px;font-weight:600;color:#a9d9e2}
.service-expiry-card .service-expiry-date{margin:12px 0 6px;font-size:15px;line-height:1.7}
.service-expiry-card .service-expiry-message{margin:0;font-size:14px;line-height:1.7}
.card.service-expiry-warning{border-color:#b78b36;background:#30291b}
.service-expiry-warning .service-expiry-status{color:#ffd17a}
.card.service-expiry-danger{border-color:#c66b6b;background:#322026}
.service-expiry-danger .service-expiry-status{color:#ffaaaa}
:root[data-theme="light"] .service-expiry-card .service-expiry-status{color:#276979}
:root[data-theme="light"] .card.service-expiry-warning{background:#fff7e6;border-color:#c4912e}
:root[data-theme="light"] .service-expiry-warning .service-expiry-status{color:#895d0c}
:root[data-theme="light"] .card.service-expiry-danger{background:#fff0f0;border-color:#c45d5d}
:root[data-theme="light"] .service-expiry-danger .service-expiry-status{color:#ac3434}
@media(max-width:600px){.card.service-expiry-card{padding:18px}.service-expiry-card .service-expiry-heading{align-items:flex-start}}

/* Shared appearance selector. The existing stylesheet is the night palette. */
.theme-picker{display:inline-flex;align-items:center;gap:8px;color:#bfd3dd;font-size:13px;white-space:nowrap}
.theme-picker span{font-weight:700}
.theme-picker select{min-height:36px;max-width:142px;padding:6px 28px 6px 10px;border:1px solid #547588;border-radius:9px;background:#183749;color:#edf8fc;font:inherit;cursor:pointer}
.theme-picker select:focus-visible{outline:2px solid #a6efea;outline-offset:3px}
@media(max-width:600px){.header-inner{flex-wrap:wrap;padding-top:9px;padding-bottom:9px}.header-inner nav{gap:8px}.theme-picker span{display:none}.theme-picker select{max-width:116px;font-size:12px}}
.auth-footer-links{display:flex;align-items:center;justify-content:flex-start;gap:10px 18px;flex-wrap:wrap}
.auth-footer-links .auth-recovery-link{padding-left:18px;border-left:1px solid #ffffff26;font-size:13px;font-weight:650;white-space:nowrap}
.password-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.password-grid label{margin-top:0}
.password-submit{margin-top:17px}
.email-confirm-form{max-width:400px;margin-top:24px;padding-top:20px;border-top:1px solid #ffffff20}
@media(max-width:760px){.password-grid{grid-template-columns:1fr;gap:6px}.password-grid label{margin-top:14px}}
.clash-layout{display:grid;grid-template-columns:196px minmax(0,1fr);align-items:start;gap:28px}
.clash-content{min-width:0}
.clash-sidebar{position:sticky;top:18px}
.sidebar-shell{padding:12px;border:1px solid #426373;border-radius:18px;background:linear-gradient(155deg,#163447,#102938);box-shadow:0 14px 34px #0003}
.sidebar-heading{padding:8px 10px 12px}
.sidebar-heading span,.sidebar-heading small{display:block}
.sidebar-heading span{color:#edf8fb;font-size:14px;font-weight:800}
.sidebar-heading small{margin-top:2px;color:#85a6b6;font-size:10px;letter-spacing:.11em}
.sidebar-item{display:block;min-width:0;margin-top:4px;padding:11px 12px;border:1px solid transparent;border-radius:11px;color:#c7dbe4;text-decoration:none;transition:background .15s,border-color .15s,color .15s}
.sidebar-item:hover{border-color:#507b89;background:#1d4050;color:#fff;text-decoration:none}
.sidebar-item[aria-current="page"]{border-color:#5aa6aa;background:#205059;color:#d4fbf2;box-shadow:inset 3px 0 #7fe1d9}
.sidebar-item strong,.sidebar-item small{display:block;line-height:1.4}
.sidebar-item strong{font-size:13px}
.sidebar-item small{margin-top:3px;color:#9cb7c3;font-size:11px}
@media(max-width:1100px){.clash-content .grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.clash-layout{grid-template-columns:1fr;gap:20px}.clash-sidebar{position:static}.sidebar-shell{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;padding:8px}.sidebar-heading{grid-column:1/-1;padding:5px 8px 2px}.sidebar-heading small{display:none}.sidebar-item{margin-top:0;text-align:center}}
@media(max-width:700px){.clash-content .grid{grid-template-columns:1fr}}
@media(max-width:480px){.sidebar-shell{grid-template-columns:repeat(2,minmax(0,1fr))}.sidebar-heading{display:none}.sidebar-item{padding:10px 4px;border-color:#35596a;background:#183849}.sidebar-item strong{font-size:12px;white-space:nowrap}.sidebar-item small{display:none}}

/* Keep the member's appearance picker and navigation at one visual weight. */
.user-nav{gap:8px;flex-wrap:nowrap}
.user-nav .theme-picker,.user-nav .header-action{height:38px;min-height:38px;margin:0;border:1px solid #45697a;border-radius:10px;background:#173447;color:#d8eaf0;box-shadow:0 1px 0 #ffffff0d;font-size:13px;font-weight:700;white-space:nowrap}
.user-nav .theme-menu{position:relative;display:block;width:130px;min-width:130px;padding:0}
.user-nav .theme-menu summary{display:grid;grid-template-columns:auto minmax(0,1fr) 8px;align-items:center;gap:7px;width:100%;height:36px;padding:0 11px;cursor:pointer;list-style:none}
.user-nav .theme-menu summary::-webkit-details-marker{display:none}
.user-nav .theme-menu .theme-label,.user-nav .theme-menu .theme-value{display:block;margin:0;font-size:13px;line-height:1.2}
.user-nav .theme-menu .theme-label{color:#9bb8c6}
.user-nav .theme-menu .theme-value{color:#eaf8fa;text-align:right}
.user-nav .theme-menu .theme-caret{display:block;width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:translateY(-2px) rotate(45deg);transition:transform .15s}
.user-nav .theme-menu[open] .theme-caret{transform:translateY(1px) rotate(225deg)}
.user-nav .theme-menu:focus-within{border-color:#8ad4d2;box-shadow:0 0 0 2px #8ad4d224}
.user-nav .theme-menu summary:focus-visible{outline:none}
.user-nav .theme-options{position:absolute;z-index:40;top:calc(100% + 8px);right:0;min-width:164px;padding:5px;border:1px solid #4d7080;border-radius:12px;background:#142e3d;box-shadow:0 18px 38px #0008;animation:theme-menu-in .14s ease-out}
.user-nav .theme-options button{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:36px;margin:0;padding:7px 10px;border:0;border-radius:8px;background:transparent;color:#dceef2;font-size:13px;font-weight:650;text-align:left;transform:none}
.user-nav .theme-options button:hover,.user-nav .theme-options button:focus-visible{background:#285363;color:#fff;transform:none}
.user-nav .theme-options button[aria-pressed="true"]{background:#225158;color:#baf4ec}
.user-nav .theme-options button[aria-pressed="true"]::after{content:"✓";margin-left:12px}
@keyframes theme-menu-in{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.user-nav .theme-options{animation:none}.user-nav .theme-menu .theme-caret{transition:none}}
.user-nav .header-action{display:inline-flex;align-items:center;justify-content:center;padding:0 13px;text-decoration:none;transition:background .15s,border-color .15s,color .15s}
.user-nav .header-action:hover{border-color:#77b8be;background:#244b59;color:#fff;text-decoration:none}
.user-nav .header-action[aria-current="page"]{border-color:#68b8b8;background:#1d4b53;color:#baf4ec}
.user-nav .header-action:focus-visible{outline:2px solid #a6efea;outline-offset:3px}
@media(max-width:480px){.user-nav{display:grid;grid-template-columns:minmax(108px,1.4fr) repeat(2,minmax(68px,1fr));width:100%;gap:7px}.user-nav .theme-menu{width:100%;min-width:0}.user-nav .theme-menu summary{grid-template-columns:minmax(0,1fr) 8px;padding:0 9px}.user-nav .theme-menu .theme-label{display:none}.user-nav .theme-menu .theme-value{font-size:12px;text-align:center}.user-nav .header-action{min-width:0;padding:0 5px;font-size:12px}}

:root[data-theme="light"]{color:#21394a;background:#f5f9fc;color-scheme:light}
:root[data-theme="light"] body{background:radial-gradient(ellipse 760px 460px at 0% 0%,#e6f5f7 0%,transparent 75%),radial-gradient(ellipse 700px 550px at 100% 12%,#edf2ff 0%,transparent 72%),#f5f9fc}
:root[data-theme="light"] a{color:#087187}
:root[data-theme="light"] .site-header{background:#ffffffdc;border-bottom-color:#dce8ef}
:root[data-theme="light"] .brand{color:#18374a}
:root[data-theme="light"] .brand span span{color:#087c8c}
:root[data-theme="light"] .header-link,:root[data-theme="light"] .theme-picker{color:#4e6a7b}
:root[data-theme="light"] .theme-picker select{background:#fff;color:#21394a;border-color:#b5cbd7}
:root[data-theme="light"] .user-nav .theme-picker,:root[data-theme="light"] .user-nav .header-action{border-color:#c4d8e1;background:#fff;color:#35566a;box-shadow:0 1px 3px #173f5010}
:root[data-theme="light"] .user-nav .theme-menu .theme-label{color:#658091}
:root[data-theme="light"] .user-nav .theme-menu .theme-value{color:#24495b}
:root[data-theme="light"] .user-nav .theme-options{border-color:#c4d8e1;background:#fff;box-shadow:0 18px 34px #1b44532b}
:root[data-theme="light"] .user-nav .theme-options button{color:#35566a}
:root[data-theme="light"] .user-nav .theme-options button:hover,:root[data-theme="light"] .user-nav .theme-options button:focus-visible{background:#eaf5f7;color:#154d5b}
:root[data-theme="light"] .user-nav .theme-options button[aria-pressed="true"]{background:#e2f5f2;color:#12656c}
:root[data-theme="light"] .user-nav .header-action:hover{border-color:#7cb7bf;background:#eaf5f7;color:#154d5b}
:root[data-theme="light"] .user-nav .header-action[aria-current="page"]{border-color:#89c9c8;background:#e2f5f2;color:#12656c}
:root[data-theme="light"] .user-nav .theme-menu:focus-within{border-color:#68aeb6;box-shadow:0 0 0 2px #2a9eaa1d}
:root[data-theme="light"] .email-confirm-form{border-top-color:#dce8ed}
:root[data-theme="light"] .auth-footer-links .auth-recovery-link{border-left-color:#dce8ed}
:root[data-theme="light"] .sidebar-shell{border-color:#d3e3ea;background:#fff;box-shadow:0 14px 32px #1b445315}
:root[data-theme="light"] .sidebar-heading span{color:#24475a}
:root[data-theme="light"] .sidebar-heading small{color:#6e8c9c}
:root[data-theme="light"] .sidebar-item{color:#35566a}
:root[data-theme="light"] .sidebar-item:hover{border-color:#bfd7df;background:#eef7f9;color:#184b5a}
:root[data-theme="light"] .sidebar-item[aria-current="page"]{border-color:#91cfca;background:#e6f5f1;color:#12656c;box-shadow:inset 3px 0 #49a9a7}
:root[data-theme="light"] .sidebar-item small{color:#688492}
@media(max-width:480px){:root[data-theme="light"] .sidebar-item{border-color:#dce9ee;background:#f8fbfc}}
:root[data-theme="light"] .card{background:linear-gradient(145deg,#ffffff,#f9fcfe);border-color:#d5e3eb;box-shadow:0 16px 40px #1b445315}
:root[data-theme="light"] .total-card{background:linear-gradient(115deg,#e8f6f7,#f9fcfe 76%)}
:root[data-theme="light"] .user-card{background:#f9fcfe;border-color:#d5e3eb;box-shadow:0 7px 20px #1b44530d}
:root[data-theme="light"] p,:root[data-theme="light"] .feature,:root[data-theme="light"] .remark-line{color:#526a7b}
:root[data-theme="light"] small,:root[data-theme="light"] .muted,:root[data-theme="light"] .helper,:root[data-theme="light"] .usage-detail,:root[data-theme="light"] .protocol-port,:root[data-theme="light"] .ip-meta,:root[data-theme="light"] .ip-empty,:root[data-theme="light"] .user-directory,:root[data-theme="light"] .footer{color:#5d7585}
:root[data-theme="light"] .eyebrow,:root[data-theme="light"] .step-label{color:#087988}
:root[data-theme="light"] .feature-icon,:root[data-theme="light"] .step-number,:root[data-theme="light"] .user-avatar{background:#def3f2;color:#136e72;border-color:#b6dfdf}
:root[data-theme="light"] .metric,:root[data-theme="light"] .quota-item strong,:root[data-theme="light"] .user-name,:root[data-theme="light"] .user-metric strong,:root[data-theme="light"] .admin-table .usage-pair span{color:#21394a}
:root[data-theme="light"] .metric-label,:root[data-theme="light"] .quota-item small,:root[data-theme="light"] .speed-item small,:root[data-theme="light"] .user-metric small,:root[data-theme="light"] label,:root[data-theme="light"] th,:root[data-theme="light"] .admin-table th{color:#536d7c}
:root[data-theme="light"] input:not([type=hidden]),:root[data-theme="light"] textarea{background:#fff;color:#1d3546;border-color:#b8cbd5}
:root[data-theme="light"] input:focus,:root[data-theme="light"] textarea:focus{border-color:#2a9eaa;box-shadow:0 0 0 3px #2a9eaa27}
:root[data-theme="light"] .secondary{background:#e7f1f5;color:#235567;border-color:#b6ccd7}
:root[data-theme="light"] .secondary:hover{background:#d8eaf0;color:#123d4f}
:root[data-theme="light"] .speed-up,:root[data-theme="light"] .user-metric .speed-up,:root[data-theme="light"] .admin-table .account-number.speed-up{color:#08786e}
:root[data-theme="light"] .speed-down,:root[data-theme="light"] .user-metric .speed-down,:root[data-theme="light"] .admin-table .account-number.speed-down{color:#3454a4}
:root[data-theme="light"] .speed-strip,:root[data-theme="light"] .quota-item,:root[data-theme="light"] .user-metrics,:root[data-theme="light"] .user-metric,:root[data-theme="light"] th,:root[data-theme="light"] td{border-color:#dce8ed}
:root[data-theme="light"] .codebox,:root[data-theme="light"] .ip-row,:root[data-theme="light"] .trend-wrap,:root[data-theme="light"] .user-chart{background:#f0f7fa;border-color:#d3e3eb;color:#214052}
:root[data-theme="light"] .codebox code,:root[data-theme="light"] .ip-row code{color:#1b4656}
:root[data-theme="light"] .ip-details .ip-list,:root[data-theme="light"] .note-form{background:#fff;border-color:#c7dce5;box-shadow:0 16px 32px #274e601f}
:root[data-theme="light"] .ip-region,:root[data-theme="light"] .ip-location h3,:root[data-theme="light"] .ip-details summary,:root[data-theme="light"] .user-expand,:root[data-theme="light"] .note-editor>summary{color:#087b83}
:root[data-theme="light"] .ip-location+.ip-location{border-color:#dce8ed}
:root[data-theme="light"] .node-state{color:#15704b}
:root[data-theme="light"] .node-state.off,:root[data-theme="light"] .quota-reached{color:#a8344f!important}
:root[data-theme="light"] .node-state.unknown{color:#8a6316}
:root[data-theme="light"] .status-pill,:root[data-theme="light"] .bandwidth-chip{background:#dff3e9;color:#176548}
:root[data-theme="light"] .status-pill.off,:root[data-theme="light"] .bandwidth-chip.hot{background:#fbe7ea;color:#a6314a}
:root[data-theme="light"] .status-pill.unknown,:root[data-theme="light"] .bandwidth-chip.warm{background:#fbf0d7;color:#855d13}
:root[data-theme="light"] .notice,:root[data-theme="light"] .data-note{background:#e7f6f5;color:#28596a;border-color:#8bcbcc}
:root[data-theme="light"] .notice.error{background:#fcecef;color:#9f354d;border-color:#e3a0af}
:root[data-theme="light"] .trial-note{background:#fff4dc;color:#755517;border-color:#e5cb8d}
:root[data-theme="light"] .admin-table .account-row:hover,:root[data-theme="light"] .user-expand:hover,:root[data-theme="light"] .note-editor>summary:hover{background:#e8f3f7;color:#085f6e}
:root[data-theme="light"] .admin-table .account-action{background:#fbe9ed;color:#a43e54;border-color:#dfb3be}
:root[data-theme="light"] .admin-table .account-action.is-enable{background:#e1f5ec;color:#126d4c;border-color:#a9d7c3}
:root[data-theme="light"] .admin-table .account-actions .note-editor>summary,:root[data-theme="light"] .admin-table .note-form button{background:#e8f4f6;color:#176b75;border-color:#b4d5dc}
:root[data-theme="light"] .user-chart-head,:root[data-theme="light"] .trend-key,:root[data-theme="light"] .admin-table .usage-pair span:last-child{color:#5b7584}
:root[data-theme="light"] .trend-grid{stroke:#9bb9c738}
:root[data-theme="light"] .trend-axis{fill:#657f8d}
:root[data-theme="light"] .trend-key span:first-child{color:#08786e}
:root[data-theme="light"] .trend-key span:last-child{color:#3454a4}
:root[data-theme="light"] .codex-progress{background:#d8e8ee}
:root[data-theme="light"] .codex-progress span{background:#249ca0}
:root[data-theme="light"] .codex-log{color:#405f70}
@media(max-width:1020px){:root[data-theme="light"] .admin-table .account-row{border-color:#d5e3eb;background:#fff}}
@media(max-width:700px){:root[data-theme="light"] .quota-item{border-color:#dce8ed!important}}

.subscription-reset-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:22px 0 12px;padding-top:18px;border-top:1px solid #8099aa30}
.subscription-reset-row>span{font-size:12px;color:#91adbd;line-height:1.8}
.subscription-reset-success{padding:13px 16px;border:1px solid #52c6bd55;border-radius:12px;background:#52c6bd12;color:#8de8e3;font-size:14px;line-height:1.8}
dialog.subscription-reset-dialog{width:min(480px,calc(100vw - 32px));box-sizing:border-box;max-height:calc(100dvh - 32px);overflow:auto;margin:auto;padding:26px;border:1px solid #476475;border-radius:18px;background:#112735;color:#edf7fb;box-shadow:0 28px 100px #0008}
.subscription-reset-dialog::backdrop{background:#030d17aa;backdrop-filter:blur(4px)}
.subscription-reset-dialog h2{margin:0 0 12px;font-size:21px}.subscription-reset-dialog p{margin:0 0 20px;color:#a6c2cf;font-size:14px;line-height:1.9}
.subscription-reset-dialog label{display:block;margin:0 0 8px;font-size:14px;font-weight:650}
.subscription-reset-dialog input[type="password"],.subscription-reset-dialog input[type="text"]{box-sizing:border-box;width:100%;min-height:46px}
.subscription-reset-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}
.subscription-reset-actions button{margin-top:0}.subscription-reset-actions button:disabled{opacity:.6;cursor:wait}
:root[data-theme="light"] dialog.subscription-reset-dialog{background:#fff;color:#21394a;border-color:#cfdee4}
:root[data-theme="light"] .subscription-reset-dialog p,:root[data-theme="light"] .subscription-reset-row>span{color:#5a7280}
:root[data-theme="light"] .subscription-reset-success{color:#126d62;border-color:#9bd2c8;background:#effaf6}
@media(max-width:540px){dialog.subscription-reset-dialog{padding:20px}.subscription-reset-actions button{flex:1}.subscription-reset-row{gap:9px}}

/* Unified nodes v7: inherit the page's card, cyan accents and subtle separators. */
.compact-nodes,.nodes-section{--node-surface:linear-gradient(145deg,#142b3bfa,#102536fa);--node-line:#5572855c;--node-divider:#ffffff12;--node-header:#8de8e308;--node-head-ink:#8de8e3;--node-stripe:#ffffff02;--node-hover:#8de8e308;--node-ink:#e5f6ff;--node-muted:#a2c4d7;--node-name:#d0f1ff;--node-normal:#8be9bd;--node-ok:#63e9a8;--node-good-bg:#69d6a712;--node-bad:#ffb4c5;--node-bad-bg:#db859414;--node-unknown:#ffda84;--node-unknown-bg:#e0b86e14;--node-route-bg:#1a465064;--node-route-ink:#94edff;--node-route-line:#73d6d840;--node-focus:#8de8e3;--node-alert:#db8594;--node-shadow:0 14px 34px #0002}
:root[data-theme="light"] .compact-nodes,:root[data-theme="light"] .nodes-section{--node-surface:linear-gradient(145deg,#fff,#f9fcfe);--node-line:#d5e3eb;--node-divider:#dce8ed;--node-header:#eef7f8;--node-head-ink:#087988;--node-stripe:#08798802;--node-hover:#08798806;--node-ink:#173f5a;--node-muted:#4c748d;--node-name:#124f78;--node-normal:#146b46;--node-ok:#15975e;--node-good-bg:#edf8f1;--node-bad:#b32b4c;--node-bad-bg:#fff0f3;--node-unknown:#865c0c;--node-unknown-bg:#fff7e3;--node-route-bg:#e6f5f1;--node-route-ink:#096c85;--node-route-line:#b6dfdf;--node-focus:#087988;--node-alert:#d9909a;--node-shadow:0 14px 32px #1b445310}
.compact-nodes{min-width:0;margin:16px 0 24px;border:1px solid var(--node-line);border-radius:18px;background:var(--node-surface);box-shadow:var(--node-shadow)}
.compact-node-table{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;margin:0}
.compact-node-table th,.compact-node-table td{padding:13px 14px;border:0;border-bottom:1px solid var(--node-divider);font-size:12px;text-align:left;vertical-align:middle;overflow-wrap:anywhere;color:var(--node-ink);letter-spacing:0;line-height:1.5;transition:background-color .12s ease}
:root[data-theme] .compact-node-table thead th{height:40px;padding:10px 14px;background:var(--node-header);color:var(--node-head-ink);font-size:12px;font-weight:650;line-height:1.5}
.compact-node-table thead th:first-child{width:23%;border-top-left-radius:18px}
.compact-node-table thead th:last-child{border-top-right-radius:18px}
.compact-node-table tbody tr:last-child>*{border-bottom:0}
.compact-node-table tbody tr:nth-child(even)>*{background:var(--node-stripe)}
.compact-node-table tbody tr:hover>*,.compact-node-table tbody tr:focus-within>*{background:var(--node-hover)}
.compact-node-table tbody tr:last-child>th:first-child{border-bottom-left-radius:18px}
.compact-node-table tbody tr:last-child>td:last-child{border-bottom-right-radius:18px}
.compact-node-table .compact-node-name{font-weight:400;padding-left:18px;border-right:1px solid var(--node-divider)}
.compact-node-identity{display:flex;align-items:center;flex-wrap:wrap;gap:5px 8px;min-width:0}
.compact-node-identity strong{display:block;font-size:13px;font-weight:650;line-height:1.65;color:var(--node-name)}
:root[data-theme] .compact-node-identity .compact-route{display:inline-block;max-width:100%;padding:1px 6px;border-radius:5px;background:var(--node-route-bg);color:var(--node-route-ink);box-shadow:inset 0 0 0 1px var(--node-route-line);font-size:10px;font-weight:600;line-height:1.7;overflow-wrap:anywhere}
.compact-node-table .compact-node-name>.node-state{display:flex;width:fit-content;max-width:100%;margin-top:4px;font-size:10px;line-height:1.6;flex-wrap:wrap}
.compact-node-table .compact-row-attention>.compact-node-name{box-shadow:inset 2px 0 var(--node-alert)}
:root[data-theme] .compact-nodes .node-state{display:inline-flex;align-items:center;gap:5px;padding:1px 6px;border-radius:5px;color:var(--node-normal);background:var(--node-good-bg);font-size:12px;font-weight:600;line-height:1.5}
.compact-nodes .node-state::before{flex:none;width:5px;height:5px;background:var(--node-ok);box-shadow:none}
:root[data-theme] .compact-nodes .node-state.off{color:var(--node-bad)!important;background:var(--node-bad-bg)}
:root[data-theme] .compact-nodes .node-state.unknown{color:var(--node-unknown);background:var(--node-unknown-bg)}
.compact-nodes .node-state.off::before,.compact-nodes .node-state.unknown::before{background:currentColor;box-shadow:none}
:root[data-theme] .compact-nodes .compact-meta,.compact-nodes .compact-port-details{display:block;margin-top:3px;color:var(--node-muted);font-size:11px;font-weight:400;line-height:1.5;font-variant-numeric:tabular-nums}
.compact-nodes code{font-size:11px;letter-spacing:0;font-variant-numeric:tabular-nums;color:inherit}
.compact-port-details summary{display:inline-block;cursor:pointer;list-style:none;color:var(--node-muted);border-radius:4px;transition:color .12s ease}
.compact-port-details summary::-webkit-details-marker{display:none}
.compact-port-details summary::after{content:' ⌄';color:var(--node-focus)}
.compact-port-details[open] summary::after{content:' ⌃'}
.compact-port-details summary:hover,.compact-port-details[open] summary{color:var(--node-focus)}
.compact-port-details summary:focus-visible{outline:2px solid var(--node-focus);outline-offset:3px}
.compact-port-list{padding:7px 8px;margin-top:7px;background:var(--node-route-bg);border:1px solid var(--node-line);border-radius:6px;font-family:ui-monospace,Consolas,monospace;font-size:11px;line-height:1.7;overflow-wrap:anywhere;color:var(--node-ink)}
.compact-protocol-label{display:none}
.compact-empty{color:var(--node-muted)}
.compact-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.nodes-section{padding:22px 24px}
.nodes-section .section-heading{margin-bottom:12px}
.nodes-section .admin-nodes-overview{display:flex;flex-wrap:wrap;justify-content:space-between;gap:5px 16px;margin:12px 0 0;padding:10px 0;background:none;border:0;border-radius:0;color:var(--node-muted);font-size:12px}
.nodes-section .admin-nodes-overview strong{color:var(--node-focus);font-weight:600}
.nodes-section .private-hop-note{font-size:12px;margin:5px 0;line-height:1.7;color:var(--node-muted)}
.nodes-section .compact-nodes{margin:0;border:0;border-top:1px solid var(--node-divider);border-radius:0;background:transparent;box-shadow:none}
.nodes-section .compact-node-table thead th:first-child,.nodes-section .compact-node-table thead th:last-child{border-radius:0}
@media(max-width:1100px){.compact-node-table,.compact-node-table tbody{display:block}.compact-node-table thead{display:none}.compact-node-table tbody tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:12px 16px;gap:10px 16px;border-bottom:1px solid var(--node-divider)}.compact-node-table tbody tr:last-child{border-bottom:0;border-radius:0 0 18px 18px}.compact-node-table th,.compact-node-table td{display:block;padding:0;border:0;min-width:0;transition:none}.compact-node-table tbody tr:nth-child(even){background:var(--node-stripe)}.compact-node-table tbody tr:hover,.compact-node-table tbody tr:focus-within{background:var(--node-hover)}.compact-node-table tbody tr:nth-child(even)>*,.compact-node-table tbody tr:hover>*,.compact-node-table tbody tr:focus-within>*{background:transparent}.compact-node-table .compact-node-name{grid-column:1/-1;display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;padding:0;border-right:0}.compact-node-identity{flex:1 1 auto;gap:5px 7px}.compact-node-table .compact-node-name>.node-state{margin:0;font-size:10px}.compact-node-table .compact-row-attention>.compact-node-name{box-shadow:none}.compact-node-table .compact-row-attention{box-shadow:inset 2px 0 var(--node-alert)}.compact-protocol-label{display:block;font-size:11px;color:var(--node-head-ink);font-weight:600;margin-bottom:3px}:root[data-theme] .compact-node-table .compact-meta,.compact-node-table .compact-port-details{margin-top:2px}}
@media(max-width:600px){.compact-node-table tbody tr{grid-template-columns:repeat(2,minmax(0,1fr));padding:12px 14px;gap:10px 12px}.nodes-section{padding:18px!important}.compact-node-identity strong{font-size:13px}:root[data-theme] .compact-nodes .node-state{font-size:11px}.compact-node-table .compact-node-name>.node-state{font-size:10px}.compact-nodes{margin:12px 0 20px}}
@media(prefers-reduced-motion:reduce){.compact-node-table th,.compact-node-table td,.compact-port-details summary{transition:none}}

/* Quota components share the current theme and wrap on narrow screens. */
.quota-breakdown{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;padding:16px 0;border-top:1px solid #ffffff26}
.quota-breakdown span{display:flex;align-items:baseline;gap:20px;font-size:14px}.quota-breakdown strong{margin-left:0;font-size:16px;font-variant-numeric:tabular-nums}
.total-card .usage-detail{line-height:1.7;overflow-wrap:anywhere}
.cycle-bonus-settings{margin:14px 0}.cycle-bonus-settings>summary{cursor:pointer;font-weight:650}
.cycle-bonus-settings select{width:100%;max-width:100%;box-sizing:border-box;font:inherit;margin-top:6px}
.cycle-bonus-history{max-height:280px;overflow-y:auto}.cycle-bonus-record{display:grid;gap:7px;padding:12px 0;border-top:1px solid #8295a240;overflow-wrap:anywhere}
.cycle-bonus-record small{line-height:1.5}.cycle-bonus-record form{margin:0}
:root[data-theme="light"] .quota-breakdown{border-color:#dce8ed}
@media(max-width:480px){.quota-breakdown{display:grid;gap:10px}.cycle-bonus-settings select{font-size:13px}}

.traffic-settings .traffic-form{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;min-width:0;width:100%!important;max-width:100%}
.traffic-settings label{display:grid;gap:5px;min-width:0}
.traffic-settings input:not([type=hidden]),.traffic-settings select{width:100%;max-width:100%;min-width:0;box-sizing:border-box}
.traffic-settings button{white-space:normal;max-width:100%}

.admin-table .admin-quota-summary{display:inline-grid;gap:4px;max-width:100%;text-align:left;vertical-align:middle}
.admin-table .admin-quota-total{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin:0;font-size:13px;font-weight:600;line-height:1.5;white-space:nowrap;overflow-wrap:normal;word-break:normal}.admin-table .admin-quota-total strong{font:inherit;font-weight:700}
.admin-table .admin-quota-line{display:flex;justify-content:space-between;gap:10px;color:#91adbd;font-size:12px;line-height:1.5;white-space:nowrap;overflow-wrap:normal;word-break:normal}
:root[data-theme="light"] .admin-table .admin-quota-line{color:#5d7585}

/* Consistent spacing for authenticated dashboards and traffic views. */
.clash-layout{gap:24px}
.clash-content>.page-intro{margin-bottom:24px}
.clash-content>.page-intro h1{font-size:28px;line-height:1.35;letter-spacing:-.02em}
.clash-content>.page-intro p{font-size:14px;line-height:1.7;margin-top:8px}
.clash-content .card{border-radius:16px;padding:24px;box-shadow:0 4px 18px #00000012}
.clash-content>.grid>.card{margin-bottom:0}
.clash-content>.grid{margin-bottom:20px;align-items:stretch}
.clash-content .section-heading h2,.traffic-page .traffic-panel>h2{font-size:19px;line-height:1.5;margin:0 0 16px}
.clash-content .section-heading p{font-size:13px;line-height:1.7}
:root[data-theme="light"] .clash-content .card{background:#fff;box-shadow:0 3px 16px #24485b08;border-color:#dce7ed}
:root[data-theme="light"] .sidebar-shell{box-shadow:none}
.traffic-page .clash-content{--traffic-space:20px}
.traffic-page .traffic-panel{margin:0 0 var(--traffic-space);min-width:0}
.traffic-page .traffic-metrics{gap:16px;margin:0 0 var(--traffic-space);align-items:stretch}
.traffic-page .traffic-metrics>.stat-card{margin:0;min-width:0;min-height:150px;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:10px;padding:22px 24px}
.traffic-page .traffic-metrics .metric-label{font-size:13px;line-height:1.5;font-weight:600}
.traffic-page .traffic-metrics .metric{display:block;margin:0;font-size:clamp(24px,2.2vw,32px);line-height:1.2;font-weight:750;letter-spacing:-.025em;font-variant-numeric:tabular-nums}
.traffic-page .traffic-metrics .usage-detail{margin-top:auto;font-size:12px;line-height:1.55;overflow-wrap:anywhere}
.traffic-page .traffic-filters{grid-template-columns:repeat(3,minmax(0,1fr)) 112px;gap:12px}
.traffic-page.admin-traffic .traffic-filters{grid-template-columns:repeat(4,minmax(0,1fr)) 112px}
.traffic-page .traffic-filters label{display:block;margin:0 0 7px;font-size:13px;font-weight:600}
.traffic-page .traffic-filters input,.traffic-page .traffic-filters select,.traffic-page .traffic-filters button{height:44px;min-height:44px;box-sizing:border-box;border-radius:9px;margin:0}
.traffic-page .traffic-filters input,.traffic-page .traffic-filters select{padding:9px 11px;font-size:14px}
.traffic-page .traffic-filters button{padding:9px 12px;white-space:nowrap;font-size:14px}
:root[data-theme="dark"] .traffic-page input[type="date"]{color-scheme:dark}
.traffic-page .traffic-shortcuts{gap:8px;margin-bottom:18px}
.traffic-page .traffic-shortcuts a{border-radius:8px;font-weight:500;box-shadow:none;min-height:34px}
.traffic-page .traffic-shortcuts a[aria-current="true"]{box-shadow:none;font-weight:650}
.traffic-page .traffic-note{font-size:12px;line-height:1.8;overflow-wrap:anywhere}
.traffic-page .traffic-key{flex-wrap:wrap;gap:8px 20px;line-height:1.6}
.traffic-page .traffic-table-wrap{border:1px solid #8099aa25;border-radius:10px}
.traffic-page .traffic-table{margin:0}
.traffic-page .traffic-table th{background:#8099aa09;font-weight:600;opacity:1;font-size:12px}
.traffic-page .traffic-table td{font-size:13px}
.traffic-page .traffic-table th,.traffic-page .traffic-table td{padding:13px 16px}
.traffic-page .traffic-table td:first-child{white-space:normal;min-width:170px;line-height:1.65}
.traffic-page .traffic-table tbody tr:last-child td{border-bottom:0}
.traffic-page .traffic-table tbody tr:hover{background:#8099aa07}
.traffic-page.user-traffic .traffic-breakdown{grid-template-columns:minmax(0,1fr);gap:0}
.traffic-page.user-traffic .traffic-breakdown>.card{width:100%;box-sizing:border-box}
@media(max-width:1100px){
 .traffic-page.admin-traffic .traffic-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
 .traffic-page.admin-traffic .traffic-filters button{grid-column:1/-1}
}
@media(max-width:760px){
 .clash-content .card{padding:20px;border-radius:14px}
 .clash-content>.page-intro h1{font-size:25px}
 .traffic-page .traffic-metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
 .traffic-page .traffic-metrics>.stat-card{padding:16px;min-height:138px;gap:8px}
 .traffic-page .traffic-metrics .metric{font-size:24px}
 .traffic-page .traffic-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
 .traffic-page .traffic-table th,.traffic-page .traffic-table td{padding:12px}
}
@media(max-width:540px){
 .clash-layout{gap:18px}
 .clash-content .card{padding:18px 16px}
 .traffic-page .clash-content{--traffic-space:16px}
 .traffic-page .traffic-metrics{grid-template-columns:minmax(0,1fr);gap:10px}
 .traffic-page .traffic-metrics>.stat-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 12px;min-height:0;padding:16px}
 .traffic-page .traffic-metrics .metric{grid-column:2;grid-row:1/3;align-self:center;font-size:26px;white-space:nowrap}
 .traffic-page .traffic-metrics .usage-detail{grid-column:1;margin:0;font-size:12px}
 .traffic-page .traffic-filters>div:has(#traffic-region),.traffic-page .traffic-filters>button{grid-column:1/-1}
 .traffic-page.admin-traffic .traffic-filters>div:has(#traffic-account){grid-column:1/-1}
 .traffic-page .traffic-panel>h2{font-size:18px;margin-bottom:14px}
 .traffic-page .traffic-shortcuts{gap:7px;margin-bottom:16px}
 .traffic-page .traffic-shortcuts a{padding:7px 9px;font-size:12px}
 .traffic-page .traffic-chart{min-width:480px}
 .traffic-page.user-traffic .traffic-table th,.traffic-page.user-traffic .traffic-table td{padding:11px 7px;font-size:12px}
 .traffic-page.user-traffic .traffic-table td:first-child{min-width:0;overflow-wrap:anywhere}
}

/* Panel motion: short feedback, no repeated animation on statistics refresh. */
@keyframes panel-document-in{from{opacity:.75}to{opacity:1}}
@keyframes panel-detail-in{from{opacity:.6;transform:translateY(-3px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:no-preference){
 body{animation:panel-document-in .22s ease-out}
 .clash-content .card{transition:border-color .18s ease,box-shadow .18s ease}
 .clash-content .stat-card{transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}
 .sidebar-item,.user-nav .header-action{transition:background-color .16s ease,border-color .16s ease,color .16s ease,transform .16s ease}
 .clash-content :is(button,.button):not(.node-toggle){transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease,transform .12s ease}
 .clash-content :is(input,select,textarea){transition:border-color .16s ease,box-shadow .16s ease}
 .clash-content .node-state{transition:background-color .16s ease,color .16s ease}
 .clash-content .node-toggle-track,.clash-content .node-toggle-track>span{transition-duration:.18s;transition-timing-function:ease-out}
 .clash-content .traffic-table tbody tr{transition:background-color .16s ease}
 .clash-content details[open]>.compact-port-list,.clash-content details[open]>.traffic-operations-body{animation:panel-detail-in .18s ease-out}
 .clash-content button:not(:disabled):not(.node-toggle):active,.clash-content a.button:active,.user-nav a.header-action:active{transform:scale(.98)}
}
@media(hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){
 .clash-content .stat-card:hover{transform:translateY(-2px)}
 :root[data-theme] .clash-content .card:hover{border-color:#47a8a866;box-shadow:0 7px 22px #173e5510}
 .sidebar-item:hover{transform:translateX(2px)}
 .clash-content button:not(:disabled):not(.node-toggle):hover:not(:active),.clash-content a.button:hover:not(:active),.user-nav a.header-action:hover:not(:active){transform:translateY(-1px)}
}
@media(prefers-reduced-motion:reduce){
 body,.clash-layout *,.user-nav *{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}

/* Stable page shell and short, progressive navigation transitions. */
body{animation:none}
.sidebar-item[data-navigation-pending]{background:#2b99991a;box-shadow:inset 3px 0 #2b9999}
.panel-navigation-progress{position:fixed;z-index:9999;inset:0 0 auto;height:3px;background:#2b9999;pointer-events:none;transform-origin:left}
.panel-navigation-progress[hidden]{display:none}
#traffic-load-status{min-height:24px;margin:0 0 12px}
#traffic-load-status[hidden]{display:block!important;visibility:hidden}
.traffic-loading-card{min-height:128px}
.traffic-loading-line{height:13px;width:42%;border-radius:5px;background:#7396a51c;margin:8px 0 22px}
.traffic-loading-value{height:30px;width:66%;border-radius:6px;background:#7396a51c}
.traffic-loading-chart{height:260px;border-radius:12px;background:linear-gradient(0deg,#7396a514,transparent);border-bottom:1px solid #7396a533}
@keyframes panel-content-in{from{opacity:.55}to{opacity:1}}
@keyframes panel-content-out{to{opacity:0}}
@keyframes panel-navigation-progress{from{transform:scaleX(.15)}to{transform:scaleX(.85)}}
@media(prefers-reduced-motion:no-preference){
 @view-transition{navigation:auto}
 .site-header{view-transition-name:panel-header}
 .clash-sidebar{view-transition-name:panel-sidebar}
 .clash-content{view-transition-name:panel-content}
 ::view-transition-group(*){animation-duration:0s}
 ::view-transition-old(root),::view-transition-new(root),::view-transition-old(panel-header),::view-transition-new(panel-header),::view-transition-old(panel-sidebar),::view-transition-new(panel-sidebar){animation:none;mix-blend-mode:normal}
 ::view-transition-old(panel-content){animation:none;mix-blend-mode:normal}
 ::view-transition-new(panel-content){animation:panel-content-in .1s ease-out both;mix-blend-mode:normal}
 .panel-navigation-progress:not([hidden]){animation:panel-navigation-progress 1.2s ease-out both}
}
@media(prefers-reduced-motion:reduce){
 @view-transition{navigation:none}
 .panel-navigation-progress{animation:none}
}

/* Immediate feedback while a statistics view is being calculated. */
.traffic-shortcuts a[data-traffic-pending]{box-shadow:inset 0 -3px #2b9999!important;border-color:#2b9999!important}

/* Original panel styling inspired by the monitoring dashboard's light surfaces. */
:root[data-theme]{--ui-bg:#f3f5f9;--ui-surface:#ffffff;--ui-soft:#f7f8fb;--ui-line:#e5e9f0;--ui-ink:#252b3a;--ui-secondary:#606c80;--ui-muted:#8791a3;--ui-accent:#407aeb;--ui-tint:#edf3ff;--ui-shadow:0 4px 20px #263d6505;--ui-green:#268969;color:var(--ui-ink);background:var(--ui-bg);font-family:Inter,"Segoe UI","Microsoft YaHei",sans-serif}
:root[data-theme="dark"]{--ui-bg:#12151c;--ui-surface:#1b202a;--ui-soft:#212733;--ui-line:#303846;--ui-ink:#e3e8f3;--ui-secondary:#acb7ca;--ui-muted:#8591a6;--ui-accent:#83aaff;--ui-tint:#273854;--ui-shadow:0 4px 20px #00000014;--ui-green:#73cbb0}
:root[data-theme] body{background:radial-gradient(ellipse at 95% 0%,#8faaff12,transparent 48%),radial-gradient(ellipse at 0% 45%,#8cd3c608,transparent 45%),var(--ui-bg);color:var(--ui-ink);line-height:1.6}
:root[data-theme] .site-header{position:relative;z-index:40;background:var(--ui-surface);border-bottom:1px solid var(--ui-line);box-shadow:none}
:root[data-theme] .header-inner{max-width:1480px;min-height:76px;padding:0 32px}
:root[data-theme] .brand{color:var(--ui-ink);font-size:18px;letter-spacing:-.3px;gap:12px}
:root[data-theme] .brand>span>span{color:var(--ui-secondary);font-weight:500}
:root[data-theme] .brand-mark{width:35px;height:35px;border-radius:11px;background:linear-gradient(135deg,#759aff,#4775dd);color:#fff;box-shadow:0 3px 9px #407aeb18;font-size:25px}
:root[data-theme] .user-nav .header-action,:root[data-theme] .user-nav .theme-menu{border-color:var(--ui-line);background:var(--ui-surface);color:var(--ui-secondary);box-shadow:none;font-size:12px;font-weight:600;border-radius:9px}
:root[data-theme] .user-nav .theme-menu :is(.theme-label,.theme-value){color:var(--ui-secondary);font-size:12px}
:root[data-theme] .theme-options{background:var(--ui-surface);border-color:var(--ui-line);box-shadow:0 8px 28px #17254618}
:root[data-theme] .theme-options button{background:transparent;color:var(--ui-secondary)}
:root[data-theme] .theme-options button[aria-pressed="true"]{background:var(--ui-tint);color:var(--ui-accent)}
:root[data-theme] .wrap{max-width:1440px;margin:32px auto 64px;padding:0 32px}
:root[data-theme] .wrap.admin-wrap{max-width:1640px}
:root[data-theme] .clash-layout{grid-template-columns:206px minmax(0,1fr);gap:28px}
:root[data-theme] .sidebar-shell{padding:15px 10px;border-color:var(--ui-line);background:var(--ui-surface);border-radius:18px;box-shadow:var(--ui-shadow)}
:root[data-theme] .sidebar-heading{padding:9px 14px 20px}
:root[data-theme] .sidebar-heading span{font-size:13px;color:var(--ui-ink);font-weight:650}
:root[data-theme] .sidebar-heading small{font-size:9px;color:var(--ui-muted);letter-spacing:.15em}
:root[data-theme] .sidebar-item{padding:12px 14px;margin-top:4px;border-color:transparent;color:var(--ui-secondary);border-radius:10px;box-shadow:none}
:root[data-theme] .sidebar-item strong{font-size:13px;font-weight:600;color:inherit}
:root[data-theme] .sidebar-item small{font-size:10px;color:var(--ui-muted);margin-top:4px}
:root[data-theme] .sidebar-item:hover{background:var(--ui-soft);transform:none;color:var(--ui-ink)}
:root[data-theme] .sidebar-item[aria-current="page"]{background:var(--ui-tint);color:var(--ui-accent);box-shadow:none;border-color:transparent}
:root[data-theme] .sidebar-item[aria-current="page"] small{color:var(--ui-accent);opacity:.8}
:root[data-theme] .page-intro{margin:0 0 24px;padding:4px 0 0}
:root[data-theme] .page-intro .eyebrow{color:var(--ui-muted);font-size:10px;letter-spacing:.16em;font-weight:600;margin-bottom:9px}
:root[data-theme] .page-intro h1{font-size:28px;line-height:1.35;font-weight:700;letter-spacing:-.6px;margin:0 0 9px;color:var(--ui-ink)}
:root[data-theme] .page-intro p{font-size:13px;color:var(--ui-secondary);margin:0;line-height:1.7}
:root[data-theme] .card,:root[data-theme] .clash-content .card{background:var(--ui-surface);border:1px solid var(--ui-line);border-radius:16px;box-shadow:var(--ui-shadow);padding:24px;margin-bottom:20px;color:var(--ui-ink)}
:root[data-theme] .clash-content .card:hover{border-color:var(--ui-line);box-shadow:var(--ui-shadow)}
:root[data-theme] .card h2,:root[data-theme] .section-heading h2{font-size:16px;letter-spacing:-.2px;font-weight:650;color:var(--ui-ink);margin:0 0 12px;line-height:1.5}
:root[data-theme] :is(.muted,.usage-detail,.data-note,.section-heading p,.traffic-note){color:var(--ui-secondary);font-size:12px;line-height:1.8}
:root[data-theme] a{color:var(--ui-accent)}
:root[data-theme] label{font-size:12px;color:var(--ui-secondary);font-weight:550}
:root[data-theme] input,:root[data-theme] select,:root[data-theme] textarea{border:1px solid var(--ui-line);border-radius:9px;background:var(--ui-surface);color:var(--ui-ink);box-shadow:none;min-height:40px;font-size:13px}
:root[data-theme] input:focus,:root[data-theme] select:focus,:root[data-theme] textarea:focus{border-color:var(--ui-accent);outline:none;box-shadow:0 0 0 3px #407aeb12}
:root[data-theme] button:not(.node-toggle):not([data-theme-choice]):not(:where(.wallpaper-crop-dialog *)),:root[data-theme] .button{background:#407aeb;border:1px solid transparent;border-radius:9px;color:#fff;font-size:13px;font-weight:600;min-height:40px;padding:9px 16px;box-shadow:none}
:root[data-theme] button.secondary,:root[data-theme] .button.secondary{background:var(--ui-soft);color:var(--ui-secondary);border-color:var(--ui-line)}
:root[data-theme] button.danger,:root[data-theme] .button.danger{background:#fff0f2;border-color:#f3d3d9;color:#c94359}
:root[data-theme] .grid{gap:16px}
:root[data-theme] .grid>.stat-card,:root[data-theme] .traffic-metrics>.stat-card{margin:0;padding:20px 22px;min-height:134px;display:flex;flex-direction:column;gap:8px}
:root[data-theme] .metric-label{font-size:12px;color:var(--ui-secondary);font-weight:550}
:root[data-theme] .metric,:root[data-theme] .traffic-page .metric{font-size:30px;line-height:1.2;letter-spacing:-.8px;font-weight:650;color:var(--ui-ink);margin:5px 0 3px;font-variant-numeric:tabular-nums}
:root[data-theme] .traffic-metrics .stat-card:nth-child(1){border-top:3px solid #82a8f5}
:root[data-theme] .traffic-metrics .stat-card:nth-child(2){border-top:3px solid #83c6af}
:root[data-theme] .traffic-metrics .stat-card:nth-child(3){border-top:3px solid #b09ae4}
:root[data-theme] .traffic-metrics .usage-detail{margin-top:auto;font-size:11px;color:var(--ui-muted)}
:root[data-theme] .traffic-page{--traffic-space:20px}
:root[data-theme] .traffic-page .traffic-metrics{gap:16px;margin-bottom:20px;align-items:stretch}
:root[data-theme] .traffic-page .traffic-panel{padding:24px}
:root[data-theme] .traffic-shortcuts{gap:6px;margin-bottom:20px}
:root[data-theme] .traffic-shortcuts a{border:1px solid transparent;background:var(--ui-soft);color:var(--ui-secondary);border-radius:7px;padding:6px 12px;min-height:32px;font-size:12px;font-weight:500;box-shadow:none}
:root[data-theme] .traffic-shortcuts a.active,:root[data-theme] .traffic-shortcuts a[aria-current="page"]{background:var(--ui-tint);color:var(--ui-accent);border-color:#407aeb20;font-weight:650}
:root[data-theme] .traffic-filters{gap:14px;align-items:end}
:root[data-theme] .traffic-filters label{gap:7px}
:root[data-theme] .traffic-filters input,:root[data-theme] .traffic-filters select{min-height:42px;background:var(--ui-soft)}
:root[data-theme] .traffic-key{color:var(--ui-secondary);font-size:11px;gap:16px}
:root[data-theme] .traffic-chart text{fill:var(--ui-muted)}
:root[data-theme] .traffic-chart [fill="#50bcb8"]{fill:#7b9fed}
:root[data-theme] .traffic-table-wrap{border:1px solid var(--ui-line);border-radius:10px;overflow:auto}
:root[data-theme] .traffic-page .traffic-table{border:0;margin:0}
:root[data-theme] .traffic-page .traffic-table th{background:var(--ui-soft);color:var(--ui-secondary);font-size:11px;font-weight:600;padding:12px 16px;border-color:var(--ui-line)}
:root[data-theme] .traffic-page .traffic-table td{font-size:12px;padding:13px 16px;border-color:var(--ui-line);color:var(--ui-ink);font-variant-numeric:tabular-nums}
:root[data-theme] .traffic-page .traffic-table tbody tr:hover{background:var(--ui-soft)}
:root[data-theme] .traffic-page .traffic-table td:first-child{color:var(--ui-secondary)}
:root[data-theme] #traffic-load-status[hidden]{min-height:0;height:0;margin:0;padding:0}
:root[data-theme] .service-expiry-card{background:linear-gradient(110deg,var(--ui-surface),var(--ui-soft));padding:20px 24px}
:root[data-theme] .service-expiry-heading h2{margin:0}
:root[data-theme] .service-expiry-status{background:#e9f6ef;color:#268969;border:0;border-radius:6px;font-size:12px;padding:5px 10px}
:root[data-theme] .service-expiry-date,:root[data-theme] .service-expiry-message{font-size:12px;color:var(--ui-secondary);margin:8px 0 0}
:root[data-theme] .quota-grid{gap:16px;margin:18px 0}
:root[data-theme] .quota-item{background:var(--ui-soft);border:1px solid var(--ui-line);border-radius:12px;padding:18px}
:root[data-theme] .quota-item small{font-size:12px;color:var(--ui-secondary)}
:root[data-theme] .quota-item strong{font-size:28px;font-weight:650;letter-spacing:-.6px;color:var(--ui-ink);margin-top:6px;font-variant-numeric:tabular-nums}
:root[data-theme] .quota-item:last-child strong{color:var(--ui-green)}
:root[data-theme] .quota-breakdown{gap:12px;color:var(--ui-secondary);font-size:12px}
:root[data-theme] .quota-breakdown>span{border-color:var(--ui-line);background:var(--ui-soft);border-radius:6px}
:root[data-theme] .speed-strip{border-color:var(--ui-line);margin-top:20px;padding-top:18px;gap:20px}
:root[data-theme] .speed-item small{color:var(--ui-muted);font-size:11px}
:root[data-theme] .speed-item strong{font-size:16px;font-weight:600}
:root[data-theme] .speed-up{color:#507fe0}
:root[data-theme] .speed-down{color:#309579}
:root[data-theme] .codebox{border:1px solid var(--ui-line);background:var(--ui-soft);border-radius:9px;padding:14px;color:var(--ui-secondary)}
:root[data-theme] .subscription-card .subscription-tabs button{font-size:12px;min-height:36px;padding:8px 14px}
:root[data-theme] .subscription-card .subscription-pane>p{font-size:12px;line-height:1.8}
dialog.subscription-qr-dialog{
  box-sizing:border-box;width:min(370px,calc(100vw - 32px));max-height:calc(100dvh - 32px);
  margin:auto;padding:24px;overflow:auto;border:1px solid var(--ui-line);border-radius:18px;
  background:var(--ui-surface);color:var(--ui-ink);box-shadow:0 24px 70px #0b182b55;text-align:center;
}
.subscription-qr-dialog::backdrop{background:#0b1425a8}
.subscription-qr-dialog h2{margin:0 0 8px;font-size:20px;line-height:1.4}
.subscription-qr-dialog p{margin:0;font-size:13px;color:var(--ui-secondary)}
.subscription-qr-image{display:block;width:min(100%,240px);height:auto;margin:16px auto;background:#fff;image-rendering:pixelated}
.subscription-qr-dialog form{display:flex;justify-content:center}
.subscription-qr-dialog button{min-width:92px}
:root[data-theme] table th{color:var(--ui-secondary);background:var(--ui-soft);border-color:var(--ui-line)}
:root[data-theme] table td{border-color:var(--ui-line)}
:root[data-theme] .compact-node-table{border-color:var(--ui-line);border-radius:12px}
:root[data-theme] .compact-node-table .node-name{color:var(--ui-ink)}
:root[data-theme] .node-state{font-size:11px;border-radius:5px}
:root[data-theme] .compact-node-table .node-protocol-cell{background:var(--ui-surface);border-color:var(--ui-line)}
:root[data-theme] .node-toggle-track{background:#a9b4c3}
:root[data-theme] .node-toggle[aria-checked="true"] .node-toggle-track{background:#5489ee}
:root[data-theme] .admin-table{font-size:12px}
:root[data-theme] .admin-table th{font-size:11px;padding:14px 10px}
:root[data-theme] .admin-table td{padding:16px 10px}
:root[data-theme] .admin-table :is(button,.button){min-height:32px;padding:6px 10px;font-size:11px}
:root[data-theme] .admin-table .quota-value{font-size:20px}
:root[data-theme] .nodes-section .muted{font-size:11px}
:root[data-theme] .clash-content .stat-card:hover{transform:none}
@media(min-width:1180px){
 :root[data-theme] .user-traffic .clash-content{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:20px;align-items:start}
 :root[data-theme] .user-traffic .clash-content>*{grid-column:1/-1;min-width:0}
 :root[data-theme] .user-traffic .clash-content>section:has(.traffic-chart){grid-column:1/-1;align-self:stretch}
 :root[data-theme] .user-traffic .traffic-chart{min-width:0;width:100%}
 :root[data-theme] .user-traffic .traffic-chart-wrap{overflow:hidden}
}
@media(max-width:1100px){:root[data-theme] .wrap{padding:0 24px}:root[data-theme] .clash-layout{grid-template-columns:182px minmax(0,1fr);gap:20px}:root[data-theme] .quota-item{padding:14px}:root[data-theme] .quota-item strong{font-size:23px}}
@media(max-width:900px){:root[data-theme] .clash-layout{grid-template-columns:1fr;gap:24px}:root[data-theme] .sidebar-shell{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding:8px;border-radius:13px}:root[data-theme] .sidebar-heading{display:none}:root[data-theme] .sidebar-item{margin:0;padding:10px 6px}:root[data-theme] .sidebar-item small{display:none}:root[data-theme] .sidebar-item strong{font-size:12px}:root[data-theme] .page-intro{margin-bottom:20px}}
@media(max-width:600px){
 :root[data-theme] .header-inner{padding:12px 18px;gap:12px;min-height:70px}
 :root[data-theme] .brand{font-size:16px}
 :root[data-theme] .wrap{margin:20px auto 48px;padding:0 16px}
 :root[data-theme] .page-intro h1{font-size:24px}
 :root[data-theme] .clash-content .card,:root[data-theme] .traffic-page .traffic-panel{padding:18px;border-radius:13px;margin-bottom:16px}
 :root[data-theme] .traffic-page .traffic-metrics{gap:10px;margin-bottom:16px}
 :root[data-theme] .traffic-metrics>.stat-card{padding:16px;margin:0;min-height:110px}
 :root[data-theme] .traffic-page .metric{font-size:25px}
 :root[data-theme] .traffic-shortcuts{gap:6px;margin-bottom:16px}
 :root[data-theme] .traffic-shortcuts a{font-size:11px;padding:6px 9px}
 :root[data-theme] .traffic-page .traffic-table td,:root[data-theme] .traffic-page .traffic-table th{padding:11px 9px;font-size:11px}
 :root[data-theme] .quota-grid{gap:8px}
 :root[data-theme] .quota-item{padding:12px 9px}
 :root[data-theme] .quota-item small{font-size:10px}
 :root[data-theme] .quota-item strong{font-size:21px}
 :root[data-theme] .quota-breakdown{font-size:11px}
}
@media(max-width:480px){
 :root[data-theme] .user-nav{width:100%;display:grid;grid-template-columns:minmax(88px,1.3fr) repeat(3,minmax(0,1fr));gap:6px}
 :root[data-theme] .user-nav .theme-menu{min-width:0;width:auto}
 :root[data-theme] .user-nav .header-action{font-size:11px;padding:0 4px}
 :root[data-theme] .user-nav .theme-menu summary{padding:0 8px}
 :root[data-theme] .user-nav .theme-menu .theme-value{font-size:11px}
 :root[data-theme] .traffic-page .traffic-chart{min-width:0;width:100%;height:auto}
 :root[data-theme] .sidebar-shell{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
 :root[data-theme] .sidebar-item{padding:10px 2px;background:transparent;border:0}
 :root[data-theme] .sidebar-item strong{font-size:10px;white-space:normal}
 :root[data-theme] .traffic-page .traffic-metrics{grid-template-columns:1fr}
 :root[data-theme] .traffic-metrics>.stat-card{display:grid;grid-template-columns:1fr auto;gap:3px 12px;min-height:0;border-top:1px solid var(--ui-line);border-left:3px solid #82a8f5;padding:15px 17px}
 :root[data-theme] .traffic-metrics>.stat-card:nth-child(2){border-left-color:#83c6af}
 :root[data-theme] .traffic-metrics>.stat-card:nth-child(3){border-left-color:#b09ae4}
 :root[data-theme] .traffic-metrics .metric{grid-column:2;grid-row:1/3;align-self:center;margin:0;font-size:25px}
 :root[data-theme] .traffic-metrics .usage-detail{grid-column:1;margin:0;font-size:10px}
}
@media(max-width:350px){:root[data-theme] .user-nav{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Second visual pass: clearer hierarchy, calmer surfaces, larger readable labels. */
:root[data-theme]{--ui-bg:#f1f4f8;--ui-ink:#25344b;--ui-secondary:#62728a;--ui-accent:#527bd6;--ui-tint:#eaf0fc;--ui-line:#e2e8f1;--ui-shadow:0 6px 22px #263d6506}
:root[data-theme="dark"]{--ui-bg:#151b27;--ui-surface:#202938;--ui-soft:#263143;--ui-line:#344156;--ui-ink:#ecf0f8;--ui-secondary:#b0bfd2;--ui-muted:#93a2b9;--ui-accent:#96b7ff;--ui-tint:#2c3e5d;--ui-shadow:0 6px 26px #0002}
:root[data-theme] .wrap{max-width:1500px;margin-top:36px}
:root[data-theme] .clash-layout{grid-template-columns:216px minmax(0,1fr);gap:32px}
:root[data-theme] .sidebar-shell{padding:20px 12px;border-radius:22px}
:root[data-theme] .sidebar-item{padding:13px 16px;border-radius:12px;margin-top:6px}
:root[data-theme] .sidebar-item strong{font-size:14px}
:root[data-theme] .sidebar-item small{font-size:11px;line-height:1.6}
:root[data-theme] .sidebar-item[aria-current="page"]{box-shadow:inset 3px 0 var(--ui-accent)}
:root[data-theme] .page-intro{padding:0;margin-bottom:26px}
:root[data-theme] .page-intro h1{font-size:30px;font-weight:650;letter-spacing:-.7px}
:root[data-theme] .page-intro p{font-size:14px}
:root[data-theme] .card,:root[data-theme] .clash-content .card{border-radius:20px;padding:26px;border-color:var(--ui-line)}
:root[data-theme] .card h2,:root[data-theme] .section-heading h2{font-size:17px}
:root[data-theme] .traffic-page .traffic-metrics{gap:18px}
:root[data-theme] .traffic-metrics>.stat-card{position:relative;min-height:150px;padding:22px 24px;border-top:1px solid var(--ui-line)!important;overflow:hidden}
:root[data-theme] .traffic-metrics>.stat-card::after{content:"";position:absolute;width:72px;height:72px;right:-20px;top:-24px;border-radius:50%;background:#7b9fed16;pointer-events:none}
:root[data-theme] .traffic-metrics>.stat-card:nth-child(2)::after{background:#57b39417}
:root[data-theme] .traffic-metrics>.stat-card:nth-child(3)::after{background:#a28ad519}
:root[data-theme] .metric-label{font-size:13px}
:root[data-theme] .metric,:root[data-theme] .traffic-page .metric{font-size:34px;font-weight:650;margin:8px 0;letter-spacing:-1px}
:root[data-theme] .traffic-shortcuts{padding:4px;border:1px solid var(--ui-line);background:var(--ui-soft);border-radius:12px;width:fit-content;max-width:100%;gap:3px}
:root[data-theme] .traffic-shortcuts a{background:transparent;border-radius:8px}
:root[data-theme] .traffic-shortcuts a.active,:root[data-theme] .traffic-shortcuts a[aria-current="page"]{background:var(--ui-surface);border-color:transparent;color:var(--ui-accent);box-shadow:0 2px 6px #20314c0a}
:root[data-theme] .traffic-table-wrap{border-radius:12px}
:root[data-theme] .traffic-page .traffic-table th{padding-top:14px;padding-bottom:14px}
:root[data-theme] .traffic-page .traffic-table td{padding-top:15px;padding-bottom:15px}
:root[data-theme] .quota-item{border:0;border-radius:14px;padding:20px;background:var(--ui-soft)}
:root[data-theme] .quota-item:last-child{background:color-mix(in srgb,var(--ui-green) 7%,var(--ui-surface))}
:root[data-theme] .service-expiry-card{border-left:3px solid #75baa1}
@media(max-width:1100px){:root[data-theme] .clash-layout{grid-template-columns:186px minmax(0,1fr);gap:22px}}
@media(max-width:900px){:root[data-theme] .clash-layout{grid-template-columns:1fr;gap:22px}:root[data-theme] .sidebar-shell{padding:9px;border-radius:16px}:root[data-theme] .sidebar-item{margin:0;padding:10px 6px}:root[data-theme] .sidebar-item strong{font-size:12px}:root[data-theme] .sidebar-item[aria-current="page"]{box-shadow:none}}
@media(max-width:600px){:root[data-theme] .wrap{margin-top:20px}:root[data-theme] .card,:root[data-theme] .clash-content .card{padding:18px;border-radius:16px}:root[data-theme] .page-intro h1{font-size:26px}:root[data-theme] .traffic-metrics>.stat-card{min-height:118px}:root[data-theme] .traffic-page .metric{font-size:28px}:root[data-theme] .quota-item{padding:13px 10px}}
@media(max-width:480px){:root[data-theme] .sidebar-item strong{font-size:11px}:root[data-theme] .traffic-metrics>.stat-card{min-height:0;padding:17px 18px}:root[data-theme] .traffic-page .metric{font-size:27px}:root[data-theme] .traffic-metrics>.stat-card::after{display:none}:root[data-theme] .traffic-shortcuts{width:100%}:root[data-theme] .traffic-shortcuts a{padding:6px 8px}}
@media(prefers-reduced-motion:no-preference){:root[data-theme] .sidebar-item,:root[data-theme] .traffic-shortcuts a{transition:background .18s,color .18s,box-shadow .18s}:root[data-theme] .clash-content>.card{animation:surface-appear .25s ease-out}@keyframes surface-appear{from{opacity:.7;transform:translateY(4px)}to{opacity:1;transform:none}}}

:root[data-theme]{--wall-rgb:255 255 255;--wall-shade-rgb:244 246 250;--wall-opacity:.9;--wall-blur:6px;--wall-shade:.12;--wall-x:50%;--wall-y:50%;--wall-image:none}
:root[data-theme="dark"]{--wall-rgb:27 32 42;--wall-shade-rgb:13 17 24}
:root[data-wallpaper-active] body{background:transparent!important;isolation:isolate}
:root[data-theme][data-wallpaper-active] body :is(.site-header,.sidebar-shell,.clash-content>.card,.clash-content>.grid>.card,.traffic-metrics>.card,.traffic-breakdown>.card){background:rgb(var(--wall-rgb) / var(--wall-opacity));backdrop-filter:blur(var(--wall-blur));-webkit-backdrop-filter:blur(var(--wall-blur));box-shadow:0 4px 24px #12213c08}
:root[data-theme][data-wallpaper-active] body .card .card{backdrop-filter:none;-webkit-backdrop-filter:none}
body:has(dialog.wallpaper-dialog[open]){overflow:hidden}
:root[data-theme] dialog.wallpaper-dialog{box-sizing:border-box;width:min(650px,calc(100vw - 32px));max-height:calc(100dvh - 32px);margin:auto;padding:0;border:1px solid var(--ui-line);border-radius:22px;background:var(--ui-surface);color:var(--ui-ink);box-shadow:0 24px 100px #101c3d40;overflow:auto;overscroll-behavior:contain}
.wallpaper-dialog::backdrop{background:#17213566}
.wallpaper-content{padding:26px 28px 10px}
.wallpaper-heading{display:flex;justify-content:space-between;align-items:start;gap:16px}
:root[data-theme] .wallpaper-heading h2{margin:0;font-size:22px;font-weight:700;color:var(--ui-ink)}
:root[data-theme] .wallpaper-heading p{margin:8px 0 20px;font-size:13px;color:var(--ui-secondary)}
:root[data-theme] .wallpaper-dialog button.wallpaper-close{background:transparent;color:var(--ui-muted);padding:0;min-height:30px;width:30px;font-size:24px;line-height:1;border:0;flex-shrink:0}
.wallpaper-sample{position:relative;overflow:hidden;min-height:170px;padding:24px;border-radius:14px;background-color:var(--ui-bg);background-image:var(--wall-image);background-size:cover;background-position:var(--wall-x) var(--wall-y);display:flex;align-items:center}
.wallpaper-sample-card{position:relative;border:1px solid rgb(var(--wall-rgb) / .6);border-radius:12px;padding:16px 18px;width:62%;min-width:200px;background:rgb(var(--wall-rgb) / var(--wall-opacity));backdrop-filter:blur(var(--wall-blur));-webkit-backdrop-filter:blur(var(--wall-blur))}
.wallpaper-sample-card strong{font-size:15px;display:flex;align-items:center;gap:8px}
.wallpaper-sample-card strong::before{content:"";width:7px;height:7px;background:#32a87e;border-radius:50%}
:root[data-theme] .wallpaper-sample-card p{margin:6px 0 12px;color:var(--ui-secondary);font-size:12px}
.wallpaper-sample-card i{display:block;height:5px;width:78%;background:#6c9ff2;border-radius:4px;margin-top:6px}
.wallpaper-sample-card i+i{width:55%;background:#a08ae4}
.wallpaper-sample-label{position:absolute;right:10px;bottom:10px;font-size:10px;background:var(--ui-surface);color:var(--ui-secondary);padding:3px 7px;border-radius:5px}
.wallpaper-presets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:16px 0}
:root[data-theme] .wallpaper-dialog button.wallpaper-preset{display:block;padding:7px;min-height:84px;background:var(--ui-surface);border:1px solid var(--ui-line);color:var(--ui-secondary);font-size:12px;font-weight:500;border-radius:11px;box-shadow:none;white-space:nowrap}
:root[data-theme] .wallpaper-dialog button.wallpaper-preset[aria-pressed="true"]{border-color:var(--ui-accent);box-shadow:0 0 0 1px var(--ui-accent);color:var(--ui-accent)}
.wallpaper-preset>span{display:block;height:40px;border-radius:6px;margin-bottom:5px;background-size:cover;background-position:center}
.wallpaper-preset[data-wallpaper-preset="solid"]>span{background:var(--ui-bg)}
.wallpaper-preset[data-wallpaper-preset="soft"]>span{background:linear-gradient(135deg,#b4dbd4,#d1c9ef 58%,#f4dcc7)}
.wallpaper-preset[data-wallpaper-preset="sea"]>span{background:linear-gradient(145deg,#d3e5e7,#91b7c7 50%,#5e899a)}
.wallpaper-preset[data-wallpaper-preset="custom"]>span{background-color:var(--ui-soft);background-image:var(--wall-custom,none)}
.wallpaper-upload{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:14px 0 16px}
:root[data-theme] .wallpaper-dialog .wallpaper-upload button{font-size:12px;min-height:36px;padding:7px 12px}
.wallpaper-upload small{color:var(--ui-muted);font-size:11px}
:root[data-theme] .wallpaper-dialog button.wallpaper-link{background:transparent;color:var(--ui-accent);border:0;padding:6px;min-height:30px}
:root[data-theme] .wallpaper-dialog button.secondary{background:var(--ui-soft);color:var(--ui-secondary);border:1px solid var(--ui-line)}
.wallpaper-slider{margin:16px 0;display:block}
.wallpaper-slider>span{display:flex;justify-content:space-between;align-items:center;color:var(--ui-secondary);font-size:13px;font-weight:500;margin-bottom:8px}
.wallpaper-slider output{font-size:12px;color:var(--ui-muted);font-variant-numeric:tabular-nums}
:root[data-theme] .wallpaper-slider input[type="range"]{width:100%;min-height:24px;padding:0;margin:0;border:0;background:transparent;box-shadow:none;accent-color:#407aeb;cursor:pointer;display:block}
:root[data-theme] .wallpaper-slider input:focus-visible{outline:2px solid var(--ui-accent);outline-offset:3px;border-radius:4px}
.wallpaper-slider:has(input:disabled){opacity:.45}
.wallpaper-note{font-size:11px!important;color:var(--ui-muted)!important;line-height:1.8;margin:18px 0 8px}
.wallpaper-status{min-height:20px;margin:0;font-size:12px;color:#c94359!important}
.wallpaper-actions{position:sticky;bottom:0;display:flex;gap:10px;align-items:center;padding:16px 28px 20px;background:var(--ui-surface);border-top:1px solid var(--ui-line);z-index:2}
.wallpaper-actions .wallpaper-link{margin-right:auto}
:root[data-theme] .wallpaper-dialog button:focus-visible{outline:2px solid var(--ui-accent);outline-offset:3px}
:root[data-theme] .wallpaper-dialog button:disabled{opacity:.5;cursor:wait}
.wallpaper-file{display:none!important}
.wallpaper-dialog [hidden]{display:none!important}
:root[data-theme] .user-nav .theme-options button[data-wallpaper-open]{background:transparent;color:var(--ui-secondary);border:0;border-top:1px solid var(--ui-line);border-radius:0;box-shadow:none;font-size:12px;width:100%;text-align:left}
@media(max-width:600px){
 :root[data-theme] dialog.wallpaper-dialog{width:calc(100vw - 20px);max-height:calc(100dvh - 20px);border-radius:16px}
 .wallpaper-content{padding:20px 18px 8px}.wallpaper-heading h2{font-size:20px!important}.wallpaper-presets{gap:7px}
 .wallpaper-sample{padding:16px;min-height:155px}.wallpaper-sample-card{min-width:180px;padding:14px}
 .wallpaper-actions{padding:12px 18px 16px;gap:7px}.wallpaper-actions button{font-size:12px!important;padding:8px 11px!important}
}
@media(prefers-reduced-motion:no-preference){.wallpaper-dialog[open]{animation:wallpaper-in .16s ease-out}@keyframes wallpaper-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}}

:root[data-theme] dialog.wallpaper-dialog{width:min(1040px,calc(100vw - 40px));border-radius:26px;max-height:calc(100dvh - 40px)}
.wallpaper-content{padding:28px 30px 10px}
:root[data-theme] .wallpaper-heading h2{font-size:24px;letter-spacing:-.5px}
:root[data-theme] .wallpaper-heading p{margin-bottom:24px;font-size:13px}
.wallpaper-workspace{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1fr);gap:30px;align-items:start}
.wallpaper-visual{position:sticky;top:0;min-width:0}
.wallpaper-sample{height:380px;min-height:0;border-radius:18px;padding:24px;align-items:flex-end}
.wallpaper-sample-card{width:100%;min-width:0;padding:20px;border-radius:16px;box-shadow:0 12px 32px #18314812}
.wallpaper-sample-label{top:14px;bottom:auto;left:14px;right:auto;background:#ffffffb8;color:#536274;font-size:11px;border-radius:20px;padding:5px 10px}
.wallpaper-caption{padding:24px 4px}
.wallpaper-caption>span{font-size:10px;letter-spacing:.2em;color:var(--ui-muted)}
:root[data-theme] .wallpaper-caption h3{font-size:19px;letter-spacing:-.4px;margin:10px 0;color:var(--ui-ink);font-weight:600}
:root[data-theme] .wallpaper-caption p{font-size:13px;line-height:1.9;color:var(--ui-secondary);margin:0}
.wallpaper-editor{min-width:0}
.wallpaper-section-title{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px;color:var(--ui-ink);margin-bottom:12px}
.wallpaper-section-title>span{font-size:11px;color:var(--ui-muted)}
.wallpaper-presets{grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:0 0 18px}
:root[data-theme] .wallpaper-dialog button.wallpaper-preset{position:relative;padding:5px 5px 8px;border-radius:11px;min-height:0;white-space:normal}
.wallpaper-preset>span{height:48px;border-radius:7px;margin-bottom:6px}
.wallpaper-preset b{font-size:12px;font-weight:600;display:block;line-height:1.5}
.wallpaper-preset small{display:none}
:root[data-theme] .wallpaper-dialog button.wallpaper-preset[aria-pressed="true"]{box-shadow:0 0 0 1px var(--ui-accent);background:var(--ui-tint)}
.wallpaper-preset[aria-pressed="true"]::after{content:"✓";position:absolute;top:8px;right:8px;border:1px solid #ffffffa8;background:var(--ui-accent);border-radius:50%;width:15px;height:15px;line-height:14px;color:white;font-size:10px}
.wallpaper-upload{padding:0 0 18px;border-bottom:1px solid var(--ui-line);margin:0 0 20px;gap:8px}
.wallpaper-upload small{font-size:11px}
.wallpaper-adjustments{display:grid;grid-template-columns:1fr 1fr;gap:16px 20px;padding:16px;border-radius:14px;background:var(--ui-soft)}
.wallpaper-slider{margin:0;min-width:0}
.wallpaper-slider:first-child{grid-column:1/-1}
.wallpaper-slider>span{font-size:13px;margin-bottom:7px}
.wallpaper-slider output{font-size:11px}
.wallpaper-note{font-size:11px!important;line-height:1.7;margin:14px 0 4px}
.wallpaper-status{font-size:11px;min-height:18px}
.wallpaper-actions{padding:16px 30px 20px}
@media(max-width:800px){:root[data-theme] dialog.wallpaper-dialog{width:calc(100vw - 24px);max-height:calc(100dvh - 24px);border-radius:20px}.wallpaper-content{padding:22px 20px 8px}.wallpaper-workspace{grid-template-columns:1fr;gap:22px}.wallpaper-visual{position:static}.wallpaper-sample{height:190px;padding:18px;align-items:center}.wallpaper-sample-card{max-width:260px;padding:16px}.wallpaper-sample-label{left:auto;right:12px;top:auto;bottom:12px}.wallpaper-caption{display:none}.wallpaper-presets{grid-template-columns:repeat(5,minmax(0,1fr))}.wallpaper-preset>span{height:54px}.wallpaper-actions{padding:12px 20px 16px}}
@media(max-width:480px){.wallpaper-content{padding:20px 16px 6px}.wallpaper-presets{gap:7px;grid-template-columns:repeat(3,minmax(0,1fr))}.wallpaper-preset>span{height:48px}.wallpaper-adjustments{padding:14px;gap:18px 14px}.wallpaper-section-title>span{font-size:9px}.wallpaper-sample{height:165px;padding:14px}.wallpaper-sample-card{max-width:215px}.wallpaper-actions{padding:12px 16px}.wallpaper-workspace{gap:18px}}

/* Independent appearance controls and lightweight layered surfaces. */
:root[data-theme] .user-nav{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
:root[data-theme] .user-nav #theme-menu{width:38px;min-width:38px;height:38px;border:0;background:transparent!important;box-shadow:none}
:root[data-theme] .user-nav #theme-menu summary{display:flex;justify-content:center;align-items:center;width:38px;height:38px;padding:0;border-radius:10px;color:var(--ui-secondary)}
:root[data-theme] #theme-menu summary::before{content:'◐';font:23px/1 system-ui}
:root[data-theme][data-theme-mode="light"] #theme-menu summary::before{content:'☀'}
:root[data-theme][data-theme-mode="dark"] #theme-menu summary::before{content:'☾'}
:root[data-theme] #theme-menu :is(.theme-label,.theme-value){position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%);white-space:nowrap}
:root[data-theme] #theme-menu .theme-caret{display:none!important}
:root[data-theme] .user-nav button.wallpaper-header-button{display:inline-flex;align-items:center;gap:7px;min-height:38px;padding:7px 10px;border:0;border-radius:10px;background:transparent;color:var(--ui-secondary);box-shadow:none;font-size:13px;white-space:nowrap}
.wallpaper-header-button svg{width:17px;height:17px;flex:none}
:root[data-theme] .user-nav :is(.header-action,.theme-menu){background:transparent;box-shadow:none;border-color:transparent}
:root[data-theme] .user-nav :is(.header-action,button.wallpaper-header-button,#theme-menu summary):hover{background:var(--ui-tint)!important;color:var(--ui-accent)}
:root[data-theme] .user-nav #theme-menu .theme-options{min-width:150px;padding:5px;background:var(--ui-surface)}
:root[data-theme] .user-nav #theme-menu .theme-options button{border:0;border-radius:7px;box-shadow:none;min-height:34px;text-align:left}
:root[data-theme] .user-nav #theme-menu .theme-options button[aria-pressed="true"]{background:var(--ui-tint)}
/* A single static background blur replaces blur on every large card. */
:root[data-theme] :is(.site-header,.sidebar-shell,.clash-content .card){backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
.wallpaper-sample{background-image:none;isolation:isolate}
.wallpaper-sample::after{z-index:0}
.wallpaper-sample::before{z-index:1}
.wallpaper-sample-card,.wallpaper-sample-label{z-index:2;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
:root[data-theme][data-wallpaper-active] body .quota-item{background:rgb(var(--wall-rgb) / .16);border:1px solid rgb(var(--wall-rgb) / .25);box-shadow:none}
:root[data-theme][data-wallpaper-active] body .quota-item:last-child{background:color-mix(in srgb,var(--ui-green) 8%,transparent)}
:root[data-theme] .quota-breakdown{display:flex;flex-wrap:wrap;align-items:center;gap:12px 28px;padding:14px 0;margin:12px 0;border-top:1px solid var(--ui-line)}
:root[data-theme] .quota-breakdown>span{display:inline-flex;align-items:baseline;gap:10px;flex:none;width:auto;background:transparent!important;border:0!important;border-radius:0;padding:0;font-size:13px;line-height:1.7}
:root[data-theme] .quota-breakdown>span strong{font-size:14px;color:var(--ui-ink)}
:root[data-theme][data-wallpaper-active] body .codebox{background:rgb(var(--wall-shade-rgb) / .28);border:1px solid rgb(var(--wall-rgb) / .3);color:var(--ui-ink)}
:root[data-theme][data-wallpaper-active] body :is(button.secondary,.button.secondary){background:rgb(var(--wall-rgb) / .22);border-color:rgb(var(--wall-rgb) / .3)}
:root[data-theme][data-wallpaper-active] body .sidebar-item[aria-current="page"]{background:color-mix(in srgb,var(--ui-accent) 12%,transparent)}
:root[data-theme] .clash-content>.card{animation:none!important}
@view-transition{navigation:none}
:root[data-theme] :is(.site-header,.sidebar-shell,.clash-content){view-transition-name:none}
@media(max-width:600px){:root[data-theme] .user-nav{justify-content:flex-end;gap:4px;width:100%;display:flex}:root[data-theme] .user-nav .header-action{padding:0 8px;min-width:0;font-size:12px}:root[data-theme] .user-nav button.wallpaper-header-button{padding:7px 8px;font-size:12px}:root[data-theme] .quota-breakdown{gap:8px 18px}:root[data-theme] .quota-breakdown>span{font-size:12px}:root[data-theme] .quota-breakdown>span strong{font-size:13px}}
@media(max-width:480px){:root[data-theme] .user-nav{display:grid;grid-template-columns:32px minmax(92px,1fr) 44px 62px 62px;gap:3px}:root[data-theme] .user-nav #theme-menu,:root[data-theme] .user-nav #theme-menu summary{width:32px;min-width:32px}:root[data-theme] .user-nav .header-action{padding:0 3px;font-size:11px}:root[data-theme] .user-nav button.wallpaper-header-button{padding:6px 3px;font-size:11px;gap:5px}:root[data-theme] .quota-grid{display:grid;grid-template-columns:1fr;gap:10px}:root[data-theme] .quota-grid .quota-item{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px!important}:root[data-theme] .quota-grid .quota-item strong{margin:0!important;font-size:24px}:root[data-theme] .quota-grid .quota-item small{font-size:12px}}
@media(max-width:360px){:root[data-theme] .user-nav{grid-template-columns:repeat(6,minmax(0,1fr));gap:4px}:root[data-theme] .user-nav #theme-menu{grid-column:1}:root[data-theme] .user-nav .wallpaper-header-button{grid-column:2/-1;justify-self:start}:root[data-theme] .user-nav .header-action{grid-column:span 2}}


/* Persistent first-paint background; no whole-document visibility gate or fade. */
:root[data-wallpaper-active] body{isolation:isolate;background:transparent!important}
:root[data-wallpaper-active] body::before{content:"";position:fixed;inset:-24px;z-index:-1;pointer-events:none;background-color:var(--ui-bg);background-image:linear-gradient(rgb(var(--wall-shade-rgb) / var(--wall-shade)),rgb(var(--wall-shade-rgb) / var(--wall-shade))),var(--wall-image);background-size:cover;background-position:center,var(--wall-x) var(--wall-y);filter:blur(var(--wall-blur))}
.wallpaper-sample::after{content:"";position:absolute;inset:-24px;background-image:var(--wall-image);background-size:cover;background-position:var(--wall-x) var(--wall-y);filter:blur(var(--wall-blur));pointer-events:none}
.wallpaper-sample::before{content:"";position:absolute;inset:0;background:rgb(var(--wall-shade-rgb) / var(--wall-shade));pointer-events:none}
.wallpaper-presets{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:360px){.wallpaper-presets{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Readable actions regardless of wallpaper brightness or card opacity. */
:root[data-theme]{--action-secondary-bg:#f0f4fa;--action-secondary-hover:#e3ebf7;--action-secondary-ink:#344761;--action-secondary-border:#bacadd;--action-disabled-bg:#e5eaf1;--action-disabled-ink:#657389}
:root[data-theme="dark"]{--action-secondary-bg:#2b394f;--action-secondary-hover:#364862;--action-secondary-ink:#edf2fa;--action-secondary-border:#526581;--action-disabled-bg:#293344;--action-disabled-ink:#a5b1c2}
:root[data-theme] body .clash-content :is(button.secondary,.button.secondary){background:var(--action-secondary-bg);color:var(--action-secondary-ink);border:1px solid var(--action-secondary-border);font-weight:600;box-shadow:0 1px 2px #142c4510;opacity:1}
:root[data-theme] body .clash-content :is(button.secondary,.button.secondary):hover:not(:disabled){background:var(--action-secondary-hover);color:var(--action-secondary-ink);border-color:var(--ui-accent)}
:root[data-theme] body .clash-content :is(button.secondary,.button.secondary):disabled{background:var(--action-disabled-bg);color:var(--action-disabled-ink);border-color:var(--ui-line);box-shadow:none;opacity:1;cursor:not-allowed}
:root[data-theme] body .clash-content :is(button.secondary,.button.secondary):focus-visible{outline:2px solid var(--ui-accent);outline-offset:3px}
:root[data-theme] body .password-field button.password-toggle{display:grid;place-items:center;position:absolute;right:5px;top:50%;width:36px;height:36px;min-width:36px;min-height:36px;padding:0;border:0;border-radius:7px;background:transparent;color:var(--action-secondary-ink);box-shadow:none;opacity:1;transform:translateY(-50%)!important}
:root[data-theme] body .password-field button.password-toggle:hover{background:var(--action-secondary-hover);color:var(--action-secondary-ink)}
:root[data-theme] body .password-field button.password-toggle:focus-visible{outline:2px solid var(--ui-accent);outline-offset:1px;background:var(--action-secondary-bg)}
:root[data-theme] body .password-field button.password-toggle svg{width:20px;height:20px;display:block;flex:none}

/* Admin surfaces are scoped; member pages retain their existing layout. */
:root[data-theme] .admin-wrap{--admin-surface:var(--ui-surface);--admin-field:var(--ui-soft);--admin-subtle:color-mix(in srgb,var(--ui-accent) 4%,transparent);--admin-line:var(--ui-line)}
:root[data-theme][data-wallpaper-active] .admin-wrap{--admin-surface:rgb(var(--wall-rgb) / max(.62,var(--wall-opacity)));--admin-field:rgb(var(--wall-rgb) / .72);--admin-line:color-mix(in srgb,var(--ui-secondary) 18%,transparent)}
:root[data-theme] .admin-wrap .clash-content :is(.card,.log-panel){background:var(--admin-surface);border:1px solid var(--admin-line);box-shadow:0 4px 18px #142c4610;backdrop-filter:none!important;color:var(--ui-ink)}
:root[data-theme] .admin-wrap .clash-content :is(input:not([type=checkbox]):not([type=radio]),select,textarea){background:var(--admin-field);border-color:var(--admin-line);color:var(--ui-ink)}
:root[data-theme] .admin-wrap .clash-content input[type=file]::file-selector-button{border:0;border-radius:6px;background:var(--ui-tint);color:var(--ui-accent);padding:8px 12px;margin-right:12px;font:inherit}
:root[data-theme] .admin-wrap .admin-table :is(button.user-expand,button.username-history-trigger){background:transparent;color:var(--ui-ink);border:1px solid transparent;box-shadow:none;min-height:30px;padding:4px 6px;line-height:1.5;font-weight:650;text-align:left}
:root[data-theme] .admin-wrap .admin-table button.username-history-trigger{font-size:11px;font-weight:500;color:var(--ui-secondary);padding:2px 6px;min-height:26px}
:root[data-theme] .admin-wrap .admin-table :is(button.user-expand,button.username-history-trigger):hover{background:var(--ui-tint);color:var(--ui-accent)}
:root[data-theme] .admin-wrap .admin-table .account-actions :is(button,.button){min-height:32px;padding:6px 10px;background:var(--admin-field);color:var(--ui-secondary);border:1px solid var(--admin-line);font-size:12px}
:root[data-theme] .admin-wrap .admin-table .account-actions .user-delete-trigger{background:color-mix(in srgb,#d04460 10%,var(--admin-field));color:#b72d49;border-color:color-mix(in srgb,#d04460 30%,transparent)}
:root[data-theme=dark] .admin-wrap .admin-table .account-actions .user-delete-trigger{color:#ff9fb0}
:root[data-theme] .admin-wrap .admin-table td{padding-top:14px;padding-bottom:14px;border-bottom-color:var(--admin-line);font-variant-numeric:tabular-nums}
:root[data-theme] .admin-wrap .compact-admin{--node-bg:transparent;--node-header:var(--admin-field);--node-stripe:var(--admin-subtle);--node-hover:var(--ui-tint);--node-divider:var(--admin-line);--node-ink:var(--ui-ink);--node-muted:var(--ui-secondary);--node-head-ink:var(--ui-secondary)}
:root[data-theme] .admin-wrap .compact-admin .compact-node-table :is(.compact-node-name,.compact-switch-cell){background:transparent;color:var(--ui-ink)}
:root[data-theme] .admin-wrap .compact-admin .compact-node-identity strong{color:var(--ui-ink)}
:root[data-theme] .admin-wrap .compact-admin .compact-node-table thead th{background:var(--admin-field);color:var(--ui-secondary)}
:root[data-theme] .admin-wrap .compact-admin .compact-node-table tbody tr:nth-child(even){background:var(--admin-subtle)}
:root[data-theme] .admin-wrap .compact-admin .compact-node-table tbody tr:hover{background:var(--admin-subtle)}
:root[data-theme] .admin-wrap .compact-admin .node-traffic-factor{background:transparent;border-color:var(--admin-line);font-size:10px}
:root[data-theme] .admin-wrap .notice-tabs{display:inline-flex;padding:4px;gap:4px;border:1px solid var(--admin-line);border-radius:11px;background:var(--admin-field)}
:root[data-theme] .admin-wrap .notice-tabs button{background:transparent;color:var(--ui-secondary);border:0;min-height:36px;padding:8px 18px;border-radius:8px}
:root[data-theme] .admin-wrap .notice-tabs button[aria-pressed=true]{background:var(--ui-tint);color:var(--ui-accent);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ui-accent) 25%,transparent)}
:root[data-theme] .admin-wrap .notice-composer :is(fieldset,.notice-audience,.notice-option){background:var(--admin-subtle);border-color:var(--admin-line)}
:root[data-theme] .admin-wrap .notice-recipients{background:var(--admin-field)!important}
:root[data-theme] .admin-wrap .notice-person{border-radius:6px;padding:10px 8px}
:root[data-theme] .admin-wrap .notice-person:hover{background:var(--ui-tint)}
:root[data-theme] .admin-wrap .codex-admin{--ink:var(--ui-ink);--muted:var(--ui-secondary);--line:var(--admin-line);--card:var(--admin-subtle)}
:root[data-theme] .admin-wrap .codex-admin :is(.cx-stat,.cx-user){background:var(--admin-subtle);box-shadow:none}
:root[data-theme] .admin-wrap .codex-admin .cx-stat strong{font-size:28px;font-variant-numeric:tabular-nums}
:root[data-theme] .admin-wrap .codex-admin :is(.cx-head,.cx-pagination) button{background:var(--admin-field);color:var(--ui-secondary);border:1px solid var(--admin-line);min-height:34px;padding:7px 12px}
:root[data-theme] .admin-wrap .codex-admin .cx-facts{gap:14px}
:root[data-theme] .admin-wrap .codex-admin :is(#cx-events,#cx-audit){max-height:420px;overflow:auto;scrollbar-gutter:stable;overscroll-behavior:contain}
:root[data-theme] .admin-wrap :is(.radar-admin-stat,.radar-admin-user,.radar-tile){background:var(--admin-subtle);border-color:var(--admin-line);box-shadow:none}
:root[data-theme] .admin-wrap :is(.radar-admin-stat strong,.radar-probability){color:var(--ui-ink);font-variant-numeric:tabular-nums}
:root[data-theme] .admin-wrap .radar-page :is(button.secondary,.button.secondary){background:var(--admin-field);color:var(--ui-secondary);border-color:var(--admin-line)}
@media(prefers-reduced-motion:no-preference){
 :root[data-theme] .admin-wrap :is(.user-expand,.username-history-trigger,.notice-tabs button,.account-actions button){transition:background-color .14s ease,color .14s ease,border-color .14s ease;transform:none}
 :root[data-theme] .admin-wrap :is(details[open]>.cx-account,details[open]>.notice-audience-list){animation:admin-detail-in .12s ease-out}
 @keyframes admin-detail-in{from{opacity:.8}to{opacity:1}}
}
@media(max-width:600px){:root[data-theme] .admin-wrap .notice-tabs{display:flex}:root[data-theme] .admin-wrap .notice-tabs button{flex:1;padding:8px 12px}:root[data-theme] .admin-wrap .codex-admin .log-panel{padding:16px}}

/* Match wallpaper specificity, including nested administrative forms. */
:root[data-theme][data-wallpaper-active] body .admin-wrap .clash-content :is(.card,.log-panel){background:var(--admin-surface)}
:root[data-theme] .admin-wrap .radar-admin-page{--admin-surface:var(--ui-soft);--admin-line:var(--ui-line);--admin-muted:var(--ui-secondary);--admin-ink:var(--ui-ink);--admin-accent:var(--ui-accent)}
:root[data-theme][data-wallpaper-active] .admin-wrap .radar-admin-page{--admin-surface:rgb(var(--wall-rgb)/max(.62,var(--wall-opacity)))}
:root[data-theme] .admin-wrap #cx-plans{max-height:480px;overflow:auto;scrollbar-gutter:stable;overscroll-behavior:contain}

/* Mobile navigation: center single- and multi-line labels within equal grid cells. */
@media(max-width:900px){
 :root[data-theme] .sidebar-shell{grid-auto-rows:1fr;align-items:stretch}
 :root[data-theme] .sidebar-shell>.sidebar-item{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:56px;box-sizing:border-box;text-align:center}
 :root[data-theme] .sidebar-shell>.sidebar-item>strong{margin:0;line-height:1.45;max-width:100%}
}

:root[data-theme] .site-header .site-brand{
  display:inline-flex;align-items:center;justify-content:center;flex:none;
  width:192px;height:60px;padding:2px 9px;box-sizing:border-box;
  border:0;border-radius:10px;background:transparent;box-shadow:none;
}
.site-brand picture{display:block;width:100%;height:100%}
.site-brand .brand-logo{display:block;width:100%;height:100%;object-fit:cover}
.auth-shell.login-shell{
  max-width:1060px;min-height:calc(100svh - 76px);padding-block:40px 52px;
  grid-template-columns:minmax(0,1fr) minmax(352px,428px);
  grid-template-areas:"brand form" "intro form";
  column-gap:clamp(34px,7vw,96px);row-gap:6px;align-content:center;
}
.login-brand{grid-area:brand;align-self:end;display:block;width:154px}
.login-brand .auth-brand-logo{display:block;width:100%;height:auto}
.login-intro{grid-area:intro;align-self:start;min-width:0}
.login-intro h2{margin:0;color:var(--ui-ink);font-size:clamp(32px,4.2vw,50px);line-height:1.18;letter-spacing:-.04em}
.login-intro p{margin:12px 0 0}
.login-intro .feature-list{margin-top:24px;gap:10px}
.login-intro .feature-icon{width:27px;height:27px;border-radius:8px}
:root[data-theme] .login-shell .login-card{grid-area:form;min-width:0;margin:0;border-radius:22px;padding:clamp(24px,3vw,36px)}
:root[data-theme="dark"][data-wallpaper-active] .login-intro h2{text-shadow:0 2px 14px #0007}

@media(max-width:850px){
  .auth-shell.login-shell{
    max-width:496px;min-height:0;padding-block:18px 44px;
    grid-template-columns:minmax(0,1fr);grid-template-areas:"brand" "form" "intro";row-gap:12px;
  }
  .login-brand{justify-self:center;width:100px}
  .login-intro{margin-top:12px;padding-inline:4px}
  .login-intro h2{font-size:25px}
  .login-intro .feature-list{display:flex;flex-wrap:wrap;margin-top:14px;gap:10px 14px}
}
@media(max-width:600px){
  :root[data-theme] .site-header .site-brand{width:154px;height:47px}
  :root[data-theme] body:has(.login-shell) .header-inner{padding:8px 12px;gap:8px;min-height:62px}
  :root[data-theme] body:has(.login-shell) .site-header .site-brand{width:134px;padding-inline:5px}
  .login-brand{width:84px}
}

/* Compact admin account cards on phones; desktop table remains unchanged. */
@media(max-width:600px){
 :root[data-theme] .admin-wrap .admin-table .account-row{grid-template-areas:"identity state" "usage quota" "upload download" "note expiry" "ips ips" "actions actions";grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 12px;padding:16px 14px;align-items:start}
 :root[data-theme] .admin-wrap .admin-table .account-row>td{padding:0;min-height:0;text-align:left;line-height:1.55}
 :root[data-theme] .admin-wrap .admin-table .account-row>td::before{margin-bottom:5px;font-size:11px;font-weight:500;color:var(--ui-secondary)}
 :root[data-theme] .admin-wrap .admin-table .account-row>td[data-label="用户"]{grid-area:identity}
 :root[data-theme] .admin-wrap .admin-table .account-row>td[data-label="状态"]{grid-area:state}
 :root[data-theme] .admin-wrap .admin-table .account-row>td[data-label="本周期流量"]{grid-area:usage}
 :root[data-theme] .admin-wrap .admin-table .account-row>td[data-label="本周期额度"]{grid-area:quota}
 :root[data-theme] .admin-wrap .admin-table .account-row>td[data-label="上传速度"]{grid-area:upload}
 :root[data-theme] .admin-wrap .admin-table .account-row>td[data-label="下载速度"]{grid-area:download}
 :root[data-theme] .admin-wrap .admin-table .account-row>td[data-label="备注"]{grid-area:note}
 :root[data-theme] .admin-wrap .admin-table .account-row>td[data-label="服务期限"]{grid-area:expiry}
 :root[data-theme] .admin-wrap .admin-table .account-row>td[data-label="在线 IP"]{grid-area:ips;border-top:1px solid var(--admin-line);padding-top:10px}
 :root[data-theme] .admin-wrap .admin-table .account-row>td[data-label="操作"]{grid-area:actions;border-top:1px solid var(--admin-line);padding-top:10px}
 :root[data-theme] .admin-wrap .admin-table .account-row>td[data-label="操作"]::before{display:none}
 :root[data-theme] .admin-wrap .admin-table .account-row :is(.account-state,.account-note,.user-expand){justify-content:flex-start}
 :root[data-theme] .admin-wrap .admin-table .account-row .user-expand{padding:0;min-height:28px;font-size:14px}
 :root[data-theme] .admin-wrap .admin-table .account-row .remark-line{text-align:left;margin:0;max-width:100%}
 :root[data-theme] .admin-wrap .admin-table .account-row .account-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:start;white-space:normal}
 :root[data-theme] .admin-wrap .admin-table .account-row .account-actions :is(button,summary){display:flex;align-items:center;justify-content:center;width:100%;box-sizing:border-box;min-height:40px;padding:8px 6px;line-height:1.4;font-size:12px}
 :root[data-theme] .admin-wrap .admin-table .account-row .account-actions .note-editor[open]{grid-column:1/-1}
 :root[data-theme] .admin-wrap .admin-table .account-row .account-actions .note-form{position:static;width:100%;max-width:100%;min-width:0;box-sizing:border-box;margin-top:8px}
 :root[data-theme] .admin-wrap .admin-table .account-row .account-actions .note-form :is(input,select,textarea){max-width:100%;min-width:0;box-sizing:border-box}
 :root[data-theme] .admin-wrap .admin-table .account-row.account-retained{grid-template-areas:"identity identity" "state state" "actions actions"}
}


/* Fixed-frame local wallpaper cropping; no backdrop blur on moving content. */
.wallpaper-upload [data-wallpaper-crop]{white-space:nowrap}
.wallpaper-crop-dialog{box-sizing:border-box;width:min(760px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 24px);padding:24px;border:1px solid var(--border,#dce3ec);border-radius:22px;background:#f8fafc;color:#263548;box-shadow:0 24px 70px #15243a40;overflow-y:auto;overscroll-behavior:contain}
.wallpaper-crop-dialog::backdrop{background:rgba(14,24,40,.58)}
.wallpaper-crop-dialog *{box-sizing:border-box}
.wallpaper-crop-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.wallpaper-crop-heading h2{margin:0;font-size:22px;line-height:1.3}
.wallpaper-crop-heading p{margin:7px 0 0;color:#617188;font-size:14px;line-height:1.5}
.wallpaper-crop-dialog button{width:auto;min-height:36px;padding:8px 13px;border:1px solid #d7dfeb;border-radius:10px;background:#fff;color:#43546b;font-size:13px;line-height:1.3;font-weight:600;box-shadow:none;cursor:pointer;transition:background-color .12s,color .12s}
.wallpaper-crop-heading>button{min-width:36px;font-size:21px;padding:4px}
.wallpaper-crop-ratios{display:flex;flex-wrap:wrap;gap:7px;margin:18px 0 14px}
.wallpaper-crop-ratios button[aria-pressed=true]{color:#2458b0;background:#e7efff;border-color:#91b3ef}
.wallpaper-crop-dialog button:hover{background:#edf2f9}
.wallpaper-crop-dialog button:focus-visible,.wallpaper-crop-frame:focus-visible{outline:2px solid #497ee5;outline-offset:3px}
.wallpaper-crop-stage{display:flex;align-items:center;justify-content:center;height:clamp(180px,42dvh,380px);width:100%;background:#1b2330;border-radius:14px;overflow:hidden}
.wallpaper-crop-frame{position:relative;flex:none;overflow:hidden;touch-action:none;cursor:grab;outline:1px solid #ffffffb0;box-shadow:0 0 0 1000px #0002}
.wallpaper-crop-frame:active{cursor:grabbing}
.wallpaper-crop-frame canvas{display:block;width:100%;height:100%}
.wallpaper-crop-grid{position:absolute;inset:0;pointer-events:none;background:linear-gradient(to right,transparent calc(33.333% - .5px),#ffffff50 33.333%,transparent calc(33.333% + .5px),transparent calc(66.666% - .5px),#ffffff50 66.666%,transparent calc(66.666% + .5px)),linear-gradient(to bottom,transparent calc(33.333% - .5px),#ffffff50 33.333%,transparent calc(33.333% + .5px),transparent calc(66.666% - .5px),#ffffff50 66.666%,transparent calc(66.666% + .5px))}
.wallpaper-crop-tools{display:flex;align-items:center;gap:14px;margin-top:17px}
.wallpaper-crop-tools label{display:flex;gap:10px;white-space:nowrap;margin:0;font-size:13px;color:#43546b}
.wallpaper-crop-tools output{min-width:40px;font-variant-numeric:tabular-nums}
.wallpaper-crop-tools input[type=range]{flex:1;min-width:40px;width:100%;height:28px;padding:0;margin:0;accent-color:#477de5;box-shadow:none;border:0;background:transparent}
.wallpaper-crop-hint,.wallpaper-crop-status{font-size:12px;line-height:1.6;color:#64748b;margin:10px 0}
.wallpaper-crop-status:empty{display:none}
.wallpaper-crop-footer{display:flex;align-items:center;gap:10px;border-top:1px solid #dde5ef;margin-top:16px;padding-top:16px}
.wallpaper-crop-footer span{flex:1;font-size:12px;color:#64748b}
.wallpaper-crop-dialog [data-crop-apply]{background:#3972dc;color:#fff;border-color:#3972dc}
.wallpaper-crop-dialog button:disabled{opacity:.55;cursor:wait}
html[data-theme=dark] .wallpaper-crop-dialog{background:#1c2636;color:#e6edf8;border-color:#36455c}
html[data-theme=dark] .wallpaper-crop-dialog button{background:#29374c;color:#d8e4f6;border-color:#465671}
html[data-theme=dark] .wallpaper-crop-ratios button[aria-pressed=true]{background:#294774;color:#d9e8ff;border-color:#6996e3}
html[data-theme=dark] .wallpaper-crop-dialog [data-crop-apply]{background:#3972dc;color:#fff;border-color:#3972dc}
html[data-theme=dark] .wallpaper-crop-dialog :is(p,label,output,.wallpaper-crop-footer span){color:#adbdd3}
html[data-theme=dark] .wallpaper-crop-footer{border-color:#36455c}
@media(max-width:540px){.wallpaper-crop-dialog{padding:16px;border-radius:18px}.wallpaper-crop-heading h2{font-size:20px}.wallpaper-crop-ratios{gap:6px;margin-top:14px}.wallpaper-crop-ratios button{padding:8px 10px;font-size:12px}.wallpaper-crop-tools{gap:8px;flex-wrap:wrap}.wallpaper-crop-tools label{gap:6px}.wallpaper-crop-tools button{padding:7px 9px}.wallpaper-crop-footer{flex-wrap:wrap}.wallpaper-crop-footer span{flex-basis:100%}.wallpaper-crop-footer button{flex:1;min-height:42px}}
@media(prefers-reduced-motion:reduce){.wallpaper-crop-dialog button{transition:none}}

/* Visible from the initial HTML, including while scripts/data are loading. */
#traffic-load-status:not([hidden]){display:flex;align-items:center;gap:9px;flex-wrap:wrap;min-height:24px}
#traffic-load-status[hidden]{display:none!important}
#traffic-load-status[data-loading="true"]::before{content:"";display:block;flex:0 0 16px;width:16px;height:16px;box-sizing:border-box;border:2px solid #9ca3af55;border-top-color:#8b919b;border-radius:50%;animation:traffic-loading-spin .85s linear infinite}
@keyframes traffic-loading-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){#traffic-load-status[data-loading="true"]::before{animation:none}}

/* Administrator traffic workspace: compact spacing with responsive controls. */
:root[data-theme] .admin-traffic.wrap{max-width:1640px;margin-top:22px;padding:0 24px}
:root[data-theme] .admin-traffic .clash-layout{grid-template-columns:188px minmax(0,1fr);gap:20px}
:root[data-theme] .admin-traffic .sidebar-shell{padding:14px 9px;border-radius:16px}
:root[data-theme] .admin-traffic .sidebar-heading{padding:8px 12px 12px}
:root[data-theme] .admin-traffic .sidebar-item{padding:10px 12px;margin-top:3px;border-radius:9px}
:root[data-theme] .admin-traffic .sidebar-item strong{font-size:13px}
:root[data-theme] .admin-traffic .sidebar-item small{font-size:10px;margin-top:3px}
:root[data-theme] .admin-traffic .clash-content{--traffic-space:14px}
:root[data-theme] .admin-traffic .page-intro{margin-bottom:14px;display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 14px}
:root[data-theme] .admin-traffic .page-intro .eyebrow{display:none}
:root[data-theme] .admin-traffic .page-intro h1{font-size:26px;margin:0;line-height:1.4}
:root[data-theme] .admin-traffic .page-intro p{font-size:12px;margin:0}
:root[data-theme] .admin-traffic .clash-content .card{padding:16px 18px;border-radius:14px;margin-bottom:14px}
:root[data-theme] .admin-traffic .traffic-panel>h2{font-size:16px;margin-bottom:10px}
:root[data-theme] .admin-traffic #traffic-load-status:not([hidden]){margin:0 0 12px;min-height:22px}
:root[data-theme] .admin-traffic .traffic-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-bottom:14px;padding-bottom:12px;border-bottom:1px solid var(--admin-line)}
:root[data-theme] .admin-traffic .traffic-shortcuts{width:fit-content;max-width:100%;margin:0;padding:3px;gap:3px;border-radius:9px;flex-wrap:wrap}
:root[data-theme] .admin-traffic .traffic-shortcuts a{min-height:32px;padding:5px 10px;font-size:12px;line-height:20px;box-shadow:none;border:1px solid transparent;background:transparent;color:var(--ui-secondary);border-radius:6px}
:root[data-theme] .admin-traffic .traffic-shortcuts a[aria-current="true"]{background:var(--ui-tint);color:var(--ui-accent);border-color:color-mix(in srgb,var(--ui-accent) 24%,transparent);font-weight:650;box-shadow:none}
:root[data-theme] .admin-traffic .traffic-filters{grid-template-columns:repeat(2,minmax(130px,.85fr)) repeat(2,minmax(130px,1fr)) 104px;gap:10px}
:root[data-theme] .admin-traffic .traffic-filters label{font-size:12px;margin-bottom:5px}
:root[data-theme] .admin-traffic .traffic-filters :is(input,select,button){height:40px;min-height:40px;font-size:13px;border-radius:8px;padding:8px 10px}
:root[data-theme] .admin-traffic .traffic-filters button{grid-column:auto;font-weight:650}
:root[data-theme] .admin-traffic .traffic-note{font-size:11px;line-height:1.7;margin-top:10px}
:root[data-theme] .admin-traffic .traffic-metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 14px}
:root[data-theme] .admin-traffic .traffic-metrics>.stat-card{display:flex;flex-direction:column;gap:5px;min-height:100px;margin:0;padding:14px 18px;justify-content:center}
:root[data-theme] .admin-traffic .traffic-metrics .metric-label{font-size:12px}
:root[data-theme] .admin-traffic .traffic-metrics .metric{font-size:28px;line-height:1.2;margin:0;letter-spacing:-.6px}
:root[data-theme] .admin-traffic .traffic-metrics .usage-detail{margin:0;font-size:11px}
:root[data-theme] .admin-traffic .traffic-metrics>.stat-card::after{width:54px;height:54px;right:-18px;top:-20px}
:root[data-theme] .admin-traffic .traffic-table :is(th,td){padding:9px 12px;font-size:12px;line-height:1.55}
:root[data-theme] .admin-traffic .traffic-table th{font-size:11px}
:root[data-theme] .admin-traffic .traffic-table td:first-child{min-width:140px;line-height:1.55}
:root[data-theme] .admin-traffic .traffic-server-ip{margin-top:2px;font-size:10px}
:root[data-theme] .admin-traffic .traffic-table-wrap{border-color:var(--admin-line);border-radius:8px}
:root[data-theme] .admin-traffic .traffic-charts{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;margin-bottom:14px;align-items:stretch}
:root[data-theme] .admin-traffic .traffic-charts>.card{margin:0;min-width:0}
:root[data-theme] .admin-traffic .traffic-charts .traffic-chart{min-width:480px}
:root[data-theme] .admin-traffic .traffic-key{margin-bottom:8px;gap:6px 14px;font-size:11px}
:root[data-theme] .admin-traffic .traffic-explanation{margin-top:10px;border-top:1px solid var(--admin-line);padding-top:8px;font-size:11px;color:var(--ui-secondary)}
:root[data-theme] .admin-traffic .traffic-explanation>summary{cursor:pointer;width:fit-content;line-height:1.8;font-weight:500}
:root[data-theme] .admin-traffic .traffic-explanation .traffic-note{margin-top:6px}
:root[data-theme] .admin-traffic .traffic-panel>summary{font-size:13px;padding:0;line-height:1.7}
:root[data-theme] .admin-traffic .traffic-panel[open]>summary{margin-bottom:10px}
:root[data-theme] .admin-traffic .traffic-operations-body{margin-top:10px}
:root[data-theme] .admin-traffic .traffic-operations-body>.card{padding:0;border:0;box-shadow:none;margin:14px 0 0}
:root[data-theme] .admin-traffic .route-users-toolbar{gap:8px;margin-bottom:12px}
:root[data-theme] .admin-traffic .route-users-toolbar p{margin:0}
:root[data-theme] .admin-traffic .route-users-toolbar button{min-height:32px;padding:5px 10px;font-size:12px}
:root[data-theme] .admin-traffic .route-users-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,460px),1fr));gap:14px;margin-bottom:14px;align-items:start}
:root[data-theme] .admin-traffic .route-users-grid>.card{margin:0;padding:14px 16px}
:root[data-theme] .admin-traffic .route-users-summary{margin-top:4px;gap:4px 8px}
:root[data-theme] .admin-traffic .route-users-total{font-size:15px;color:var(--ui-accent)}
:root[data-theme] .admin-traffic .route-users-meta{font-size:11px}
:root[data-theme] .admin-traffic .route-users-table{margin-top:10px}
:root[data-theme] .admin-traffic .traffic-loading-line{margin:4px 0 10px}
:root[data-theme] .admin-traffic .traffic-loading-chart{height:180px}
@media(min-width:1440px){
 :root[data-theme] .admin-traffic .traffic-charts{grid-template-columns:repeat(2,minmax(0,1fr))}
 :root[data-theme] .admin-traffic .traffic-charts .traffic-chart text{font-size:14px}
}
@media(max-width:1199px){
 :root[data-theme] .admin-traffic .traffic-filters{grid-template-columns:repeat(4,minmax(0,1fr))}
 :root[data-theme] .admin-traffic .traffic-filters button{grid-column:1/-1}
}
@media(max-width:900px){
 :root[data-theme] .admin-traffic.wrap{padding:0 18px;margin-top:18px}
 :root[data-theme] .admin-traffic .clash-layout{grid-template-columns:minmax(0,1fr);gap:16px}
 :root[data-theme] .admin-traffic .sidebar-shell{grid-template-columns:repeat(5,minmax(0,1fr));padding:6px;gap:4px}
 :root[data-theme] .admin-traffic .sidebar-item{min-height:44px;margin:0;padding:8px 4px}
 :root[data-theme] .admin-traffic .sidebar-item strong{font-size:12px}
}
@media(max-width:600px){
 :root[data-theme] .admin-traffic.wrap{padding:0 12px;margin-top:14px}
 :root[data-theme] .admin-traffic .sidebar-shell{grid-template-columns:repeat(3,minmax(0,1fr))}
 :root[data-theme] .admin-traffic .page-intro h1{font-size:24px}
 :root[data-theme] .admin-traffic .clash-content .card{padding:14px;border-radius:12px}
 :root[data-theme] .admin-traffic .traffic-toolbar{gap:8px;margin-bottom:12px;padding-bottom:10px}
 :root[data-theme] .admin-traffic .traffic-shortcuts{width:100%}
 :root[data-theme] .admin-traffic nav.traffic-shortcuts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
 :root[data-theme] .admin-traffic .traffic-shortcuts a{padding:6px 7px;min-height:36px;font-size:11px;text-align:center}
 :root[data-theme] .admin-traffic .traffic-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 :root[data-theme] .admin-traffic .traffic-filters>div{grid-column:auto!important}
 :root[data-theme] .admin-traffic .traffic-filters :is(input,select,button){height:42px;min-height:42px;font-size:12px}
 :root[data-theme] .admin-traffic .traffic-metrics{grid-template-columns:minmax(0,1fr);gap:8px}
 :root[data-theme] .admin-traffic .traffic-metrics>.stat-card{display:grid;grid-template-columns:minmax(0,1fr) auto;min-height:68px;gap:2px 10px;padding:12px 14px}
 :root[data-theme] .admin-traffic .traffic-metrics .metric{grid-column:2;grid-row:1/3;align-self:center;font-size:25px;white-space:nowrap}
 :root[data-theme] .admin-traffic .traffic-metrics .usage-detail{grid-column:1;font-size:10px}
 :root[data-theme] .admin-traffic .traffic-charts .traffic-chart{min-width:480px}
 :root[data-theme] .admin-traffic .traffic-table :is(th,td){padding:8px 9px;font-size:11px}
 :root[data-theme] .admin-traffic .route-users-table td{padding:0}
 :root[data-theme] .admin-traffic .route-users-grid{grid-template-columns:minmax(0,1fr)}
}

/* User traffic: explicit chart rows, aligned detail cards, no empty bandwidth placeholder. */
:root[data-theme] .traffic-page.user-traffic .clash-content{display:block}
:root[data-theme] .traffic-page.user-traffic .user-traffic-charts{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;margin-bottom:20px;align-items:stretch}
:root[data-theme] .traffic-page.user-traffic .user-traffic-charts>.traffic-panel{margin:0;min-width:0}
:root[data-theme] .traffic-page.user-traffic .traffic-metrics>.stat-card{min-height:118px;padding:18px 22px;gap:8px}
:root[data-theme] .traffic-page.user-traffic .traffic-panel>h2{margin-bottom:14px}
:root[data-theme] .traffic-page.user-traffic .traffic-consumption-note{margin:12px 0 0;padding-top:10px;border-top:1px solid var(--ui-line)}
:root[data-theme] .traffic-page.user-traffic .traffic-note:empty{display:none}
:root[data-theme] .traffic-page.user-traffic .traffic-detail-grid{align-items:start;gap:20px}
:root[data-theme] .traffic-page.user-traffic .traffic-detail-grid>.traffic-compact{display:flex;flex-direction:column;box-sizing:border-box}
:root[data-theme] .traffic-page.user-traffic .traffic-card-heading{min-height:26px}
:root[data-theme] .traffic-page.user-traffic .traffic-daily .traffic-pagination{margin-top:14px;padding-top:0}
.traffic-chart-stage,.traffic-status-host{position:relative;min-width:0}
:root[data-theme] .traffic-page #traffic-load-status{position:absolute;inset:0;z-index:3;margin:0;min-height:0;padding:16px;box-sizing:border-box;border-radius:10px;align-content:center;justify-content:center;gap:9px;background:color-mix(in srgb,var(--ui-surface) 82%,transparent);color:var(--ui-secondary);font-size:13px;line-height:1.7;backdrop-filter:blur(1px)}
:root[data-theme] .traffic-page #traffic-load-status:not([hidden]){display:flex;visibility:visible}
:root[data-theme] .traffic-page #traffic-load-status[hidden]{display:none!important}
.traffic-chart-stage:has(>.traffic-empty){min-height:190px}
@media(min-width:1400px){:root[data-theme] .traffic-page.user-traffic .user-traffic-charts.has-bandwidth{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:1180px){:root[data-theme] .traffic-page.user-traffic .traffic-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){:root[data-theme] .traffic-page.user-traffic .traffic-metrics>.stat-card{min-height:0;padding:14px 16px}:root[data-theme] .traffic-page.user-traffic .user-traffic-charts{gap:16px;margin-bottom:16px}:root[data-theme] .traffic-page.user-traffic .traffic-detail-grid{gap:16px}:root[data-theme] .traffic-page.user-traffic .traffic-detail-grid>.traffic-compact{padding:16px}:root[data-theme] .traffic-page #traffic-load-status{font-size:12px;padding:12px}}

/* Match desktop card heights by filling the detail table, keeping the footer close. */
@media(min-width:1180px){
 :root[data-theme] .traffic-page.user-traffic .traffic-detail-grid{align-items:stretch}
 :root[data-theme] .traffic-page.user-traffic .traffic-daily{min-height:0}
 :root[data-theme] .traffic-page.user-traffic .traffic-daily>.traffic-table-wrap{flex:1 1 0;min-height:0;contain:size;overflow:hidden}
 :root[data-theme] .traffic-page.user-traffic .traffic-daily .traffic-table{height:100%}
 :root[data-theme] .traffic-page.user-traffic .traffic-daily .traffic-table thead{height:44px}
 :root[data-theme] .traffic-page.user-traffic .traffic-daily .traffic-table th{position:sticky;top:0;z-index:1;background:var(--ui-surface)}
}

/* A single selected route is a compact summary above its detail table. */
@media(min-width:1180px){
 :root[data-theme] .traffic-page.user-traffic .traffic-detail-grid:not(:has(.traffic-routes tbody tr:nth-child(2))){grid-template-columns:minmax(0,1fr)}
 :root[data-theme] .traffic-page.user-traffic .traffic-detail-grid:not(:has(.traffic-routes tbody tr:nth-child(2))) .traffic-daily>.traffic-table-wrap{contain:none;flex:0 1 auto}
 :root[data-theme] .traffic-page.user-traffic .traffic-detail-grid:not(:has(.traffic-routes tbody tr:nth-child(2))) .traffic-daily .traffic-table{height:auto}
}

:root[data-theme] .traffic-page.user-traffic .traffic-daily>.traffic-table-wrap{overflow:hidden}

/* Keep the selected user traffic date visible with and without wallpaper. */
:root[data-theme] body .user-traffic .traffic-shortcuts a.button[aria-current="true"]{background:#2563eb;color:#fff;border-color:#2563eb;font-weight:700;box-shadow:0 2px 6px #2563eb26}
:root[data-theme="dark"] body .user-traffic .traffic-shortcuts a.button[aria-current="true"]{background:#a7c4ff;color:#13294b;border-color:#a7c4ff;box-shadow:0 2px 6px #0003}

/* Dark mode optimization: wallpaper night dimming, contrast & form readability. */
:root[data-theme="dark"][data-wallpaper-active] body::before{
  background-image:linear-gradient(rgb(var(--wall-shade-rgb) / max(.48,var(--wall-shade))),rgb(var(--wall-shade-rgb) / max(.48,var(--wall-shade)))),var(--wall-image);
}
:root[data-theme="dark"] body .site-header nav:not(.user-nav) :is(.theme-picker,.header-link){
  color:#dbe4f0;
}
:root[data-theme="dark"] body .site-header nav:not(.user-nav) .theme-picker select{
  background:#151a24;
  color:#f1f5f9;
  border-color:#3a4559;
}
:root[data-theme="dark"] body .site-header nav:not(.user-nav) .header-link:hover{
  color:#fff;
  background:rgba(131,170,255,.16);
  text-decoration:none;
}
:root[data-theme="dark"] body .auth-intro h1{
  color:#f8fafc;
  text-shadow:0 2px 14px rgba(0,0,0,.45);
}
:root[data-theme="dark"] body .auth-intro p{
  color:#d8e2ef;
  text-shadow:0 1px 8px rgba(0,0,0,.45);
}
:root[data-theme="dark"] body .auth-intro .feature{
  color:#e2e8f0;
  text-shadow:0 1px 8px rgba(0,0,0,.45);
}
:root[data-theme="dark"] body .auth-intro .feature-icon{
  background:rgba(20,42,60,.72);
  border-color:rgba(126,225,223,.45);
  color:#9dece9;
}
:root[data-theme="dark"] body .auth-card input:-webkit-autofill,
:root[data-theme="dark"] body .auth-card input:-webkit-autofill:hover,
:root[data-theme="dark"] body .auth-card input:-webkit-autofill:focus{
  -webkit-text-fill-color:#f1f5f9;
  -webkit-box-shadow:0 0 0 1000px #222938 inset;
  transition:background-color 9999s ease-out 0s;
}
:root[data-theme="dark"] body .auth-card :is(.password-toggle,[data-password-toggle]){
  color:#cbd5e1;
}
:root[data-theme="dark"] body .auth-card :is(.password-toggle,[data-password-toggle]):hover{
  color:#f8fafc;
}

/* Sync light/dark rooster brand marks with the page data-theme switch. */
.site-brand .brand-logo-dark,
.login-brand .login-brand-dark{display:none}
:root[data-theme="dark"] .site-brand .brand-logo-light,
:root[data-theme="dark"] .login-brand .login-brand-light{display:none}
:root[data-theme="dark"] .site-brand .brand-logo-dark,
:root[data-theme="dark"] .login-brand .login-brand-dark{display:block}
.login-brand picture{display:block;width:100%}
:root[data-theme="dark"] .login-brand .auth-brand-logo{filter:drop-shadow(0 6px 14px rgba(6,9,16,.34))}

/* Scheme 1 (Refined): Pixel-matched warm obsidian-gold inputs & Turnstile box with clean 3px inner seam mask.
   Note: Turnstile mounts its iframe inside a closed Shadow DOM, so match the light-DOM host > div. */
:root[data-theme] body .login-shell .login-card input[name="username"],
:root[data-theme] body .login-shell .login-card input[name="password"],
:root[data-theme] body .login-shell .login-card input:not([type="hidden"]){
  border-radius:11px;
  min-height:52px;
}
:root[data-theme] body .login-shell .login-card .primary-action{
  border-radius:11px;
  min-height:50px;
}
.auth-card .login-verification:not([data-widget-size="compact"]) [data-turnstile-mount]{
  position:relative;
  border-radius:11px;
  overflow:hidden;
  box-sizing:border-box;
}
:root[data-theme="dark"] body .auth-card .login-verification:not([data-widget-size="compact"]) [data-turnstile-mount]:empty{
  background:#1d1912;
  border:1px solid rgba(232,198,138,.42);
}
:root[data-theme="dark"] body .auth-card .login-verification:not([data-widget-size="compact"]) [data-turnstile-mount]:has(> div){
  background:#171615;
}
:root[data-theme="dark"] body .auth-card .login-verification:not([data-widget-size="compact"]) [data-turnstile-mount] > div{
  filter:brightness(.72) contrast(1.15) sepia(.22);
  transition:filter .22s ease;
}
:root[data-theme="dark"] body .auth-card .login-verification[data-state="success"]:not([data-widget-size="compact"]) [data-turnstile-mount] > div{
  filter:brightness(.68) contrast(1.14) sepia(.22);
}
:root[data-theme="dark"] body .auth-card .login-verification:not([data-widget-size="compact"]) [data-turnstile-mount]:has(> div)::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:11px;
  border:1px solid rgba(232,198,138,.42);
  box-shadow:inset 0 0 0 3px #171615;
  pointer-events:none;
  z-index:2;
  transition:border-color .22s ease,box-shadow .22s ease;
}
:root[data-theme="dark"] body .auth-card .login-verification[data-state="success"]:not([data-widget-size="compact"]) [data-turnstile-mount]:has(> div)::after{
  border-color:rgba(242,210,148,.52);
  box-shadow:inset 0 0 0 3px #161514;
}
:root[data-theme="dark"] body .auth-card [data-verification-status]{
  color:#8f897f;
  font-size:11.5px;
}
:root[data-theme="light"] body .auth-card .login-verification:not([data-widget-size="compact"]) [data-turnstile-mount]:has(> div)::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:11px;
  border:1px solid #d2dbe6;
  box-shadow:inset 0 0 0 3px #fafafa;
  pointer-events:none;
  z-index:2;
}

/* ==========================================================================
   Global Dark Mode: Obsidian Ink & Champagne Gold (暗夜鎏金)
   Applies consistently across Login, Auth, User Panel, Admin Panel & Dialogs.
   ========================================================================== */
:root[data-theme="dark"]{
  --ui-bg:#11100e;
  --ui-surface:#1a1815;
  --ui-soft:#221f1a;
  --ui-line:rgba(226,198,146,.16);
  --ui-ink:#f7f3ea;
  --ui-secondary:#ddd6ca;
  --ui-muted:#bdb5a8;
  --ui-accent:#e6c98e;
  --ui-tint:rgba(230,201,142,.15);
  --ui-shadow:0 8px 28px rgba(4,6,12,.42);
  --ui-green:#ecd096;
  --wall-rgb:24 21 17;
  --wall-shade-rgb:12 11 9;
  --action-secondary-bg:#26221b;
  --action-secondary-hover:#312b22;
  --action-secondary-ink:#f1ece2;
  --action-secondary-border:rgba(226,198,146,.24);
  --action-disabled-bg:#211e19;
  --action-disabled-ink:#857f75;
}

:root[data-theme="dark"] body{
  background:
    radial-gradient(ellipse at 18% 24%,rgba(226,178,102,.08),transparent 48%),
    radial-gradient(ellipse at 92% 4%,rgba(204,162,92,.07),transparent 46%),
    var(--ui-bg);
  color:var(--ui-ink);
}
:root[data-theme="dark"][data-wallpaper-active] body::before{
  background-image:linear-gradient(rgb(var(--wall-shade-rgb) / var(--wall-shade)),rgb(var(--wall-shade-rgb) / var(--wall-shade))),var(--wall-image);
}

/* Header & Navigation */
:root[data-theme="dark"] .site-header{
  background:rgba(18,16,13,.92);
  border-bottom-color:rgba(226,198,146,.16);
}
:root[data-theme="dark"][data-wallpaper-active] body .site-header{
  background:rgb(var(--wall-rgb) / var(--wall-opacity));
}
:root[data-theme="dark"] .user-nav .theme-options{
  background:#1c1915;
  border-color:rgba(226,198,146,.22);
  box-shadow:0 14px 36px rgba(4,6,12,.58);
}
:root[data-theme="dark"] .user-nav :is(.header-action,button.wallpaper-header-button,#theme-menu summary):hover{
  background:var(--ui-tint)!important;
  color:var(--ui-accent);
}
:root[data-theme="dark"] body .site-header nav:not(.user-nav) :is(.theme-picker,.header-link){
  color:#ecdab6;
}
:root[data-theme="dark"] body .site-header nav:not(.user-nav) .theme-picker select{
  background:#211d16;
  color:var(--ui-ink);
  border-color:rgba(232,200,144,.24);
}
:root[data-theme="dark"] body .site-header nav:not(.user-nav) .header-link:hover{
  color:#fff8ea;
  background:rgba(235,191,114,.14);
}

/* Sidebar */
:root[data-theme="dark"] .sidebar-shell{
  border-color:rgba(226,198,146,.16);
  box-shadow:var(--ui-shadow),inset 0 1px 0 rgba(255,238,204,.05);
}
:root[data-theme="dark"] .sidebar-item:hover{
  background:rgba(232,196,122,.07);
  color:#f8f3e9;
}
:root[data-theme="dark"] .sidebar-item[aria-current="page"],
:root[data-theme="dark"][data-wallpaper-active] body .sidebar-item[aria-current="page"]{
  background:rgba(232,196,122,.14);
  color:#f4e1b6;
  box-shadow:inset 3px 0 #e3c17c;
}
:root[data-theme="dark"] .sidebar-item[aria-current="page"] small{
  color:#e4cfa0;
  opacity:.92;
}

/* Cards & Summary Panels */
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .clash-content .card{
  border-color:rgba(226,198,146,.15);
  box-shadow:var(--ui-shadow),inset 0 1px 0 rgba(255,238,204,.05);
}
:root[data-theme="dark"]:not([data-wallpaper-active]) .total-card,
:root[data-theme="dark"]:not([data-wallpaper-active]) .service-expiry-card{
  background:linear-gradient(125deg,#252019,#181613 68%);
}
:root[data-theme="dark"] .quota-item{
  background:rgba(255,244,224,.035);
  border:1px solid rgba(226,198,146,.11);
}
:root[data-theme="dark"] .quota-item:last-child{
  background:color-mix(in srgb,var(--ui-green) 9%,var(--ui-surface));
  border-color:color-mix(in srgb,var(--ui-green) 24%,transparent);
}
:root[data-theme="dark"] .codebox{
  background:#1b1812;
  border-color:rgba(226,198,146,.18);
  color:#ebe4d7;
}
:root[data-theme="dark"][data-wallpaper-active] body .codebox{
  background:rgb(12 15 22 / .56);
  border-color:rgba(226,198,146,.22);
  color:#f0e9dc;
}
:root[data-theme="dark"] .data-note{
  border-left-color:#dfb76b;
  background:rgba(232,196,122,.08);
  color:#d6cfc3;
}
:root[data-theme="dark"] .notice{
  border-color:rgba(232,196,122,.28);
  background:rgba(232,196,122,.10);
  color:#f3e6cc;
}
:root[data-theme="dark"] .notice.error{
  border-color:rgba(235,114,136,.36);
  background:rgba(148,42,64,.24);
  color:#ffd6dc;
}
:root[data-theme="dark"] .status-pill{
  background:rgba(118,199,181,.16);
  color:#8cd8c5;
}
:root[data-theme="dark"] .node-state{color:#8cd8c5}

/* Inputs & Focus */
:root[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea{
  background:#1c1812;
  border-color:rgba(232,198,138,.32);
  color:var(--ui-ink);
}
:root[data-theme="dark"] input:focus,
:root[data-theme="dark"] select:focus,
:root[data-theme="dark"] textarea:focus{
  border-color:#e4bd72;
  box-shadow:0 0 0 3px rgba(228,189,114,.18);
}

/* Primary & Danger Buttons */
:root[data-theme="dark"] body button:not(.secondary):not(.danger):not(:disabled):not(:where(.node-toggle,[data-theme-choice],.wallpaper-close,.wallpaper-link,.wallpaper-preset,.wallpaper-header-button,.password-toggle,.user-expand,.username-history-trigger,.rename-close,.radar-platform-option,[data-wallpaper-open],.wallpaper-crop-dialog *,.notice-tabs *,.account-actions *,.notification-tabs *)),
:root[data-theme="dark"] body .button:not(.secondary):not(.danger):not(:where(.traffic-shortcuts *,.account-actions *)){
  background:linear-gradient(135deg,#ecc982,#d4a455);
  color:#1a1409;
  border-color:transparent;
  font-weight:600;
  box-shadow:0 3px 12px rgba(212,164,85,.18);
  transition:background .2s ease,color .2s ease,box-shadow .2s ease,border-color .2s ease;
}
:root[data-theme="dark"] body button:not(.secondary):not(.danger):not(:disabled):not(:where(.node-toggle,[data-theme-choice],.wallpaper-close,.wallpaper-link,.wallpaper-preset,.wallpaper-header-button,.password-toggle,.user-expand,.username-history-trigger,.rename-close,.radar-platform-option,[data-wallpaper-open],.wallpaper-crop-dialog *,.notice-tabs *,.account-actions *,.notification-tabs *)):hover,
:root[data-theme="dark"] body .button:not(.secondary):not(.danger):not(:where(.traffic-shortcuts *,.account-actions *)):hover{
  background:linear-gradient(135deg,#f5d899,#e0b264);
  color:#1a1409;
  box-shadow:0 5px 16px rgba(218,168,86,.28);
}
:root[data-theme="dark"] button:disabled{
  box-shadow:none;
}
:root[data-theme="dark"] button.danger,
:root[data-theme="dark"] .button.danger{
  background:#3a1d25;
  border-color:rgba(235,114,136,.34);
  color:#f7a6b5;
}
:root[data-theme="dark"] button.danger:hover:not(:disabled),
:root[data-theme="dark"] .button.danger:hover{
  background:#4b2530;
  border-color:rgba(245,134,154,.5);
}

/* Traffic Metrics & Shortcuts */
:root[data-theme="dark"] .traffic-metrics>.stat-card::after{background:rgba(232,196,122,.11)}
:root[data-theme="dark"] .traffic-metrics>.stat-card:nth-child(2)::after{background:rgba(218,184,126,.12)}
:root[data-theme="dark"] .traffic-metrics>.stat-card:nth-child(3)::after{background:rgba(204,154,116,.12)}
:root[data-theme="dark"] .traffic-shortcuts{
  background:#1a1712;
  border-color:rgba(226,198,146,.16);
}
:root[data-theme="dark"] .traffic-shortcuts a.active,
:root[data-theme="dark"] .traffic-shortcuts a[aria-current="page"],
:root[data-theme="dark"] body .user-traffic .traffic-shortcuts a.button[aria-current="true"]{
  background:linear-gradient(135deg,#ecc982,#d4a455);
  color:#1a1409;
  border-color:transparent;
  font-weight:700;
  box-shadow:0 2px 8px rgba(212,164,85,.24);
}
:root[data-theme="dark"] #traffic-load-status[data-loading="true"]::before{
  border-color:rgba(232,196,122,.22);
  border-top-color:#e8c47a;
}
@media(max-width:600px){
  :root[data-theme="dark"] .traffic-metrics>.stat-card{border-left-color:#e4bd72}
  :root[data-theme="dark"] .traffic-metrics>.stat-card:nth-child(2){border-left-color:#d4b072}
  :root[data-theme="dark"] .traffic-metrics>.stat-card:nth-child(3){border-left-color:#c99b7a}
}

/* Wallpaper & Crop Dialogs */
:root[data-theme="dark"] .wallpaper-slider input[type="range"],
:root[data-theme="dark"] .wallpaper-crop-tools input[type="range"]{
  accent-color:#e4bd72;
}
:root[data-theme="dark"] .wallpaper-sample-card i{background:#e4bd72}
:root[data-theme="dark"] .wallpaper-sample-card i+i{background:#c8a464}
html[data-theme="dark"] .wallpaper-crop-dialog{
  background:#181c26;
  color:#f3eee4;
  border-color:rgba(226,198,146,.22);
}
html[data-theme="dark"] .wallpaper-crop-dialog button{
  background:#242936;
  color:#e8e1d5;
  border-color:rgba(226,198,146,.22);
}
html[data-theme="dark"] .wallpaper-crop-ratios button[aria-pressed="true"]{
  background:rgba(232,196,122,.16);
  color:#f3d28e;
  border-color:#e4bd72;
}
html[data-theme="dark"] .wallpaper-crop-dialog [data-crop-apply]{
  background:linear-gradient(135deg,#ecc982,#d4a455);
  color:#1a1409;
  border-color:transparent;
}
html[data-theme="dark"] .wallpaper-crop-dialog :is(p,label,output,.wallpaper-crop-footer span){color:#bfb8ad}
html[data-theme="dark"] .wallpaper-crop-footer{border-color:rgba(226,198,146,.16)}

/* Radar, Notifications & Community Dark Alignment */
:root[data-theme="dark"] body #radar-platform-menu{
  --menu-bg:#191d28;
  --menu-ink:#ece6dc;
  --menu-hover:#252a38;
  --menu-selected:rgba(232,196,122,.16);
  --menu-accent:#f0cc84;
  --menu-line:rgba(226,198,146,.22);
}
:root[data-theme="dark"] body .radar-admin-page{
  --admin-line:rgba(226,198,146,.18);
  --admin-surface:#1b202c;
  --admin-muted:#b8b1a6;
  --admin-ink:#f3eee4;
  --admin-accent:#e8c47a;
}
:root[data-theme="dark"] body .telegram-community,
:root[data-theme="dark"] body .community-card{
  --community-line:rgba(226,198,146,.20);
  --community-ink:#f3eee4;
  --community-muted:#bfb8ad;
}
:root[data-theme="dark"] body .notification-tabs button[aria-pressed="true"]{
  background:rgba(232,196,122,.16);
  color:#f3d28e;
}
:root[data-theme="dark"] body .notification-item{
  background:rgba(255,244,224,.03);
  border-color:rgba(226,198,146,.15);
}
:root[data-theme="dark"] body .notification-item:hover{
  background:rgba(232,196,122,.07);
  border-color:rgba(226,198,146,.30);
}
:root[data-theme="dark"] body .notification-item.is-unread{
  border-left-color:#e4bd72;
}
:root[data-theme="dark"] body .notification-back,
:root[data-theme="dark"] body .notification-item.is-unread .notification-read-state{
  color:#e8c47a;
}
:root[data-theme="dark"] body dialog.rename-dialog{
  background:#181c26;
  border-color:rgba(226,198,146,.24);
  color:var(--ui-ink);
}
:root[data-theme="dark"] body .rename-dialog .rename-timeline li:before{
  background:#e8c47a;
  box-shadow:0 0 0 3px rgba(232,196,122,.18);
}

/* Auth & Login Pages */
:root[data-theme="dark"] body .auth-intro .feature-icon{
  color:#f0cc84;
  background:rgba(235,191,114,.12);
  border-color:rgba(235,191,114,.30);
}
:root[data-theme="dark"] body .auth-card{
  background:linear-gradient(155deg,rgba(28,25,20,.95),rgba(17,15,12,.97) 66%);
  border-color:rgba(232,198,138,.30);
  box-shadow:0 22px 56px rgba(5,8,14,.58),inset 0 1px 0 rgba(255,236,198,.08);
}
:root[data-theme="dark"] body .auth-card .eyebrow,
:root[data-theme="dark"] body .auth-intro .eyebrow{
  color:#e8c47a;
}
:root[data-theme="dark"] body:has(.login-shell){
  --ui-ink:#f5f1e8;
  --ui-secondary:#cbc5bb;
  --ui-accent:#ebd096;
  --ui-line:rgba(232,198,138,.22);
  --login-panel:#191612;
  --login-field:#1d1912;
  --login-glow:
    radial-gradient(ellipse at 22% 32%,rgba(226,178,102,.15),transparent 52%),
    radial-gradient(ellipse at 86% 8%,rgba(206,164,94,.10),transparent 46%);
  background:var(--login-glow),linear-gradient(135deg,#100e0c,#15120f 54%,#191612);
}
:root[data-theme="dark"][data-wallpaper-active] body:has(.login-shell)::before{
  background-image:
    linear-gradient(rgb(var(--wall-shade-rgb) / var(--wall-shade)),rgb(var(--wall-shade-rgb) / var(--wall-shade))),
    var(--wall-image);
  background-position:center,var(--wall-x) var(--wall-y);
  filter:blur(var(--wall-blur));
}
:root[data-theme="dark"] body:has(.login-shell) .site-header{
  background:rgb(18 16 13 / .88);
  border-bottom-color:rgba(232,200,144,.16);
}
:root[data-theme="dark"][data-wallpaper-active] body:has(.login-shell) .site-header{
  background:rgb(var(--wall-rgb) / var(--wall-opacity));
}
/* Respect user's --wall-opacity on login/auth cards in both light and dark modes when wallpaper is active. */
:root[data-theme][data-wallpaper-active] body .auth-shell .auth-card{
  background:rgb(var(--wall-rgb) / var(--wall-opacity));
}
:root[data-theme="dark"][data-wallpaper-active] body .auth-shell .auth-card{
  background:rgb(var(--wall-rgb) / var(--wall-opacity));
  border-color:rgba(232,198,138,.30);
}
:root[data-theme="dark"][data-wallpaper-active] body .auth-card form input:not([type="hidden"]){
  background:rgb(29 25 18 / max(.58,var(--wall-opacity)));
}
:root[data-theme="dark"][data-wallpaper-active] body .auth-card form input:-webkit-autofill,
:root[data-theme="dark"][data-wallpaper-active] body .auth-card form input:-webkit-autofill:hover,
:root[data-theme="dark"][data-wallpaper-active] body .auth-card form input:-webkit-autofill:focus{
  -webkit-box-shadow:0 0 0 1000px rgb(29 25 18 / .82) inset;
}
:root[data-theme="dark"] .login-shell .login-intro h2{
  color:#f8f4ec;
  text-shadow:0 2px 16px rgba(0,0,0,.52);
}
:root[data-theme="dark"] .login-shell .login-intro :is(p,.feature),
:root[data-theme="dark"] .login-shell .login-card>p{
  color:var(--ui-secondary);
}
:root[data-theme="dark"] .login-shell .login-card label{
  color:#ecdab6;
}
:root[data-theme="dark"] .login-shell .login-card a{
  color:var(--ui-accent);
}
:root[data-theme="dark"] .login-shell .login-card a:hover{
  color:#fae4b4;
}
:root[data-theme="dark"] body .auth-card form input:not([type="hidden"]){
  background:#1d1912;
  border:1px solid rgba(232,198,138,.42);
  color:#f8f1e1;
  box-shadow:inset 0 1px 0 rgba(255,226,166,.08),inset 0 2px 6px rgba(0,0,0,.32);
  transition:border-color .18s ease,box-shadow .18s ease,background-color .18s ease;
}
:root[data-theme="dark"] body .auth-card form input:not([type="hidden"]):hover{
  background:#221d14;
  border-color:rgba(242,210,148,.62);
}
:root[data-theme="dark"] body .auth-card form input:not([type="hidden"]):focus{
  background:#251f15;
  border-color:#f0cc84;
  box-shadow:0 0 0 3px rgba(232,196,122,.24),inset 0 1px 0 rgba(255,226,166,.12);
}
:root[data-theme="dark"] body .auth-card button.primary-action:not(:disabled){
  background:linear-gradient(135deg,#ecc982,#d4a455);
  color:#1a1409;
  border:1px solid transparent;
  font-weight:600;
  box-shadow:0 4px 16px rgba(212,164,85,.24);
}
:root[data-theme="dark"] body .auth-card button.primary-action:not(:disabled):hover{
  background:linear-gradient(135deg,#f5d899,#e0b264);
  color:#1a1409;
  box-shadow:0 6px 20px rgba(218,168,86,.34);
}
:root[data-theme="dark"] body .auth-card :is(.password-toggle,[data-password-toggle]){
  color:#d9bc82;
}
:root[data-theme="dark"] body .auth-card :is(.password-toggle,[data-password-toggle]):hover{
  color:#f0cc84;
  background:rgba(232,196,122,.10);
}
:root[data-theme="dark"] body .auth-card form input:-webkit-autofill,
:root[data-theme="dark"] body .auth-card form input:-webkit-autofill:hover,
:root[data-theme="dark"] body .auth-card form input:-webkit-autofill:focus{
  -webkit-text-fill-color:#f8f1e1;
  -webkit-box-shadow:0 0 0 1000px #1d1912 inset;
  border-color:rgba(232,198,138,.42);
}
:root[data-theme="dark"] body .login-shell .login-card .primary-action:disabled{
  background:#28241e;
  color:#8f8679;
  border:1px solid rgba(226,198,146,.16);
  box-shadow:none;
  opacity:1;
  cursor:not-allowed;
}


/* === Comprehensive Dark-Mode Obsidian-Gold Typography & Component Polish === */

/* Crisp, subtle text grounding over translucent wallpapers (e.g. 35% card opacity over bright portraits). */
:root[data-theme="dark"][data-wallpaper-active] body :is(.site-header,.sidebar-shell,.clash-content .card,.admin-table,.compact-node-table){
  text-shadow:0 1px 2px rgba(8,7,5,.58);
}
:root[data-theme="dark"] .sidebar-item{
  color:#e4ddd2;
}
:root[data-theme="dark"] .sidebar-item small{
  color:#c5bdb0;
}
:root[data-theme="dark"] .sidebar-heading span{
  color:#f7f2e8;
}
:root[data-theme="dark"] .sidebar-heading small{
  color:#c6beb0;
}
:root[data-theme="dark"] .page-intro p,
:root[data-theme="dark"] :is(.muted,.usage-detail,.data-note,.section-heading p,.traffic-note,.remark-line){
  color:#ded7cb;
}
:root[data-theme="dark"] .card h2,
:root[data-theme="dark"] .section-heading h2,
:root[data-theme="dark"] .page-intro h1{
  color:#faf6ee;
}

/* Tables & Admin headers: refined obsidian band + warm pearl headers */
:root[data-theme="dark"] body table th,
:root[data-theme="dark"] body .admin-table th,
:root[data-theme="dark"] body .admin-wrap .compact-admin .compact-node-table thead th,
:root[data-theme="dark"] body .traffic-page .traffic-table th{
  background:rgba(15,13,10,.68);
  color:#ebe1ce;
  border-bottom-color:rgba(232,198,138,.18);
  font-weight:600;
}
:root[data-theme="dark"] body .admin-table td{
  color:#f2ece1;
  border-bottom-color:rgba(232,198,138,.12);
}
:root[data-theme="dark"] body .admin-table .account-row:hover{
  background:rgba(232,196,122,.07);
}
:root[data-theme="dark"] body .admin-table .user-expand{
  color:#faf5ec;
}
:root[data-theme="dark"] body .admin-table .user-expand:hover{
  background:rgba(232,196,122,.14);
  color:#f4dca8;
}
:root[data-theme="dark"] body .admin-table .user-directory,
:root[data-theme="dark"] body .user-directory{
  color:#c6beb0;
}
:root[data-theme="dark"] body .admin-table .account-row td::before{
  color:#d0c7b8;
}

/* Upload / Download speeds: refined champagne gold (up) & warm pearl silver (down), zero mint green */
:root[data-theme="dark"] body .speed-up,
:root[data-theme="dark"] body .admin-table .account-number.speed-up,
:root[data-theme="dark"] body .user-metric .speed-up{
  color:#ecd096;
  font-weight:600;
}
:root[data-theme="dark"] body .speed-down,
:root[data-theme="dark"] body .admin-table .account-number.speed-down,
:root[data-theme="dark"] body .user-metric .speed-down{
  color:#ede7dc;
  font-weight:600;
}
:root[data-theme="dark"] body .speed-item small{
  color:#cfc7ba;
}

/* Status pills & bandwidth chips: pure obsidian & champagne gold (zero mint/cyan) */
:root[data-theme="dark"] body .status-pill{
  background:rgba(24,20,14,.80);
  border:1px solid rgba(232,198,138,.36);
  color:#f3dca5;
  font-weight:650;
  text-shadow:none;
}
:root[data-theme="dark"] body .status-pill.off{
  background:rgba(224,104,126,.20);
  border:1px solid rgba(235,118,138,.34);
  color:#f8bcc7;
}
:root[data-theme="dark"] body .status-pill.unknown{
  background:rgba(232,196,122,.18);
  border:1px solid rgba(232,196,122,.32);
  color:#f3dca5;
}
:root[data-theme="dark"] body .admin-table .bandwidth-chip{
  color:#d9d2c6;
  background:none;
}
:root[data-theme="dark"] body .admin-table .bandwidth-chip.warm{color:#f2d699}
:root[data-theme="dark"] body .admin-table .bandwidth-chip.hot{color:#f7b6c2}
:root[data-theme="dark"] body .quota-reached{color:#f7b6c2!important}

/* Online IP summary & popover: replace bright cyan with warm champagne gold & obsidian panel */
:root[data-theme="dark"] body .ip-details summary{
  color:#ebd39e;
  font-weight:600;
}
:root[data-theme="dark"] body .ip-details summary:hover{
  color:#fae8be;
}
:root[data-theme="dark"] body .ip-details .ip-list{
  background:#181511;
  border-color:rgba(232,198,138,.26);
  box-shadow:0 18px 42px rgba(4,4,4,.65);
}
:root[data-theme="dark"] body .ip-row{
  background:#211d17;
  border-color:rgba(232,198,138,.18);
}
:root[data-theme="dark"] body .ip-row code{color:#f7f2e8}
:root[data-theme="dark"] body .ip-location+.ip-location{border-top-color:rgba(232,198,138,.16)}
:root[data-theme="dark"] body .ip-location h3,
:root[data-theme="dark"] body .ip-region{color:#ebd39e}
:root[data-theme="dark"] body .ip-meta,
:root[data-theme="dark"] body .ip-empty{color:#c7bfb2}

/* Admin account action buttons (设置期限 / 设置流量 / 添加备注 / 删除) & note popovers */
:root[data-theme="dark"] body .admin-table .account-actions .note-editor>summary,
:root[data-theme="dark"] body .admin-table .account-actions :is(button,.button):not(.user-delete-trigger):not(.account-action){
  background:rgba(28,24,18,.88);
  border:1px solid rgba(232,198,138,.30);
  color:#f2e8d5;
  font-weight:600;
  text-shadow:none;
}
:root[data-theme="dark"] body .admin-table .account-actions .note-editor>summary:hover,
:root[data-theme="dark"] body .admin-table .account-actions :is(button,.button):not(.user-delete-trigger):not(.account-action):hover{
  background:rgba(232,196,122,.18);
  border-color:rgba(242,210,148,.55);
  color:#fcf0d2;
}
:root[data-theme="dark"] body .admin-table .account-actions .user-delete-trigger,
:root[data-theme="dark"] body .admin-table .user-delete>summary,
:root[data-theme="dark"] body .admin-table .account-action{
  background:rgba(104,32,46,.56);
  border:1px solid rgba(235,118,138,.40);
  color:#f9c0cb;
  font-weight:600;
  text-shadow:none;
}
:root[data-theme="dark"] body .admin-table .account-actions .user-delete-trigger:hover,
:root[data-theme="dark"] body .admin-table .user-delete>summary:hover,
:root[data-theme="dark"] body .admin-table .account-action:hover{
  background:rgba(136,42,60,.72);
  border-color:rgba(248,144,162,.62);
  color:#ffe3e8;
}
:root[data-theme="dark"] body .admin-table .account-action.is-enable{
  background:rgba(232,196,122,.18);
  border-color:rgba(232,198,138,.42);
  color:#f5e2b5;
}
:root[data-theme="dark"] body .note-form{
  background:#191612;
  border:1px solid rgba(232,198,138,.26);
  box-shadow:0 18px 42px rgba(4,4,4,.62);
  text-shadow:none;
}
:root[data-theme="dark"] body .admin-table .note-form button{
  background:linear-gradient(135deg,#ecc982,#d4a455);
  border-color:transparent;
  color:#1a1409;
  font-weight:650;
}
:root[data-theme="dark"] body .admin-table .note-form button:hover{
  background:linear-gradient(135deg,#f5d899,#e0b264);
  color:#1a1409;
}

/* Proxy Node Status Matrix & Toggle Switches: replace dark-blue "开启" text & electric-blue toggles with champagne gold */
:root[data-theme="dark"] body .compact-nodes,
:root[data-theme="dark"] body .compact-nodes,
:root[data-theme="dark"] body .nodes-section{
  --node-surface:transparent;
  --node-line:rgba(232,198,138,.18);
  --node-divider:rgba(232,198,138,.12);
  --node-header:rgba(15,13,10,.64);
  --node-head-ink:#ebe1ce;
  --node-stripe:rgba(255,244,224,.025);
  --node-hover:rgba(232,196,122,.07);
  --node-ink:#f5f0e7;
  --node-name:#faf6ee;
  --node-muted:#e4dbcc;
  --node-normal:#efc979;
  --node-ok:#efc979;
  --node-good-bg:rgba(239,201,121,.16);
  --node-bad:#f6b4c0;
  --node-bad-bg:rgba(224,104,126,.18);
  --node-unknown:#f2d89c;
  --node-unknown-bg:rgba(232,196,122,.16);
  --node-route-bg:rgba(232,196,122,.14);
  --node-route-ink:#eed7a4;
  --node-route-line:rgba(232,198,138,.34);
  --node-alert:#e6c47a;
}

/* Keep node statuses readable over bright wallpapers in dark mode. */
:root[data-theme="dark"] .compact-node-table{
  background-color:rgb(34 35 38 / .90);
}
:root[data-theme="dark"] body .compact-admin .node-state.manual{
  background:rgba(18,16,13,.60);
  border:1px solid rgba(232,198,138,.14);
  color:#d6cec1!important;
}
:root[data-theme="dark"] body .compact-admin .node-traffic-factor{
  color:#d4ccbf;
  border-color:rgba(232,198,138,.20);
  background:rgba(18,16,13,.38);
}
:root[data-theme="dark"] body .node-switch-form .node-toggle{
  color:#ddd5c7;
}
:root[data-theme="dark"] body .node-switch-form .node-toggle.on,
:root[data-theme="dark"] body .node-switch-form .node-toggle[aria-checked="true"]{
  color:#f2d9a0;
}
:root[data-theme="dark"] body .node-switch-form .node-toggle:hover{
  background:rgba(232,196,122,.12);
}
:root[data-theme="dark"] body .node-switch-form .node-toggle:focus-visible{
  outline:2px solid #e6c47a;
}
:root[data-theme="dark"] body .node-toggle-track{
  background:rgba(255,244,224,.22);
  box-shadow:inset 0 0 0 1px rgba(232,198,138,.22);
}
:root[data-theme="dark"] body .node-toggle-track>span{
  background:#fffaf0;
  box-shadow:0 1px 4px rgba(0,0,0,.45);
}
:root[data-theme="dark"] body .node-toggle.on .node-toggle-track,
:root[data-theme="dark"] body .node-toggle[aria-checked="true"] .node-toggle-track{
  background:linear-gradient(135deg,#e7c174,#c6933f);
  box-shadow:inset 0 0 0 1px rgba(255,232,180,.28);
}
:root[data-theme="dark"] body .node-switch-feedback{color:#cfc7ba}
:root[data-theme="dark"] body .node-switch-feedback.pending{color:#f0d290}
:root[data-theme="dark"] body .node-switch-feedback.error{color:#f7b4c0}

/* Legacy blue-teal cards, avatars, dialogs & radar/codex/notification accents */
:root[data-theme="dark"] body .user-card{
  background:rgba(24,21,17,.86);
  border-color:rgba(232,198,138,.18);
}
:root[data-theme="dark"] body .user-avatar{
  background:rgba(232,196,122,.16);
  color:#f3dca5;
}
:root[data-theme="dark"] body .user-name{color:#faf6ee}
:root[data-theme="dark"] body #reset-directory{
  background:#1c1812;
  border-color:rgba(232,198,138,.32);
  color:#f7f2e8;
}
:root[data-theme="dark"] body .username-history-trigger{
  color:#e4d3b0;
  border-color:rgba(232,198,138,.22);
}
:root[data-theme="dark"] body .username-history-trigger:hover{
  background:rgba(232,196,122,.14);
  border-color:rgba(232,198,138,.42);
  color:#f7e2b2;
}
:root[data-theme="dark"] body .radar-admin-page [data-tone="active"]{color:#ecd29a}
:root[data-theme="dark"] body .radar-admin-page [data-tone="success"]{color:#f2d89b}
:root[data-theme="dark"] body .radar-admin-page [data-tone="warning"]{color:#f3c87c}
:root[data-theme="dark"] body .step-label{color:#ecd29a}
:root[data-theme="dark"] body .invite-sent{
  border-color:rgba(232,198,138,.36);
  background:rgba(232,196,122,.12);
  color:#f5e7c8;
}
:root[data-theme="dark"] body .invite-sent-icon{
  background:linear-gradient(135deg,#ecc982,#d4a455);
  color:#1a1409;
}


/* === Pure Obsidian-Gold Sweep: Zero Blue / Zero Mint / Zero White Pills === */

/* Global dark disabled button safety net (prevents any button falling back to #407aeb royal blue) */
:root[data-theme="dark"] body button:disabled:not(.node-toggle):not([data-theme-choice]):not(.wallpaper-close):not(.wallpaper-link):not(.wallpaper-preset):not(.password-toggle){
  background:#28241e;
  color:#9b9284;
  border:1px solid rgba(232,198,138,.18);
  box-shadow:none;
  opacity:1;
}

/* 1. Running pill (● 运行中) & port chevron (TCP · 2 个端口 ⌄) */
:root[data-theme="dark"] body .compact-nodes .node-state:not(.off):not(.unknown):not(.manual){
  background:rgba(239,201,121,.16);
  color:#efc979;
  border-radius:5px;
  padding:1px 6px;
  border:none;
  box-shadow:none;
  text-shadow:none;
}
:root[data-theme="dark"] body .compact-nodes .node-state:not(.off):not(.unknown):not(.manual)::before{
  background:#efc979;
  box-shadow:none;
}
:root[data-theme="dark"] body .node-state:not(.off):not(.unknown):not(.manual){
  color:#efc979;
}
:root[data-theme="dark"] body .node-state:not(.off):not(.unknown):not(.manual)::before{
  background:#efc979;
  box-shadow:none;
}
:root[data-theme="dark"] body .compact-nodes .compact-meta,
:root[data-theme="dark"] body .compact-nodes .compact-port-details,
:root[data-theme="dark"] body .compact-nodes .compact-port-details summary{
  color:#e4dbcc;
  font-weight:400;
  font-size:11px;
  line-height:1.5;
  margin-top:3px;
  text-shadow:0 1px 2px rgba(0,0,0,.85);
}
:root[data-theme="dark"] body .compact-nodes .compact-meta code,
:root[data-theme="dark"] body .compact-nodes .compact-port-details code{
  display:inline;
  padding:0;
  border-radius:0;
  background:transparent;
  border:none;
  color:inherit;
  font-weight:inherit;
  font-family:inherit;
  font-size:11px;
  text-shadow:inherit;
  box-shadow:none;
}
:root[data-theme="dark"] body .compact-port-details summary::after,
:root[data-theme="dark"] body .compact-port-details summary svg{
  color:#e2c484;
  border-color:#e2c484;
}

/* 2. Service expiry badge (剩余 366 天) & card left bar (remove pure-white #e9f6ef pill & green border) */
:root[data-theme="dark"] body .service-expiry-card{
  border-left:3px solid #dfb86d;
}
:root[data-theme="dark"] body .service-expiry-card .service-expiry-status{
  background:rgba(24,20,14,.84);
  border:1px solid rgba(232,198,138,.40);
  color:#f4dca6;
  font-weight:650;
  text-shadow:none;
}
:root[data-theme="dark"] body .card.service-expiry-warning .service-expiry-status{
  background:rgba(48,37,18,.86);
  border-color:rgba(240,194,104,.46);
  color:#ffd786;
}
:root[data-theme="dark"] body .card.service-expiry-danger .service-expiry-status{
  background:rgba(56,24,32,.86);
  border-color:rgba(235,118,138,.46);
  color:#f8b8c4;
}

/* 3. Remaining quota card (剩余流量 395.7 GB): warm champagne gold instead of mint green */
:root[data-theme="dark"] body .quota-item:last-child,
:root[data-theme="dark"][data-wallpaper-active] body .quota-item:last-child{
  background:rgba(232,196,122,.12);
  border:1px solid rgba(232,198,138,.28);
}
:root[data-theme="dark"] body .quota-item:last-child strong{
  color:#f4dca6;
}

/* 4. Notifications Tabs (全部 / 未读): eliminate bright blue #407aeb fallback */
:root[data-theme="dark"] body .notification-tabs{
  background:rgba(20,17,13,.76);
  border:1px solid rgba(232,198,138,.24);
}
:root[data-theme="dark"] body .notification-tabs button{
  background:transparent;
  color:#dcd5c9;
  border:1px solid transparent;
  box-shadow:none;
  text-shadow:none;
}
:root[data-theme="dark"] body .notification-tabs button:hover{
  background:rgba(232,196,122,.12);
  color:#f7e4b8;
}
:root[data-theme="dark"] body .notification-tabs button[aria-pressed="true"]{
  background:linear-gradient(135deg,#ecc982,#d4a455);
  color:#1a1409;
  border-color:transparent;
  font-weight:700;
  box-shadow:0 2px 8px rgba(212,164,85,.24);
}

/* 5. Telegram Community page: full obsidian & champagne-gold override (zero dark teal #173746) */
:root[data-theme="dark"] body .telegram-community{
  --community-line:rgba(232,198,138,.26);
  --community-ink:#f7f3ea;
  --community-muted:#dcd5c9;
  --community-accent:#e8c98b;
  --community-soft:rgba(22,19,14,.82);
  --community-tint:rgba(34,28,19,.86);
}
:root[data-theme="dark"] body .telegram-community .telegram-community-mark,
:root[data-theme="dark"] body .telegram-community .telegram-option-icon{
  background:rgba(232,196,122,.15);
  border:1px solid rgba(232,198,138,.28);
  color:#efd192;
}
:root[data-theme="dark"] body .telegram-community .telegram-option:hover{
  background:rgba(38,32,22,.90);
  border-color:rgba(242,210,148,.52);
}
:root[data-theme="dark"] body .telegram-community .telegram-url-copy{
  background:linear-gradient(135deg,#ecc982,#d4a455);
  color:#1a1409;
  border-color:transparent;
  font-weight:650;
  text-shadow:none;
}
:root[data-theme="dark"] body .telegram-community .telegram-url-copy:hover{
  background:linear-gradient(135deg,#f5d899,#e0b264);
  color:#1a1409;
}

/* 6. Reset Radar page: eliminate ALL cyan, teal, and #407aeb blue buttons/icons/bars/pickers */
:root[data-theme="dark"] body .radar-banner{
  background:linear-gradient(120deg,rgba(232,196,122,.14),transparent 65%);
}
:root[data-theme="dark"] body .radar-mark{
  color:#e8c98b;
  opacity:.82;
}
:root[data-theme="dark"] body .radar-page .eyebrow,
:root[data-theme="dark"] body .radar-alert-card .eyebrow{
  color:#e8c98b;
}
:root[data-theme="dark"] body .radar-tile,
:root[data-theme="dark"] body .radar-picker,
:root[data-theme="dark"] body .radar-alert-rule{
  background:rgba(20,17,13,.66);
  border-color:rgba(232,198,138,.20);
}
:root[data-theme="dark"] body .radar-probability,
:root[data-theme="dark"] body .radar-trend{
  color:#ecd096;
}
:root[data-theme="dark"] body .radar-page progress{
  accent-color:#e4bd72;
  background:rgba(255,244,224,.12);
}
:root[data-theme="dark"] body .radar-page progress::-webkit-progress-bar{background:rgba(255,244,224,.12)}
:root[data-theme="dark"] body .radar-page progress::-webkit-progress-value{background:linear-gradient(90deg,#ecc982,#cf9a48)}
:root[data-theme="dark"] body .radar-page progress::-moz-progress-bar{background:linear-gradient(90deg,#ecc982,#cf9a48)}
:root[data-theme="dark"] body .radar-picker>summary::before{
  border-color:rgba(232,198,138,.26);
  background:rgba(232,196,122,.08);
}
:root[data-theme="dark"] body .radar-picker>summary:hover::before,
:root[data-theme="dark"] body .radar-picker[open]>summary::before{
  background:rgba(232,196,122,.18);
  border-color:rgba(232,198,138,.48);
}
:root[data-theme="dark"] body .radar-picker[open]>summary::after{color:#f0d290}
:root[data-theme="dark"] body .radar-picker>summary:focus-visible{outline-color:#e6c47a}
:root[data-theme="dark"] body .radar-picker-actions button{
  background:rgba(26,22,17,.84);
  border-color:rgba(232,198,138,.26);
  color:#f2e8d5;
  text-shadow:none;
}
:root[data-theme="dark"] body .radar-picker-actions button:hover{
  background:rgba(232,196,122,.16);
  border-color:rgba(232,198,138,.48);
  color:#fae8be;
}
:root[data-theme="dark"] body .radar-alert-card .radar-alert-actions{
  background:rgba(20,17,13,.86);
  border-top:1px solid rgba(232,198,138,.22);
}
:root[data-theme="dark"] body .radar-alert-card .has-unsaved .radar-alert-actions{
  border-top-color:rgba(232,198,138,.48);
}
:root[data-theme="dark"] body .radar-alert-card .radar-alert-actions button:not(:disabled){
  background:linear-gradient(135deg,#ecc982,#d4a455);
  color:#1a1409;
  border-color:transparent;
  font-weight:650;
}
:root[data-theme="dark"] body .radar-alert-card .radar-alert-actions button:disabled{
  background:#28241e;
  color:#9b9284;
  border:1px solid rgba(232,198,138,.18);
  box-shadow:none;
  opacity:1;
}
:root[data-theme="dark"] body .radar-page .radar-alert-toggle input,
:root[data-theme="dark"] body .radar-page .radar-alert-rule-check{
  accent-color:#e4bd72;
}
:root[data-theme="dark"] body .radar-alert-progress-row{
  border-color:rgba(232,198,138,.20);
  background:rgba(20,17,13,.66);
}
:root[data-theme="dark"] body .radar-alert-progress-row[data-tone="success"] .radar-alert-progress-title,
:root[data-theme="dark"] body .radar-alert-progress-row[data-tone="active"] .radar-alert-progress-title{
  color:#ecd096;
}
:root[data-theme="dark"] body .radar-page .radar-range-options{
  background:rgba(20,17,13,.76);
  border-color:rgba(232,198,138,.22);
}
:root[data-theme="dark"] body .radar-page .radar-range-options button{
  background:transparent;
  color:#dcd5c9;
  border-color:transparent;
  box-shadow:none;
}
:root[data-theme="dark"] body .radar-page .radar-range-options button:hover{
  background:rgba(232,196,122,.14);
  color:#f5e2b5;
}
:root[data-theme="dark"] body .radar-page .radar-range-options button[aria-pressed="true"]{
  background:linear-gradient(135deg,#ecc982,#d4a455);
  color:#1a1409;
  border-color:transparent;
  font-weight:700;
}
:root[data-theme="dark"] body .radar-page .radar-filters{
  background:rgba(20,17,13,.62);
  border:1px solid rgba(232,198,138,.18);
}
:root[data-theme="dark"] body .radar-page .radar-filters .radar-platform-trigger,
:root[data-theme="dark"] body .radar-page .radar-filters .radar-platform-trigger:disabled{
  background:#1b1712;
  border:1px solid rgba(232,198,138,.32);
  color:#f5f0e7;
  box-shadow:none;
  text-shadow:none;
  opacity:1;
}
:root[data-theme="dark"] body .radar-page .radar-filters .radar-platform-trigger:hover:not(:disabled){
  background:#231e17;
  border-color:rgba(242,210,148,.52);
  color:#faf5ec;
}
:root[data-theme="dark"] body .radar-platform-trigger svg{
  color:#e8c98b;
}
:root[data-theme="dark"] body .radar-page .radar-filters .radar-date-control input{
  background:#1b1712;
  border:1px solid rgba(232,198,138,.32);
  color:#f5f0e7;
}
:root[data-theme="dark"] body .radar-page .radar-filters .radar-date-picker-button,
:root[data-theme="dark"] body .radar-page .radar-filters .radar-date-picker-button:disabled{
  background:rgba(232,196,122,.14);
  border:1px solid rgba(232,198,138,.30);
  color:#efd294;
  box-shadow:none;
  text-shadow:none;
}
:root[data-theme="dark"] body .radar-page .radar-filters .radar-date-picker-button:hover:not(:disabled){
  background:rgba(232,196,122,.26);
  border-color:rgba(242,210,148,.55);
  color:#fae8be;
}
:root[data-theme="dark"] body .radar-platform-menu,
:root[data-theme="dark"] body .radar-calendar,
:root[data-theme="dark"] body .radar-email-dialog{
  background:#191612;
  border-color:rgba(232,198,138,.28);
  color:#f7f3ea;
  box-shadow:0 18px 44px rgba(4,4,4,.68);
}
:root[data-theme="dark"] body .radar-platform-menu button,
:root[data-theme="dark"] body .radar-calendar .radar-calendar-day,
:root[data-theme="dark"] body .radar-calendar .radar-calendar-nav{
  background:transparent;
  color:#efe8dc;
  border-color:transparent;
  box-shadow:none;
}
:root[data-theme="dark"] body .radar-calendar .radar-calendar-nav{
  border-color:rgba(232,198,138,.22);
  background:rgba(232,196,122,.08);
}
:root[data-theme="dark"] body .radar-platform-menu button:hover,
:root[data-theme="dark"] body .radar-calendar .radar-calendar-day:hover,
:root[data-theme="dark"] body .radar-calendar .radar-calendar-nav:hover{
  background:rgba(232,196,122,.16);
  color:#fae8be;
}
:root[data-theme="dark"] body .radar-platform-menu button[aria-selected="true"],
:root[data-theme="dark"] body .radar-calendar .radar-calendar-day.selected{
  background:linear-gradient(135deg,#ecc982,#d4a455);
  color:#1a1409;
  font-weight:700;
}
:root[data-theme="dark"] body .radar-calendar .radar-calendar-day.in-range{
  background:rgba(232,196,122,.15);
  color:#f5e4be;
}
:root[data-theme="dark"] body .radar-calendar .radar-calendar-day.today{
  border-color:#e6c47a;
}
:root[data-theme="dark"] body .radar-calendar-weekdays{color:#c8c0b2}
:root[data-theme="dark"] body .radar-email-success-icon{
  color:#ecd096;
  background:rgba(232,196,122,.14);
  border-color:rgba(232,198,138,.36);
}
:root[data-theme="dark"] body .radar-record,
:root[data-theme="dark"] body .radar-resolved,
:root[data-theme="dark"] body .radar-reminder-heading{
  border-color:rgba(232,198,138,.18);
}


/* === Exhaustive Dark-Mode Final Sweep (Text, Unread Tab, Overview Numbers, Charts, Notices) === */

/* 1. Eliminate ALL legacy cold slate-blue base text (#a7c0cd / #91adbd from server.py:166 & theme.css:213) */
:root[data-theme="dark"] body p{
  color:#e0d9cd;
}
:root[data-theme="dark"] body small,
:root[data-theme="dark"] body .muted,
:root[data-theme="dark"] body .helper,
:root[data-theme="dark"] body .username-rule,
:root[data-theme="dark"] body .usage-detail,
:root[data-theme="dark"] body .admin-table .admin-quota-line,
:root[data-theme="dark"] body .account-retained td{
  color:#d2cbc0;
}

/* 2. Page intro readability over bright skies/clouds when wallpaper is active */
:root[data-theme="dark"] body .page-intro .eyebrow{
  color:#efd69b;
}
:root[data-theme="dark"] body .page-intro h1{
  color:#fbf7f0;
}
:root[data-theme="dark"] body .page-intro p{
  color:#eee8dc;
}
:root[data-theme="dark"][data-wallpaper-active] body .page-intro{
  text-shadow:0 1px 8px rgba(8,7,5,.84),0 1px 2px rgba(8,7,5,.94);
}

/* 3. Node overview bar cyan numbers (4 个节点分组 / 正常 4/16 · 手动关闭 12 项 / 0 组) -> warm champagne gold */
:root[data-theme="dark"] body .compact-nodes,
:root[data-theme="dark"] body .nodes-section{
  --node-focus:#f0d496;
}
:root[data-theme="dark"] body .nodes-section .admin-nodes-overview{
  color:#e2dbd0;
}
:root[data-theme="dark"] body .nodes-section .admin-nodes-overview strong{
  color:#f0d496;
}

/* 4. Beat theme.css:386 (0,4,1) specificity so NO inactive tab/filter/calendar button EVER turns #407aeb blue */
:root[data-theme="dark"] body .notification-tabs button:not(:disabled):not([aria-pressed="true"]),
:root[data-theme="dark"] body .notice-tabs button:not(:disabled):not([aria-pressed="true"]),
:root[data-theme="dark"] body .notice-history-filters button:not(:disabled):not([aria-pressed="true"]),
:root[data-theme="dark"] body .radar-range-options button:not(:disabled):not([aria-pressed="true"]),
:root[data-theme="dark"] body .radar-picker-actions button:not(:disabled){
  background:transparent;
  color:#e0d9cd;
  border:1px solid transparent;
  box-shadow:none;
  text-shadow:none;
}
:root[data-theme="dark"] body .notification-tabs button:not(:disabled):not([aria-pressed="true"]):hover,
:root[data-theme="dark"] body .notice-tabs button:not(:disabled):not([aria-pressed="true"]):hover,
:root[data-theme="dark"] body .notice-history-filters button:not(:disabled):not([aria-pressed="true"]):hover,
:root[data-theme="dark"] body .radar-range-options button:not(:disabled):not([aria-pressed="true"]):hover,
:root[data-theme="dark"] body .radar-picker-actions button:not(:disabled):hover{
  background:rgba(232,196,122,.14);
  color:#fae8be;
  border-color:rgba(232,198,138,.26);
}
:root[data-theme="dark"] body .notification-tabs button[aria-pressed="true"]:not(:disabled),
:root[data-theme="dark"] body .notice-tabs button[aria-pressed="true"]:not(:disabled),
:root[data-theme="dark"] body .notice-history-filters button[aria-pressed="true"]:not(:disabled),
:root[data-theme="dark"] body .radar-range-options button[aria-pressed="true"]:not(:disabled){
  background:linear-gradient(135deg,#ecc982,#d4a455);
  color:#1a1409;
  border-color:transparent;
  font-weight:700;
  box-shadow:0 2px 8px rgba(212,164,85,.24);
  text-shadow:none;
}
:root[data-theme="dark"] body .radar-page .radar-filters .radar-platform-trigger:not(:disabled),
:root[data-theme="dark"] body .radar-page .radar-filters .radar-platform-trigger:disabled{
  background:#1b1712;
  color:#f5f0e7;
  border:1px solid rgba(232,198,138,.32);
  box-shadow:none;
  text-shadow:none;
}
:root[data-theme="dark"] body .radar-page .radar-filters .radar-date-picker-button:not(:disabled),
:root[data-theme="dark"] body .radar-page .radar-filters .radar-date-picker-button:disabled{
  background:rgba(232,196,122,.14);
  color:#efd294;
  border:1px solid rgba(232,198,138,.30);
  box-shadow:none;
  text-shadow:none;
}
:root[data-theme="dark"] body .radar-calendar button.radar-calendar-day:not(.selected):not(:disabled),
:root[data-theme="dark"] body .radar-calendar button.radar-calendar-nav:not(:disabled),
:root[data-theme="dark"] body .radar-platform-menu button:not([aria-selected="true"]):not(:disabled){
  background:transparent;
  color:#efe8dc;
  border-color:transparent;
  box-shadow:none;
}

/* 5. User Notifications & Compensation Claim UI: eliminate all #39b7af / #4bc4ba / #a3eee4 cyan */
:root[data-theme="dark"] body .notification-claim,
:root[data-theme="dark"] body .notification-claim-actions{
  border-color:rgba(232,198,138,.20);
}
:root[data-theme="dark"] body .notification-claim-option{
  background:rgba(22,19,14,.68);
  border-color:rgba(232,198,138,.22);
}
:root[data-theme="dark"] body .notification-claim-option:hover{
  background:rgba(232,196,122,.10);
  border-color:rgba(232,198,138,.42);
}
:root[data-theme="dark"] body .notification-claim-option:has(input:checked),
:root[data-theme="dark"] body .notification-option-receipt.is-received{
  background:rgba(232,196,122,.14);
  border-color:#e4bd72;
  box-shadow:0 0 0 1px rgba(232,196,122,.34);
}
:root[data-theme="dark"] body .notification-claim-option:focus-within,
:root[data-theme="dark"] body .notification-item:focus-visible,
:root[data-theme="dark"] body .notification-back:focus-visible{
  outline-color:#e6c47a;
}
:root[data-theme="dark"] body .notification-claim-option input{
  accent-color:#e4bd72;
}
:root[data-theme="dark"] body .notification-option-amount,
:root[data-theme="dark"] body .notification-claim-total>b{
  color:#f3dca5;
}
:root[data-theme="dark"] body .notification-claim-total{
  border-color:rgba(232,198,138,.26);
  background:rgba(232,196,122,.09);
}
:root[data-theme="dark"] body .notification-option-receipt.is-received .notification-option-status{
  background:rgba(232,196,122,.20);
  color:#f5e2b5;
}
:root[data-theme="dark"] body .notification-claim-intro,
:root[data-theme="dark"] body .notification-option-copy>small,
:root[data-theme="dark"] body .notification-claim-total>small,
:root[data-theme="dark"] body .notification-claim-summary,
:root[data-theme="dark"] body .notification-password-hint,
:root[data-theme="dark"] body .notification-option-status,
:root[data-theme="dark"] body .notification-count,
:root[data-theme="dark"] body .notification-category,
:root[data-theme="dark"] body .notification-read-state,
:root[data-theme="dark"] body .notification-date{
  color:#d2cbc0;
}
:root[data-theme="dark"] body .notification-password-dialog,
:root[data-theme="dark"] body .user-delete-dialog{
  background:#191612;
  border-color:rgba(232,198,138,.28);
  color:#f7f3ea;
}
:root[data-theme="dark"] body .notification-password-selection{
  background:rgba(232,196,122,.14);
  color:#f3dca5;
}
:root[data-theme="dark"] body .notification-empty-icon{
  background:rgba(232,196,122,.14);
  color:#ecd096;
}

/* 6. Admin Notices Composer & History: eliminate #39b9b2 / #3dbbb1 cyan */
:root[data-theme="dark"] body .notice-default-rule{
  border-color:rgba(232,198,138,.30);
  background:rgba(232,196,122,.08);
}
:root[data-theme="dark"] body .notice-default-review{
  background:rgba(232,196,122,.12);
  color:#f2e8d5;
}
:root[data-theme="dark"] body .notice-composer input[type="checkbox"],
:root[data-theme="dark"] body .notice-composer input[type="radio"]{
  accent-color:#e4bd72;
}
:root[data-theme="dark"] body .notice-history-record{
  border-bottom-color:rgba(232,198,138,.16);
}

/* 7. Traffic charts, protocol cards & service settings focus rings */
:root[data-theme="dark"] body .traffic-chart [fill="#50bcb8"]{
  fill:#e4bd72;
}
:root[data-theme="dark"] body .traffic-chart text{
  fill:#d5cec2;
}
:root[data-theme="dark"] body .admin-table .account-actions .service-settings input:focus-visible,
:root[data-theme="dark"] body .admin-table .account-actions .service-settings select:focus-visible{
  outline-color:#e6c47a;
}


/* === Final Radar-Admin Global Banner, Charts & Residual Teal Cleanup === */
:root[data-theme="dark"] body .radar-admin-page{
  --admin-line:rgba(232,198,138,.22);
  --admin-surface:rgba(22,19,14,.78);
  --admin-muted:#d6cfc3;
  --admin-ink:#f7f3ea;
  --admin-accent:#ecd096;
  --admin-success-bg:rgba(24,21,15,.84);
  --admin-warning-bg:rgba(48,34,18,.84);
}
:root[data-theme="dark"] body .radar-admin-page .radar-admin-global{
  background:rgba(24,21,15,.84);
  border:1px solid rgba(232,198,138,.32);
  box-shadow:0 6px 20px rgba(4,4,4,.32);
}
:root[data-theme="dark"] body .radar-admin-page .radar-admin-global strong{
  color:#faf5ec;
}
:root[data-theme="dark"] body .radar-admin-page .radar-admin-global strong::before{
  background:#ecc778;
  box-shadow:0 0 0 4px rgba(236,199,120,.20);
}
:root[data-theme="dark"] body .radar-admin-page .radar-admin-global small{
  color:#d6cfc3;
}
:root[data-theme="dark"] body .radar-admin-page .radar-admin-global[data-paused="true"]{
  background:rgba(48,34,18,.86);
  border-color:rgba(240,188,102,.46);
}
:root[data-theme="dark"] body .radar-admin-page .radar-admin-global[data-paused="true"] strong::before{
  background:#f0b458;
  box-shadow:0 0 0 4px rgba(240,180,88,.20);
}
:root[data-theme="dark"] body .radar-admin-page .radar-admin-user-name [data-tone="success"],
:root[data-theme="dark"] body .radar-admin-page .radar-admin-record [data-tone="success"]{
  background:rgba(24,21,15,.82);
  border-color:rgba(232,198,138,.34);
  color:#f3dca5;
}
:root[data-theme="dark"] body .radar-admin-page .radar-admin-user-name [data-tone="warning"],
:root[data-theme="dark"] body .radar-admin-page .radar-admin-record [data-tone="warning"]{
  background:rgba(48,34,18,.82);
  border-color:rgba(240,188,102,.42);
  color:#f6cd82;
}
:root[data-theme="dark"] body .radar-admin-page .radar-admin-filter-options{
  background:#191612;
  border:1px solid rgba(232,198,138,.28);
  box-shadow:0 16px 38px rgba(4,4,4,.64);
}
:root[data-theme="dark"] body .radar-admin-page .radar-admin-filter-options button:not(:disabled){
  background:transparent;
  color:#efe8dc;
  border:0;
  box-shadow:none;
}
:root[data-theme="dark"] body .radar-admin-page .radar-admin-filter-options button:not(:disabled):hover,
:root[data-theme="dark"] body .radar-admin-page .radar-admin-filter-options button[aria-pressed="true"]:not(:disabled){
  background:rgba(232,196,122,.18);
  color:#f5e2b5;
}
:root[data-theme="dark"] body .radar-admin-page .radar-admin-system>div,
:root[data-theme="dark"] body .radar-admin-page .radar-admin-public>div,
:root[data-theme="dark"] body .radar-admin-page .radar-admin-stat,
:root[data-theme="dark"] body .radar-admin-page .radar-admin-user{
  background:rgba(22,19,14,.74);
  border-color:rgba(232,198,138,.20);
}
:root[data-theme="dark"] body .radar-admin-page .radar-admin-stat[data-kind="warning"]{
  background:rgba(48,34,18,.82)!important;
  border-color:rgba(240,188,102,.38);
}
:root[data-theme="dark"] body .radar-chart-dot{
  background:#1a1712;
  box-shadow:0 0 0 4px rgba(232,196,122,.22);
}
:root[data-theme="dark"] body .radar-chart-tooltip{
  background:#191612;
  border-color:rgba(232,198,138,.30);
  color:#f7f3ea;
}
:root[data-theme="dark"] body .radar-trend-coverage{
  background:rgba(24,20,14,.72)!important;
  border-color:rgba(232,198,138,.22);
  color:#dcd5c9;
}
:root[data-theme="dark"] body .radar-alert-card .radar-alert-rule:has(.radar-alert-rule-check:checked){
  background:rgba(232,196,122,.12);
  border-color:rgba(232,198,138,.42);
}
:root[data-theme="dark"] body .radar-streak-choice input:checked+span{
  background:linear-gradient(135deg,#ecc982,#d4a455);
  color:#1a1409;
  border-color:transparent;
  font-weight:700;
}
:root[data-theme="dark"] body .radar-streak-choice span{
  background:rgba(24,20,15,.78);
  border-color:rgba(232,198,138,.24);
  color:#e0d9cd;
}
:root[data-theme="dark"] body .radar-choice:has(input:checked){
  background:rgba(232,196,122,.16);
  border-color:rgba(232,198,138,.46);
  color:#f5e4be;
}
:root[data-theme="dark"] body .radar-choice{
  background:rgba(24,20,15,.72);
  border-color:rgba(232,198,138,.22);
  color:#e2dbd0;
}
:root[data-theme="dark"] body .wallpaper-sample-card strong::before{
  background:#ecc778;
}
:root[data-theme="dark"] body .protocol-card,
:root[data-theme="dark"] body .node-card{
  background:rgba(22,19,14,.72);
  border-color:rgba(232,198,138,.18);
}


/* === Final Residual #91adbd / Subscription-Reset / Rename-Dialog / Notification Cleanup === */

/* Username rule (#username-settings ID specificity) */
:root[data-theme="dark"] body #username-settings .username-rule{
  color:#d6cfc3;
}

/* Subscription reset row, success notice & confirmation dialog */
:root[data-theme="dark"] body .subscription-reset-row{
  border-top-color:rgba(232,198,138,.20);
}
:root[data-theme="dark"] body .subscription-reset-row>span{
  color:#d6cfc3;
}
:root[data-theme="dark"] body .subscription-reset-success{
  border-color:rgba(232,198,138,.36);
  background:rgba(232,196,122,.12);
  color:#f4dca6;
}
:root[data-theme="dark"] body dialog.subscription-reset-dialog{
  background:#191612;
  border-color:rgba(232,198,138,.28);
  color:#f7f3ea;
}
:root[data-theme="dark"] body .subscription-reset-dialog h2{color:#faf6ee}
:root[data-theme="dark"] body .subscription-reset-dialog p{color:#d8d1c5}

/* Rename history dialog residual #91adbd & cyan arrow */
:root[data-theme="dark"] body .rename-dialog .rename-identity{
  background:rgba(232,196,122,.08);
  border-color:rgba(232,198,138,.22);
}
:root[data-theme="dark"] body .rename-dialog .rename-identity small,
:root[data-theme="dark"] body .rename-dialog .rename-count,
:root[data-theme="dark"] body .rename-dialog .rename-time,
:root[data-theme="dark"] body .rename-dialog .rename-old{
  color:#d2cbc0;
}
:root[data-theme="dark"] body .rename-dialog .rename-new{color:#faf6ee}
:root[data-theme="dark"] body .rename-dialog .rename-arrow{color:#e6c47a}

/* Notifications list preview, arrow & empty state */
:root[data-theme="dark"] body .notification-preview,
:root[data-theme="dark"] body .notification-item-arrow,
:root[data-theme="dark"] body .notification-state{
  color:#d4cdc2;
}

/* Radar chart subtle wash, focus rings & active alert count */
:root[data-theme="dark"] body .radar-chart .radar-plot{
  background:linear-gradient(180deg,rgba(232,196,122,.07),transparent 80%);
}
:root[data-theme="dark"] body .radar-alert-progress-row[data-tone="active"] .radar-alert-progress-count strong{
  color:#f0d496;
}
:root[data-theme="dark"] body .radar-page .radar-filters select:focus-visible,
:root[data-theme="dark"] body .radar-page .radar-filters input:focus-visible,
:root[data-theme="dark"] body .radar-plot svg:focus-visible{
  outline-color:#e6c47a;
}


/* === Final Polish: Radar Alert Editor, Champagne Selection & Scrollbars === */
:root[data-theme="dark"] body .radar-alert-card .radar-alert-editor{
  background:rgba(22,19,14,.68);
  border-color:rgba(232,198,138,.22);
}
:root[data-theme="dark"] ::selection{
  background:rgba(232,196,122,.30);
  color:#fffaf0;
}
:root[data-theme="dark"]{
  scrollbar-color:rgba(232,198,138,.28) transparent;
}
:root[data-theme="dark"] ::-webkit-scrollbar{width:8px;height:8px}
:root[data-theme="dark"] ::-webkit-scrollbar-track{background:transparent}
:root[data-theme="dark"] ::-webkit-scrollbar-thumb{background:rgba(232,198,138,.24);border-radius:999px;border:2px solid transparent;background-clip:content-box}
:root[data-theme="dark"] ::-webkit-scrollbar-thumb:hover{background:rgba(232,198,138,.44);border:2px solid transparent;background-clip:content-box}
