:root{font-family:Inter,ui-sans-serif,system-ui,sans-serif;color:#e8effb;background:#081521}
*{box-sizing:border-box}body{margin:0}header{display:flex;justify-content:space-between;align-items:center;padding:20px clamp(20px,4vw,60px);background:#101f30;border-bottom:1px solid #243e5b}
.brand{font-weight:900;font-size:29px;letter-spacing:-1px}.blue{color:#328fff}header small{letter-spacing:.18em;font-size:11px;color:#a7b9c9}
main{max-width:1380px;margin:20px auto;padding:0 25px}.muted{color:#aabbd1;font-size:14px}.error{color:#ff7b85}
h1{font-size:28px;margin:0 0 12px}h2{font-size:20px;margin:0 0 12px}.narrow{max-width:510px;margin:12vh auto}
.panel{padding:24px;border:1px solid #29415b;border-radius:14px;background:#102237;margin-bottom:18px}
nav{display:flex;gap:10px;flex-wrap:wrap;margin:20px 0 24px}button{background:#1879ed;color:white;border:1px solid #287eea;padding:11px 15px;border-radius:8px;cursor:pointer;font-size:14px;font-weight:650}
button:hover,button:focus-visible{outline:2px solid #91c8ff;outline-offset:2px}button.secondary{background:#1b314a;border-color:#35536b}button.danger{background:#a52a3a;border-color:#d04458}
nav button{background:#182c43;border-color:#283d53}nav button.selected{background:#126de6}
input{width:100%;display:block;margin:6px 0 14px;border-radius:7px;background:#091725;border:1px solid #425f7b;padding:11px;color:#e8effb;font:inherit}
label{color:#c9d7e9;font-size:13px;display:block;font-weight:600}.row{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.columns{display:grid;grid-template-columns:1fr 1fr;gap:18px}.banner{padding:16px;margin:12px 0;border:1px solid #38516e;border-radius:10px;background:#0c1a2d}
.banner h3{margin:0 0 10px}.banner img{width:100%;height:110px;object-fit:cover;border-radius:7px;margin:0 0 10px;background:#203852}.actions{display:flex;gap:8px;flex-wrap:wrap;margin:15px 0}
.tableWrap{overflow:auto}table{border-collapse:collapse;width:100%}td,th{text-align:left;padding:11px;border-bottom:1px solid #29435c;white-space:nowrap}
tr:hover{background:#172e47}tr[role=button]{cursor:pointer}.notice{border:1px solid #2f99ff;padding:15px;border-radius:7px;background:#103659;overflow-wrap:anywhere}
#screenImage{width:min(100%,900px);border:1px solid #36516d;border-radius:8px;margin-top:20px}
#status{position:sticky;bottom:8px;background:#0d283f;padding:12px;border-radius:8px;display:none}
#status.visible{display:block}@media(max-width:860px){.columns{grid-template-columns:1fr}header{align-items:flex-start;gap:14px;flex-direction:column}}

select{width:100%;margin:6px 0 14px;padding:11px;color:#e8effb;background:#091725;border:1px solid #425f7b;border-radius:7px;font:inherit}button:disabled{opacity:.5;cursor:not-allowed}header>div{overflow-wrap:anywhere}tr:focus-visible{outline:2px solid #91c8ff}

[hidden]{display:none!important}
.deviceHeading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:24px 0}
.eyebrow{font-size:11px;letter-spacing:.18em;color:#80baff;font-weight:700;margin:0 0 8px}
.deviceHeading h1{font-size:34px;overflow-wrap:anywhere}.deviceHeading p{margin:8px 0}
.badge{border:1px solid #425973;background:#19314c;padding:8px 14px;border-radius:30px;white-space:nowrap}.badge.online{background:#10372e;border-color:#287b60;color:#a4efce}
.deviceLayout{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(290px,1fr);gap:22px}.deviceLayout>div,.deviceLayout>aside{min-width:0}
.detailGrid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:0}.detailGrid.single{grid-template-columns:1fr}
.detailGrid div{min-width:0}.detailGrid dt{color:#9db3cd;font-size:12px;margin-bottom:6px}.detailGrid dd{margin:0;color:#eef5ff;font-size:15px;overflow-wrap:anywhere;line-height:1.5}
.screenStage{aspect-ratio:16/9;border:1px solid #284565;border-radius:10px;background:#07111d;display:flex;align-items:center;justify-content:center;overflow:hidden}
#screenImage{width:100%;height:100%;object-fit:contain;margin:0;border:0;border-radius:0}
#capturePlaceholder{padding:24px;text-align:center;color:#9db3cd}.capturePanel>.row{margin-bottom:16px}
.verticalActions{display:grid;gap:10px}.dangerPanel{border-color:#663344}dialog{max-width:540px;width:calc(100% - 32px);background:#102237;color:#e8effb;border:1px solid #54708d;border-radius:14px;padding:28px}dialog::backdrop{background:#020812bb}
.deviceNameLink{color:#b8dbff;text-decoration:none;font-weight:650}.deviceNameLink:hover{text-decoration:underline}
#commandHistory td{white-space:normal;vertical-align:top}#commandHistory table{font-size:13px}
@media(max-width:1000px){.deviceLayout{grid-template-columns:1fr}.deviceHeading{align-items:flex-start}.detailGrid{grid-template-columns:1fr 1fr}}
@media(max-width:540px){main{padding:0 14px}.panel{padding:18px}.detailGrid{grid-template-columns:1fr}.deviceHeading h1{font-size:28px}}

.banner img.bannerPreview{height:auto;aspect-ratio:3/1;object-fit:cover}

.customerGroup{margin-top:16px;border:1px solid #345575;border-radius:10px;overflow:hidden}
.customerGroup summary{cursor:pointer;padding:16px;font-weight:700;background:#152e48}
.customerGroup summary .muted{margin-left:12px;font-weight:400}.customerGroup[open] summary{border-bottom:1px solid #345575}
.customerGroup>.tableWrap{padding:0 12px 12px}

/* Light is the default; dark keeps the established palette. */
:root{color-scheme:light}
:root[data-theme=dark]{color-scheme:dark}
.themeLabel{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-bottom:8px}
select{font:inherit;padding:6px 10px;border-radius:6px}
:root:not([data-theme=dark]){color:#172b43;background:#f3f6fb}
:root:not([data-theme=dark]) header{background:#fff;border-color:#d0dcea}
:root:not([data-theme=dark]) header small,
:root:not([data-theme=dark]) .muted{color:#526880}
:root:not([data-theme=dark]) label{color:#284460}
:root:not([data-theme=dark]) .panel{background:#fff;border-color:#ccdae8}
:root:not([data-theme=dark]) input{background:#fff;color:#172b43;border-color:#93abc3}
:root:not([data-theme=dark]) input::placeholder{color:#61758b}
:root:not([data-theme=dark]) nav button:not(.selected),
:root:not([data-theme=dark]) button.secondary{background:#e7eef7;color:#193d65;border-color:#aec2d8}
:root:not([data-theme=dark]) td,
:root:not([data-theme=dark]) th{border-color:#d1deeb}
:root:not([data-theme=dark]) tr:hover{background:#edf4fd}
:root:not([data-theme=dark]) .banner{background:#f5f8fd;border-color:#c7d7e8}
:root:not([data-theme=dark]) .notice,
:root:not([data-theme=dark]) #status{background:#e8f2ff;color:#163f6c}
:root:not([data-theme=dark]) .error{color:#b52137}
:root:not([data-theme=dark]) a{color:#075fc0}
:root:not([data-theme=dark]) .customerGroup summary{background:#edf4fd;color:#193d65}
:root:not([data-theme=dark]) .badge{background:#e8f2ff;color:#193d65}
:root:not([data-theme=dark]) dialog{background:#fff;color:#172b43;border-color:#bacde0}

:root:not([data-theme=dark]) select{background:#fff;color:#172b43;border-color:#93abc3}
:root:not([data-theme=dark]) .detailGrid dt{color:#526880}
:root:not([data-theme=dark]) .detailGrid dd{color:#172b43}
:root:not([data-theme=dark]) .eyebrow{color:#075fc0}
