:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;color-scheme:dark;--bg:#0b1210;--surface:#14201b;--surface2:#1b2b23;--line:#30453a;--text:#ecf5ee;--muted:#a5baab;--accent:#9be6af;--blue:#8db8ed;--gold:#e9c78c;--bad:#eea99d;--shadow:#03080777}
:root[data-theme="light"]{color-scheme:light;--bg:#f3f6f1;--surface:#fff;--surface2:#eef4ec;--line:#c8d7c8;--text:#1c3025;--muted:#50665a;--accent:#237b47;--blue:#386fa8;--gold:#a36514;--bad:#ad3d36;--shadow:#80998933}
:root[data-theme="midnight"]{color-scheme:dark;--bg:#10131c;--surface:#1b2130;--surface2:#262f40;--line:#3a485f;--text:#edf1f8;--muted:#aab8cc;--accent:#a9bdf4;--blue:#76d0dc;--gold:#f2c68a;--bad:#f4aca5;--shadow:#080d1777}
.tou-heading,.tou-period-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.tou-heading p{margin:5px 0 0}.tou-heading strong{font-size:13px}.tou-heading button,.tou-period-heading button{flex:none}.tou-periods{display:flex;flex-direction:column;gap:12px}.tou-period{display:flex;flex-direction:column;gap:12px;padding:15px;border:1px solid var(--line);border-radius:12px;background:var(--surface2)}.tou-period-heading strong{font-size:13px}.tou-days{border:0;padding:0;margin:0;min-width:0}.tou-days legend{font-size:12px;color:var(--muted);padding:0 0 7px}.stack .tou-days label{display:inline-flex;flex-direction:row;align-items:center;gap:5px;margin:0 12px 8px 0;color:var(--text);font-size:12px;cursor:pointer}.stack .tou-days input{width:auto;accent-color:var(--accent)}.tou-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.tou-fields input{min-width:0}@media(max-width:640px){.tou-fields{grid-template-columns:1fr}}
.tou-day-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px 8px}.stack .tou-day-grid label{display:inline-flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:7px;margin:0;min-width:0;white-space:nowrap}.stack .tou-day-grid input[type="checkbox"]{flex:0 0 16px;width:16px;height:16px;margin:0;padding:0;border-radius:4px}@media(max-width:640px){.tou-day-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
.panel .actions{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}#account-import-form{margin-top:14px}#account-import-preview{margin-top:14px}.danger{color:var(--bad);border-color:var(--bad)}
.subscription-plans{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.subscription-choice{display:flex;flex-direction:column;gap:8px;padding:13px;border:1px solid var(--line);border-radius:12px;background:var(--surface2)}.subscription-choice small{color:var(--muted)}.subscription-choice button{font-size:12px;padding:8px}@media(max-width:700px){.subscription-plans{grid-template-columns:1fr}}
.list .actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;margin:0}
.button{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:10px;padding:10px 12px;text-decoration:none;font-weight:600}.client-download{white-space:nowrap}
.chart-head-controls{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}.chart-head-controls label{display:inline-flex;align-items:center;gap:6px;color:var(--muted);font-size:11px;white-space:nowrap;cursor:pointer}.chart-head-controls input{width:15px;height:15px;margin:0;padding:0;accent-color:var(--accent)}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at 80% -10%,#56795325,transparent 40%),var(--bg);color:var(--text);min-height:100vh}button,input,select,textarea{font:inherit}button,input,select,textarea{border:1px solid var(--line);border-radius:10px;background:var(--surface2);color:var(--text);padding:10px 12px}button{cursor:pointer;font-weight:600}button:hover{border-color:var(--accent)}button:disabled{opacity:.45;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:2px solid var(--accent);outline-offset:3px}a{color:var(--accent)}[hidden]{display:none!important}.topbar{height:72px;padding:0 max(24px,calc((100vw - 1440px)/2));display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);background:#0b1210bb;backdrop-filter:blur(18px)}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--text);font-size:20px;font-weight:800;letter-spacing:-.04em}.brand small{display:block;color:var(--muted);font-size:10px;font-weight:600;letter-spacing:.12em;text-transform:uppercase}.brand-mark{display:grid;place-items:center;background:var(--accent);color:var(--bg);border-radius:12px;width:37px;height:37px;font-size:22px}.top-actions{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:13px}.ghost{background:transparent}main{max-width:1440px;margin:auto;padding:36px 24px 60px}.eyebrow{color:var(--accent);font-size:11px;letter-spacing:.22em;font-weight:800}.muted,.hint{color:var(--muted)}.hint{font-size:12px;line-height:1.55}.auth-shell{display:grid;grid-template-columns:1fr minmax(360px,480px);gap:8vw;align-items:center;min-height:calc(100vh - 210px)}.auth-intro h1{font-size:clamp(42px,5vw,76px);line-height:1.04;letter-spacing:-.06em;max-width:650px;margin:16px 0 24px}.auth-intro>p:not(.eyebrow){color:var(--muted);font-size:18px;line-height:1.7;max-width:580px}.auth-feature{color:var(--accent);font-size:13px;margin-top:35px}.auth-card,.panel,.stat,.device-card{background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:0 16px 32px var(--shadow)}.auth-card{padding:26px}.auth-tabs,.section-tabs{display:flex;gap:6px;overflow:auto;border-bottom:1px solid var(--line)}.auth-tabs button,.section-tabs button{border:0;border-radius:0;background:transparent;color:var(--muted);white-space:nowrap;padding:13px 12px}.auth-tabs button.selected,.section-tabs button.selected{color:var(--accent);box-shadow:inset 0 -2px var(--accent)}.stack{display:flex;flex-direction:column;gap:15px}.stack h2{margin:22px 0 2px}.stack label,.header-controls label,.context-row label,.inline-form label{display:flex;flex-direction:column;gap:7px;font-size:12px;color:var(--muted)}.stack input,.stack textarea{width:100%}.primary{background:var(--accent);border-color:var(--accent);color:var(--bg)}.primary:hover{filter:brightness(1.08)}.notice{border:1px solid var(--line);background:var(--surface2);padding:13px 16px;border-radius:11px;white-space:pre-wrap;overflow-wrap:anywhere}.notice.error{color:var(--bad);border-color:var(--bad)}.page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;margin-bottom:24px}.page-head h1{font-size:clamp(30px,3.8vw,50px);letter-spacing:-.05em;margin:5px 0}.page-head p{margin:0}.header-controls,.context-row{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap}.header-controls select{min-width:145px}.section-tabs{margin-bottom:26px}.section-tabs button{padding:15px 20px}.context-row{margin-bottom:20px}.context-row select{min-width:260px}.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.stat{padding:21px}.stat span{font-size:12px;color:var(--muted)}.stat strong{display:block;font-size:clamp(24px,2.5vw,36px);letter-spacing:-.05em;margin:10px 0}.stat small{color:var(--muted);font-size:11px;line-height:1.4}.chart-grid,.two-col{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.panel{padding:22px;margin-bottom:18px;min-width:0}.panel h2,.panel h3{margin:0 0 16px}.panel-head{display:flex;justify-content:space-between;gap:10px;align-items:baseline}.panel-head span{font-size:11px;color:var(--muted)}.chart{display:block;width:100%;min-height:310px;color:var(--muted);font-size:13px}.chart>p{padding:110px 10px;text-align:center}.section-title{display:flex;justify-content:space-between;align-items:center;margin:28px 0 14px}.section-title h2{margin:0}.section-title p{font-size:12px;margin:5px 0}.pill,.status{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:99px;padding:6px 10px;font-size:11px;color:var(--muted)}.status.online,.status.active{color:var(--accent);border-color:var(--accent)}.status.offline,.status.quota_paused{color:var(--gold);border-color:var(--gold)}.status.archived,.status.revoked{color:var(--muted)}.device-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px}.device-card{padding:18px}.device-card h3{margin:0 0 7px}.device-card p{font-size:12px;color:var(--muted);overflow-wrap:anywhere}.device-card .actions{display:flex;gap:8px;flex-wrap:wrap}.device-card button{font-size:12px;padding:8px 10px}.inline-form{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;margin-bottom:20px}.inline-form input{min-width:240px}.list>div{padding:12px 0;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:15px}.list>div:last-child{border-bottom:0}.list small{display:block;color:var(--muted);margin-top:5px}.list button{font-size:12px}.secret-box{border:1px solid var(--accent);border-radius:12px;background:var(--surface2);padding:14px;margin-bottom:15px;overflow-wrap:anywhere}.secret-box code{font-size:14px;color:var(--accent)}dialog{border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--text);width:min(480px,calc(100% - 24px));padding:24px}dialog::backdrop{background:#030807bb}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}footer{max-width:1440px;margin:auto;border-top:1px solid var(--line);padding:22px 24px;color:var(--muted);font-size:11px}@media(max-width:1000px){.auth-shell{grid-template-columns:1fr;gap:25px;padding-top:30px}.auth-intro h1{font-size:48px}.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.page-head{align-items:flex-start;flex-direction:column}}@media(max-width:640px){main{padding:22px 14px}.topbar{padding:0 14px}.top-actions #signed-in-as{display:none}.auth-card{padding:17px}.auth-intro h1{font-size:38px}.stat-grid,.chart-grid,.two-col{grid-template-columns:1fr}.section-tabs button{padding:12px}.context-row select{min-width:210px}}
