@font-face{font-family:Inter;src:url('/static/vendor/fonts/inter.ttf') format('truetype');font-weight:100 900;font-style:normal;font-display:swap}
@font-face{font-family:Montserrat;src:url('/static/vendor/fonts/montserrat.ttf') format('truetype');font-weight:100 900;font-style:normal;font-display:swap}
:root{--ink:#0f2940;--muted:#4a647d;--border:#dfe6ed;--green:#1e3a56;--green-soft:#eaf0f6;--sidebar:#fff;--brand:#0f2940;--accent:#1e3a56;--success:#22936a;--attention:#e5a237;--danger:#cc5057;background:#f5f7fa;color:var(--ink);font-family:Inter,'Segoe UI',Arial,sans-serif;font-optical-sizing:auto}
body{background:#f5f7fa;color:#0f2940}h1,h2,h3,.metric-copy>strong{font-family:Montserrat,Inter,sans-serif}button,input,select,textarea{font-family:inherit}h1{letter-spacing:-.6px}.subtitle,.field-help,.form-hint{color:#4a647d}
.sidebar{background:#fff;border-right:1px solid #dfe6ed;padding-top:25px}.brand{display:block;margin:0 9px 29px;padding:4px}.brand img{display:block;width:100%;height:auto;max-height:64px;object-fit:contain}.workspace-label{background:#f5f7fa;border-color:#dfe6ed;color:#1e3a56}.workspace-dot{background:#1e3a56}
/* Match the navigation ID specificity so legacy dark-sidebar rules cannot win. */
#navigation a{color:#1e3a56;font-size:14px;font-weight:550;line-height:1.45;min-height:46px;border-radius:9px;padding:12px 14px;overflow-wrap:anywhere}
#navigation a:hover,#navigation a:focus-visible{background:#edf2f7;color:#0f2940}
#navigation a.active{background:#e2ebf3;color:#0f2940;font-weight:650;box-shadow:none}
#navigation a.active:hover,#navigation a.active:focus-visible{background:#d8e4ee;color:#0f2940}
#navigation a svg,#navigation a.active svg{width:18px;height:18px;color:currentColor}
#navigation .nav-count,#navigation a.active .nav-count{background:#dce6ef;border-color:#cddae5;color:#1e3a56;font-size:11px;font-weight:600}
#navigation .nav-group{color:#4a647d;font-size:10px;font-weight:650;letter-spacing:1.1px}
#navigation .nav-advanced>summary{color:#1e3a56;font-size:13px;font-weight:600;line-height:1.5;border-radius:8px}
#navigation .nav-advanced>summary:hover,#navigation .nav-advanced>summary:focus-visible{background:#edf2f7;color:#0f2940}
#navigation a:focus-visible,#navigation .nav-advanced>summary:focus-visible{outline:2px solid #4a647d;outline-offset:2px}
.sidebar-bottom{border-color:#dfe6ed}.profile{color:#0f2940}.profile small{color:#4a647d}.avatar{background:#eaf0f6;border-color:#d7e2ec;color:#1e3a56}.sidebar .profile-menu{color:#4a647d}.sidebar .nav-advanced>summary{color:#4a647d}
.topbar{height:64px}.topbar-right{margin-left:auto}.topbar-date{color:#4a647d}.connection{color:#4a647d}.connection.connected{color:#1e3a56}.connection.connected .connection-dot{background:#22936a}.main-content{padding-top:27px}.page-heading h1{font-weight:650}.page-heading{margin-bottom:25px}.button-primary,.button.button-primary{background:#1e3a56;border-color:#1e3a56;color:#fff;box-shadow:0 3px 8px #0f294011}.button-primary:hover,.button.button-primary:hover{background:#0f2940;border-color:#0f2940}.button{font-size:12px}.text-link,.card-link{color:#1e3a56}.tabs a.active{color:#0f2940;border-color:#1e3a56}.segmented [aria-pressed=true]{background:#1e3a56;color:white}.auth-brand{padding:35px 35px 20px;background:white}.auth-brand img{width:220px;height:auto;max-height:70px}.auth-dialog{border:1px solid #dce5ed}.auth-required{background:#f5f7fa}
.metric-card,.metric-card.green,.metric-card.violet,.metric-card.orange,.metric-card.blue{background:white;border-color:#dfe6ed}.metric-icon,.metric-icon.green,.metric-icon.violet,.metric-icon.orange,.metric-icon.blue{background:#edf2f7;color:#1e3a56}.metric-copy>span{color:#4a647d;font-size:12px}.metric-copy>strong{color:#0f2940;font-size:29px}.project-color-bar{background:#1e3a56}.project-icon{background:#edf2f7;color:#1e3a56}.project-card h3{font-size:16px}.project-location,.project-counters,.device-card-copy>span{color:#4a647d}.card h2,.card h3{color:#0f2940}.device-card-copy h2{font-size:15px}.data-table{font-size:12px}.data-table th{color:#4a647d}.detail-list dt{color:#4a647d}
.device-status-dot{display:inline-block;flex:none;width:10px;height:10px;border-radius:50%;border:2px solid white;box-shadow:0 0 0 1px #e2e8ee}.device-status-dot.green{background:#22936a}.device-status-dot.orange{background:#e5a237}.device-status-dot.red{background:#cc5057}.device-brand-mark{width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:white;font-weight:800;font-size:15px;color:#1e3a56}.device-brand-mark.hikvision{color:#cf3344}.device-brand-mark svg{width:19px;height:19px}.terminal-counters{padding:20px 24px;display:grid;grid-template-columns:1fr 1fr;gap:17px;background:linear-gradient(130deg,#f0f4f8,#fafbfd);min-height:166px;font-variant-numeric:tabular-nums}.terminal-counters>div{display:flex;flex-direction:column;gap:7px}.terminal-counters span{font-size:11px;color:#4a647d}.terminal-counters strong{font-size:17px;font-weight:550;color:#0f2940}.terminal-counters .terminal-total{grid-column:1/-1;flex-direction:row;align-items:center;justify-content:space-between}.terminal-total>span{font-size:12px}.terminal-total>strong{font-size:36px;font-family:Montserrat,Inter,sans-serif}.device-compact .device-brand-mark{margin-right:4px}.device-preview .preview-caption:empty{display:none}.device-preview{background:#e9eff5}
.flow-picker-item.selected{background:#eaf0f6;color:#1e3a56}.flow-node-conditions .flow-node-symbol,.flow-node-action .flow-node-symbol,.flow-node-symbol{background:#edf2f7;color:#4a647d}.edge-flow-drawflow .drawflow .connection .main-path{stroke:#4a647d}.flow-node-config:hover{color:#0f2940;background:#edf2f7}.flow-picker-item.selected{background:#eaf0f6}.flow-name input{color:#0f2940}.device-card-brand{min-height:49px}.device-card-footer{gap:8px}
[data-action="registry-confirm"]{background:#cc5057;color:white;border-color:#cc5057}[data-action="registry-remove"]{color:#9c4650;border-color:#eadadd;background:white}#registry-remove-note{color:#4a647d;line-height:1.7;font-size:13px;margin:18px 0}
@media(max-width:760px){.brand img{max-height:58px}.topbar{height:60px}.terminal-counters{padding:18px}.metric-copy>strong{font-size:24px}}

.site-view-switch [aria-pressed=true]{color:#0f2940}.site-placement-device[aria-pressed=true]{background:#eaf0f6;box-shadow:inset 0 0 0 1px #b9c6d2}.site-placement-device strong{font-size:12px}.site-placement-device small,.site-map-legend{font-size:10px;color:#4a647d}.site-popover-heading strong,.site-widget-header strong{color:#0f2940}.site-device-marker.status-green{outline-color:#22936a}.site-device-marker.status-orange{outline-color:#e5a237}.site-device-marker.status-red{outline-color:#cc5057}.site-map-legend .green{background:#22936a}.site-map-legend .orange{background:#e5a237}.site-map-legend .red{background:#cc5057}

/* Keep the current organization beside the logo on every page. */
.tenant-card h3{overflow-wrap:anywhere}
.tenant-card-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:22px}
.tenant-card-actions .button{max-width:100%;white-space:normal}
/* Give operational content priority over title and navigation spacing. */
main{padding-top:18px;padding-bottom:20px;min-height:0}
.page-heading{margin-bottom:12px;gap:10px 16px;min-height:36px;flex-wrap:wrap}
.heading-title{display:flex;align-items:center;gap:10px;min-width:0;flex:1 1 220px}
.page-heading h1,.detail-heading h1{font-size:24px;line-height:1.3;letter-spacing:-.4px;min-width:0;overflow-wrap:anywhere}
.heading-title .back-link{display:inline-flex;align-items:center;justify-content:center;flex:none;width:34px;height:34px;min-height:34px;margin:0;border:1px solid #dfe6ed;border-radius:8px;color:#4a647d;background:#fff}
.heading-title .back-link:hover,.heading-title .back-link:focus-visible{background:#edf2f7;color:#0f2940;border-color:#b9c6d2}
.heading-title .back-link svg{width:16px;height:16px}
.heading-actions{gap:8px;flex-shrink:0;max-width:100%}
.heading-actions:empty{display:none}
.heading-actions .button{min-height:34px;padding:7px 11px;line-height:1.4}
.tabs{gap:22px;margin-bottom:12px;overflow-x:auto;scrollbar-width:thin}
.tab{flex:none;padding:9px 1px 10px;line-height:1.5;white-space:nowrap}
.page-toolbar{margin-bottom:12px;gap:10px}
.section-header{margin-bottom:10px}
.page-toolbar .filter-select{min-height:36px;padding-top:7px;padding-bottom:7px}
@media(max-width:700px){main{padding-top:14px;padding-bottom:16px}.page-heading{gap:8px;margin-bottom:10px}.page-heading h1,.detail-heading h1{font-size:21px}.heading-title{gap:8px;flex-basis:180px}.heading-actions{gap:6px}.tabs{gap:18px;margin-bottom:10px}.tab{padding-top:8px;padding-bottom:9px}}
:root{--topbar-height:72px}
.workspace{padding-top:var(--topbar-height)}
.topbar{position:fixed;inset:0 0 auto;height:var(--topbar-height);padding:0 26px;z-index:60;gap:24px}
.topbar-left{flex:1;min-width:0;gap:25px}
.topbar .brand{flex:none;width:180px;margin:0;padding:0}
.topbar .brand img{width:100%;max-height:52px}
.topbar .workspace-label{min-width:0;max-width:480px;margin:0;padding:0 0 0 25px;border:0;border-left:1px solid #dfe6ed;border-radius:0;background:transparent;min-height:32px;gap:9px;font-size:14px;font-weight:600;line-height:1.4}
#tenant-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.topbar .demo-label{flex:none;margin-left:0;color:#715624;background:#faf2df;border-color:#eadbb4;font-weight:600}
.topbar-right{flex:none;gap:18px;margin-left:0}
.topbar .icon-button{flex:none;color:#4a647d}
.topbar .icon-button:hover,.topbar .icon-button:focus-visible{background:#edf2f7;color:#0f2940}
.sidebar{top:var(--topbar-height);height:calc(100vh - var(--topbar-height));height:calc(100dvh - var(--topbar-height));padding-top:22px;overflow-y:auto;overscroll-behavior:contain}
.sidebar #navigation,.sidebar-bottom{flex-shrink:0}
.notification-panel{top:calc(var(--topbar-height) + 8px);z-index:70}
@media(max-width:960px){.topbar-separator{display:none}}
@media(max-width:700px){.topbar{padding:0 14px;gap:12px}.topbar-left{gap:12px}.topbar .brand{width:125px}.topbar .workspace-label{padding-left:12px;font-size:12px;gap:6px}.topbar-right{gap:10px}.topbar .demo-label{font-size:8px;padding:1px 3px}.notification-panel{right:15px}}
@media(max-width:520px){.topbar{padding:0 10px;gap:8px}.topbar-left{gap:8px}.topbar .brand{width:92px}.topbar .workspace-label{padding-left:8px;font-size:11px;gap:4px}.topbar .demo-label{font-size:7px;padding:1px 2px}.topbar-right{gap:7px}#connection-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.topbar .connection-dot{width:6px;height:6px}.topbar .notification-toggle{width:27px}.topbar #menu-toggle{width:28px}}

/* Detail player: reserve room for its controls while preserving the video frame. */
#camera-player{min-width:0}
#camera-player>.card-header{padding:13px 17px;min-height:48px}
#camera-player>.camera-stage{width:100%;height:auto;min-height:220px;aspect-ratio:16/9;max-height:clamp(220px,calc(100vh - 320px),480px);max-height:clamp(220px,calc(100dvh - 320px),480px)}
#camera-player .camera-stage video,#camera-player .camera-stage .device-preview img{object-fit:contain}
#camera-player .camera-stage-empty{padding:16px;gap:10px}
#camera-player>.camera-controls{gap:7px;padding:11px 15px;min-height:58px;align-items:center}
#camera-player>.camera-controls .button{min-height:34px;padding:7px 10px;font-size:11px}
#camera-player>.camera-feedback{padding:10px 16px;margin:0;font-size:11px;line-height:1.5}
#camera-player>.camera-feedback:empty{display:none}
#camera-player:has(>.camera-operation-panel){display:grid;grid-template-columns:minmax(0,1fr) 214px;grid-template-rows:auto auto auto auto;align-items:start}
#camera-player:has(>.camera-operation-panel)>.card-header{grid-column:1/-1;grid-row:1}
#camera-player:has(>.camera-operation-panel)>.camera-stage{grid-column:1;grid-row:2}
#camera-player:has(>.camera-operation-panel)>.camera-controls{grid-column:1;grid-row:3}
#camera-player:has(>.camera-operation-panel)>.camera-feedback{grid-column:1/-1;grid-row:4}
#camera-player>.camera-operation-panel{grid-column:2;grid-row:2/span 2;align-self:stretch;min-width:0;padding:16px;border-left:1px solid #dfe6ed;background:#f8fafc}
.camera-operation-panel .camera-ptz h3{font-family:Inter,'Segoe UI',Arial,sans-serif;font-size:12px;font-weight:600;color:#1e3a56;margin:0 0 12px}
.camera-ptz-pad{display:grid;grid-template-columns:repeat(3,34px);grid-template-rows:repeat(3,34px);justify-content:center;gap:4px}
.camera-ptz-button{display:grid;place-items:center;width:34px;height:34px;min-height:34px;padding:0;border:1px solid #d6e0e9;border-radius:7px;background:#fff;color:#1e3a56;touch-action:manipulation}
.camera-ptz-button svg{width:16px;height:16px}
.camera-ptz-button:hover:not(:disabled){border-color:#9bb0c1;background:#eaf0f6;color:#0f2940}
.camera-ptz-button:focus-visible{outline:2px solid #4a647d;outline-offset:2px}
.camera-ptz-button:disabled{opacity:.4;cursor:default}
.camera-ptz-button[data-direction=up]{grid-column:2;grid-row:1}
.camera-ptz-button[data-direction=left]{grid-column:1;grid-row:2}
.camera-ptz-button[data-direction=right]{grid-column:3;grid-row:2}
.camera-ptz-button[data-direction=down]{grid-column:2;grid-row:3}
.camera-ptz-pad>:not([data-direction]){grid-column:2;grid-row:2;display:grid;place-items:center;color:#71889b}
.camera-ptz-pad>:not([data-direction]) svg{width:17px;height:17px}
.camera-ptz-hint{font-size:10px;line-height:1.55;color:#4a647d;margin:10px 0 0;overflow-wrap:anywhere}
.camera-ptz-hint.error{color:#a82f3b}
.camera-telemetry{margin:15px 0 0;padding:12px 0 0;border-top:1px solid #dfe6ed;display:grid;gap:11px;min-width:0}
.camera-telemetry>div{display:flex;justify-content:space-between;align-items:flex-start;gap:8px;min-width:0}
.camera-telemetry dt{font-size:10px;font-weight:400;color:#4a647d}
.camera-telemetry dd{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:5px 7px;min-width:0;max-width:65%;margin:0;color:#1e3a56;font-size:11px;font-weight:600;line-height:1.5;text-align:right;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.camera-battery-meter{display:inline-block;width:60px;height:7px;border-radius:4px;background:#dce5ec;overflow:hidden;vertical-align:middle}
.camera-battery-meter>span{display:block;height:100%;max-width:100%;background:#4a647d;border-radius:inherit}
.camera-battery-meter.low>span{background:#cc5057}
.camera-info-actions{grid-column:1/-1;margin-top:12px}
.camera-info-actions .button{min-height:30px;padding:5px 8px;font-size:10px}
@media(max-width:980px){
  #camera-player:has(>.camera-operation-panel){grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto auto auto}
  #camera-player>.camera-operation-panel{grid-column:1;grid-row:4;display:grid;grid-template-columns:minmax(130px,1fr) minmax(140px,1fr);gap:18px;border-left:0;border-top:1px solid #dfe6ed;padding:14px 16px}
  #camera-player:has(>.camera-operation-panel)>.camera-feedback{grid-row:5}
  .camera-operation-panel .camera-telemetry{align-content:start;margin:0;padding:0;border-top:0}
}
@media(max-width:520px){
  #camera-player>.camera-stage{min-height:200px;max-height:clamp(200px,calc(100vh - 340px),360px);max-height:clamp(200px,calc(100dvh - 340px),360px)}
  #camera-player>.camera-operation-panel{grid-template-columns:minmax(0,1fr);gap:13px}
  #camera-player .camera-stage-empty{padding:12px;gap:8px}
  #camera-player .camera-stage-empty strong{font-size:14px}
  .camera-operation-panel .camera-telemetry{padding-top:12px;border-top:1px solid #dfe6ed}
  .camera-ptz-pad{grid-template-columns:repeat(3,38px);grid-template-rows:repeat(3,38px)}
  .camera-ptz-button{width:38px;height:38px}
}

/* A compact desktop rail expands over the page until it is pinned. */
.sidebar-tools{display:none}
#navigation a.active{box-shadow:none}
#navigation .nav-advanced>summary{display:flex;align-items:center;gap:12px;list-style:none}
#navigation .nav-advanced>summary::-webkit-details-marker{display:none}
#navigation .nav-advanced>summary>.nav-label{flex:1;min-width:0}
#navigation .nav-advanced>summary::after{content:"";width:6px;height:6px;margin-left:auto;margin-right:3px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);flex:none}
#navigation .nav-advanced[open]>summary::after{transform:rotate(225deg)}
@media(min-width:701px){
  body{--sidebar-width:72px}
  body.sidebar-pinned{--sidebar-width:232px}
  .workspace{margin-left:var(--sidebar-width);transition:margin-left 160ms ease}
  .skip-link{left:calc(var(--sidebar-width) + 16px)}
  #sidebar{width:72px;padding:14px 10px 0;overflow-x:hidden;scrollbar-width:thin;transition:width 160ms ease,box-shadow 160ms ease}
  body.sidebar-pinned #sidebar,#sidebar.peek-open{width:232px}
  #sidebar.peek-open{box-shadow:8px 0 24px #0f294016}
  body.sidebar-pinned #sidebar{box-shadow:none}
  #sidebar .sidebar-tools{display:block;flex:none;margin:0 0 8px}
  #sidebar .sidebar-pin{display:flex;align-items:center;justify-content:center;width:50px;max-width:100%;min-height:40px;padding:0;border:0;border-radius:8px;background:transparent;color:#4a647d}
  #sidebar .sidebar-pin>[data-icon]{display:flex}
  #sidebar .sidebar-pin:hover,#sidebar .sidebar-pin:focus-visible{background:#edf2f7;color:#0f2940}
  #sidebar .sidebar-pin[aria-pressed=true]{background:#eaf0f6;color:#1e3a56}
  #sidebar .sidebar-pin:focus-visible{outline:2px solid #4a647d;outline-offset:1px}
  #sidebar .sidebar-pin svg{width:18px;height:18px;flex:none;color:currentColor}
  #sidebar .nav-label{display:block;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:opacity 120ms ease}
  #sidebar #navigation a,#sidebar #navigation .nav-advanced>summary{padding:12px 16px;gap:12px;min-height:46px;white-space:nowrap}
  #sidebar #navigation a>svg,#sidebar #navigation .nav-advanced>summary>svg{flex:none;width:18px;height:18px}
  #sidebar #navigation a>.nav-label{flex:1}
  #sidebar #navigation .nav-group{position:relative;height:15px;line-height:15px;margin:20px 8px 8px;white-space:nowrap;overflow:hidden}
  #sidebar #navigation .nav-group:first-child{margin-top:4px}
  #sidebar .sidebar-bottom{padding-top:12px}
  #sidebar .profile{margin:0;padding:17px 7px;gap:12px;min-height:70px}
  #sidebar .profile>.nav-label{flex:1}
  #sidebar .profile>.avatar{flex:none}
  body:not(.sidebar-pinned) #sidebar:not(.peek-open) .nav-label{max-width:0;opacity:0;pointer-events:none}
  body:not(.sidebar-pinned) #sidebar:not(.peek-open) #navigation a,body:not(.sidebar-pinned) #sidebar:not(.peek-open) #navigation .nav-advanced>summary,body:not(.sidebar-pinned) #sidebar:not(.peek-open) .sidebar-pin,body:not(.sidebar-pinned) #sidebar:not(.peek-open) .profile{gap:0}
  body:not(.sidebar-pinned) #sidebar:not(.peek-open) .nav-count,body:not(.sidebar-pinned) #sidebar:not(.peek-open) .nav-live-dot,body:not(.sidebar-pinned) #sidebar:not(.peek-open) .profile-menu{display:none}
  body:not(.sidebar-pinned) #sidebar:not(.peek-open) #navigation .nav-group{color:transparent}
  body:not(.sidebar-pinned) #sidebar:not(.peek-open) #navigation .nav-group::after{content:"";position:absolute;left:6px;right:6px;top:7px;height:1px;background:#dfe6ed}
  body:not(.sidebar-pinned) #sidebar:not(.peek-open) #navigation .nav-advanced>summary::after{display:none}
}
@media(prefers-reduced-motion:reduce){#sidebar,.workspace,#sidebar .nav-label{transition:none}}
