:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Microsoft YaHei",sans-serif;color:#17212b;background:#f4f6f8;line-height:1.45}*{box-sizing:border-box}body{margin:0;min-width:320px}h1,h2,h3,p{margin:0}button,input,select{font:inherit}.topbar{position:sticky;top:0;z-index:20;background:#132a35;color:#fff;padding:10px clamp(16px,2.5vw,40px);display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:64px}.brand h1{font-size:clamp(20px,2.2vw,30px);font-weight:650;letter-spacing:0}.kicker,.eyebrow{font-size:10px;letter-spacing:1.2px;font-weight:750;color:#67d4c1}.header-actions{display:flex;align-items:center;gap:8px}.status{font-size:12px;padding:6px 10px;border:1px solid #59717c;border-radius:4px}.status.online{color:#a3f1c2;border-color:#4a9b71}.status.offline{color:#ffc0a7}.main-nav{position:sticky;top:64px;z-index:19;display:flex;gap:2px;overflow-x:auto;background:#fff;border-bottom:1px solid #dce3e6;padding:0 clamp(16px,2.5vw,40px)}.nav-item{border:0;border-bottom:2px solid transparent;background:transparent;color:#53636c;cursor:pointer;padding:10px 14px;font-size:13px;white-space:nowrap}.nav-item:hover,.nav-item.active{color:#117b68;border-bottom-color:#1b8c78}.shell{width:100%;padding:18px clamp(14px,2.5vw,40px) 30px}.page{display:none}.active-page{display:block}.overview{display:flex;justify-content:space-between;gap:24px;align-items:end;border-bottom:1px solid #d6dde1;padding-bottom:18px}.overview h2,.page-heading h2{font-size:24px;margin:4px 0}.overview p,.muted{font-size:13px;color:#60707b}.ports{display:flex;gap:7px;flex-wrap:wrap}.ports span{font-size:11px;color:#61717c;border:1px solid #cbd5da;border-radius:4px;padding:7px 9px;background:#fff}.ports b{color:#132a35;margin-left:4px}.summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:16px}.summary-card,.overview-actions,.devices-card,.config-panel,.pane,.event-log{background:#fff;border:1px solid #dce3e6;border-radius:5px}.summary-card{padding:18px}.summary-card strong{display:block;font-size:28px;color:#117b68;margin:5px 0}.summary-card p{font-size:12px;color:#71818a}.overview-actions{margin-top:14px;padding:18px}.overview-actions h3{font-size:16px;margin-bottom:6px}.overview-actions p{display:inline-block;margin-right:12px;color:#60707b;font-size:13px}.button,.small-button,.actions button,.remove-button{border:1px solid #ccd6db;background:#fff;color:#344650;border-radius:4px;padding:7px 10px;cursor:pointer;font-size:12px}.button.primary{background:#1b8c78;border-color:#1b8c78;color:#fff}.button:disabled,.small-button:disabled,.actions button:disabled{opacity:.5;cursor:not-allowed}.page-heading{display:flex;align-items:end;justify-content:space-between;gap:16px;border-bottom:1px solid #d6dde1;padding-bottom:14px}.device-picker{display:flex;align-items:center;gap:8px;font-size:12px;color:#53636c}.device-picker select{min-width:210px;padding:7px;border:1px solid #cad5da;border-radius:4px;background:#fff}.log-device-meta{margin:10px 0}.logs-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;margin-top:10px}.pane{min-width:0;display:flex;flex-direction:column}.pane-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 11px;border-bottom:1px solid #e5eaec}.pane-head h3{font-size:14px}.actions{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.follow{font-size:11px;color:#60707b;display:flex;align-items:center;gap:3px}.log{height:clamp(430px,calc(100vh - 300px),820px);min-height:430px;overflow:auto;margin:0;padding:11px;background:#17242b;color:#c8f3e9;font:12px/1.35 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre-wrap;word-break:break-word}.command{display:flex;gap:7px;padding:9px;border-top:1px solid #e5eaec}.command input{flex:1;min-width:0;padding:8px;border:1px solid #cad5da;border-radius:4px}.config-panel{margin-top:12px;padding:12px}.config-panel>.pane-head{padding:0 0 10px;border-bottom:1px solid #e5eaec}.inline-status{font-size:12px;color:#60707b}.inline-status.ok{color:#168062}.inline-status.error{color:#a94836}.config-sources{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0}.source-option{display:flex;align-items:start;gap:8px;padding:10px;border:1px solid #e2e8eb;border-radius:4px;font-size:12px;color:#53636c}.source-option>span{display:grid;gap:7px;min-width:0;width:100%}.source-option select,.source-option input[type=file]{max-width:100%;padding:7px;border:1px solid #cad5da;border-radius:4px;background:#fff}.config-preview{min-height:100px;max-height:none;overflow:visible;padding:10px;background:#f6f9f9;border:1px solid #e2e8eb;color:#53636c;font:12px/1.45 ui-monospace,Consolas,monospace;white-space:pre-wrap}.devices-layout{display:grid;grid-template-columns:minmax(280px,360px) minmax(0,1fr);gap:12px;margin-top:14px}.devices-card{padding:16px}.devices-card h3{font-size:15px;margin-bottom:10px}.device-register{padding:12px;background:#f6f9f9;border:1px solid #e2e8eb;border-radius:4px}.device-register label{display:block;font-size:12px;color:#53636c;margin-bottom:6px}.device-register>div{display:flex;gap:6px}.device-register input{width:100%;min-width:0;padding:8px;border:1px solid #cad5da;border-radius:4px;text-transform:uppercase}.register-hint{margin-top:8px;font-size:11px;color:#71818a}.register-error{min-height:16px;margin:6px 0 0;color:#a94836;font-size:11px}.device-list{display:grid;gap:7px}.empty{font-size:13px;color:#849198;padding:22px 4px}.device-item{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left;border:1px solid #e2e8eb;background:#fff;padding:10px;border-radius:4px;cursor:pointer}.device-item.active{border-color:#2ca88e;background:#f0faf7}.device-item strong{display:block;font-size:14px}.device-item small{display:block;color:#71818a;font-size:11px;margin-top:3px}.device-last{font-size:10px;color:#849198}.remove-button{color:#9b4131;border-color:#e7c4bc;padding:4px 6px;white-space:nowrap}.dot{display:inline-block;width:7px;height:7px;background:#22a679;border-radius:50%;margin-right:6px}.offline-dot{background:#9aa7ad}.device-meta{border-top:1px solid #e5eaec;margin-top:14px;padding-top:12px;color:#60707b;font-size:12px;line-height:1.8}.guide-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}.guide-grid article{background:#fff;border:1px solid #dce3e6;border-radius:5px;padding:18px}.guide-grid b{font-size:14px;color:#1b8c78}.guide-grid p{font-size:13px;color:#60707b;margin-top:8px;line-height:1.7}code{font-family:ui-monospace,Consolas,monospace;color:#253942}.event-log{height:calc(100vh - 220px);min-height:450px;overflow:auto;margin-top:14px;padding:14px;background:#17242b;color:#c8f3e9;font:12px/1.5 ui-monospace,Consolas,monospace;white-space:pre-wrap}.login-dialog{width:min(420px,calc(100vw - 32px));border:1px solid #dce3e6;border-radius:8px;padding:24px;background:#fff;color:#17212b}.login-dialog::backdrop{background:rgba(12,20,25,.72)}.login-dialog form{display:grid;gap:16px}.login-dialog label{display:grid;gap:7px;font-size:13px}.login-dialog input{padding:11px 12px;border:1px solid #cad5da;border-radius:4px}.password-input{display:flex}.password-input input{width:100%;border-radius:4px 0 0 4px}.password-input button{border:1px solid #cad5da;border-left:0;background:#f6f9f9;color:#344650;border-radius:0 4px 4px 0;padding:0 11px;cursor:pointer;font-size:12px}.login-error{min-height:18px;color:#a94836;font-size:13px}
@media(max-width:900px){.overview{align-items:start;flex-direction:column}.summary-grid,.logs-layout,.devices-layout,.guide-grid,.config-sources{grid-template-columns:1fr}.log{height:360px;min-height:360px}.event-log{min-height:360px;height:calc(100vh - 260px)}}
@media(max-width:540px){.topbar{align-items:start;flex-direction:column}.header-actions{width:100%;justify-content:space-between}.page-heading{align-items:start;flex-direction:column}.device-picker{width:100%;align-items:start;flex-direction:column}.device-picker select{width:100%}.overview-actions p{display:block;margin-bottom:10px}.shell{padding-left:10px;padding-right:10px}.log{font-size:11px}}

/* Three-column log workspace: configuration remains visible beside live streams. */
.logs-layout{grid-template-columns:minmax(250px,.78fr) minmax(0,1.1fr) minmax(0,1.1fr);align-items:stretch}
.config-panel{margin-top:0;min-width:0}
.config-send-button{width:100%;margin:0 0 10px}
.config-device-picker{margin:12px 0;align-items:stretch;flex-direction:column}
.config-device-picker select{width:100%;min-width:0}
.config-sources{grid-template-columns:1fr}
.capture-parser{border-top:1px solid #e5eaec;padding:10px 11px;display:grid;gap:8px;font-size:12px;color:#53636c}
.capture-parser input[type=file]{max-width:100%;padding:6px;border:1px solid #cad5da;border-radius:4px;background:#fff}
.capture-parser .actions{justify-content:flex-start}
.device-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap}.reset-button{border:1px solid #a7cfc6;color:#117b68;background:#f0faf7;border-radius:4px;padding:4px 6px;font-size:12px;white-space:nowrap}.reset-button.system-reset{background:#1b8c78;border-color:#1b8c78;color:#fff}.reset-button.disabled{opacity:.45;cursor:not-allowed}
@media(max-width:1100px){.logs-layout{grid-template-columns:minmax(230px,.8fr) minmax(0,1fr) minmax(0,1fr)}}
@media(max-width:900px){.logs-layout{grid-template-columns:1fr}}
.action-toast{position:fixed;right:18px;bottom:18px;z-index:40;max-width:min(420px,calc(100vw - 36px));padding:11px 14px;border:1px solid #b8c9cf;border-radius:5px;background:#fff;color:#344650;box-shadow:0 8px 24px #132a3526;font-size:13px}.action-toast.ok{border-color:#8bc9b8;color:#126b58;background:#f0faf7}.action-toast.error{border-color:#e1aaa0;color:#9b3e2f;background:#fff5f2}.action-toast.busy{border-color:#a9c8d2;color:#315d6d;background:#f1f8fb}button.busy{cursor:wait;opacity:.7}.device-item .remove-button,.device-item .reset-button{cursor:pointer}

/* The registry stays compact in the main list; long hardware fields move into the expandable record. */
.devices-stack{grid-template-columns:1fr}.device-register-card{max-width:620px}.registry-heading{display:flex;justify-content:space-between;gap:12px;margin-bottom:10px}.device-list{gap:0;border:1px solid #e2e8eb;border-radius:4px;overflow:hidden}.device-table-head,.device-row{display:grid;grid-template-columns:minmax(145px,1.25fr) 84px 84px 84px minmax(160px,1.4fr) minmax(145px,1.05fr) 118px;gap:8px;align-items:center}.device-table-head{padding:9px 12px;background:#eef3f4;color:#52646d;font-size:11px;font-weight:700}.device-record{border-top:1px solid #e8edef}.device-record:first-of-type{border-top:0}.device-record.active{background:#f5fcf9}.device-row{padding:9px 12px;font-size:12px}.device-select{min-width:0;border:0;background:transparent;text-align:left;padding:0;cursor:pointer;color:#17212b}.device-select strong{display:block;font-size:13px}.device-select small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#71818a;font-size:10px;margin-top:3px}.firmware-summary{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#53636c}.module-state{display:inline-flex;align-items:center;gap:5px;font-size:12px;color:#66767e}.module-state i{width:7px;height:7px;border-radius:50%;background:#9aa7ad}.module-state.online{color:#13765f}.module-state.online i{background:#1caa7c}.module-state.offline{color:#8a5147}.module-state.offline i{background:#be6958}.module-state.unknown{color:#71818a}.device-actions{display:flex;align-items:center;gap:5px}.device-actions .remove-button,.device-actions .reset-button{cursor:pointer}.remove-button,.reset-button{padding:4px 6px;white-space:nowrap}.device-details{padding:0 12px 10px;margin:0;color:#53636c}.device-details summary{cursor:pointer;color:#117b68;font-size:12px;padding:5px 0}.device-details dl{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px 14px;margin:6px 0 0;padding:10px;background:#f6f9f9;border:1px solid #e2e8eb;border-radius:4px}.device-details dt{font-size:10px;color:#71818a}.device-details dd{margin:2px 0 0;font:11px/1.35 ui-monospace,Consolas,monospace;word-break:break-word;color:#344650}@media(max-width:1050px){.device-table-head,.device-row{grid-template-columns:minmax(130px,1.2fr) 72px 72px 72px minmax(110px,1fr) 105px 108px}.device-details dl{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:760px){.device-table-head{display:none}.device-list{border:0;overflow:visible;background:transparent;gap:8px}.device-record{border:1px solid #e2e8eb;border-radius:4px;background:#fff}.device-row{grid-template-columns:1fr 1fr 1fr;gap:8px;padding:10px}.device-select{grid-column:span 3}.firmware-summary{grid-column:span 2}.device-row time{font-size:10px}.device-actions{justify-content:flex-end}.device-details dl{grid-template-columns:repeat(2,minmax(0,1fr))}}
