@font-face{font-family:AlarmDoc;src:url('./DejaVuSans.ttf') format('truetype');font-weight:400;font-display:swap}
@font-face{font-family:AlarmDoc;src:url('./DejaVuSans-Bold.ttf') format('truetype');font-weight:700;font-display:swap}
:root{--ad-navy:#10243a;--ad-signal:#e54743;--ad-ice:#eaf1f6;--ad-bg:#f8fafc;--ad-panel:#fff;--ad-soft:#eaf1f6;--ad-text:#10243a;--ad-muted:#54677a;--ad-line:#d8e2ea;--ad-input:#fff;--ad-link:#174d77;--ad-success:#146c43;--ad-danger:#b93230;--ad-shadow:0 6px 24px #10243a06;color-scheme:light}
:root[data-ad-theme=dark]{--ad-bg:#091522;--ad-panel:#14283c;--ad-soft:#1c354d;--ad-text:#f0f5fb;--ad-muted:#b2c5d8;--ad-line:#36516b;--ad-input:#102136;--ad-link:#9ed7ff;--ad-success:#8be0b2;--ad-danger:#ffaaa6;--ad-shadow:none;color-scheme:dark}
html[data-ad-theme] body{background:var(--ad-bg);color:var(--ad-text);font:400 15px/1.5 AlarmDoc,Arial,sans-serif}
html[data-ad-theme] a{color:var(--ad-link)}
html[data-ad-theme] .ad-header{background:var(--ad-navy);border-bottom:1px solid #284760;min-height:76px;display:flex;align-items:center;padding:12px max(22px,3vw);gap:26px;flex-wrap:wrap}
.ad-brand{display:inline-flex;align-items:center;text-decoration:none;flex:0 0 auto}.ad-brand img{width:184px;height:44px;object-fit:contain;display:block}
.ad-header nav{display:flex;flex:1;gap:24px}.ad-header nav a{margin:0!important;color:#e5edf6!important;font-size:13px;font-weight:700;text-decoration:none}
html[data-ad-theme] .ad-header button{background:transparent;color:#fff;border:1px solid #526a80;box-shadow:none;margin:0;font-size:12px}
.ad-theme-controls{margin-left:auto}.ad-theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap;min-height:38px;cursor:pointer}.ad-theme-symbol{font:20px/1 Arial,sans-serif}.ad-release-label{font-size:11px;font-weight:700;letter-spacing:.08em;color:#fff;background:#96382f;border:1px solid #df6b61;border-radius:5px;padding:3px 7px}
html[data-ad-theme] main{max-width:1600px;margin:24px auto;padding:0 24px}
html[data-ad-theme] .admin-shell{grid-template-columns:268px minmax(0,1fr);gap:28px}
html[data-ad-theme] .sidebar{background:var(--ad-navy);color:#e6f0fa;border:1px solid #29445d;border-radius:12px;padding:15px;top:18px}
html[data-ad-theme] .sidebar-heading{color:#a9c0d5;letter-spacing:.1em;font-size:10px;margin:5px 10px 14px}
html[data-ad-theme] .side-link{color:#e2edf7;font-size:13px;line-height:1.5;padding:11px 10px;border-radius:7px;min-height:43px}
html[data-ad-theme] .side-link:hover{background:#203e58;color:white}
html[data-ad-theme] .side-link.selected{background:#24445f;box-shadow:inset 3px 0 var(--ad-signal);color:white}
html[data-ad-theme] .side-icon{color:#c6dae9}.side-group-title{font-weight:700}.side-submenu{border-color:#3e5a74!important}.side-sub-link{font-size:12px!important}
html[data-ad-theme] .side-bottom{border-color:#3e5a74}.side-bottom a{color:#dbe8f4!important}
html[data-ad-theme] .content>h1{font-size:clamp(23px,2.3vw,33px);font-weight:700;line-height:1.22;letter-spacing:-.025em;margin-bottom:22px}
html[data-ad-theme] .breadcrumbs,html[data-ad-theme] .breadcrumbs a{color:var(--ad-muted);font-size:12px}
html[data-ad-theme] section,html[data-ad-theme] .panel,html[data-ad-theme] .ad-card,html[data-ad-theme] .department-card,html[data-ad-theme] .metric{background:var(--ad-panel);border:1px solid var(--ad-line);border-radius:12px;color:var(--ad-text);box-shadow:var(--ad-shadow)}
html[data-ad-theme] section,html[data-ad-theme] .panel,html[data-ad-theme] .ad-card{padding:24px;margin:18px 0}
html[data-ad-theme] h2{font-size:20px;letter-spacing:-.02em;line-height:1.3;color:var(--ad-text)}
html[data-ad-theme] h3{color:var(--ad-text)}
html[data-ad-theme] small,html[data-ad-theme] .ad-muted,html[data-ad-theme] .toolbar p,html[data-ad-theme] .metric span,html[data-ad-theme] .department-list-name>div{color:var(--ad-muted)}
html[data-ad-theme] input,html[data-ad-theme] select,html[data-ad-theme] textarea{background:var(--ad-input);color:var(--ad-text);border:1px solid var(--ad-line);border-radius:8px;padding:11px 12px;font:inherit;accent-color:var(--ad-navy)}
html[data-ad-theme] input:focus-visible,html[data-ad-theme] select:focus-visible,html[data-ad-theme] textarea:focus-visible{outline:2px solid #4185b5;outline-offset:2px}
html[data-ad-theme] button,html[data-ad-theme] .button-link{background:var(--ad-navy);color:white;border:1px solid #284d6e;border-radius:8px;padding:10px 15px;font:700 13px/1.5 AlarmDoc,Arial,sans-serif;text-decoration:none;box-shadow:none}
html[data-ad-theme] button:focus-visible,html[data-ad-theme] a:focus-visible{outline:3px solid var(--ad-signal);outline-offset:3px}
html[data-ad-theme] .btn-muted,html[data-ad-theme] .navbutton{background:var(--ad-soft);border:1px solid var(--ad-line);color:var(--ad-text)}
html[data-ad-theme] .danger{background:#b93230!important;color:white!important;border-color:#b93230!important}
html[data-ad-theme] th{background:var(--ad-soft);color:var(--ad-muted);font-size:11px;letter-spacing:.03em;text-transform:none}
html[data-ad-theme] td,html[data-ad-theme] th{border-bottom:1px solid var(--ad-line);padding:14px 16px}
html[data-ad-theme] .metric{padding:24px}.metric strong{font-size:34px!important;line-height:1.2}.metric-grid{gap:16px!important}
html[data-ad-theme] .page-note{background:var(--ad-soft);border-color:var(--ad-line);color:var(--ad-text);font-size:13px}
html[data-ad-theme] .department-list{border-color:var(--ad-line)}html[data-ad-theme] .department-row{background:var(--ad-panel);border-color:var(--ad-line);padding:20px}
html[data-ad-theme] .department-list-logo{background:var(--ad-soft)}
html[data-ad-theme] .modal-dialog,html[data-ad-theme] .ad-modal-panel{background:var(--ad-panel);color:var(--ad-text);border-color:var(--ad-line)}
html[data-ad-theme] .ad-row:not(.ad-monitor-preview){background:var(--ad-soft);border-color:var(--ad-line);color:var(--ad-text)}
html[data-ad-theme] .ad-row button{background:var(--ad-panel);color:var(--ad-text);border-color:var(--ad-line)}
html[data-ad-theme] .ad-number{background:var(--ad-panel);color:var(--ad-text);border:1px solid var(--ad-line)}
html[data-ad-theme] .ad-pill{color:var(--ad-muted);border-color:var(--ad-line);background:var(--ad-soft)}
html[data-ad-theme] .ad-filters{gap:20px}.ad-radio,.ad-type{color:#f0f6ff!important}
html[data-ad-theme=light] .error{color:#a72424}
html[data-ad-theme] [style*="background:#182438"],html[data-ad-theme] [style*="background:#1e293b"],html[data-ad-theme] [style*="background:#0f172a"]{background:var(--ad-panel)!important;color:var(--ad-text)!important;border-color:var(--ad-line)!important}
html[data-ad-theme=light] .content [style*="color:#a9b3c7"],html[data-ad-theme=light] .content [style*="color:#94a3b8"]{color:var(--ad-muted)!important}
html[data-ad-theme=light] #divera-status [style*="color:#55cf91"],html[data-ad-theme=light] .content [style*="color:#55cf91"]{color:#146c43!important}
html[data-ad-theme] .ad-public-page{max-width:720px;margin:40px auto}.ad-public-brand{display:flex;align-items:center;gap:12px;justify-content:space-between;background:var(--ad-navy);padding:15px 22px;border-radius:12px;margin-bottom:18px}.ad-public-brand .ad-theme-toggle{background:transparent;color:white;border-color:#526a80}
.ad-public-page .hint{color:var(--ad-muted)!important}.ad-public-page input{width:100%}.ad-public-page .button{display:inline-block;background:var(--ad-navy);color:white;padding:12px 18px;text-decoration:none;border-radius:8px}
@media(max-width:1000px){html[data-ad-theme] .admin-shell{grid-template-columns:230px minmax(0,1fr);gap:18px}.ad-header nav{gap:12px}.ad-brand img{width:154px}.ad-header{gap:15px!important}}
@media(max-width:850px){html[data-ad-theme] .admin-shell{grid-template-columns:1fr}html[data-ad-theme] .sidebar{position:static}.ad-theme-controls{margin-left:0}html[data-ad-theme] main{padding:0 14px}html[data-ad-theme] .ad-header{gap:12px;padding:12px 14px}.ad-header nav{flex-wrap:wrap}html[data-ad-theme] section,html[data-ad-theme] .ad-card{padding:18px}.ad-public-brand .ad-brand img{width:135px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

/* Typography 2: shared text roles for every administration component.
   Actual monitor pages do not load this stylesheet; status colors stay intact. */
:root{--ad-font:AlarmDoc,Arial,sans-serif;--ad-body-size:15px;--ad-small-size:13px;--ad-control-size:14px;--ad-h1-size:32px;--ad-h2-size:20px;--ad-h3-size:17px;--ad-warning:#805200;--ad-warning-bg:#fff4d6;--ad-ok-bg:#e6f4ec;--ad-error-bg:#fcebea}
:root[data-ad-theme=dark]{--ad-warning:#ffe0a0;--ad-warning-bg:#443519;--ad-ok-bg:#153e31;--ad-error-bg:#462d39}
html[data-ad-theme] body{font-family:var(--ad-font);font-size:var(--ad-body-size);font-weight:400;line-height:1.5}
html[data-ad-theme] :is(button,input,select,textarea,option,optgroup){font-family:var(--ad-font)}
html[data-ad-theme] :is(.content,.ad-public-page) :is(h1,h2,h3,h4){font-family:var(--ad-font);font-weight:700;color:var(--ad-text);line-height:1.3}
html[data-ad-theme] :is(.content,.ad-public-page) h1{font-size:var(--ad-h1-size);letter-spacing:-.025em}
html[data-ad-theme] :is(.content,.ad-public-page) h2{font-size:var(--ad-h2-size);letter-spacing:-.02em}
html[data-ad-theme] :is(.content,.ad-public-page) h3{font-size:var(--ad-h3-size);letter-spacing:normal}
html[data-ad-theme] :is(.content,.ad-public-page) h4{font-size:var(--ad-body-size);letter-spacing:normal}
html[data-ad-theme] :is(.content,.ad-public-page) :is(p,label,li,td){font-family:var(--ad-font);font-size:var(--ad-body-size);line-height:1.5;color:var(--ad-text)}
html[data-ad-theme] :is(.content,.ad-public-page) :is(input,select,textarea){font-size:var(--ad-body-size);line-height:1.5}
html[data-ad-theme] :is(.content,.ad-public-page) :is(button,.button,.button-link,.navbutton){font-size:var(--ad-control-size);line-height:1.5;font-weight:700;font-family:var(--ad-font)}
html[data-ad-theme] :is(.content,.ad-public-page) :is(small,th){font-family:var(--ad-font);font-size:var(--ad-small-size);line-height:1.5;color:var(--ad-muted)}
html[data-ad-theme] .side-sub-link{font-size:13px!important}
html[data-ad-theme] input::placeholder,html[data-ad-theme] textarea::placeholder{color:var(--ad-muted);opacity:1}
/* Explanations use the same primary text color as ordinary form descriptions. */
html[data-ad-theme] .content :is(.mo-intro,.audio-page-intro,.city-admin-panel-head p,.city-monitor-editor-head p,.mh-heading p){color:var(--ad-text);font-size:var(--ad-body-size);line-height:1.5}
/* Secondary text has one readable, theme-aware color rather than pale legacy blue. */
html[data-ad-theme] :is(.content,.ad-public-page) :is(.ad-muted,.hint,.mo-status,.cq-note,.cq-empty,.cq-number,.city-muted,.city-visual-info,.city-visual-note,.audio-helper,.audio-eyebrow,.audio-file-meta,.audio-file-assigned,.audio-monitor-state,.audio-empty,.mh-explain,.mh-stat span,.mh-help p,.mh-panel details p,.mh-panel details,.mh-scroll small,.unit-save-state){color:var(--ad-muted);font-size:var(--ad-small-size);line-height:1.5}
html[data-ad-theme] .content :is(.mo-status,.ad-pill,.cq-count,.mh-badge){background:var(--ad-soft);border-color:var(--ad-line);color:var(--ad-muted);font-size:var(--ad-small-size);font-family:var(--ad-font)}
html[data-ad-theme] .content .audio-library-ui{--audio-muted:var(--ad-muted);--audio-border:var(--ad-line)}
/* Neutral editor surfaces follow the selected theme. */
html[data-ad-theme] .content :is(.cq-card,.cq-row,.cq-count,.audio-tabs,.audio-upload-panel,.audio-manage-dialog,.audio-monitor-card,.city-monitor-tile,.city-admin-empty,.city-monitor-edit-panel,.city-admin-unit,.city-personnel-unit,.city-admin-card,.city-layout-tile,.mh-stat,.mh-help,.demo-car){background:var(--ad-panel);border-color:var(--ad-line);color:var(--ad-text)}
html[data-ad-theme] .content :is(.cq-row,.cq-count,.audio-tabs,.city-admin-unit,.city-personnel-unit[open]>summary,.mh-stat){background:var(--ad-soft)}
html[data-ad-theme] .content :is(.audio-upload-panel>summary,.audio-history>summary,.audio-check-live,.city-personnel-unit>summary,.mh-stat strong){color:var(--ad-text)}
html[data-ad-theme] .content :is(.audio-tabs,.city-admin-tabs,.city-admin-main-tabs) button{background:var(--ad-soft);color:var(--ad-text);border-color:var(--ad-line)}
html[data-ad-theme] .content :is(.audio-tabs,.city-admin-tabs,.city-admin-main-tabs) button[aria-selected=true]{background:var(--ad-navy);color:#fff;border-color:#526a80}
html[data-ad-theme] .content .city-primary{background:var(--ad-navy)!important;color:#fff!important;border-color:#526a80!important}
html[data-ad-theme] .content :is(.audio-button-muted,.cq-tools button){background:var(--ad-soft);color:var(--ad-text);border-color:var(--ad-line)}
html[data-ad-theme] .content .audio-danger-zone{background:var(--ad-error-bg)}
html[data-ad-theme] .content .audio-files-table th{background:var(--ad-soft);color:var(--ad-muted);font-size:var(--ad-small-size)}
/* Dark monitor-like previews retain their own readable text and FMS palette. */
html[data-ad-theme] .content :is(.mo-unit,.ad-monitor-preview,.city-visual-wrap){--ad-text:#f0f5fb;--ad-muted:#b2c5d8;--ad-link:#9ed7ff;--ad-input:#102136;--ad-line:#36516b}
html[data-ad-theme] .content :is(.mo-unithead strong,.mo-radio,.mo-type,.ad-radio,.ad-type){font-family:var(--ad-font);font-weight:700;color:#f0f5fb}
html[data-ad-theme] .content .mo-unithead strong{font-size:var(--ad-h3-size)}
html[data-ad-theme] .content :is(.mo-radio,.mo-type,.ad-radio,.ad-type){font-size:var(--ad-control-size)}
html[data-ad-theme] .content :is(.mo-unitcount,.mo-empty,.mo-add-details summary){font-family:var(--ad-font);font-size:var(--ad-small-size);color:var(--ad-muted)}
html[data-ad-theme] .content .mo-status.error{background:var(--ad-error-bg);color:var(--ad-danger);border-color:var(--ad-danger)}
html[data-ad-theme] .content .mo-status.saving{color:var(--ad-warning);background:var(--ad-warning-bg);border-color:var(--ad-warning)}
/* Errors, confirmations and warnings remain distinct but readable in both themes. */
html[data-ad-theme] :is(.content,.ad-public-page) :is(.error,.audio-error-note,#demo-error,#city-feedback.error){color:var(--ad-danger)}
html[data-ad-theme] .content :is(.audio-notice-error){background:var(--ad-error-bg);color:var(--ad-danger);border-color:var(--ad-danger)}
html[data-ad-theme] .content :is(.audio-notice-ok,.mh-good){background:var(--ad-ok-bg);color:var(--ad-success);border-color:var(--ad-success)}
html[data-ad-theme] .content :is(.demo-banner,.mh-warn){background:var(--ad-warning-bg);color:var(--ad-warning);border-color:var(--ad-warning)}
html[data-ad-theme] .content :is(#demo-mode,#city-feedback){color:var(--ad-muted)}
html[data-ad-theme] .content :is(.mh-live){color:var(--ad-success)}
html[data-ad-theme] .content .mh-warning{color:var(--ad-warning)}
html[data-ad-theme] :is(.content,.ad-public-page) [style*="color:#fca5a5"],html[data-ad-theme] .content [style*="color:#ff9292"]{color:var(--ad-danger)!important}
html[data-ad-theme] .content [style*="color:#fbbf24"]{color:var(--ad-warning)!important}
html[data-ad-theme] .content [style*="color:#d0e7fa"]{color:var(--ad-muted)!important}
@media(max-width:600px){html[data-ad-theme] :is(.content,.ad-public-page) h1{font-size:26px}}
html[data-ad-theme] .content .audio-library-ui section[data-audio-pane]{background:var(--ad-panel);border-color:var(--ad-line);color:var(--ad-text)}
html[data-ad-theme] .content #classic-qualification-cards .cq-card{background:var(--ad-panel);border-color:var(--ad-line);color:var(--ad-text)}
html[data-ad-theme] .content :is(.unit-card,.unit-counts){background:var(--ad-panel);color:var(--ad-text);border-color:var(--ad-line)}
html[data-ad-theme] .content .unit-counts{background:var(--ad-soft);font-size:var(--ad-small-size)}
html[data-ad-theme] .content .unit-location{color:var(--ad-text);font-size:var(--ad-body-size)}
html[data-ad-theme] .content :is(.unit-card-identity>strong,.department-list-name>strong,.audio-monitor-title){font-family:var(--ad-font);font-size:var(--ad-h3-size);font-weight:700;line-height:1.3;color:var(--ad-text)}
html[data-ad-theme] .content .city-overview-units{font-size:var(--ad-body-size);color:var(--ad-text)}

/* Administration shell follows its own light/dark preference. */
:root{--ad-shell:#fff;--ad-shell-text:#10243a;--ad-shell-muted:#54677a;--ad-shell-line:#d8e2ea;--ad-shell-hover:#eaf1f6;--ad-shell-selected:#dfe9f1}
:root[data-ad-theme=dark]{--ad-shell:#10243a;--ad-shell-text:#e2edf7;--ad-shell-muted:#a9c0d5;--ad-shell-line:#3e5a74;--ad-shell-hover:#203e58;--ad-shell-selected:#24445f}
html[data-ad-theme] :is(.ad-header,.ad-public-brand,.sidebar){background:var(--ad-shell);color:var(--ad-shell-text);border-color:var(--ad-shell-line)}
html[data-ad-theme] .ad-header nav a,html[data-ad-theme] .side-bottom a{color:var(--ad-shell-text)!important}
html[data-ad-theme] :is(.ad-header button,.ad-public-brand .ad-theme-toggle){background:transparent;color:var(--ad-shell-text);border-color:var(--ad-shell-line)}
html[data-ad-theme] :is(.side-link,.side-icon){color:var(--ad-shell-text)}
html[data-ad-theme] .sidebar-heading{color:var(--ad-shell-muted)}
html[data-ad-theme] .side-link:hover{background:var(--ad-shell-hover);color:var(--ad-shell-text)}
html[data-ad-theme] .side-link.selected{background:var(--ad-shell-selected);color:var(--ad-shell-text)}
html[data-ad-theme] :is(.side-submenu,.side-bottom){border-color:var(--ad-shell-line)!important}
html[data-ad-theme] .content [style*="border-bottom:1px solid #40516b"],html[data-ad-theme] .content [style*="border-top:1px solid #64748b"]{border-color:var(--ad-line)!important}
html[data-ad-theme] .content [style*="color:#22c55e"],html[data-ad-theme] .content [style*="color:#4ade80"]{color:var(--ad-success)!important}

/* Light administration actions share one palette, including link-buttons and overrides. */
html:root[data-ad-theme=light] :is(button,input[type=submit],input[type=button],.button-link,.navbutton,.button,.btn,.city-primary):not(.danger):not(.dangerbtn){background:#eaf1f6!important;color:#10243a!important;border-color:#b8ccdb!important;box-shadow:none}
html:root[data-ad-theme=light] :is(button,input[type=submit],input[type=button],.button-link,.navbutton,.button,.btn,.city-primary):not(.danger):not(.dangerbtn):hover{background:#dbe7ef!important;border-color:#6c8ba3!important}
html:root[data-ad-theme=light] :is(button,input[type=submit],input[type=button],.button-link,.navbutton,.button,.btn,.city-primary):not(.danger):not(.dangerbtn):active{background:#cbdde9!important}
html:root[data-ad-theme=light] :is(button[aria-selected=true],button[aria-pressed=true]):not(.ad-theme-toggle):not(.danger):not(.dangerbtn){background:#dbe7ef!important;border-color:#426a87!important;box-shadow:inset 0 -2px #426a87}

/* Only the exact current menu destination is bold; ancestor groups stay normal. */
html[data-ad-theme] :is(.side-link,.side-group-title,.side-sub-link,.side-bottom a,.ad-header nav a){font-weight:400!important}
html[data-ad-theme] .side-link.selected,html[data-ad-theme] .ad-header nav a[aria-current=page]{font-weight:700!important}
