:root{color-scheme:light;--surface:#fff;--text:#172a34;--page:#f4f6f5}[data-theme=dark]{color-scheme:dark;--surface:#172321;--text:#e0ece7;--page:#0c1513;--border:#34463f;--muted:#a3b9ae;--green:#247d60}body,html{background:var(--page);color:var(--text)}.theme-toggle{position:fixed;top:14px;right:18px;z-index:4}.login-card,.panel,.stats article,dialog,input,select,textarea{background:var(--surface);color:var(--text)}.secondary,input,select,textarea{border-color:var(--border)}[data-theme=dark] .secondary{background:#243a31;color:var(--text)}[data-theme=dark] .device-summary,[data-theme=dark] .stats span,[data-theme=dark] th{color:var(--muted);background:var(--surface)}[data-theme=dark] .message{background:#183e30;color:#d4f3e4;border-color:#346850}[data-theme=dark] .badge.pending{background:#493e20;color:#f0d994}[data-theme=dark] .badge.approved{background:#214a36;color:#b6eed1}[data-theme=dark] .badge.disabled{background:#4b2c2c;color:#f0b9b9}[data-theme=dark] .device-logs{background:#0a1210;color:#d6e9de}[data-theme=dark] .dialog-footer,[data-theme=dark] .panel-footer{background:var(--surface)}[data-theme=dark] tbody tr:hover{background:#21362c}#device-dialog{max-height:90vh;overflow:auto;padding:28px}#device-dialog details{border-top:1px solid var(--border);padding:18px 0}#device-dialog summary{cursor:pointer;font-weight:650}#device-dialog textarea{width:100%}#delivery-status{padding:12px;border-radius:8px}.sms-card{border:1px solid var(--border);border-radius:10px;padding:15px;margin:12px 0}.sms-card small{display:block;color:var(--muted);margin-top:5px}.sms-card p{white-space:pre-wrap;overflow-wrap:anywhere;color:var(--text)}.client-shell{max-width:850px;margin:auto;padding:60px 24px}.client-shell header{margin-top:20px}.client-shell .panel{padding:24px;margin:20px 0}.client-shell textarea{width:100%}.client-shell .login-card{max-width:460px;margin:50px auto}.sos-active{outline:2px solid #ef4444;background:rgba(239,68,68,.12)}.sos-label{color:#ef4444;font-weight:700}.header-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}.invitation-panel{padding:20px;margin-bottom:24px;scroll-margin-top:20px}.client-users-panel{margin-bottom:24px}.client-users-panel form{padding:0 24px 24px}.client-submit{display:flex;align-items:center;padding-top:24px}#client-user-result{grid-column:1/-1;margin:0}@media(max-width:720px){.sidebar{flex-wrap:wrap}.client-users-panel form{padding:0 16px 20px}.header-actions{gap:8px}.header-actions .primary{padding:10px 12px}}.client-group td{background:var(--panel-bg,rgba(120,140,150,.08))}.client-group-toggle{width:100%;text-align:left;border:0;background:0 0;color:inherit;padding:12px;cursor:pointer}.client-group-toggle small{margin-left:12px}.attention-item{display:flex;align-items:center;gap:12px;padding:12px;border-bottom:1px solid #ef444466}.attention-item div{flex:1}.attention-item small{display:block}#attention-panel{border:1px solid #ef4444}tr[hidden]{display:none}.attention-item{flex-wrap:wrap}.attention-item div{min-width:150px;overflow-wrap:anywhere}.client-group-toggle{overflow-wrap:anywhere}#attention-panel{padding:20px;margin-bottom:20px}#attention-list{max-height:480px;overflow:auto}.attention-item:last-child{border-bottom:0}.client-group td{padding:8px 12px}.client-group-toggle{padding:4px 0;min-height:32px;display:flex;align-items:center;gap:10px}.client-group-toggle small{display:inline;margin:0}input[role=switch]{appearance:none!important;display:inline-block!important;position:relative;width:44px!important;min-width:44px;height:26px;padding:0!important;margin:0!important;border:1px solid var(--border);border-radius:20px;background:#76877e;vertical-align:middle;cursor:pointer}input[role=switch]::after{content:"";position:absolute;width:18px;height:18px;top:3px;left:3px;border-radius:50%;background:#fff;transition:transform .15s}input[role=switch]:checked{background:var(--green)}input[role=switch]:checked::after{transform:translateX(18px)}.access-period-grid{display:grid;grid-template-columns:minmax(120px,1fr) minmax(180px,1.4fr);gap:0 16px;align-items:end}.access-period-grid label{min-width:0}.access-period-grid input,.access-period-grid select{width:100%;min-width:0}.access-period-grid [data-period-renew]{margin-bottom:18px;min-height:42px}.access-period-grid+small{display:block;color:var(--muted);line-height:1.6}@media(max-width:480px){.access-period-grid{grid-template-columns:1fr}.access-period-grid label{margin:10px 0}.access-period-grid [data-period-renew]{margin:8px 0}}[hidden]{display:none!important}.phone-count-badge{display:inline-flex;align-items:center;justify-content:center;min-width:24px;padding:3px 9px;border-radius:999px;background:var(--page);color:var(--text);font-size:12px;font-weight:700;line-height:1.5;white-space:nowrap}.panel-heading h2 .phone-count-badge{margin-left:8px;vertical-align:middle}#devices-view .stats article{align-items:center}#devices-view .stats article strong.phone-count-badge{display:inline-flex;align-items:center;justify-content:center;align-self:center;min-width:44px;height:36px;margin:0;padding:0 12px;font-size:20px;line-height:1;border:1px solid var(--border);font-variant-numeric:tabular-nums}#reseller-renewal-panel>summary>strong,#subscription-title{font-size:20px;font-weight:700;line-height:1.3}#devices-view #device-rows .client-group td,.reseller-shell #reseller-rows .client-group td{padding:10px 14px 5px;border:0;background:0 0}#devices-view #device-rows .client-group-toggle,.reseller-shell #reseller-rows [data-reseller-group]{display:grid;grid-template-columns:30px minmax(0,1fr) auto auto;align-items:center;gap:12px;width:100%;height:auto;min-height:52px;padding:10px 14px;margin:0;border:1px solid var(--border);border-left:3px solid var(--border);border-radius:8px;background:var(--page);color:var(--text);text-align:left;line-height:1.4;font-size:13px}#devices-view #device-rows [aria-expanded=true],.reseller-shell #reseller-rows [data-reseller-group][aria-expanded=true]{border-left-color:var(--green,var(--accent,#23877b));background:var(--surface,var(--page))}.group-chevron{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:6px;border:1px solid var(--border);font-size:0;flex-shrink:0}.group-chevron::after{content:"";width:7px;height:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg)}[aria-expanded=true]>.group-chevron::after{transform:rotate(45deg)}.group-heading{display:flex;min-width:0;flex-direction:column;gap:4px}.group-heading strong{font-size:14px!important;margin:0!important}.group-heading small{display:block!important;margin:0!important;font-size:12px!important;color:var(--muted)}.group-toggle-state{font-size:12px;color:var(--muted);font-weight:600}#devices-view #device-rows tr[data-id]>td,.reseller-shell #reseller-rows tr[data-reseller-phone]>td{padding-top:17px;padding-bottom:17px;vertical-align:top}.phone-owner,.phone-platform{display:block;margin-top:5px;font-size:12px;line-height:1.5;color:var(--muted);overflow-wrap:anywhere}.phone-owner{padding-top:3px;color:var(--text);opacity:.8}#devices-view #device-rows [data-group-depth="1"]>td,.reseller-shell #reseller-rows [data-group-depth="1"]>td{padding-left:32px}#devices-view #device-rows [data-group-depth="2"]>td,.reseller-shell #reseller-rows [data-group-depth="2"]>td{padding-left:50px}#devices-view #device-rows [data-group-depth="3"]>td,.reseller-shell #reseller-rows [data-group-depth="3"]>td{padding-left:68px}#devices-view #device-rows [data-group-depth="4"]>td,.reseller-shell #reseller-rows [data-group-depth="4"]>td{padding-left:86px}#devices-view #device-rows [data-owner-depth]>td:first-child,.reseller-shell #reseller-rows [data-owner-depth]>td:first-child{border-left:2px solid var(--border)}.alert-group-heading th,.list-section-heading th{padding:18px 20px 12px;text-align:left;font-size:15px}.alert-group-heading th{border-left:3px solid #e35d6a}.alert-group-heading small{display:block;color:var(--muted);font-size:12px;font-weight:400;margin-top:5px}.alert-admin-button{display:block;margin-top:8px;font-size:12px;min-height:34px}.alert-flash{animation:admin-alert-pulse .5s ease-in-out infinite alternate}@keyframes admin-alert-pulse{from{background-color:#e35d6a0d}to{background-color:#e35d6a40;outline:2px solid #e35d6a}}@media(prefers-reduced-motion:reduce){.alert-flash{animation:none;outline:2px solid #e35d6a}}[data-owner-depth="0"],[data-owner-depth="1"]{--owner-indent:14px}[data-owner-depth="2"]{--owner-indent:32px}[data-owner-depth="3"]{--owner-indent:50px}[data-owner-depth="4"]{--owner-indent:68px}[data-owner-depth="5"]{--owner-indent:86px}#device-rows tr[data-owner-depth]>td:first-child,#reseller-rows tr[data-owner-depth]>td:first-child{position:relative;min-width:220px;padding-left:calc(var(--owner-indent) + 30px);border-left:0;background-image:linear-gradient(var(--border),var(--border));background-size:2px 100%;background-position:var(--owner-indent) 0;background-repeat:no-repeat}#device-rows tr[data-owner-depth]>td:first-child::after,#reseller-rows tr[data-owner-depth]>td:first-child::after{content:"";position:absolute;top:28px;left:var(--owner-indent);width:20px;height:2px;background:var(--border)}@media(max-width:760px){[data-owner-depth]{--owner-indent:12px!important}#device-rows tr[data-owner-depth]>td:first-child,#reseller-rows tr[data-owner-depth]>td:first-child{min-width:0;padding-left:38px}}.account-hierarchy{padding:18px;display:grid;gap:18px}.account-section-label{display:flex;padding:5px 0;color:var(--muted)}.account-branch{min-width:0;border:1px solid var(--border);border-radius:10px;overflow:hidden;background:var(--panel-bg,var(--page))}.account-node{padding:16px 18px}.account-node[data-toggle-account]{cursor:pointer}.account-node:hover{background:var(--page)}.account-node-heading{display:flex;align-items:center;gap:16px}.account-toggle{display:flex;align-items:center;gap:12px;flex:1;min-width:0;min-height:44px!important;padding:4px 0!important;border:0!important;background:0 0!important;color:inherit!important;text-align:left}.account-toggle-static{flex:1}.account-node-name{display:flex;flex:1;min-width:0;flex-direction:column;gap:5px}.account-node-name strong{font-size:15px;overflow-wrap:anywhere}.account-node-name small{color:var(--muted);font-size:12px}.account-node-actions{display:flex;gap:8px;flex-wrap:wrap}.account-node-actions button{min-height:40px}.account-branch[data-open=true]>.account-node{border-left:3px solid var(--green,var(--accent,#23877b))}.account-node-meta{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;margin:14px 0 0 40px}.account-counts{display:flex;flex-wrap:wrap;gap:7px}.account-plan small{display:block;margin-top:4px;color:var(--muted);font-size:12px}.account-children{margin:0 18px 18px 30px;padding:5px 0 0 18px;border-left:2px solid var(--border);display:grid;gap:14px}.account-branch[data-depth="4"] .account-children{margin-left:0;padding-left:0;border-left:0}.account-own-phones{padding:14px;background:var(--page);border-radius:8px}.account-own-phones>div{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.account-own-phones ul{margin:10px 0 0;padding-left:20px;color:var(--muted);font-size:13px;line-height:1.8}.account-toggle:focus-visible,.client-group-toggle:focus-visible,[data-reseller-group]:focus-visible{outline:2px solid var(--green,var(--accent,#23877b));outline-offset:2px}.client-editor-children{margin-top:20px;padding-top:16px;border-top:1px solid var(--border)}.plan-limits{margin:18px 0;padding-top:14px;border-top:1px solid var(--border)}.plan-limits p{font-size:12px;line-height:1.6}.plan-next{font-weight:700}.plan-limits table{width:100%;font-size:12px}.plan-limits td,.plan-limits th{padding:9px 8px;white-space:normal;overflow-wrap:anywhere}@media(max-width:650px){.account-hierarchy{padding:12px;gap:14px}.account-node{padding:14px}.account-node-heading{align-items:stretch;flex-direction:column;gap:12px}.account-node-actions{padding-left:40px}.account-node-meta{margin-left:0;align-items:flex-start;flex-direction:column;gap:12px}.account-children{margin:0 10px 14px 12px;padding-left:10px}#devices-view #device-rows .client-group-toggle,.reseller-shell #reseller-rows [data-reseller-group]{grid-template-columns:26px minmax(0,1fr) auto;padding:10px;gap:8px}.group-toggle-state{grid-column:2/-1}.account-toggle .group-toggle-state{white-space:nowrap}#devices-view #device-rows .client-group td,.reseller-shell #reseller-rows .client-group td{padding-left:12px!important}#devices-view #device-rows [data-group-depth="1"]>td,.reseller-shell #reseller-rows [data-group-depth="1"]>td{padding-left:22px!important}#devices-view #device-rows [data-group-depth="2"]>td,.reseller-shell #reseller-rows [data-group-depth="2"]>td{padding-left:32px!important}#devices-view #device-rows [data-group-depth="3"]>td,.reseller-shell #reseller-rows [data-group-depth="3"]>td{padding-left:42px!important}#devices-view #device-rows [data-group-depth="4"]>td,.reseller-shell #reseller-rows [data-group-depth="4"]>td{padding-left:52px!important}}@media(max-width:650px){#device-rows .alert-group-heading,#device-rows .alert-group-heading th,#device-rows .list-section-heading,#device-rows .list-section-heading th,#reseller-rows .alert-group-heading,#reseller-rows .alert-group-heading th,#reseller-rows .list-section-heading,#reseller-rows .list-section-heading th{display:block;width:100%;box-sizing:border-box;grid-column:1/-1}}body #reseller-renewal-panel>summary.panel-heading,body #subscription-panel>summary.panel-heading{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:10px;min-height:0;padding:16px 24px;list-style:none}body #reseller-renewal-panel>summary.panel-heading::before,body #subscription-panel>summary.panel-heading::before{content:"▸";font-size:13px}body #reseller-renewal-panel[open]>summary.panel-heading::before,body #subscription-panel[open]>summary.panel-heading::before{content:"▾"}body #reseller-renewal-panel>summary strong,body #subscription-panel>summary strong{margin:0;line-height:1.3}#reseller-renewal-summary,#subscription-summary{display:inline-flex;align-items:center;justify-content:center;margin:0;padding:3px 9px;border-radius:999px;background:var(--page);font-size:12px;line-height:1.5;white-space:nowrap}.expiry-warning{display:inline-flex!important;align-items:center;gap:6px;padding:3px 8px;border:1px solid #b9893270;border-radius:999px;background:#b9893218;color:var(--text)!important;font-size:12px!important;font-weight:600;line-height:1.5}.queued-period-note{display:block;font-size:12px;color:var(--muted);margin-top:6px}.queued-plan-editor{margin-top:16px;padding-top:14px;border-top:1px solid var(--border)}.queued-plan-editor h4{margin:0 0 8px}.queued-plan-editor p{font-size:12px;line-height:1.6}@media(min-width:801px){#phone-directory thead th:first-child{width:300px}#reseller-phone-directory thead th:first-child{width:320px}}.queued-period-note{padding-top:7px;border-top:1px solid var(--border)}.queued-period-note span{display:block;margin-top:3px}body #reseller-renewal-panel>summary.panel-heading::before,body #subscription-panel>summary.panel-heading::before{content:"";width:7px;height:7px;flex-shrink:0;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);margin-right:4px}body #reseller-renewal-panel[open]>summary.panel-heading::before,body #subscription-panel[open]>summary.panel-heading::before{content:"";transform:rotate(45deg)}@media(min-width:801px){#phone-directory{min-width:1280px}#reseller-phone-directory{min-width:1420px}#phone-directory thead th:first-child,#reseller-phone-directory thead th:first-child{width:280px}#phone-directory th:nth-child(2),#reseller-phone-directory th:nth-child(2){width:150px}#phone-directory th:nth-child(3),#reseller-phone-directory th:nth-child(3){width:150px}#phone-directory th:nth-child(4),#phone-directory th:nth-child(5),#reseller-phone-directory th:nth-child(4),#reseller-phone-directory th:nth-child(5){width:90px}#phone-directory th:nth-child(6),#reseller-phone-directory th:nth-child(6){width:220px}#reseller-phone-directory th:nth-child(7){width:160px}#phone-directory th:nth-child(7),#reseller-phone-directory th:nth-child(8){width:130px}#phone-directory th:last-child,#reseller-phone-directory th:last-child{width:150px}.expiry-warning{white-space:nowrap}}body #reseller-renewal-panel,body #subscription-panel{padding:0}body #reseller-renewal-panel>summary.panel-heading,body #subscription-panel>summary.panel-heading{padding:16px 24px}.expiry-warning{display:flex!important;width:fit-content;max-width:100%;padding:5px 10px;margin:0 0 8px!important;line-height:1.4;white-space:normal}.account-plan{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0}.account-plan>strong{display:block;line-height:1.5}.account-plan>small{margin:0;line-height:1.5}.account-plan>.expiry-warning{margin:0 0 2px!important}.account-children,.account-hierarchy{align-items:start}.account-branch{align-self:start}