:root{color-scheme:dark;--bg:#0d0f14;--surface:#151820;--line:#272c38;--text:#edf0f5;--muted:#9ba5b7;--accent:#f04465}body{background:var(--bg);color:var(--text);font-family:Inter,"Segoe UI",Arial,sans-serif;font-size:14px;letter-spacing:.05px}button,a,input,select{touch-action:manipulation}button{font-weight:600;transition:background .12s,box-shadow .12s}button:hover{background:#ff5372}button.secondary:hover{background:#363d4c}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #ff7891;outline-offset:3px}button svg{vertical-align:middle;flex-shrink:0}button[hidden],[hidden]{display:none!important}aside{width:248px;padding:30px 18px 22px;background:#11141b;border-right:1px solid var(--line);display:flex;flex-direction:column;z-index:3}.panel-brand{display:flex;gap:9px;align-items:center;text-decoration:none;padding:2px 12px}.panel-brand img{object-fit:contain}.panel-brand strong{font-size:29px;letter-spacing:-1.4px;color:#f5f6fa}.workspace-label{font-size:10px;letter-spacing:1.7px;margin:30px 12px 10px;color:#778296}nav{margin:0;gap:5px}nav button{display:flex;align-items:center;gap:13px;border-radius:8px;padding:12px;color:#aab3c3;font-size:13px;font-weight:500}nav button.selected{background:#f0446519;color:#ff7390;box-shadow:inset 3px 0 #f04465}nav button:hover{background:#ffffff08;color:#fff}.sidebar-foot{margin-top:auto;padding:24px 12px 0;display:flex;align-items:center;gap:8px;color:#aab3c3;font-size:12px}.sidebar-foot small{margin-left:auto;font-size:10px}.service-dot{width:6px;height:6px;background:#68cc9c;border-radius:50%}main{margin-left:248px;max-width:1700px;padding:35px 42px}header{margin-bottom:28px;min-height:57px}header small{font-size:11px;letter-spacing:.3px}header h1{margin:6px 0 0;font-size:25px;font-weight:650;letter-spacing:-.6px}.header-actions{display:flex;align-items:center;gap:18px}.header-actions button{display:flex;align-items:center;gap:7px;font-size:12px}.secondary-link{display:flex;gap:7px;align-items:center;font-size:12px;color:#aab3c3;text-decoration:none}.card{background:var(--surface);border-color:var(--line);box-shadow:0 3px 15px #00000008;padding:25px;border-radius:12px}.card h2{font-size:17px;font-weight:600;margin-top:0;letter-spacing:-.2px}h1,h2,h3{line-height:1.3}input,select,textarea{background:#10131a;border-color:#303646;min-height:43px;font-size:14px}input::placeholder{color:#697589}label{display:block;color:#b2bccb;font-size:12px}.row{align-items:flex-start}.row>label{min-width:140px}.grid{gap:18px}.metrics{grid-template-columns:repeat(4,minmax(0,1fr))}.metrics .card{padding:22px}.stat-label{display:flex;align-items:center;justify-content:space-between;color:#aab3c3;font-size:12px}.stat-label svg{color:#f36a85}.metric{font-size:34px;line-height:1.2;margin:15px 0 7px;font-weight:650;letter-spacing:-1px}.stat-card small{font-size:11px;color:#818da1}.welcome{margin-bottom:26px;padding:28px 31px;border:1px solid #352932;border-radius:12px;background:linear-gradient(105deg,#211a24,#151820 68%);display:flex;align-items:center;justify-content:space-between}.welcome h2{font-size:27px;margin:8px 0 10px;font-weight:600;letter-spacing:-.7px}.welcome p:not(.eyebrow){margin:0;color:#aab3c3}.eyebrow{font-size:10px;letter-spacing:1.7px;color:#b0a4b2;font-weight:650;margin:0 0 11px}.welcome-icon{width:75px;height:75px;display:grid;place-items:center;border:1px solid #49303e;border-radius:22px;background:#f044650c;margin-left:20px}.welcome-icon svg{width:35px;height:35px;color:#ee6e88}.dashboard-columns{display:grid;grid-template-columns:1.25fr 1fr;gap:20px}.quick-actions{display:grid;gap:9px;margin-top:20px}.quick-action{display:flex;align-items:center;gap:15px;text-align:left;padding:14px;background:#10131a;border:1px solid #282e3b;color:#dce2ed;border-radius:9px}.quick-action>svg:first-child{color:#e5718b}.quick-action>svg:last-child{margin-left:auto;color:#78869b}.quick-action:hover{background:#1e232e;border-color:#414b5e}.quick-action strong{display:block;font-size:13px;font-weight:600}.quick-action small{display:block;margin-top:4px;font-size:11px;color:#909db1}.empty-state{padding:32px 15px;text-align:center;color:#8793a7;font-size:13px;line-height:1.7;border:1px dashed #303746;border-radius:8px;margin-top:23px}.expiry-row{display:flex;justify-content:space-between;padding:15px 0;border-bottom:1px solid var(--line)}.setup-steps{padding-left:20px;color:#9eabc0;line-height:2.4;font-size:13px}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.settings-grid>.card{margin-bottom:0}table{font-size:13px}th{font-size:10px;letter-spacing:.8px;padding:15px 12px;color:#8390a5}td{padding:17px 12px;border-color:#272d39}td small{font-size:11px}tbody tr:hover{background:#ffffff02}.pill{display:inline-block;font-size:10px;font-weight:600;letter-spacing:.3px;border:1px solid #305245;background:#21372e;color:#8bd5b1}.pill.muted{border-color:#623443;background:#39212c;color:#f28ca1}.table-tools{display:flex;align-items:center;gap:16px;margin:5px 0 14px;flex-wrap:wrap}.table-search{position:relative;flex:1;min-width:180px;max-width:350px}.table-search>svg{position:absolute;left:12px;top:12px;color:#76849b}.table-search input{margin:0;padding-left:40px}.status-filter{display:flex;align-items:center;gap:8px}.status-filter select{width:105px;margin:0;font-size:12px}.table-count{margin-left:auto;font-size:11px;color:#8794a9}.table-pager{display:flex;justify-content:flex-end;align-items:center;gap:16px;padding-top:18px;font-size:12px;color:#94a0b3}.table-pager button{font-size:11px;padding:7px 12px}.table{overflow-x:auto}#toast{z-index:100;box-shadow:0 8px 30px #0008;border:1px solid #4d596d;font-size:13px;background:#222a38}.auth{max-width:440px;margin:8vh auto;padding:35px;background:#151820}.auth h1{font-size:34px;letter-spacing:-1px}.auth h2{margin-top:24px}.auth form>button{width:100%;margin-top:4px}.auth>p{font-size:13px}.order{font-size:13px}.order button{font-size:11px}.slide{height:190px}.row input[type=number]{max-width:180px}dialog{max-height:90vh;overflow:auto}dialog::backdrop{backdrop-filter:blur(4px)}@media(min-width:1700px){main{margin-left:248px;margin-right:auto}}@media(max-width:1100px){main{padding:28px}.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-columns{grid-template-columns:1fr}}@media(max-width:800px){aside{position:relative;inset:auto;width:auto;display:block;padding:18px 20px}.panel-brand{padding:0}.workspace-label,.sidebar-foot{display:none}nav{display:flex;margin-top:18px;overflow-x:auto;gap:4px;padding-bottom:5px}nav button{flex-shrink:0;padding:10px 12px;font-size:12px}nav button.selected{box-shadow:inset 0 -2px #f04465}nav button svg{width:17px;height:17px}main{margin:0;padding:22px}.header-actions{gap:9px}.secondary-link{display:none}header h1{font-size:22px}.welcome{padding:23px}.welcome h2{font-size:24px}.welcome-icon{display:none}.metrics{gap:12px}.metrics .card{padding:18px}.metric{font-size:29px}.settings-grid{grid-template-columns:1fr}.card{padding:21px}.auth{margin:5vh 18px}.status-filter{font-size:11px}.table-tools{gap:10px}.table-count{font-size:10px}.table-search{min-width:150px}.dashboard-columns{gap:0}}

.remote-card{max-width:650px;margin:0 auto}.remote-keys{max-width:420px;margin:24px auto}.remote-key-row{display:flex;justify-content:center;gap:10px;margin:10px 0}.remote-key-row button{min-width:65px;min-height:52px;flex:1;max-width:160px;font-size:14px}.remote-key-row:first-child button,.remote-key-row:nth-child(3) button{flex:0;min-width:105px}.remote-key-row:nth-child(2) button{font-size:20px}#remote select{max-width:100%}.remote-keys button:active{transform:scale(.97)}
.simple-remote{max-width:350px;margin:16px auto 0}.remote-status{font-size:12px;color:#9ba8ba;margin:10px 0 0}.remote-touchpad{position:relative;display:flex!important;flex-direction:column;align-items:center;justify-content:center;width:100%;height:230px;min-height:180px;border:1px solid #46516a!important;border-radius:24px!important;background:radial-gradient(ellipse at 50% 40%,#263347,#161e2c 80%)!important;color:#d7dfed!important;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;cursor:grab;overflow:hidden}.remote-touchpad::before{content:'';position:absolute;inset:16px;border:1px solid #ffffff0b;border-radius:14px;pointer-events:none}.remote-touchpad.touching{border-color:#ec557d!important;background:radial-gradient(ellipse at 50% 40%,#3d2c43,#1c2030 80%)!important;cursor:grabbing}.remote-touchpad:focus-visible,.simple-remote-key:focus-visible{outline:2px solid #ff86a5;outline-offset:3px}.touchpad-cross{font-size:44px;line-height:1;font-weight:200;color:#8794a9}.touchpad-ok{font-size:10px;letter-spacing:2px;color:#8c99ad;margin-top:14px}.remote-touch-hint{text-align:center;font-size:11px!important;color:#9ca8bd!important;margin:10px 0 18px!important}.simple-remote-row{display:flex;gap:10px;margin-top:10px}.simple-remote-key{flex:1;min-width:0;min-height:58px;border-radius:14px!important;border:1px solid #344054!important;background:#1b2433!important;color:#e0e6f0!important;display:flex!important;align-items:center;justify-content:center;gap:8px;padding:10px!important;touch-action:manipulation}.simple-remote-key>span{font-size:24px;line-height:1}.simple-remote-key small{font-size:10px;line-height:1.3}.simple-remote-key:active{background:#34405a!important}.simple-remote-key:disabled,.remote-touchpad:disabled{opacity:.35;cursor:default}@media(max-height:700px){.remote-touchpad{height:180px}.simple-remote-key{min-height:48px}.remote-touch-hint{margin-bottom:10px!important}}

.remote-search-toggle{width:100%;min-height:44px;border-radius:12px!important;background:#1c2637!important;color:#e4eaf5!important;border:1px solid #3d4a60!important;margin-bottom:12px;cursor:pointer}.remote-search-form[hidden]{display:none!important}.remote-search-form{display:grid;grid-template-columns:1fr auto;gap:8px;padding:12px;border:1px solid #3c4860;border-radius:14px;margin:0 0 14px;background:#101824}.remote-search-form select{grid-column:1/-1;width:100%;min-width:0;min-height:40px}.remote-search-form input{width:100%;min-width:0;box-sizing:border-box;font-size:16px!important;min-height:44px}.remote-search-form button{min-height:44px;border-radius:10px}.remote-search-note{font-size:11px!important;line-height:1.5;color:#b9a0aa!important}.remote-search-toggle:disabled{opacity:.4;cursor:default}

/* Keep dense account/catalog tools usable on narrow and short screens. */
aside{overflow-y:auto;overscroll-behavior-y:contain;scrollbar-width:thin;scrollbar-color:#46516a transparent}
main,main>*,.grid>*,.dashboard-columns>*,.settings-grid>*,.row>*,.card{min-width:0}
.grid{grid-template-columns:repeat(auto-fit,minmax(min(230px,100%),1fr))}
.metrics{grid-template-columns:repeat(4,minmax(0,1fr))}
.dashboard-columns{grid-template-columns:minmax(0,1.25fr) minmax(0,1fr)}
.settings-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.card p,.card small,.card h2,.card h3,.welcome p,.quick-action strong,.quick-action small{overflow-wrap:anywhere}
.card img{max-width:100%}
.slide{display:block;width:100%;max-width:100%;height:auto;aspect-ratio:16/9;object-fit:contain;background:#0d1119}
input,select,textarea{min-width:0;max-width:100%}
.row>label{min-width:min(140px,100%)}
.order{min-width:0;flex-wrap:wrap}
.order span{min-width:0;flex:1 1 140px;overflow-wrap:anywhere}
.order button{flex:0 0 auto}
.quick-action>span{min-width:0}
header{flex-wrap:wrap;gap:12px}
header>div{min-width:0}
header h1,header small{overflow-wrap:anywhere}
.table-pager{flex-wrap:wrap;gap:10px}
#toast{max-width:min(420px,calc(100% - 32px));overflow-wrap:anywhere}
dialog{max-width:min(540px,calc(100% - 24px));max-height:calc(100dvh - 24px);overflow-wrap:anywhere}
@media(max-width:1100px){.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-columns{grid-template-columns:minmax(0,1fr)}}
@media(max-width:800px){.settings-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:420px){
 main{padding:18px 16px}.card{padding:18px}.welcome{padding:20px}
 .order{gap:8px;padding-inline:0}.order span{flex-basis:100%}.order button:first-of-type{margin-left:auto}
 .table-search{min-width:0;flex-basis:100%;max-width:none}.table-count{margin-left:0}
 .table-pager{justify-content:center}.metrics .card{padding:14px}.stat-label{gap:6px;overflow-wrap:anywhere}
 .header-actions{flex-shrink:0}header h1{font-size:21px}
}
@media(prefers-reduced-motion:reduce){button{transition:none}}


.device-code-input{width:100%;max-width:19rem;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:1.4rem;letter-spacing:.15em;text-align:center;text-transform:uppercase}

/* Keep visibility next to the category name at every screen width. */
.category-order{font-size:14px;flex-wrap:nowrap;gap:10px;min-height:52px}
.category-order .category-visibility{display:flex;align-items:center;justify-content:flex-start;gap:10px;flex:1 1 auto;min-width:0;margin:0;cursor:pointer}
.category-visibility input[type=checkbox]{appearance:auto;accent-color:#ed365b;width:20px;height:20px;min-height:20px;flex:0 0 20px;margin:0;padding:0;cursor:pointer}
.category-order .category-title{flex:0 1 auto;min-width:0;overflow-wrap:anywhere}
.category-order .hidden-badge{flex:0 0 auto;color:#ff94a9;font-size:12px;white-space:nowrap}
.category-order.is-hidden .category-title{color:#9da6b8}
.category-order .hidden-badge[hidden]{display:none}
.visibility-hint{color:#a4adbf;font-size:14px}
@media(max-width:640px){.category-order{gap:6px}.category-order .category-visibility{gap:8px}.category-order button:first-of-type{margin-left:0}.category-order button{min-width:32px;padding:8px}.category-order .category-title{flex-basis:auto}}

/* Direction buttons retain normal TV focus navigation; the pad is for pointing. */
.remote-directions{margin:16px auto 18px;max-width:260px}
.remote-direction-row{display:flex;justify-content:center;gap:8px;margin:7px 0}
.remote-direction{display:flex!important;align-items:center;justify-content:center;width:64px;height:48px;min-height:48px;padding:6px!important;border:1px solid #46516a!important;border-radius:13px!important;background:#1b2433!important;color:#f3f5fa!important;touch-action:manipulation}
.remote-direction-ok{font-size:16px;font-weight:bold;background:#a9274b!important;border-color:#c73560!important}
.remote-direction:active{background:#45516a!important}.remote-direction:disabled{opacity:.35;cursor:default}.remote-direction:focus-visible{outline:2px solid white;outline-offset:2px}
.simple-remote .remote-touchpad{height:165px;min-height:140px}.simple-remote .touchpad-cross{font-size:32px}.simple-remote .touchpad-ok{margin-top:8px}
@media(max-height:700px){.remote-directions{margin:10px auto}.remote-direction{height:44px;min-height:44px}.simple-remote .remote-touchpad{height:140px}}

/* Social sign-in stays server-rendered until the user chooses a provider: no external SDKs on load. */
.auth{max-width:480px;margin:72px auto 32px}.auth>h1{font-size:32px}.auth>h2{font-size:26px}.auth>p{font-size:16px}
.social-options{display:grid;gap:10px;margin:22px 0 14px}.social-button{display:flex;align-items:center;gap:12px;min-height:50px;width:100%;padding:12px 16px!important;border:1px solid #565b68!important;border-radius:9px!important;background:#fff!important;color:#1f1f1f!important;text-align:left;font-size:15px;font-weight:600;line-height:1.3}
.social-button svg{width:22px;height:22px;flex:none}.social-button span{flex:1}.social-button small{font:12px system-ui;color:inherit;opacity:.75}.social-button:disabled{opacity:.65;cursor:default}.social-apple{background:#050505!important;color:#fff!important}.social-facebook{background:#0866ff!important;color:#fff!important;border-color:#0866ff!important}.social-button:focus-visible{outline:3px solid #f25977;outline-offset:3px}
.social-note{font-size:14px!important;line-height:1.5!important;color:#adb5c4}.auth-divider{display:flex;align-items:center;gap:12px;color:#9ba4b6;font-size:14px;margin:24px 0}.auth-divider:before,.auth-divider:after{content:'';height:1px;background:#343a48;flex:1}
.auth-error{padding:14px;background:#40232f;border:1px solid #8d3c54;border-radius:8px;color:#ffd9e1!important}.link-error{color:#ffb7c7}.auth form>button[type=submit]{width:100%;min-height:48px}.auth label{font-size:14px}
@media(max-width:540px){.auth{margin:68px 14px 24px;padding:24px 20px}.auth>h2{font-size:24px}.social-button{min-height:50px}.auth .password-input{gap:5px}}
