:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #17232d;
    background: #eef3f5;
}

* { box-sizing: border-box; }

body { margin: 0; min-height: 100vh; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px clamp(20px, 5vw, 64px); color: #fff; background: #102f3a; }
.brand { color: inherit; font-weight: 900; text-decoration: none; }
.main-nav { display: flex; align-items: center; gap: 22px; }
.main-nav a { color: #fff; text-decoration: none; font-weight: 800; }
.main-nav > a:not(.brand), .nav-menu > summary { padding: 8px 0; border-bottom: 3px solid transparent; }
.main-nav > a.active, .main-nav > a[aria-current="page"], .nav-menu.active > summary { border-bottom-color: #7dd3c7; }
.main-nav > .nav-ol-button {
    padding: 9px 15px;
    border: 1px solid #4ade80;
    border-radius: 9px;
    color: #fff;
    background: #15803d;
    box-shadow: 0 4px 14px rgba(21, 128, 61, .3);
}
.main-nav > .nav-ol-button:hover, .main-nav > .nav-ol-button:focus-visible { background: #166534; }
.main-nav > .nav-ol-button.active, .main-nav > .nav-ol-button[aria-current="page"] { border-color: #bbf7d0; background: #14532d; }
.nav-menu { position: relative; color: #fff; }
.nav-menu > summary { list-style: none; font-weight: 800; cursor: pointer; }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary::after { content: "▾"; margin-left: 7px; font-size: 11px; }
.nav-menu-content { position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; display: grid; min-width: 240px; padding: 8px; border: 1px solid #34515c; border-radius: 12px; background: #102f3a; box-shadow: 0 18px 45px rgba(0,0,0,.24); }
.nav-menu-content a { padding: 11px 12px; border-radius: 8px; white-space: nowrap; }
.nav-menu-content a:hover, .nav-menu-content a:focus, .nav-menu-content a.active { background: #1b4a57; }
.topbar-user { display: flex; align-items: center; gap: 16px; }
.topbar-user form { margin: 0; }
.topbar-user .button { margin: 0; text-decoration: none; }
.topbar-user .button.active, .topbar-user .button[aria-current="page"] { box-shadow: inset 0 0 0 2px #7dd3c7; }
.external-transmission-indicator { display: flex; align-items: center; justify-content: center; gap: 10px 18px; padding: 10px clamp(20px, 5vw, 64px); border-bottom: 1px solid; font-size: 13px; }
.external-transmission-indicator strong { letter-spacing: .035em; }
.external-transmission-indicator.is-enabled { border-color: #991b1b; color: #fff; background: #b91c1c; }
.external-transmission-indicator.is-disabled { border-color: #b9d6cb; color: #14532d; background: #dcfce7; }

.landing-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: radial-gradient(circle at top left, #d8eee8, transparent 38%), #eef3f5;
}

.landing-card {
    width: min(720px, 100%);
    padding: clamp(32px, 7vw, 64px);
    border: 1px solid #d7e0e4;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(25, 48, 61, .13);
}

.eyebrow {
    margin: 0 0 14px;
    color: #12695d;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

h1 { margin: 0; font-size: clamp(36px, 7vw, 62px); line-height: 1; letter-spacing: -.045em; }
.lead { margin: 18px 0 30px; color: #5f707b; font-size: 19px; }

.safety-note {
    padding: 18px 20px;
    border-left: 5px solid #b45309;
    border-radius: 10px;
    background: #fff7ed;
    color: #78350f;
    line-height: 1.5;
}

.safety-note strong { display: block; }
.safety-note.danger-note { border-left-color: #b91c1c; color: #7f1d1d; background: #fee2e2; }

.auth-card { max-width: 520px; }
.account-password-panel { width: min(620px, 100%); margin: 0 auto; }
.password-requirements { margin-bottom: 8px; padding: 18px 20px; border: 1px solid #b9d6cb; border-radius: 14px; color: #24424b; background: #edf8f5; }
.password-requirements h2 { margin: 0 0 8px; font-size: 1.2rem; }
.password-requirements p { margin: 8px 0; line-height: 1.5; }
.password-requirements ul { margin: 8px 0; padding-left: 22px; line-height: 1.6; }
.password-field { position: relative; }
.password-field input { padding-right: 56px; }
.password-visibility-toggle { position: absolute; top: 50%; right: 6px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; transform: translateY(-50%); border: 0; border-radius: 8px; color: #31515a; background: transparent; cursor: pointer; }
.password-visibility-toggle:hover, .password-visibility-toggle:focus-visible, .password-visibility-toggle[aria-pressed="true"] { color: #fff; background: #12695d; }
.password-visibility-toggle:focus-visible { outline: 3px solid rgba(18, 105, 93, .28); outline-offset: 2px; }
.password-visibility-toggle svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.password-visibility-toggle .password-eye-slash { display: none; }
.password-visibility-toggle[aria-pressed="true"] .password-eye-slash { display: block; }
.form-stack { display: grid; gap: 10px; }
.form-stack label { margin-top: 8px; font-weight: 800; }
.form-stack input, .form-stack select, .form-stack textarea { width: 100%; padding: 12px 14px; border: 1px solid #b9c7ce; border-radius: 10px; font: inherit; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 16px; border: 0; border-radius: 9px; font: inherit; font-weight: 800; cursor: pointer; }
.button-primary { margin-top: 16px; color: #fff; background: #12695d; }
.button-quiet { color: #fff; background: rgba(255,255,255,.14); }
.alert { margin: 16px 0; padding: 14px 16px; border-radius: 10px; }
.alert-error { color: #7f1d1d; background: #fee2e2; }
.alert-success { color: #166534; background: #dcfce7; }

.status-list { margin: 32px 0 0; border-top: 1px solid #e3e9ec; }
.status-list div { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid #e3e9ec; }
.status-list dt { color: #61717b; }
.status-list dd { margin: 0; font-weight: 800; }

.app-shell { width: min(1440px, calc(100% - 32px)); margin: 0 auto; padding: 38px 0 80px; }
.page-heading, .panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.page-heading { margin-bottom: 28px; }
.page-heading h1, .panel-heading h2 { margin: 0; }
.page-heading .lead { margin-bottom: 0; }
.compact { max-width: 440px; }
.metrics { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 14px; margin-bottom: 24px; }
.metrics article { padding: 18px; border: 1px solid #d5e0e4; border-radius: 14px; background: #fff; }
.metrics span { display: block; color: #63737d; font-size: 13px; font-weight: 700; }
.metrics strong { display: block; margin-top: 6px; font-size: 30px; }
.metric-danger { border-top: 4px solid #b91c1c !important; }
.metric-warning { border-top: 4px solid #b45309 !important; }
.metric-ok { border-top: 4px solid #15803d !important; }
.operator-grid { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(480px, 1.5fr); gap: 20px; }
.single-operation-layout { display: grid; grid-template-columns: minmax(440px, 1.5fr) minmax(280px, .7fr); gap: 20px; align-items: start; }
.breadcrumbs { display: flex; align-items: center; gap: 9px; margin-bottom: 24px; color: #63737d; font-size: 14px; }
.breadcrumbs a { color: #12695d; font-weight: 800; }
.ol-navigation { justify-content: space-between; }
.breadcrumbs .ol-return-button { gap: 8px; color: #fff; background: #12695d; text-decoration: none; }
.breadcrumbs .ol-return-button:hover, .breadcrumbs .ol-return-button:focus-visible { background: #0f564d; }
.operation-panel, .analysis-card, .operations-card { padding: 24px; border: 1px solid #d6e0e4; border-radius: 18px; background: #fff; box-shadow: 0 10px 35px rgba(25,48,61,.06); }
.operation-panel { display: flex; flex-direction: column; gap: 16px; }
.osp-panel { border-top: 7px solid #b91c1c; }
.ol-panel { border-top: 7px solid #15803d; }
.operation-panel label { font-weight: 800; }
.operation-panel select { width: 100%; padding: 12px; border: 1px solid #b9c7ce; border-radius: 9px; background: #fff; font: inherit; }
.mode-badge, .status-pill { display: inline-flex; padding: 7px 10px; border-radius: 999px; background: #e6edf0; font-size: 12px; font-weight: 900; }
.mode-badge.danger { color: #fff; background: #b91c1c; }
.mode-switch { display: flex; overflow: hidden; border: 1px solid #aabcc4; border-radius: 10px; }
.mode-switch button { padding: 9px 12px; border: 0; background: #fff; cursor: pointer; font-weight: 800; }
.mode-switch button.active { color: #fff; }
.mode-switch button[data-ol-mode="OL_ALARM"].active { background: #b45309; }
.mode-switch button[data-ol-mode="OL_CANCEL"].active { background: #15803d; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row > div { display: grid; gap: 8px; }
.local-map { position: relative; min-height: 260px; overflow: hidden; border: 1px solid #cbd8dd; border-radius: 12px; background: #edf4f1; }
.local-map svg { display: block; width: 100%; height: 300px; }
.local-map path { fill: #b8d8ce; stroke: #fff; stroke-width: 1.5; cursor: pointer; vector-effect: non-scaling-stroke; }
.local-map path:hover, .local-map path.selected { fill: #2f927c; }
.map-placeholder { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 20px; color: #61717b; text-align: center; pointer-events: none; }
.button-danger { color: #fff; background: #b91c1c; }
.button-success { color: #fff; background: #15803d; }
.analysis-card, .operations-card { margin-top: 20px; }
.compact-metrics { grid-template-columns: repeat(4, 1fr); margin: 20px 0; }
.issues-list { margin: 0 0 20px; padding-left: 22px; color: #7f1d1d; }
.empty-state { color: #667781; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid #dfe7ea; text-align: left; white-space: nowrap; }
th { color: #60717b; font-size: 12px; text-transform: uppercase; }
.confirm-dialog { width: min(600px, calc(100% - 32px)); max-height: calc(100vh - 32px); padding: 30px; overflow-y: auto; border: 0; border-radius: 18px; box-shadow: 0 30px 100px rgba(0,0,0,.35); }
.confirm-dialog::backdrop { background: rgba(7, 24, 31, .72); }
.confirm-incident-field { display: grid; width: 100%; max-width: none; gap: 8px; margin: 16px 0; }
.confirm-incident-field textarea { display: block; width: 100%; min-width: 0; min-height: 96px; padding: 12px 14px; resize: vertical; border: 1px solid #b9c7ce; border-radius: 10px; color: #20343d; background: #fff; font: inherit; line-height: 1.45; }
.confirm-incident-field small { display: block; }
.dialog-close { float: right; border: 0; background: transparent; font-size: 28px; cursor: pointer; }
.alert-warning { color: #78350f; background: #fff7ed; }
.alert-external { border: 2px solid #b91c1c; color: #7f1d1d; background: #fee2e2; }
.alert-external strong { display: block; margin-bottom: 4px; }
.hold-button { position: relative; width: 100%; overflow: hidden; color: #fff; background: #8d1b1b; }
.hold-button span { position: relative; z-index: 2; }
.hold-button i { position: absolute; inset: 0 100% 0 0; background: #15803d; transition: none; }
.hold-button.holding i { right: 0; transition: right var(--confirm-hold-duration, 2s) linear; }
.result-message { min-height: 24px; font-weight: 800; }
.result-error { color: #991b1b; }
.admin-grid { display: grid; grid-template-columns: repeat(3, minmax(280px, 1fr)); gap: 20px; }
.admin-grid-two { grid-template-columns: repeat(2, minmax(320px, 1fr)); }
.admin-grid h2 { margin: 0 0 8px; }
.separated { margin-top: 24px; padding-top: 20px; border-top: 1px solid #dfe7ea; }
.check-row { display: flex; gap: 20px; }
.check-row label { display: flex; align-items: center; gap: 8px; }
.check-row input { width: auto; }
.check-row legend { width: 100%; margin-bottom: 10px; font-weight: 800; }
.check-row { margin: 4px 0; padding: 12px 0 0; border: 0; border-top: 1px solid #dfe7ea; }
.test-sms-editor { display: grid; gap: 8px; }
.test-sms-editor input { width: 100%; padding: 11px 12px; border: 2px solid #b45309; border-radius: 9px; color: #0f172a; background: #fff; font: inherit; font-weight: 750; }
.test-sms-editor input:focus { outline: 3px solid rgb(180 83 9 / 22%); outline-offset: 1px; }
.test-sms-editor small { color: #78350f; }
.form-stack small { color: #61717b; font-weight: 500; line-height: 1.4; }
.address-fields { display: grid; gap: 10px; margin: 8px 0 0; padding: 16px; border: 1px solid #cbd8dd; border-radius: 12px; }
.address-fields legend { padding: 0 8px; font-weight: 900; }
.address-fields label { display: grid; gap: 7px; }
.address-fields label small { display: inline; }
.address-street-row { grid-template-columns: minmax(0, 1.6fr) minmax(110px, .4fr); }
.siren-location-picker { display: grid; gap: 12px; margin-top: 8px; padding: 16px; border: 1px solid #b9d6cb; border-radius: 14px; background: #f4fbf8; }
.location-heading { align-items: center; }
.location-heading h3 { margin: 0; }
.location-heading p { margin: 7px 0 0; color: #52666f; font-size: 14px; line-height: 1.45; }
.location-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.location-actions .button { margin: 0; }
.button-secondary { color: #fff; background: #12695d; }
.location-status { margin: 0; padding: 10px 12px; border-radius: 9px; color: #344b55; background: #e6eff1; font-size: 14px; font-weight: 700; }
.location-status.location-ok { color: #166534; background: #dcfce7; }
.location-status.location-warning { color: #92400e; background: #fef3c7; }
.location-status.location-error { color: #991b1b; background: #fee2e2; }
.siren-location-map { min-height: 330px; border: 1px solid #a8bbc3; border-radius: 12px; background: #dfe8eb; }
.coordinate-fields { margin-top: 2px; }
.coordinate-fields label { display: grid; gap: 7px; font-weight: 800; }
.coordinate-fields input { width: 100%; padding: 12px 14px; border: 1px solid #b9c7ce; border-radius: 10px; font: inherit; }
.siren-map-dialog { width: min(920px, calc(100% - 32px)); max-height: calc(100vh - 32px); padding: 0; overflow: auto; border: 0; border-radius: 20px; color: #20343d; background: #f8fbfa; box-shadow: 0 30px 100px rgba(7, 24, 31, .45); }
.siren-map-dialog::backdrop { background: rgba(7, 24, 31, .72); backdrop-filter: blur(3px); }
.siren-map-dialog-card { display: grid; gap: 16px; padding: 24px; }
.siren-map-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.siren-map-dialog-header h2 { margin: 2px 0 6px; }
.siren-map-dialog-header p:last-child { margin: 0; color: #52666f; }
.siren-map-dialog-close { display: grid; flex: 0 0 auto; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; color: #314952; background: #e2ece9; font-size: 28px; line-height: 1; cursor: pointer; }
.siren-map-dialog-close:hover { color: #fff; background: #12695d; }
.siren-map-dialog .siren-location-map { min-height: min(54vh, 520px); }
.sirens-overview-map { min-height: min(64vh, 620px) !important; }
.panel-heading-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.panel-heading-actions .button { margin: 0; }
.siren-map-popup { display: grid; gap: 3px; min-width: 190px; }
.siren-map-popup strong, .siren-map-popup span, .siren-map-popup small { display: block; }
.siren-map-dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.siren-map-dialog-footer small { max-width: 600px; color: #61717b; line-height: 1.4; }
.siren-map-dialog-footer .button { flex: 0 0 auto; margin: 0; }
.siren-edit-dialog { width: min(940px, calc(100% - 32px)); max-height: calc(100vh - 32px); padding: 0; overflow: auto; border: 0; border-radius: 20px; color: #20343d; background: #f8fbfa; box-shadow: 0 30px 100px rgba(7, 24, 31, .45); }
.siren-edit-dialog::backdrop { background: rgba(7, 24, 31, .72); backdrop-filter: blur(3px); }
.siren-edit-dialog-card { display: grid; gap: 16px; padding: 24px; }
.siren-edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.siren-edit-grid label { align-content: start; }
.siren-pin-fields { grid-column: 1 / -1; margin: 0; padding: 14px; border: 1px solid #cbd5e1; border-radius: 10px; }
.siren-pin-fields > legend { padding: 0 6px; font-weight: 800; }
.siren-create-dialog { width: min(980px, calc(100% - 32px)); }
.user-form-dialog { width: min(760px, calc(100% - 32px)); }
.user-alarm-permissions { justify-content: flex-start; }
.gateway-create-dialog { width: min(980px, calc(100% - 32px)); }
.gateway-county-dialog { width: min(980px, calc(100% - 32px)); }
.gateway-county-field { display: grid; align-content: start; gap: 8px; padding: 12px; border: 1px solid #c7d7d4; border-radius: 11px; background: #f7fbfa; }
.gateway-county-field-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gateway-county-field p { min-height: 42px; margin: 0; color: #31515a; font-size: 13px; line-height: 1.45; }
.gateway-county-field p.is-empty { color: #7a4d0b; }
.gateway-county-field .button { width: 100%; margin: 0; }
.gateway-county-help { position: static; flex: 0 0 auto; }
.gateway-county-instruction { margin: 0; color: #40545e; line-height: 1.5; }
.gateway-county-list { display: grid; align-content: start; gap: 7px; min-height: 260px; padding: 7px; border: 1px solid #c5d3d7; border-radius: 10px; background: #f8fbfb; }
.gateway-county-transfer .gateway-access-column { grid-template-rows: auto auto; align-content: start; }
.gateway-county-transfer [data-gateway-counties-assigned] { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; align-self: start; width: 100%; }
.gateway-county-item { width: 100%; padding: 10px 11px; border: 1px solid #cbd9dc; border-radius: 8px; color: #27434c; background: #fff; font: inherit; font-size: 13px; font-weight: 750; text-align: left; cursor: grab; }
.gateway-county-item:hover { border-color: #7ca99f; background: #eef8f5; }
.gateway-county-item.is-selected, .gateway-county-item[aria-selected="true"] { border-color: #12695d; color: #fff; background: #12695d; }
.gateway-county-item.is-dragging { opacity: .45; }
.gateway-county-dropzone { transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.gateway-county-dropzone.is-dragover { border-color: #12695d; background: #e8f7f2; box-shadow: 0 0 0 3px rgba(18, 105, 93, .16); }
.gateway-create-intro { display: grid; gap: 4px; padding: 16px 18px; border-radius: 14px; color: #164e44; background: linear-gradient(135deg, #dff7ef, #edf7f4); }
.gateway-create-intro strong { font-size: 1.02rem; }
.gateway-create-intro span { color: #3f625d; line-height: 1.5; }
.gateway-form-section { display: grid; gap: 12px; padding: 18px; border: 1px solid #d4e1df; border-radius: 16px; background: #fff; }
.gateway-form-section-heading { display: flex; align-items: center; gap: 11px; padding-bottom: 10px; border-bottom: 1px solid #e4ecea; }
.gateway-form-section-heading > span { display: grid; flex: 0 0 auto; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #fff; background: #12695d; font-weight: 900; }
.gateway-form-section-heading strong, .gateway-form-section-heading small { display: block; }
.gateway-form-section-heading small { margin-top: 2px; color: #61717b; }
.gateway-provider-settings { display: grid; gap: 12px; padding: 14px; border-radius: 12px; background: #f1f6f5; }
.gateway-access-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 16px; border-radius: 12px; color: #24424b; background: #e6efef; }
.gateway-access-summary span { color: #61717b; font-size: .85rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.gateway-access-scope-note { margin: 0; color: #164e63; background: #ecfeff; border-color: #a5f3fc; }
.gateway-access-transfer { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; align-items: stretch; }
.gateway-access-column { display: grid; gap: 10px; padding: 16px; border: 1px solid #d4dee2; border-radius: 15px; background: #fff; }
.gateway-access-column > div { min-height: 42px; }
.gateway-access-column strong, .gateway-access-column small { display: block; }
.gateway-access-column small { margin-top: 3px; color: #61717b; }
.gateway-access-count { display: inline-grid !important; place-items: center; min-width: 24px; height: 24px; margin-left: 5px; padding: 0 7px; border-radius: 999px; color: #31515a; background: #e4edee; font-size: .78rem; }
.gateway-access-column select { min-height: 260px; margin: 0; padding: 6px; border-color: #c5d3d7; background: #f8fbfb; }
.gateway-access-column select option { padding: 9px 10px; border-radius: 7px; }
.gateway-access-column select option:checked { color: #fff; background: #12695d linear-gradient(0deg, #12695d, #12695d); }
.gateway-access-column-assigned { border-color: #9bc8bd; background: #f2fbf8; }
.gateway-access-controls { display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.gateway-access-controls .button { min-width: 112px; margin: 0; }
.module-tabs { display: flex; gap: 8px; margin: -8px 0 28px; padding-bottom: 12px; overflow-x: auto; border-bottom: 1px solid #ccd9de; }
.module-tabs a { padding: 10px 14px; border-radius: 9px; color: #344b55; font-weight: 800; text-decoration: none; white-space: nowrap; }
.module-tabs a:hover { background: #e1ecef; }
.module-tabs a.active { color: #fff; background: #12695d; }
.management-layout { display: grid; grid-template-columns: minmax(300px, .55fr) minmax(600px, 1.45fr); gap: 20px; align-items: start; }
.management-list { margin-top: 0; }
.full-width-list { margin-top: 20px; }
.form-panel { position: sticky; top: 20px; }
.record-count { display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 10px; border-radius: 999px; color: #fff; background: #12695d; font-weight: 900; }
.button-small { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.button-muted { color: #273d47; background: #dfe8eb; }
.status-ok, .status-online { color: #166534; background: #dcfce7; }
.status-off, .status-offline { color: #991b1b; background: #fee2e2; }
.status-degraded { color: #92400e; background: #fef3c7; }
.status-maintenance { color: #3730a3; background: #e0e7ff; }
.status-delivered, .status-sent, .status-completed, .status-active { color: #166534; background: #dcfce7; }
.status-accepted, .status-sending, .status-queued, .status-leased { color: #1e40af; background: #dbeafe; }
.status-failed, .status-cancelled, .status-excluded { color: #991b1b; background: #fee2e2; }
.status-delivery_unknown { color: #92400e; background: #fef3c7; }
.inline-actions { display: flex; align-items: center; gap: 7px; }
.inline-actions .button { margin: 0; }
.inline-actions a { text-decoration: none; }
.inline-actions select { min-width: 130px; padding: 8px; border: 1px solid #b9c7ce; border-radius: 8px; background: #fff; }
.gateway-actions-trigger { min-width: 92px; }
.gateway-use-only { display: inline-flex; align-items: center; min-height: 34px; padding: 6px 10px; border-radius: 999px; color: #31515a; background: #e4edee; font-size: 12px; font-weight: 850; white-space: nowrap; }
.gateway-actions-dialog { width: min(94vw, 760px); }
.gateway-actions-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px 16px; border-radius: 13px; color: #24424b; background: #e6efef; }
.gateway-actions-summary span, .gateway-actions-summary strong { display: block; }
.gateway-actions-summary span { margin-bottom: 3px; color: #61717b; font-size: .76rem; font-weight: 900; letter-spacing: .045em; text-transform: uppercase; }
.gateway-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.gateway-action-group { display: grid; align-content: start; gap: 10px; padding: 16px; border: 1px solid #d8e3e5; border-radius: 13px; background: #f8fbfb; }
.gateway-action-label { margin: 0; color: #60747c; font-size: 11px; font-weight: 900; letter-spacing: .055em; text-transform: uppercase; }
.gateway-action-controls { display: grid; gap: 8px; align-items: center; }
.gateway-action-controls .button { width: 100%; margin: 0; }
.gateway-action-status .gateway-action-controls { display: grid; grid-template-columns: minmax(135px, 1fr) auto; }
.gateway-action-status .button { width: auto; }
.gateway-action-status select { width: 100%; min-height: 34px; padding: 6px 9px; border: 1px solid #b9c7ce; border-radius: 8px; color: #273d47; background: #fff; font: inherit; font-size: 13px; font-weight: 700; }
.gateway-action-danger { border-color: #fecaca; background: #fff7f7; }
.gateway-action-danger .gateway-action-label { color: #991b1b; }
.gateway-action-danger .gateway-action-controls { align-items: stretch; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; min-width: 180px; }
.relation-tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 7px; border-radius: 999px; background: #e6edf0; font-size: 12px; font-weight: 800; }
.tag-remove { display: grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: #991b1b; cursor: pointer; }
.gateway-network { display: grid; gap: 6px; max-width: 300px; }
.gateway-network small { overflow: hidden; color: #61717b; text-overflow: ellipsis; }
.network-scope { display: inline-flex; width: fit-content; padding: 5px 8px; border-radius: 999px; font-size: 11px; font-weight: 900; letter-spacing: .04em; }
.network-internal { color: #14532d; background: #dcfce7; }
.network-external { color: #fff; background: #b91c1c; }
.external-gateway-consent { margin-top: 12px; padding: 15px; border: 2px solid #b91c1c; border-radius: 12px; color: #7f1d1d; background: #fff1f2; }
.external-gateway-consent p { margin: 7px 0 12px; line-height: 1.45; }
.external-gateway-consent label { display: flex; align-items: flex-start; gap: 9px; margin: 0; }
.external-gateway-consent input { width: auto; margin-top: 3px; }
[data-real-provider-fields] { display: grid; gap: 10px; }
[data-push-provider-fields] { display: grid; gap: 10px; }
.managed-gateway-fields { padding: 15px; border: 1px solid #9fc8bd; border-radius: 12px; background: #effbf7; }
.managed-gateway-fields p { margin: 0 0 12px; line-height: 1.5; }
.field-with-help { position: relative; min-width: 0; }
.field-with-help > label { display: block; }
.check-row .field-with-help { min-width: 92px; }
.check-row .field-with-help > label { display: flex; padding-right: 31px; }
.external-gateway-consent .field-with-help > label { display: flex; padding-right: 34px; }
.field-help-button { position: absolute; top: 2px; right: 2px; display: grid; place-items: center; width: 25px; height: 25px; padding: 0; border: 1px solid #7ca99f; border-radius: 50%; color: #0b5b51; background: #e8f5f1; font: inherit; font-size: 14px; font-weight: 900; line-height: 1; cursor: pointer; }
.field-help-button:hover, .field-help-button:focus-visible { color: #fff; background: #12695d; outline: 3px solid rgba(18, 105, 93, .2); }
.gateway-help-dialog, .siren-help-dialog { width: min(680px, calc(100% - 32px)); }
.gateway-help-content, .siren-help-content { display: grid; gap: 12px; color: #40545e; line-height: 1.6; }
.gateway-help-content p, .gateway-help-content ul, .siren-help-content p { margin: 0; }
.gateway-help-content ul { display: grid; gap: 9px; padding-left: 22px; }
.gateway-help-content strong { color: #20343d; }
.device-summary { display: grid; gap: 5px; min-width: 180px; }
.device-summary small { color: #61717b; }
.device-summary .diagnostic-ok { color: #166534; font-weight: 700; }
.device-summary .diagnostic-warning { color: #b45309; font-weight: 700; }
.enrollment-dialog { width: min(94vw, 560px); max-height: 94vh; padding: 0; border: 0; border-radius: 18px; box-shadow: 0 24px 70px rgba(15, 35, 45, .32); }
.enrollment-dialog::backdrop { background: rgba(10, 27, 36, .7); backdrop-filter: blur(2px); }
.enrollment-dialog-card { padding: 24px; }
.dialog-close { width: 40px; height: 40px; border: 0; border-radius: 50%; color: #30454f; background: #e5edef; font-size: 26px; line-height: 1; cursor: pointer; }
.enrollment-qr { display: grid; place-items: center; margin: 18px 0; padding: 14px; border: 1px solid #d8e2e5; border-radius: 14px; background: #fff; }
.enrollment-qr img { width: min(100%, 360px); height: auto; image-rendering: crisp-edges; }
.enrollment-expiry { text-align: center; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
[hidden] { display: none !important; }
.history-filters { margin-bottom: 20px; }
.history-filter-grid { display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(150px, 1fr)); gap: 14px; align-items: end; }
.history-filter-grid label { display: grid; gap: 7px; margin: 0; font-weight: 800; }
.history-filter-grid input, .history-filter-grid select { width: 100%; padding: 11px 12px; border: 1px solid #b9c7ce; border-radius: 9px; background: #fff; font: inherit; }
.history-filter-actions { display: flex; gap: 8px; grid-column: 1 / -1; }
.history-filter-actions .button { margin: 0; text-decoration: none; }
.history-results { margin-top: 0; }
.history-table td { vertical-align: top; white-space: normal; }
.history-table td > strong, .history-table td > code, .history-table td > small, .history-table td > time { display: block; }
.history-table td > small { margin-top: 5px; color: #61717b; }
.history-table code { width: fit-content; margin-top: 7px; padding: 5px 7px; border-radius: 6px; color: #7f1d1d; background: #fee2e2; font-weight: 900; }
.history-table code, .siren-response code { white-space: pre-wrap; overflow-wrap: anywhere; }
.history-attempts { display: grid; gap: 5px; min-width: 220px; }
.history-attempts span { padding: 6px 8px; border-radius: 7px; color: #344b55; background: #edf3f4; font-size: 12px; }
.siren-response { display: grid; gap: 5px; min-width: 210px; }
.siren-response code { padding: 6px 8px; border-radius: 7px; color: #24444d; background: #edf3f4; }
.siren-response small { color: #61717b; }
.siren-response-meaning { color: #173f2d; font-weight: 800; line-height: 1.35; }
.siren-response-rules { display: grid; gap: 12px; }
.siren-response-rule-row { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.4fr) auto; gap: 12px; align-items: end; padding: 14px; border: 1px solid #d4dfe2; border-radius: 12px; background: #fff; }
.siren-response-rule-row label { margin: 0; }
.siren-response-rule-actions { display: flex; gap: 6px; padding-bottom: 2px; }
.siren-response-rule-drag { display: inline-grid; place-items: center; min-width: 30px; padding: 5px; border: 1px solid #b9c7ce; border-radius: 8px; color: #52656d; background: #f4f7f8; cursor: grab; user-select: none; }
.siren-response-rule-drag:active { cursor: grabbing; }
.siren-response-rule-row.is-dragging { opacity: .45; }
.siren-response-rule-row.is-drop-before { box-shadow: inset 0 4px 0 #12695d; }
.siren-response-rule-row.is-drop-after { box-shadow: inset 0 -4px 0 #12695d; }
.response-pattern-legend { padding: 16px; border: 1px solid #c8d8d2; border-radius: 12px; background: #eef6f2; }
.response-pattern-legend h3, .response-pattern-legend p { margin: 0; }
.response-pattern-legend dl { display: grid; gap: 7px; margin: 12px 0; }
.response-pattern-legend dl div { display: grid; grid-template-columns: minmax(130px, .35fr) 1fr; gap: 12px; }
.response-pattern-legend dt, .response-pattern-legend dd { margin: 0; }
.response-pattern-legend code { padding: 2px 5px; border-radius: 4px; background: #dceae4; }
.siren-registry-toolbar { position: sticky; z-index: 4; top: 0; display: grid; gap: 14px; margin: 0 -4px 16px; border-bottom: 1px solid #dbe5e7; padding: 12px 4px 16px; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); }
.siren-view-switch { display: flex; flex-wrap: wrap; gap: 8px; }
.siren-registry-filters { display: grid; grid-template-columns: minmax(210px, 1.5fr) repeat(5, minmax(120px, 1fr)) auto; gap: 10px; align-items: end; }
.siren-registry-filters label { display: grid; gap: 5px; margin: 0; color: #40545e; font-size: .78rem; font-weight: 850; }
.siren-registry-filters input, .siren-registry-filters select { min-width: 0; width: 100%; padding: 9px 10px; border: 1px solid #b9c7ce; border-radius: 8px; background: #fff; font: inherit; }
.siren-registry-filters .button { margin-bottom: 1px; }
.siren-compact-wrap { overflow: visible; }
.siren-compact-list { display: grid; gap: 8px; }
.siren-compact-header, .siren-compact-item { display: grid; grid-template-columns: minmax(250px, 1.6fr) minmax(150px, .8fr) minmax(220px, 1.2fr) 76px auto; gap: 14px; align-items: center; }
.siren-compact-header { padding: 0 14px 5px; color: #61717b; font-size: .72rem; font-weight: 900; letter-spacing: .045em; text-transform: uppercase; }
.siren-compact-item { border: 1px solid #d7e1e4; border-radius: 12px; padding: 12px 14px; background: #fff; box-shadow: 0 3px 10px rgb(15 35 45 / 4%); }
.siren-compact-item:hover { border-color: #9fc2b9; box-shadow: 0 6px 16px rgb(15 35 45 / 8%); }
.siren-compact-identity, .siren-compact-response, .siren-compact-gateways { display: grid; gap: 3px; min-width: 0; }
.siren-compact-identity strong { color: #173b49; font-size: 1rem; }
.siren-compact-identity span, .siren-compact-identity small, .siren-compact-response small, .siren-compact-response time, .siren-compact-gateways small { overflow: hidden; color: #61717b; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.siren-compact-identity .siren-compact-model { color: #315b65; font-weight: 800; }
.siren-compact-response strong { overflow: hidden; color: #24444d; font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; }
.siren-compact-states { display: flex; flex-wrap: wrap; gap: 5px; }
.siren-compact-states .status-pill { padding: 4px 7px; font-size: .7rem; }
.siren-compact-gateways { justify-items: center; text-align: center; }
.siren-compact-gateways strong { color: #12695d; font-size: 1.25rem; }
.siren-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; }
.siren-details-dialog { width: min(920px, calc(100% - 32px)); }
.siren-detail-tabs { display: flex; gap: 6px; overflow-x: auto; border-bottom: 1px solid #d5e0e3; padding-bottom: 8px; }
.siren-detail-tabs button { flex: 0 0 auto; border: 0; border-radius: 8px; padding: 9px 12px; color: #415963; background: #edf3f4; font: inherit; font-size: .87rem; font-weight: 800; cursor: pointer; }
.siren-detail-tabs button[aria-selected="true"] { color: #fff; background: #12695d; }
.siren-detail-panel { min-height: 260px; padding: 4px 2px; }
.siren-detail-panel > h3, .siren-detail-latest-response h3 { margin: 0 0 12px; color: #20343d; }
.siren-detail-panel > p { color: #52666f; }
.siren-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.siren-detail-grid > div { border: 1px solid #dce5e7; border-radius: 10px; padding: 11px 12px; background: #f8fbfb; }
.siren-detail-grid dt { color: #60747c; font-size: .75rem; font-weight: 850; text-transform: uppercase; }
.siren-detail-grid dd { margin: 4px 0 0; color: #20343d; font-weight: 750; }
.siren-detail-latest-response { margin-top: 16px; border-top: 1px solid #dce5e7; padding-top: 15px; }
.siren-detail-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.siren-pattern-summary-list, .siren-history-summary-list { display: grid; gap: 8px; margin-bottom: 16px; }
.siren-pattern-summary-list > div, .siren-history-summary-list > div { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(220px, 1.4fr) auto; gap: 12px; align-items: center; border: 1px solid #dce5e7; border-radius: 9px; padding: 10px 12px; }
.siren-pattern-summary-list small, .siren-history-summary-list small { color: #61717b; }
.siren-pattern-summary-list code { overflow-wrap: anywhere; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 22px; }
.pagination .button { margin: 0; text-decoration: none; }
.settings-panel { max-width: 760px; }
.settings-panel h2 { margin: 0; }
.settings-panel .lead { margin: 10px 0 0; font-size: 17px; }
.settings-form { max-width: 680px; }
.settings-fieldset { display: grid; gap: 10px; margin: 0; border: 1px solid #dbe3ec; border-radius: 14px; padding: 18px; }
.settings-fieldset legend { padding: 0 8px; color: #0f172a; font-size: 1.08rem; font-weight: 800; }
.settings-fieldset .lead { margin: 0 0 6px; font-size: .96rem; }
.settings-switch { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; border: 1px solid #cbd8dd; border-radius: 14px; padding: 15px; background: #fff; cursor: pointer; }
.settings-switch > input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.settings-switch-control { position: relative; display: grid; width: 82px; height: 42px; grid-template-columns: 1fr 1fr; align-items: center; border: 2px solid #b45353; border-radius: 999px; color: #fff; background: #b91c1c; box-shadow: inset 0 1px 3px rgb(15 23 42 / 24%); transition: border-color .18s ease, background .18s ease; }
.settings-switch-control > span:not(.settings-switch-thumb) { position: relative; z-index: 2; font-size: .68rem; font-weight: 950; letter-spacing: .04em; text-align: center; }
.settings-switch-on { visibility: hidden; }
.settings-switch-thumb { position: absolute; z-index: 3; top: 3px; left: 3px; width: 32px; height: 32px; border-radius: 50%; background: #fff; box-shadow: 0 2px 7px rgb(15 23 42 / 32%); transition: transform .18s ease; }
.settings-switch > input:checked + .settings-switch-control { border-color: #16803d; background: #15803d; }
.settings-switch > input:checked + .settings-switch-control .settings-switch-on { visibility: visible; }
.settings-switch > input:checked + .settings-switch-control .settings-switch-off { visibility: hidden; }
.settings-switch > input:checked + .settings-switch-control .settings-switch-thumb { transform: translateX(40px); }
.settings-switch > input:focus-visible + .settings-switch-control { outline: 4px solid rgb(18 105 93 / 24%); outline-offset: 3px; }
.settings-switch-copy, .settings-switch-copy strong, .settings-switch-copy small { display: block; }
.settings-switch-copy small { margin-top: 4px; color: #52666f; line-height: 1.45; }
.settings-duration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.settings-duration-grid label { display: grid; gap: 6px; align-content: start; }
.busy-behavior-options { display: grid; gap: 12px; }
.busy-behavior-options > label { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid #cbd8dd; border-radius: 12px; background: #fff; cursor: pointer; }
.busy-behavior-options input { flex: 0 0 auto; width: auto; margin-top: 4px; }
.busy-behavior-options span, .busy-behavior-options strong, .busy-behavior-options small { display: block; }
.busy-behavior-options small { margin-top: 4px; }

@media (max-width: 900px) {
    .page-heading, .panel-heading { flex-direction: column; }
    .metrics { grid-template-columns: repeat(2, 1fr); }
    .operator-grid, .single-operation-layout, .management-layout { grid-template-columns: 1fr; }
    .admin-grid { grid-template-columns: 1fr 1fr; }
    .compact-metrics { grid-template-columns: repeat(2, 1fr); }
    .form-panel { position: static; }
    .main-nav { flex-wrap: wrap; }
    .history-filter-grid { grid-template-columns: repeat(2, 1fr); }
    .gateway-access-transfer { grid-template-columns: 1fr; }
    .gateway-access-controls { flex-direction: row; }
    .gateway-access-controls .button { flex: 1; }
    .siren-response-rule-row { grid-template-columns: 1fr; align-items: stretch; }
    .siren-response-rule-actions { justify-content: flex-end; }
    .siren-registry-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .siren-compact-header { display: none; }
    .siren-compact-item { grid-template-columns: minmax(0, 1fr) auto; }
    .siren-compact-response { grid-column: 1 / -1; }
    .siren-compact-gateways { justify-items: start; text-align: left; }
}

@media (max-width: 520px) {
    .topbar { align-items: flex-start; }
    .topbar-user { align-items: flex-end; flex-direction: column; }
    .field-row { grid-template-columns: 1fr; }
    .admin-grid { grid-template-columns: 1fr; }
    .topbar { align-items: stretch; flex-direction: column; }
    .topbar-user { align-items: stretch; flex-direction: row; justify-content: space-between; }
    .nav-menu-content { position: fixed; top: auto; right: 16px; left: 16px; }
    .external-transmission-indicator { align-items: flex-start; flex-direction: column; }
    .siren-map-dialog { width: calc(100% - 16px); max-height: calc(100vh - 16px); }
    .siren-map-dialog-card { gap: 12px; padding: 16px; }
    .siren-map-dialog .siren-location-map { min-height: 46vh; }
    .siren-map-dialog-footer { align-items: stretch; flex-direction: column; }
    .siren-map-dialog-footer .button { width: 100%; }
    .siren-edit-dialog { width: calc(100% - 16px); max-height: calc(100vh - 16px); }
    .siren-edit-dialog-card { padding: 16px; }
    .siren-edit-grid { grid-template-columns: 1fr; }
    .response-pattern-legend dl div { grid-template-columns: 1fr; gap: 3px; }
    .gateway-form-section { padding: 14px; }
    .gateway-access-summary { align-items: flex-start; flex-direction: column; gap: 4px; }
    .gateway-access-column select { min-height: 200px; }
    .gateway-county-list { min-height: 190px; }
    .gateway-access-controls { flex-direction: column; }
    .gateway-actions-summary, .gateway-actions { grid-template-columns: 1fr; }
    .dialog-actions { align-items: stretch; flex-direction: column-reverse; }
    .dialog-actions .button { width: 100%; margin: 0; }
    .history-filter-grid { grid-template-columns: 1fr; }
    .settings-duration-grid { grid-template-columns: 1fr; }
    .siren-registry-toolbar { position: static; }
    .siren-registry-filters, .siren-detail-grid { grid-template-columns: 1fr; }
    .siren-compact-item { grid-template-columns: 1fr; }
    .siren-compact-response { grid-column: auto; }
    .siren-compact-gateways { display: flex; align-items: baseline; gap: 6px; }
    .siren-compact-item > .button { width: 100%; }
    .siren-pattern-summary-list > div, .siren-history-summary-list > div { grid-template-columns: 1fr; gap: 4px; }
}
.hold-instruction { margin: 0 0 18px; color: #475569; font-weight: 650; }
.operation-view-switch { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; border-bottom: 1px solid #d7e2e5; padding-bottom: 14px; }
.operation-view-switch .button { margin: 0; }
.operation-view-switch .button.active { border-color: #12695d; color: #fff; background: #12695d; }
.alarm-map-panel { display: grid; gap: 14px; }
.alarm-map-panel[hidden] { display: none; }
.alarm-map-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.alarm-map-toolbar h3 { margin: 2px 0 5px; color: #173b49; font-size: 1.22rem; }
.alarm-map-toolbar p:last-child { max-width: 760px; margin: 0; color: #52666f; line-height: 1.45; }
.alarm-map-toolbar label { display: grid; flex: 0 0 min(280px, 40%); gap: 6px; color: #40545e; font-weight: 850; }
.alarm-map-toolbar select { width: 100%; min-width: 0; }
.alarm-map-status { margin: 0; border-left: 4px solid #12695d; border-radius: 8px; padding: 9px 12px; color: #294f5a; background: #edf6f3; font-weight: 750; }
.alarm-selection-map { position: relative; z-index: 1; min-height: min(62vh, 650px); border: 2px solid #9cb4bd; border-radius: 14px; background: #dfe8eb; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 65%); }
.alarm-map-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; border: 1px solid #d7e2e5; border-radius: 10px; padding: 10px 12px; background: #f8fbfb; }
.alarm-map-legend span { display: inline-flex; align-items: center; gap: 7px; color: #40545e; font-size: .82rem; font-weight: 750; }
.alarm-map-legend-icon { display: inline-block; width: 15px; height: 15px; border: 2px solid #fff; border-radius: 50%; background: #2563eb; box-shadow: 0 0 0 1px #879ba4; }
.alarm-map-legend-icon.is-unavailable { background: #94a3b8; }
.alarm-map-legend-icon.is-osp { background: #dc2626; }
.alarm-map-legend-icon.is-ol-alarm { background: #d97706; }
.alarm-map-legend-icon.is-ol-cancel { background: #16a34a; }
.alarm-map-legend-icon.is-test { background: #d97706; }
.alarm-map-legend-icon.is-pending { background: #64748b; }
.alarm-map-legend-icon.is-selected { background: #7c3aed; box-shadow: 0 0 0 3px #fde047; }
.alarm-map-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.alarm-map-actions strong { margin-right: auto; color: #173b49; font-size: 1.05rem; }
.alarm-map-actions .button { margin: 0; }
.ol-panel [data-alarm-map-submit][data-operation-type="OL_ALARM"] { background: #b45309; }
.ol-panel [data-alarm-map-submit][data-operation-type="OL_CANCEL"] { background: #15803d; }
.alarm-map-note { color: #61717b; line-height: 1.45; }
.alarm-map-marker-host { border: 0 !important; background: transparent !important; }
.alarm-map-siren-marker { position: relative; display: grid; width: 42px; height: 42px; place-items: center; border: 3px solid #fff; border-radius: 50%; color: #fff; background: #2563eb; box-shadow: 0 4px 12px rgb(15 23 42 / 38%); }
.alarm-map-siren-marker svg { position: relative; z-index: 2; width: 25px; height: 25px; }
.alarm-map-siren-marker.is-selected { background: #7c3aed; box-shadow: 0 0 0 5px #fde047, 0 5px 14px rgb(15 23 42 / 42%); transform: scale(1.08); }
.alarm-map-siren-marker.is-unavailable { color: #e2e8f0; background: #64748b; opacity: .8; }
.alarm-map-siren-marker.is-pending { background: #64748b; }
.alarm-map-siren-marker.is-osp { background: #dc2626; }
.alarm-map-siren-marker.is-ol-alarm { background: #d97706; }
.alarm-map-siren-marker.is-ol-cancel { background: #16a34a; }
.alarm-map-siren-marker.is-test { background: #d97706; }
.alarm-map-siren-marker.is-osp::before, .alarm-map-siren-marker.is-ol-alarm::before, .alarm-map-siren-marker.is-ol-cancel::before, .alarm-map-siren-marker.is-test::before { content: ''; position: absolute; inset: -7px; border: 3px solid currentColor; border-radius: 50%; opacity: .75; animation: alarm-map-pulse 1.25s ease-out infinite; }
.alarm-map-siren-marker.is-osp::before { color: #dc2626; }
.alarm-map-siren-marker.is-ol-alarm::before { color: #d97706; }
.alarm-map-siren-marker.is-ol-cancel::before { color: #16a34a; }
.alarm-map-siren-marker.is-test::before { color: #d97706; }
.alarm-map-popup { display: grid; gap: 5px; min-width: 210px; }
.alarm-map-popup span, .alarm-map-popup small { color: #52666f; }
.alarm-map-popup-status { border-radius: 7px; padding: 5px 7px; color: #1e3a8a; background: #dbeafe; }
.alarm-map-popup-status.is-selected { color: #5b21b6; background: #ede9fe; }
.alarm-map-popup-status.is-unavailable { color: #475569; background: #e2e8f0; }
.alarm-map-popup-status.is-pending { color: #334155; background: #e2e8f0; }
.alarm-map-popup-status.is-osp { color: #991b1b; background: #fee2e2; }
.alarm-map-popup-status.is-ol-alarm { color: #92400e; background: #fef3c7; }
.alarm-map-popup-status.is-ol-cancel { color: #166534; background: #dcfce7; }
.alarm-map-popup-status.is-test { color: #92400e; background: #fef3c7; }
.leaflet-tooltip.alarm-map-tooltip-shell { max-width: min(420px, calc(100vw - 32px)); border: 1px solid rgb(255 255 255 / 28%); border-radius: 10px; padding: 0; color: #f8fafc; background: #172c36; box-shadow: 0 10px 28px rgb(15 23 42 / 32%); white-space: normal; }
.leaflet-tooltip-top.alarm-map-tooltip-shell::before { border-top-color: #172c36; }
.alarm-map-hover-tooltip { display: grid; min-width: 210px; max-width: 390px; gap: 5px; padding: 10px 12px; font-size: .78rem; line-height: 1.35; overflow-wrap: anywhere; }
.alarm-map-tooltip-name { font-size: .88rem; }
.alarm-map-tooltip-status { color: #cbd5e1; }
.alarm-map-tooltip-response-label { margin-top: 4px; padding-top: 7px; border-top: 1px solid rgb(255 255 255 / 22%); }
.alarm-map-tooltip-response-meaning { font-weight: 750; }
@keyframes alarm-map-pulse { from { opacity: .8; transform: scale(.88); } to { opacity: 0; transform: scale(1.35); } }
.alarm-button-grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px; }
.alarm-hold-button { --hold-duration: 1000ms; position: relative; display: inline-grid; width: fit-content; max-width: 100%; overflow: visible; border: 0; border-radius: 14px; padding: 15px 18px; color: #fff; background: #b91c1c; box-shadow: 0 8px 20px rgb(15 23 42 / 14%); cursor: pointer; text-align: center; touch-action: none; user-select: none; }
.alarm-hold-button strong, .alarm-hold-button small { position: relative; z-index: 2; display: block; }
.alarm-hold-button strong { font-size: 1.08rem; line-height: 1.25; }
.alarm-hold-button small { margin-top: 8px; color: rgb(255 255 255 / 86%); font-weight: 650; }
.alarm-hold-button .alarm-last-status { padding-top: 8px; border-top: 1px solid rgb(255 255 255 / 32%); color: #fff; font-size: .78rem; font-weight: 700; }
.alarm-hold-button .osp-readiness-summary-line { padding-top: 8px; border-top: 1px solid rgb(255 255 255 / 32%); color: #fff; font-size: .78rem; font-weight: 800; }
.alarm-status-summary, .alarm-signal-countdown { display: block; }
.alarm-latest-status-content { display: block; }
.alarm-siren-response { display: inline-flex; align-items: center; justify-content: center; margin-top: 6px; color: #fff; }
.alarm-hold-button > .alarm-siren-response { position: absolute; z-index: 5; top: 7px; left: 7px; width: 34px; height: 34px; margin: 0; border: 2px solid rgb(255 255 255 / 78%); border-radius: 999px; color: #172c36; background: #fff; box-shadow: 0 2px 7px rgb(15 23 42 / 24%); }
.alarm-hold-button > .alarm-siren-response .alarm-response-envelope { width: 1.25rem; height: 1.25rem; }
.alarm-response-envelope { display: inline-flex; width: 1.45rem; height: 1.45rem; }
.alarm-response-envelope svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.alarm-response-tooltip { position: absolute !important; z-index: 30 !important; bottom: calc(100% + 10px); left: 50%; display: grid !important; width: max-content; max-width: min(420px, calc(100vw - 32px)); visibility: hidden; gap: 5px; opacity: 0; border: 1px solid rgb(255 255 255 / 28%); border-radius: 10px; padding: 10px 12px; color: #f8fafc !important; background: #172c36; box-shadow: 0 10px 28px rgb(15 23 42 / 32%); font-size: .78rem; line-height: 1.35; text-align: left; white-space: normal; overflow-wrap: anywhere; pointer-events: none; transform: translate(-50%, 4px); transition: opacity .12s ease, transform .12s ease, visibility .12s; }
.alarm-hold-button:hover .alarm-response-tooltip, .alarm-hold-button:focus-visible .alarm-response-tooltip, .test-latest-status:hover .alarm-response-tooltip, .test-latest-status:focus-within .alarm-response-tooltip { visibility: visible; opacity: 1; transform: translate(-50%, 0); }
.alarm-response-tooltip-title { font-weight: 900; }
.alarm-response-tooltip-code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.alarm-response-tooltip-meta { color: #cbd5e1; font-size: .72rem; }
.osp-readiness-tooltip { position: absolute; z-index: 31; top: calc(100% + 10px); left: 50%; display: grid; width: max-content; max-width: min(430px, calc(100vw - 32px)); visibility: hidden; gap: 7px; opacity: 0; border: 2px solid #0f172a; border-radius: 10px; padding: 10px 12px; color: #0f172a !important; background: #fff !important; box-shadow: 0 14px 34px rgb(15 23 42 / 55%); font-size: .78rem; line-height: 1.35; text-align: left; white-space: normal; overflow-wrap: anywhere; pointer-events: none; transform: translate(-50%, -4px); transition: opacity .12s ease, transform .12s ease, visibility .12s; }
.alarm-hold-button:hover .osp-readiness-tooltip, .alarm-hold-button:focus-visible .osp-readiness-tooltip { visibility: visible; opacity: 1; transform: translate(-50%, 0); }
.osp-readiness-tooltip > strong { color: #0f172a !important; padding-bottom: 4px; border-bottom: 1px solid #64748b; }
.osp-readiness-tooltip-row { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 10px; align-items: baseline; }
.osp-readiness-tooltip-row small { margin: 0; color: #1e293b !important; font-size: .72rem; }
.osp-readiness-tooltip-row.readiness-ready b { color: #14532d !important; }
.osp-readiness-tooltip-row.readiness-no_response b { color: #713f12 !important; }
.osp-readiness-tooltip-row.readiness-withdrawn b { color: #881337 !important; }
.alarm-status-value { white-space: nowrap; }
.alarm-status-delivered { display: inline-block; border-radius: 999px; padding: 2px 7px; color: #166534; background: #f0fdf4; font-weight: 850; }
.alarm-current-availability { display: block; margin-bottom: 6px; font-weight: 800; }
.alarm-status-available { display: inline-block; border-radius: 999px; padding: 2px 7px; color: #166534; background: #dcfce7; font-weight: 900; }
.alarm-status-partial { display: inline-block; border-radius: 999px; padding: 2px 7px; color: #78350f; background: #fef3c7; font-weight: 900; }
.alarm-status-busy { display: inline-block; border-radius: 999px; padding: 2px 7px; color: #991b1b; background: #fee2e2; font-weight: 900; }
.alarm-signal-countdown { margin-top: 7px; border-radius: 8px; padding: 6px 9px; color: #422006; background: #fde68a; font-size: .9rem; font-variant-numeric: tabular-nums; font-weight: 850; }
.alarm-siren-icon { display: inline-flex; width: 1.2em; height: 1.2em; margin-right: 3px; color: #b45309; vertical-align: -.2em; }
.alarm-siren-icon svg { display: block; width: 100%; height: 100%; }
.alarm-siren-icon-osp { color: #dc2626; }
.alarm-siren-icon-ol-alarm { color: #d97706; }
.alarm-siren-icon-ol-cancel { color: #16a34a; }
.alarm-busy-indicator { position: absolute; z-index: 3; top: 7px; right: 7px; display: inline-flex; gap: 2px; border: 2px solid rgb(255 255 255 / 78%); border-radius: 999px; padding: 4px 3px 3px 5px; background: #fff; box-shadow: 0 2px 7px rgb(15 23 42 / 24%); }
.alarm-busy-indicator[role="button"], .alarm-osp-active-indicator[role="button"] { cursor: pointer; }
.alarm-busy-indicator[role="button"]:focus-visible, .alarm-osp-active-indicator[role="button"]:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.alarm-busy-indicator .alarm-siren-icon { width: 1.35rem; height: 1.35rem; margin: 0; }
.alarm-busy-count { min-width: 1.25em; padding: 0 4px 0 2px; color: #991b1b; font-size: .82rem; line-height: 1.35rem; font-variant-numeric: tabular-nums; font-weight: 950; text-align: center; }
.alarm-participants-indicator { position: absolute; z-index: 4; top: 7px; right: 7px; display: inline-flex; align-items: center; gap: 2px; border: 2px solid rgb(255 255 255 / 78%); border-radius: 999px; padding: 4px 7px 3px 6px; color: #14532d; background: #fff; box-shadow: 0 2px 7px rgb(15 23 42 / 24%); cursor: help; }
.alarm-participants-indicator .alarm-phone-icon { width: 1.35rem; height: 1.35rem; margin: 0; color: #15803d; font-size: 1.05rem; line-height: 1.35rem; }
.alarm-participants-count { min-width: 1.1em; color: #14532d; font-size: .82rem; line-height: 1.35rem; font-variant-numeric: tabular-nums; font-weight: 950; text-align: center; }
.alarm-participants-tooltip { position: absolute; z-index: 32; top: calc(100% + 9px); right: 0; display: grid; width: max-content; max-width: min(360px, calc(100vw - 32px)); visibility: hidden; gap: 4px; opacity: 0; border: 1px solid rgb(255 255 255 / 28%); border-radius: 10px; padding: 10px 12px; color: #f8fafc; background: #172c36; box-shadow: 0 10px 28px rgb(15 23 42 / 32%); font-size: .78rem; line-height: 1.35; text-align: left; white-space: normal; pointer-events: none; transform: translateY(-4px); transition: opacity .12s ease, transform .12s ease, visibility .12s; }
.alarm-participants-tooltip strong { margin-bottom: 2px; }
.alarm-participants-indicator:hover .alarm-participants-tooltip { visibility: visible; opacity: 1; transform: translateY(0); }
.alarm-hold-button.has-participants-indicator .alarm-busy-indicator { right: auto; left: 7px; }
.alarm-hold-button.has-response-tooltip.has-participants-indicator .alarm-busy-indicator { top: 47px; }
.alarm-osp-active-indicator { position: absolute; z-index: 4; top: 7px; right: 7px; display: inline-grid; width: 36px; height: 36px; place-items: center; border: 2px solid rgb(255 255 255 / 78%); border-radius: 999px; color: #dc2626; background: #fff; box-shadow: 0 2px 7px rgb(15 23 42 / 24%); }
.alarm-osp-active-indicator .alarm-siren-icon { width: 1.45rem; height: 1.45rem; margin: 0; color: #dc2626; }
.alarm-signal-waiting { color: #92400e; }
.ol-live-summary { display: grid; gap: 14px; margin: 0 0 22px; padding: 18px 20px; border: 2px solid #86c99b; border-radius: 16px; background: #f0fdf4; box-shadow: 0 8px 24px rgb(20 83 45 / 8%); }
.ol-status-map-card { display: grid; gap: 14px; margin-top: 26px; }
.ol-status-map-heading { align-items: center; }
.ol-status-map-heading h2 { margin: 2px 0 5px; }
.ol-status-map-heading p:last-child { margin: 0; color: #52666f; }
.ol-status-map-counts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.ol-status-map-counts span { border-radius: 999px; padding: 8px 11px; font-size: .82rem; font-weight: 800; }
.ol-status-map-counts .is-alarm { color: #991b1b; background: #fee2e2; }
.ol-status-map-counts .is-clear { color: #166534; background: #dcfce7; }
.ol-status-map-filter { display: flex; align-items: end; gap: 12px; border: 1px solid #d7e2e5; border-radius: 12px; padding: 12px 14px; background: #f8fbfb; }
.ol-status-map-filter[hidden] { display: none; }
.ol-status-map-filter label { display: grid; flex: 1; max-width: 420px; gap: 6px; color: #40545e; font-weight: 850; }
.ol-status-map-filter select { width: 100%; }
.ol-status-overview-map { position: relative; z-index: 1; min-height: min(62vh, 680px); border: 2px solid #9cb4bd; border-radius: 14px; background: #dfe8eb; }
.ol-status-map-legend { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.ol-status-map-legend span { display: inline-flex; align-items: center; gap: 8px; color: #40545e; font-size: .84rem; font-weight: 750; }
.ol-status-map-legend i { width: 18px; height: 18px; border: 2px solid #fff; border-radius: 4px; box-shadow: 0 0 0 1px #879ba4; }
.ol-status-map-legend i.is-alarm { background: #dc2626; }
.ol-status-map-legend i.is-clear { background: #16a34a; }
.leaflet-tooltip.ol-status-map-tooltip-shell { border: 0; border-radius: 10px; padding: 0; color: #f8fafc; background: #172c36; box-shadow: 0 10px 28px rgb(15 23 42 / 32%); }
.leaflet-tooltip-top.ol-status-map-tooltip-shell::before { border-top-color: #172c36; }
.ol-status-map-tooltip { display: grid; min-width: 210px; gap: 4px; padding: 10px 12px; line-height: 1.35; }
.ol-status-map-tooltip span, .ol-status-map-tooltip small { color: #cbd5e1; }
.ol-status-map-tooltip .is-alarm { color: #fca5a5; }
.ol-status-map-tooltip .is-clear { color: #86efac; }
.ol-live-summary-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ol-live-summary-heading h2 { margin: 0; font-size: 1.2rem; }
.ol-live-summary-heading .eyebrow { margin-bottom: 3px; }
.ol-live-summary-content { display: grid; gap: 12px; }
.ol-live-summary-context { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px 14px; color: #334155; }
.ol-live-summary-context strong { color: #14532d; font-size: 1.08rem; }
.ol-live-summary-context time { color: #64748b; font-size: .9rem; }
.ol-live-summary-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ol-live-summary-metrics > div { display: grid; gap: 2px; padding: 14px; border-radius: 12px; background: #fff; }
.ol-live-summary-metrics span { color: #14532d; font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums; font-weight: 900; }
.ol-live-summary-metrics small { color: #475569; font-weight: 750; }
.ol-live-summary progress { width: 100%; height: 12px; accent-color: #15803d; }
.ol-live-summary-note { color: #52666f; line-height: 1.4; }
.ol-live-summary-excluded { color: #92400e; font-weight: 800; }
.test-latest-status { position: relative; margin: 12px 0; border: 1px solid #dbe3ec; border-radius: 12px; padding: 12px; color: #334155; background: #f8fafc; font-weight: 700; }
.test-latest-status .alarm-status-summary, .test-latest-status .alarm-signal-countdown { display: block; }
.alarm-hold-button::after { content: ''; position: absolute; z-index: 1; inset: auto 0 0; height: 7px; width: 0; background: #facc15; }
.alarm-hold-button.holding::after { animation: alarm-hold-progress var(--hold-duration) linear forwards; }
.alarm-hold-button:focus-visible { outline: 4px solid #facc15; outline-offset: 3px; }
.alarm-hold-button:disabled { opacity: .58; cursor: wait; }
@keyframes alarm-hold-progress { to { width: 100%; } }
.ol-county-list, .osp-county-list { display: grid; gap: 22px; }
.alarm-county-group { padding: 18px; border: 2px solid #cbd5e1; border-radius: 16px; background: #f8fafc; box-shadow: 0 6px 18px rgb(15 23 42 / 6%); }
.alarm-county-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.alarm-county-heading h3 { margin: 0; color: #0f3443; font-size: 1.2rem; }
.alarm-county-heading-actions { display: flex; align-items: center; gap: 8px; }
.alarm-county-toggle { min-width: 92px; padding: 8px 12px; }
.alarm-county-order-toggle { display: inline-grid; width: 42px; min-width: 42px; height: 40px; place-items: center; padding: 0; font-size: 1.25rem; }
.alarm-county-status-clear { display: inline-grid; width: 42px; min-width: 42px; height: 40px; place-items: center; padding: 0; color: #111; }
.alarm-county-action-icon { width: 22px; height: 22px; fill: none; stroke: #111; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.alarm-county-order-toggle[aria-pressed="true"] { border-color: #166534; color: #fff; background: #166534; }
.alarm-county-content { display: grid; gap: 14px; margin-top: 16px; }
.alarm-county-content[hidden] { display: none; }
.osp-order-item { position: relative; display: grid; align-self: flex-start; gap: 8px; border-radius: 16px; }
.osp-order-controls { display: none; grid-template-columns: 1fr auto auto; align-items: center; gap: 6px; }
.osp-order-drag { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; border: 1px dashed #78909c; border-radius: 8px; color: #244a59; background: #fff; cursor: grab; font-size: 1.25rem; font-weight: 900; letter-spacing: 2px; user-select: none; }
.osp-order-drag:active { cursor: grabbing; }
.osp-order-drag:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }
.osp-order-status { margin: 0; border-left: 4px solid #16803d; border-radius: 8px; padding: 9px 12px; color: #285444; background: #ecfdf3; font-weight: 750; }
.osp-order-status.result-error { border-left-color: #b91c1c; color: #991b1b; background: #fef2f2; }
.osp-county-card.is-order-editing { border-color: #16803d; background: #f0fdf4; }
.osp-county-card.is-order-editing .osp-order-controls { display: grid; }
.osp-county-card.is-order-editing .alarm-hold-button:disabled { opacity: .82; cursor: default; }
.osp-order-item.is-dragging { opacity: .45; }
.osp-order-item.is-drop-before::before, .osp-order-item.is-drop-after::after { content: ''; position: absolute; z-index: 20; top: -6px; right: 0; left: 0; height: 4px; border-radius: 999px; background: #15803d; }
.osp-order-item.is-drop-after::after { top: auto; bottom: -6px; }
.ol-count-legend { margin: 24px 0 12px; border-left: 4px solid #15803d; border-radius: 8px; padding: 11px 14px; color: #334155; background: #f0fdf4; }
.county-alarm-button { width: 100%; min-height: 110px; margin-bottom: 14px; background: #9a3412; text-align: center; }
.county-alarm-button strong { font-size: 1.22rem; }
.municipality-alarm-button { background: #c2410c; }
[data-ol-counties][data-operation-type="OL_CANCEL"] .county-alarm-button { background: #166534; }
[data-ol-counties][data-operation-type="OL_CANCEL"] .municipality-alarm-button { background: #15803d; }
@media (max-width: 640px) {
    .alarm-button-grid { gap: 10px; }
    .alarm-map-toolbar { align-items: stretch; flex-direction: column; }
    .alarm-map-toolbar label { flex-basis: auto; width: 100%; }
    .alarm-selection-map { min-height: 58vh; }
    .alarm-map-actions { align-items: stretch; flex-direction: column; }
    .alarm-map-actions strong { margin: 0; text-align: center; }
    .alarm-map-actions .button { width: 100%; }
    .ol-status-map-heading { align-items: stretch; flex-direction: column; }
    .ol-status-map-counts { justify-content: flex-start; }
    .ol-status-map-filter label { max-width: none; }
    .ol-status-overview-map { min-height: 52vh; }
    .alarm-county-heading { align-items: flex-start; }
    .alarm-county-heading-actions { flex-shrink: 0; }
    .osp-order-item { width: 100%; }
    .osp-order-item .alarm-hold-button { width: 100%; }
    .ol-live-summary-heading { align-items: flex-start; flex-direction: column; }
    .ol-live-summary-metrics { grid-template-columns: 1fr; }
}
.command-configuration-cell { display: grid; gap: 5px; min-width: 145px; }
.command-configuration-cell code { white-space: pre-wrap; overflow-wrap: anywhere; }
.command-configuration-cell small { color: #64748b; }

.update-heading { align-items: center; }
.update-primary-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.update-primary-actions form { margin: 0; }
.update-primary-actions .button { min-height: 46px; margin: 0; padding-inline: 20px; }
.update-status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.update-status-grid article { display: grid; gap: 5px; border: 1px solid #d4e1e4; border-radius: 14px; padding: 16px; background: #fff; box-shadow: 0 6px 18px rgb(15 35 45 / 5%); }
.update-status-grid small { color: #60747c; font-size: .76rem; font-weight: 900; letter-spacing: .045em; text-transform: uppercase; }
.update-status-grid strong { color: #183e4d; font-size: 1.1rem; overflow-wrap: anywhere; }
.update-result-card { margin-top: 0; }
.update-result-card .panel-heading > code { border-radius: 8px; padding: 7px 10px; color: #31515a; background: #e8f0f2; font-weight: 800; }
.update-available { display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 2px solid #0f766e; border-radius: 13px; padding: 15px 17px; color: #134e4a; background: #ecfdf5; }
.update-available strong { font-size: 1.08rem; }
.release-list { display: grid; gap: 14px; }
.release-entry { border: 1px solid #d5e1e4; border-radius: 13px; padding: 16px 18px; background: #f8fbfb; }
.release-entry header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.release-entry header strong { color: #12695d; font-size: 1.02rem; }
.release-entry time { color: #64748b; font-size: .88rem; font-weight: 700; }
.release-entry h3 { margin: 8px 0 9px; color: #20343d; font-size: 1rem; }
.release-entry ul { display: grid; gap: 5px; margin: 0; padding-left: 21px; color: #40545e; line-height: 1.45; }
.update-worker-log { min-height: 260px; max-height: 460px; margin: 14px 0 0; overflow: auto; border: 1px solid #244b58; border-radius: 12px; padding: 16px; color: #d7f7ec; background: #102f38; font: 13px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.update-history { display: grid; gap: 9px; }
.update-history article { display: grid; gap: 4px; border-bottom: 1px solid #e0e8ea; padding: 10px 2px 13px; }
.update-history article:last-child { border-bottom: 0; }
.update-history small { color: #64748b; }

@media (max-width: 760px) {
    .update-primary-actions { width: 100%; justify-content: stretch; }
    .update-primary-actions form, .update-primary-actions .button { width: 100%; }
    .update-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .update-available, .release-entry header { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 480px) {
    .update-status-grid { grid-template-columns: 1fr; }
}
.unit-firefighters-layout {
    display: grid;
    gap: 1.25rem;
}

.unit-firefighter-form {
    padding: 1rem;
    border: 1px solid var(--border, #d9e1e3);
    border-radius: .8rem;
    background: #f7faf9;
}

.unit-overview { display: grid; min-width: 190px; gap: 4px; }
.unit-overview strong { color: #20343d; }
.unit-overview span { color: #344b55; font-size: .86rem; line-height: 1.35; }
.unit-overview small { color: #64748b; font-size: .76rem; line-height: 1.35; }
.unit-alert-overview { min-width: 280px; }
.unit-details { margin-top: 4px; }
.unit-details table { width: 100%; }
.unit-details th:first-child { width: 34%; }

.readiness-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.readiness-card { display: grid; gap: 4px; padding: 14px; border: 1px solid #cad5da; border-radius: 12px; background: #f7fafb; }
.readiness-card strong { font-size: 16px; }
.readiness-card span { color: #4b5b63; font-size: 13px; }
.readiness-ready { border-color: #86c89a; background: #eefaf1; }
.readiness-withdrawn { border-color: #e4a0a0; background: #fff3f3; }
@media (max-width: 760px) { .readiness-summary { grid-template-columns: 1fr; } }

.alarm-hold-button.is-waiting-responders {
    box-shadow: inset 0 0 0 3px #f5c451;
}

.alarm-phone-icon {
    font-size: 1.15rem;
    line-height: 1;
}

.unit-history-list { display: grid; gap: 1rem; }
.unit-history-card { overflow: hidden; border: 1px solid var(--border, #d9e1e3); border-radius: .8rem; background: #fff; }
.unit-history-heading { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: 1rem; cursor: pointer; list-style: none; background: #f7faf9; }
.unit-history-heading::-webkit-details-marker { display: none; }
.unit-history-heading::before { content: '▸'; color: #52646c; font-size: 1.1rem; transition: transform .15s ease; }
.unit-history-card[open] .unit-history-heading::before { transform: rotate(90deg); }
.unit-history-heading strong { flex: 1; color: #20343d; }
.unit-history-content { display: grid; gap: .65rem; border-top: 1px solid #e1e8ea; padding: 1rem; }
.unit-history-content p { margin: 0; }
.history-status { display: inline-flex; width: fit-content; align-items: center; gap: .35rem; border: 1px solid transparent; border-radius: 999px; padding: .3rem .65rem; font-size: .78rem; font-weight: 750; line-height: 1.15; white-space: nowrap; }
.history-status-success { border-color: #86c89a; color: #11612c; background: #eaf8ee; }
.history-status-danger { border-color: #efa1a5; color: #9f1820; background: #fff0f1; }
.history-status-waiting { border-color: #e6bf66; color: #795315; background: #fff8df; }
.history-status-info { border-color: #83b7dd; color: #15547f; background: #edf7ff; }
.history-status-neutral { border-color: #bdc9ce; color: #465961; background: #f3f6f7; }
.location-map-button { display: inline-grid; width: 2.35rem; height: 2.35rem; place-items: center; border: 1px solid #8cb8d7; border-radius: 50%; color: #164f76; background: #edf7ff; cursor: pointer; font-size: 1.1rem; }
.location-map-button:hover, .location-map-button:focus-visible { border-color: #246d9e; background: #d9efff; }
.event-location-map { min-height: min(58vh, 520px); }
@media (max-width: 760px) { .unit-history-heading { align-items: flex-start; flex-wrap: wrap; } .history-status { white-space: normal; } }

/* Spójny układ telefonu: nawigacja, formularze, modale i listy danych. */
@media (max-width: 760px) {
    html { overflow-x: hidden; }
    body { min-width: 0; overflow-x: hidden; }
    input, select, textarea { min-width: 0; font-size: 16px !important; }
    .button, .main-nav a, .nav-menu > summary, .module-tabs a { min-height: 44px; }

    .topbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        padding: 12px max(12px, env(safe-area-inset-right)) 12px max(12px, env(safe-area-inset-left));
    }
    .main-nav {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .main-nav > .brand {
        display: flex;
        grid-column: 1 / -1;
        min-height: 36px;
        align-items: center;
        font-size: 1.12rem;
    }
    .main-nav > a:not(.brand), .nav-menu > summary {
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(255, 255, 255, .18);
        border-radius: 9px;
        padding: 9px 10px;
        text-align: center;
    }
    .main-nav > a.active, .main-nav > a[aria-current="page"], .nav-menu.active > summary {
        border-color: #7dd3c7;
        box-shadow: inset 0 -3px 0 #7dd3c7;
    }
    .main-nav > .nav-ol-button { padding: 9px 10px; }
    .nav-menu { min-width: 0; }
    .nav-menu > summary { width: 100%; }
    .nav-menu-content {
        position: fixed;
        z-index: 1000;
        top: auto;
        right: max(8px, env(safe-area-inset-right));
        bottom: max(8px, env(safe-area-inset-bottom));
        left: max(8px, env(safe-area-inset-left));
        max-height: min(72vh, 620px);
        max-height: min(72dvh, 620px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    .nav-menu-content a { display: flex; align-items: center; white-space: normal; }
    .topbar-user {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .topbar-user > span {
        grid-column: 1 / -1;
        overflow: hidden;
        color: #d7e7eb;
        font-size: .88rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .topbar-user form, .topbar-user .button { width: 100%; }
    .external-transmission-indicator {
        gap: 5px;
        padding: 10px max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left));
        font-size: .75rem;
        line-height: 1.4;
    }

    .landing-shell { padding: 12px; }
    .landing-card { padding: 26px 20px; border-radius: 20px; }
    .app-shell {
        width: 100%;
        padding: 22px max(10px, env(safe-area-inset-right)) max(54px, calc(32px + env(safe-area-inset-bottom))) max(10px, env(safe-area-inset-left));
    }
    h1, .page-heading h1 { font-size: clamp(2rem, 10vw, 2.65rem); line-height: 1.04; overflow-wrap: anywhere; }
    .lead { margin-top: 12px; font-size: 1rem; line-height: 1.5; }
    .page-heading { gap: 12px; margin-bottom: 20px; }
    .page-heading, .panel-heading { min-width: 0; }
    .page-heading > *, .panel-heading > * { max-width: 100%; min-width: 0; }
    .breadcrumbs { flex-wrap: wrap; margin-bottom: 18px; }
    .ol-navigation { align-items: stretch; flex-direction: column; }
    .ol-navigation .button { width: 100%; }

    .operation-panel, .analysis-card, .operations-card { padding: 16px; border-radius: 14px; }
    .operation-panel { gap: 14px; }
    .analysis-card, .operations-card, .full-width-list { margin-top: 14px; }
    .metrics { gap: 8px; margin-bottom: 16px; }
    .metrics article { min-width: 0; padding: 13px; }
    .metrics strong { margin-top: 3px; font-size: 1.55rem; }
    .metrics span { font-size: .72rem; overflow-wrap: anywhere; }
    .compact-metrics { margin: 14px 0; }
    .panel-heading { gap: 12px; }
    .panel-heading-actions { width: 100%; justify-content: stretch; }
    .panel-heading-actions .button { flex: 1 1 180px; }
    .record-count { flex: 0 0 auto; }

    .module-tabs {
        margin: -4px -10px 20px;
        padding: 0 10px 10px;
        scroll-padding-inline: 10px;
        scroll-snap-type: x proximity;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }
    .module-tabs a { display: inline-flex; flex: 0 0 auto; align-items: center; scroll-snap-align: start; }
    .form-stack { gap: 9px; }
    .form-stack input, .form-stack select, .form-stack textarea,
    .history-filter-grid input, .history-filter-grid select,
    .operation-panel select, .coordinate-fields input { min-height: 46px; }
    .field-row, .address-street-row, .siren-edit-grid, .history-filter-grid,
    .settings-duration-grid, .admin-grid, .admin-grid-two { grid-template-columns: minmax(0, 1fr); }
    .check-row { align-items: stretch; flex-direction: column; gap: 8px; }
    .check-row label, .busy-behavior-options > label { min-height: 44px; }
    .check-row input, .busy-behavior-options input { width: 20px; height: 20px; }
    .history-filter-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .history-filter-actions .button { width: 100%; }
    .inline-actions { flex-wrap: wrap; align-items: stretch; }
    .inline-actions .button, .inline-actions select { flex: 1 1 125px; min-height: 44px; }
    .pagination, .siren-pagination { flex-wrap: wrap; gap: 8px; }
    .pagination .button, .siren-pagination .button { flex: 1 1 125px; }

    .table-wrap { overflow: visible; }
    .responsive-table { display: block; width: 100%; }
    .responsive-table > thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }
    .responsive-table > tbody { display: grid; gap: 12px; width: 100%; }
    .responsive-table > tbody > tr {
        display: block;
        min-width: 0;
        overflow: hidden;
        border: 1px solid #d4e0e4;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 3px 12px rgba(15, 35, 45, .05);
    }
    .responsive-table > tbody > tr > td {
        display: grid;
        min-width: 0;
        grid-template-columns: minmax(98px, 36%) minmax(0, 1fr);
        gap: 10px;
        align-items: start;
        border-bottom: 1px solid #e3eaed;
        padding: 10px 11px;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .responsive-table > tbody > tr > td:last-child { border-bottom: 0; }
    .responsive-table > tbody > tr > td::before {
        content: attr(data-label);
        color: #60717b;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .035em;
        line-height: 1.35;
        text-transform: uppercase;
    }
    .responsive-table .inline-actions { min-width: 0; }
    .history-attempts, .siren-response, .device-summary, .unit-overview,
    .unit-alert-overview, .tag-list, .gateway-network, .command-configuration-cell { min-width: 0; }

    .confirm-dialog, .siren-map-dialog, .siren-edit-dialog, .enrollment-dialog {
        width: 100%;
        max-width: none;
        max-height: 100vh;
        max-height: 100dvh;
        margin: auto 0 0;
        border-radius: 18px 18px 0 0;
    }
    .confirm-dialog { padding: 20px 16px max(20px, env(safe-area-inset-bottom)); }
    .siren-map-dialog-card, .siren-edit-dialog-card, .enrollment-dialog-card {
        gap: 14px;
        padding: 18px 14px max(20px, env(safe-area-inset-bottom));
    }
    .siren-map-dialog-header { gap: 10px; }
    .siren-map-dialog-header h2, .panel-heading h2 { overflow-wrap: anywhere; }
    .siren-map-dialog-close, .dialog-close { flex: 0 0 44px; width: 44px; height: 44px; }
    .dialog-actions { display: flex; align-items: stretch; flex-direction: column-reverse; gap: 8px; }
    .dialog-actions .button, .dialog-actions a.button { width: 100%; margin: 0; }
    .enrollment-qr { margin: 10px 0; padding: 8px; }
    .enrollment-qr img { width: min(100%, 300px); }

    .operation-view-switch { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .operation-view-switch .button { width: 100%; }
    .alarm-selection-map, .ol-status-overview-map { min-height: 48vh; min-height: 48dvh; }
    .siren-location-map, .event-location-map { min-height: 45vh; min-height: 45dvh; }
    .alarm-map-legend { display: grid; grid-template-columns: minmax(0, 1fr); }
    .alarm-county-group { padding: 13px; }
    .alarm-county-heading { gap: 10px; }
    .alarm-county-heading h3 { font-size: 1.02rem; overflow-wrap: anywhere; }
    .alarm-county-toggle { min-width: 0; }
    .alarm-button-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
    .alarm-hold-button, .county-alarm-button { width: 100%; }
    .alarm-response-tooltip, .osp-readiness-tooltip { max-width: calc(100vw - 24px); }
    .osp-readiness-tooltip-row { grid-template-columns: 1fr; gap: 2px; }
    .ol-live-summary { padding: 15px; }
    .ol-status-map-filter { align-items: stretch; flex-direction: column; }

    .siren-registry-toolbar { position: static; margin-inline: 0; padding-top: 0; }
    .siren-view-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .siren-view-switch .button { width: 100%; }
    .siren-compact-identity span, .siren-compact-identity small,
    .siren-compact-response small, .siren-compact-response time,
    .siren-compact-response strong { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
    .gateway-action-status .gateway-action-controls { grid-template-columns: minmax(0, 1fr); }
    .gateway-action-status .button { width: 100%; }
    .gateway-access-controls .button { width: 100%; }
    .gateway-access-column select { min-height: 180px; }
    .readiness-summary { gap: 8px; }
    .unit-history-heading { padding: 13px; }
    .unit-history-content { padding: 13px; }
    .settings-fieldset { padding: 14px; }
    .settings-switch { grid-template-columns: minmax(0, 1fr); }
    .status-list div { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media (max-width: 380px) {
    .metrics, .compact-metrics { grid-template-columns: minmax(0, 1fr); }
    .main-nav { grid-template-columns: minmax(0, 1fr); }
    .main-nav > .brand { grid-column: auto; }
    .topbar-user { grid-template-columns: minmax(0, 1fr); }
    .topbar-user > span { grid-column: auto; }
    .history-filter-actions, .siren-view-switch { grid-template-columns: minmax(0, 1fr); }
    .responsive-table > tbody > tr > td { grid-template-columns: minmax(82px, 34%) minmax(0, 1fr); gap: 8px; }
    .alarm-county-heading { align-items: stretch; flex-direction: column; }
    .alarm-county-heading-actions { width: 100%; }
    .alarm-county-heading-actions .button { flex: 1; }
}
