:root { color-scheme: dark; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #0b1117; color: #e7eef5; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 12% 0%, #1a3441 0, transparent 32rem), #0b1117; }
.shell { width: min(1320px, calc(100% - 48px)); margin: 0 auto; padding: 34px 0 22px; }
.topbar, .section-heading, .viewer-actions, footer, .connection, .inline-form { display: flex; align-items: center; }
.topbar, .section-heading, footer { justify-content: space-between; }
.topbar { margin-bottom: 30px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -0.04em; }
h2 { font-size: 18px; }
.eyebrow { color: #6de0bd; font-size: 11px; font-weight: 700; letter-spacing: .18em; margin-bottom: 7px; }
.connection { gap: 8px; color: #a7b9c6; font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #ef6b73; box-shadow: 0 0 0 4px #ef6b731a; }
.dot.online { background: #6de0bd; box-shadow: 0 0 0 4px #6de0bd1a; }
.card { background: #121b23e8; border: 1px solid #263541; border-radius: 18px; box-shadow: 0 18px 60px #00000022; }
.login-card { max-width: 560px; padding: 28px; margin: 80px auto; }
.muted, .empty, .event-text { color: #8297a7; font-size: 13px; }
.login-card .muted { margin-top: 9px; margin-bottom: 22px; }
.inline-form { gap: 10px; }
input { flex: 1; min-width: 0; border: 1px solid #334653; background: #0c141b; border-radius: 10px; color: #f1f8fb; padding: 12px 14px; outline: none; }
input:focus { border-color: #6de0bd; box-shadow: 0 0 0 3px #6de0bd1c; }
button { border: 0; border-radius: 10px; background: #6de0bd; color: #10241f; cursor: pointer; font-weight: 700; padding: 11px 15px; transition: transform .15s, opacity .15s; }
button:hover:not(:disabled) { transform: translateY(-1px); }
button:disabled { cursor: not-allowed; opacity: .38; }
button.secondary { background: #23333f; color: #d3e1e8; }
.error { color: #ef8891; min-height: 18px; margin-top: 13px; font-size: 13px; }
.hidden { display: none !important; }
.app-grid { display: grid; grid-template-columns: 350px 1fr; gap: 18px; }
.devices-panel, .viewer-panel { padding: 22px; min-height: 570px; }
.count { display: grid; place-items: center; min-width: 30px; height: 28px; border-radius: 9px; background: #20343d; color: #6de0bd; font-weight: 700; }
.device-list { display: grid; gap: 10px; margin-top: 22px; }
.device { padding: 14px; border: 1px solid #293b47; background: #0e171e; border-radius: 13px; }
.device.selected { border-color: #6de0bd; background: #10241f; }
.device-row { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.device-name { font-size: 14px; font-weight: 700; }
.device-id { color: #718796; font-size: 11px; margin-top: 4px; }
.device-meta { display: flex; align-items: center; gap: 6px; color: #91a7b5; font-size: 11px; margin: 12px 0; }
.device-actions { display: flex; gap: 7px; }
.device-actions button { padding: 8px 10px; font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #ef6b73; }
.status-dot.online { background: #6de0bd; }
.viewer-panel { display: flex; flex-direction: column; }
.pill { border: 1px solid #344854; border-radius: 999px; padding: 6px 10px; color: #9eb2bf; font-size: 11px; }
.pill.active { color: #6de0bd; border-color: #397766; }
.viewer-stage { flex: 1; display: grid; place-items: center; min-height: 420px; margin: 22px 0; background: #091016; border: 1px dashed #2a3d49; border-radius: 14px; overflow: hidden; }
.viewer-stage:fullscreen { width: 100vw; height: 100vh; min-height: 100vh; margin: 0; border: 0; border-radius: 0; background: #05090d; }
.viewer-placeholder { text-align: center; color: #718796; padding: 30px; }
.viewer-placeholder p { color: #b1c1ca; margin: 15px 0 7px; }
.viewer-placeholder small { font-size: 11px; }
.monitor-icon { display: inline-grid; place-items: center; width: 54px; height: 42px; border: 2px solid #426172; color: #6de0bd; border-radius: 8px; font-size: 24px; }
.live-image { display: block; width: 100%; height: 100%; max-height: 540px; object-fit: contain; }
.viewer-stage:fullscreen .live-image { max-width: 100vw; max-height: 100vh; }
.viewer-actions { justify-content: flex-end; gap: 9px; }
.event-text { min-height: 18px; margin-top: 13px; }
footer { color: #5f7380; font-size: 11px; margin-top: 18px; }
@media (max-width: 850px) { .shell { width: min(100% - 24px, 680px); padding-top: 22px; } .app-grid { grid-template-columns: 1fr; } .devices-panel, .viewer-panel { min-height: auto; } .viewer-stage { min-height: 320px; } }
