:root{--bg:#0f1115;--panel:#171a21;--panel-2:#1f232c;--border:#2b303b;--text:#e6e8ec;--muted:#8b93a3;--accent:#4f9cff;--danger:#ff6b6b;--picker-width:340px;--highlight:#ffc83d;--ticker-height:38px;--alert-major:#ff5c5c;--alert-incident:#ff9f43;--alert-closure:#e56bd6;--alert-weather:#4dd0e1;--alert-event:#6bd88a;--alert-workzone:#f5d547}*{box-sizing:border-box}html,body{background:var(--bg);height:100%;color:var(--text);margin:0;font:14px/1.4 system-ui,-apple-system,Segoe UI,sans-serif}button,select,input{font:inherit;color:inherit;background:var(--panel-2);border:1px solid var(--border);border-radius:6px;padding:6px 10px}button{cursor:pointer}@media (hover:hover){button:hover{border-color:var(--accent)}}.topbar{background:var(--panel);border-bottom:1px solid var(--border);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;padding:10px 16px;display:flex}.topbar h1{align-items:center;gap:8px;margin:0;font-size:18px;display:flex}.topbar .logo{flex-shrink:0;display:block}.source-link{color:var(--muted);font-size:12px}.source-link:hover{color:var(--text)}.controls{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.controls label{color:var(--muted);align-items:center;gap:6px;display:flex}.dashboards{margin-right:auto}.dashboards select{max-width:260px}body{flex-direction:column;display:flex}#root{display:contents}.layout{flex:1;min-height:0;display:flex}.picker{width:var(--picker-width);background:var(--panel);border-right:1px solid var(--border);flex-direction:column;flex-shrink:0;display:flex}.picker.hidden{display:none}.filters{border-bottom:1px solid var(--border);gap:8px;padding:12px;display:grid}.filters input[type=search]{width:100%}.filters .row{grid-template-columns:1fr 1fr;gap:8px;display:grid}.filters .row select{min-width:0}.check{color:var(--muted);align-items:center;gap:6px;display:flex}.check input{padding:0}.status{color:var(--muted);margin:0;padding:8px 12px;font-size:12px}.attribution{color:var(--muted);border-top:1px solid var(--border);margin:0;padding:6px 12px;font-size:11px}.attribution a{color:inherit}.camera-list{flex:1;overflow-y:auto}.camera-list ul{margin:0;padding:0;list-style:none;position:relative}.camera-list li{border-bottom:1px solid var(--border);cursor:pointer;align-items:flex-start;gap:10px;width:100%;padding:8px 12px;display:flex;position:absolute;top:0;left:0}.camera-list li:hover{background:var(--panel-2)}.camera-list li.selected{background:#4f9cff1f}.camera-list input{margin-top:3px;padding:0}.camera-list .desc{display:block}.camera-list .meta{color:var(--muted);font-size:12px;display:block}.grid{flex:1;grid-template-columns:repeat(auto-fill,minmax(360px,1fr));grid-auto-rows:max-content;align-content:start;gap:12px;padding:12px;display:grid;overflow-y:auto}.grid[data-columns=auto]{justify-content:center}.grid.with-map{justify-content:end}.grid[data-columns="1"]{grid-template-columns:repeat(1,1fr)}.grid[data-columns="2"]{grid-template-columns:repeat(2,1fr)}.grid[data-columns="3"]{grid-template-columns:repeat(3,1fr)}.grid[data-columns="4"]{grid-template-columns:repeat(4,1fr)}.grid[data-columns="5"]{grid-template-columns:repeat(5,1fr)}.grid[data-columns="6"]{grid-template-columns:repeat(6,1fr)}.empty{color:var(--muted);text-align:center;grid-column:1/-1;margin-top:15vh}.tile{background:var(--panel);border:1px solid var(--border);border-radius:8px;align-self:start;margin:0;overflow:hidden}.tile .media{aspect-ratio:4/3;background:#000;position:relative}.tile video,.tile img,.viewer video,.viewer img{object-fit:contain;background:#000;width:100%;height:100%;position:absolute;inset:0}.tile .media{cursor:zoom-in}.tile.highlight{border-color:var(--highlight);box-shadow:0 0 0 2px var(--highlight)}.tile .overlay,.viewer .overlay{color:#fff;background:#0009;padding:4px 8px;font-size:12px;position:absolute;inset:auto 0 0}.tile .overlay.error,.viewer .overlay.error{color:var(--danger)}.tile figcaption{border-top:1px solid var(--border);justify-content:space-between;align-items:center;gap:8px;min-height:36px;padding:6px 8px;display:flex}.tile .label{flex-direction:column;min-width:0;display:flex}.tile .title,.tile .location{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.tile .title{font-weight:600}.tile .location{color:var(--muted);font-size:12px}.tile .actions{flex-shrink:0;gap:4px;display:flex}.tile .actions button{padding:2px 7px;font-size:12px}.tile .actions .icon{width:1.15em;height:1.15em;display:block}.tile .actions [data-act=remove]:hover{border-color:var(--danger);color:var(--danger)}@media (hover:hover){.tile .actions{display:none}.tile:hover .actions,.tile:focus-within .actions{display:flex}}.viewer{background:var(--panel);width:min(92vw,120vh - 80px);max-width:none;color:var(--text);border:1px solid var(--border);border-radius:10px;padding:0;overflow:hidden}.viewer::backdrop{background:#000000bf}.viewer header{justify-content:space-between;align-items:center;gap:12px;padding:8px 12px;display:flex}.viewer-heading{min-width:0}.viewer-title{white-space:nowrap;text-overflow:ellipsis;margin:0;font-size:16px;overflow:hidden}.viewer-meta{color:var(--muted);font-size:12px}.viewer .actions{flex-shrink:0;gap:4px;display:flex}.viewer .actions .icon{width:1.15em;height:1.15em;display:block}.viewer .actions [data-act=add]:hover{border-color:var(--accent);color:var(--accent)}.viewer .actions [data-act=remove]:hover{border-color:var(--danger);color:var(--danger)}.viewer .actions button:disabled{opacity:.35;cursor:default;border-color:var(--border)}.viewer .media{aspect-ratio:4/3;background:#000;position:relative}.map-panel{border:1px solid var(--border);background:var(--panel);border-radius:8px;min-width:0;display:flex;overflow:hidden}.map-panel.hidden{display:none}.map{background:#191c23;flex:1}.map.maplibregl-map{font-family:inherit}.map .maplibregl-ctrl-group{background:var(--panel-2);box-shadow:0 0 0 1px var(--border)}.map .maplibregl-ctrl-group button+button{border-top-color:var(--border)}@media (hover:hover){.map .maplibregl-ctrl button:not(:disabled):hover{background-color:var(--border)}}.map .maplibregl-ctrl button .maplibregl-ctrl-icon{filter:invert()brightness(.9)}.map .overview-control.hidden{display:none}.map .overview-control button{color:var(--text);justify-content:center;align-items:center;display:flex}.map .overview-control svg{width:16px;height:16px}.map .maplibregl-ctrl.maplibregl-ctrl-attrib{color:var(--muted);background:#0f1115cc}.map .maplibregl-ctrl-attrib.maplibregl-compact{background:var(--panel-2);color:var(--muted)}.map .maplibregl-ctrl-attrib-button{filter:invert()}.map .maplibregl-ctrl-attrib a{color:var(--text)}.map .maplibregl-popup-content{background:var(--panel-2);color:var(--text);border:1px solid var(--highlight);border-radius:6px;padding:4px 8px;font-size:12px;line-height:1.4;box-shadow:0 4px 16px #00000080}.map .maplibregl-popup-anchor-bottom .maplibregl-popup-tip{border-width:6px;border-top-color:var(--highlight)}.map .map-tooltip,.map .map-tooltip .maplibregl-popup-content{pointer-events:none}.map .other-tooltip .maplibregl-popup-content,.map .other-popup .maplibregl-popup-content{border-color:var(--muted)}.map .other-tooltip .maplibregl-popup-tip,.map .other-popup .maplibregl-popup-tip{border-top-color:var(--muted)}.map .tooltip-note{color:var(--muted)}.map .maplibregl-popup:not(.map-tooltip){text-align:left}.map .maplibregl-popup:not(.map-tooltip) .maplibregl-popup-content{padding:10px 26px 10px 12px}.map .maplibregl-popup:not(.map-tooltip) .maplibregl-popup-tip{border-width:10px}.map .maplibregl-popup-close-button{color:var(--muted);padding:2px 8px;font-size:16px}@media (hover:hover){.map .maplibregl-popup-close-button:hover{color:var(--text);background:0 0}}.popup-camera+.popup-camera{border-top:1px solid var(--border);margin-top:8px;padding-top:8px}.popup-camera button{margin-top:6px;display:block}.popup-meta{color:var(--muted)}.popup-message{margin:6px 0 0}.alert-major{--alert:var(--alert-major)}.alert-incident{--alert:var(--alert-incident)}.alert-closure{--alert:var(--alert-closure)}.alert-weather{--alert:var(--alert-weather)}.alert-event{--alert:var(--alert-event)}.alert-workzone{--alert:var(--alert-workzone)}.ticker{height:var(--ticker-height);background:var(--panel);border-top:1px solid var(--border);flex-shrink:0;align-items:stretch;font-size:13px;display:flex}.ticker-label{white-space:nowrap;border-right:1px solid var(--border);cursor:help;align-items:center;gap:4px;padding:0 12px;font-weight:600;display:flex}.ticker-count{color:var(--muted);font-weight:400}.ticker-viewport{scrollbar-width:none;flex:1;min-width:0;overflow-x:auto}.ticker-viewport::-webkit-scrollbar{display:none}.ticker-track{width:max-content;height:100%;display:flex}.ticker-item{white-space:nowrap;border-right:1px solid var(--border);cursor:pointer;align-items:center;gap:8px;padding:0 16px;display:flex}.ticker-item:hover,.ticker-item.highlight{background:var(--panel-2)}.ticker-item.highlight{box-shadow:inset 0 0 0 2px var(--highlight)}.ticker-badge{text-transform:uppercase;color:#0f1115;background:var(--alert);border-radius:4px;padding:1px 6px;font-size:11px;font-weight:700}.ticker-route{font-weight:600}.ticker-empty{color:var(--muted);align-items:center;padding:0 16px;display:flex}@media (width<=760px){body{height:auto}.layout{flex-direction:column;height:auto}.ticker{position:sticky;bottom:0}.picker{border-right:0;border-bottom:1px solid var(--border);width:100%;max-height:50vh}.grid{overflow:visible;grid-template-columns:1fr!important}.viewer header{flex-wrap:wrap;gap:8px}.viewer-heading{flex:100%}.viewer .actions{margin-left:auto}body.map-view{height:100dvh}.map-view .layout{flex:1;min-height:0}.map-view .picker,.map-view .grid>:not(.map-panel){display:none}.map-view .grid{flex:1;padding:0;display:flex}.map-view .map-panel{border:0;border-radius:0;flex:1}.map-view #toggle-map{border-color:var(--accent)}}
