:root {
    color-scheme: dark;
    --bg: #07100e;
    --surface: #0d1816;
    --surface-2: #13211e;
    --surface-3: #192a26;
    --line: #243b35;
    --line-soft: rgba(183, 220, 207, .12);
    --text: #eef7f3;
    --muted: #91aaa1;
    --green: #41d698;
    --green-dark: #0d5f43;
    --yellow: #f3c754;
    --red: #ff4d5f;
    --red-dark: #7b1825;
    --blue: #75bdf8;
    --shadow: 0 20px 60px rgba(0, 0, 0, .32);
    --radius: 18px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* SOS entre compañeros y despacho de rutas */
.responder-peer-marker.sos-active { border-color:#fff; box-shadow:0 0 0 5px rgba(220,38,38,.55),0 0 24px rgba(220,38,38,.9); animation:peer-sos-pulse 1s ease-in-out infinite; }
.responder-peer-marker.sos-active>b { position:absolute; left:50%; bottom:-15px; transform:translateX(-50%); padding:2px 6px; border-radius:999px; background:#dc2626; color:#fff; font:800 9px/1.2 system-ui,sans-serif; letter-spacing:.08em; box-shadow:0 3px 10px rgba(0,0,0,.4); }
@keyframes peer-sos-pulse { 0%,100%{box-shadow:0 0 0 3px rgba(220,38,38,.42),0 0 16px rgba(220,38,38,.65)} 50%{box-shadow:0 0 0 9px rgba(220,38,38,.12),0 0 30px rgba(220,38,38,1)} }
.peer-popup-status.sos,.peer-sos-notice { color:#fff; background:#b91c1c; }
.peer-sos-notice { margin:10px 0; padding:9px 11px; border-radius:10px; font-weight:800; text-align:center; letter-spacing:.04em; }
.responder-peer-result.sos-active { border-color:#ef4444; box-shadow:inset 4px 0 #ef4444; }
.responder-peer-result.sos-active .responder-peer-result-copy>span { color:#fca5a5; font-weight:800; }
.responder-routes-panel { border-color:rgba(56,189,248,.34); }
.responder-route-assignment-list { display:grid; gap:12px; padding:0 18px 18px; }
.responder-route-assignment { display:grid; grid-template-columns:48px minmax(0,1fr) auto; gap:14px; align-items:center; padding:16px; border:1px solid color-mix(in srgb,var(--route-color) 48%,var(--border)); border-left:5px solid var(--route-color); border-radius:16px; background:color-mix(in srgb,var(--route-color) 8%,var(--panel)); }
.responder-route-assignment-icon { display:grid; place-items:center; width:48px; height:48px; border-radius:14px; color:var(--route-color); background:color-mix(in srgb,var(--route-color) 16%,transparent); }
.responder-route-assignment-icon svg { width:25px; height:25px; }
.responder-route-assignment-copy { min-width:0; display:grid; gap:4px; }
.responder-route-assignment-copy small { color:var(--route-color); font-weight:800; letter-spacing:.08em; }
.responder-route-assignment-copy strong { font-size:1rem; }
.responder-route-assignment-copy span,.responder-route-assignment-copy p { color:var(--muted); margin:0; }
.responder-route-assignment-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; justify-content:flex-end; }
.monitor-map-command-actions { display:flex; align-items:center; gap:8px; }
.monitor-route-dispatches { display:flex; align-items:center; gap:7px; min-height:38px; padding:7px 11px; border:1px solid var(--border); border-radius:12px; background:rgba(5,19,33,.9); color:var(--text); font-weight:750; }
.monitor-route-dispatches svg { width:18px; height:18px; color:#38bdf8; }
.monitor-route-dispatches b { min-width:21px; height:21px; display:grid; place-items:center; border-radius:999px; background:rgba(56,189,248,.16); color:#7dd3fc; }
.monitor-route-dispatches.has-pending { border-color:#f59e0b; }
.monitor-route-dispatches.has-pending b { background:#f59e0b; color:#08111d; }
.route-dispatch-form { gap:16px; }
.route-dispatch-destination { display:flex; align-items:center; gap:12px; padding:14px; border:1px solid rgba(56,189,248,.45); border-radius:14px; background:rgba(56,189,248,.08); }
.route-dispatch-destination>span { width:42px; height:42px; display:grid; place-items:center; border-radius:12px; color:#38bdf8; background:rgba(56,189,248,.14); }
.route-dispatch-destination div { display:grid; gap:3px; }
.route-dispatch-destination small { color:#7dd3fc; font-weight:800; letter-spacing:.08em; }
.route-dispatch-recipients { border:1px solid var(--border); border-radius:16px; overflow:hidden; }
.route-dispatch-recipients-heading { display:flex; justify-content:space-between; align-items:center; gap:15px; padding:13px 15px; background:rgba(255,255,255,.025); border-bottom:1px solid var(--border); }
.route-dispatch-recipients-heading>div { display:grid; gap:2px; }
.route-dispatch-recipients-heading span { color:var(--muted); font-size:.84rem; }
.route-dispatch-target-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; padding:12px 12px 0; background:rgba(5,19,33,.4); }
.route-dispatch-target-tabs button { min-width:0; min-height:48px; display:flex; align-items:center; justify-content:center; gap:8px; padding:10px; border:1px solid var(--border); border-radius:12px; background:rgba(255,255,255,.025); color:var(--muted); font-weight:800; }
.route-dispatch-target-tabs button svg { width:19px; height:19px; flex:0 0 auto; }
.route-dispatch-target-tabs button.active { border-color:#38bdf8; background:rgba(56,189,248,.13); color:#d8f2ff; box-shadow:inset 0 -3px #38bdf8; }
.route-dispatch-recipient-search { display:flex; align-items:center; gap:12px; padding:12px; border-bottom:1px solid var(--border); background:rgba(5,19,33,.4); }
.route-dispatch-recipient-search label { min-width:0; flex:1; display:flex; align-items:center; gap:9px; padding-left:12px; border:1px solid var(--border); border-radius:12px; background:var(--panel); color:#7dd3fc; }
.route-dispatch-recipient-search label:focus-within { border-color:#38bdf8; box-shadow:0 0 0 3px rgba(56,189,248,.12); }
.route-dispatch-recipient-search svg { width:19px; height:19px; flex:0 0 auto; }
.route-dispatch-recipient-search .input { min-width:0; border:0; box-shadow:none; background:transparent; padding-left:0; }
.route-dispatch-recipient-search>span { flex:0 0 auto; color:#7dd3fc; font-size:.82rem; font-weight:800; white-space:nowrap; }
#route-dispatch-recipient-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:12px; max-height:280px; overflow:auto; }
.route-recipient-card { display:grid; grid-template-columns:auto 42px minmax(0,1fr); gap:10px; align-items:center; padding:11px; border:1px solid var(--border); border-radius:13px; cursor:pointer; }
.route-recipient-card:has(input:checked) { border-color:#38bdf8; background:rgba(56,189,248,.1); }
.route-recipient-card input { width:18px; height:18px; accent-color:#38bdf8; }
.route-recipient-card .avatar { width:40px; height:40px; }
.route-recipient-card>span:last-child { min-width:0; display:grid; gap:2px; }
.route-recipient-card small { color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.route-recipient-card small i { display:inline-block; width:9px; height:9px; margin-right:7px; border-radius:50%; background:#7b8c88; box-shadow:0 0 0 3px rgba(123,140,136,.12); }
.route-recipient-card.on-guard small { color:#8de8bd; }
.route-recipient-card.on-guard small i { background:#35d399; box-shadow:0 0 0 3px rgba(53,211,153,.15); }
.route-recipient-card.off-duty { background:rgba(255,255,255,.018); }
.route-recipient-card.off-duty .avatar { filter:saturate(.45); opacity:.82; }
.route-target-entity-card { position:relative; display:grid; grid-template-columns:42px minmax(0,1fr); gap:11px; align-items:center; min-height:66px; padding:11px 42px 11px 11px; border:1px solid var(--border); border-radius:13px; background:rgba(255,255,255,.018); cursor:pointer; }
.route-target-entity-card:has(input:checked) { border-color:#38bdf8; background:rgba(56,189,248,.1); box-shadow:inset 3px 0 #38bdf8; }
.route-target-entity-card input { position:absolute; top:50%; right:14px; width:18px; height:18px; margin:0; transform:translateY(-50%); accent-color:#38bdf8; }
.route-target-entity-card>span:first-of-type { width:42px; height:42px; display:grid; place-items:center; border-radius:12px; color:#7dd3fc; background:rgba(56,189,248,.11); }
.route-target-entity-card>span:first-of-type svg { width:21px; height:21px; }
.route-target-entity-card>span:last-of-type { min-width:0; display:grid; gap:3px; }
.route-target-entity-card strong,.route-target-entity-card small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.route-target-entity-card small { color:var(--muted); }
.monitor-routes-modal { width:min(860px,100%); }
.monitor-routes-modal .modal-body { background:radial-gradient(circle at 100% 0,rgba(56,189,248,.08),transparent 38%),var(--bg); }
.monitor-route-list { display:grid; gap:16px; }
.monitor-route-card { border:1px solid #244861; border-radius:18px; padding:18px; background:linear-gradient(145deg,rgba(13,40,61,.95),rgba(7,25,39,.98)); box-shadow:0 16px 40px rgba(0,0,0,.18); display:grid; gap:15px; overflow:hidden; }
.monitor-route-card>header { display:grid; grid-template-columns:48px minmax(0,1fr) auto; gap:13px; align-items:center; }
.monitor-route-card>header>span { width:44px; height:44px; display:grid; place-items:center; border-radius:13px; color:#38bdf8; background:rgba(56,189,248,.12); }
.monitor-route-card>header>div { display:grid; gap:3px; min-width:0; }
.monitor-route-card>header small { color:#7dd3fc; font-weight:800; letter-spacing:.07em; }
.monitor-route-card>header strong { font-size:1.13rem; }
.monitor-route-card>header div>span { display:flex; align-items:center; gap:5px; color:var(--muted); }
.monitor-route-card>header div>span svg { width:15px; height:15px; }
.monitor-route-card>header em { padding:6px 9px; border:1px solid rgba(52,211,153,.3); border-radius:999px; background:rgba(52,211,153,.1); color:#6ee7b7; font-size:.7rem; font-style:normal; font-weight:900; letter-spacing:.08em; }
.monitor-route-instructions { display:flex; gap:9px; padding:11px 13px; border:1px solid rgba(125,211,252,.15); border-radius:12px; background:rgba(125,211,252,.05); color:#7dd3fc; }
.monitor-route-instructions svg { width:18px; height:18px; flex:0 0 auto; margin-top:1px; }
.monitor-route-instructions p { margin:0; color:#c2d5df; line-height:1.45; }
.route-response-counts { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.route-response-counts span { padding:11px 9px; border:1px solid #214159; border-radius:12px; text-align:center; color:var(--muted); background:rgba(2,15,25,.36); }
.route-response-counts b { display:block; font-size:1.15rem; color:var(--text); }
.route-response-counts .accepted b { color:#34d399; }.route-response-counts .rejected b { color:#fb7185; }.route-response-counts .pending b { color:#fbbf24; }
.monitor-route-recipient-section { display:grid; gap:9px; padding-top:2px; }
.monitor-route-recipient-section>div:first-child { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.monitor-route-recipient-section>div:first-child span { color:#8ea9b9; font-size:.8rem; }
.monitor-route-recipients { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:8px; }
.monitor-route-recipient { display:grid; grid-template-columns:40px minmax(0,1fr) 14px 10px; align-items:center; gap:10px; padding:11px; border:1px solid rgba(255,255,255,.055); border-radius:12px; background:rgba(255,255,255,.03);box-shadow:inset 3px 0 0 var(--route-person-color); }
.monitor-route-recipient img { width:36px; height:36px; border-radius:50%; object-fit:cover; }
.monitor-route-recipient span { min-width:0; display:grid; gap:2px; }
.monitor-route-recipient strong,.monitor-route-recipient small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.monitor-route-recipient small { color:var(--muted); }
.monitor-route-recipient i { width:9px; height:9px; border-radius:50%; background:#fbbf24; }
.monitor-route-person-color { display:block;width:12px;height:24px;border-radius:999px;background:var(--route-person-color);box-shadow:0 0 0 3px rgba(255,255,255,.08); }
.monitor-route-recipient.accepted i { background:#34d399; }.monitor-route-recipient.rejected i { background:#fb7185; }
.monitor-route-card>footer { display:flex; justify-content:flex-end; gap:8px; padding-top:2px; }
@media (max-width:700px) { .responder-route-assignment{grid-template-columns:42px minmax(0,1fr)} .responder-route-assignment-actions{grid-column:1/-1;justify-content:stretch}.responder-route-assignment-actions .button{flex:1} #route-dispatch-recipient-list,.monitor-route-recipients{grid-template-columns:1fr}.route-response-counts{grid-template-columns:repeat(3,minmax(0,1fr))}.route-response-counts span{padding:9px 4px;font-size:.72rem}.monitor-route-dispatches span{display:none}.route-dispatch-recipient-search{align-items:stretch;flex-direction:column}.route-dispatch-recipient-search>span{padding-left:4px}.monitor-route-card{padding:14px}.monitor-route-card>header{grid-template-columns:44px minmax(0,1fr)}.monitor-route-card>header em{grid-column:1/-1;justify-self:start}.monitor-route-card>footer .button{flex:1}.monitor-route-card>footer{justify-content:stretch} }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { min-height: 100vh; min-height: 100dvh; overflow-x: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; }
.hidden { display: none !important; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.muted { color: var(--muted); }
.danger { color: var(--red); }
.success { color: var(--green); }
.warning { color: var(--yellow); }

.app-loading { min-height: 100dvh; display: grid; place-items: center; }
.splash { display: grid; justify-items: center; gap: 8px; letter-spacing: .18em; }
.splash strong { font-size: 1.4rem; }
.splash span { color: var(--muted); font-size: .75rem; letter-spacing: .04em; }
.splash img { animation: breathe 1.8s ease-in-out infinite; }

.login-shell {
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(320px, 470px) 1fr;
    background:
        radial-gradient(circle at 70% 40%, rgba(44, 90, 79, .22), transparent 35%),
        linear-gradient(135deg, #07100e, #0b1513);
}
.login-panel { display: flex; flex-direction: column; padding: clamp(28px, 5vw, 70px); background: rgba(7, 16, 14, .82); z-index: 1; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: .13em; }
.brand img { width: 42px; height: 42px; }
.login-card { margin: auto 0; }
.eyebrow { color: var(--green); text-transform: uppercase; font-size: .72rem; font-weight: 800; letter-spacing: .16em; }
.login-card h1 { font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -.045em; line-height: .98; margin: 14px 0 18px; }
.login-card > p { color: var(--muted); line-height: 1.6; max-width: 37ch; }
.login-art { position: relative; display: grid; place-items: center; overflow: hidden; }
.radar-visual { width: min(62vw, 720px); aspect-ratio: 1; border-radius: 50%; position: relative; border: 1px solid var(--line); background: repeating-radial-gradient(circle, transparent 0 68px, rgba(95, 177, 150, .10) 69px 70px), linear-gradient(rgba(65,214,152,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(65,214,152,.08) 1px, transparent 1px); background-size: auto, 42px 42px, 42px 42px; }
.radar-visual::after { content: ""; position: absolute; inset: 6%; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 76%, rgba(65,214,152,.34) 93%, transparent); animation: sweep 5s linear infinite; }
.radar-visual::before { content: ""; position: absolute; width: 13px; height: 13px; border-radius: 50%; top: 30%; left: 62%; background: var(--red); box-shadow: 0 0 0 10px rgba(255,77,95,.12), 0 0 35px var(--red); z-index: 1; }
.visual-caption { position: absolute; bottom: 8%; left: 8%; padding: 18px 22px; background: rgba(13, 24, 22, .86); border: 1px solid var(--line); border-radius: 14px; backdrop-filter: blur(12px); }
.visual-caption strong { display: block; margin-bottom: 5px; }
.visual-caption span { color: var(--muted); font-size: .85rem; }

.form { display: grid; gap: 16px; margin-top: 30px; }
.field { display: grid; gap: 7px; }
.field > span, .field > label { color: #bfd0ca; font-size: .78rem; font-weight: 750; letter-spacing: .035em; }
.input, .select, .textarea {
    width: 100%; border: 1px solid var(--line); color: var(--text); background: var(--surface);
    border-radius: 12px; padding: 13px 14px; outline: none; transition: border-color .18s, box-shadow .18s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(65,214,152,.12); }
.textarea { min-height: 90px; resize: vertical; }
.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.button {
    border: 1px solid transparent; border-radius: 12px; padding: 12px 16px; color: var(--text);
    background: var(--surface-3); font-weight: 760; transition: transform .15s, filter .15s, background .15s;
}
.button:hover { filter: brightness(1.12); }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button:focus-visible, .nav-button:focus-visible, .close-button:focus-visible, .map-style-button:focus-visible, .responder-card:focus-visible,
.responder-bottom-nav button:focus-visible, .responder-map-style button:focus-visible, [role="button"]:focus-visible {
    outline: 3px solid rgba(65,214,152,.45);
    outline-offset: 2px;
}
.button.primary { color: #06100d; background: var(--green); }
.button.danger-button { background: var(--red-dark); border-color: rgba(255,77,95,.4); }
.button.ghost { background: transparent; border-color: var(--line); }
.button.small { padding: 8px 11px; font-size: .78rem; border-radius: 9px; }
.button.full { width: 100%; }
.button[aria-busy="true"] { cursor: progress; }
.empty > strong, .empty > span { display: block; }
.empty > strong { color: var(--text); margin-bottom: 5px; }
.empty > span { line-height: 1.5; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

/* Responder v70: estado operativo permanente y lenguaje visual sobrio. */
.responder-shell {
    --responder-accent: #45c79a;
    --responder-surface: #101a18;
    --responder-line: #273a35;
    background: #09110f;
}
.responder-shell .guard-card,
.responder-shell .responder-map-panel,
.responder-shell .responder-news-panel,
.responder-shell .responder-frequencies-panel,
.responder-shell .responder-account-panel,
.responder-shell .responder-callouts-panel {
    border-color: var(--responder-line);
    background: var(--responder-surface);
    box-shadow: 0 10px 26px rgba(0,0,0,.2);
}
.responder-shell .button { min-height: 46px; border-radius: 10px; font-weight: 760; }
.responder-shell .button.primary { color: #06110d; background: var(--responder-accent); box-shadow: none; }
.responder-shell .button.ghost { border-color: #30443e; background: #12201c; }
.responder-shell .field > span { color: #dce8e4; font-weight: 720; }
.responder-shell .input,
.responder-shell .select,
.responder-shell .textarea { min-height: 46px; border-color: #30443e; background: #0b1512; }

.device-status-strip {
    position: sticky;
    top: 72px;
    z-index: 1070;
    display: grid;
    grid-template-columns: repeat(5, minmax(98px,1fr)) auto;
    gap: 7px;
    width: min(100%, 720px);
    margin: 0 auto;
    padding: 8px 20px;
    border-bottom: 1px solid rgba(183,220,207,.1);
    background: rgba(8,17,14,.96);
    backdrop-filter: blur(16px);
}
.device-status {
    display: grid;
    grid-template-columns: 8px minmax(0,1fr);
    column-gap: 7px;
    align-items: center;
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid #293b36;
    border-radius: 9px;
    background: #101b18;
}
.device-status > i { grid-row: 1 / 3; width: 7px; height: 7px; border-radius: 50%; background: #7d918a; }
.device-status.ok > i { background: #49d49f; box-shadow: 0 0 0 3px rgba(73,212,159,.1); }
.device-status.warning > i { background: #f5b942; box-shadow: 0 0 0 3px rgba(245,185,66,.1); }
.device-status strong,
.device-status small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-status strong { color: #dce9e4; font-size: .61rem; letter-spacing: .035em; }
.device-status small { color: #91a69e; font-size: .56rem; }
.device-test-button {
    min-height: 42px;
    padding: 7px 12px;
    border: 1px solid #3a574d;
    border-radius: 9px;
    color: #dff5ed;
    background: #173027;
    font: inherit;
    font-size: .65rem;
    font-weight: 780;
    cursor: pointer;
}
.device-test-button:hover { border-color: #55c89f; }
.device-diagnostic-intro { display: grid; gap: 5px; margin-bottom: 14px; color: var(--muted); line-height: 1.45; }
.device-diagnostic-intro strong { color: var(--text); font-size: .95rem; }
.device-diagnostic-list { display: grid; gap: 8px; }
.device-diagnostic-row { display: grid; grid-template-columns: 34px minmax(0,1fr) 20px; align-items: center; gap: 10px; width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: 10px; color: inherit; background: var(--surface-2); text-align: left; }
.device-diagnostic-row:not(:disabled) { cursor: pointer; }
.device-diagnostic-row:not(:disabled):hover { border-color: #4f86ad; background: #123452; }
.device-diagnostic-row:not(:disabled):focus-visible { outline: 3px solid rgba(61,145,208,.42); outline-offset: 2px; }
.device-diagnostic-row:disabled { opacity: 1; }
.device-diagnostic-action { display: grid; place-items: center; color: #7da2bd; }
.device-diagnostic-action .ui-icon { width: 18px; height: 18px; }
.device-diagnostic-row.ok .device-diagnostic-action { visibility: hidden; }
.signal.last { background: #7f97aa; box-shadow: 0 0 0 5px rgba(127,151,170,.12); }
.marker-avatar.last { opacity: .72; filter: saturate(.45); }
.marker-avatar.last .marker-avatar-status { background: #7f97aa; }
.last-position-notice { margin: 12px 0; padding: 11px 12px; border: 1px solid #49647b; border-radius: 10px; color: #c2d0dc; background: #12283c; font-size: .74rem; line-height: 1.45; }
.responder-callout-card > .chip { align-self: start; justify-self: end; width: auto; max-width: 150px; min-height: 28px; padding: 6px 9px; justify-content: center; text-align: center; white-space: normal; line-height: 1.25; }
.responder-callout-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.responder-callout-meta .callout-form-compact { margin: 0; }
.responder-callout-meta > .button { width: auto; min-height: 38px; margin: 0; white-space: nowrap; }
@media (max-width: 620px) {
    .responder-callout-card { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px; }
    .responder-callout-card > .chip { grid-row: 1; justify-self: start; max-width: 100%; }
    .responder-callout-card > div { grid-row: 2; min-width: 0; }
    .responder-callout-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; }
    .responder-callout-meta > .button { min-width: 0; max-width: 142px; white-space: normal; }
    .responder-news-panel { margin-bottom: 28px; }
}
.device-diagnostic-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #aebdb8; background: #25332f; font-weight: 900; }
.device-diagnostic-row.ok .device-diagnostic-icon { color: #062217; background: #4bd49f; }
.device-diagnostic-row.warning .device-diagnostic-icon { color: #271a00; background: #f6c34e; }
.device-diagnostic-row.error .device-diagnostic-icon { color: #fff; background: #d83a51; }
.device-diagnostic-row strong,
.device-diagnostic-row small { display: block; }
.device-diagnostic-row small { margin-top: 3px; color: var(--muted); font-size: .68rem; line-height: 1.4; }
.device-diagnostic-summary { margin-top: 12px; padding: 11px 12px; border-radius: 9px; color: #c9dad4; background: #16231f; }
.device-diagnostic-summary.ok { color: #9be8c8; background: rgba(65,214,152,.1); }
.device-diagnostic-summary.warning { color: #f2d486; background: rgba(245,185,66,.1); }
.device-diagnostic-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }

/* Selector táctil de símbolos para marcas operativas. */
.marker-type-preview { appearance: none; width: 48px; min-width: 48px; min-height: 48px; padding: 0; cursor: pointer; }
.marker-type-preview:hover,
.marker-type-preview[aria-expanded="true"] { border-color: var(--green); background: rgba(65,214,152,.1); }
.marker-icon-gallery { display: grid; grid-template-columns: repeat(auto-fill,minmax(82px,1fr)); gap: 8px; max-height: 330px; overflow-y: auto; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #0b1513; }
.marker-icon-gallery[hidden] { display: none; }
.marker-icon-choice { display: grid; place-items: center; gap: 6px; min-height: 78px; padding: 8px 5px; border: 1px solid #2b3d38; border-radius: 10px; color: #b9cac4; background: #12201c; cursor: pointer; }
.marker-icon-choice span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: #64d8ae; background: rgba(100,216,174,.09); }
.marker-icon-choice .ui-icon { width: 23px; height: 23px; }
.marker-icon-choice small { max-width: 100%; font-size: .61rem; text-align: center; line-height: 1.15; }
.marker-icon-choice:hover,
.marker-icon-choice.selected { border-color: #57ceaa; color: #f0faf6; background: rgba(65,214,152,.1); }

/* Códigos de color constantes; conservan claridad con cualquier fondo del mapa. */
.ui-icon-siren,.ui-icon-warning,.ui-icon-traffic { color: #ff526c !important; }
.ui-icon-flame,.ui-icon-fire-station,.ui-icon-construction { color: #ff9345 !important; }
.ui-icon-medical,.ui-icon-hospital,.ui-icon-ambulance,.ui-icon-rescue { color: #ff6378 !important; }
.ui-icon-police,.ui-icon-command,.ui-icon-radio,.ui-icon-camera { color: #66b4ff !important; }
.ui-icon-entry,.ui-icon-meeting,.ui-icon-shelter,.ui-icon-flag { color: #55dca4 !important; }
.ui-icon-exit,.ui-icon-barrier,.ui-icon-checkpoint { color: #ffae63 !important; }
.ui-icon-flood,.ui-icon-water,.ui-icon-boat,.ui-icon-hydrant { color: #55c7ff !important; }
.ui-icon-power-hazard,.ui-icon-hazmat,.ui-icon-fuel { color: #f5d84b !important; }
.ui-icon-helicopter,.ui-icon-airport,.ui-icon-road,.ui-icon-bridge { color: #d7e1e7 !important; }
.ui-icon-collapse,.ui-icon-tree,.ui-icon-home,.ui-icon-school { color: #c9a16f !important; }
.operational-symbol .ui-icon { filter: drop-shadow(0 1px 2px #000); }
.operational-popup-icon,
.responder-marker-focus,
.all-map-marker-icon { background: #12221e; }

.delivery-states .seen,
.stats-result-row .seen { color: #75c9ff; border-color: rgba(117,201,255,.24); background: rgba(117,201,255,.07); }

@media (max-width: 620px) {
    .device-status-strip {
        top: 65px;
        display: flex;
        width: 100%;
        gap: 6px;
        overflow-x: auto;
        padding: 7px 10px 8px;
        scrollbar-width: none;
    }
    .device-status-strip::-webkit-scrollbar { display: none; }
    .device-status { flex: 0 0 104px; min-height: 46px; padding: 6px 7px; }
    .device-test-button { position: sticky; right: 0; flex: 0 0 auto; min-height: 46px; box-shadow: -10px 0 16px #08110e; }
    .responder-main { padding-top: 8px; }
    .guard-hero-eyebrow { color: #9db3ab; letter-spacing: .08em; }
    .guard-hero h1 { font-size: 1.28rem; }
    .guard-actions { display: grid; grid-template-columns: 1fr; }
    .guard-actions .button { width: 100%; }
    .responder-bottom-nav { border-top: 1px solid #263833; border-radius: 14px 14px 0 0; background: rgba(10,18,16,.98); }
    .responder-nav-button { border-radius: 9px; color: #8ea39b; }
    .responder-nav-button.active { color: #e8f6f1; background: #173027; box-shadow: inset 0 -3px #45c79a; }
    .device-diagnostic-actions { display: grid; grid-template-columns: 1fr; }
    .marker-icon-gallery { grid-template-columns: repeat(3,minmax(0,1fr)); max-height: 42vh; }
}

/* Personal en teléfono: tarjetas sin desbordes ni acciones superpuestas. */
@media (max-width: 760px) {
    .shell .users-table-wrap { margin-inline: -1px; overflow: hidden; }
    .shell .users-table.responsive-table tr {
        gap: 7px;
        margin: 0 9px 12px;
        padding: 15px;
        border: 1px solid #2b404a;
        border-radius: 13px;
        background: #111f28;
    }
    .shell .users-table.responsive-table tr:last-child { margin-bottom: 9px; border-bottom: 1px solid #2b404a; }
    .shell .users-table.responsive-table td {
        grid-template-columns: minmax(86px, .34fr) minmax(0, 1fr);
        gap: 11px;
        width: 100%;
        max-width: 100%;
        padding: 7px 0;
    }
    .shell .users-table.responsive-table td:first-child {
        display: block;
        padding-bottom: 13px;
        border-bottom: 1px solid rgba(190,215,224,.1);
    }
    .shell .users-table.responsive-table td:first-child::before { display: none; }
    .shell .users-table .table-user { align-items: center; gap: 11px; }
    .shell .users-table .table-user .avatar { width: 44px; height: 44px; }
    .shell .users-table .table-user strong { font-size: .87rem; }
    .shell .users-table .user-memberships { width: 100%; min-width: 0; }
    .shell .users-table .user-membership {
        display: grid;
        grid-template-columns: minmax(0,1fr);
        align-items: stretch;
        gap: 10px;
        width: 100%;
        min-width: 0;
        padding: 11px;
    }
    .shell .users-table .user-membership > div:first-child { min-width: 0; }
    .shell .users-table .user-membership .action-row {
        display: grid;
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 7px;
        width: 100%;
    }
    .shell .users-table .user-membership .button { width: 100%; min-width: 0; }
    .shell .users-table.responsive-table td[data-label=""] .action-row {
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 8px;
    }
    .shell .users-table a { overflow-wrap: anywhere; }
    .shell .sidebar > .emergency-callout-button {
        width: 62px;
        height: 62px;
        right: 10px;
        bottom: calc(76px + env(safe-area-inset-bottom));
        border-width: 3px;
        box-shadow: 0 8px 22px rgba(189,25,48,.31),0 0 0 4px rgba(221,41,68,.09);
    }
    .shell .sidebar > .emergency-callout-button strong { font-size: .54rem; }
}

/* Meteorología operativa, ubicación de destacamentos y ajustes finales de composición. */
.station-location-picker { display:grid;gap:12px;padding:14px;border:1px solid #315577;border-radius:14px;background:#081d32; }
.station-address-search { display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:12px; }
.station-address-search .button { min-height:46px;white-space:nowrap; }
.station-location-picker-heading { display:flex;align-items:center;justify-content:space-between;gap:14px; }
.station-location-picker-heading > div { display:grid;gap:4px; }
.station-location-picker-heading strong { font-size:.9rem; }
.station-location-picker-heading span { color:var(--muted);font-size:.76rem;line-height:1.45; }
.station-location-map-wrap { position:relative;min-height:330px;overflow:hidden;border:1px solid #3b6382;border-radius:12px;background:#07182a;isolation:isolate; }
.station-location-map { position:relative;z-index:1;width:100%;height:330px;overflow:hidden;background:#dbe5ec; }
.station-location-map-wrap.google-basemap-mode .station-location-map { background:transparent; }
.station-address-results { display:grid;max-height:190px;overflow:auto;border:1px solid #315577;border-radius:12px;background:#071a2d; }
.station-address-results > button { display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:10px;width:100%;padding:11px 13px;border:0;border-bottom:1px solid rgba(114,157,194,.2);color:#f4f8fb;background:transparent;text-align:left;cursor:pointer; }
.station-address-results > button:last-child { border-bottom:0; }
.station-address-results > button:hover,.station-address-results > button:focus-visible { background:#123653;outline:0; }
.station-address-results .ui-icon { width:20px;height:20px;color:#69c6ff; }
.station-address-results strong,.station-address-results small { display:block; }
.station-address-results small { margin-top:3px;color:#a9bfd1;line-height:1.35; }
.station-address-empty { padding:14px;color:#c8d7e3;font-size:.84rem; }
.station-location-status { display:flex;align-items:center;min-height:40px;padding:9px 12px;border:1px solid #6a4f2e;border-radius:10px;color:#ffd28a;background:rgba(111,73,22,.2);font-size:.76rem;font-weight:750; }
.station-location-status.selected { border-color:#2e8068;color:#8ce7c7;background:rgba(29,111,84,.18); }
.station-location-div-icon,.station-map-div-icon { background:transparent!important;border:0!important; }
.station-map-marker { position:relative;display:grid;place-items:center;width:44px;height:44px;border:3px solid #f8fbff;border-radius:14px 14px 14px 4px;color:#fff;background:linear-gradient(145deg,#0d81c7,#175283);box-shadow:0 8px 20px rgba(1,10,20,.48),0 0 0 4px rgba(39,174,232,.28);transform:rotate(-45deg); }
.station-map-marker::after { content:"";position:absolute;inset:5px;border:1px solid rgba(255,255,255,.32);border-radius:9px; }
.station-map-marker > span { display:grid;place-items:center;transform:rotate(45deg); }
.station-map-marker .ui-icon { width:24px;height:24px;filter:drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.station-location-div-icon .station-map-marker { width:50px;height:50px;box-shadow:0 10px 24px rgba(1,10,20,.55),0 0 0 5px rgba(39,174,232,.3); }
.station-location-div-icon .station-map-marker .ui-icon { width:27px;height:27px; }
.station-map-popup-title { align-items:center; }
.station-map-popup-icon { display:grid;place-items:center;width:42px;height:42px;flex:0 0 42px;border-radius:12px;color:#fff;background:#176a9f; }
.station-map-popup-icon .ui-icon { width:24px;height:24px; }
.station-card-main > p.success { color:var(--status-success); }
.station-card-main > p.warning { color:var(--status-warning); }

.monitor-weather-summary { display:grid;gap:8px;padding:11px 12px;border:1px solid #315577;border-radius:12px;background:linear-gradient(145deg,#0c2a46,#091e34); }
.monitor-weather-loading { color:var(--muted);font-size:.76rem; }
.monitor-weather-head { display:flex;align-items:center;justify-content:space-between;gap:10px; }
.monitor-weather-head > span { display:inline-flex;align-items:center;gap:7px;color:#dcebfa;font-size:.76rem;font-weight:850; }
.monitor-weather-head .ui-icon { width:17px;height:17px;color:#69c3ea; }
.monitor-weather-head small { color:var(--muted);font-size:.66rem; }
.monitor-weather-values { display:grid;grid-template-columns:auto 1fr;gap:3px 12px;align-items:center; }
.monitor-weather-values strong { grid-row:1/3;color:#fff;font-size:1.38rem; }
.monitor-weather-values span { color:#b8ccdc;font-size:.68rem; }
.monitor-weather-alert,.monitor-weather-ok { display:flex;align-items:center;gap:7px;padding-top:7px;border-top:1px solid rgba(105,195,234,.18);font-size:.69rem; }
.monitor-weather-alert { color:#ffbf62; }
.monitor-weather-alert .ui-icon { width:16px;height:16px; }
.monitor-weather-ok { color:#71d5b2; }
.monitor-weather-empty,.weather-setup-notice,.weather-rule-intro { display:flex;align-items:flex-start;gap:10px; }
.monitor-weather-empty .ui-icon,.weather-setup-notice .ui-icon,.weather-rule-intro .ui-icon { flex:0 0 20px;width:20px;height:20px;color:var(--status-warning); }
.monitor-weather-empty div,.weather-setup-notice div,.weather-rule-intro div { display:grid;gap:3px; }
.monitor-weather-empty strong,.monitor-weather-empty span { font-size:.7rem; }
.monitor-weather-empty span,.weather-setup-notice span,.weather-rule-intro span { color:var(--muted);line-height:1.4; }

.weather-settings-body { display:grid;gap:18px; }
.weather-current-grid { display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:10px; }
.weather-current-grid article { display:grid;gap:7px;padding:14px;border:1px solid #315577;border-radius:13px;background:#0a2035; }
.weather-current-grid span { color:var(--muted);font-size:.72rem; }
.weather-current-grid strong { color:#eef8ff;font-size:1.25rem; }
.weather-source-note { margin:0;color:var(--muted);font-size:.7rem; }
.weather-setup-notice { padding:15px;border:1px solid rgba(255,181,71,.38);border-radius:13px;background:rgba(111,73,22,.16); }
.weather-setup-notice strong,.weather-rule-intro strong { font-size:.82rem; }
.weather-setup-notice span,.weather-rule-intro span { font-size:.74rem; }
.weather-active-block,.weather-rules-block { display:grid;gap:10px; }
.weather-subheading { display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:8px;border-bottom:1px solid var(--line-soft); }
.weather-subheading > span { display:grid;min-width:25px;height:25px;place-items:center;border-radius:999px;background:#173d5d;font-size:.7rem;font-weight:850; }
.weather-alert-grid,.weather-rule-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(290px,1fr));gap:10px; }
.weather-alert-card,.weather-rule-card { position:relative;display:grid;grid-template-columns:8px minmax(0,1fr) auto;align-items:center;gap:12px;padding:13px;border:1px solid #31516a;border-radius:13px;background:#0a2034; }
.weather-alert-card > i,.weather-rule-card > i { align-self:stretch;border-radius:999px;background:var(--weather-color); }
.weather-alert-card > div,.weather-rule-card > div:nth-child(2) { display:grid;gap:4px;min-width:0; }
.weather-alert-card span,.weather-rule-card span { color:#c5d5e1;font-size:.74rem; }
.weather-alert-card small,.weather-rule-card small { color:var(--muted);font-size:.68rem;line-height:1.4; }
.weather-rule-card.inactive { opacity:.58; }
.weather-rule-intro { padding:13px;border:1px solid rgba(105,195,234,.3);border-radius:12px;background:rgba(22,77,121,.2); }
.responder-weather-panel { border-color:rgba(245,158,11,.38); }
.responder-weather-list { display:grid;gap:10px;padding:14px; }
.responder-weather-card { display:grid;grid-template-columns:46px minmax(0,1fr);align-items:center;gap:12px;padding:13px;border:1px solid color-mix(in srgb,var(--weather-color) 42%,#29465f);border-left:4px solid var(--weather-color);border-radius:13px;background:#0a2034; }
.responder-weather-card.critical { background:linear-gradient(100deg,rgba(130,22,42,.2),#0a2034 42%); }
.responder-weather-icon { display:grid;width:44px;height:44px;place-items:center;border-radius:12px;color:var(--weather-color);background:color-mix(in srgb,var(--weather-color) 16%,#0b243a); }
.responder-weather-icon .ui-icon { width:24px;height:24px; }
.responder-weather-card > div { display:grid;gap:3px;min-width:0; }
.responder-weather-card strong { color:#f6fbff;font-size:.9rem; }
.responder-weather-card span,.responder-weather-card small { color:#bfd0dd;font-size:.76rem;line-height:1.4; }

/* Despacho como puesto de trabajo: ocupa la pantalla y conserva la confirmación visible. */
@media(min-width:1181px){
    .modal.callout-dispatch-modal { width:min(1660px,calc(100vw - 24px));height:calc(100dvh - 24px);max-height:calc(100dvh - 24px); }
    .modal.callout-dispatch-modal .modal-body { flex:1;min-height:0;overflow:auto;padding:16px 20px 18px; }
    .modal.callout-dispatch-modal .callout-dispatch-grid { grid-template-columns:minmax(300px,.9fr) minmax(350px,1fr) minmax(390px,1.15fr);gap:16px;align-items:start; }
    .modal.callout-dispatch-modal .callout-dispatch-primary,
    .modal.callout-dispatch-modal .callout-dispatch-secondary,
    .modal.callout-dispatch-modal .callout-dispatch-reception { min-height:calc(100dvh - 250px); }
    .modal.callout-dispatch-modal .callout-dispatch-secondary,
    .modal.callout-dispatch-modal .callout-dispatch-reception { max-height:calc(100dvh - 250px);overflow-y:auto;scrollbar-width:thin; }
}

/* Compañeros: dos filas estables; foto y acciones nunca cambian de columna. */
.responder-peer-result { grid-template-columns:46px minmax(0,1fr);grid-template-areas:"peer-avatar peer-copy" "peer-avatar peer-actions";align-items:start; }
.responder-peer-result > img { grid-area:peer-avatar; }
.responder-peer-result-copy { grid-area:peer-copy; }
.responder-peer-result-actions { grid-area:peer-actions;display:flex;justify-content:flex-start;gap:7px;min-width:0; }
.responder-peer-result-actions .peer-action { display:inline-flex;width:auto!important;min-width:82px;height:40px;align-items:center;justify-content:center;gap:6px;padding:8px 11px; }
.responder-peer-result-actions .peer-action .ui-icon { width:17px;height:17px; }
.responder-peer-result-actions .peer-action span { font-size:.7rem;font-weight:850; }
.responder-peer-result-copy span { flex-wrap:wrap; }

@media(max-width:760px){
    .station-location-picker-heading { align-items:stretch;flex-direction:column; }
    .station-address-search { grid-template-columns:1fr; }
    .station-location-map { height:280px; }
    .station-location-map-wrap { min-height:280px; }
    .weather-current-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .weather-alert-grid,.weather-rule-grid { grid-template-columns:1fr; }
    .responder-peer-finder { min-width:0;overflow:hidden; }
    .responder-peer-result { grid-template-columns:44px minmax(0,1fr);grid-template-areas:"peer-avatar peer-copy" "peer-avatar peer-actions";gap:7px 10px;padding:11px; }
    .responder-peer-result > img { width:44px;height:44px; }
    .responder-peer-result-actions { grid-column:auto!important;display:flex!important;justify-content:flex-start!important; }
    .responder-peer-result-actions .peer-action { width:auto!important;min-width:82px!important;height:42px;padding:8px 10px; }
    .responder-peer-result-copy strong { font-size:.88rem; }
    .responder-peer-result-copy span,.responder-peer-result-copy small { font-size:.74rem;white-space:normal; }
}

@media(max-width:390px){
    .responder-peer-result-actions { grid-column:auto!important; }
    .responder-peer-result-actions .peer-action { min-width:78px!important; }
}

/* Formularios configurables de emergencia */
.callout-form-template-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.callout-form-template-card { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 13px; align-items: start; padding: 16px; border: 1px solid #294653; border-radius: 14px; background: #10232c; }
.callout-form-template-card.inactive { opacity: .62; }
.callout-form-template-card > div:nth-child(2) { display: grid; gap: 4px; }
.callout-form-template-card > div:nth-child(2) > span { color: #6ed1c3; font-size: .62rem; font-weight: 850; letter-spacing: .1em; }
.callout-form-template-card strong { color: #f1f7f9; }
.callout-form-template-card p { margin: 0; color: #a9bbc4; font-size: .8rem; line-height: 1.4; }
.callout-form-template-card small { color: #829ba6; font-size: .7rem; }
.callout-form-template-icon { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #35616c; border-radius: 12px; color: #75d8ca; background: #17313b; }
.callout-form-template-icon svg { width: 23px; height: 23px; }
.callout-form-editor-modal { width: min(1040px, calc(100vw - 24px)); }
.callout-form-editor-modal .modal-body { max-height: min(76vh, 780px); overflow: auto; }
.callout-form-editor-intro { display: flex; gap: 13px; align-items: center; padding: 14px; border: 1px solid #31515d; border-radius: 13px; background: #112831; }
.callout-form-editor-intro > span { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 11px; color: #72d6c8; background: #1b3941; }
.callout-form-editor-intro svg { width: 23px; height: 23px; }
.callout-form-editor-intro p { margin: 3px 0 0; color: #9eb4be; font-size: .8rem; }
.callout-form-fields-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 6px; }
.callout-form-fields-heading > div { display: grid; gap: 2px; }
.callout-form-fields-heading span { color: #91a9b3; font-size: .76rem; }
.callout-form-field-list { display: grid; gap: 12px; }
.callout-form-field-builder { display: grid; gap: 11px; padding: 15px; border: 1px solid #2a4754; border-radius: 14px; background: #0c1d25; }
.callout-form-field-main { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(180px, .65fr); gap: 11px; }
.callout-form-field-footer { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; padding-top: 10px; border-top: 1px solid #243c47; }
.callout-form-field-footer .action-row { margin-left: auto; }
.callout-custom-form { display: grid; gap: 14px; padding: 16px; border: 1px solid #385968; border-radius: 14px; background: #0b1c24; }
.callout-custom-form-heading { display: flex; justify-content: space-between; gap: 14px; align-items: start; }
.callout-custom-form-heading > div { display: grid; gap: 3px; }
.callout-custom-form-heading span { color: #6ed1c3; font-size: .64rem; font-weight: 850; letter-spacing: .1em; }
.callout-custom-form-heading strong { color: #f2f7f9; font-size: 1rem; }
.callout-custom-form-heading small { color: #98adb6; line-height: 1.4; }
.callout-custom-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.callout-custom-field:has(textarea), .callout-multiselect, .callout-boolean { grid-column: 1 / -1; }
.callout-custom-field b { color: #ff6375; }
.callout-multiselect { margin: 0; padding: 13px; border: 1px solid #2d4855; border-radius: 12px; }
.callout-multiselect legend { padding: 0 6px; color: #dce8ec; font-weight: 740; }
.callout-multiselect > div { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.callout-boolean { padding: 12px 14px; border: 1px solid #2d4855; border-radius: 12px; background: #10242d; }
.callout-form-compact { display: inline-flex; align-items: center; gap: 6px; width: fit-content; margin: 7px 0; padding: 6px 9px; border: 1px solid #31515d; border-radius: 9px; color: #b9ccd3; background: #10242d; font-size: .7rem; }
.callout-form-compact svg { width: 15px; height: 15px; color: #6fd2c4; }
.callout-form-compact strong { color: #77d7c9 !important; font-size: .68rem !important; }
.callout-form-data { display: grid; gap: 12px; margin: 14px 0; padding: 15px; border: 1px solid #31515e; border-radius: 14px; background: #0d2028; }
.callout-form-data-heading { display: flex; gap: 10px; align-items: center; }
.callout-form-data-heading > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: #74d8ca; background: #19333c; }
.callout-form-data-heading svg { width: 20px; height: 20px; }
.callout-form-data-heading > div { display: grid; gap: 2px; }
.callout-form-data-heading small { color: #6ecdbf; font-size: .6rem; font-weight: 850; letter-spacing: .1em; }
.callout-form-data dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; overflow: hidden; border: 1px solid #28434f; border-radius: 11px; background: #28434f; }
.callout-form-data dl > div { display: grid; gap: 4px; padding: 11px 12px; background: #10242d; }
.callout-form-data dt { color: #8fa7b2; font-size: .67rem; font-weight: 760; text-transform: uppercase; letter-spacing: .04em; }
.callout-form-data dd { margin: 0; color: #edf4f6; font-size: .86rem; line-height: 1.4; overflow-wrap: anywhere; }
.user-push-status { display: block; width: fit-content; margin-top: 5px; font-size: .68rem; font-weight: 750; line-height: 1.3; }
.user-push-status.ok { color: #61d6ad; }
.user-push-status.warning { color: #f2bd5a; }
.user-push-status.error { color: #ff7284; }
.callout-multiselect:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 3px; }
.callout-form-edit-row { margin: -4px 0 12px; }

/* Despacho de emergencias: aprovecha la pantalla de Monitoreo sin alargar la carga. */
.callout-dispatch-modal { width: min(1240px, calc(100vw - 28px)); max-height: calc(100dvh - 24px); }
.callout-dispatch-modal .modal-body { padding: 16px 20px; }
.callout-dispatch-modal .callout-warning { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 5px 14px; padding-block: 10px; }
.callout-dispatch-modal .callout-warning strong { white-space: nowrap; }
.callout-dispatch-form { gap: 14px; margin-top: 12px; }
.callout-dispatch-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr); gap: 16px; align-items: start; }
.callout-dispatch-primary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.callout-dispatch-secondary { display: grid; gap: 12px; }
.callout-dispatch-full { grid-column: 1 / -1; }
.callout-dispatch-form .callout-targeting { margin: 0; padding: 12px; }
.callout-dispatch-form .callout-target-choice { min-height: 64px; }
.callout-dispatch-form .callout-custom-form { padding: 14px; }
.callout-dispatch-form textarea { min-height: 104px; resize: vertical; }

@media (max-width: 980px) {
    .callout-dispatch-grid { grid-template-columns: 1fr; }
    .callout-dispatch-modal { width: min(760px, calc(100vw - 20px)); }
}

@media (max-width: 760px) {
    .callout-form-template-grid, .callout-custom-fields, .callout-form-data dl { grid-template-columns: 1fr; }
    .callout-form-template-card { grid-template-columns: 40px minmax(0, 1fr); }
    .callout-form-template-card > .action-row { grid-column: 1 / -1; justify-content: flex-end; }
    .callout-form-field-main { grid-template-columns: 1fr; }
    .callout-form-fields-heading { align-items: stretch; flex-direction: column; }
    .callout-form-fields-heading .button { min-height: 46px; }
    .callout-form-field-footer .action-row { width: 100%; margin-left: 0; justify-content: flex-end; }
    .callout-custom-form { padding: 13px; }
    .callout-dispatch-modal { width: calc(100vw - 14px); max-height: calc(100dvh - 14px); }
    .callout-dispatch-modal .modal-body { padding: 14px; }
    .callout-dispatch-modal .callout-warning { grid-template-columns: 1fr; }
    .callout-dispatch-modal .callout-warning strong { white-space: normal; }
    .callout-dispatch-primary { grid-template-columns: 1fr; padding: 12px; }
    .callout-dispatch-full { grid-column: auto; }
}

@media (max-width: 390px) {
    .shell .users-table.responsive-table td { grid-template-columns: 78px minmax(0,1fr); }
    .shell .users-table.responsive-table tr { margin-inline: 7px; padding: 13px; }
    .shell .nav-button { min-width: 68px; flex-basis: 68px; }
}

/* Consistencia UX global: campos, modales, filtros y acciones. */
.field { display: grid; align-content: start; gap: 7px; min-width: 0; }
.field > span { color: #dce8e5; font-size: .73rem; font-weight: 740; line-height: 1.3; }
.field > small,
.field .muted { color: #91a69f; font-size: .66rem; line-height: 1.45; }
.input,
.select,
.textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid #30433e;
    border-radius: 10px;
    color: #eff8f5;
    background: #0d1815;
    font: inherit;
    font-size: .8rem;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.textarea { min-height: 104px; resize: vertical; line-height: 1.5; }
.input:hover,
.select:hover,
.textarea:hover { border-color: #425a53; }
.input:focus,
.select:focus,
.textarea:focus { outline: 0; border-color: #4fd0a1; background: #0f1c18; box-shadow: 0 0 0 3px rgba(79,208,161,.12); }
.input:disabled,
.select:disabled,
.textarea:disabled { opacity: .62; cursor: not-allowed; }
.input::placeholder,
.textarea::placeholder { color: #70857d; }
.form { gap: 16px; }
.form-grid { gap: 13px; }
.check { min-height: 46px; padding: 10px 11px; border: 1px solid transparent; border-radius: 9px; line-height: 1.35; }
.check:hover { border-color: #2d403a; background: rgba(255,255,255,.018); }
.check input { width: 19px; height: 19px; accent-color: #45c996; }
.button { min-height: 42px; padding: 10px 15px; border-radius: 10px; line-height: 1.2; }
.button.small { min-height: 38px; padding: 8px 12px; }
.button:disabled { opacity: .58; cursor: wait; filter: saturate(.7); }
.button[aria-busy="true"] { position: relative; padding-left: 34px; }
.button[aria-busy="true"]::before { content: ''; position: absolute; left: 13px; width: 13px; height: 13px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: busy-spin .7s linear infinite; }
@keyframes busy-spin { to { transform: rotate(360deg); } }
.form-error { padding: 10px 12px; border: 1px solid rgba(255,82,108,.35); border-radius: 9px; color: #ffb2be; background: rgba(255,82,108,.08); line-height: 1.4; }
.panel-header { align-items: center; gap: 14px; }
.panel-header > div { min-width: 0; }
.panel-header h3 { line-height: 1.25; }
.panel-header p { margin-top: 4px; line-height: 1.45; }
.action-row { row-gap: 8px; }
.empty { min-height: 104px; align-content: center; gap: 5px; color: #91a69f; line-height: 1.45; }
.empty strong { color: #dce8e4; font-size: .84rem; }
.modal { border-color: #31463f; background: #0d1815; box-shadow: 0 24px 70px rgba(0,0,0,.55); }
.modal-header { position: sticky; top: 0; z-index: 2; min-height: 62px; border-color: #263a34; background: rgba(13,24,21,.96); backdrop-filter: blur(14px); }
.modal-header h2 { font-size: 1.05rem; letter-spacing: -.015em; }
.modal-body { padding: 19px; }
.modal-footer { position: sticky; bottom: 0; z-index: 2; gap: 9px; border-color: #263a34; background: rgba(13,24,21,.97); backdrop-filter: blur(14px); }
.close-button { width: 42px; height: 42px; border-radius: 10px; }

@media (max-width: 620px) {
    .form-grid,
    .input-row { grid-template-columns: 1fr; }
    .modal { width: calc(100vw - 14px); max-height: calc(100dvh - 14px); border-radius: 14px; }
    .modal-body { padding: 15px; }
    .modal-footer { display: grid; grid-template-columns: 1fr 1fr; padding: 12px 15px max(12px,env(safe-area-inset-bottom)); }
    .modal-footer .modal-error { grid-column: 1 / -1; }
    .modal-footer .button { width: 100%; }
    .page-heading { align-items: stretch; flex-direction: column; gap: 13px; }
    .page-heading > .button { width: 100%; }
    .panel-header { align-items: stretch; flex-direction: column; }
    .panel-header > .button,
    .panel-header > .action-row { width: 100%; }
    .panel-header > .action-row .button { flex: 1; }
    .responsive-table .action-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; }
    .responsive-table .action-row .button { width: 100%; }
}
.form-error { color: #ff9da7; background: rgba(123,24,37,.28); border: 1px solid rgba(255,77,95,.25); padding: 10px 12px; border-radius: 10px; font-size: .84rem; }
.security-note { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .74rem; margin-top: 22px; }
.login-secondary-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 12px; }
.login-assistance-actions { display: grid; grid-template-columns: 1fr; gap: 9px; margin-top: 9px; }
.login-assistance-actions .button { position: static; display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; text-align: center; text-decoration: none; }
.login-assistance-actions .support-button svg { width: 18px; height: 18px; }

.responder-marker-card[role="link"] { cursor: pointer; }
.responder-marker-card[role="link"]:focus-visible {
    outline: 3px solid var(--accent, #38cfe0);
    outline-offset: -3px;
}
.login-apk-download {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    margin-top: 11px;
    padding: 11px 12px;
    border: 1px solid rgba(65,214,152,.35);
    border-radius: 12px;
    color: var(--text);
    background: rgba(65,214,152,.075);
    text-decoration: none;
    transition: border-color .18s, background .18s, transform .18s;
}
.login-apk-download:hover { border-color: rgba(91,229,174,.72); background: rgba(65,214,152,.12); transform: translateY(-1px); }
.login-apk-download:focus-visible { outline: 3px solid rgba(65,214,152,.28); outline-offset: 2px; }
.login-apk-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; color: #69ddb0; background: rgba(65,214,152,.12); }
.login-apk-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.login-apk-icon .login-apk-arrow { stroke-width: 2; }
.login-apk-download strong,
.login-apk-download small { display: block; }
.login-apk-download strong { font-size: .79rem; line-height: 1.3; }
.login-apk-download small { margin-top: 3px; color: var(--muted); font-size: .66rem; line-height: 1.35; }
.login-apk-action { color: #75e2b7; font-size: .68rem; font-weight: 800; }
.registration-card { width: min(100%, 470px); padding: 30px 0; }
.registration-card > .button { margin-top: 10px; }
.join-code-preview, .join-department-match { padding: 12px 14px; border: 1px solid rgba(65,214,152,.35); border-radius: 11px; background: rgba(65,214,152,.08); color: #c9e9dd; }
.join-code-input { text-transform: uppercase; letter-spacing: .16em; font-weight: 850; }
.onboarding-shell { min-height: 100dvh; display: grid; place-items: center; padding: 22px; background: radial-gradient(circle at 50% 20%, rgba(65,214,152,.12), transparent 36%), var(--bg); }
.onboarding-card { width: min(100%, 560px); padding: clamp(22px, 5vw, 40px); }
.onboarding-card .brand { margin-bottom: 34px; }
.onboarding-card h1 { margin: 10px 0; font-size: clamp(1.8rem, 6vw, 2.8rem); }
.onboarding-card > p { color: var(--muted); line-height: 1.6; }
.join-request-list { display: grid; gap: 8px; margin: 20px 0; }
.join-request-list article { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.department-switcher { display: grid; gap: 3px; min-width: 210px; }
.department-switcher > span, .department-context small { color: var(--muted); font-size: .6rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.department-switcher .select { padding: 7px 34px 7px 10px; border-radius: 9px; font-size: .75rem; }
.department-context { display: grid; gap: 2px; max-width: 240px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(13,24,22,.72); }
.department-context strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .76rem; }
.department-context.global { display: inline-flex; color: var(--green); font-size: .72rem; font-weight: 800; }
.department-access-section { overflow: hidden; }
.department-invite-card { display: grid; grid-template-columns: minmax(130px,.45fr) minmax(260px,1fr) auto; gap: 12px; align-items: center; margin: 16px; padding: 15px; border: 1px solid rgba(65,214,152,.3); border-radius: 13px; background: rgba(65,214,152,.055); }
.department-invite-card > div { min-width: 0; display: grid; gap: 4px; }
.department-invite-card span { color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; }
.department-invite-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.join-admin-list { display: grid; gap: 8px; padding: 0 16px 16px; }
.join-admin-list article { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.join-admin-list article > div:first-child { display: grid; gap: 3px; }
.join-admin-list article span { color: var(--muted); font-size: .74rem; }
.field-disabled { opacity: .48; }
.transport-mode-check { padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.responder-vehicle-picker { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; align-items:start; }
.responder-vehicle-picker.field-disabled { opacity:.58; }
.clearable-plate-input { position:relative; display:block; }
.clearable-plate-input .input { width:100%; padding-right:48px; text-transform:uppercase; letter-spacing:.08em; font-weight:800; }
.clearable-plate-input button { position:absolute; top:50%; right:6px; width:36px; height:36px; display:grid; place-items:center; padding:0; border:0; border-radius:9px; color:#dbe6ef; background:#173a5c; transform:translateY(-50%); }
.clearable-plate-input button:hover { color:#fff; background:#24557f; }
.clearable-plate-input button svg { width:18px; height:18px; }
.force-stop-shift-modal { width:min(560px,100%); }
.force-stop-shift-form { gap:15px; }
.force-stop-person { display:grid; grid-template-columns:52px minmax(0,1fr); gap:13px; align-items:center; padding:14px; border:1px solid #315577; border-radius:14px; background:#102b49; }
.force-stop-person .avatar { width:50px; height:50px; }
.force-stop-person>div { min-width:0; display:grid; gap:3px; }
.force-stop-person small { color:#70b8eb; font-size:.68rem; font-weight:900; letter-spacing:.1em; }
.force-stop-person strong,.force-stop-person span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.force-stop-person span { color:#b3c3d4; font-size:.82rem; }
.force-stop-warning { display:flex; gap:12px; align-items:flex-start; padding:14px; border:1px solid rgba(229,27,42,.48); border-radius:14px; color:#ffd7dc; background:rgba(159,21,35,.22); }
.force-stop-warning>svg { width:24px; height:24px; flex:0 0 auto; color:#ff7581; }
.force-stop-warning>div { display:grid; gap:4px; }
.force-stop-warning span { color:#eab8bf; font-size:.82rem; line-height:1.45; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.ui-icon { display: block; width: 1em; height: 1em; flex: none; overflow: visible; color: inherit; fill: none; stroke: currentColor; }

.shell { display: grid; grid-template-columns: 238px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { border-right: 1px solid var(--line); background: #091311; padding: 22px 14px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; z-index: 900; }
.sidebar .brand { padding: 0 9px 22px; }
.nav { display: grid; gap: 5px; }
.nav-button { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; text-align: left; font-weight: 690; }
.nav-button:hover, .nav-button.active { color: var(--text); background: var(--surface-2); }
.nav-button.active { box-shadow: inset 3px 0 var(--green); }
.nav-icon { width: 22px; display: grid; place-items: center; flex: none; }
.nav-icon .ui-icon { width: 20px; height: 20px; }
.nav-button { position: relative; }
.nav-emergencies .nav-icon { color: #ff6476; }
.nav-callouts .nav-icon { color: #74c9ff; }
.nav-emergency-count { margin-left: auto; min-width: 22px; padding: 3px 6px; border-radius: 999px; color: #fff; background: #e11d3f; text-align: center; font-size: .64rem; line-height: 1.2; }
.nav-button.emergency-attention { color: #fff; background: rgba(190,18,60,.22); box-shadow: inset 3px 0 #ff334f,0 0 18px rgba(239,51,79,.12); animation: nav-emergency-pulse 1.05s infinite; }
.sidebar-user { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.sidebar>.emergency-callout-button { margin-top: clamp(42px,14vh,130px); }
.sidebar>.emergency-callout-button strong { font-size: .78rem; letter-spacing: .07em; }
.sidebar-user .user-copy { min-width: 0; flex: 1; }
.sidebar-user strong, .sidebar-user span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user span { color: var(--muted); font-size: .72rem; margin-top: 2px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--surface-3); display: grid; place-items: center; color: var(--green); font-weight: 800; flex: none; border: 2px solid var(--line); }
.main { min-width: 0; }
.topbar { min-height: 72px; display: flex; align-items: center; gap: 14px; justify-content: space-between; padding: 14px clamp(18px, 3vw, 34px); border-bottom: 1px solid var(--line); background: rgba(7,16,14,.9); position: sticky; top: 0; z-index: 850; backdrop-filter: blur(14px); }
.topbar h1 { font-size: 1.08rem; margin: 0; letter-spacing: -.02em; }
.topbar-meta { display: flex; align-items: center; gap: 9px; }
.monitor-controls-button { display: none; }
.live-pill, .mode-pill, .status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .72rem; font-weight: 760; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(65,214,152,.12); }
.mode-pill.drill { color: var(--yellow); border-color: rgba(243,199,84,.35); background: rgba(243,199,84,.07); }
.content { padding: clamp(18px, 3vw, 34px); }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-heading h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); margin: 0 0 6px; letter-spacing: -.04em; }
.page-heading p { color: var(--muted); margin: 0; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 15px; }
.metric span { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.metric strong { display: block; font-size: 1.65rem; margin-top: 8px; letter-spacing: -.04em; }
.metric.alert strong { color: var(--red); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-header { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 17px; border-bottom: 1px solid var(--line); }
.panel-header h3 { margin: 0; font-size: .95rem; }
.panel-body { padding: 17px; }

.monitor-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); min-height: calc(100dvh - 72px); }
.monitor-list { border-right: 1px solid var(--line); background: #0a1412; display: flex; flex-direction: column; min-height: 0; }
.monitor-toolbar { padding: 14px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.address-search-block { display: grid; gap: 8px; padding-bottom: 11px; border-bottom: 1px solid var(--line-soft); }
.address-search-form { display: grid; grid-template-columns: 1fr; gap: 7px; }
.address-search-form .button { white-space: nowrap; }
.google-place-search-host { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: #17211e; color-scheme: light; }
.google-place-search-host .address-search-notice { color: #725400; background: #fff7d7; border-color: #e7d995; }
.google-place-search-host gmp-place-search { display: block; width: 100%; max-height: 310px; overflow: auto; }
.address-search-status { color: var(--muted); font-size: .64rem; line-height: 1.4; }
.address-fallback-button { justify-self: start; padding: 6px 9px !important; font-size: .68rem !important; }
.address-search-results { max-height: 245px; overflow: auto; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow); }
.address-search-notice { padding: 9px 10px; color: var(--yellow); background: rgba(243,199,84,.07); border-bottom: 1px solid rgba(243,199,84,.2); font-size: .67rem; line-height: 1.4; }
.address-search-result { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 9px; padding: 10px; border: 0; border-bottom: 1px solid var(--line-soft); color: inherit; background: transparent; text-align: left; }
.address-search-result:hover, .address-search-result:focus-visible { background: var(--surface-2); }
.address-search-result strong, .address-search-result small { display: block; }
.address-search-result strong { font-size: .78rem; line-height: 1.3; }
.address-search-result small { margin-top: 3px; color: var(--muted); font-size: .66rem; line-height: 1.35; }
.address-result-pin { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid rgba(74,168,255,.4); border-radius: 9px; color: #8cc8ff; background: rgba(74,168,255,.1); font-weight: 900; }
.address-search-credit, .address-search-empty { padding: 9px 10px; color: var(--muted); font-size: .63rem; line-height: 1.4; }
.monitor-filter-label { color: var(--muted); font-size: .64rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.monitor-toolbar .input, .monitor-toolbar .select { padding: 11px 9px; font-size: .74rem; }
#monitor-delegation { grid-column: 1 / -1; }
.responders { overflow: auto; padding: 8px; }
.responder-card { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: center; padding: 11px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: inherit; text-align: left; }
.responder-card:hover, .responder-card.active { background: var(--surface-2); border-color: var(--line); }
.responder-card.sos { background: rgba(123,24,37,.20); border-color: rgba(255,77,95,.35); }
.responder-card strong { display: block; font-size: .86rem; }
.responder-card small { color: var(--muted); display: block; margin-top: 3px; }
.signal { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 4px rgba(255,255,255,.03); }
.signal.online { background: var(--green); }
.signal.delayed { background: var(--yellow); }
.signal.offline { background: #73807c; }
.signal.sos { background: var(--red); animation: pulse 1s infinite; }
.map-wrap { position: relative; min-height: calc(100dvh - 72px); }
.google-basemap { position: absolute; inset: 0; z-index: 0; display: none; background: #0b1513; pointer-events: none; }
.google-basemap.active { display: block; }
.google-basemap { contain: layout paint size; backface-visibility: hidden; transition: none !important; }
.google-leaflet-overlay .leaflet-map-pane,
.google-leaflet-overlay .leaflet-marker-pane,
.google-leaflet-overlay .leaflet-overlay-pane,
.google-leaflet-overlay .leaflet-tooltip-pane { backface-visibility: hidden; }
#map { position: absolute; inset: 0; z-index: 1; background: #0b1513; }
.google-basemap-mode #map, .google-basemap-mode #responder-map, .google-leaflet-overlay { background: transparent !important; }
.google-basemap-mode .leaflet-control-attribution { display: none; }
.google-basemap-mode .map-legend { bottom: 32px; }
.map-legend { position: absolute; z-index: 700; left: 14px; bottom: 18px; display: flex; gap: 6px; flex-wrap: wrap; padding: 8px; background: rgba(9,19,17,.9); border: 1px solid var(--line); border-radius: 11px; backdrop-filter: blur(10px); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: .68rem; color: #c2d0cb; padding: 3px 5px; }
.map-style-switch { position: absolute; z-index: 700; top: 14px; right: 14px; display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: rgba(9,19,17,.93); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.map-style-button { padding: 7px 11px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: 800 .69rem/1 inherit; cursor: pointer; }
.map-style-button.active { color: #04120d; background: var(--green); }
.draw-area-button { position: absolute; z-index: 700; top: 14px; left: 58px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.monitor-locate-button { position: absolute; z-index: 700; top: 14px; left: 205px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.map-labels-toggle-button { position: absolute; z-index: 700; top: 14px; left: 320px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
[data-map-labels-toggle][aria-pressed="false"] { border-color: rgba(243,199,84,.5); color: var(--yellow); background: rgba(9,19,17,.94); }
.map-context-hint { position: absolute; z-index: 700; top: 68px; right: 14px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: rgba(9,19,17,.9); color: #c2d0cb; font-size: .68rem; pointer-events: none; backdrop-filter: blur(10px); }
.area-drawing-active { cursor: crosshair !important; }
.area-drawing-toolbar {
    position: absolute; z-index: 900; left: 50%; bottom: 76px; width: min(560px, calc(100% - 28px)); display: flex;
    align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; transform: translateX(-50%);
    border: 1px solid rgba(139,92,246,.65); border-radius: 13px; background: rgba(8,14,13,.96); box-shadow: 0 12px 36px rgba(0,0,0,.46); backdrop-filter: blur(14px);
}
.area-drawing-toolbar strong, .area-drawing-toolbar span { display: block; }
.area-drawing-toolbar strong { color: #e9ddff; font-size: .82rem; }
.area-drawing-toolbar span { margin-top: 3px; color: var(--muted); font-size: .68rem; }
.area-drawing-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; flex: 0 0 auto; }
.area-drawing-actions.zone-icon-actions { display: flex; flex-wrap: nowrap; align-items: center; }
.zone-icon-actions .map-action-icon { width: 46px; min-width: 46px; height: 46px; min-height: 46px; border-radius: 12px; }
.zone-icon-actions .map-action-icon:disabled { opacity: .38; filter: saturate(.45); }
.area-vertex-div-icon { background: transparent; border: 0; }
.area-vertex-handle { display: grid; place-items: center; width: 22px; height: 22px; border: 2px solid #fff; border-radius: 50%; color: #fff; background: #8b5cf6; box-shadow: 0 3px 11px rgba(0,0,0,.58),0 0 0 4px rgba(139,92,246,.2); font: 900 9px/1 system-ui,sans-serif; cursor: grab; touch-action: none; }
.area-vertex-handle.first { width: 26px; height: 26px; color: #241047; background: #c4b5fd; box-shadow: 0 3px 12px rgba(0,0,0,.62),0 0 0 5px rgba(139,92,246,.28); }
.area-vertex-handle.selected { border-color:#fff4c2; color:#281900; background:#ffc15a; box-shadow:0 3px 12px rgba(0,0,0,.62),0 0 0 6px rgba(255,193,90,.3); transform:scale(1.12); }
.area-midpoint-div-icon { overflow: visible !important; background: transparent; border: 0; }
.area-midpoint-handle { display:grid; width:20px; height:20px; place-items:center; padding:0; border:2px solid #dffbf4; border-radius:50%; color:#061725; background:#39d1c2; box-shadow:0 3px 10px rgba(0,0,0,.58),0 0 0 4px rgba(57,209,194,.2); font:900 14px/1 system-ui,sans-serif; cursor:pointer; touch-action:manipulation; }
.area-midpoint-handle:active { transform:scale(1.12); }
.leaflet-marker-dragging .area-vertex-handle { cursor: grabbing; transform: scale(1.14); }
.leaflet-container { font-family: inherit; }
.leaflet-control-zoom a { background: var(--surface) !important; color: var(--text) !important; border-color: var(--line) !important; }
.leaflet-control-attribution { background: rgba(7,16,14,.8) !important; color: var(--muted) !important; }
.leaflet-control-attribution a { color: var(--green) !important; }
.radar-marker { background: transparent; border: 0; }
.marker-avatar { position: relative; width: 48px; height: 48px; border-radius: 50%; background: #eef7f3; border: 4px solid #73807c; display: grid; place-items: center; overflow: hidden; color: #0d5f43; font-weight: 900; box-shadow: 0 5px 18px rgba(0,0,0,.5); }
.marker-avatar-fallback { position: absolute; inset: 0; display: grid; place-items: center; background: #eef7f3; font-size: .78rem; letter-spacing: .02em; }
.marker-avatar img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; padding: 3px; object-fit: contain; background: radial-gradient(circle, #fff 0%, #dcebe6 100%); }
.marker-avatar.online { border-color: var(--green); }
.marker-avatar.delayed { border-color: var(--yellow); }
.marker-avatar.offline { border-color: #73807c; }
.marker-avatar.sos { border-color: var(--red); animation: marker-pulse 1s infinite; }
.operational-div-icon { overflow: visible !important; background: transparent; border: 0; }
.operational-marker { position: relative; width: var(--radar-map-icon-size, 48px); height: var(--radar-map-icon-size, 48px); display: grid; place-items: center; border: 3px solid #8da19a; border-radius: 13px 13px 13px 3px; background: #101c19; box-shadow: 0 6px 20px rgba(0,0,0,.52); transform: rotate(-45deg); }
.operational-marker.priority-low { border-color: #86a39a; }
.operational-marker.priority-normal { border-color: var(--green); }
.operational-marker.priority-high { border-color: var(--yellow); }
.operational-marker.priority-critical { border-color: var(--red); animation: marker-pulse 1.15s infinite; }
.operational-marker.drill { border-style: dashed; background: #2a2108; }
.operational-symbol { display: grid; place-items: center; width: calc(var(--radar-map-icon-size, 48px) * .81); height: calc(var(--radar-map-icon-size, 48px) * .81); color: #e8f3ef; transform: rotate(45deg); }
.operational-symbol .ui-icon { width: 62%; height: 62%; color: inherit; stroke: currentColor; stroke-width: 2.25; filter: drop-shadow(0 1px 1px rgba(0,0,0,.9)); }
.operational-marker.type-urgent .operational-symbol { color: #ff6b7d; }
.operational-marker.type-fire .operational-symbol,.operational-marker.type-roadblock .operational-symbol { color: #ffad52; }
.operational-marker.type-narrow_crossing .operational-symbol { color: #ffd166; }
.operational-marker.type-medical .operational-symbol,.operational-marker.type-hospital .operational-symbol { color: #82d8ff; }
.operational-marker.type-danger .operational-symbol { color: #ffd457; }
.operational-marker.type-flood .operational-symbol { color: #6ec8ff; }
.operational-marker.type-meeting .operational-symbol { color: #75e6b5; }
.operational-marker.type-resource .operational-symbol { color: #d9e6e2; }
.operational-marker.type-command .operational-symbol { color: #c9a7ff; }
.operational-marker.type-police .operational-symbol { color: #7bb9ff; }
.operational-marker.type-fire_station .operational-symbol,.operational-marker.type-ambulance .operational-symbol { color: #ff7788; }
.operational-marker.type-hydrant .operational-symbol { color: #58c9ff; }
.operational-marker.type-shelter .operational-symbol { color: #73e6ad; }
.operational-marker.type-helicopter .operational-symbol { color: #e5e7eb; }
.operational-marker.type-power_hazard .operational-symbol { color: #ffe066; }
.operational-marker.type-collapse .operational-symbol { color: #d4a574; }
.operational-marker.type-hazmat .operational-symbol { color: #d8ff4f; }
.operational-marker.type-entry .operational-symbol { color: #49e3a4; }
.operational-marker.type-exit .operational-symbol { color: #ff9b69; }
.marker-position-editing { filter: drop-shadow(0 0 9px #41d698); z-index: 1000 !important; }
.marker-position-toolbar { border-color: rgba(65,214,152,.65); }
.zone-entry-alert-config { display:grid; gap:10px; padding:14px; border:1px solid var(--border); border-radius:14px; background:rgba(65,214,152,.04); }
.zone-creator-summary { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:12px; padding:14px; border:1px solid rgba(103,183,255,.38); border-radius:14px; background:linear-gradient(135deg,rgba(103,183,255,.12),rgba(57,209,194,.07)); }
.zone-creator-summary-icon { display:grid; width:42px; height:42px; place-items:center; border:1px solid rgba(103,183,255,.55); border-radius:12px; color:#8dcbff; background:rgba(7,21,38,.5); }
.zone-creator-summary-icon .ui-icon { width:24px; height:24px; }
.zone-creator-summary > div { display:grid; gap:3px; }
.zone-creator-summary > div > span { color:#8dcbff; font-size:.64rem; font-weight:850; letter-spacing:.1em; }
.zone-creator-summary strong { color:var(--text); font-size:.9rem; }
.zone-creator-summary small { color:var(--muted); font-size:.72rem; line-height:1.4; }
.zone-creator-section { display:grid; gap:12px; padding-top:3px; }
.zone-creator-section + .zone-creator-section { padding-top:16px; border-top:1px solid var(--line-soft); }
.zone-creator-section-heading { display:grid; grid-template-columns:28px minmax(0,1fr); align-items:start; gap:9px; }
.zone-creator-section-heading > span { display:grid; width:28px; height:28px; place-items:center; border-radius:50%; color:#061725; background:var(--green); font-size:.76rem; font-weight:900; }
.zone-creator-section-heading > div { display:grid; gap:2px; }
.zone-creator-section-heading strong { font-size:.83rem; }
.zone-creator-section-heading small { color:var(--muted); font-size:.7rem; line-height:1.4; }
.area-drawing-copy { display:grid; gap:3px; min-width:0; }
.area-drawing-toolbar .area-drawing-step { margin:0; color:#bba7ff; font-size:.59rem; font-weight:850; letter-spacing:.095em; }
.area-drawing-toolbar [data-area-drawing-measure] { color:#80d8ff; font-size:.68rem; font-weight:800; line-height:1.35; }
.area-drawing-toolbar [data-area-drawing-ready] { color:#93c8b4; font-size:.62rem; line-height:1.35; }
.generated-access-code { display:grid; gap:5px; padding:13px 14px; border:1px solid var(--border); border-radius:12px; background:rgba(65,214,152,.05); }
.generated-access-code > span { color:var(--muted); font-size:.78rem; text-transform:uppercase; letter-spacing:.06em; }
.generated-access-code > strong { color:var(--green); overflow-wrap:anywhere; }
.department-login-identity { display:grid; gap:4px; margin:14px 0 18px; padding:12px 14px; border:1px solid rgba(65,214,152,.35); border-radius:12px; background:rgba(65,214,152,.07); }
.department-login-identity span { color:var(--muted); font-size:.72rem; text-transform:uppercase; letter-spacing:.08em; }
.department-login-identity strong { color:var(--green); font-size:1.05rem; }
.department-login-identity strong.error { color:var(--red); }
.responder-area-filters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-bottom:10px; }
.responder-peer-marker { position:relative; display:block; width:38px; height:38px; padding:3px; border-radius:50%; background:#e9fff6; border:2px solid #41d698; box-shadow:0 4px 16px rgba(0,0,0,.42); }
.responder-peer-marker img { width:100%; height:100%; object-fit:contain; border-radius:50%; background:#0c1714; }
.responder-peer-marker span { position:absolute; right:-1px; bottom:-1px; width:10px; height:10px; border-radius:50%; background:#41d698; border:2px solid #0b1512; }
.responder-peer-marker.last-position { filter:grayscale(.8);opacity:.76;border-color:#94a3b8;background:#e2e8f0; }
.responder-peer-marker.last-position span { background:#94a3b8; }
.peer-last-position-notice { margin:8px 0;padding:7px 9px;border:1px solid rgba(148,163,184,.35);border-radius:8px;color:#cbd5e1;background:rgba(71,85,105,.2);font-size:.7rem;font-weight:800; }
.membership-callout-heading { display:grid; gap:3px; padding-top:3px; }
.membership-callout-heading > span { color:var(--muted); font-size:.78rem; }
.membership-callout-list { display:grid; gap:7px; padding:4px 0 10px; }
.membership-callout-option > span { display:grid; gap:2px; }
.membership-callout-option small { color:var(--muted); font-size:.7rem; }
.user-memberships { display:grid; gap:7px; min-width:270px; }
.user-membership { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 9px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); }
.user-membership > div:first-child { display:grid; gap:2px; }
.user-membership span { color:var(--muted); font-size:.7rem; }
@media (max-width:640px) { .responder-area-filters { grid-template-columns:1fr; } }
.operational-popup-icon .ui-icon,.responder-marker-focus .ui-icon,.all-map-marker-icon .ui-icon { width: 1.15em; height: 1.15em; }
.marker-type-selector { display:grid; grid-template-columns:46px minmax(0,1fr); gap:8px; }
.marker-type-preview { display:grid; place-items:center; min-height:46px; border:1px solid var(--line); border-radius:10px; color:var(--green); background:var(--surface-2); }
.marker-type-preview .ui-icon { width:25px; height:25px; }
.map-area-popup-icon .ui-icon { color: var(--area-color); }
.monitor-location-icon { background: transparent; border: 0; }
.monitor-location-marker { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border: 3px solid #fff; border-radius: 50%; color: #04120d; background: #41d698; box-shadow: 0 5px 18px rgba(0,0,0,.55),0 0 0 7px rgba(65,214,152,.22); }
.monitor-location-marker:before,.monitor-location-marker:after { content: ''; position: absolute; inset: -8px; border: 2px solid rgba(65,214,152,.55); border-radius: 50%; animation: monitor-location-pulse 2s infinite; }
.monitor-location-marker:after { animation-delay: 1s; }
.monitor-location-marker i { position: absolute; top: 7px; width: 5px; height: 13px; border-radius: 4px; background: #04120d; }
.monitor-location-marker b { margin-top: 13px; font: 900 13px/1 system-ui,sans-serif; }
.map-action-menu { display: grid; min-width: 180px; gap: 7px; padding: 2px; }
.map-action-menu>strong { padding: 3px 5px 6px; color: #a9bbb5; font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; }
.map-action-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--surface-2); font-weight: 800; text-align: left; cursor: pointer; }
.map-action-menu button:hover { border-color: var(--green); background: rgba(65,214,152,.09); }
.map-action-menu button span { width: 22px; display: grid; place-items: center; }
.map-action-menu button span .ui-icon { width: 19px; height: 19px; }
.map-icon-size-control { position: absolute; z-index: 700; display: grid; gap: 5px; width: 168px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 11px; background: rgba(9,19,17,.93); box-shadow: var(--shadow); color: var(--muted); backdrop-filter: blur(10px); }
.map-icon-size-control span { display: flex; justify-content: space-between; gap: 8px; font-size: .66rem; font-weight: 800; }
.map-icon-size-control output { color: var(--green); }
.map-icon-size-control input { width: 100%; accent-color: var(--green); cursor: pointer; }
.monitor-icon-size-control { right: 14px; bottom: 42px; }
#map.area-drawing-active ~ .monitor-icon-size-control,
#responder-map.area-drawing-active ~ .responder-icon-size-control { display: none; }
#responder-map.area-drawing-active ~ .responder-map-gesture-button { display: none; }
.responder-icon-size-control { right: 12px; bottom: 68px; }
.leaflet-tooltip.operational-label-tooltip { max-width: 190px; overflow: hidden; padding: 5px 8px; border: 1px solid rgba(255,255,255,.16); border-radius: 7px; background: rgba(8,16,14,.94); color: #fff; font: 800 .7rem/1.15 inherit; text-overflow: ellipsis; white-space: nowrap; box-shadow: 0 3px 12px rgba(0,0,0,.4); }
.leaflet-tooltip-left.operational-label-tooltip::before { border-left-color: rgba(8,16,14,.94); }
.leaflet-tooltip-right.operational-label-tooltip::before { border-right-color: rgba(8,16,14,.94); }
.leaflet-tooltip.operational-area-label { box-sizing: border-box; width: max-content; max-width: min(260px, calc(100vw - 48px)); overflow-wrap: anywhere; padding: 6px 10px; border: 1px solid rgba(255,255,255,.32); border-radius: 11px; background: rgba(21,15,35,.94); color: #fff; font: 850 .7rem/1.28 inherit; text-align: center; white-space: normal; box-shadow: 0 4px 14px rgba(0,0,0,.36); }
.leaflet-tooltip.operational-area-label::before { display: none; }
.operational-area.priority-critical { filter: drop-shadow(0 0 4px rgba(239,68,68,.8)); }
.address-search-div-icon { overflow: visible !important; background: transparent; border: 0; }
.address-search-map-pin { width: 44px; height: 44px; display: grid; place-items: center; border: 4px solid #d8ecff; border-radius: 50% 50% 50% 5px; color: #fff; background: #237fd3; box-shadow: 0 7px 24px rgba(0,0,0,.55), 0 0 0 5px rgba(74,168,255,.2); transform: rotate(-45deg); font-size: 1.15rem; font-weight: 900; }
.address-search-map-pin > span { transform: rotate(45deg); }
.operational-popup-title { align-items: flex-start; }
.operational-popup-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); font-size: 1.35rem; }
.map-area-popup-icon { color: var(--area-color); border-color: var(--area-color); background: color-mix(in srgb, var(--area-color) 18%, var(--surface-2)); }
.operational-description { margin: 0 0 12px; color: #d1dfda; line-height: 1.45; white-space: pre-wrap; }
.coordinate-preview { padding: 9px 11px; border: 1px dashed var(--line); border-radius: 9px; color: var(--muted); background: #070d0c; font: .72rem/1.4 ui-monospace, monospace; }
.marker-audience-fieldset { margin: 0; padding: 0; border: 0; }
.marker-audience-help { margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.4; }
.marker-audience-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.marker-audience-option { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; min-height: 54px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); cursor: pointer; }
.marker-audience-option:has(input:checked) { border-color: var(--green); background: rgba(65,214,152,.08); box-shadow: 0 0 0 2px rgba(65,214,152,.08); }
.marker-audience-option input { position: absolute; inset: 6px auto auto 6px; accent-color: var(--green); }
.marker-audience-option strong { min-width: 0; font-size: .69rem; line-height: 1.25; }
.marker-audience-logo, .marker-audience-icon { width: 36px; height: 36px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: var(--surface-2); }
.marker-audience-logo img { width: 100%; height: 100%; padding: 3px; object-fit: contain; }
.marker-audience-icon { color: var(--green); font-size: 1.15rem; font-weight: 900; }
.audience-all { color: var(--green); font-size: .72rem; font-weight: 800; }
.audience-badges { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.audience-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px 3px 3px; border: 1px solid var(--line); border-radius: 999px; color: #cfddd8; background: var(--surface-2); font-size: .64rem; font-weight: 700; }
.audience-badge img { width: 20px; height: 20px; padding: 1px; border-radius: 50%; object-fit: contain; background: var(--surface); }
.marker-card-audience { margin-top: 7px; }
.map-area-card-swatch { color: var(--area-color); border-color: var(--area-color); background: color-mix(in srgb, var(--area-color) 17%, var(--surface-3)); }
.map-area-color-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.map-area-color-picker label { position: relative; display: flex; align-items: center; gap: 8px; padding: 9px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.map-area-color-picker label:has(input:checked) { border-color: var(--area-color, var(--green)); background: rgba(255,255,255,.04); }
.map-area-color-picker input { position: absolute; opacity: 0; pointer-events: none; }
.map-area-color-picker span { width: 22px; height: 22px; flex: 0 0 auto; border: 3px solid rgba(255,255,255,.8); border-radius: 50%; background: var(--area-color); box-shadow: 0 0 0 2px var(--area-color); }
.map-area-color-picker b { font-size: .7rem; }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background: rgba(65,214,152,.2); }
.marker-cluster div { background: var(--green-dark); color: white; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.leaflet-popup-content { margin: 14px; min-width: 230px; }
.popup-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.popup-grid { display: grid; grid-template-columns: auto 1fr; gap: 7px 12px; font-size: .78rem; }
.popup-grid span:nth-child(odd) { color: var(--muted); }
.popup-actions { display: flex; gap: 8px; margin-top: 13px; }
.map-popup-icon-actions { align-items: center; justify-content: flex-start; gap: 9px; }
.map-action-icon { display: inline-grid; width: 44px; min-width: 44px; height: 44px; min-height: 44px; place-items: center; padding: 9px !important; border-radius: 12px; }
.map-action-icon .ui-icon { width: 21px; height: 21px; }
.map-action-icon.primary .ui-icon { color: #05221b; }
.map-action-icon.danger-button .ui-icon { color: #fff; }
.map-focus-button { display: inline-grid; width: 38px; min-width: 38px; min-height: 36px; place-items: center; padding: 7px !important; }
.map-focus-button .ui-icon { width: 18px; height: 18px; color: var(--blue); }
.address-popup-title { align-items: flex-start; }
.address-popup-icon { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(74,168,255,.4); border-radius: 11px; color: #8cc8ff; background: rgba(74,168,255,.1); font-weight: 900; }
.address-confirm-warning { margin: 10px 0 0; color: var(--yellow); font-size: .7rem; line-height: 1.4; }
.address-popup-actions { flex-wrap: wrap; }
.map-tile-warning { position: absolute; z-index: 700; top: 14px; left: 50%; transform: translateX(-50%); width: min(460px, calc(100% - 110px)); padding: 10px 14px; border: 1px solid rgba(247,184,67,.42); border-radius: 10px; background: rgba(28,21,6,.94); color: var(--yellow); text-align: center; font-size: .76rem; box-shadow: var(--shadow); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.table th { color: var(--muted); text-align: left; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; padding: 11px 13px; border-bottom: 1px solid var(--line); }
.table td { padding: 13px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table-user { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.profile-logo { padding: 3px; object-fit: contain; background: var(--surface-2); }
.profile-logo-fieldset { margin: 0; padding: 0; border: 0; }
.profile-logo-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 9px; }
.profile-logo-option { position: relative; display: grid; justify-items: center; gap: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
.profile-logo-option:has(input:checked) { border-color: var(--green); box-shadow: 0 0 0 3px rgba(65,214,152,.1); }
.profile-logo-option input { position: absolute; inset: 8px auto auto 8px; accent-color: var(--green); }
.profile-logo-preview { width: 52px; height: 52px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: var(--surface-2); }
.profile-logo-preview img { width: 100%; height: 100%; padding: 4px; object-fit: contain; }
.profile-logo-option strong { font-size: .72rem; }
.chips { display: flex; gap: 5px; flex-wrap: wrap; }
.chip { display: inline-flex; padding: 4px 7px; border-radius: 999px; background: var(--surface-3); color: #c7d8d2; font-size: .67rem; }
.status-active { color: var(--green); }
.status-inactive { color: var(--muted); }
.action-row { display: flex; gap: 7px; flex-wrap: wrap; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.entity-card { padding: 17px; }
.entity-card h3 { margin: 0 0 6px; }
.entity-card p { color: var(--muted); font-size: .8rem; margin: 0 0 16px; }
.entity-meta { display: flex; justify-content: space-between; gap: 10px; padding-top: 13px; margin-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: .74rem; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }

.responder-shell { min-height: 100dvh; background: radial-gradient(circle at 50% 15%, rgba(28,72,60,.27), transparent 34%), var(--bg); }
.responder-top { max-width: 720px; margin: 0 auto; padding: 18px 20px 10px; display: flex; justify-content: space-between; align-items: center; }
.responder-main { max-width: 720px; margin: 0 auto; padding: 12px 20px calc(108px + env(safe-area-inset-bottom)); }
.responder-view { display: none; }
.responder-view.active { display: block; animation: responder-view-in .16s ease-out; }
.responder-drill-pill { justify-content: center; margin-bottom: 12px; }
.responder-header-status { color: var(--green); background: rgba(65,214,152,.07); }
.responder-bottom-nav {
    position: fixed; z-index: 1100; left: 50%; bottom: 0; width: min(720px, 100%); min-height: calc(72px + env(safe-area-inset-bottom));
    padding: 7px 10px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
    transform: translateX(-50%); border: 1px solid var(--line); border-bottom: 0; border-radius: 18px 18px 0 0;
    background: rgba(7,16,14,.97); box-shadow: 0 -12px 32px rgba(0,0,0,.34); backdrop-filter: blur(16px);
}
.responder-nav-button {
    position: relative; min-width: 0; display: grid; justify-items: center; align-content: center; gap: 4px; padding: 7px 3px;
    border: 0; border-radius: 11px; color: var(--muted); background: transparent; font-size: .63rem; font-weight: 800;
}
.responder-nav-button.active { color: var(--green); background: rgba(65,214,152,.09); box-shadow: inset 0 -3px var(--green); }
.responder-nav-button.has-unread:not(.active) { color:#ff6b7d;background:rgba(220,38,62,.12);box-shadow:inset 0 -3px #e32646; }
.responder-nav-button.has-unread .responder-nav-icon { animation:news-attention 1.35s ease-in-out infinite; }
.responder-nav-icon { display: grid; place-items: center; line-height: 1; }
.responder-nav-icon .ui-icon { width: 22px; height: 22px; }
.responder-nav-badge {
    position: absolute; top: 4px; left: calc(50% + 9px); min-width: 18px; height: 18px; display: grid; place-items: center;
    padding: 0 5px; border: 2px solid var(--bg); border-radius: 999px; color: #fff; background: var(--red); font-size: .56rem;
}
@keyframes news-attention { 0%,100% { transform:translateY(0); } 45% { transform:translateY(-2px); } }

.monitor-route-div-icon { background:transparent;border:0; }
.monitor-route-map-marker { position:relative;display:grid;place-items:center;width:50px;height:50px;border:3px solid #d9f2ff;border-radius:50% 50% 50% 12px;transform:rotate(-45deg);color:#fff;background:linear-gradient(145deg,#199cdf,#1763b3);box-shadow:0 8px 22px rgba(3,30,60,.48),0 0 0 5px rgba(25,156,223,.18); }
.monitor-route-map-marker > span { display:grid;place-items:center;transform:rotate(45deg); }
.monitor-route-map-marker > span svg { width:24px;height:24px; }
.monitor-route-map-marker > b { position:absolute;right:-7px;top:-7px;display:grid;place-items:center;min-width:23px;height:23px;padding:0 5px;border:2px solid #d9f2ff;border-radius:999px;transform:rotate(45deg);color:#09203a;background:#fff;font-size:.66rem;font-weight:950; }
.monitor-route-map-marker.drill { background:linear-gradient(145deg,#f59e0b,#c66b05);box-shadow:0 8px 22px rgba(62,31,0,.45),0 0 0 5px rgba(245,158,11,.2); }
.monitor-route-live-path,.monitor-route-planned-path { filter:drop-shadow(0 1px 2px rgba(0,0,0,.72));stroke-linecap:round;stroke-linejoin:round; }
.route-legend-line { width:24px;height:4px;display:inline-block;vertical-align:middle;border-radius:999px;background:linear-gradient(90deg,#38bdf8 0 33%,#f59e0b 33% 66%,#a78bfa 66%); }
.route-legend-line.planned { background:repeating-linear-gradient(90deg,#38bdf8 0 5px,transparent 5px 8px,#f59e0b 8px 13px,transparent 13px 16px); }
.monitor-route-map-popup-title { align-items:center; }
.monitor-route-map-popup-title small { display:block;margin-bottom:3px;color:#57c8ff;font-size:.64rem;font-weight:900;letter-spacing:.08em; }
.monitor-route-map-popup-icon { display:grid;place-items:center;width:42px;height:42px;flex:0 0 auto;border-radius:12px;color:#74d4ff;background:#103e63; }
.monitor-route-map-popup-icon svg { width:22px;height:22px; }
.monitor-route-map-details { margin:10px 0;padding:9px 10px;border-radius:10px;background:rgba(48,111,159,.15);font-size:.78rem;line-height:1.45; }
.route-response-counts.compact { margin:10px 0; }
.responder-sos-shortcut {
    position: fixed; z-index: 1150; right: max(16px, calc((100vw - 720px) / 2 + 16px)); bottom: calc(86px + env(safe-area-inset-bottom));
    width: 62px; height: 62px; border: 5px solid rgba(255,255,255,.14); border-radius: 50%; color: #fff; background: var(--red-dark);
    box-shadow: 0 10px 28px rgba(181,31,50,.44); font-weight: 950; letter-spacing: .06em;
}
.guard-hero { text-align: center; padding: 28px 18px; }
.guard-avatar { width: 88px; height: 88px; margin: 0 auto 16px; border: 3px solid var(--line); }
.guard-avatar.live { border-color: var(--green); box-shadow: 0 0 0 8px rgba(65,214,152,.08); }
.guard-hero h1 { font-size: 1.55rem; margin: 0 0 6px; }
.guard-hero p { color: var(--muted); margin: 0; }
.guard-card { padding: 20px; margin-top: 14px; }
.guard-state { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.guard-state strong { display: block; font-size: 1.1rem; }
.guard-state span { color: var(--muted); font-size: .77rem; }
.gps-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; background: var(--surface-2); border-radius: 12px; padding: 13px; margin: 14px 0; }
.gps-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(65,214,152,.12); color: var(--green); }
.gps-card strong, .gps-card span { display: block; }
.gps-card span { color: var(--muted); font-size: .72rem; margin-top: 2px; }
.consent { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: .78rem; line-height: 1.45; margin: 14px 0; }
.sos-button { width: min(260px, 75vw); aspect-ratio: 1; border-radius: 50%; border: 8px solid rgba(255,77,95,.12); color: white; background: radial-gradient(circle at 40% 30%, #ff7180, #b51f32 60%, #781523); box-shadow: 0 18px 60px rgba(181,31,50,.34), inset 0 0 0 1px rgba(255,255,255,.25); display: grid; place-items: center; margin: 24px auto; position: relative; user-select: none; touch-action: none; }
.sos-button strong { display: block; font-size: 2rem; letter-spacing: .08em; }
.sos-button span { font-size: .7rem; opacity: .8; }
.sos-button::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 8px solid var(--red); clip-path: inset(100% 0 0); transition: clip-path 2s linear; }
.sos-button.holding::after { clip-path: inset(0 0 0); }
.sos-button.active { animation: marker-pulse 1.1s infinite; }
.guard-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.battery-note { color: var(--muted); font-size: .72rem; line-height: 1.45; margin-top: 12px; }
.responder-map-panel { margin-top: 16px; overflow: hidden; }
.responder-map-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px; border-bottom: 1px solid var(--line); }
.responder-map-heading .action-row { justify-content: flex-end; }
.responder-map-actions { flex: 0 0 auto; }
.responder-map-heading strong, .responder-map-heading span { display: block; }
.responder-map-heading span { margin-top: 4px; color: var(--muted); font-size: .75rem; }
.responder-map-wrap { position: relative; height: clamp(330px, 52dvh, 460px); overflow: hidden; isolation: isolate; background: #0b1513; }
#responder-map { position: absolute; inset: 0; z-index: 1; }
.responder-map-style { position: absolute; z-index: 700; top: 12px; right: 12px; display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: rgba(9,19,17,.93); box-shadow: var(--shadow); }
.responder-map-style button { padding: 7px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: .7rem; font-weight: 800; }
.responder-map-style button.active { color: #04120d; background: var(--green); }
.responder-locate-button {
    position: absolute; z-index: 700; left: 50%; bottom: 16px; min-width: 190px; display: inline-flex; align-items: center;
    justify-content: center; gap: 8px; transform: translateX(-50%); box-shadow: 0 10px 28px rgba(0,0,0,.38);
}
.responder-locate-button span { font-size: 1.12rem; }
.responder-map-gesture-button { display: none; }
.route-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid rgba(65,214,152,.32); background: rgba(65,214,152,.08); }
.route-summary strong, .route-summary span { display: block; }
.route-summary strong { font-size: .84rem; }
.route-summary span { margin-top: 3px; color: var(--green); font-size: .75rem; }
.route-summary-actions, .responder-marker-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.routing-privacy { margin: 0; padding: 12px 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: .68rem; line-height: 1.5; }
.responder-marker-list { display: grid; gap: 8px; padding: 12px; }
.responder-marker-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 11px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface-2); }
.responder-marker-card.drill { border-style: dashed; border-color: rgba(243,199,84,.45); }
.responder-marker-card strong, .responder-marker-card span { display: block; }
.responder-marker-card strong { font-size: .84rem; }
.responder-marker-card span { margin-top: 3px; color: var(--muted); font-size: .69rem; }
.responder-marker-card p { margin: 7px 0 0; color: #c6d6d0; font-size: .74rem; line-height: 1.4; }
.responder-marker-focus { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-3); font-size: 1.18rem; }
.responder-news-panel, .responder-frequencies-panel, .responder-account-panel { overflow: hidden; }
.responder-frequencies-panel { margin-top: 14px; }
.responder-section-heading { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.responder-section-heading strong, .responder-section-heading span { display: block; }
.responder-section-heading span { margin-top: 4px; color: var(--muted); font-size: .72rem; }
.responder-frequency-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; padding: 14px; }
.responder-frequency { min-width: 0; display: grid; gap: 4px; padding: 14px; border: 1px solid rgba(65,214,152,.2); border-radius: 13px; background: rgba(65,214,152,.06); }
.responder-frequency span { color: var(--muted); font-size: .58rem; font-weight: 900; letter-spacing: .1em; }
.responder-frequency strong { font-size: .88rem; }
.responder-frequency b { color: var(--green); font: 850 .92rem/1.3 ui-monospace, monospace; overflow-wrap: anywhere; }
.responder-alert-preferences { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 9px; padding: 13px 15px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.responder-alert-preferences strong, .responder-alert-preferences span { display: block; }
.responder-alert-preferences > div > span { margin-top: 3px; color: var(--muted); font-size: .66rem; }
.responder-preference { display: inline-flex; align-items: center; gap: 6px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 9px; color: #c8d7d2; font-size: .69rem; font-weight: 750; }
.responder-preference input { accent-color: var(--green); }
.responder-account-panel { padding: 20px; }
.responder-account-identity { text-align: center; padding: 16px 10px 22px; border-bottom: 1px solid var(--line); }
.responder-account-identity h2 { margin: 10px 0 4px; }
.responder-account-identity p { margin: 0; color: var(--muted); }
.responder-account-details { display: grid; grid-template-columns: minmax(90px, auto) minmax(0, 1fr); gap: 12px 18px; padding: 20px 0; }
.responder-account-details span { color: var(--muted); }
.responder-account-details strong { overflow-wrap: anywhere; }
.responder-account-settings { margin: 2px -6px 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.responder-account-settings .responder-section-heading { min-height: 62px; padding: 13px 15px; }
.responder-account-settings .responder-alert-preferences { border-bottom: 0; background: transparent; }
.responder-device-check { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 15px; border-top: 1px solid var(--line); background: rgba(255,255,255,.018); }
.responder-device-check > div { min-width: 0; }
.responder-device-check strong,
.responder-device-check span { display: block; }
.responder-device-check strong { font-size: .78rem; }
.responder-device-check span { margin-top: 3px; color: var(--muted); font-size: .66rem; line-height: 1.4; }
.responder-device-check .button { flex: none; min-height: 42px; white-space: nowrap; }
.responder-app-version { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 14px 15px; border-top: 1px solid var(--line); background: rgba(255,255,255,.018); }
.responder-app-version.warning { border-top-color: rgba(246,195,78,.4); background: rgba(246,195,78,.075); }
.responder-app-version-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(75,212,159,.35); border-radius: 12px; color: #5ee0ae; background: rgba(75,212,159,.1); }
.responder-app-version.warning .responder-app-version-icon { border-color: rgba(246,195,78,.46); color: #f6c34e; background: rgba(246,195,78,.12); }
.responder-app-version > div { min-width: 0; }
.responder-app-version strong,
.responder-app-version [data-app-version-summary] { display: block; }
.responder-app-version strong { font-size: .78rem; }
.responder-app-version [data-app-version-summary] { margin-top: 3px; color: var(--muted); font-size: .66rem; line-height: 1.4; overflow-wrap: anywhere; }
.responder-app-version .button { min-height: 42px; white-space: nowrap; }
.responder-account-actions { margin-top: 4px; }
.empty.compact { padding: 22px 12px; }
.offline-banner { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 1200; padding: 10px 14px; color: #181103; background: var(--yellow); border-radius: 999px; font-weight: 800; font-size: .75rem; box-shadow: var(--shadow); }
.responder-shell .offline-banner { bottom: calc(82px + env(safe-area-inset-bottom)); }

.audit-filter-panel { margin-bottom: 14px; padding: 16px; }
.audit-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; align-items: end; }
.audit-filter-actions { display: flex; gap: 8px; align-items: center; }
.audit-pagination { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.audit-detail-header { padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.audit-detail-header h3 { margin: 8px 0 4px; font-size: 1.35rem; }
.audit-detail-header p { margin: 0; color: var(--muted); }
.audit-detail-grid { display: grid; grid-template-columns: minmax(130px, .35fr) minmax(0, 1fr); gap: 0; margin-top: 12px; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.audit-detail-grid > span, .audit-detail-grid > strong { min-width: 0; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); line-height: 1.45; }
.audit-detail-grid > span { color: var(--muted); background: var(--surface-2); font-size: .72rem; font-weight: 760; text-transform: capitalize; }
.audit-detail-grid > strong { font-size: .8rem; overflow-wrap: anywhere; }
.audit-detail-grid > :nth-last-child(-n+2) { border-bottom: 0; }
.audit-nested { display: grid; grid-template-columns: minmax(110px, .4fr) minmax(0, 1fr); gap: 6px 10px; font-weight: 500; }
.audit-nested > span { color: var(--muted); font-size: .7rem; text-transform: capitalize; }
.audit-nested > strong { min-width: 0; font-size: .78rem; overflow-wrap: anywhere; }
.audit-nested > .button { grid-column: 1 / -1; justify-self: start; margin-top: 5px; }

.modal-open { overflow: hidden; }
.modal-backdrop { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.72); display: grid; place-items: center; padding: 18px; backdrop-filter: blur(6px); }
.modal { width: min(580px, 100%); max-height: calc(100dvh - 36px); overflow: hidden; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.modal.wide { width: min(980px, 100%); }
.modal-header { display: flex; justify-content: space-between; align-items: center; flex: none; padding: 17px 19px; border-bottom: 1px solid var(--line); background: var(--surface); z-index: 2; }
.modal-header h2 { margin: 0; font-size: 1.05rem; }
.modal-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 19px; }
.modal-footer { display: flex; justify-content: flex-end; flex: none; flex-wrap: wrap; gap: 9px; padding: 15px 19px; border-top: 1px solid var(--line); background: var(--surface); box-shadow: 0 -14px 24px rgba(0,0,0,.14); }
.modal-error { flex: 1 0 100%; }
.integrated-confirmation { display:grid;grid-template-columns:52px minmax(0,1fr);align-items:start;gap:14px;padding:15px;border:1px solid color-mix(in srgb,var(--accent) 35%,var(--line));border-radius:15px;background:color-mix(in srgb,var(--accent) 8%,var(--surface-2)); }
.integrated-confirmation.danger { border-color:rgba(244,63,94,.38);background:rgba(190,24,56,.10); }
.integrated-confirmation-icon { width:52px;height:52px;display:grid;place-items:center;border-radius:14px;color:var(--accent);background:color-mix(in srgb,var(--accent) 14%,transparent); }
.integrated-confirmation.danger .integrated-confirmation-icon { color:#fb7185;background:rgba(244,63,94,.14); }
.integrated-confirmation-icon .ui-icon { width:27px;height:27px; }
.integrated-confirmation strong { display:block;margin:3px 0 6px;font-size:1rem;line-height:1.35;color:var(--text); }
.integrated-confirmation p,.integrated-prompt-message { margin:0;color:var(--muted);line-height:1.5; }
.integrated-prompt-form { gap:14px; }
.integrated-prompt-message { padding:12px 13px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2); }
.map-markers-browser { display: grid; gap: 14px; }
.reference-browser-tabs { display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:5px;border:1px solid var(--line);border-radius:13px;background:var(--surface-2); }
.reference-browser-tabs button { display:flex;align-items:center;justify-content:center;gap:8px;min-height:46px;border:0;border-radius:9px;color:var(--muted);background:transparent;font-weight:850;cursor:pointer; }
.reference-browser-tabs button[aria-selected="true"] { color:#fff;background:#2474b5;box-shadow:0 6px 16px rgba(36,116,181,.25); }
.reference-browser-tabs button b { min-width:24px;padding:3px 7px;border-radius:999px;background:rgba(255,255,255,.1);font-size:.7rem; }
.reference-browser-tabs .ui-icon { width:18px;height:18px; }
.map-markers-browser-filters { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(150px, .55fr) minmax(150px, .45fr); gap: 10px; }
.map-markers-browser-summary { color: var(--muted); font-size: .72rem; font-weight: 750; }
.all-map-markers-list { display: grid; gap: 9px; }
.all-map-marker-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line-soft); border-radius: 13px; background: var(--surface-2); }
.all-map-marker-card.drill { border-style: dashed; border-color: rgba(243,199,84,.45); }
.all-map-marker-icon { width: 46px; height: 46px; display: grid; place-items: center; border: 2px solid var(--green); border-radius: 12px; background: var(--surface); font-size: 1.3rem; }
.all-map-marker-icon.priority-low { border-color: #86a39a; }
.all-map-marker-icon.priority-high { border-color: var(--yellow); }
.all-map-marker-icon.priority-critical { border-color: var(--red); }
.all-map-marker-icon.area { border-color:var(--reference-color,#8b5cf6);color:var(--reference-color,#8b5cf6); }
.all-map-marker-copy { min-width: 0; }
.all-map-marker-copy > strong { display: block; font-size: .86rem; }
.all-map-marker-copy > span { display: block; margin-top: 3px; color: var(--muted); font-size: .68rem; }
.all-map-marker-copy p { margin: 7px 0 0; color: #cad8d3; font-size: .74rem; line-height: 1.4; }
.all-map-marker-meta, .all-map-marker-audience { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 7px; color: var(--muted); font-size: .66rem; }
.all-map-marker-meta span + span::before { content: "·"; margin-right: 8px; }
.all-map-marker-actions { display: flex; justify-content: flex-end; gap: 7px; flex-wrap: wrap; max-width: 220px; }
.close-button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); color: var(--muted); background: transparent; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.check { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; color: #c8d7d2; font-size: .8rem; }
.setup-secret { padding: 14px; background: #050a09; border: 1px dashed var(--line); border-radius: 11px; font-family: ui-monospace, monospace; letter-spacing: .12em; text-align: center; word-break: break-all; }
.credential-card { display: grid; gap: 6px; margin-top: 16px; padding: 16px; background: #050a09; border: 1px solid var(--line); border-radius: 12px; }
.credential-card strong { font-size: 1rem; }
.temporary-password { color: var(--green); font: 800 1.8rem/1 ui-monospace, monospace; letter-spacing: .22em; }

.toast-region { position: fixed; z-index: 3000; right: 18px; bottom: 18px; display: grid; gap: 9px; width: min(360px, calc(100vw - 36px)); }
.toast { padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); box-shadow: var(--shadow); animation: toast-in .22s ease-out; font-size: .82rem; }
.toast.error { border-color: rgba(255,77,95,.45); }
.toast.success { border-color: rgba(65,214,152,.4); }

.emergency-callout-button { position: relative; z-index: 1250; flex: none; align-self: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 116px; height: 116px; padding: 10px; border: 4px solid rgba(255,255,255,.86); border-radius: 50%; color: #fff; background: linear-gradient(145deg,#f1374e,#a80821); box-shadow: 0 12px 34px rgba(239,55,78,.42),0 0 0 8px rgba(239,55,78,.15); cursor: pointer; font-weight: 900; letter-spacing: .04em; transition: transform .15s,filter .15s; }
.emergency-callout-button:hover { transform: translateY(-2px); filter: brightness(1.08); }
.emergency-callout-button span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: rgba(0,0,0,.22); font-size: 1.75rem; }.emergency-callout-button strong{font-size:.76rem;line-height:1.05}
.callout-warning { display: grid; gap: 4px; padding: 13px 15px; border: 1px solid rgba(255,77,95,.48); border-radius: 12px; background: rgba(255,77,95,.1); }
.callout-warning strong { color: #ff8794; }.callout-warning span { color: #d6c3c7; font-size: .78rem; line-height: 1.45; }
.callout-history-list,.responder-callout-list { display: grid; gap: 12px; }.callout-history-card { position: relative; overflow: hidden; border-left: 5px solid var(--callout-color); }
.callout-history-card.active { box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--callout-color) 48%,transparent); }
.callout-card-heading { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }.callout-card-heading h3 { margin: 5px 0; }.callout-card-heading p { margin: 0; color: var(--muted); line-height: 1.45; }
.callout-level { display: block; color: var(--callout-color); font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.callout-result-row { display: flex; flex-wrap: wrap; gap: 9px 22px; margin: 16px 0; padding: 11px 0; border-block: 1px solid var(--line-soft); color: var(--muted); font-size: .76rem; }.callout-result-row strong { color: var(--text); font-size: .95rem; }
.callout-response-group { margin-top: 17px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }.callout-response-group h3 { margin: 0 0 8px; font-size: .82rem; }.callout-person-row { display: flex; justify-content: space-between; gap: 15px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: .77rem; }.callout-person-row strong { color: var(--muted); font-weight: 600; }.callout-live-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.callout-live-groups { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }.callout-group-accepted { border-color: rgba(65,214,152,.35); }.callout-group-rejected { border-color: rgba(255,77,95,.35); }.callout-group-waiting { border-color: rgba(245,158,11,.35); }.callout-group-not-received { border-color: rgba(148,163,184,.28); }.callout-receipt-note { font-size: .72rem; }
.stats-page-heading .eyebrow { color: var(--green); font-size: .66rem; font-weight: 900; letter-spacing: .14em; }.callout-metrics { grid-template-columns: repeat(5,minmax(130px,1fr)); }.stats-metric { position: relative; overflow: hidden; }.stats-metric::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: #63736f; }.stats-metric.active::before { background: #ef4444; }.stats-metric.accepted::before { background: #41d698; }.stats-metric small { display: block; margin-top: 5px; color: var(--muted); font-size: .66rem; }.stats-status-guide { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); font-size: .7rem; font-weight: 700; }.stats-status-guide .accepted,.stats-result-row .accepted strong { color: #41d698; }.stats-status-guide .rejected,.stats-result-row .rejected strong { color: #ff6476; }.stats-status-guide .waiting,.stats-result-row .waiting strong { color: #fbbf24; }.stats-status-guide .not-received,.stats-result-row .not-received strong { color: #94a3b8; }.stats-filter-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }.stats-filter-heading strong,.stats-filter-heading span { display: block; }.stats-filter-heading span { margin-top: 3px; color: var(--muted); font-size: .7rem; }.stats-result-row { display: grid; grid-template-columns: repeat(4,minmax(90px,1fr)); gap: 8px; }.stats-result-row span { padding: 10px; border: 1px solid var(--line-soft); border-radius: 9px; background: rgba(255,255,255,.018); }.stats-result-row strong,.stats-result-row small { display: block; }.stats-result-row strong { font-size: 1.2rem; }.stats-result-row small { margin-top: 2px; font-size: .65rem; }.callout-card-heading small { display: block; margin-top: 9px; color: var(--muted); font-size: .68rem; }
.callout-location-preview { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; margin-top: 12px; padding: 12px 14px; border: 1px solid rgba(65,214,152,.35); border-radius: 11px; background: rgba(65,214,152,.07); }.callout-location-preview span { color: var(--green); font-size: .7rem; font-weight: 800; }.callout-location-preview strong { grid-row: 2; font-size: .78rem; }.callout-location-preview a { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--green); font-size: .7rem; }.callout-detail-summary > .button { margin: 8px 0; }
.callout-targeting { display: grid; gap: 11px; margin: 2px 0; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); }.callout-targeting legend,.response-members-fieldset legend { padding: 0 6px; color: var(--text); font-size: .76rem; font-weight: 850; }.callout-target-scope { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }.callout-target-choice { position: relative; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 10px; min-height: 74px; padding: 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); cursor: pointer; }.callout-target-choice:has(input:checked) { border-color: var(--green); background: rgba(65,214,152,.08); box-shadow: 0 0 0 2px rgba(65,214,152,.08); }.callout-target-choice.disabled { opacity: .5; cursor: not-allowed; }.callout-target-choice > input { position: absolute; top: 8px; right: 8px; accent-color: var(--green); }.callout-target-choice-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--green); background: rgba(65,214,152,.1); }.callout-target-choice-icon .ui-icon { width: 21px; height: 21px; }.callout-target-choice strong,.callout-target-choice small { display: block; }.callout-target-choice small { margin-top: 3px; padding-right: 12px; color: var(--muted); font-size: .67rem; line-height: 1.35; }.callout-group-picker { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 8px; padding-top: 3px; }.callout-group-choice { position: relative; display: grid; grid-template-columns: auto minmax(0,1fr); grid-template-rows: auto auto; align-items: center; column-gap: 9px; padding: 10px 34px 10px 10px; border: 1px solid var(--line-soft); border-radius: 10px; background: rgba(255,255,255,.018); cursor: pointer; }.callout-group-choice:has(input:checked) { border-color: #74c9ff; background: rgba(116,201,255,.08); }.callout-group-choice > input { position: absolute; top: 11px; right: 10px; accent-color: var(--green); }.callout-group-choice > span { grid-row: 1 / 3; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: #74c9ff; background: rgba(116,201,255,.09); }.callout-group-choice > span .ui-icon { width: 18px; height: 18px; }.callout-group-choice strong { font-size: .76rem; }.callout-group-choice small { color: var(--muted); font-size: .65rem; }.callout-target-help { margin: 0; color: var(--muted); font-size: .69rem; }.callout-target-summary { display: grid; grid-template-columns: auto auto minmax(0,1fr); align-items: center; gap: 7px; margin-top: 13px; padding: 10px 12px; border: 1px solid rgba(116,201,255,.24); border-radius: 10px; background: rgba(116,201,255,.055); }.callout-target-summary .ui-icon { width: 17px; height: 17px; color: #74c9ff; }.callout-target-summary span { color: var(--muted); font-size: .67rem; }.callout-target-summary strong { min-width: 0; font-size: .73rem; }.callout-target-summary.compact { width: fit-content; max-width: 100%; padding: 7px 10px; }
.emergency-live-eyebrow { display: inline-flex; align-items: center; gap: 7px; color: #ff6476 !important; }.emergency-live-eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: #ef334f; box-shadow: 0 0 0 5px rgba(239,51,79,.14); animation: emergency-live-dot 1.2s infinite; }.emergency-metrics { grid-template-columns: repeat(4,minmax(150px,1fr)); }.emergency-filter-panel { border-color: rgba(239,51,79,.25); }.emergency-live-list .callout-history-card.active { box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--callout-color) 48%,transparent),0 12px 30px rgba(0,0,0,.16); }.emergency-live-list > .empty { display: grid; gap: 5px; }.emergency-live-list > .empty span { color: var(--muted); font-size: .75rem; }
.alert-level-list { display: grid; gap: 8px; }.alert-level-row { display: grid; grid-template-columns: 15px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 11px; border: 1px solid var(--line); border-radius: 11px; }.alert-level-row i { width: 15px; height: 38px; border-radius: 7px; }.alert-level-row strong,.alert-level-row span { display: block; }.alert-level-row span { margin-top: 3px; color: var(--muted); font-size: .68rem; }.alert-level-form { grid-template-columns: minmax(0,1fr) 100px auto; align-items:end; border-top:1px solid var(--line); padding-top:16px; }.color-input { padding: 4px; min-height: 44px; }
.responder-callout-overlay { position: fixed; z-index: 1450; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); width: min(620px,calc(100vw - 24px)); transform: translateX(-50%); display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px; padding: 16px; border: 2px solid var(--callout-color); border-radius: 17px; background: rgba(25,7,9,.98); box-shadow: 0 16px 44px rgba(0,0,0,.65),0 0 32px color-mix(in srgb,var(--callout-color) 38%,transparent); animation: callout-pulse 1.25s infinite; }.callout-overlay-copy span { color: var(--callout-color); font-size: .67rem; font-weight:900; letter-spacing:.08em; }.callout-overlay-copy strong { display:block; margin-top:3px; font-size:1.12rem; }.callout-overlay-copy p { margin:5px 0 0; color:#eadcdf; font-size:.8rem; line-height:1.4; }.callout-overlay-actions { display:grid; grid-template-columns:1fr; gap:8px; align-content:center; }.callout-accept { color:#06130e; background:#41d698; border-color:#41d698; font-weight:900; }
.responder-callout-overlay.multiple { grid-template-columns: 1fr; max-height: min(72vh,680px); overflow-y: auto; }.callout-overlay-count { display: flex; justify-content: space-between; gap: 14px; padding-bottom: 11px; border-bottom: 1px solid rgba(255,255,255,.12); }.callout-overlay-count strong { color: #ff7182; font-size: .75rem; }.callout-overlay-count span { color: var(--muted); font-size: .7rem; }.responder-callout-overlay-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px; padding: 13px; border: 1px solid color-mix(in srgb,var(--callout-color) 50%,transparent); border-left: 4px solid var(--callout-color); border-radius: 12px; background: rgba(255,255,255,.035); }
.responder-callout-card { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; padding:13px; border:1px solid var(--line); border-left:4px solid var(--callout-color); border-radius:12px; background:var(--surface-2); }.responder-callout-card strong { display:block;margin-top:3px;}.responder-callout-card p { margin:5px 0 0;color:var(--muted);font-size:.75rem; }
.department-settings-content{display:grid;gap:15px}.settings-section{overflow:hidden}.settings-section .panel-header p{margin:4px 0 0;color:var(--muted);font-size:.74rem}.settings-operation-grid{display:grid;grid-template-columns:minmax(220px,1fr) minmax(220px,1fr) auto;gap:14px;align-items:end}.settings-delegation-picker{min-width:240px}.settings-level-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:10px}.settings-level-card{display:grid;grid-template-columns:12px minmax(0,1fr) auto;align-items:center;gap:11px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}.settings-level-card>i{width:12px;height:42px;border-radius:7px}.settings-level-card strong,.settings-level-card span{display:block}.settings-level-card span{margin-top:3px;color:var(--muted);font-size:.68rem}.settings-level-card.inactive{opacity:.62}.future-settings{border-style:dashed}
.response-group-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(310px,1fr)); gap: 10px; }.response-group-card { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }.response-group-card-icon { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 11px; color: #74c9ff; background: rgba(116,201,255,.09); }.response-group-card-icon .ui-icon { width: 23px; height: 23px; }.response-group-card-copy { min-width: 0; }.response-group-card-copy > strong,.response-group-card-copy > span { display: block; }.response-group-card-copy > span { margin-top: 3px; color: var(--muted); font-size: .68rem; }.response-group-members { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }.response-group-members .chip { max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.response-group-card-actions { align-self: start; }.response-group-form { gap: 15px; }.response-members-fieldset { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 13px; }.response-member-tools { display: flex; align-items: end; justify-content: space-between; gap: 12px; }.response-member-tools .field { flex: 1; }.response-member-summary { margin: 10px 0; color: var(--muted); font-size: .72rem; }.response-member-summary strong { color: var(--green); }.response-member-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; max-height: 390px; overflow-y: auto; padding: 2px; }.response-member-choice { position: relative; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 9px; min-height: 58px; padding: 9px 34px 9px 9px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface-2); cursor: pointer; }.response-member-choice:has(input:checked) { border-color: var(--green); background: rgba(65,214,152,.075); }.response-member-choice > input { position: absolute; top: 10px; right: 10px; accent-color: var(--green); }.response-member-choice.inactive { opacity: .55; }.response-member-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--green); background: rgba(65,214,152,.09); }.response-member-icon .ui-icon { width: 19px; height: 19px; }.response-member-choice strong,.response-member-choice small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.response-member-choice strong { font-size: .75rem; }.response-member-choice small { margin-top: 2px; color: var(--muted); font-size: .65rem; }
@keyframes callout-pulse { 50% { box-shadow:0 16px 44px rgba(0,0,0,.65),0 0 42px color-mix(in srgb,var(--callout-color) 58%,transparent); } }
@keyframes emergency-live-dot { 50% { opacity: .45; transform: scale(.78); } }

@keyframes sweep { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(1.06); filter: drop-shadow(0 0 14px rgba(65,214,152,.4)); } }
@keyframes pulse { 50% { opacity: .38; } }
@keyframes marker-pulse { 50% { box-shadow: 0 0 0 13px rgba(255,77,95,0), 0 5px 18px rgba(0,0,0,.5); transform: scale(1.05); } }
@keyframes monitor-location-pulse { from { opacity:.85; transform:scale(.78); } to { opacity:0; transform:scale(1.28); } }
@keyframes nav-emergency-pulse { 50% { background:rgba(225,29,63,.38); box-shadow:inset 3px 0 #ff334f,0 0 24px rgba(239,51,79,.26); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes responder-view-in { from { opacity: 0; transform: translateY(5px); } }

/* Emergencias y estadísticas: estructura de lectura y espaciado consistente. */
.content.callouts-content { width: min(100%, 1420px); margin-inline: auto; }
.content.callouts-content .stats-page-heading { align-items: center; margin-bottom: 22px; }
.content.callouts-content .stats-page-heading > div { max-width: 820px; }
.content.callouts-content .stats-page-heading h2 { margin-top: 7px; }
.content.callouts-content .metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.content.callouts-content .metric { min-height: 118px; padding: 18px 20px; display: flex; flex-direction: column; justify-content: center; }
.content.callouts-content .metric strong { font-size: 1.75rem; }
.content.callouts-content .stats-status-guide { margin: 4px 0 18px; padding: 13px 17px; }
.content.callouts-content .emergency-filter-panel,
.content.callouts-content .callout-filter-panel { margin: 18px 0 22px; padding: 18px; }
.content.callouts-content .emergency-filter-panel .audit-filter-grid { grid-template-columns: minmax(260px, 1fr) auto; align-items: end; }
.content.callouts-content .callout-filter-panel .audit-filter-grid { grid-template-columns: minmax(190px, 1fr) minmax(170px, .8fr) minmax(170px, .8fr) auto; align-items: end; }
.content.callouts-content .audit-filter-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.content.callouts-content .callout-history-list { display: grid; gap: 18px; }
.content.callouts-content .callout-history-card { padding: 0; border-radius: 16px; }
.content.callouts-content .callout-card-heading { padding: 19px 20px 17px; }
.content.callouts-content .callout-card-heading h3 { margin: 6px 0; font-size: 1.12rem; }
.content.callouts-content .callout-card-heading p { line-height: 1.5; }
.content.callouts-content .callout-card-heading .status-pill { flex: none; }
.content.callouts-content .callout-result-row { margin: 0; padding: 14px 20px; border-block: 1px solid var(--line-soft); }
.content.callouts-content .stats-result-row { gap: 10px; }
.content.callouts-content .stats-result-row span { min-height: 66px; padding: 11px 13px; display: flex; flex-direction: column; justify-content: center; }
.content.callouts-content .callout-history-card > .action-row { margin: 0; padding: 14px 20px 17px; justify-content: flex-start; }
.content.callouts-content .audit-pagination { margin-top: 4px; }

@media (max-width: 980px) {
    .content.callouts-content .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .content.callouts-content .callout-filter-panel .audit-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .content.callouts-content .audit-filter-actions { justify-content: flex-start; }
}

@media (max-width: 620px) {
    .responder-vehicle-picker { grid-template-columns:1fr; }
    .content.callouts-content { padding-inline: 12px; }
    .content.callouts-content .stats-page-heading { align-items: stretch; flex-direction: column; }
    .content.callouts-content .stats-page-heading .button { width: 100%; }
    .content.callouts-content .metric-grid { grid-template-columns: 1fr; }
    .content.callouts-content .emergency-filter-panel .audit-filter-grid,
    .content.callouts-content .callout-filter-panel .audit-filter-grid { grid-template-columns: 1fr; }
    .content.callouts-content .audit-filter-actions { display: grid; grid-template-columns: 1fr; }
    .content.callouts-content .callout-card-heading { align-items: flex-start; flex-direction: column; padding: 16px; }
    .content.callouts-content .callout-result-row { padding: 12px 16px; }
    .content.callouts-content .stats-result-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .content.callouts-content .callout-history-card > .action-row { padding: 13px 16px 16px; }
}

@media (max-width: 420px) {
    .login-apk-download { grid-template-columns: 40px minmax(0, 1fr); }
    .login-apk-action { display: none; }
}

@media (max-width: 1000px) {
    .metric-grid { grid-template-columns: 1fr 1fr; }
    .card-grid { grid-template-columns: 1fr 1fr; }
    .monitor-layout { grid-template-columns: 290px minmax(0, 1fr); }
}

@media (max-width: 760px) {
    .login-shell { display: block; }
    .login-panel { min-height: 100dvh; padding: 26px 22px; }
    .login-art { display: none; }
    .shell { display: block; }
    .sidebar { position: fixed; left: 0; right: 0; top: auto; bottom: 0; height: calc(68px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); padding: 7px 8px env(safe-area-inset-bottom); flex-direction: row; z-index: 1000; }
    .sidebar .brand, .sidebar-user { display: none; }
    .emergency-callout-button { position:fixed;right:14px;bottom:calc(82px + env(safe-area-inset-bottom));width:72px;height:72px;padding:6px; }.emergency-callout-button span { width:31px;height:31px;font-size:1.3rem }.emergency-callout-button strong { font-size:.56rem; }
    .nav { display: flex; overflow-x: auto; overflow-y: hidden; width: 100%; gap: 2px; scrollbar-width: none; }
    .nav::-webkit-scrollbar { display: none; }
    .nav-button { min-width: 76px; flex: 0 0 76px; flex-direction: column; justify-content: center; gap: 3px; padding: 6px 4px; font-size: .58rem; white-space: nowrap; }
    .nav-button.active { box-shadow: inset 0 -3px var(--green); }
    .nav-icon { font-size: 1rem; }
    .nav-emergency-count { position:absolute;top:2px;right:7px;min-width:18px;padding:2px 4px;font-size:.56rem; }
    .nav-button.emergency-attention { box-shadow:inset 0 -3px #ff334f; }
    .sidebar>.emergency-callout-button { margin-top: 0; }
    .topbar { top: 0; min-height: 60px; padding: 10px 14px; }
    .topbar h1 { font-size: .96rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .topbar-meta .live-pill { display: none; }
    .topbar-meta .department-context { max-width: 145px; }
    .topbar-meta .department-switcher { min-width: 145px; }
    .responder-top { align-items: flex-start; }
    .responder-top > .action-row { justify-content: flex-end; flex-wrap: wrap; }
    .responder-top .department-switcher, .responder-top .department-context { max-width: min(58vw, 240px); min-width: 0; }
    .department-invite-card { grid-template-columns: 1fr; margin: 12px; }
    .department-invite-card .button { width: 100%; }
    .join-admin-list { padding: 0 12px 12px; }
    .join-admin-list article { align-items: stretch; flex-direction: column; }
    .monitor-controls-button { display: inline-flex; }
    .content { padding: 18px 14px calc(90px + env(safe-area-inset-bottom)); }
    .responder-top { padding: 14px 14px 8px; }
    .responder-main { padding: 8px 14px calc(102px + env(safe-area-inset-bottom)); }
    .guard-hero { padding: 20px 14px; }
    .monitor-layout { display: block; min-height: calc(100dvh - 60px); padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
    .monitor-list {
        position: absolute; z-index: 1100; left: 10px; top: 70px; width: min(350px, calc(100vw - 20px));
        max-height: calc(100dvh - 150px); overflow-y: auto; border: 1px solid var(--line); border-radius: 15px;
        box-shadow: var(--shadow); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-8px);
        transition: opacity .18s ease, transform .18s ease, visibility .18s;
    }
    .monitor-list.mobile-expanded { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
    .responders { overflow: visible; }
    .map-wrap { min-height: calc(100dvh - 60px - 68px); }
    .map-legend { bottom: 12px; }
    .map-context-hint { display: none; }
    .map-style-switch { top: 12px; right: 12px; }
    .draw-area-button { top: 78px; left: 12px; padding: 8px 10px; }
    .monitor-locate-button { top: 120px; left: 12px; padding: 8px 10px; }
    .map-labels-toggle-button { top: 162px; left: 12px; padding: 8px 10px; }
    .area-drawing-toolbar { bottom: 78px; align-items: stretch; flex-direction: column; }
    .area-drawing-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .area-drawing-actions [data-area-finish] { grid-column: 1 / -1; }
    .area-drawing-actions.zone-icon-actions { display: grid; grid-template-columns: repeat(5, 46px); justify-content: end; }
    .area-drawing-actions.zone-icon-actions [data-area-finish] { grid-column: auto; }
    .leaflet-tooltip.operational-label-tooltip { max-width: min(120px, 30vw); font-size: .58rem; }
    .card-grid { grid-template-columns: 1fr; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .page-heading .button { width: 100%; }
    .panel-header { align-items: stretch; flex-direction: column; }
    .panel-header .input { max-width: none !important; }
    .input-row, .check-grid { grid-template-columns: 1fr; }
    .audit-filter-grid { grid-template-columns: 1fr 1fr; }
    .audit-filter-actions { grid-column: 1 / -1; }
    .table-wrap { overflow: visible; }
    .table.responsive-table, .table.responsive-table tbody { display: block; width: 100%; }
    .table.responsive-table thead { display: none; }
    .table.responsive-table tr { display: grid; gap: 2px; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
    .table.responsive-table tr:last-child { border-bottom: 0; }
    .table.responsive-table td {
        display: grid; grid-template-columns: minmax(84px, .34fr) minmax(0, 1fr); gap: 10px;
        align-items: start; min-width: 0; padding: 5px 0; border: 0;
    }
    .table.responsive-table td::before {
        content: attr(data-label); color: var(--muted); font-size: .62rem; font-weight: 800;
        letter-spacing: .06em; text-transform: uppercase;
    }
    .table.responsive-table td[data-label=""] { display: block; padding-top: 10px; }
    .table.responsive-table td[data-label=""]::before { display: none; }
    .table.responsive-table td[colspan] { display: block; padding: 24px 10px; }
    .table.responsive-table td[colspan]::before { display: none; }
    .table.responsive-table .table-user { min-width: 0; }
    .table.responsive-table .action-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(82px, 1fr)); }
    .modal-backdrop { padding: 8px; }
    .modal { max-height: calc(100dvh - 16px); border-radius: 14px; }
    .modal-header { padding: 14px 15px; }
    .modal-body { padding: 15px; }
    .modal-footer { padding: 12px 15px; }
    .modal-footer .button { flex: 1 1 120px; }
    .audit-detail-grid { grid-template-columns: minmax(96px, .34fr) minmax(0, 1fr); }
    .map-markers-browser-filters { grid-template-columns: 1fr; }
    .all-map-marker-card { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
    .all-map-marker-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); max-width: none; width: 100%; }
    .modal.map-markers-modal .modal-body { padding: 13px; }
    .callout-card-heading { flex-direction:column; }.alert-level-form { grid-template-columns:1fr 80px; }.alert-level-form .button { grid-column:1/-1; }.responder-callout-overlay,.responder-callout-overlay-item { grid-template-columns:1fr; }.callout-overlay-actions { grid-template-columns:1fr 1fr; }.emergency-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }.callout-overlay-count { flex-direction:column;gap:3px; }
    .settings-operation-grid{grid-template-columns:1fr}.settings-delegation-picker{width:100%;min-width:0}.settings-level-grid{grid-template-columns:1fr}
    .callout-target-scope,.response-member-list { grid-template-columns:1fr; }.callout-group-picker { grid-template-columns:1fr; }.callout-target-summary { grid-template-columns:auto minmax(0,1fr); }.callout-target-summary strong { grid-column:1/-1; }.response-group-grid { grid-template-columns:1fr; }.response-group-card { grid-template-columns:auto minmax(0,1fr); }.response-group-card-actions { grid-column:1/-1; display:grid; grid-template-columns:1fr 1fr; width:100%; }.response-member-tools { align-items:stretch; flex-direction:column; }.response-member-tools .action-row { display:grid;grid-template-columns:1fr 1fr; }.response-member-list { max-height:46dvh; }
}

@media (max-width: 390px) {
    .login-assistance-actions { grid-template-columns: 1fr; }
}

@media (max-width: 440px) {
    .login-secondary-actions { grid-template-columns: 1fr; }
    .onboarding-shell { padding: 10px; }
    .onboarding-card { padding: 20px 16px; }
    .join-request-list article { align-items: flex-start; flex-direction: column; }
    .metric-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .metric { padding: 12px; }
    .metric strong { font-size: 1.35rem; }
    .guard-actions { grid-template-columns: 1fr; }
    .responder-header-status { padding: 6px 8px; font-size: .62rem; }
    .responder-alert-preferences { grid-template-columns: 1fr 1fr; }
    .responder-alert-preferences > div { grid-column: 1 / -1; }
    .responder-alert-preferences #responder-test-alert { grid-column: 1 / -1; width: 100%; }
    .responder-preference { justify-content: center; }
    .responder-account-details { grid-template-columns: 84px minmax(0, 1fr); font-size: .82rem; }
    .audit-filter-grid { grid-template-columns: 1fr; }
    .audit-filter-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .audit-pagination { gap: 8px; justify-content: space-between; }
    .audit-pagination span { text-align: center; }
    .audit-detail-grid, .audit-nested { grid-template-columns: 1fr; }
    .audit-detail-grid > span { padding-bottom: 4px; border-bottom: 0; }
    .audit-detail-grid > strong { padding-top: 3px; }
    .responder-map-heading { align-items: flex-start; flex-direction: column; }
    .responder-map-heading .action-row { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
    .responder-marker-card { grid-template-columns: auto minmax(0, 1fr); }
    .responder-marker-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr; width: 100%; }
    .route-summary { align-items: flex-start; flex-direction: column; }
    .route-summary-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
    .marker-audience-picker { grid-template-columns: 1fr 1fr; }
    .map-area-color-picker { grid-template-columns: 1fr 1fr; }
}

/* Responder mobile workspace: calm, operational and touch-first. */
.responder-shell {
    --responder-accent: #39c58a;
    background:
        radial-gradient(circle at 50% -10%, rgba(57,197,138,.12), transparent 32rem),
        #07100e;
}
.responder-top {
    position: sticky;
    top: 0;
    z-index: 1080;
    min-height: 72px;
    border-bottom: 1px solid rgba(183,220,207,.1);
    background: rgba(7,16,14,.94);
    backdrop-filter: blur(18px);
}
.responder-top .brand { letter-spacing: .08em; }
.responder-top .brand img { width: 38px; height: 38px; }
.responder-top .action-row { min-width: 0; }
.responder-top .department-switcher { min-width: 190px; }
.responder-top .department-switcher .select { min-height: 40px; }
.responder-main { width: 100%; }
.responder-view.active { animation-duration: .12s; }
.guard-hero { padding-top: 22px; padding-bottom: 16px; }
.guard-hero-eyebrow {
    display: block;
    margin-bottom: 14px;
    color: var(--responder-accent);
    font-size: .66rem;
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.guard-hero h1 { letter-spacing: -.025em; }
.guard-hero p { font-weight: 650; }
.guard-card,
.responder-map-panel,
.responder-news-panel,
.responder-frequencies-panel,
.responder-account-panel,
.responder-callouts-panel {
    box-shadow: 0 14px 38px rgba(0,0,0,.22);
}
.guard-card { border-color: rgba(183,220,207,.16); }
.guard-state > div { min-width: 0; }
.guard-state > div > span { display: block; margin-top: 4px; line-height: 1.4; }
.gps-card {
    min-height: 68px;
    border: 1px solid rgba(65,214,152,.16);
    background: linear-gradient(135deg, rgba(65,214,152,.08), rgba(19,33,30,.8));
}
.gps-icon { width: 42px; height: 42px; border-radius: 12px; font-size: 1.12rem; }
.gps-card #queue-count { white-space: nowrap; }
.transport-mode-check,
.consent { min-height: 48px; }
.consent input,
.transport-mode-check input,
.responder-preference input { width: 20px; height: 20px; flex: none; }
.guard-actions .button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.guard-actions .ui-icon { width: 18px; height: 18px; }
.battery-note { padding: 11px 12px; border-radius: 10px; background: rgba(255,255,255,.025); }
.responder-bottom-nav { box-shadow: 0 -10px 34px rgba(0,0,0,.48); }
.responder-nav-button { min-height: 56px; }
.responder-nav-button.active { color: #7ce6b9; background: rgba(65,214,152,.1); }
.responder-nav-button:focus-visible,
.responder-sos-shortcut:focus-visible { outline: 3px solid rgba(65,214,152,.48); outline-offset: -2px; }
.responder-sos-shortcut { transition: transform .15s ease, filter .15s ease; }
.responder-sos-shortcut:active { transform: scale(.96); }
.responder-map-actions .button { min-height: 40px; white-space: nowrap; }
.responder-area-filters { padding: 12px 14px 2px; margin: 0; }
.responder-map-style { max-width: calc(100% - 24px); overflow-x: auto; scrollbar-width: none; }
.responder-map-style::-webkit-scrollbar { display: none; }
.responder-map-style button { min-height: 36px; white-space: nowrap; }
.responder-locate-button { min-height: 48px; }
.responder-marker-card { min-height: 66px; }
.responder-marker-focus { width: 44px; height: 44px; }
.responder-section-heading > div { min-width: 0; }
.responder-frequency { min-height: 96px; }
.responder-account-panel { padding: 18px; }
.responder-account-settings { margin-inline: 0; }
.membership-callout-list { display: grid; gap: 8px; width: 100%; }
.membership-callout-option { min-height: 54px; justify-content: flex-start; background: rgba(255,255,255,.02); }
.membership-callout-option > span,
.membership-callout-option strong,
.membership-callout-option small { display: block; }
.membership-callout-option small { margin-top: 2px; color: var(--muted); font-size: .64rem; }
.responder-callout-card { min-height: 76px; }
.responder-callout-overlay { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.callout-overlay-actions .button { min-height: 46px; }

@media (max-width: 620px) {
    .responder-top {
        display: grid;
        grid-template-columns: auto minmax(0,1fr);
        align-items: center;
        gap: 10px;
        padding: max(10px, env(safe-area-inset-top)) 12px 10px;
    }
    .responder-top .brand span { display: none; }
    .responder-top .brand img { width: 36px; height: 36px; }
    .responder-top > .action-row { display: flex; flex-wrap: nowrap; width: 100%; min-width: 0; }
    .responder-top .department-switcher,
    .responder-top .department-context { width: 100%; max-width: none; min-width: 0; }
    .responder-top .department-switcher > span,
    .responder-top .department-context small { display: none; }
    .responder-top .department-switcher .select,
    .responder-top .department-context { min-height: 44px; }
    .responder-top .responder-header-status { display: none; }
    .responder-top [data-action="install"] { min-height: 44px; flex: none; }
    .responder-main { padding: 10px 12px calc(104px + env(safe-area-inset-bottom)); }
    .guard-hero { padding: 12px 8px 14px; }
    .guard-hero-eyebrow { margin-bottom: 10px; }
    .guard-avatar { width: 72px; height: 72px; margin-bottom: 12px; }
    .guard-hero h1 { font-size: 1.35rem; }
    .guard-card { margin-top: 8px; padding: 16px; }
    .guard-state { align-items: flex-start; margin-bottom: 14px; }
    .guard-state .status-pill { flex: none; padding: 6px 8px; font-size: .6rem; }
    .guard-state strong { font-size: 1rem; }
    .guard-card .form { margin-top: 18px; gap: 13px; }
    .sos-button { width: min(224px, 66vw); margin-block: 20px; }
    .sos-button strong { font-size: 1.8rem; }
    .responder-bottom-nav {
        min-height: calc(76px + env(safe-area-inset-bottom));
        padding: 7px 8px max(7px, env(safe-area-inset-bottom));
        border-radius: 20px 20px 0 0;
    }
    .responder-nav-button { min-height: 58px; font-size: .68rem; }
    .responder-nav-icon .ui-icon { width: 23px; height: 23px; }
    .responder-sos-shortcut {
        right: 14px;
        bottom: calc(88px + env(safe-area-inset-bottom));
        width: 60px;
        height: 60px;
    }
    .responder-map-panel { margin-top: 4px; border-radius: 14px; }
    .responder-map-heading { padding: 14px; }
    .responder-map-heading .action-row {
        display: flex;
        width: calc(100% + 2px);
        max-width: 100%;
        gap: 7px;
        overflow-x: auto;
        padding: 2px 2px 5px;
        scrollbar-width: none;
    }
    .responder-map-heading .action-row::-webkit-scrollbar { display: none; }
    .responder-map-actions .button { flex: 0 0 auto; }
    .responder-area-filters { grid-template-columns: 1fr 1fr; gap: 7px; padding: 10px; }
    .responder-area-filters .select { min-width: 0; padding: 10px 30px 10px 10px; font-size: .7rem; }
    .responder-map-wrap { height: calc(100dvh - 286px); min-height: 390px; max-height: 620px; }
    .responder-map-style { top: 10px; left: 48px; right: auto; }
    .responder-map-style button { padding-inline: 9px !important; }
    .responder-icon-size-control { right: 10px; bottom: 72px; width: 132px; }
    .responder-locate-button { bottom: 14px; width: calc(100% - 118px); min-width: 0; max-width: 230px; }
    .routing-privacy { padding: 10px 12px; }
    .responder-section-heading { min-height: 62px; padding: 13px 14px; }
    .responder-marker-list,
    .responder-frequency-list { padding: 10px; }
    .responder-account-panel { padding: 12px; }
    .responder-account-identity { padding-top: 10px; }
    .responder-account-details { gap: 10px 14px; padding: 16px 4px; }
    .responder-alert-preferences { padding: 12px; }
    .responder-account-actions { grid-template-columns: 1fr; }
    .responder-callout-overlay {
        bottom: calc(84px + env(safe-area-inset-bottom));
        width: calc(100vw - 16px);
        max-height: calc(100dvh - 110px - env(safe-area-inset-top));
        border-radius: 16px;
    }
    .responder-callout-overlay-item { gap: 12px; padding: 12px; }
    .offline-banner { max-width: calc(100vw - 24px); text-align: center; }
    .responder-shell .offline-banner { bottom: calc(88px + env(safe-area-inset-bottom)); }
}

@media (max-width: 380px) {
    .responder-main { padding-inline: 9px; }
    .guard-card { padding: 14px; }
    .gps-card { grid-template-columns: auto minmax(0,1fr); }
    .gps-card #queue-count { grid-column: 1 / -1; justify-self: stretch; text-align: center; }
    .responder-area-filters { grid-template-columns: 1fr; }
    .responder-map-wrap { height: calc(100dvh - 330px); }
    .responder-nav-button { font-size: .61rem; }
    .responder-nav-icon .ui-icon { width: 21px; height: 21px; }
}

/* En pantallas intermedias el menú secundario se abre dentro de la barra lateral.
   Así no invade el mapa ni queda recortado contra el borde de la ventana. */
@media (min-width: 761px) and (max-width: 1180px) {
    .shell .nav-more-menu {
        right: auto;
        bottom: calc(100% + 8px);
        left: 0;
        grid-template-columns: 1fr;
        width: 100%;
        max-height: min(56dvh, 430px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    .shell .nav-more-menu .nav-button,
    .shell .nav-more-menu .support-nav-link {
        min-height: 44px;
        justify-content: flex-start;
        padding: 9px 10px;
        font-size: .74rem;
    }
}

/* Consola de Monitoreo: sistema visual institucional 2026. */
.shell {
    --bg: #081018;
    --surface: #101a23;
    --surface-2: #16232d;
    --surface-3: #1b2b36;
    --line: #293b47;
    --line-soft: rgba(204, 226, 235, .1);
    --text: #edf5f7;
    --muted: #9aafb8;
    --green: #35c493;
    --green-dark: #12664d;
    --shadow: 0 18px 44px rgba(1, 7, 12, .24);
    grid-template-columns: 252px minmax(0, 1fr);
    background: var(--bg);
}

.shell .sidebar {
    padding: 22px 16px 18px;
    border-color: rgba(179, 207, 218, .12);
    background:
        radial-gradient(circle at 15% 2%, rgba(53, 196, 147, .09), transparent 28%),
        linear-gradient(180deg, #0d1820 0%, #0a141c 100%);
    box-shadow: 8px 0 32px rgba(0, 0, 0, .12);
}

.shell .sidebar .brand {
    min-height: 54px;
    padding: 0 10px 20px;
    border-bottom: 1px solid var(--line-soft);
    font-size: .95rem;
    letter-spacing: .09em;
}

.shell .sidebar .brand img { width: 38px; height: 38px; }
.shell .nav { gap: 4px; margin-top: 15px; }
.shell .nav-button {
    min-height: 44px;
    gap: 12px;
    padding: 10px 11px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #9fb2ba;
    font-size: .82rem;
    font-weight: 680;
    transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease;
}

.shell .nav-button:hover {
    color: #eef7f8;
    border-color: rgba(179, 207, 218, .1);
    background: rgba(255, 255, 255, .035);
    transform: translateX(2px);
}

.shell .nav-button.active {
    color: #f3fbfa;
    border-color: rgba(53, 196, 147, .17);
    background: linear-gradient(90deg, rgba(53, 196, 147, .15), rgba(53, 196, 147, .045));
    box-shadow: inset 3px 0 #35c493;
}

.shell .nav-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    color: #86a7b1;
    background: rgba(255, 255, 255, .035);
}

.shell .nav-button.active .nav-icon { color: #67d6ae; background: rgba(53, 196, 147, .1); }
.shell .nav-icon .ui-icon { width: 17px; height: 17px; }

.shell .sidebar > .emergency-callout-button {
    width: 104px;
    height: 104px;
    margin: 30px auto 0;
    border-width: 3px;
    border-color: rgba(255, 255, 255, .86);
    background: linear-gradient(145deg, #e9364f, #ad132a);
    box-shadow: 0 12px 30px rgba(189, 25, 48, .3), 0 0 0 7px rgba(221, 41, 68, .1);
}

.shell .sidebar > .emergency-callout-button:hover { transform: translateY(-2px) scale(1.02); }
.shell .sidebar > .emergency-callout-button strong { font-size: .71rem; letter-spacing: .055em; }
.shell .sidebar-user { padding: 16px 3px 0; border-color: var(--line-soft); }
.shell .sidebar-user .avatar { width: 38px; height: 38px; border-color: #314752; }
.shell .sidebar-user strong { font-size: .79rem; }

.shell .main { background: var(--bg); }
.shell .topbar {
    min-height: 70px;
    padding: 12px clamp(18px, 2.4vw, 32px);
    border-color: rgba(179, 207, 218, .11);
    background: rgba(9, 17, 24, .94);
    box-shadow: 0 7px 24px rgba(0, 0, 0, .1);
    backdrop-filter: blur(18px);
}

.shell .topbar h1 { font-size: 1.02rem; font-weight: 740; letter-spacing: -.015em; }
.shell .topbar-meta { gap: 10px; }
.shell .live-pill,
.shell .mode-pill,
.shell .status-pill { padding: 7px 11px; border-color: #2b414d; background: rgba(13, 26, 34, .78); }
.shell .live-dot { background: #35c493; box-shadow: 0 0 0 4px rgba(53, 196, 147, .11); }
.shell .department-context,
.shell .department-switcher .select { border-color: #2b414d; background: #101c25; }

.shell .content { padding: clamp(22px, 2.6vw, 36px); }
.shell .page-heading { margin-bottom: 26px; }
.shell .page-heading h2 { font-size: clamp(1.6rem, 2.5vw, 2.12rem); font-weight: 760; letter-spacing: -.035em; }
.shell .page-heading p { max-width: 72ch; line-height: 1.55; }
.shell .eyebrow { color: #5ad1aa; font-size: .67rem; letter-spacing: .14em; }

.shell .panel,
.shell .metric {
    border-color: #293c48;
    background: linear-gradient(145deg, rgba(18, 31, 40, .98), rgba(14, 25, 33, .98));
    box-shadow: 0 14px 38px rgba(1, 7, 12, .17);
}

.shell .panel { border-radius: 15px; }
.shell .panel-header { min-height: 68px; padding: 16px 19px; border-color: var(--line-soft); }
.shell .panel-header h3 { font-size: .94rem; font-weight: 740; }
.shell .panel-header p { line-height: 1.45; }
.shell .panel-body { padding: 19px; }
.shell .metric {
    min-height: 106px;
    padding: 18px;
    border-radius: 14px;
    transition: border-color .18s ease, transform .18s ease;
}
.shell .metric:hover { border-color: #3a5360; transform: translateY(-1px); }
.shell .metric span { color: #97adb5; font-size: .66rem; font-weight: 760; }
.shell .metric strong { margin-top: 10px; font-size: 1.72rem; }

.shell .input,
.shell .select,
.shell .textarea {
    min-height: 44px;
    border-color: #2b414d;
    border-radius: 10px;
    background: #0e1a22;
}
.shell .input:hover,
.shell .select:hover,
.shell .textarea:hover { border-color: #3b5663; }
.shell .input:focus,
.shell .select:focus,
.shell .textarea:focus { border-color: #35c493; box-shadow: 0 0 0 3px rgba(53, 196, 147, .11); }
.shell .button { min-height: 40px; border-radius: 10px; font-size: .78rem; }
.shell .button.primary { background: #35c493; box-shadow: 0 6px 18px rgba(53, 196, 147, .12); }
.shell .button.ghost { border-color: #2b414d; background: rgba(16, 29, 38, .78); }
.shell .button.ghost:hover { border-color: #466270; background: #192a35; }
.shell .button.danger-button { background: #a91d35; border-color: #d63a52; box-shadow: 0 7px 20px rgba(169, 29, 53, .18); }

/* El mapa vuelve a ser el elemento principal de la estación. */
.shell .monitor-layout { grid-template-columns: 356px minmax(0, 1fr); min-height: calc(100dvh - 70px); }
.shell .monitor-list {
    border-color: rgba(179, 207, 218, .12);
    background: #0d1820;
    box-shadow: 10px 0 30px rgba(0, 0, 0, .1);
}
.shell .monitor-toolbar { gap: 11px; padding: 17px; border-color: var(--line-soft); }
.shell .address-search-block { gap: 9px; padding: 0 0 16px; }
.shell .address-search-form { grid-template-columns: minmax(0, 1fr) auto; }
.shell .address-search-form .button { padding-inline: 13px; }
.shell .address-search-status { font-size: .67rem; line-height: 1.5; }
.shell .monitor-filter-label { margin-top: 2px; color: #b4c5cb; font-size: .66rem; letter-spacing: .11em; }
.shell .monitor-toolbar .input,
.shell .monitor-toolbar .select { min-height: 41px; padding: 9px 10px; font-size: .72rem; }
.shell .filter-row { gap: 8px; }
.shell .responders { padding: 10px; }
.shell .responder-card { min-height: 62px; padding: 10px 11px; border-radius: 11px; }
.shell .responder-card:hover,
.shell .responder-card.active { border-color: #304854; background: #15242d; }
.shell .responder-card strong { font-size: .8rem; }
.shell .responder-card small { font-size: .67rem; line-height: 1.35; }
.shell .map-wrap { min-height: calc(100dvh - 70px); overflow: hidden; background: #0a151c; }
.shell #map { background: #0a151c; }
.shell .leaflet-control-zoom a {
    width: 36px;
    height: 36px;
    line-height: 36px;
    border-color: #30434d;
    color: #eef7f8;
    background: rgba(11, 24, 31, .94);
}
.shell .draw-area-button,
.shell .monitor-locate-button,
.shell .map-labels-toggle-button { top: 16px; min-height: 38px; padding: 8px 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .23); }
.shell .draw-area-button { left: 58px; }
.shell .monitor-locate-button { left: 194px; }
.shell .map-labels-toggle-button { left: 308px; }
.shell .map-style-switch { top: 16px; right: 16px; border-color: #30434d; border-radius: 10px; background: rgba(11, 24, 31, .94); box-shadow: 0 8px 24px rgba(0, 0, 0, .23); }
.shell .map-style-button { min-height: 30px; padding: 7px 9px !important; font-size: .64rem; }
.shell .map-style-button.active { background: #35c493; }
.shell .map-legend {
    left: 16px;
    bottom: 16px;
    max-width: calc(100% - 32px);
    padding: 9px 11px;
    border-color: #30434d;
    border-radius: 10px;
    background: rgba(11, 24, 31, .92);
    box-shadow: 0 9px 28px rgba(0, 0, 0, .2);
}
.shell .legend-item { font-size: .65rem; }
.shell .map-context-hint,
.shell .map-icon-size-control { border-color: #30434d; background: rgba(11, 24, 31, .92); box-shadow: 0 9px 28px rgba(0, 0, 0, .2); }

/* Tablas, configuraciones y reportes con mejor ritmo de lectura. */
.shell .table { font-size: .78rem; }
.shell .table th {
    padding: 12px 14px;
    color: #91aab3;
    background: rgba(255, 255, 255, .018);
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .075em;
    text-transform: uppercase;
}
.shell .table td { padding: 13px 14px; border-color: var(--line-soft); }
.shell .table tbody tr { transition: background .16s ease; }
.shell .table tbody tr:hover { background: rgba(255, 255, 255, .018); }
.shell .card-grid { gap: 14px; }
.shell .settings-section { border-color: #293c48; }
.shell .settings-level-card,
.shell .response-group-card { border-color: #2a404b; background: #13212a; }
.shell .audit-filter-grid { gap: 12px; }
.shell .audit-pagination { padding-block: 10px; }

.shell .content.callouts-content { width: min(100%, 1380px); }
.shell .content.callouts-content .stats-page-heading { margin-bottom: 25px; }
.shell .content.callouts-content .metric-grid { gap: 12px; }
.shell .content.callouts-content .metric { min-height: 112px; padding: 18px; }
.shell .content.callouts-content .emergency-filter-panel,
.shell .content.callouts-content .callout-filter-panel { padding: 16px 18px; }
.shell .stats-status-guide { border-color: #293c48; background: #111f28; }
.shell .callout-history-card { border-color: #2b414d; overflow: hidden; }
.shell .callout-card-heading { background: rgba(255, 255, 255, .012); }
.shell .stats-result-row span { border-color: #2a404b; background: #121f28; }
.shell .emergency-live-list .callout-history-card.active { box-shadow: inset 3px 0 var(--callout-color), 0 12px 30px rgba(0, 0, 0, .17); }

@media (min-width: 761px) and (max-width: 1180px) {
    .shell { grid-template-columns: 218px minmax(0, 1fr); }
    .shell .sidebar { padding-inline: 11px; }
    .shell .monitor-layout { grid-template-columns: 312px minmax(0, 1fr); }
    .shell .map-labels-toggle-button { top: 60px; left: 58px; }
    .shell .map-style-switch { max-width: 250px; overflow-x: auto; }
}

@media (min-width: 761px) and (max-width: 1050px) {
    .shell .draw-area-button { top: 60px; left: 58px; }
    .shell .monitor-locate-button { top: 60px; left: 194px; }
    .shell .map-labels-toggle-button { top: 104px; left: 58px; }
}

@media (max-width: 760px) {
    .shell { display: block; }
    .shell .sidebar {
        padding: 7px 8px env(safe-area-inset-bottom);
        background: rgba(9, 18, 25, .98);
        box-shadow: 0 -8px 30px rgba(0, 0, 0, .22);
    }
    .shell .nav { margin: 0; }
    .shell .nav-button { min-height: 54px; min-width: 76px; padding: 5px 4px; font-size: .57rem; }
    .shell .nav-button:hover { transform: none; }
    .shell .nav-icon { width: 24px; height: 24px; background: transparent; }
    .shell .nav-button.active { box-shadow: inset 0 -3px #35c493; }
    .shell .sidebar > .emergency-callout-button {
        width: 74px;
        height: 74px;
        right: 13px;
        bottom: calc(82px + env(safe-area-inset-bottom));
        margin: 0;
        box-shadow: 0 10px 26px rgba(189, 25, 48, .34), 0 0 0 5px rgba(221, 41, 68, .1);
    }
    .shell .topbar { min-height: 62px; padding: 9px 13px; }
    .shell .topbar-meta { gap: 6px; }
    .shell .topbar-meta .department-switcher { min-width: 132px; }
    .shell .department-switcher .select { min-height: 38px; }
    .shell .content { padding: 18px 13px calc(92px + env(safe-area-inset-bottom)); }
    .shell .monitor-layout { display: block; min-height: calc(100dvh - 62px); }
    .shell .monitor-list { top: 68px; max-height: calc(100dvh - 150px); background: #0d1921; }
    .shell .monitor-toolbar { padding: 15px; }
    .shell .address-search-form { grid-template-columns: 1fr; }
    .shell .map-wrap { min-height: calc(100dvh - 62px - 68px); }
    .shell .draw-area-button { top: 74px; left: 12px; }
    .shell .monitor-locate-button { top: 118px; left: 12px; }
    .shell .map-labels-toggle-button { top: 162px; left: 12px; }
    .shell .map-style-switch { top: 12px; right: 12px; max-width: calc(100vw - 76px); overflow-x: auto; }
    .shell .map-style-button { flex: none; }
    .shell .map-legend { display: none; }
    .shell .metric:hover { transform: none; }
    .shell .table.responsive-table tr { padding: 13px 14px; }
}

@media (max-width: 460px) {
    .shell .topbar h1 { max-width: 102px; font-size: .85rem; }
    .shell .topbar-meta .department-switcher { min-width: 120px; max-width: 140px; }
    .shell .content.callouts-content .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shell .content.callouts-content .metric { min-height: 98px; padding: 13px; }
    .shell .content.callouts-content .metric strong { font-size: 1.45rem; }
}

@media (max-width: 760px) {
    .shell .sidebar > .emergency-callout-button {
        width: 62px !important;
        height: 62px !important;
        right: 10px;
        bottom: calc(76px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 390px) {
    .shell .nav-button { min-width: 68px !important; flex-basis: 68px !important; }
}

@media (prefers-reduced-motion: reduce) {
    .shell *,
    .shell *::before,
    .shell *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* UX/UI v72: consolidación final de consola, formularios y experiencia móvil. */
.shell,
.shell .main,
.shell #page,
.shell .content,
.responder-shell,
.responder-main { min-width: 0; }

.shell .main,
.shell #page { overflow-x: clip; }
.shell .content:not(.monitor-content) { width: min(100%, 1460px); margin-inline: auto; }
.shell .page-heading { align-items: center; }
.shell .page-heading > div { min-width: 0; }
.shell .page-heading h2,
.shell .page-heading p { overflow-wrap: anywhere; }
.shell .page-heading p { color: #9eb2b9; }
.shell .panel-header { gap: 18px; }
.shell .panel-header > div { min-width: 0; }
.shell .panel-header p { max-width: 76ch; }
.shell .empty { min-height: 92px; display: grid; place-content: center; gap: 5px; text-align: center; }
.shell .empty.compact { min-height: 68px; }

.shell .settings-retention-check {
    min-height: 72px;
    align-self: stretch;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    padding: 12px 14px;
    border: 1px solid #2b414d;
    border-radius: 11px;
    background: #101d25;
}
.shell .settings-retention-check > span,
.shell .settings-retention-check strong,
.shell .settings-retention-check small { display: block; min-width: 0; }
.shell .settings-retention-check strong { color: #edf7f5; font-size: .78rem; line-height: 1.3; }
.shell .settings-retention-check small { margin-top: 4px; color: #91a7af; font-size: .67rem; line-height: 1.42; }
.shell .settings-retention-check input { width: 19px; height: 19px; accent-color: #35c493; }
.shell .settings-operation-grid > .button { min-height: 44px; }

.shell .department-invite-card { overflow: hidden; }
.shell .department-invite-card strong { max-width: 100%; }
.shell .table-wrap { max-width: 100%; border-radius: 0 0 14px 14px; }
.shell .table td,
.shell .table th { vertical-align: middle; }
.shell .table .action-row { justify-content: flex-end; }
.shell .users-table .user-membership { min-width: 0; }
.shell .users-table .user-membership .action-row { flex: none; }
.shell .audit-filter-grid > *,
.shell .filter-row > *,
.shell .form-grid > * { min-width: 0; }

.shell .modal-card { border-color: #314954; box-shadow: 0 24px 70px rgba(0, 0, 0, .52); }
.shell .modal-header { position: sticky; top: 0; z-index: 2; background: rgba(15, 28, 36, .98); }
.shell .modal-actions { position: sticky; bottom: 0; z-index: 2; padding-top: 13px; border-top: 1px solid var(--line-soft); background: linear-gradient(180deg, rgba(15, 28, 36, .72), #0f1c24 24%); }
.shell .field > span,
.responder-shell .field > span { color: #c8d8dc; font-weight: 720; }
.shell .field > small,
.responder-shell .field > small { line-height: 1.45; }

.responder-shell .panel,
.responder-shell .responder-card,
.responder-shell .responder-status-card { border-color: #263c45; }
.responder-shell .button { min-height: 46px; font-weight: 760; }
.responder-shell .button.primary { color: #04120d; }
.responder-shell .responder-view-heading p { max-width: 64ch; line-height: 1.5; }
.responder-shell .responder-nav { scrollbar-width: none; }
.responder-shell .responder-nav::-webkit-scrollbar,
.shell .nav::-webkit-scrollbar { display: none; }

@media (min-width: 761px) {
    .shell .content:not(.monitor-content) { padding-inline: clamp(30px, 3.2vw, 54px); }
    .shell .settings-operation-grid { grid-template-columns: minmax(210px, .8fr) minmax(210px, .8fr) minmax(320px, 1.35fr); }
    .shell .settings-operation-grid > .button { width: min(100%, 360px); }
    .shell .users-table td:first-child { min-width: 250px; }
    .shell .users-table td:nth-child(2) { min-width: 390px; }
}

@media (max-width: 980px) and (min-width: 761px) {
    .shell .settings-operation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shell .settings-retention-check,
    .shell .settings-operation-grid > .button { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
    .shell .main { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
    .shell .topbar { gap: 8px; }
    .shell .topbar h1 { min-width: 0; max-width: min(34vw, 126px); }
    .shell .topbar-meta { min-width: 0; }
    .shell .topbar-meta .department-switcher { min-width: 0; width: min(42vw, 156px); }
    .shell .topbar-meta .department-switcher .select { width: 100%; padding-inline: 9px 28px; text-overflow: ellipsis; }
    .shell .content:not(.monitor-content) { padding: 18px 12px calc(34px + env(safe-area-inset-bottom)); }
    .shell .page-heading { align-items: stretch; gap: 14px; margin-bottom: 18px; }
    .shell .page-heading h2 { font-size: clamp(1.45rem, 7.2vw, 1.82rem); line-height: 1.08; }
    .shell .page-heading p { font-size: .83rem; line-height: 1.5; }
    .shell .page-heading > .button,
    .shell .page-heading > .field { width: 100%; }
    .shell .panel { border-radius: 13px; }
    .shell .panel-header { min-height: 0; align-items: stretch; flex-direction: column; padding: 15px; }
    .shell .panel-header > .button,
    .shell .panel-header > .action-row { width: 100%; }
    .shell .panel-header > .action-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shell .panel-header > .button,
    .shell .panel-header > .action-row .button { min-width: 0; width: 100%; }
    .shell .panel-body { padding: 15px; }
    .shell .button { min-height: 44px; }
    .shell .button.small { min-height: 42px; }
    .shell .settings-operation-grid { gap: 12px; }
    .shell .settings-operation-grid > .button { width: 100%; }
    .shell .settings-retention-check { min-height: 82px; }
    .shell .department-invite-card { margin: 12px; padding: 13px; }
    .shell .department-invite-card strong { white-space: normal; overflow-wrap: anywhere; }
    .shell .stats-filter-heading { align-items: flex-start; }
    .shell .stats-filter-heading .button { flex: none; }
    .shell .audit-filter-actions,
    .shell .callout-history-card > .action-row { display: grid; grid-template-columns: 1fr; }
    .shell .callout-history-card > .action-row .button { width: 100%; }
    .shell .nav { scroll-snap-type: x proximity; scroll-padding-inline: calc(50vw - 38px); overscroll-behavior-x: contain; }
    .shell .nav-button { scroll-snap-align: center; }
    .shell .nav-button.active { color: #effaf7; background: rgba(53, 196, 147, .1); }
    .shell .sidebar > .emergency-callout-button { z-index: 1300; }
    .shell .modal-card { width: calc(100vw - 18px); max-height: calc(100dvh - 18px); border-radius: 15px; }
    .shell .modal-body { padding: 15px; }
    .shell .modal-actions { grid-template-columns: 1fr; padding: 13px 15px max(15px, env(safe-area-inset-bottom)); }
    .shell .modal-actions .button { width: 100%; }

    .responder-shell .responder-main { padding-inline: 11px; }
    .responder-shell .panel { border-radius: 14px; }
    .responder-shell .action-row { gap: 8px; }
    .responder-shell .action-row .button { min-width: 0; }
    .responder-shell .responder-nav { scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
    .responder-shell .responder-nav-button { scroll-snap-align: center; }
}

@media (max-width: 390px) {
    .shell .topbar h1 { max-width: 92px; font-size: .79rem; }
    .shell .topbar-meta .department-switcher { width: 126px; }
    .shell .page-heading h2 { font-size: 1.42rem; }
    .shell .stats-result-row { grid-template-columns: 1fr; }
    .shell .panel-header > .action-row { grid-template-columns: 1fr; }
}

/* Responder móvil v75: mapa sin elementos superpuestos. */

@media (max-width: 620px) {
    .device-status-strip {
        top: 65px;
        display: grid;
        grid-template-columns: repeat(5, minmax(104px, 1fr));
        width: 100%;
        max-width: 100vw;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x proximity;
        scroll-padding-inline: 10px;
        overscroll-behavior-x: contain;
    }
    .device-status { width: auto; min-width: 104px; scroll-snap-align: start; }
    .responder-map-heading { gap: 12px; }
    .responder-map-heading > div:first-child strong { font-size: 1.16rem; }
    .responder-map-heading > div:first-child span { font-size: .72rem; line-height: 1.42; }
    .responder-map-heading .action-row.responder-map-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
        width: 100%;
        max-width: none;
        overflow: visible;
        padding: 0;
    }
    .responder-map-actions .button {
        width: 100%;
        min-width: 0;
        min-height: 42px;
        padding: 8px 6px;
        overflow: hidden;
        font-size: .66rem;
        line-height: 1.15;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .responder-map-actions .button:nth-child(4) { grid-column: 1 / -1; }
    .responder-area-filters { padding: 9px; }
    .responder-area-filters .select { min-height: 44px; }
    .responder-map-style {
        left: 48px;
        right: 10px;
        width: auto;
        max-width: none;
        padding: 3px;
    }
    .responder-map-style button {
        flex: 1 1 0;
        min-width: 0;
        min-height: 34px;
        padding-inline: 7px !important;
        font-size: .62rem;
    }
    .responder-device-check { align-items: stretch; flex-direction: column; gap: 10px; }
    .responder-device-check .button { width: 100%; }
    .responder-app-version { grid-template-columns: 38px minmax(0,1fr); }
    .responder-app-version .button { grid-column: 1 / -1; width: 100%; }
    .leaflet-tooltip.operational-area-label,
    .leaflet-tooltip.operational-label-tooltip {
        box-sizing: border-box;
        max-width: min(72vw, 230px);
        overflow: hidden;
    }
    .leaflet-tooltip.operational-area-label {
        display: -webkit-box;
        font-size: .63rem;
        line-height: 1.25;
        overflow-wrap: anywhere;
        white-space: normal;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
    }
    .leaflet-tooltip.operational-label-tooltip {
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 380px) {
    .responder-map-heading .action-row.responder-map-actions { grid-template-columns: 1fr 1fr; }
    .responder-map-actions .button:nth-child(3),
    .responder-map-actions .button:nth-child(4) { grid-column: auto; }
    .responder-map-style button { padding-inline: 5px !important; font-size: .58rem; }
}

/* Auditoría v76: lectura rápida y mapa centrado en la operación. */
.responder-shell { --muted: #a9bdb5; }
.device-status-strip {
    display: block;
    width: min(100%, 720px);
    margin: 0 auto;
    padding: 8px 20px 10px;
    overflow: visible;
}
.device-health-summary {
    display: grid;
    grid-template-columns: 9px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-height: 48px;
    padding: 9px 11px;
    border: 1px solid #29423a;
    border-radius: 11px;
    background: #101d19;
}
.device-health-summary > i { width: 8px; height: 8px; border-radius: 50%; background: #49d49f; box-shadow: 0 0 0 4px rgba(73,212,159,.1); }
.device-health-summary.warning > i { background: #f5b942; box-shadow: 0 0 0 4px rgba(245,185,66,.1); }
.device-health-summary strong,
.device-health-summary small { display: block; min-width: 0; }
.device-health-summary strong { color: #eaf6f1; font-size: .78rem; }
.device-health-summary small { margin-top: 2px; color: #a6bbb3; font-size: .72rem; line-height: 1.35; }
.device-health-summary > span { color: #84dcb4; font-size: .68rem; font-weight: 760; white-space: nowrap; }

.responder-map-heading { align-items: center; padding: 16px 17px; }
.responder-map-heading > div { min-width: 0; }
.responder-map-heading strong { color: #f0faf6; font-size: 1.06rem; }
.responder-map-heading span { color: #a9bdb5; font-size: .78rem; line-height: 1.45; }
.responder-layers-button { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 42px; white-space: nowrap; }
.responder-layers-button .ui-icon { width: 17px; height: 17px; }
.responder-map-layers { padding: 12px 14px 14px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.018); }
.responder-map-layers .responder-map-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.responder-map-layers .responder-map-actions .button { min-width: 0; min-height: 42px; padding: 8px; font-size: .72rem; white-space: nowrap; }
.responder-map-layers .responder-area-filters { padding: 10px 0 0; }
.responder-map-wrap { height: clamp(410px, 62dvh, 620px); }

.responder-shell .field > span,
.responder-shell .responder-section-heading span,
.responder-shell .responder-marker-card span,
.responder-shell .routing-privacy,
.responder-shell .battery-note { font-size: .75rem; line-height: 1.48; }
.responder-shell .button { font-size: .8rem; }
.responder-shell .responder-nav-button { font-size: .73rem; }
.responder-shell .responder-frequency span,
.responder-shell .responder-marker-card span { color: #afc3bb; }

.shell { --muted: #a7bac2; }
.shell .monitor-filter-label { color: #bed0d6; font-size: .72rem; }
.shell .monitor-toolbar .input,
.shell .monitor-toolbar .select { font-size: .78rem; }
.shell .table th { color: #b3c6cd; font-size: .69rem; }
.shell .table td,
.shell .panel-header p,
.shell .metric small { font-size: .78rem; line-height: 1.45; }
.shell .empty { color: #b2c5ca; }

@media (max-width: 620px) {
    .device-status-strip { top: 65px; padding: 8px 12px 10px; }
    .device-health-summary { grid-template-columns: 8px minmax(0, 1fr); padding: 9px 10px; }
    .device-health-summary > span { grid-column: 2; font-size: .66rem; }
    .responder-map-heading { align-items: stretch; gap: 12px; padding: 14px; }
    .responder-layers-button { width: 100%; justify-content: center; }
    .responder-map-layers { padding: 10px; }
    .responder-map-layers .responder-map-actions { grid-template-columns: 1fr 1fr; }
    .responder-map-layers .responder-map-actions .button { font-size: .74rem; }
    .responder-map-layers .responder-map-actions .button:nth-child(3) { grid-column: 1 / -1; }
    .responder-map-wrap { height: calc(100dvh - 244px); min-height: 440px; max-height: 660px; }
    .responder-map-style { top: 10px; }
}

@media (max-width: 380px) {
    .responder-map-layers .responder-map-actions { grid-template-columns: 1fr; }
    .responder-map-layers .responder-map-actions .button:nth-child(3) { grid-column: auto; }
    .responder-map-wrap { height: calc(100dvh - 226px); min-height: 400px; }
}

#responder-map.marker-placement-active { cursor: crosshair; }

/* Personal: logotipo protegido, estado legible y nombre opcional en el mapa. */
.marker-avatar {
    overflow: visible;
    isolation: isolate;
    background: transparent;
    box-shadow: 0 7px 20px rgba(0,0,0,.58), 0 0 0 2px rgba(4,12,10,.42);
}
.marker-avatar-logo {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 28%, #f8fffc 0%, #dcebe6 56%, #bed4ca 100%);
}
.marker-avatar .marker-avatar-fallback,
.marker-avatar .marker-avatar-logo img { z-index: 1; }
.marker-avatar-status {
    position: absolute;
    z-index: 3;
    right: -3px;
    top: -3px;
    width: 13px;
    height: 13px;
    border: 2px solid #0a1512;
    border-radius: 50%;
    background: #73807c;
    box-shadow: 0 1px 5px rgba(0,0,0,.6);
}
.marker-avatar.online .marker-avatar-status { background: #42df9c; }
.marker-avatar.delayed .marker-avatar-status { background: #f5b942; }
.marker-avatar.offline .marker-avatar-status { background: #8b9a95; }
.marker-avatar.sos .marker-avatar-status { background: #ff4d63; animation: marker-pulse 1s infinite; }
.marker-avatar-mode {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: -8px;
    min-width: 29px;
    padding: 2px 4px;
    border: 1px solid rgba(222,245,235,.64);
    border-radius: 999px;
    color: #effbf6;
    background: #10231d;
    box-shadow: 0 2px 7px rgba(0,0,0,.6);
    font: 800 7px/1 system-ui, sans-serif;
    letter-spacing: .045em;
    text-align: center;
    transform: translateX(-50%);
    white-space: nowrap;
}
.marker-avatar-name {
    position: absolute;
    z-index: 3;
    left: calc(100% + 7px);
    top: 50%;
    max-width: 105px;
    overflow: hidden;
    padding: 4px 7px;
    border: 1px solid rgba(201,226,215,.42);
    border-radius: 7px;
    color: #f0faf5;
    background: rgba(8,19,16,.93);
    box-shadow: 0 3px 10px rgba(0,0,0,.48);
    font: 750 10px/1.15 system-ui, sans-serif;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: translateY(-50%);
}
.marker-avatar.delayed .marker-avatar-name { border-color: rgba(245,185,66,.72); }
.marker-avatar.offline .marker-avatar-name { color: #c0cfca; border-color: rgba(140,157,150,.62); }
.marker-avatar.sos .marker-avatar-name { border-color: rgba(255,77,99,.92); color: #fff4f5; }

@media (max-width: 620px) {
    .marker-avatar-name { max-width: 82px; font-size: 9px; }
}

@media (max-width: 760px) {
    #responder-map.map-page-scroll { touch-action: pan-y !important; }
    .responder-map-gesture-button {
        position: absolute;
        z-index: 720;
        bottom: 76px;
        left: 14px;
        display: inline-flex;
        align-items:center;
        gap:7px;
        min-height: 44px !important;
        padding: 9px 12px !important;
        border-radius:999px;
        border-color: rgba(117,183,248,.66);
        background: rgba(8,27,47,.94) !important;
        box-shadow: 0 6px 18px rgba(0,0,0,.34);
        font-size: .72rem !important;
        font-weight:850;
    }
    .responder-map-gesture-button .ui-icon { width:18px;height:18px;flex:none; }
    .responder-map-gesture-button[aria-pressed="true"] {
        border-color: rgba(57,209,194,.8);
        color: #dffffa;
        background: #0c4151 !important;
    }
}

@media (max-width: 380px) {
}

/* Paleta institucional Emerges: azul profundo, cian operativo y rojo reservado a urgencias. */
:root {
    --bg: #071526;
    --surface: #0d2036;
    --surface-2: #142b45;
    --surface-3: #1b3857;
    --line: #2a4b6b;
    --line-soft: rgba(174, 207, 238, .14);
    --text: #f0f6ff;
    --muted: #9eb5cd;
    --green: #39d1c2;
    --green-dark: #0b5b66;
    --yellow: #ffc15a;
    --red: #ef476f;
    --red-dark: #8b1f3c;
    --blue: #67b7ff;
    --shadow: 0 20px 60px rgba(0, 6, 18, .42);
}
html, body { background: radial-gradient(circle at 78% -10%, rgba(54,124,181,.17), transparent 38%), var(--bg); }
.login-shell { background: radial-gradient(circle at 72% 38%, rgba(46,134,184,.23), transparent 35%), linear-gradient(135deg, #071526, #0a1d33); }
.login-panel { background: rgba(7,21,38,.86); }
.radar-visual { background: repeating-radial-gradient(circle, transparent 0 68px, rgba(89,184,220,.13) 69px 70px), linear-gradient(rgba(57,209,194,.11) 1px, transparent 1px), linear-gradient(90deg, rgba(57,209,194,.11) 1px, transparent 1px); }
.radar-visual::after { background: conic-gradient(from 0deg, transparent 0 76%, rgba(57,209,194,.38) 93%, transparent); }
.visual-caption { background: rgba(13,32,54,.9); }

.responder-shell {
    --responder-accent: #39d1c2;
    --responder-surface: #0d2036;
    --responder-line: #2a4b6b;
    background: #071526;
}
.responder-shell .button.primary { color: #061725; background: #39d1c2; }
.responder-shell .button.ghost { border-color: #315878; background: #102741; }
.responder-shell .input,
.responder-shell .select,
.responder-shell .textarea { border-color: #315878; background: #0a1a2d; }
.device-health-summary { border-color: #315878; background: #10243d; }

.shell { --muted: #9eb5cd; background: #071526; }
.shell .sidebar { border-color: #254664; background: #091a2d; }
.shell .topbar { border-color: #254664; background: rgba(7,21,38,.93); }
.shell .monitor-list { border-color: rgba(161,202,235,.16); background: #0b1d31; }
.shell .input,
.shell .select,
.shell .textarea { border-color: #315878; background: #0c2036; }
.shell .input:hover,
.shell .select:hover,
.shell .textarea:hover { border-color: #47789d; }
.shell .input:focus,
.shell .select:focus,
.shell .textarea:focus { border-color: #39d1c2; box-shadow: 0 0 0 3px rgba(57,209,194,.14); }
.shell .button.primary,
.shell .map-style-button.active { color: #061725; background: #39d1c2; box-shadow: 0 6px 18px rgba(57,209,194,.16); }
.shell .button.ghost { border-color: #315878; background: rgba(14,37,61,.88); }
.shell .button.ghost:hover { border-color: #4a789b; background: #163553; }
.shell .responder-card:hover,
.shell .responder-card.active { border-color: #3c6688; background: #163552; }
.shell .map-wrap,
.shell #map { background: #091b30; }
.shell .leaflet-control-zoom a,
.shell .map-style-switch,
.shell .map-legend,
.shell .map-context-hint,
.shell .map-icon-size-control { border-color: #315878; background: rgba(9,27,48,.94); }
.shell .settings-level-card,
.shell .response-group-card { border-color: #315878; background: #112a45; }
.shell .stats-status-guide { border-color: #315878; background: #102641; }

.marker-avatar-mode { background: #0d2943; border-color: rgba(172,220,241,.7); }
.marker-avatar-name { border-color: rgba(149,208,237,.5); background: rgba(8,27,47,.94); }

/* Emerges v105 · identidad operativa sobria y acciones universales por icono. */
:root {
    --bg: #080f18;
    --surface: #101b28;
    --surface-2: #162434;
    --surface-3: #1d3043;
    --line: #2b4053;
    --line-soft: rgba(194, 211, 226, .11);
    --text: #f2f6fa;
    --muted: #9babb9;
    --green: #4aa6a0;
    --green-dark: #1e5555;
    --yellow: #d9a441;
    --red: #e13d52;
    --red-dark: #851f31;
    --blue: #5d94bc;
    --shadow: 0 16px 44px rgba(0, 5, 12, .38);
    --radius: 14px;
}

html, body { background: #080f18; }
.login-shell { background: radial-gradient(circle at 77% 34%, rgba(46,82,108,.2), transparent 36%), linear-gradient(135deg, #080f18, #0c1723); }
.login-panel { background: rgba(8,15,24,.92); border-right: 1px solid #253747; }
.eyebrow { color: #7dafb2; }
.radar-visual { border-color: #2a3c4b; background: repeating-radial-gradient(circle, transparent 0 68px, rgba(102,144,160,.09) 69px 70px), linear-gradient(rgba(94,132,150,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(94,132,150,.07) 1px, transparent 1px); }
.radar-visual::after { background: conic-gradient(from 0deg, transparent 0 76%, rgba(74,166,160,.24) 93%, transparent); }

.panel, .modal, .entity-card, .metric, .guard-card {
    border-color: #2b4053;
    box-shadow: 0 12px 34px rgba(0,5,12,.25);
}
.button { min-height: 42px; border-radius: 9px; font-weight: 740; }
.button.primary { color: #071416; background: #65b9b2; }
.button.ghost { border-color: #334b5f; background: rgba(19,34,49,.82); }
.button.danger-button { color: #fff; border-color: #b62d42; background: #981f35; }
.input, .select, .textarea { border-color: #31475a; border-radius: 9px; background: #0c1723; }
.input:focus, .select:focus, .textarea:focus { border-color: #65b9b2; box-shadow: 0 0 0 3px rgba(101,185,178,.13); }

.icon-action,
.map-action-icon {
    position: relative;
    display: inline-grid !important;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    line-height: 1;
    text-decoration: none;
}
.icon-action .ui-icon,
.map-action-icon .ui-icon { width: 21px; height: 21px; }
.icon-action.is-busy .ui-icon,
.map-action-icon.is-busy .ui-icon { opacity: 0; }
.icon-action.is-busy::after,
.map-action-icon.is-busy::after {
    content: "";
    position: absolute;
    width: 17px;
    height: 17px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: icon-action-spin .7s linear infinite;
}
.popup-actions.map-popup-icon-actions { display: flex; align-items: center; gap: 8px; }
.responder-marker-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.responder-shell { --responder-accent: #65b9b2; --responder-surface: #101b28; --responder-line: #2b4053; background: #080f18; }
.responder-shell .button.primary { color: #071416; background: #65b9b2; }
.responder-shell .button.ghost { border-color: #334b5f; background: #142333; }
.responder-shell .input, .responder-shell .select, .responder-shell .textarea { border-color: #334b5f; background: #0c1723; }
.device-health-summary { border-color: #334b5f; background: #142333; }
.responder-bottom-nav { border-color: #2a3d4f; background: rgba(8,15,24,.97); }
.responder-bottom-nav button.active { color: #8ed0ca; background: #152a35; }

.shell { --muted: #9babb9; background: #080f18; }
.shell .sidebar { border-color: #263a4b; background: #0b1520; }
.shell .topbar { border-color: #263a4b; background: rgba(8,15,24,.95); }
.shell .nav-button.active { color: #dceaf0; border-color: #3f6572; background: #172c38; }
.shell .monitor-list, .shell .map-wrap, .shell #map { border-color: #2b4053; background: #0c1723; }
.shell .input, .shell .select, .shell .textarea { border-color: #334b5f; background: #0c1723; }
.shell .button.primary, .shell .map-style-button.active { color: #071416; background: #65b9b2; box-shadow: none; }
.shell .button.ghost { border-color: #334b5f; background: #142333; }
.shell .responder-card:hover, .shell .responder-card.active { border-color: #496678; background: #172838; }

/* Panel operativo lateral: conserva el mapa visible y reúne el detalle técnico. */
.monitor-map-workspace { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; min-height: calc(100dvh - 70px); background: #0c1723; transition: grid-template-columns .18s ease; }
.monitor-map-workspace.detail-open { grid-template-columns: minmax(0, 1fr) 370px; }
.monitor-map-workspace .map-wrap { min-width: 0; }
.map-detail-panel { position: relative; z-index: 720; min-width: 0; overflow: auto; border-left: 1px solid #2b4053; background: #0d1a27; box-shadow: -12px 0 30px rgba(0,0,0,.24); }
.map-detail-panel-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 70px; padding: 14px 16px; border-bottom: 1px solid #2b4053; background: rgba(13,26,39,.96); backdrop-filter: blur(12px); }
.map-detail-panel-header span, .map-detail-panel-header strong { display: block; }
.map-detail-panel-header span { color: #92a9b8; font-size: .62rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.map-detail-panel-header strong { margin-top: 3px; font-size: .9rem; }
.map-detail-panel-body { display: grid; gap: 16px; padding: 16px; }
.map-detail-heading { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 12px; }
.map-detail-heading h3 { margin: 3px 0 2px; font-size: 1.08rem; }
.map-detail-heading p { margin: 0; color: #9eb2bf; font-size: .74rem; }
.map-detail-eyebrow { color: #63d7c2; font-size: .62rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.map-detail-section-title { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.map-detail-section-title strong, .map-detail-section-title span { display: block; }
.map-detail-section-title strong { font-size: .8rem; }
.map-detail-section-title span { color: #8299a8; font-size: .6rem; text-align: right; }
.map-device-health { display: grid; gap: 10px; padding: 13px; border: 1px solid #294151; border-radius: 13px; background: #101f2d; }
.map-device-health-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.map-device-health-item { position: relative; display: grid; grid-template-columns: 30px minmax(0,1fr) 7px; align-items: center; gap: 8px; min-height: 54px; padding: 8px; border: 1px solid #2b4252; border-radius: 10px; background: #132433; }
.map-device-health-item > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #9cb1bd; background: #1b3040; }
.map-device-health-item .ui-icon { width: 17px; height: 17px; }
.map-device-health-item small, .map-device-health-item strong { display: block; min-width: 0; }
.map-device-health-item small { color: #91a5b1; font-size: .58rem; }
.map-device-health-item strong { margin-top: 2px; overflow: hidden; font-size: .69rem; text-overflow: ellipsis; white-space: nowrap; }
.map-device-health-item > i { width: 7px; height: 7px; border-radius: 50%; background: #70838d; box-shadow: 0 0 0 4px rgba(112,131,141,.1); }
.map-device-health-item.ok > i { background: #42d6a4; box-shadow: 0 0 0 4px rgba(66,214,164,.11); }
.map-device-health-item.warning > i { background: #f3b94f; box-shadow: 0 0 0 4px rgba(243,185,79,.11); }
.map-device-health-item.error > i { background: #ff5c72; box-shadow: 0 0 0 4px rgba(255,92,114,.12); }
.map-device-platform { margin: 0; color: #8299a8; font-size: .62rem; }
.map-detail-facts { display: grid; gap: 0; overflow: hidden; border: 1px solid #294151; border-radius: 12px; }
.map-detail-facts > div { display: grid; grid-template-columns: 108px minmax(0,1fr); gap: 10px; padding: 10px 12px; border-bottom: 1px solid #233949; }
.map-detail-facts > div:last-child { border-bottom: 0; }
.map-detail-facts span { color: #8fa4b1; font-size: .65rem; }
.map-detail-facts strong { font-size: .72rem; text-align: right; }
.map-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.map-detail-actions > * { flex: 1; }
.map-detail-panel .popup-title { margin: 0; }
.map-detail-panel .popup-grid { border-color: #294151; }
.map-detail-panel .popup-actions { margin-bottom: 0; }
.monitor-detail-popup .leaflet-popup-content-wrapper {
    border: 1px solid #345367;
    border-radius: 18px;
    background: #0d1a27;
    box-shadow: 0 18px 46px rgba(0,0,0,.42);
}
.monitor-detail-popup .leaflet-popup-content {
    width: min(390px, calc(100vw - 72px)) !important;
    max-height: min(72vh, 620px);
    margin: 16px;
    overflow: auto;
    color: #eef7f5;
}
.monitor-detail-popup .leaflet-popup-tip { background: #0d1a27; }
.monitor-detail-popup .leaflet-popup-close-button {
    width: 34px;
    height: 34px;
    color: #c8d8df !important;
    font-size: 24px;
    line-height: 32px;
}
.monitor-detail-popup .map-device-health-grid { grid-template-columns: 1fr; }
.monitor-detail-popup .popup-actions { margin-bottom: 0; }
.responder-technical-warning, .responder-technical-ok, .responder-technical-pending { display: block; margin-top: 5px; font-size: .6rem; font-style: normal; font-weight: 760; line-height: 1.3; }
.responder-technical-warning { color: #f3b94f; }
.responder-technical-ok { color: #63d7a8; }
.responder-technical-pending { color: #8fa4b1; }

@media (max-width: 1320px) {
    .shell .monitor-layout:has(.monitor-map-workspace.detail-open) { grid-template-columns: 290px minmax(0,1fr); }
    .monitor-map-workspace.detail-open { grid-template-columns: minmax(0,1fr) 300px; }
    .map-device-health-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .monitor-map-workspace, .monitor-map-workspace.detail-open { display: block; min-height: calc(100dvh - 62px - 68px); }
    .map-detail-panel { position: fixed; z-index: 1400; right: 8px; bottom: calc(76px + env(safe-area-inset-bottom)); left: 8px; width: auto; max-height: min(64dvh,620px); border: 1px solid #355064; border-radius: 18px; box-shadow: 0 18px 54px rgba(0,0,0,.58); }
    .map-detail-panel-header { min-height: 60px; border-radius: 18px 18px 0 0; }
    .map-device-health-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 430px) {
    .map-device-health-grid { grid-template-columns: 1fr; }
}
.shell .leaflet-control-zoom a, .shell .map-style-switch, .shell .map-legend, .shell .map-context-hint, .shell .map-icon-size-control { border-color: #334b5f; background: rgba(10,22,34,.95); }

.offline-banner { color: #f5f8fa; border: 1px solid #8b6829; background: #5f461d; box-shadow: 0 12px 34px rgba(0,0,0,.4); }

@keyframes icon-action-spin { to { transform: rotate(360deg); } }

@media (max-width: 620px) {
    .popup-actions.map-popup-icon-actions { justify-content: flex-start; }
    .icon-action, .map-action-icon { width: 46px; min-width: 46px; height: 46px; }
}
.operational-map-selector{display:grid;gap:10px;padding:12px;border:1px solid color-mix(in srgb,var(--line) 78%,#22c7a9 22%);border-radius:14px;background:linear-gradient(145deg,rgba(34,199,169,.06),rgba(255,255,255,.018))}
.operational-map-selector-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.operational-map-selector-heading strong,.operational-map-selector-heading span{display:block}.operational-map-selector-heading strong{font-size:.78rem}.operational-map-selector-heading span{margin-top:2px;color:var(--muted);font-size:.64rem;line-height:1.35}
.operational-map-checklist{display:grid;gap:6px;max-height:190px;overflow:auto}.operational-map-option{display:grid;grid-template-columns:auto 9px minmax(0,1fr) auto;align-items:center;gap:8px;min-height:42px;padding:7px 9px;border:1px solid var(--line-soft);border-radius:10px;background:rgba(3,12,18,.28);cursor:pointer}.operational-map-option:has(input:checked){border-color:color-mix(in srgb,var(--operational-map-color) 60%,var(--line));background:color-mix(in srgb,var(--operational-map-color) 9%,transparent)}.operational-map-option input{width:16px;height:16px;margin:0;accent-color:var(--operational-map-color)}.operational-map-option input:disabled{opacity:.72}.operational-map-option>i,.operational-map-inline-dot{width:9px;height:9px;border-radius:50%;background:var(--operational-map-color);box-shadow:0 0 0 3px color-mix(in srgb,var(--operational-map-color) 18%,transparent)}.operational-map-option strong,.operational-map-option small{display:block;min-width:0}.operational-map-option strong{overflow:hidden;font-size:.71rem;text-overflow:ellipsis;white-space:nowrap}.operational-map-option small{margin-top:2px;color:var(--muted);font-size:.59rem}.operational-map-option>b{min-width:24px;padding:3px 6px;border-radius:999px;color:var(--muted);background:rgba(255,255,255,.05);font-size:.61rem;text-align:center}.operational-map-inline-dot{display:inline-block;margin-right:7px;vertical-align:middle}
.operational-map-manager{display:grid;gap:18px}.operational-map-manager-list{display:grid;gap:8px}.operational-map-manager-row{display:grid;grid-template-columns:12px minmax(0,1fr) auto;align-items:center;gap:12px;padding:13px;border:1px solid var(--line);border-radius:13px;background:var(--surface-2)}.operational-map-manager-row>i{width:12px;height:44px;border-radius:7px;background:var(--operational-map-color)}.operational-map-manager-row strong,.operational-map-manager-row span,.operational-map-manager-row small{display:block}.operational-map-manager-row span{margin-top:3px;color:var(--muted);font-size:.69rem}.operational-map-manager-row small{margin-top:5px;color:var(--muted);font-size:.64rem}.operational-map-create-form{padding-top:18px;border-top:1px solid var(--line)}.operational-map-create-form h3{margin:0}.responder-operational-map-selector{margin-bottom:10px}
@media(max-width:760px){.operational-map-checklist{max-height:160px}.operational-map-manager-row{grid-template-columns:10px minmax(0,1fr)}.operational-map-manager-row>.action-row{grid-column:2}.responder-operational-map-selector{padding:10px}.operational-map-option{min-height:46px}}

/* Emerges v111 · sistema visual operativo unificado. */
:root {
    --bg: #07111b;
    --surface: #0d1a27;
    --surface-2: #132536;
    --surface-3: #193247;
    --line: #29445a;
    --line-soft: rgba(188, 214, 232, .12);
    --text: #f3f7fa;
    --muted: #a9bbc8;
    --green: #58c7bc;
    --green-dark: #174f50;
    --blue: #6eb2e2;
    --yellow: #e0ac4f;
    --red: #e34357;
    --red-dark: #8d2134;
    --radius: 14px;
    --shadow: 0 18px 48px rgba(0, 5, 12, .42);
}

body { color: var(--text); background: var(--bg); font-size: 15px; }
.button, .input, .select, .textarea { font-size: .875rem; }
.button { min-height: 44px; border-radius: 10px; letter-spacing: .005em; }
.button.primary { color: #061416; background: #6acbc2; }
.button.ghost { color: #e6eef4; border-color: #36566d; background: #122333; }
.button.danger-button { border-color: #c7364b; background: #9e2639; }
.input, .select, .textarea { min-height: 46px; border-color: #36566d; border-radius: 10px; background: #091521; }
.field > span { margin-bottom: 7px; color: #dbe7ee; font-size: .8rem; font-weight: 760; }
.panel, .modal, .entity-card, .metric, .guard-card { border-color: #29445a; background: #0d1a27; }

/* Monitoreo: mapa protagonista, información agrupada y lectura rápida. */
.shell .sidebar { width: 236px; border-color: #223a4d; background: #081521; }
.shell .nav-button { min-height: 46px; border-radius: 10px; color: #afc1cd; }
.shell .nav-button:hover { color: #f1f7fa; background: rgba(110,178,226,.08); }
.shell .nav-button.active { color: #f4fbfa; border-color: #3c6f78; background: #14303b; box-shadow: inset 3px 0 #65c8bd; }
.shell .topbar { min-height: 66px; border-color: #223a4d; background: rgba(7,17,27,.96); }
.shell .topbar h1 { font-size: 1.08rem; font-weight: 760; }
.monitor-layout { grid-template-columns: 356px minmax(0,1fr); min-height: calc(100dvh - 66px); }
.monitor-list { border-color: #29445a; background: #0a1723; }
.monitor-toolbar { gap: 12px; padding: 14px; }
.monitor-toolbar-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 2px 5px; }
.monitor-toolbar-heading span, .monitor-toolbar-heading strong { display: block; }
.monitor-toolbar-heading span { color: #70bdb8; font-size: .68rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.monitor-toolbar-heading strong { margin-top: 3px; font-size: 1rem; }
.monitor-toolbar-heading small { color: #91a8b7; font-size: .7rem; text-align: right; }
.address-search-block, .monitor-filter-disclosure { border: 1px solid #29445a; border-radius: 13px; background: #0f2030; }
.address-search-block { padding: 11px; }
.address-search-status { color: #a9bbc8; font-size: .73rem; line-height: 1.45; }
.monitor-filter-disclosure { overflow: hidden; }
.monitor-filter-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 10px 12px; cursor: pointer; list-style: none; }
.monitor-filter-disclosure > summary::-webkit-details-marker { display: none; }
.monitor-filter-disclosure > summary::after { content: '⌄'; color: #75cfc5; font-size: 1.1rem; transition: transform .16s ease; }
.monitor-filter-disclosure[open] > summary::after { transform: rotate(180deg); }
.monitor-filter-disclosure summary span, .monitor-filter-disclosure summary small { display: block; }
.monitor-filter-disclosure summary span { font-size: .8rem; font-weight: 800; }
.monitor-filter-disclosure summary small { margin-left: auto; color: #8fa4b2; font-size: .66rem; }
.monitor-filter-body { display: grid; gap: 9px; padding: 0 11px 11px; border-top: 1px solid #253d50; }
.monitor-filter-body > :first-child { margin-top: 11px; }
.monitor-filter-body .filter-row { gap: 8px; }
.monitor-filter-body .select, .monitor-filter-body .input { font-size: .78rem; }
.responders { padding: 0 10px 14px; }
.monitor-list-summary { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 4px 9px; background: #0a1723; }
.monitor-list-summary strong, .monitor-list-summary span { display: block; }
.monitor-list-summary strong { font-size: .78rem; }
.monitor-list-summary span { color: #8fa6b5; font-size: .63rem; text-align: right; }
.responder-card { min-height: 66px; margin-bottom: 6px; padding: 10px; border-color: transparent; border-radius: 12px; }
.responder-card:hover, .responder-card.active { border-color: #47708a; background: #152c3d; }
.responder-card.active { box-shadow: inset 3px 0 #63c8bd; }
.responder-card.sos { border-color: rgba(227,67,87,.62); background: rgba(159,31,50,.22); }
.responder-card strong { font-size: .88rem; }
.responder-card small { color: #b0c1cc; font-size: .72rem; line-height: 1.35; }
.responder-technical-warning, .responder-technical-ok, .responder-technical-pending { font-size: .67rem; }
.monitor-map-workspace, .monitor-map-workspace.detail-open { display: block; min-height: calc(100dvh - 66px); }
.map-detail-panel { display: none !important; }
.monitor-detail-popup .leaflet-popup-content { font-size: .82rem; }
.monitor-detail-popup .map-detail-heading { padding-right: 22px; }
.monitor-detail-popup .map-detail-heading h3 { font-size: 1.05rem; }
.monitor-detail-popup .map-detail-facts span, .monitor-detail-popup .map-detail-facts strong { font-size: .72rem; }
.monitor-detail-popup .map-device-health { margin-top: 12px; }
.monitor-sos-assistance { display: block; margin: 11px 0; overflow: hidden; border: 1px solid rgba(255,92,114,.38); border-radius: 12px; background: rgba(255,55,79,.07); }
.monitor-sos-assistance > summary, .monitor-sos-assistance.empty { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 11px 12px; list-style: none; }
.monitor-sos-assistance > summary { cursor: pointer; }
.monitor-sos-assistance > summary::-webkit-details-marker { display: none; }
.monitor-sos-assistance > summary > span, .monitor-sos-assistance.empty > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #ff7184; background: rgba(255,92,114,.13); }
.monitor-sos-assistance .ui-icon { width: 19px; height: 19px; }
.monitor-sos-assistance summary strong, .monitor-sos-assistance summary small, .monitor-sos-assistance.empty strong, .monitor-sos-assistance.empty small { display: block; }
.monitor-sos-assistance summary strong, .monitor-sos-assistance.empty strong { font-size: .75rem; }
.monitor-sos-assistance summary small, .monitor-sos-assistance.empty small { margin-top: 2px; color: #aebdc7; font-size: .64rem; }
.monitor-sos-assistance summary b { display: grid; place-items: center; min-width: 28px; height: 28px; border-radius: 9px; color: #fff; background: #c92742; font-size: .7rem; }
.monitor-sos-assistance-list { display: grid; gap: 5px; padding: 0 10px 10px; border-top: 1px solid rgba(255,92,114,.2); }
.monitor-sos-assistance-list article { display: grid; grid-template-columns: 34px minmax(0,1fr) 8px; align-items: center; gap: 9px; min-height: 48px; padding: 7px 2px; border-bottom: 1px solid rgba(255,255,255,.06); }
.monitor-sos-assistance-list article:last-child { border-bottom: 0; }
.monitor-sos-assistance-list .avatar { width: 34px; height: 34px; }
.monitor-sos-assistance-list strong, .monitor-sos-assistance-list small { display: block; }
.monitor-sos-assistance-list strong { overflow: hidden; font-size: .71rem; text-overflow: ellipsis; white-space: nowrap; }
.monitor-sos-assistance-list small { margin-top: 2px; color: #9fb0bb; font-size: .61rem; }
.monitor-sos-assistance-list i { width: 8px; height: 8px; border-radius: 50%; background: #42d6a4; box-shadow: 0 0 0 4px rgba(66,214,164,.12); }
.responder-sos-assistance-count { color: #ff7d8e !important; font-style: normal; font-weight: 800; }
.map-context-hint, .map-legend { font-size: .7rem; }

/* Respondedor: objetivos táctiles grandes, una decisión principal por bloque. */
.responder-shell { --responder-accent: #6acbc2; --responder-surface: #0d1a27; --responder-line: #29445a; background: #07111b; }
.responder-top { min-height: 68px; border-bottom: 1px solid #20384a; background: rgba(7,17,27,.96); }
.device-health-summary { min-height: 56px; border-color: #31516a; border-radius: 13px; background: #11263a; }
.device-health-summary strong { font-size: .86rem; }
.device-health-summary small { font-size: .76rem; }
.guard-card, .responder-map-panel, .responder-news-panel, .responder-account-panel, .responder-frequencies-panel { border-radius: 16px; }
.guard-state strong { font-size: 1rem; }
.guard-state span, .battery-note { font-size: .78rem; line-height: 1.5; }
.sos-button { min-height: 168px; border-width: 4px; }
.sos-button span { font-size: .76rem; }
.sos-button span strong { font-size: 2.45rem; letter-spacing: .04em; }
.sos-button.holding { transform: scale(.985); box-shadow: 0 0 0 8px rgba(227,67,87,.18), 0 18px 42px rgba(227,67,87,.32); }
.guard-actions { gap: 10px; }
.guard-actions .button { min-height: 50px; }
.responder-map-heading strong { font-size: 1.15rem; }
.responder-map-heading span { color: #adbfca; font-size: .8rem; }
.responder-map-layers { background: #102234; }
.responder-map-wrap { border-top: 1px solid #29445a; }
.responder-locate-button { min-height: 50px; border-radius: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.42); }
.responder-bottom-nav { min-height: 74px; border-color: #29445a; background: rgba(7,17,27,.98); }
.responder-nav-button { min-height: 58px; color: #9eb1be; font-size: .74rem; }
.responder-nav-button.active { color: #bff7ef; background: #13313a; box-shadow: inset 0 -3px #69cfc4; }
.responder-nav-icon .ui-icon { width: 24px; height: 24px; }
.responder-callout-overlay { border-width: 2px; background: #160d15; }
.responder-callout-overlay-item { border-radius: 14px; background: #171622; }
.callout-overlay-copy span { font-size: .72rem; }
.callout-overlay-copy strong { font-size: 1.18rem; }
.callout-overlay-copy p { color: #d7dce2; font-size: .84rem; }
.callout-overlay-actions { grid-template-columns: 1fr; min-width: 190px; }
.callout-overlay-actions .button { width: 100%; min-height: 48px; }
.callout-accept { color: #061714; background: #6bd0b6; border-color: #6bd0b6; }
.callout-reject { color: #f0c7ce !important; border-color: #70404b !important; background: transparent !important; }
.offline-banner { font-size: .78rem; }

@media (max-width: 1180px) {
    .monitor-layout { grid-template-columns: 320px minmax(0,1fr); }
}

@media (max-width: 760px) {
    body { font-size: 16px; }
    .button, .input, .select, .textarea { min-height: 48px; font-size: .9rem; }
    .responder-top { position: sticky; top: 0; z-index: 900; padding: 10px 12px; }
    .responder-top .brand span { display: none; }
    .responder-main { padding-inline: 12px; }
    .device-status-strip { padding-inline: 12px; }
    .device-health-summary > span { color: #9fded7; font-size: .72rem; }
    .guard-hero { padding-top: 12px; }
    .guard-hero h1 { font-size: 1.4rem; }
    .guard-actions { display: grid; grid-template-columns: 1fr; }
    .guard-actions .danger-button { margin-top: 8px; color: #f4bec7; border-color: #70404b; background: transparent; }
    .responder-map-heading { padding: 15px; }
    .responder-map-layers .select { min-height: 48px; }
    .responder-map-wrap { min-height: 54dvh; }
    .responder-bottom-nav { height: calc(76px + env(safe-area-inset-bottom)); padding: 6px 8px env(safe-area-inset-bottom); }
    .responder-callout-overlay { bottom: calc(84px + env(safe-area-inset-bottom)); max-height: calc(100dvh - 104px); padding: 12px; }
    .responder-callout-overlay-item { grid-template-columns: 1fr; gap: 12px; }
    .callout-overlay-actions { min-width: 0; }
    .callout-overlay-actions .callout-accept { order: -3; }
    .callout-overlay-actions a { order: -2; }
    .callout-overlay-actions .callout-reject { order: 3; }
    .monitor-list-summary { position: static; }
}

@media (prefers-reduced-motion: reduce) {
    .monitor-filter-disclosure > summary::after, .sos-button, .responder-card { transition: none !important; }
}

/* Emerges v113 · sincronización visible, seguimiento y diagnóstico preventivo. */
.live-pill { min-width: 116px; justify-content: center; transition: border-color .18s ease, background .18s ease, color .18s ease; }
.live-pill.live { color: #a9eee3; border-color: rgba(88,199,188,.5); background: rgba(88,199,188,.1); }
.live-pill.live .live-dot { background: #58c7bc; box-shadow: 0 0 0 4px rgba(88,199,188,.14); }
.live-pill.connecting { color: #bbcad4; }
.live-pill.delayed { color: #f3c76f; border-color: rgba(224,172,79,.55); background: rgba(224,172,79,.1); }
.live-pill.delayed .live-dot { background: #e0ac4f; box-shadow: 0 0 0 4px rgba(224,172,79,.14); }
.live-pill.offline { color: #ff9caa; border-color: rgba(227,67,87,.58); background: rgba(227,67,87,.12); }
.live-pill.offline .live-dot { background: #e34357; box-shadow: 0 0 0 4px rgba(227,67,87,.15); animation: none; }

.monitor-device-alerts { display: grid; gap: 8px; margin: 10px; padding: 11px; border: 1px solid rgba(224,172,79,.45); border-radius: 13px; background: #201b17; }
.monitor-device-alerts-heading { display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 9px; }
.monitor-device-alerts-heading > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #f0bd59; background: rgba(224,172,79,.12); }
.monitor-device-alerts-heading .ui-icon { width: 19px; height: 19px; }
.monitor-device-alerts-heading strong, .monitor-device-alerts-heading small { display: block; }
.monitor-device-alerts-heading strong { font-size: .78rem; }
.monitor-device-alerts-heading small { margin-top: 2px; color: #c5b9a5; font-size: .65rem; }
.monitor-device-alert-list { display: grid; gap: 5px; max-height: 156px; overflow: auto; }
.monitor-device-alert-list button { width: 100%; padding: 8px 9px; border: 1px solid rgba(224,172,79,.23); border-radius: 9px; color: #f3f5f7; background: rgba(255,255,255,.025); text-align: left; cursor: pointer; }
.monitor-device-alert-list button:hover, .monitor-device-alert-list button:focus-visible { border-color: #d9a94d; background: rgba(224,172,79,.08); }
.monitor-device-alert-list strong, .monitor-device-alert-list span { display: block; }
.monitor-device-alert-list strong { font-size: .72rem; }
.monitor-device-alert-list span { margin-top: 3px; color: #dbbd86; font-size: .64rem; line-height: 1.35; }
.monitor-visibility-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.monitor-visibility-actions [data-map-labels-toggle] { grid-column: 1 / -1; min-height: 42px; }
.monitor-visibility-actions .button { min-width: 0; white-space: normal; line-height: 1.25; }
.monitor-panel-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; padding: 4px; border: 1px solid #29445a; border-radius: 12px; background: #0a1824; }
.monitor-panel-tabs button { display: grid; place-items: center; gap: 4px; min-width: 0; min-height: 50px; padding: 7px 4px; border: 0; border-radius: 9px; color: #8fa5b2; background: transparent; cursor: pointer; }
.monitor-panel-tabs button span { display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; font-size: .68rem; font-weight: 780; }
.monitor-panel-tabs button .ui-icon { width: 15px; height: 15px; }
.monitor-panel-tabs button b { min-width: 20px; padding: 2px 6px; border-radius: 999px; color: #9eb3be; background: #172b38; font-size: .6rem; line-height: 1.35; }
.monitor-panel-tabs button:hover { color: #edf7f4; background: rgba(255,255,255,.035); }
.monitor-panel-tabs button.active { color: #061a16; background: #52d8bd; box-shadow: 0 7px 18px rgba(39,182,155,.18); }
.monitor-panel-tabs button.active b { color: #dffaf4; background: #126a5b; }
.monitor-panel-search { min-height: 44px; }
.monitor-panel-view { flex: 1 1 0; min-height: 120px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #426675 #10212d; }
.monitor-panel-view[hidden] { display: none !important; }
.monitor-panel-view::-webkit-scrollbar { width: 8px; }
.monitor-panel-view::-webkit-scrollbar-track { background: #10212d; }
.monitor-panel-view::-webkit-scrollbar-thumb { border: 2px solid #10212d; border-radius: 999px; background: #426675; }
.monitor-panel-view::-webkit-scrollbar-thumb:hover { background: #58a49e; }
.monitor-panel-view .responders { overflow: visible; }
.monitor-reference-list { display: grid; align-content: start; gap: 7px; padding: 10px; }
.monitor-reference-card { display: grid; grid-template-columns: 40px minmax(0,1fr) 24px; align-items: center; gap: 10px; width: 100%; min-height: 70px; padding: 9px 10px; border: 1px solid #29404d; border-radius: 11px; color: #edf5f3; background: #10212d; text-align: left; cursor: pointer; }
.monitor-reference-card:hover, .monitor-reference-card:focus-visible { border-color: #4f8d92; background: #142a37; }
.monitor-reference-card > span:nth-child(2) { min-width: 0; }
.monitor-reference-card strong, .monitor-reference-card small, .monitor-reference-card em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.monitor-reference-card strong { font-size: .76rem; }
.monitor-reference-card small { margin-top: 3px; color: #a6bac2; font-size: .64rem; }
.monitor-reference-card em { margin-top: 3px; color: #718b96; font-size: .59rem; font-style: normal; }
.monitor-reference-card > i { display: grid; place-items: center; color: #6fd8c7; }
.monitor-reference-card > i .ui-icon { width: 17px; height: 17px; }
.monitor-reference-icon { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #3b6871; border-radius: 11px; color: #80dfce; background: #152f38; }
.monitor-reference-icon .ui-icon { width: 21px; height: 21px; }
.monitor-reference-icon.priority-high { color: #efbd59; border-color: #765d31; }
.monitor-reference-icon.priority-critical { color: #ff7282; border-color: #783746; }
.monitor-reference-icon.area-swatch { color: #fff; border-color: color-mix(in srgb,var(--reference-color) 76%,#fff); background: color-mix(in srgb,var(--reference-color) 58%,#132431); }
@media(min-width:761px){.shell .monitor-layout{height:calc(100dvh - 70px);min-height:0}.shell .monitor-list{height:100%;min-height:0;overflow:hidden}.shell .monitor-map-workspace,.shell .map-wrap{height:100%;min-height:0}}
@media(max-width:760px){.monitor-panel-tabs button{min-height:48px}.monitor-panel-tabs button span{font-size:.65rem}.monitor-panel-view{flex:none;max-height:min(48dvh,460px);min-height:180px;border-top:1px solid #294151}}

/* Estado técnico plegable dentro de la ficha de personal. */
details.map-device-health { display: block; padding: 0; overflow: hidden; }
details.map-device-health > summary { display: grid; grid-template-columns: 34px minmax(0,1fr) 18px; align-items: center; gap: 10px; min-height: 58px; padding: 11px 12px; list-style: none; cursor: pointer; user-select: none; }
details.map-device-health > summary::-webkit-details-marker { display: none; }
details.map-device-health > summary:hover { background: rgba(255,255,255,.025); }
details.map-device-health > summary:focus-visible { outline: 2px solid #58d6c5; outline-offset: -3px; }
.map-device-health-summary-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #69ddc8; background: rgba(73,206,181,.12); }
details.map-device-health.warning .map-device-health-summary-icon { color: #f1bf5c; background: rgba(224,172,79,.13); }
.map-device-health-summary-icon .ui-icon { width: 19px; height: 19px; }
details.map-device-health > summary strong, details.map-device-health > summary small { display: block; }
details.map-device-health > summary strong { font-size: .78rem; }
details.map-device-health > summary small { margin-top: 3px; color: #91a7b5; font-size: .66rem; }
details.map-device-health.warning > summary small { color: #e4bd72; }
details.map-device-health > summary > i { width: 8px; height: 8px; border-right: 2px solid #93a9b6; border-bottom: 2px solid #93a9b6; transform: rotate(45deg) translate(-2px,-2px); transition: transform .16s ease; }
details.map-device-health[open] > summary > i { transform: rotate(225deg) translate(-1px,-1px); }
.map-device-health-content { display: grid; gap: 9px; padding: 0 12px 12px; border-top: 1px solid #294151; }
.map-device-health-content .map-device-health-grid { margin-top: 11px; }
.map-device-refresh-note { margin: 0; color: #8299a8; font-size: .62rem; text-align: right; }

/* Ficha del respondedor: bloques separados para lectura rápida sobre el mapa. */
.monitor-detail-popup .leaflet-popup-content { width: min(420px,calc(100vw - 64px)) !important; margin: 20px; }
.monitor-detail-popup .map-detail-heading { gap: 14px; margin-bottom: 17px; padding-right: 24px; }
.monitor-detail-popup .map-detail-heading h3 { margin: 4px 0 3px; font-size: 1.12rem; }
.monitor-detail-popup .map-detail-heading p { font-size: .76rem; }
.monitor-detail-popup details.map-device-health { margin: 0 0 15px; }
.monitor-detail-popup details.map-device-health > summary { min-height: 62px; padding: 12px 13px; }
.monitor-detail-popup .map-detail-facts { margin: 0 0 16px; }
.monitor-detail-popup .map-detail-facts > div { min-height: 46px; padding: 12px 13px; }
.monitor-detail-popup .map-detail-facts span, .monitor-detail-popup .map-detail-facts strong { align-self: center; font-size: .74rem; line-height: 1.35; }
.monitor-detail-popup .map-detail-actions { gap: 10px; padding-top: 1px; }
.monitor-detail-popup .map-detail-actions > * { min-height: 44px; padding: 10px 13px; }
.map-wrap:has(.leaflet-popup-pane .leaflet-popup) .map-context-hint { opacity: 0; visibility: hidden; }
@media(max-width:600px){.monitor-detail-popup .leaflet-popup-content{width:min(390px,calc(100vw - 46px))!important;margin:14px}.monitor-detail-popup .map-detail-heading{margin-bottom:14px}.monitor-detail-popup details.map-device-health{margin-bottom:12px}.monitor-detail-popup .map-detail-facts{margin-bottom:13px}.monitor-detail-popup .map-detail-facts>div{min-height:43px;padding:10px 11px}.monitor-detail-popup .map-detail-actions{display:grid;grid-template-columns:1fr 1fr}.monitor-detail-popup .map-detail-actions>*{width:100%}}

.monitor-follow-banner { position: absolute; z-index: 760; top: 14px; left: 50%; display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 9px; width: min(440px, calc(100% - 220px)); min-height: 54px; padding: 8px 9px; border: 1px solid rgba(88,199,188,.6); border-radius: 14px; background: rgba(8,25,34,.95); box-shadow: 0 12px 34px rgba(0,0,0,.42); transform: translateX(-50%); backdrop-filter: blur(10px); }
.monitor-follow-banner > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #8be0d7; background: rgba(88,199,188,.12); }
.monitor-follow-banner .ui-icon { width: 19px; height: 19px; }
.monitor-follow-banner small, .monitor-follow-banner strong { display: block; }
.monitor-follow-banner small { color: #83bcb8; font-size: .62rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.monitor-follow-banner strong { margin-top: 2px; overflow: hidden; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.responder-card.followed { border-color: rgba(88,199,188,.65); box-shadow: inset 3px 0 #58c7bc; }

@media (max-width: 760px) {
    .live-pill { min-width: 0; }
    .monitor-device-alerts { margin: 8px; }
    .monitor-follow-banner { top: 10px; width: calc(100% - 92px); }
    .monitor-follow-banner .button { min-height: 40px; }
}
.support-nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 46px;
    padding: 11px 12px;
    border: 1px solid rgba(60, 183, 126, .2);
    border-radius: 10px;
    color: #b9d8cb;
    background: rgba(25, 112, 78, .11);
    font-weight: 720;
    text-decoration: none;
}
.support-nav-link:hover { color: #effff8; border-color: rgba(77, 211, 151, .52); background: rgba(35, 143, 99, .2); }
.support-nav-link .nav-icon { color: #58d59d; }
.support-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: #ecfff7; border-color: #28845d; background: #166c4b; text-decoration: none; }
.support-button:hover { color: #fff; background: #1b8059; border-color: #54c893; }
.support-button svg { width: 19px; height: 19px; }

.help-page { max-width: 1060px; margin: 0 auto; }
.help-center { display: grid; gap: 18px; }
.help-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 410px);
    align-items: end;
    gap: 12px 24px;
    padding: 26px;
    border: 1px solid #294352;
    border-radius: 18px;
    background: linear-gradient(135deg, #122936 0%, #0d2029 68%, #102b27 100%);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .18);
}
.help-hero .eyebrow { display: block; margin-bottom: 7px; color: #73d8c8; font-size: .7rem; font-weight: 850; letter-spacing: .14em; }
.help-hero h2 { margin: 0 0 6px; color: #f3f8fa; font-size: clamp(1.55rem, 3vw, 2.2rem); }
.help-hero p { margin: 0; color: #aec1cb; line-height: 1.5; }
.help-search {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 15px;
    border: 1px solid #466776;
    border-radius: 13px;
    color: #6fd2c4;
    background: #081820;
}
.help-search:focus-within { border-color: #6ed1c3; box-shadow: 0 0 0 3px rgba(110, 209, 195, .13); }
.help-search svg { flex: 0 0 20px; width: 20px; height: 20px; }
.help-search input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; color: #f0f7f8; background: transparent; font-size: .94rem; }
.help-search-result { grid-column: 2; color: #8fa8b4 !important; font-size: .78rem; }
.help-topic-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.help-topic-card { overflow: hidden; border: 1px solid #263f4d; border-radius: 14px; background: #0e2029; }
.help-topic-card[hidden] { display: none; }
.help-topic-card details { color: #dbe8ec; }
.help-topic-card summary { display: grid; grid-template-columns: 44px minmax(0, 1fr) 22px; gap: 12px; align-items: center; min-height: 86px; padding: 16px; cursor: pointer; list-style: none; }
.help-topic-card summary::-webkit-details-marker { display: none; }
.help-topic-card summary:hover { background: rgba(102, 200, 189, .05); }
.help-topic-card summary > span:nth-child(2) { display: grid; gap: 3px; }
.help-topic-card summary small { color: #68cbbd; font-size: .65rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.help-topic-card summary strong { color: #f0f7f8; font-size: 1rem; }
.help-topic-card summary em { color: #a7bac4; font-size: .78rem; font-style: normal; line-height: 1.4; }
.help-topic-icon { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #335563; border-radius: 12px; color: #75d8ca; background: #142d37; }
.help-topic-icon svg { width: 23px; height: 23px; }
.help-topic-chevron { color: #8ba4af; font-size: 1.2rem; transition: transform .16s ease; }
.help-topic-card details[open] .help-topic-chevron { transform: rotate(180deg); }
.help-topic-card ol { display: grid; gap: 11px; margin: 0; padding: 4px 20px 20px 56px; counter-reset: help-step; list-style: none; }
.help-topic-card li { position: relative; min-height: 28px; padding-left: 10px; color: #c4d2d8; font-size: .86rem; line-height: 1.5; }
.help-topic-card li::before { content: counter(help-step); counter-increment: help-step; position: absolute; left: -32px; top: -2px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #0b2023; background: #6acdbc; font-size: .72rem; font-weight: 900; }
.help-support-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 18px 20px; border: 1px solid #2d5d4c; border-radius: 15px; background: #102820; }
.help-support-card > div { display: grid; gap: 3px; }
.help-support-card strong { color: #effbf6; }
.help-support-card span { color: #a9c7ba; font-size: .84rem; }
.help-support-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: #68d69f !important; background: #173f2f; }
.help-support-icon svg { width: 23px; height: 23px; }
.help-modal { width: min(1000px, calc(100vw - 28px)); }
.help-modal .modal-body { max-height: min(76vh, 760px); overflow: auto; }

@media (max-width: 760px) {
    .support-nav-link { min-width: 76px; flex: 0 0 76px; flex-direction: column; justify-content: center; gap: 3px; padding: 6px 4px; font-size: .58rem; white-space: nowrap; scroll-snap-align: center; }
    .help-page { padding: 12px !important; }
    .help-hero { grid-template-columns: 1fr; padding: 20px 16px; }
    .help-search-result { grid-column: 1; }
    .help-topic-list { grid-template-columns: 1fr; }
    .help-topic-card summary { min-height: 82px; padding: 14px 12px; }
    .help-topic-card ol { padding: 2px 15px 18px 50px; }
    .help-support-card { grid-template-columns: auto minmax(0, 1fr); }
    .help-support-card .support-button { grid-column: 1 / -1; min-height: 48px; }
    .responder-account-actions .button, .responder-account-actions a.button { min-height: 50px; }
}

/* Corrección final de cascada: el modal de despacho debe prevalecer sobre el modal genérico. */
.modal.callout-dispatch-modal {
    width: min(1240px, calc(100vw - 28px));
    max-height: calc(100dvh - 20px);
}
.modal.callout-dispatch-modal .callout-dispatch-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
}
.modal.callout-dispatch-modal .callout-dispatch-primary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
}
.modal.callout-dispatch-modal .callout-dispatch-secondary,
.modal.callout-dispatch-modal .callout-targeting,
.modal.callout-dispatch-modal .callout-dispatch-custom { min-width: 0; }
.modal.callout-dispatch-modal .callout-dispatch-custom:empty { display: none; }
.modal.callout-dispatch-modal .callout-dispatch-custom .callout-custom-form { height: 100%; align-content: start; }
.modal.callout-dispatch-modal .callout-target-scope {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
}
.modal.callout-dispatch-modal .callout-dispatch-full { grid-column: 1 / -1; }

@media (max-width: 760px) {
    .modal.callout-dispatch-modal { width: calc(100vw - 12px); max-height: calc(100dvh - 12px); }
    .modal.callout-dispatch-modal .callout-dispatch-primary { grid-template-columns: 1fr; }
    .modal.callout-dispatch-modal .callout-target-scope { grid-template-columns: 1fr; }
}

.callout-group-choice > .callout-group-choice-copy {
    grid-row: auto;
    display: grid;
    place-items: initial;
    gap: 2px;
    width: auto;
    height: auto;
    min-width: 0;
    border-radius: 0;
    color: inherit;
    background: transparent;
}
.callout-group-choice-copy em,
.callout-group-choice-copy b { display: block; overflow-wrap: anywhere; font-style: normal; line-height: 1.35; }
.callout-group-choice-copy em { margin-top: 3px; color: #b7c8d1; font-size: .64rem; font-weight: 600; }
.callout-group-choice-copy b { margin-top: 4px; color: #ff8b99; font-size: .62rem; font-weight: 800; }
.callout-target-help.warning { color: #ff9aa6; font-weight: 750; }

/* Navegación operativa simplificada: cuatro destinos y herramientas secundarias. */
.nav-more { position: relative; }
.nav-more > summary {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 46px;
    padding: 11px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #afc1cd;
    cursor: pointer;
    font-weight: 690;
    list-style: none;
}
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more > summary::after { content: '›'; margin-left: auto; color: #7992a2; font-size: 1.1rem; }
.nav-more > summary:hover,
.nav-more.active > summary,
.nav-more[open] > summary { color: #f4fbfa; border-color: #3c6f78; background: #14303b; }
.nav-more.active > summary { box-shadow: inset 3px 0 #65c8bd; }
.nav-more[open] > summary::after { transform: rotate(180deg); }
.nav-more-menu {
    position: absolute;
    z-index: 1400;
    left: calc(100% + 10px);
    bottom: 0;
    display: grid;
    gap: 5px;
    width: 232px;
    padding: 9px;
    border: 1px solid #304c60;
    border-radius: 14px;
    background: #0a1825;
    box-shadow: 0 20px 48px rgba(0, 0, 0, .48);
}
.nav-more-menu .nav-button,
.nav-more-menu .support-nav-link { width: 100%; }

/* Un único bloque para capas, filtros y preferencias visuales del mapa. */
.monitor-map-settings { display: grid; gap: 9px; margin: 0; padding: 11px; border: 1px solid #2b4659; border-radius: 11px; }
.monitor-map-settings legend { padding: 0 6px; color: #a9bdc9; font-size: .7rem; font-weight: 760; }
.monitor-map-style-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 9px; background: #091722; }
.monitor-map-style-options .map-style-button { min-width: 0; min-height: 36px; padding-inline: 4px !important; }
.monitor-map-size-setting { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; color: #b8c8d1; font-size: .7rem; }
.monitor-map-size-setting output { color: #76d1c7; font-weight: 800; }
.monitor-map-size-setting input { grid-column: 1 / -1; width: 100%; accent-color: #65c8bd; }

@media (max-width: 760px) {
    .nav-more { min-width: 68px; flex: 0 0 68px; }
    .nav-more > summary { flex-direction: column; justify-content: center; gap: 3px; min-height: 54px; padding: 5px 4px; font-size: .57rem; }
    .nav-more > summary::after { display: none; }
    .nav-more.active > summary { box-shadow: inset 0 -3px #65c8bd; }
    .nav-more-menu {
        position: fixed;
        right: 8px;
        bottom: calc(76px + env(safe-area-inset-bottom));
        left: 8px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: auto;
        max-height: min(62dvh, 440px);
        overflow-y: auto;
        padding: 10px;
    }
    .nav-more-menu .nav-button,
    .nav-more-menu .support-nav-link { min-width: 0 !important; min-height: 50px; flex-direction: row; justify-content: flex-start; gap: 10px; padding: 9px 11px; font-size: .72rem; }
    .monitor-map-style-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Emerges 2026 · identidad institucional basada en el logo oficial. */
:root {
    --bg: #06152b;
    --surface: #0b213b;
    --surface-2: #102b49;
    --surface-3: #173a5c;
    --line: #315577;
    --line-soft: rgba(179, 195, 212, .16);
    --text: #f7f9fc;
    --muted: #b3c3d4;
    --green: #2474b5;
    --green-dark: #124b7b;
    --blue: #61a9e0;
    --yellow: #ff7a00;
    --red: #e51b2a;
    --red-dark: #9f1523;
    --brand-navy: #082348;
    --brand-blue: #2474b5;
    --brand-blue-bright: #3d91d0;
    --brand-red: #e51b2a;
    --brand-orange: #ff6b00;
    --brand-success: #39b980;
    --shadow: 0 20px 56px rgba(0, 8, 20, .42);
}
html, body { background: #06152b; }
body { background-image: linear-gradient(145deg, #06152b 0%, #071a31 55%, #081d35 100%); }
.panel, .modal, .entity-card, .metric, .guard-card { border-color: #294d70; background: #0b213b; box-shadow: 0 14px 36px rgba(0, 8, 20, .2); }
.input, .select, .textarea { color: #f7f9fc; border-color: #315577; background: #071a31; }
.input:focus, .select:focus, .textarea:focus { border-color: #3d91d0; box-shadow: 0 0 0 3px rgba(61, 145, 208, .18); }
.field > span, .field > label { color: #dbe6ef; }
.button { border-radius: 10px; }
.button.primary { color: #fff; border-color: #3386c5; background: linear-gradient(180deg, #2d82c1, #1d659f); box-shadow: 0 8px 20px rgba(28, 100, 160, .22); }
.button.ghost { color: #edf4fa; border-color: #365f83; background: #102b49; }
.button.danger-button { color: #fff; border-color: #ef4050; background: linear-gradient(180deg, #e52b3a, #ae1625); }
.button:focus-visible, .nav-button:focus-visible, .close-button:focus-visible, .map-style-button:focus-visible, .responder-card:focus-visible,
.responder-bottom-nav button:focus-visible, .responder-map-style button:focus-visible, [role="button"]:focus-visible { outline-color: rgba(61, 145, 208, .68); }
.success, .signal.online, .live-pill.live { color: var(--brand-success); }
.warning { color: var(--brand-orange); }

/* Acceso e identidad. */
.login-shell { background: radial-gradient(circle at 76% 38%, rgba(36,116,181,.24), transparent 34%), linear-gradient(140deg, #06152b, #082348 58%, #0b2d50); }
.login-panel { border-right: 1px solid #294d70; background: rgba(6, 21, 43, .94); }
.login-card .eyebrow, .eyebrow { color: #60a8dc; }
.radar-visual { border-color: #315577; background: repeating-radial-gradient(circle,transparent 0 68px,rgba(61,145,208,.12) 69px 70px),linear-gradient(rgba(61,145,208,.08) 1px,transparent 1px),linear-gradient(90deg,rgba(61,145,208,.08) 1px,transparent 1px); background-size:auto,42px 42px,42px 42px; }
.radar-visual::after { background: conic-gradient(from 0deg,transparent 0 76%,rgba(61,145,208,.38) 93%,transparent); }
.radar-visual::before { background: #e51b2a; box-shadow: 0 0 0 10px rgba(229,27,42,.14),0 0 35px #e51b2a; }
.visual-caption { border-color: #315577; background: rgba(8,35,72,.9); }
.login-apk-download { border-color: #315f88; background: #0c2948; }
.support-button { color: #fff; border-color: #d65020; background: #b83a19; }
.support-button:hover { background: #d94e1d; border-color: #ff7a3d; }

/* Monitoreo: azul institucional, rojo solo para la urgencia. */
.shell { --muted: #aebfd0; background: #06152b; }
.shell .sidebar { border-color: #294d70; background: linear-gradient(180deg, #071c36, #06162b); }
.shell .sidebar .brand { border-bottom-color: #29435f; }
.shell .nav-button, .nav-more > summary { color: #b7c7d6; }
.shell .nav-button:hover, .nav-more > summary:hover { color: #fff; background: #102f50; }
.shell .nav-button.active, .nav-more.active > summary, .nav-more[open] > summary { color: #fff; border-color: #376d98; background: #123a60; box-shadow: inset 3px 0 #3d91d0; }
.shell .nav-button.active .nav-icon { color: #d9efff; background: rgba(61,145,208,.18); }
.nav-more-menu { border-color: #315577; background: #081d35; }
.shell .topbar { border-color: #294d70; background: rgba(6,21,43,.96); }
.department-context, .department-switcher, .live-pill { border-color: #315577; background: #0d2947; }
.live-pill.live .live-dot { background: #39b980; box-shadow: 0 0 0 5px rgba(57,185,128,.12); }
.monitor-list, .monitor-toolbar, .monitor-list-summary { border-color: #294d70; background: #071a31; }
.monitor-toolbar-heading span { color: #61a9e0; }
.address-search-block, .monitor-filter-disclosure { border-color: #315577; background: #0b2541; }
.monitor-panel-tabs { border-color: #315577; background: #071a31; }
.monitor-panel-tabs button.active { color: #fff; background: #236da9; box-shadow: 0 7px 18px rgba(35,109,169,.25); }
.monitor-panel-tabs button.active b { color: #fff; background: #0d426e; }
.monitor-filter-body { border-color: #294d70; }
.monitor-map-settings { border-color: #315577; }
.monitor-map-style-options { background: #06172a; }
.shell .map-style-button.active { color: #fff; background: #2474b5; }
.responder-card:hover, .responder-card.active { border-color: #41759c; background: #123452; }
.responder-card.active { box-shadow: inset 3px 0 #3d91d0; }
.monitor-reference-card:hover { border-color: #41759c; background: #123452; }
.emergency-callout-button { border-color: rgba(255,255,255,.92); background: linear-gradient(145deg,#ef3344,#ad1222); box-shadow: 0 12px 34px rgba(229,27,42,.42),0 0 0 8px rgba(229,27,42,.14); }

/* Respondedor: lectura clara y controles aptos para exterior. */
.responder-shell { --responder-accent: #2474b5; --responder-surface: #0b213b; --responder-line: #315577; --muted: #b3c3d4; background: #06152b; }
.responder-shell .responder-header { border-color: #294d70; background: rgba(6,21,43,.96); }
.responder-shell .guard-card, .responder-shell .responder-map-panel, .responder-shell .responder-news-panel,
.responder-shell .responder-frequencies-panel, .responder-shell .responder-account-panel, .responder-shell .responder-callouts-panel,
.responder-shell .panel, .responder-shell .responder-card, .responder-shell .responder-status-card { border-color: #294d70; background: #0b213b; }
.responder-shell .button.primary { color: #fff; background: linear-gradient(180deg,#2d82c1,#1d659f); }
.responder-shell .button.ghost { border-color: #365f83; background: #102b49; }
.responder-shell .input, .responder-shell .select, .responder-shell .textarea { border-color: #315577; background: #071a31; }
.responder-bottom-nav { border-color: #294d70; background: rgba(6,18,36,.98); }
.responder-bottom-nav button { color: #9fb2c4; }
.responder-bottom-nav button.active { color: #dcefff; background: #123a60; box-shadow: inset 0 -4px #3d91d0; }
.responder-device-summary { border-color: #315577; background: #102d4c; }
.responder-frequency { border-color: #315577; background: #0d2947; }
.responder-callout-overlay { background: #160d18; }

/* Foto personal: la institución sigue disponible como imagen de respaldo. */
.avatar.personal-photo { object-fit: cover; object-position: center; border-color: #4d8fbd; background: #071a31; }
.profile-photo-editor { display: grid; grid-template-columns: 76px minmax(0,1fr) auto auto; gap: 10px 14px; align-items: center; padding: 15px; border: 1px solid #315577; border-radius: 14px; background: #0b2541; }
.profile-photo-preview { grid-row: 1 / span 2; display: grid; place-items: center; }
.profile-photo-preview .avatar { width: 76px; height: 76px; border: 3px solid #3d91d0; border-radius: 50%; object-fit: cover; }
.profile-photo-editor > div:nth-child(2) { display: grid; gap: 4px; }
.profile-photo-editor > div:nth-child(2) span, .profile-photo-editor > small { color: #b3c3d4; font-size: .74rem; line-height: 1.4; }
.profile-photo-editor > small { grid-column: 2 / -1; }

@media (max-width: 760px) {
    .shell .sidebar { width: 100%; max-width: none; }
    .shell .nav { width: 100%; justify-content: space-around; }
    .shell .nav-button.active, .nav-more.active > summary { box-shadow: inset 0 -3px #3d91d0; }
    .profile-photo-editor { grid-template-columns: 68px minmax(0,1fr); }
    .profile-photo-preview { grid-row: 1 / span 2; }
    .profile-photo-preview .avatar { width: 68px; height: 68px; }
    .profile-photo-editor .button { grid-column: 1 / -1; width: 100%; }
    .profile-photo-editor > small { grid-column: 1 / -1; }
}

/* Ajuste final de geometría: buscador y configuración operativa. */
.shell .monitor-list .address-search-block {
    gap: 10px;
    padding: 12px;
    overflow: hidden;
    border: 1px solid #315577;
    border-radius: 12px;
    background: #0b2541;
}
.shell .monitor-list .address-search-form {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
}
.shell .monitor-list .address-search-form .input,
.shell .monitor-list .address-search-form .button {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    border-radius: 9px;
}
.shell .monitor-list .address-search-form .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.shell .monitor-list .address-search-status {
    max-width: 30ch;
    margin-inline: auto;
    text-align: center;
}
.shell #department-operation-form {
    grid-template-columns: minmax(210px, 1fr) minmax(210px, 1fr) minmax(360px, 1.55fr) minmax(180px, .65fr);
    align-items: center;
    gap: 16px;
    padding: 18px;
}
.shell #department-operation-form > .field {
    align-self: stretch;
    align-content: center;
    min-width: 0;
}
.shell #department-operation-form .select,
.shell #department-operation-form .settings-retention-check,
.shell #department-operation-form > .button { border-radius: 11px; }
.shell #department-operation-form .settings-retention-check {
    min-height: 82px;
    margin: 0;
    border-color: #315577;
    background: #0c223a;
}
.shell #department-operation-form > .button {
    width: 100%;
    min-height: 48px;
    align-self: center;
    justify-self: center;
}
@media (max-width: 1300px) and (min-width: 761px) {
    .shell #department-operation-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shell #department-operation-form .settings-retention-check { grid-column: 1 / -1; }
    .shell #department-operation-form > .button { grid-column: 1 / -1; width: min(100%, 340px); }
}
@media (max-width: 760px) {
    .shell #department-operation-form { grid-template-columns: 1fr; padding: 15px; }
    .shell #department-operation-form .settings-retention-check,
    .shell #department-operation-form > .button { grid-column: 1; width: 100%; }
    .shell .monitor-list .address-search-status { max-width: none; }
}

/* UX/UI v145: jerarquía operativa, navegación móvil y configuración compacta. */
.users-mobile-list { display: none; }

.shell .sidebar > .emergency-callout-button {
    width: 92px;
    height: 92px;
    margin-top: 38px;
    gap: 6px;
}
.shell .sidebar > .emergency-callout-button > span {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, .16);
}
.shell .sidebar > .emergency-callout-button .ui-icon { width: 18px; height: 18px; }
.shell .sidebar > .emergency-callout-button strong { font-size: .68rem; text-transform: uppercase; }

.settings-section-nav {
    position: sticky;
    top: 78px;
    z-index: 320;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 7px;
    padding: 7px;
    border: 1px solid #315577;
    border-radius: 13px;
    background: rgba(7, 26, 49, .96);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .2);
    backdrop-filter: blur(16px);
}
.settings-section-nav button {
    display: flex;
    min-width: 0;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #b9cadd;
    background: transparent;
    font: inherit;
    font-size: .76rem;
    font-weight: 760;
    cursor: pointer;
}
.settings-section-nav button:hover,
.settings-section-nav button:focus-visible { color: #fff; border-color: #376d98; background: #123a60; }
.settings-section-nav .ui-icon { width: 18px; height: 18px; color: #65b7e9; }
.department-settings-content .settings-section { scroll-margin-top: 154px; transition: border-color .2s ease, box-shadow .2s ease; }
.department-settings-content .settings-section-highlight { border-color: #58a9df; box-shadow: 0 0 0 3px rgba(88, 169, 223, .13); }

.settings-organization-cluster {
    overflow: hidden;
    scroll-margin-top: 154px;
    border: 1px solid #315577;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(12, 41, 72, .92), rgba(7, 27, 48, .96));
    box-shadow: 0 16px 38px rgba(0, 0, 0, .18);
}
.settings-organization-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px 17px;
    border-bottom: 1px solid rgba(103, 151, 190, .22);
}
.settings-organization-header h3 { margin: 4px 0 5px; font-size: 1.08rem; }
.settings-organization-header p { margin: 0; color: var(--muted); font-size: .79rem; }
.settings-organization-summary {
    flex: 0 0 auto;
    padding: 8px 11px;
    border: 1px solid rgba(100, 183, 233, .26);
    border-radius: 999px;
    color: #c7deef;
    background: rgba(18, 58, 96, .72);
    font-size: .72rem;
    font-weight: 750;
}
.settings-organization-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
    padding: 10px;
    border-bottom: 1px solid rgba(103, 151, 190, .22);
    background: rgba(5, 22, 40, .58);
}
.settings-organization-tabs button {
    display: flex;
    min-width: 0;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #afc4d7;
    background: transparent;
    font: inherit;
    font-size: .76rem;
    font-weight: 760;
    cursor: pointer;
}
.settings-organization-tabs button small {
    display: grid;
    min-width: 20px;
    height: 20px;
    padding-inline: 5px;
    place-items: center;
    border-radius: 999px;
    color: #bed8eb;
    background: rgba(104, 157, 197, .18);
    font-size: .64rem;
}
.settings-organization-tabs button:hover,
.settings-organization-tabs button:focus-visible { color: #fff; border-color: #376d98; background: #123a60; }
.settings-organization-tabs button.active { color: #fff; border-color: #4d96c9; background: #164d79; box-shadow: inset 0 -3px #69c3ea; }
.settings-organization-tabs .ui-icon { width: 18px; height: 18px; }
.settings-organization-body { padding: 14px; }
.settings-organization-body > .settings-section { margin: 0; border-color: rgba(88, 132, 166, .42); box-shadow: none; }
.station-assignment-tools { display:grid;grid-template-columns:minmax(220px,1fr) auto auto;gap:10px;align-items:end;margin:10px 0; }
.station-assignment-tools .field { margin:0; }
.station-assignment-tools [data-station-assignment-summary] { align-self:center;color:var(--muted);font-size:.72rem;white-space:nowrap; }
.station-assignment-grid { max-height:290px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin; }
.station-assignment-grid [data-station-assignment-item] { align-items:center; }
.station-assignment-grid .station-assignment-avatar { width:38px;height:38px;flex:0 0 38px;border-radius:50%;object-fit:cover;border:2px solid rgba(105,195,234,.38);background:#0b2946; }
.station-editor-intro { margin:0;padding:11px 13px;border:1px solid rgba(105,195,234,.2);border-radius:11px;color:#bed2e2;background:rgba(18,58,96,.38);font-size:.76rem;line-height:1.45; }
.station-editor-tabs { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:7px;border:1px solid var(--line);border-radius:13px;background:rgba(5,22,40,.55); }
.station-editor-tabs button { display:flex;min-height:48px;align-items:center;justify-content:center;gap:8px;padding:8px 11px;border:1px solid transparent;border-radius:9px;color:var(--muted);background:transparent;font:inherit;font-size:.77rem;font-weight:800;cursor:pointer; }
.station-editor-tabs button.active { color:#fff;border-color:#4d96c9;background:#164d79;box-shadow:inset 0 -3px #69c3ea; }
.station-editor-tabs button small { display:grid;min-width:21px;height:21px;padding:0 5px;place-items:center;border-radius:999px;background:rgba(105,195,234,.16);font-size:.64rem; }
.station-editor-tabs .ui-icon { width:18px;height:18px; }
.station-editor-panel { display:grid;gap:14px;min-height:240px;padding:15px;border:1px solid var(--line);border-radius:14px;background:rgba(5,22,40,.32); }
.station-editor-panel-heading { display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding-bottom:10px;border-bottom:1px solid var(--line-soft); }
.station-editor-panel-heading strong { font-size:.88rem; }
.station-editor-panel-heading span { color:var(--muted);font-size:.72rem; }

.login-shell .support-button {
    color: #d9e9f6;
    border-color: #315f88;
    background: #0c2948;
}
.login-shell .support-button:hover { color: #fff; border-color: #4d83af; background: #123859; }

@media (max-width: 760px) {
    .login-panel {
        min-height: 100dvh;
        padding: max(22px, calc(env(safe-area-inset-top) + 18px)) 18px max(24px, calc(env(safe-area-inset-bottom) + 18px));
    }
    .login-card h1 { font-size: clamp(2.05rem, 10vw, 2.75rem); line-height: 1.02; }
    .login-card p { line-height: 1.55; }

    .shell .main { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
    .shell .sidebar {
        height: calc(78px + env(safe-area-inset-bottom));
        padding: 6px 6px env(safe-area-inset-bottom);
    }
    .shell .nav {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 3px;
        width: 100%;
        overflow: visible;
        scroll-snap-type: none;
    }
    .shell .nav-button,
    .shell .nav-more {
        min-width: 0 !important;
        width: 100%;
        flex: none !important;
    }
    .shell .nav-button,
    .shell .nav-more > summary {
        min-height: 64px;
        padding: 5px 2px;
        gap: 4px;
        font-size: .72rem !important;
        line-height: 1.08;
        white-space: normal;
        text-align: center;
    }
    .shell .nav-label {
        display: block;
        width: 100%;
        overflow: visible;
        overflow-wrap: anywhere;
    }
    .shell .nav-icon { width: 27px; height: 27px; }
    .shell .nav-icon .ui-icon { width: 22px; height: 22px; }

    .shell .topbar {
        min-height: 64px;
        padding: max(10px, env(safe-area-inset-top)) 12px 10px;
        gap: 8px;
    }
    .shell .topbar h1 {
        flex: 1 1 auto;
        max-width: none !important;
        overflow: visible;
        font-size: 1rem !important;
        line-height: 1.18;
        text-overflow: clip;
        white-space: normal;
    }
    .shell .topbar-meta { flex: none; }
    .shell .topbar-meta .department-context.global { display: none; }
    .shell .topbar-meta .department-switcher { width: min(43vw, 164px); min-width: 0; }
    .shell .topbar-meta .button.small { min-width: 44px; padding-inline: 10px; }

    .shell .sidebar > .emergency-callout-button {
        position: fixed;
        right: 12px;
        bottom: calc(88px + env(safe-area-inset-bottom));
        width: 56px !important;
        height: 56px !important;
        margin: 0;
        padding: 0;
        border-width: 3px;
        box-shadow: 0 9px 24px rgba(173, 18, 34, .38), 0 0 0 4px rgba(229, 27, 42, .12);
    }
    .shell .sidebar > .emergency-callout-button > span { width: 32px; height: 32px; background: transparent; }
    .shell .sidebar > .emergency-callout-button .ui-icon { width: 25px; height: 25px; }
    .shell .sidebar > .emergency-callout-button strong {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }
    .shell .content:not(.monitor-content) { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }

    .shell .users-table-wrap { display: none; }
    .shell .users-mobile-list {
        display: grid;
        gap: 11px;
        padding: 11px;
        border-top: 1px solid #294d70;
    }
    .shell .user-mobile-card {
        display: grid;
        gap: 0;
        overflow: hidden;
        border: 1px solid #315577;
        border-radius: 14px;
        background: #0b213b;
    }
    .shell .user-mobile-heading {
        display: grid;
        grid-template-columns: 46px minmax(0, 1fr) auto;
        gap: 11px;
        align-items: center;
        padding: 14px;
    }
    .shell .user-mobile-heading .avatar { width: 46px; height: 46px; }
    .shell .user-mobile-heading > div { min-width: 0; }
    .shell .user-mobile-heading > div > strong { display: block; font-size: .94rem; line-height: 1.25; }
    .shell .user-mobile-heading > div > span { display: block; margin-top: 2px; color: #aebfd0; font-size: .78rem; }
    .shell .user-mobile-heading .user-push-status { margin-top: 6px; font-size: .74rem; }
    .shell .user-mobile-state {
        padding: 5px 8px;
        border: 1px solid #315577;
        border-radius: 999px;
        color: #b6c8d8;
        font-size: .72rem;
        font-weight: 800;
    }
    .shell .user-mobile-state.active { color: #75d9ad; border-color: rgba(57, 185, 128, .45); background: rgba(57, 185, 128, .08); }
    .shell .user-mobile-state.inactive { color: #f3b3bc; border-color: rgba(229, 51, 68, .4); }
    .shell .user-mobile-details { border-top: 1px solid rgba(179, 195, 212, .16); }
    .shell .user-mobile-details > summary {
        display: flex;
        min-height: 46px;
        align-items: center;
        justify-content: space-between;
        padding: 11px 14px;
        color: #c9d9e6;
        font-size: .8rem;
        font-weight: 760;
        cursor: pointer;
        list-style: none;
    }
    .shell .user-mobile-details > summary::after { content: '⌄'; color: #70b7e4; font-size: 1rem; }
    .shell .user-mobile-details[open] > summary::after { transform: rotate(180deg); }
    .shell .user-mobile-details > summary::-webkit-details-marker { display: none; }
    .shell .user-mobile-memberships { display: grid; gap: 8px; padding: 0 14px 12px; }
    .shell .user-mobile-membership {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
        align-items: center;
        padding: 10px;
        border: 1px solid #294d70;
        border-radius: 10px;
        background: #0d2947;
    }
    .shell .user-mobile-membership strong,
    .shell .user-mobile-membership span { display: block; }
    .shell .user-mobile-membership strong { font-size: .82rem; }
    .shell .user-mobile-membership span { margin-top: 3px; color: #aebfd0; font-size: .74rem; }
    .shell .user-mobile-membership .action-row { flex-wrap: nowrap; }
    .shell .user-mobile-membership .icon-action { width: 42px; min-width: 42px; min-height: 42px; padding: 9px; }
    .shell .user-mobile-data {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        margin: 0;
        padding: 0 14px 14px;
    }
    .shell .user-mobile-data > div { min-width: 0; padding: 10px; border-radius: 9px; background: #091b31; }
    .shell .user-mobile-data > div:last-child { grid-column: 1 / -1; }
    .shell .user-mobile-data dt { color: #8fa9be; font-size: .69rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
    .shell .user-mobile-data dd { margin: 5px 0 0; color: #edf5fb; font-size: .82rem; overflow-wrap: anywhere; }
    .shell .user-mobile-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 12px 14px 14px;
        border-top: 1px solid rgba(179, 195, 212, .16);
    }
    .shell .user-mobile-actions .button { width: 100%; min-width: 0; font-size: .78rem; }

    .shell .settings-section-nav {
        top: 64px;
        display: flex;
        gap: 5px;
        margin-inline: -2px;
        padding: 6px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
    }
    .shell .settings-section-nav::-webkit-scrollbar { display: none; }
    .shell .settings-section-nav button { flex: 0 0 auto; min-height: 44px; padding: 8px 11px; font-size: .78rem; }
    .shell .department-settings-content .settings-section { scroll-margin-top: 126px; }
    .shell .settings-organization-cluster { scroll-margin-top: 126px; }
    .shell .settings-organization-header { display: grid; gap: 12px; padding: 17px 15px 14px; }
    .shell .settings-organization-summary { justify-self: start; white-space: normal; line-height: 1.4; }
    .shell .settings-organization-tabs {
        display: flex;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
    }
    .shell .settings-organization-tabs::-webkit-scrollbar { display: none; }
    .shell .settings-organization-tabs button { flex: 0 0 auto; min-width: 116px; min-height: 48px; }
    .shell .settings-organization-body { padding: 9px; }
    .shell .station-assignment-tools { grid-template-columns:1fr;align-items:stretch; }
    .shell .station-assignment-tools .action-row { display:grid;grid-template-columns:1fr 1fr; }
    .shell .station-assignment-tools .button { width:100%; }
    .shell .station-editor-tabs { grid-template-columns:1fr; }
    .shell .station-editor-tabs button { justify-content:flex-start; }
    .shell .station-editor-panel { min-height:0;padding:11px; }
    .shell .station-editor-panel-heading { display:grid;gap:4px; }

    .responder-bottom-nav button,
    .responder-shell .responder-nav-button { font-size: .74rem; }
    .responder-marker-card span,
    .responder-frequency span,
    .device-status strong,
    .device-status small { font-size: .76rem; }
}

@media (max-width: 380px) {
    .shell .nav-button,
    .shell .nav-more > summary { font-size: .66rem !important; }
    .shell .nav-icon { width: 24px; height: 24px; }
    .shell .user-mobile-data { grid-template-columns: 1fr; }
    .shell .user-mobile-data > div:last-child { grid-column: 1; }
    .shell .user-mobile-actions { grid-template-columns: 1fr; }
}
/* Destacamentos y móviles */
.settings-section-nav { grid-template-columns:repeat(auto-fit,minmax(118px,1fr)); }
.station-grid,.vehicle-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(310px,1fr));gap:14px; }
.station-card,.vehicle-card { display:flex;gap:14px;align-items:flex-start;padding:16px;border:1px solid var(--line);border-radius:16px;background:var(--surface-2); }
.station-card.inactive,.vehicle-card.inactive { opacity:.62; }
.station-card-icon,.vehicle-card-icon { display:grid;place-items:center;flex:0 0 44px;height:44px;border-radius:13px;background:rgba(62,201,187,.12);color:var(--green); }
.station-card-icon .ui-icon,.vehicle-card-icon .ui-icon { width:24px;height:24px; }
.station-card-main { min-width:0;flex:1; }
.station-card-title { display:flex;justify-content:space-between;gap:12px;align-items:flex-start; }
.station-card-title>div:first-child,.vehicle-card>div:nth-child(2) { display:grid;gap:3px;min-width:0; }
.station-card-title strong,.vehicle-card strong { font-size:1rem; }
.station-card-title span,.vehicle-card span,.vehicle-card small,.station-card p { color:var(--muted);font-size:.82rem; }
.station-card p { display:flex;align-items:center;gap:6px;margin:10px 0; }
.station-card p .ui-icon { width:15px;height:15px; }
.station-card-metrics { display:flex;flex-wrap:wrap;gap:7px; }
.station-card-metrics span { display:inline-flex;align-items:center;gap:5px;padding:6px 8px;border:1px solid var(--line);border-radius:999px;font-size:.74rem;color:var(--muted); }
.station-card-metrics .ui-icon { width:14px;height:14px;color:var(--green); }
.station-card-metrics b { color:var(--text); }
.vehicle-card { align-items:center; }
.vehicle-card>div:nth-child(2) { flex:1; }
.station-form { gap:18px; }
.station-location { border:1px solid var(--line);border-radius:13px;padding:12px 14px; }
.station-location summary { cursor:pointer;font-weight:700; }
.station-location[open] summary { margin-bottom:12px; }
.station-assignment { border:1px solid var(--line);border-radius:15px;padding:14px;min-width:0; }
.station-assignment legend { padding:0 7px;font-weight:800; }
.station-assignment>p { margin:0 0 10px;color:var(--muted);font-size:.8rem; }
.station-assignment-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:8px;max-height:210px;overflow:auto; }
.station-assignment-grid label { display:flex;align-items:center;gap:10px;padding:10px;border:1px solid var(--line);border-radius:11px;cursor:pointer; }
.station-assignment-grid label:has(input:checked) { border-color:var(--green);background:rgba(62,201,187,.1); }
.station-assignment-grid span { display:grid;min-width:0; }
.station-assignment-grid small { color:var(--muted); }
.callout-target-subheading { display:grid;gap:3px;margin:12px 2px 7px; }
.callout-target-subheading strong { font-size:.78rem; }
.callout-target-subheading small { line-height:1.4; }
.callout-target-subheading small,.callout-group-choice-copy em { color:var(--muted);font-style:normal;font-size:.75rem; }
.callout-station-picker { display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:10px; }
.callout-station-picker > .callout-target-subheading { grid-column:1/-1; }
.callout-station-target { overflow:hidden;border:1px solid var(--line);border-radius:14px;background:rgba(5,22,40,.5);transition:border-color .18s ease,background .18s ease; }
.callout-station-target.selected { border-color:#4d96c9;background:rgba(18,58,96,.48); }
.callout-station-target > .callout-station-choice { min-height:72px;border:0;border-radius:0;background:transparent; }
.callout-station-options { display:grid;grid-template-columns:1fr;gap:8px;padding:0 12px 12px;border-top:1px solid rgba(103,151,190,.2); }
.callout-station-mode { position:relative;display:flex;gap:9px;align-items:flex-start;margin-top:11px;padding:10px;border:1px solid var(--line-soft);border-radius:10px;background:rgba(255,255,255,.02);cursor:pointer; }
.callout-station-mode:has(input:checked) { border-color:var(--green);background:rgba(65,214,152,.08); }
.callout-station-mode input { margin-top:3px;accent-color:var(--green); }
.callout-station-mode strong,.callout-station-mode small { display:block; }
.callout-station-mode strong { font-size:.76rem; }
.callout-station-mode small { margin-top:3px;color:var(--muted);font-size:.68rem;line-height:1.35; }
.callout-station-groups,.callout-station-no-groups { grid-column:1/-1; }
.callout-station-groups { display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:8px;padding-top:3px; }
.callout-station-no-groups { margin:2px 0 0;padding:10px 12px;border-radius:9px;color:var(--muted);background:rgba(255,255,255,.025);font-size:.72rem; }

/* Creador de emergencias: lectura secuencial y revisión antes del despacho. */
.modal.callout-dispatch-modal { border-color:#365a78;background:#081a2c;box-shadow:0 28px 90px rgba(0,0,0,.58),0 0 0 1px rgba(93,163,211,.08); }
.modal.callout-dispatch-modal .modal-header { min-height:64px;border-bottom-color:#2c4b64;background:linear-gradient(90deg,#0c2948,#091d33); }
.modal.callout-dispatch-modal .modal-header h2 { font-size:1.05rem;letter-spacing:-.01em; }
.modal.callout-dispatch-modal .modal-body { background:radial-gradient(circle at 100% 0,rgba(30,86,130,.18),transparent 34%),#071827; }
.modal.callout-dispatch-modal .callout-warning { margin:0;border-color:rgba(229,57,78,.5);border-left:4px solid #e5394e;border-radius:12px;background:linear-gradient(90deg,rgba(132,25,43,.28),rgba(49,22,39,.3)); }
.modal.callout-dispatch-modal .callout-location-preview { border-color:rgba(65,196,172,.36);background:rgba(17,72,70,.28); }
.modal.callout-dispatch-modal .callout-dispatch-grid { grid-template-columns:repeat(3,minmax(0,1fr));gap:13px; }
.modal.callout-dispatch-modal .callout-dispatch-primary,
.modal.callout-dispatch-modal .callout-dispatch-secondary,
.modal.callout-dispatch-modal .callout-dispatch-reception { display:grid;min-width:0;align-content:start;gap:12px;padding:15px;border:1px solid #29465f;border-radius:15px;background:linear-gradient(150deg,rgba(14,43,68,.92),rgba(9,31,50,.96));box-shadow:0 10px 28px rgba(0,0,0,.12); }
.callout-dispatch-section-heading { display:flex;align-items:center;gap:10px;min-height:48px;padding-bottom:12px;border-bottom:1px solid rgba(103,151,190,.22); }
.callout-dispatch-section-heading > span { display:grid;flex:0 0 30px;height:30px;place-items:center;border:1px solid #4e91be;border-radius:9px;color:#d9f0ff;background:#164d79;font-size:.74rem;font-weight:900; }
.callout-dispatch-section-heading > div { display:grid;gap:2px;min-width:0; }
.callout-dispatch-section-heading strong { color:#f3f8fc;font-size:.88rem; }
.callout-dispatch-section-heading small { color:#9eb4c6;font-size:.68rem;line-height:1.35; }
.modal.callout-dispatch-modal .field > span { color:#d8e6f1; }
.modal.callout-dispatch-modal .input,
.modal.callout-dispatch-modal .select,
.modal.callout-dispatch-modal .textarea { border-color:#355772;background:#091d30; }
.modal.callout-dispatch-modal .input:focus,
.modal.callout-dispatch-modal .select:focus,
.modal.callout-dispatch-modal .textarea:focus { border-color:#69c3ea;box-shadow:0 0 0 3px rgba(105,195,234,.12); }
.modal.callout-dispatch-modal .callout-targeting { padding:0;border:0;background:transparent; }
.modal.callout-dispatch-modal .callout-target-scope { grid-template-columns:1fr; }
.modal.callout-dispatch-modal .callout-station-picker { width:100%;min-width:0; }
.modal.callout-dispatch-modal .callout-station-choice { padding-right:42px; }
.modal.callout-dispatch-modal .callout-station-mode { min-height:60px; }
.modal.callout-dispatch-modal .callout-custom-form { padding:12px;border-color:#31516a;background:rgba(6,24,40,.5); }
.callout-dispatch-review { display:grid;grid-template-columns:auto minmax(190px,.8fr) minmax(0,1.2fr);align-items:center;gap:12px;padding:12px 14px;border:1px solid #6f5630;border-radius:13px;background:rgba(106,70,22,.2); }
.callout-dispatch-review.ready { border-color:#287963;background:rgba(22,100,79,.22); }
.callout-dispatch-review-icon { display:grid;width:40px;height:40px;place-items:center;border-radius:11px;color:#ffc861;background:rgba(255,184,71,.12); }
.callout-dispatch-review.ready .callout-dispatch-review-icon { color:#65ddb8;background:rgba(53,205,160,.13); }
.callout-dispatch-review-icon .ui-icon { width:22px;height:22px; }
.callout-dispatch-review > div:nth-child(2) { display:grid;gap:2px; }
.callout-dispatch-review > div:nth-child(2) strong { font-size:.82rem; }
.callout-dispatch-review > div:nth-child(2) small { color:var(--muted);font-size:.68rem; }
.callout-dispatch-review-facts { display:flex;justify-content:flex-end;gap:8px;min-width:0; }
.callout-dispatch-review-facts span { display:inline-flex;min-width:0;align-items:center;gap:6px;padding:7px 9px;border:1px solid rgba(112,158,193,.24);border-radius:9px;color:#bed1df;background:rgba(5,22,40,.45);font-size:.69rem;line-height:1.3; }
.callout-dispatch-review-facts .ui-icon { flex:0 0 15px;width:15px;height:15px;color:#69c3ea; }
.modal.callout-dispatch-modal .modal-footer { position:sticky;bottom:0;z-index:5;border-top-color:#31516a;background:rgba(8,26,44,.97);backdrop-filter:blur(14px); }
.modal.callout-dispatch-modal #modal-confirm { min-width:190px;min-height:48px;background:#d9233f;box-shadow:0 8px 24px rgba(217,35,63,.25); }
.modal.callout-dispatch-modal #modal-confirm:hover { background:#ef3650; }
@media (max-width:1120px) {
    .modal.callout-dispatch-modal .callout-dispatch-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .modal.callout-dispatch-modal .callout-dispatch-reception { grid-column:1/-1; }
}
@media (max-width:760px) {
    .callout-station-picker { grid-template-columns:1fr; }
    .callout-station-options { grid-template-columns:1fr; }
    .callout-station-groups { grid-template-columns:1fr; }
    .modal.callout-dispatch-modal .callout-dispatch-grid { grid-template-columns:1fr; }
    .modal.callout-dispatch-modal .callout-dispatch-reception { grid-column:auto; }
    .modal.callout-dispatch-modal .callout-dispatch-primary,
    .modal.callout-dispatch-modal .callout-dispatch-secondary,
    .modal.callout-dispatch-modal .callout-dispatch-reception { padding:12px; }
    .callout-dispatch-review { grid-template-columns:auto minmax(0,1fr); }
    .callout-dispatch-review-facts { grid-column:1/-1;display:grid;justify-content:stretch; }
    .modal.callout-dispatch-modal .modal-footer { display:grid;grid-template-columns:1fr 1fr; }
    .modal.callout-dispatch-modal .modal-error { grid-column:1/-1; }
    .modal.callout-dispatch-modal #modal-confirm { min-width:0; }
}
@media(max-width:680px){.station-grid,.vehicle-grid{grid-template-columns:1fr}.station-card,.vehicle-card{padding:13px}.station-assignment-grid{grid-template-columns:1fr}.station-card-title{align-items:center}}

/* Buscador operativo de compañeros del respondedor. */
.responder-map-heading-actions { display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap; }
.responder-callout-inline-actions { display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px; }
.responder-callout-inline-actions .button { min-height:46px; }
.responder-map-heading-actions .button { min-height:44px;white-space:nowrap; }
.responder-map-heading-actions .ui-icon { width:18px;height:18px; }
.responder-peer-finder { display:grid;gap:11px;padding:14px 16px;border-bottom:1px solid #29465f;background:linear-gradient(180deg,#10273b,#0d2133); }
.responder-peer-search-row { display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:12px; }
.responder-peer-search-row .field { margin:0; }
.responder-peer-search-row .input { min-height:46px;background:#091d30; }
.responder-peer-count { align-self:end;display:inline-flex;min-height:46px;align-items:center;padding:0 12px;border:1px solid #31536e;border-radius:11px;color:#b8cedd;background:#0b1d2d;font-size:.72rem;font-weight:800;white-space:nowrap; }
.responder-peer-filters { display:flex;gap:7px;overflow-x:auto;scrollbar-width:none; }
.responder-peer-filters::-webkit-scrollbar { display:none; }
.responder-peer-filters button { min-height:38px;padding:7px 12px;border:1px solid #31536e;border-radius:999px;color:#b7c9d6;background:#0b1d2d;font:800 .72rem/1 inherit;white-space:nowrap;cursor:pointer; }
.responder-peer-filters button[aria-pressed="true"] { border-color:#54c9bc;color:#ecfffc;background:#174d51;box-shadow:inset 0 0 0 1px rgba(84,201,188,.22); }
.responder-peer-results { display:grid;gap:8px;max-height:260px;overflow-y:auto;overscroll-behavior:contain;padding-right:3px;scrollbar-width:thin; }
.responder-peer-result { display:grid;grid-template-columns:46px minmax(0,1fr) auto;align-items:center;gap:11px;padding:10px;border:1px solid #2d4b62;border-radius:13px;background:#0b1e2f; }
.responder-peer-result > img { width:46px;height:46px;object-fit:cover;border:2px solid #4fdbc3;border-radius:50%;background:#142b3d; }
.responder-peer-result.last > img { border-color:#8ca0ae;filter:grayscale(.85);opacity:.82; }
.responder-peer-result.delayed > img { border-color:#f0b94f; }
.responder-peer-result-copy { display:grid;gap:3px;min-width:0; }
.responder-peer-result-copy strong { overflow:hidden;color:#f4f8fb;font-size:.84rem;text-overflow:ellipsis;white-space:nowrap; }
.responder-peer-result-copy span { display:flex;align-items:center;gap:5px;color:#a9bdcb;font-size:.68rem;line-height:1.35; }
.responder-peer-result-copy span i { flex:0 0 7px;width:7px;height:7px;border-radius:50%;background:#4fd2aa;box-shadow:0 0 0 3px rgba(79,210,170,.12); }
.responder-peer-result.delayed .responder-peer-result-copy span i { background:#f0b94f; }
.responder-peer-result.last .responder-peer-result-copy span i { background:#8ca0ae; }
.responder-peer-result-copy small { overflow:hidden;color:#7f9aaa;font-size:.65rem;text-overflow:ellipsis;white-space:nowrap; }
.responder-peer-result-actions { display:flex;gap:7px; }
.responder-peer-result-actions .icon-action { width:44px;height:44px;padding:11px; }
.responder-peer-empty { display:grid;justify-items:start;gap:5px;padding:16px;border:1px dashed #38566d;border-radius:12px;color:#a9bdcb;background:rgba(6,22,35,.45); }
.responder-peer-empty strong { color:#edf6fb;font-size:.82rem; }
.responder-peer-empty span { font-size:.72rem;line-height:1.45; }
.responder-peer-empty .button { margin-top:5px; }
.responder-peer-popup-title { align-items:center; }
.responder-peer-popup-title > img { width:42px;height:42px;object-fit:cover;border:2px solid #4fdbc3;border-radius:50%; }
.responder-peer-popup-title > div { display:grid;gap:3px; }
.peer-popup-status { color:#4fd2aa;font-size:.67rem;font-weight:800; }
.peer-popup-status.delayed { color:#f0b94f; }
.peer-popup-status.last { color:#9aabb6; }
@media(max-width:760px){
    .responder-map-heading-actions { display:grid;grid-template-columns:1fr 1fr;width:100%; }
    .responder-map-heading-actions .button { width:100%;justify-content:center;padding-inline:9px;font-size:.73rem; }
    .responder-peer-finder { padding:12px; }
    .responder-peer-search-row { grid-template-columns:1fr;gap:7px; }
    .responder-peer-count { justify-content:center;min-height:34px;justify-self:start;padding-inline:10px; }
    .responder-peer-results { max-height:min(38vh,310px); }
    .responder-peer-result { grid-template-columns:42px minmax(0,1fr) auto;padding:9px; }
    .responder-peer-result > img { width:42px;height:42px; }
    .responder-peer-result-actions { gap:5px; }
    .responder-peer-result-actions .icon-action { width:42px;height:42px;padding:10px; }
}
@media(max-width:390px){
    .responder-peer-result { grid-template-columns:38px minmax(0,1fr); }
    .responder-peer-result > img { width:38px;height:38px; }
    .responder-peer-result-actions { grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr; }
    .responder-peer-result-actions .icon-action { width:100%; }
}

/* Normalización visual posterior a la auditoría UX/UI. */
:root {
    --brand-primary:#2474b5;
    --brand-primary-hover:#3d91d0;
    --status-success:#39b980;
    --status-warning:#ffb547;
    --status-danger:#e51b2a;
}
.shell { --sidebar-width:236px;grid-template-columns:var(--sidebar-width) minmax(0,1fr); }
.nav-label-mobile { display:none; }
.shell .sidebar { width:var(--sidebar-width); }
.shell .button.primary { background:var(--brand-primary);border-color:var(--brand-primary); }
.shell .button.primary:hover { background:var(--brand-primary-hover);border-color:var(--brand-primary-hover); }
.live-dot,.signal.online,.marker-avatar.online { background:var(--status-success); }
.shell .sidebar > .emergency-callout-button .ui-icon-siren { color:#fff!important; }
.mode-pill .ui-icon { width:15px;height:15px; }
#sound-toggle .ui-icon,#account-button .ui-icon,.close-button .ui-icon { width:20px;height:20px; }
.close-button { display:grid;place-items:center; }
.device-health-summary { width:100%;font:inherit;text-align:left;cursor:pointer; }
.device-health-summary > span { display:flex;align-items:center;gap:5px; }
.device-health-summary > span .ui-icon { width:14px;height:14px;transform:rotate(-90deg); }
.responder-peer-filters button[aria-pressed="true"] { border-color:var(--brand-primary);background:#174b76;box-shadow:inset 0 0 0 1px rgba(61,145,208,.22); }
.responder-map-gesture-button { min-height:46px!important; }
.responder-map-heading { flex-wrap:wrap; }
.responder-map-heading-actions { max-width:100%; }
.responder-alert-preferences > .responder-preference { min-height:46px; }
@media(min-width:761px){
    .shell .nav-more-menu { left:calc(var(--sidebar-width) + 8px); }
}
@media(max-width:760px){
    .shell { display:block; }
    .shell .sidebar { width:100%; }
    .shell .nav-label { overflow-wrap:normal!important;white-space:nowrap;font-size:.68rem;letter-spacing:-.01em; }
    .shell .nav-label-desktop { display:none; }
    .shell .nav-label-mobile { display:inline; }
    .shell .nav-button,.shell .nav-more>summary { font-size:.68rem!important; }
    .shell .sidebar>.emergency-callout-button { right:14px;bottom:calc(92px + env(safe-area-inset-bottom));width:52px!important;height:52px!important; }
    .shell .content:not(.monitor-content),.shell .content { padding-bottom:calc(148px + env(safe-area-inset-bottom)); }
    .shell .topbar { display:grid;grid-template-columns:1fr;align-items:center;gap:7px; }
    .shell .topbar h1 { max-width:none!important;font-size:.94rem!important; }
    .shell .topbar-meta { display:flex;width:100%;min-width:0; }
    .shell .topbar-meta .department-switcher { flex:1 1 auto;width:auto;max-width:none; }
    .shell .nav-more-menu { bottom:calc(84px + env(safe-area-inset-bottom));max-height:min(68vh,530px);padding:12px; }
    .shell .nav-more-menu .support-nav-link { grid-column:1/-1;min-height:48px; }
    .responder-map-heading { align-items:stretch!important;flex-direction:column!important; }
    .responder-map-heading-actions { display:grid;grid-template-columns:1fr 1fr;width:100%; }
    .responder-alert-preferences { grid-template-columns:1fr 1fr; }
    .responder-alert-preferences > div,.responder-alert-preferences > .membership-callout-list,
    .responder-alert-preferences > .responder-preference:has(strong) { grid-column:1/-1; }
    .responder-alert-preferences > .responder-preference:has(strong) { justify-content:flex-start; }
}
@media(max-width:390px){
    .responder-peer-result-actions { display:flex;justify-content:flex-end; }
    .responder-peer-result-actions .icon-action { width:44px;min-width:44px; }
    .responder-callout-inline-actions { grid-template-columns:1fr; }
}

/* El menú complementario siempre permanece dentro del área visible. */
@media (min-width:761px) {
    /* Mantiene las herramientas laterales por delante de los controles del mapa. */
    .shell .sidebar:has(.nav-more[open]) { z-index:1600; }
    .shell .nav-more-menu {
        position:fixed;
        z-index:1650;
        top:12px;
        right:auto;
        bottom:auto;
        left:244px;
        width:232px;
        max-height:calc(100dvh - 24px);
        overflow-y:auto;
        overscroll-behavior:contain;
        scrollbar-width:thin;
    }
}

.callout-option-list { display:grid;gap:8px; }
.callout-option-row { display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center; }
.callout-option-row .icon-action { width:44px;height:44px; }
.callout-option-add { justify-self:start;margin-top:8px; }

/* Panel integral de destacamentos y base única de móviles. */
.modal.station-editor-modal { width:min(1120px,calc(100vw - 28px)); }
.station-workspace { gap:13px; }
.station-workspace-hero { display:grid;grid-template-columns:minmax(0,1.2fr) minmax(390px,.8fr);gap:18px;align-items:center;padding:16px;border:1px solid #315875;border-radius:16px;background:linear-gradient(135deg,rgba(18,65,101,.72),rgba(7,28,46,.9)); }
.station-workspace-identity { display:flex;align-items:center;gap:13px;min-width:0; }
.station-workspace-identity h3 { margin:2px 0 4px;color:#f5f9fc;font-size:1.12rem; }
.station-workspace-identity p { margin:0;color:#aac0d1;font-size:.76rem;line-height:1.45; }
.station-workspace-summary { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px; }
.station-workspace-summary > span { display:grid;grid-template-columns:auto 1fr;align-items:center;gap:2px 7px;padding:9px;border:1px solid rgba(110,168,210,.25);border-radius:11px;background:rgba(5,25,42,.62); }
.station-workspace-summary .ui-icon { grid-row:1/3;width:19px;height:19px;color:#63d5c5; }
.station-workspace-summary b { color:#fff;font-size:.94rem;line-height:1; }
.station-workspace-summary small { color:#91aabd;font-size:.61rem; }
.station-workspace .station-editor-tabs { grid-template-columns:repeat(5,minmax(0,1fr)); }
.station-workspace .station-editor-tabs button:disabled { opacity:.42;cursor:not-allowed; }
.station-workspace .station-editor-panel { max-height:min(54vh,520px);overflow:auto;overscroll-behavior:contain; }
.station-workspace .station-editor-panel-heading > div { display:grid;gap:3px; }
.station-section-toolbar { align-items:center; }
.station-workspace-list { grid-template-columns:1fr;align-content:start; }
.station-workspace-list .response-group-card,.station-workspace-list .vehicle-card { background:rgba(12,42,66,.72); }
.vehicle-base-notice,.group-station-lock { display:flex;align-items:center;gap:11px;padding:12px 13px;border:1px solid rgba(77,176,164,.42);border-radius:12px;background:rgba(27,91,86,.24); }
.vehicle-base-notice .ui-icon,.group-station-lock .ui-icon { flex:0 0 24px;width:24px;height:24px;color:#63d5c5; }
.vehicle-base-notice > div,.group-station-lock > div { display:grid;gap:2px; }
.vehicle-base-notice strong,.group-station-lock strong { color:#eef9f7;font-size:.82rem; }
.vehicle-base-notice span,.group-station-lock span { color:#9ec6c1;font-size:.7rem;line-height:1.4; }
@media(max-width:900px){
    .station-workspace-hero{grid-template-columns:1fr}.station-workspace-summary{max-width:520px}
}
@media(max-width:760px){
    .shell .station-workspace .station-editor-tabs{display:flex;grid-template-columns:none;overflow-x:auto;scrollbar-width:none}.shell .station-workspace .station-editor-tabs button{flex:0 0 auto;justify-content:center;min-width:116px}.station-workspace-hero{padding:13px}.station-workspace-summary{grid-template-columns:repeat(2,1fr)}.station-workspace .station-editor-panel{max-height:none}.station-section-toolbar{align-items:stretch}.station-section-toolbar .button{width:100%}
}

/* Overrides finales auditados: mantienen la composición tras los temas heredados. */
.responder-peer-result { grid-template-columns:46px minmax(0,1fr);grid-template-areas:"peer-avatar peer-copy" "peer-avatar peer-actions";align-items:start; }
.responder-peer-result > img { grid-area:peer-avatar; }
.responder-peer-result-copy { grid-area:peer-copy; }
.responder-peer-result-actions { grid-area:peer-actions;display:flex;justify-content:flex-start;gap:7px;min-width:0; }
.responder-peer-result-actions .peer-action { display:inline-flex;width:auto!important;min-width:82px!important;height:40px;align-items:center;justify-content:center;gap:6px;padding:8px 11px; }
.responder-peer-result-actions .peer-action .ui-icon { width:17px;height:17px; }
.responder-peer-result-actions .peer-action span { font-size:.7rem;font-weight:850; }
.responder-peer-result-copy span { flex-wrap:wrap; }
@media(min-width:1181px){
    .modal.callout-dispatch-modal { width:min(1660px,calc(100vw - 24px));height:calc(100dvh - 24px);max-height:calc(100dvh - 24px); }
    .modal.callout-dispatch-modal .modal-body { flex:1;min-height:0;overflow:auto;padding:16px 20px 18px; }
    .modal.callout-dispatch-modal .callout-dispatch-grid { grid-template-columns:minmax(300px,.9fr) minmax(350px,1fr) minmax(390px,1.15fr);gap:16px;align-items:start; }
    .modal.callout-dispatch-modal .callout-dispatch-primary,.modal.callout-dispatch-modal .callout-dispatch-secondary,.modal.callout-dispatch-modal .callout-dispatch-reception { min-height:calc(100dvh - 250px); }
    .modal.callout-dispatch-modal .callout-dispatch-secondary,.modal.callout-dispatch-modal .callout-dispatch-reception { max-height:calc(100dvh - 250px);overflow-y:auto;scrollbar-width:thin; }
}
@media(max-width:760px){
    .responder-peer-finder { min-width:0;overflow:hidden; }
    .responder-peer-result { grid-template-columns:44px minmax(0,1fr);grid-template-areas:"peer-avatar peer-copy" "peer-avatar peer-actions";gap:7px 10px;padding:11px; }
    .responder-peer-result > img { width:44px;height:44px; }
    .responder-peer-result-actions { grid-column:auto!important;display:flex!important;justify-content:flex-start!important; }
    .responder-peer-result-actions .peer-action { width:auto!important;min-width:82px!important;height:42px;padding:8px 10px; }
    .responder-peer-result-copy strong { font-size:.88rem; }
    .responder-peer-result-copy span,.responder-peer-result-copy small { font-size:.74rem;white-space:normal; }
}
/* Radar meteorológico y ciclo operativo de avisos */
.rain-radar-control { display:grid; grid-template-columns:minmax(0,1fr) 44px; gap:8px; align-items:center; margin-top:10px; padding:10px; border:1px solid #31506b; border-radius:12px; background:#081927; }
.rain-radar-toggle { min-height:44px; justify-content:flex-start; gap:8px; }
.rain-radar-toggle.active { color:#fff; border-color:#3f9fd8; background:#173f63; }
.rain-radar-play { width:44px; height:44px; }
.rain-radar-time { grid-column:1 / -1; display:flex; align-items:center; justify-content:space-between; gap:10px; color:#9fb4c7; font-size:.76rem; }
.rain-radar-time strong { color:#e9f3fa; font-size:.8rem; }
.rain-radar-time a { color:#71c7ee; }
.rain-radar-tiles { image-rendering:auto; transition:opacity .16s linear; }
.monitor-weather-alert { width:100%; display:flex; align-items:center; gap:8px; padding:9px 10px; border:1px solid rgba(248,113,113,.45); border-radius:10px; color:#fecaca; background:rgba(127,29,29,.22); text-align:left; cursor:pointer; }
.monitor-weather-alert > span:last-child { margin-left:auto; color:#fff; font-size:.75rem; }
.monitor-weather-values { grid-template-columns:repeat(2,minmax(0,1fr)); }
.wind-direction-div-icon { background:transparent; border:0; }
.wind-direction-marker { width:82px; height:82px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; border:1px solid rgba(117,201,238,.75); border-radius:50%; color:#eff9ff; background:rgba(6,28,46,.88); box-shadow:0 8px 24px rgba(0,0,0,.32); }
.wind-direction-arrow { display:grid; place-items:center; width:34px; height:34px; color:#58c9f2; transform:rotate(var(--wind-rotation)); transform-origin:center; }
.wind-direction-arrow .ui-icon { width:32px; height:32px; stroke-width:2.3; }
.wind-direction-marker strong { font-size:.68rem; white-space:nowrap; }
.weather-wind-control { position:absolute;z-index:860;right:16px;bottom:18px;display:flex;align-items:center;gap:10px;min-width:148px;padding:10px 13px 10px 10px;border:1px solid rgba(117,201,238,.68);border-radius:16px;color:#eff9ff;background:rgba(6,28,46,.92);box-shadow:0 10px 28px rgba(0,0,0,.36);backdrop-filter:blur(8px);pointer-events:none; }
.weather-wind-control .wind-direction-arrow { flex:0 0 42px;width:42px;height:42px;border:1px solid rgba(88,201,242,.3);border-radius:50%;background:rgba(31,105,145,.2); }
.weather-wind-control .wind-direction-arrow .ui-icon { width:31px;height:31px; }
.weather-wind-copy { display:grid;gap:1px;min-width:0; }
.weather-wind-copy small { color:#75c9ee;font-size:.61rem;font-weight:900;letter-spacing:.11em; }
.weather-wind-copy strong { font-size:.86rem;white-space:nowrap; }
.weather-wind-copy em { overflow:hidden;color:#a9bfd0;font-size:.66rem;font-style:normal;text-overflow:ellipsis;white-space:nowrap; }
@media(max-width:760px){.weather-wind-control{right:10px;bottom:12px;min-width:132px;padding:8px 10px 8px 8px}.weather-wind-control .wind-direction-arrow{flex-basis:38px;width:38px;height:38px}.weather-wind-copy em{display:none}}
.responder-weather-card { width:100%; appearance:none; display:grid; grid-template-columns:48px minmax(0,1fr) 24px; gap:12px; align-items:center; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.responder-weather-open { color:#8fb0c9; }
.weather-alert-modal-list { display:grid; gap:12px; }
.weather-alert-modal-card { display:grid; grid-template-columns:48px minmax(0,1fr); gap:14px; padding:16px; border:1px solid color-mix(in srgb, var(--weather-color) 70%, #27445b); border-left:5px solid var(--weather-color); border-radius:14px; background:#0a1d2c; }
.weather-alert-modal-icon { display:grid; place-items:center; width:46px; height:46px; border-radius:12px; color:var(--weather-color); background:color-mix(in srgb, var(--weather-color) 15%, transparent); }
.weather-alert-modal-card h3 { margin:3px 0 8px; font-size:1.08rem; }
.weather-alert-modal-card p { margin:0 0 12px; color:#d8e7f2; }
.weather-alert-modal-state { color:var(--weather-color); font-size:.7rem; font-weight:900; letter-spacing:.08em; }
.weather-alert-modal-card dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 14px; margin:0; }
.weather-alert-modal-card dl div { display:grid; gap:2px; }
.weather-alert-modal-card dt { color:#91a9bb; font-size:.72rem; }
.weather-alert-modal-card dd { margin:0; color:#edf6fb; font-size:.82rem; font-weight:700; }
.weather-alert-modal-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.weather-alert-history { margin-top:16px; border:1px solid #2b455a; border-radius:12px; background:#091a28; }
.weather-alert-history summary { display:flex; justify-content:space-between; gap:10px; padding:14px; cursor:pointer; font-weight:800; }
.weather-alert-history > div { display:grid; gap:0; border-top:1px solid #2b455a; }
.weather-alert-history article { display:grid; gap:4px; padding:12px 14px; border-bottom:1px solid rgba(43,69,90,.7); }
.weather-alert-history article:last-child { border:0; }
.weather-alert-history article span, .weather-alert-history article p { margin:0; color:#9eb5c6; font-size:.78rem; }
@media (max-width:760px) {
    .weather-alert-modal-card { grid-template-columns:40px minmax(0,1fr); padding:13px; }
    .weather-alert-modal-card dl { grid-template-columns:1fr; }
    .weather-alert-modal-actions .button { min-height:46px; flex:1; }
    .rain-radar-time { align-items:flex-start; flex-direction:column; }
}

/* Centro operativo v168: controles compactos y mapa prioritario. */
.monitor-controls-backdrop { display:none; }
.shell .monitor-layout { grid-template-columns:332px minmax(0,1fr); }
.shell .monitor-toolbar { gap:9px;padding:12px; }
.monitor-toolbar-heading { min-height:42px;padding:0 2px 3px; }
.monitor-toolbar-heading > div:first-child { min-width:0; }
.monitor-toolbar-heading strong { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.94rem; }
.monitor-toolbar-heading-actions { display:flex;align-items:center;gap:8px; }
.monitor-toolbar-live { display:inline-flex;align-items:center;gap:6px;padding:6px 9px;border:1px solid rgba(57,185,128,.28);border-radius:999px;color:#85dfb3;background:rgba(57,185,128,.09);font-size:.66rem;font-weight:800;white-space:nowrap; }
.monitor-toolbar-live i { width:7px;height:7px;border-radius:50%;background:#39b980;box-shadow:0 0 0 4px rgba(57,185,128,.12); }
.shell .monitor-panel-close { display:none !important; }
.monitor-panel-tabs { gap:4px;padding:3px;border-radius:11px; }
.monitor-panel-tabs button { position:relative;min-height:44px;grid-template-columns:minmax(0,1fr) auto;place-items:center stretch;gap:3px;padding:6px 8px; }
.monitor-panel-tabs button span { justify-content:flex-start;font-size:.7rem; }
.monitor-panel-tabs button b { align-self:center;justify-self:end; }
.monitor-panel-search-wrap { position:relative;display:block; }
.monitor-panel-search-wrap > .ui-icon { position:absolute;z-index:2;left:12px;top:50%;width:17px;height:17px;color:#6f91aa;transform:translateY(-50%);pointer-events:none; }
.shell .monitor-toolbar .monitor-panel-search { width:100%;min-height:42px;padding-left:38px;font-size:.78rem; }
.monitor-weather-disclosure,.monitor-address-disclosure,.monitor-filter-disclosure { overflow:hidden;border:1px solid #315577;border-radius:12px;background:#0b2541; }
.monitor-weather-disclosure > summary,.monitor-address-disclosure > summary,.monitor-filter-disclosure > summary { display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;padding:9px 11px;list-style:none;cursor:pointer; }
.monitor-weather-disclosure > summary::-webkit-details-marker,.monitor-address-disclosure > summary::-webkit-details-marker,.monitor-filter-disclosure > summary::-webkit-details-marker { display:none; }
.monitor-weather-disclosure > summary::after,.monitor-address-disclosure > summary::after,.monitor-filter-disclosure > summary::after { content:'⌄';color:#64b9eb;font-size:1rem;transition:transform .16s ease; }
.monitor-weather-disclosure[open] > summary::after,.monitor-address-disclosure[open] > summary::after,.monitor-filter-disclosure[open] > summary::after { transform:rotate(180deg); }
.monitor-weather-disclosure summary span,.monitor-address-disclosure summary span { display:inline-flex;align-items:center;gap:7px;font-size:.76rem;font-weight:800; }
.monitor-weather-disclosure summary span .ui-icon,.monitor-address-disclosure summary span .ui-icon { width:17px;height:17px;color:#69c6ff; }
.monitor-weather-disclosure summary small,.monitor-address-disclosure summary small { margin-left:auto;color:#8ea9bd;font-size:.68rem;font-weight:750; }
.monitor-weather-disclosure summary small.has-alerts { color:#ff8a97; }
.monitor-weather-disclosure .monitor-weather-summary { border:0;border-top:1px solid #294d70;border-radius:0;background:#091e34; }
.shell .monitor-list .monitor-address-disclosure .address-search-block { padding:10px;border:0;border-top:1px solid #294d70;border-radius:0;background:#091e34; }
.shell .monitor-list .address-search-form { grid-template-columns:minmax(0,1fr) 88px;gap:7px; }
.shell .monitor-list .address-search-form .input,.shell .monitor-list .address-search-form .button { min-height:40px; }
.shell .monitor-list .address-search-form .button { gap:5px;padding-inline:9px; }
.shell .monitor-list .address-search-form .button .ui-icon { width:16px;height:16px; }
.shell .monitor-list .address-search-status { max-width:none;margin:0;text-align:left;font-size:.68rem; }
.monitor-weather-summary { grid-template-columns:minmax(0,1fr) auto;gap:5px 10px;padding:9px 10px; }
.monitor-weather-head { grid-column:1/-1; }
.monitor-weather-values { grid-template-columns:auto auto;gap:2px 10px; }
.monitor-weather-values strong { font-size:1.12rem; }
.monitor-weather-alert,.monitor-weather-ok { grid-column:1/-1;padding-top:5px; }
.monitor-filter-disclosure > summary { min-height:44px; }
.monitor-filter-body { gap:7px;padding:0 9px 9px; }
.monitor-filter-body > :first-child { margin-top:9px; }
.shell .monitor-toolbar { flex:0 0 auto;max-height:55%;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#426675 #10212d; }
.monitor-panel-view { flex:1 1 auto;min-height:180px; }
.monitor-list-summary { padding:9px 4px 7px; }
.responder-card { min-height:62px;padding:9px; }

@media (min-width:761px) and (max-width:1180px) {
    .shell .monitor-layout { grid-template-columns:304px minmax(0,1fr); }
    .monitor-address-disclosure:not([open]) + .monitor-filter-disclosure { margin-top:0; }
}

@media (max-width:760px) {
    body.monitor-panel-open { overflow:hidden; }
    .monitor-controls-backdrop { position:fixed;z-index:1085;inset:0 0 calc(76px + env(safe-area-inset-bottom));display:block;border:0;background:rgba(1,8,16,.62);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .18s ease,visibility .18s;backdrop-filter:blur(2px); }
    .monitor-controls-backdrop.active { opacity:1;visibility:visible;pointer-events:auto; }
    .shell .monitor-list { position:fixed;z-index:1100;left:8px;right:8px;top:auto;bottom:calc(80px + env(safe-area-inset-bottom));width:auto;max-height:min(76dvh,680px);overflow:hidden;border-radius:20px 20px 16px 16px;background:#071a31;opacity:0;visibility:hidden;pointer-events:none;transform:translateY(18px); }
    .shell .monitor-list.mobile-expanded { opacity:1;visibility:visible;pointer-events:auto;transform:translateY(0); }
    .shell .monitor-toolbar { flex:0 0 auto;max-height:min(44dvh,390px);overflow-y:auto;padding:12px 12px 10px;overscroll-behavior:contain; }
    .monitor-toolbar-heading { position:sticky;z-index:5;top:-12px;margin:-12px -12px 0;padding:12px 12px 8px;border-bottom:1px solid rgba(49,85,119,.68);background:#071a31; }
    .monitor-toolbar-heading span:first-child { font-size:.62rem; }
    .monitor-toolbar-heading strong { font-size:1rem; }
    .monitor-toolbar-live { display:none; }
    .shell .monitor-panel-close { display:grid !important;width:44px;height:44px;border-color:#315577;background:#0c2845; }
    .monitor-panel-tabs button { min-height:48px;grid-template-columns:1fr;place-items:center;gap:2px;padding:6px 5px; }
    .monitor-panel-tabs button span { justify-content:center;font-size:.72rem; }
    .monitor-panel-tabs button b { position:absolute;margin:0 0 22px 58px;justify-self:center; }
    .monitor-weather-summary { padding:9px 10px; }
    .monitor-address-disclosure:not([open]) .address-search-block { display:none; }
    .shell .monitor-list .address-search-form { grid-template-columns:minmax(0,1fr) 86px; }
    .monitor-panel-view { flex:1 1 220px;min-height:180px;max-height:none;border-top:1px solid #294151; }
    .monitor-list-summary { position:sticky;top:0;padding-inline:12px;background:#071a31; }
    .shell .responders,.monitor-reference-list { padding:7px 10px 12px; }
    .shell .topbar .monitor-controls-button { display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:86px; }
    .shell .topbar .monitor-controls-button .ui-icon { width:18px;height:18px; }
    .shell .topbar .monitor-controls-button span { font-size:.75rem;font-weight:800; }
}

@media (max-width:390px) {
    .shell .monitor-list { left:5px;right:5px;bottom:calc(78px + env(safe-area-inset-bottom)); }
    .shell .monitor-toolbar { padding-inline:10px; }
    .monitor-toolbar-heading { margin-inline:-10px;padding-inline:10px; }
    .shell .topbar .monitor-controls-button { min-width:76px;padding-inline:8px; }
}

/* Centro operativo v171: personal desacoplado y respiración visual en PC. */
.monitor-personnel-dock { display:none; }

@media (min-width:1181px) {
    .shell .monitor-layout { grid-template-columns:356px minmax(0,1fr); }
    .shell .monitor-toolbar { gap:12px;max-height:58%;padding:16px; }
    .shell .monitor-toolbar .monitor-panel-search { min-height:46px;font-size:.82rem; }
    .monitor-toolbar-heading { min-height:48px;padding-bottom:6px; }
    .monitor-toolbar-heading strong { font-size:1.02rem; }
    .monitor-panel-tabs { gap:7px;padding:5px;grid-template-columns:repeat(2,minmax(0,1fr)); }
    .monitor-panel-tabs button { min-height:50px;padding:8px 10px; }
    .monitor-panel-tabs button[data-monitor-panel-tab="personal"] { display:none; }
    .monitor-weather-disclosure > summary,.monitor-address-disclosure > summary,.monitor-filter-disclosure > summary { min-height:48px;padding:11px 13px; }
    .monitor-panel-view[data-monitor-panel-view="personal"] { display:none !important; }
    .monitor-panel-view { min-height:220px; }
    .monitor-map-workspace,.monitor-map-workspace.detail-open { display:grid;grid-template-columns:minmax(0,1fr) 320px;height:100%;min-height:0; }
    .monitor-map-workspace .map-wrap { grid-column:1;min-width:0;height:100%; }
    .monitor-personnel-dock { grid-column:2;display:flex;min-width:0;min-height:0;flex-direction:column;border-left:1px solid #315577;background:#071a31; }
    .monitor-personnel-dock > header { display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:72px;padding:14px 16px;border-bottom:1px solid #294d70; }
    .monitor-personnel-dock > header span,.monitor-personnel-dock > header strong { display:block; }
    .monitor-personnel-dock > header span { color:#69b7e8;font-size:.67rem;font-weight:850;letter-spacing:.09em;text-transform:uppercase; }
    .monitor-personnel-dock > header strong { margin-top:4px;font-size:1.02rem; }
    .monitor-personnel-dock > header b { display:grid;place-items:center;min-width:32px;height:32px;padding:0 9px;border:1px solid #315577;border-radius:999px;color:#d9ecfa;background:#0d2c4b;font-size:.8rem; }
    .monitor-personnel-search { display:flex;align-items:center;gap:8px;margin:12px 12px 4px;padding:0 10px;min-height:44px;border:1px solid #315577;border-radius:12px;background:#081d34;color:#70c5f3; }
    .monitor-personnel-search > svg { width:18px;height:18px;flex:0 0 auto; }
    .monitor-personnel-search input { min-width:0;flex:1;border:0;outline:0;background:transparent;color:#ecf7ff;font:inherit;font-size:.78rem; }
    .monitor-personnel-search input::placeholder { color:#7f9db5; }
    .monitor-personnel-search button { display:grid;place-items:center;width:28px;height:28px;padding:0;border:0;border-radius:8px;background:#153653;color:#d9ecfa;cursor:pointer; }
    .monitor-personnel-search button svg { width:14px;height:14px; }
    .monitor-personnel-search:focus-within { border-color:#55bdf3;box-shadow:0 0 0 3px rgba(70,167,220,.14); }
    .monitor-personnel-dock > .responders { flex:1;min-height:0;overflow-x:hidden;overflow-y:auto;padding:0 12px 16px;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#426675 #10212d; }
    .monitor-personnel-dock .monitor-list-summary { padding:14px 2px 12px; }
    .monitor-personnel-dock .responder-card { min-height:76px;margin-bottom:9px;padding:12px;border:1px solid transparent;border-radius:14px; }
    .monitor-personnel-dock .responder-card:hover { border-color:#315577;background:#0d2945; }
    .monitor-personnel-dock .responder-card > span { gap:3px; }
    .monitor-personnel-dock .responder-card strong { font-size:.82rem; }
    .monitor-personnel-dock .responder-card small,.monitor-personnel-dock .responder-card em { font-size:.7rem;line-height:1.35; }
}

@media (min-width:1181px) and (max-width:1500px) {
    .shell .monitor-layout { grid-template-columns:326px minmax(0,1fr); }
    .monitor-map-workspace,.monitor-map-workspace.detail-open { grid-template-columns:minmax(0,1fr) 286px; }
    .monitor-personnel-dock > header { padding-inline:13px; }
    .monitor-personnel-dock > .responders { padding-inline:9px; }
}

/* Centro operativo v174: tablero abierto, ordenable y bloqueable. */
.monitor-layout { position:relative; }
.monitor-widget { position:relative;overflow:hidden;border:1px solid #315577;border-radius:14px;background:#0b2541;transition:border-color .16s ease,box-shadow .16s ease,opacity .16s ease; }
.monitor-widget-heading { display:flex;align-items:center;gap:9px;min-height:46px;padding:10px 12px;border-bottom:1px solid #294d70;color:#e7f2f9;background:#0c2947; }
.monitor-widget-heading > span { display:inline-flex;align-items:center;gap:7px;min-width:0;font-size:.78rem;font-weight:850; }
.monitor-widget-heading > span .ui-icon { width:17px;height:17px;color:#69c6ff; }
.monitor-widget-heading > small { margin-left:auto;color:#9ab0c1;font-size:.67rem;font-weight:750;white-space:nowrap; }
.monitor-widget-heading > button { display:grid;place-items:center;width:32px;height:32px;margin-left:2px;border:1px solid #315577;border-radius:9px;color:#7f9ab0;background:#091e34;cursor:default;opacity:.38; }
.monitor-widget-heading > button .ui-icon { width:17px;height:17px; }
.monitor-toolbar.layout-unlocked .monitor-widget { border-color:#4d8dbb;box-shadow:0 0 0 1px rgba(77,141,187,.12); }
.monitor-widget-heading > button { visibility:hidden; }
.monitor-toolbar.layout-unlocked .monitor-widget-heading > button { visibility:visible;color:#dcedf8;border-color:#4d8dbb;background:#123b61;cursor:grab;opacity:1; }
.monitor-toolbar.layout-unlocked .monitor-widget-heading > button:active { cursor:grabbing; }
.monitor-widget.dragging { opacity:.48;border-color:#69c6ff;box-shadow:0 14px 32px rgba(0,0,0,.36); }
.monitor-content-widget { display:grid;gap:9px;padding:0 10px 10px; }
.monitor-content-widget .monitor-widget-heading { margin:0 -10px; }
.monitor-address-disclosure .address-search-block { display:block !important; }
.monitor-address-heading { justify-content:flex-start; }
.monitor-address-heading small { margin-left:auto; }
.monitor-filter-body { display:grid;gap:9px;padding:11px; }
.monitor-filter-body > :first-child { margin-top:0; }
.monitor-weather-disclosure .monitor-weather-summary { border:0;background:#091e34; }
.monitor-weather-updated { grid-column:1/-1;color:#829caf;font-size:.66rem;text-align:right; }
.monitor-toolbar-heading-actions .monitor-layout-lock,.monitor-toolbar-heading-actions .monitor-layout-hide { display:grid;width:38px;height:38px;border-color:#315577;background:#0c2947; }
.monitor-toolbar-heading-actions .monitor-layout-lock[aria-pressed="false"] { color:#8ed5ff;border-color:#4d8dbb;background:#123b61; }
.monitor-panel-reopen { position:absolute;z-index:910;left:8px;top:14px;display:none;align-items:center;gap:6px;min-height:46px;padding:8px 11px;border:1px solid #4a7fa6;border-radius:0 12px 12px 0;color:#e8f4fb;background:#0b2b49;box-shadow:0 8px 24px rgba(0,0,0,.3);cursor:pointer; }
.monitor-panel-reopen .ui-icon { width:18px;height:18px; }
.monitor-panel-reopen span { font-size:.74rem;font-weight:850; }
.map-action-menu.quick { min-width:230px;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px; }
.map-action-menu.quick > strong { grid-column:1/-1;padding:5px 5px 8px;color:#dcebf6;font-size:.76rem;text-align:center;text-transform:none; }
.map-action-menu.quick button { justify-content:center;min-height:48px;padding:11px 10px;text-align:center; }
.monitor-map-fixed-tools { position:absolute;z-index:880;top:14px;right:14px;display:flex;align-items:flex-end;flex-direction:column;gap:9px;pointer-events:none; }
.monitor-map-layers-button { display:grid;place-items:center;width:50px;height:50px;border:1px solid #5b90b8;border-radius:14px;color:#e8f5fc;background:rgba(7,31,52,.94);box-shadow:0 10px 26px rgba(0,0,0,.32);cursor:pointer;pointer-events:auto;backdrop-filter:blur(8px); }
.monitor-map-layers-button .ui-icon { width:25px;height:25px; }
.monitor-map-layers-button[aria-expanded="true"] { color:#071a31;border-color:#66c6f4;background:#66c6f4; }
.monitor-map-layers-panel { position:absolute;top:0;right:60px;width:250px;padding:12px;border:1px solid #4a7495;border-radius:14px;color:#eaf5fb;background:rgba(7,26,49,.97);box-shadow:0 14px 34px rgba(0,0,0,.4);pointer-events:auto;backdrop-filter:blur(10px); }
.monitor-map-layers-panel > strong { display:flex;align-items:center;gap:8px;margin-bottom:10px;font-size:.8rem; }
.monitor-map-layers-panel > strong .ui-icon { width:19px;height:19px;color:#69c6ff; }
.monitor-map-layers-panel .monitor-map-style-options { grid-template-columns:repeat(2,minmax(0,1fr));gap:7px; }
.monitor-map-layers-panel .map-style-button { min-height:42px; }
.monitor-map-fixed-icon-size { display:grid;grid-template-columns:auto auto;align-items:center;gap:4px 10px;width:190px;padding:9px 11px;border:1px solid #4a7495;border-radius:13px;color:#eaf5fb;background:rgba(7,31,52,.94);box-shadow:0 9px 24px rgba(0,0,0,.3);pointer-events:auto;backdrop-filter:blur(8px); }
.monitor-map-fixed-icon-size > span { display:inline-flex;align-items:center;gap:6px;font-size:.72rem;font-weight:850; }
.monitor-map-fixed-icon-size > span .ui-icon { width:16px;height:16px;color:#69c6ff; }
.monitor-map-fixed-icon-size output { justify-self:end;color:#8fd5fa;font-size:.7rem;font-weight:850; }
.monitor-map-fixed-icon-size input { grid-column:1/-1;width:100%;margin:2px 0 0;accent-color:#42a7df; }
.shell .map-context-hint { top:82px; }

@media (min-width:761px) {
    .shell .monitor-layout { transition:grid-template-columns .2s ease; }
    .shell .monitor-list { transition:opacity .16s ease,transform .2s ease; }
    .shell .monitor-layout.monitor-center-hidden { grid-template-columns:0 minmax(0,1fr); }
    .shell .monitor-layout.monitor-center-hidden .monitor-list { opacity:0;pointer-events:none;transform:translateX(-100%); }
    .shell .monitor-layout.monitor-center-hidden .monitor-panel-reopen { left:66px;display:flex; }
    .shell .monitor-toolbar { max-height:72%;grid-auto-rows:max-content;align-content:start;gap:14px;padding:16px; }
    .shell .monitor-toolbar .monitor-widget { min-height:max-content;flex:none; }
}

@media (max-width:760px) {
    .monitor-layout-lock,.monitor-layout-hide,.monitor-panel-reopen,.monitor-widget-heading > button { display:none !important; }
    .monitor-widget { overflow:visible; }
    .monitor-widget-heading { min-height:44px;padding:9px 10px; }
    .monitor-filter-body { padding:10px; }
    .monitor-map-fixed-tools { top:10px;right:10px;gap:7px; }
    .monitor-map-layers-button { width:46px;height:46px;border-radius:13px; }
    .monitor-map-layers-panel { right:54px;width:min(238px,calc(100vw - 92px)); }
    .monitor-map-fixed-icon-size { width:158px;padding:8px 9px; }
}

/* Estación de Monitoreo v2 — interfaz operativa unificada. */
.shell .monitor-station-v2 {
    --monitor-panel:#081b2d;
    --monitor-panel-raised:#0d2740;
    --monitor-panel-soft:#102f4d;
    --monitor-border:#294e6d;
    --monitor-border-strong:#3c7198;
    --monitor-text:#f2f7fb;
    --monitor-muted:#9eb4c5;
    --monitor-blue:#45a7df;
    --monitor-blue-soft:#153f62;
    --monitor-safe:#39b980;
    --monitor-danger:#e51b2a;
    grid-template-columns:372px minmax(0,1fr);
    min-width:0;
    background:#061421;
}
.shell .monitor-station-v2 .monitor-list {
    min-width:0;
    border-right:1px solid var(--monitor-border);
    background:var(--monitor-panel);
    box-shadow:12px 0 34px rgba(0,0,0,.16);
}
.shell .monitor-station-v2 .monitor-toolbar {
    flex:1 1 auto;
    max-height:none;
    height:100%;
    gap:14px;
    padding:18px;
    background:var(--monitor-panel);
    scrollbar-gutter:stable;
}
.monitor-station-v2 .monitor-toolbar-heading {
    position:sticky;
    z-index:12;
    top:-18px;
    min-height:64px;
    margin:-18px -18px 0;
    padding:16px 18px 12px;
    border-bottom:1px solid var(--monitor-border);
    background:rgba(8,27,45,.97);
    backdrop-filter:blur(12px);
}
.monitor-station-v2 .monitor-toolbar-heading > div:first-child span {
    color:#74c8f5;
    font-size:.71rem;
    font-weight:900;
    letter-spacing:.11em;
}
.monitor-station-v2 .monitor-toolbar-heading strong { margin-top:4px;color:var(--monitor-text);font-size:1.08rem; }
.monitor-station-v2 .monitor-toolbar-live { min-height:30px;padding:6px 10px;font-size:.71rem; }
.monitor-station-v2 .monitor-widget {
    flex:none;
    border-color:var(--monitor-border);
    border-radius:16px;
    background:var(--monitor-panel-raised);
    box-shadow:0 7px 20px rgba(0,0,0,.11);
}
.monitor-station-v2 .monitor-widget-heading {
    min-height:50px;
    padding:11px 13px;
    border-color:var(--monitor-border);
    background:rgba(16,47,77,.76);
}
.monitor-station-v2 .monitor-widget-heading > span { color:var(--monitor-text);font-size:.82rem;line-height:1.25; }
.monitor-station-v2 .monitor-widget-heading > small { color:var(--monitor-muted);font-size:.72rem; }
.monitor-station-v2 .monitor-content-widget { gap:11px;padding:0 12px 12px; }
.monitor-station-v2 .monitor-content-widget .monitor-widget-heading { margin-inline:-12px; }
.monitor-station-v2 .monitor-content-widget > .monitor-panel-view { min-height:0;max-height:310px;margin:0 -12px -12px;border-top:1px solid var(--monitor-border);background:#071827;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable; }
.monitor-station-v2 .monitor-content-widget > .monitor-panel-view .empty { min-height:104px;padding:20px 16px; }
.monitor-station-v2 .monitor-content-widget > .monitor-panel-view .empty strong { font-size:.82rem; }
.monitor-station-v2 .monitor-content-widget > .monitor-panel-view .empty span { margin-top:5px;font-size:.75rem; }
.monitor-station-v2 .monitor-widget-heading > .monitor-references-all { display:inline-flex !important;align-items:center;justify-content:center;gap:6px;width:auto;height:34px;margin-left:auto;padding:0 10px;border-color:#3d6c94;color:#dceef9;background:#123659;cursor:pointer;opacity:1;visibility:visible;white-space:nowrap;font-size:.72rem;font-weight:850; }
.monitor-station-v2 .monitor-widget-heading > .monitor-references-all:hover { border-color:#69b7e7;background:#17466f; }
.monitor-station-v2 .monitor-widget-heading > .monitor-references-all .ui-icon { width:16px;height:16px; }
.monitor-reference-more { width:calc(100% - 20px);min-height:40px;margin:8px 10px 10px;border:1px solid #31597b;border-radius:10px;color:#bfe4fa;background:#0c2944;font-size:.74rem;font-weight:850;cursor:pointer; }
.monitor-reference-more:hover { border-color:#62b5e8;background:#123b60; }
.monitor-station-v2 .monitor-panel-tabs { grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:5px;border:1px solid var(--monitor-border);background:#071827; }
.monitor-station-v2 .monitor-panel-tabs button { min-height:48px;border-radius:10px;color:var(--monitor-muted); }
.monitor-station-v2 .monitor-panel-tabs button.active { color:#fff;background:#2474b5;box-shadow:0 5px 14px rgba(36,116,181,.24); }
.monitor-station-v2 .monitor-panel-tabs button span { font-size:.78rem; }
.monitor-station-v2 .monitor-panel-search-wrap > .ui-icon { color:#79bfe8; }
.shell .monitor-station-v2 .monitor-panel-search,
.shell .monitor-station-v2 .input,
.shell .monitor-station-v2 .select { min-height:46px;border-color:var(--monitor-border-strong);border-radius:11px;background:#071827;font-size:.81rem; }
.shell .monitor-station-v2 .address-search-form { grid-template-columns:minmax(0,1fr) 98px;gap:8px; }
.shell .monitor-station-v2 .address-search-form .button { min-height:46px;border-radius:11px; }
.monitor-station-v2 .address-search-status { padding-top:3px;color:var(--monitor-muted);font-size:.73rem;line-height:1.45; }
.monitor-station-v2 .monitor-weather-summary { padding:12px;background:#071827; }
.monitor-station-v2 .monitor-weather-values strong { font-size:1.35rem; }
.monitor-station-v2 .monitor-weather-values span { color:#bfd0dc;font-size:.75rem; }
.monitor-station-v2 .monitor-filter-body { gap:10px;padding:12px; }
.monitor-station-v2 .filter-row { gap:9px; }
.monitor-station-v2 .monitor-visibility-actions { gap:8px; }
.monitor-station-v2 .monitor-visibility-actions .button { min-height:42px;font-size:.74rem; }
.monitor-station-v2 .rain-radar-control { margin:0;border-color:var(--monitor-border);background:#071827; }
.monitor-station-v2 .rain-radar-time { font-size:.72rem;line-height:1.4; }
.monitor-station-v2 .monitor-panel-view { min-height:210px;border-top:1px solid var(--monitor-border);background:#071827; }
.monitor-station-v2 .monitor-reference-list,
.monitor-station-v2 .responders { padding:10px 12px 18px; }
.monitor-station-v2 .monitor-list-summary { position:sticky;z-index:4;top:0;padding:12px 2px 10px;background:#071827; }
.monitor-station-v2 .monitor-list-summary strong { font-size:.84rem; }
.monitor-station-v2 .monitor-list-summary span { color:var(--monitor-muted);font-size:.72rem; }
.monitor-station-v2 .monitor-reference-card,
.monitor-station-v2 .responder-card { min-height:78px;margin-bottom:9px;padding:11px;border:1px solid transparent;border-radius:14px;background:#0d2438; }
.monitor-station-v2 .monitor-reference-card:hover,
.monitor-station-v2 .responder-card:hover,
.monitor-station-v2 .responder-card.active { border-color:var(--monitor-border-strong);background:#12324e;transform:none; }
.monitor-station-v2 .monitor-reference-card strong,
.monitor-station-v2 .responder-card strong { color:var(--monitor-text);font-size:.84rem;line-height:1.3; }
.monitor-station-v2 .monitor-reference-card small,
.monitor-station-v2 .monitor-reference-card em,
.monitor-station-v2 .responder-card small,
.monitor-station-v2 .responder-card em { font-size:.72rem;line-height:1.4; }
.monitor-station-v2 .monitor-map-workspace,
.monitor-station-v2 .monitor-map-workspace.detail-open { grid-template-columns:minmax(0,1fr) 330px;background:#061421; }
.monitor-station-v2 .map-wrap { border:0;container-type:inline-size; }
.monitor-map-commandbar {
    position:absolute;
    z-index:875;
    top:16px;
    left:14px;
    display:flex;
    align-items:center;
    gap:10px;
    max-width:min(620px,calc(100% - 360px));
    min-height:54px;
    padding:8px 9px 8px 14px;
    border:1px solid rgba(74,116,149,.9);
    border-radius:14px;
    color:#eff8fd;
    background:rgba(7,28,47,.94);
    box-shadow:0 10px 28px rgba(0,0,0,.28);
    backdrop-filter:blur(10px);
}
.monitor-map-commandbar > div { min-width:140px; }
.monitor-map-commandbar > div span { display:flex;align-items:center;gap:6px;color:#84cbed;font-size:.65rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase; }
.monitor-map-commandbar > div span .ui-icon { width:16px;height:16px; }
.monitor-map-commandbar > div strong { display:block;margin-top:2px;font-size:.9rem; }
.monitor-active-incidents { display:flex;align-items:center;gap:8px;min-height:38px;padding:7px 10px;border:1px solid #355975;border-radius:10px;color:#b8c9d5;background:#0b2236;cursor:pointer; }
.monitor-active-incidents i { width:8px;height:8px;border-radius:50%;background:#39b980;box-shadow:0 0 0 4px rgba(57,185,128,.12); }
.monitor-active-incidents span { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.72rem;font-weight:800; }
.monitor-active-incidents b { display:grid;place-items:center;min-width:24px;height:24px;padding:0 6px;border-radius:999px;background:#173b57;font-size:.72rem; }
.monitor-active-incidents.has-active { color:#fff;border-color:#ef5361;background:#8f1728; }
.monitor-active-incidents.has-active i { background:#fff;box-shadow:0 0 0 4px rgba(255,255,255,.14);animation:sos-pulse 1.1s ease-in-out infinite; }
.monitor-active-incidents.has-active b { background:rgba(255,255,255,.17); }
.monitor-station-v2 .monitor-map-fixed-tools { top:16px;right:16px;gap:10px; }
.monitor-station-v2 .monitor-map-fixed-tools:has(.monitor-map-layers-button[aria-expanded="true"]) .monitor-map-fixed-icon-size { opacity:0;visibility:hidden;pointer-events:none;transform:translateY(-6px); }
.monitor-station-v2 .monitor-map-fixed-icon-size { transition:opacity .14s ease,visibility .14s ease,transform .14s ease; }
.monitor-station-v2 .leaflet-top.leaflet-left { top:74px; }
.monitor-station-v2 .monitor-map-layers-button { width:52px;height:52px;border-radius:14px; }
.monitor-station-v2 .monitor-map-fixed-icon-size { width:184px; }
.monitor-station-v2 .map-context-hint { display:none; }
.monitor-station-v2 .map-legend { right:auto;left:14px;bottom:14px;gap:9px;max-width:calc(100% - 220px);padding:8px 10px;overflow-x:auto;flex-wrap:nowrap;font-size:.7rem;white-space:nowrap; }
.monitor-station-v2 .weather-wind-control { right:16px;bottom:16px; }
.monitor-station-v2 .monitor-follow-banner { z-index:874;top:82px;width:min(440px,calc(100% - 190px)); }
.monitor-station-v2 .map-tile-warning { top:82px;width:min(460px,calc(100% - 190px)); }
.monitor-station-v2 .monitor-personnel-dock { border-color:var(--monitor-border);background:var(--monitor-panel); }
.monitor-station-v2 .monitor-personnel-dock > header { min-height:78px;padding:16px 18px;border-color:var(--monitor-border);background:var(--monitor-panel-raised); }
.monitor-station-v2 .monitor-personnel-dock > header span { color:#74c8f5;font-size:.7rem; }
.monitor-station-v2 .monitor-personnel-dock > header strong { color:var(--monitor-text);font-size:1.08rem; }
.monitor-station-v2 .monitor-personnel-dock > header b { min-width:34px;height:34px;border-color:var(--monitor-border-strong);background:#153653; }
.monitor-station-v2 .monitor-personnel-search { border-color:var(--monitor-border-strong);background:#071a31; }
.monitor-station-v2 .monitor-personnel-dock > .responders { scrollbar-gutter:stable; }
.monitor-station-v2 .monitor-panel-reopen { top:138px;left:0;min-height:48px;border-radius:0 12px 12px 0; }

@media (min-width:1181px) and (max-width:1500px) {
    .shell .monitor-station-v2 { grid-template-columns:336px minmax(0,1fr); }
    .monitor-station-v2 .monitor-toolbar-heading .monitor-toolbar-live { display:none; }
    .monitor-station-v2 .monitor-map-workspace,
    .monitor-station-v2 .monitor-map-workspace.detail-open { grid-template-columns:minmax(0,1fr) 292px; }
    .monitor-map-commandbar { max-width:calc(100% - 300px); }
}

@media (min-width:761px) and (max-width:1180px) {
    .shell .monitor-station-v2 { grid-template-columns:320px minmax(0,1fr); }
    .monitor-station-v2 .monitor-toolbar-heading .monitor-toolbar-live { display:none; }
    .monitor-station-v2 .monitor-map-workspace,
    .monitor-station-v2 .monitor-map-workspace.detail-open { grid-template-columns:minmax(0,1fr); }
    .monitor-station-v2 .monitor-personnel-dock { display:none; }
    .monitor-map-commandbar { max-width:calc(100% - 150px); }
}

@media (max-width:760px) {
    .shell .monitor-station-v2 { display:block; }
    .shell .monitor-station-v2 .monitor-list { max-height:min(78dvh,700px);border:1px solid var(--monitor-border);border-radius:22px 22px 16px 16px; }
    .shell .monitor-station-v2 .monitor-toolbar { height:100%;max-height:none;gap:12px;padding:14px; }
    .monitor-station-v2 .monitor-toolbar-heading { top:-14px;margin:-14px -14px 0;padding:14px; }
    .monitor-station-v2 .monitor-panel-tabs button[data-monitor-panel-tab="personal"] { display:grid; }
    .monitor-station-v2 .monitor-panel-tabs { grid-template-columns:repeat(3,minmax(0,1fr)); }
    .monitor-station-v2 .monitor-panel-tabs button { min-height:50px;padding-inline:5px; }
    .monitor-station-v2 .monitor-panel-tabs button span { justify-content:center;font-size:.7rem; }
    .monitor-station-v2 .monitor-panel-view[data-monitor-panel-view="personal"] { display:block; }
    .monitor-station-v2 .monitor-content-widget > .monitor-panel-view { max-height:260px; }
    .monitor-station-v2 .monitor-map-workspace { display:block;height:100%; }
    .monitor-map-commandbar { top:10px;left:64px;right:66px;max-width:none;min-height:48px;padding:6px 8px 6px 10px; }
    .monitor-map-commandbar > div { display:none; }
    .monitor-active-incidents { width:100%;justify-content:center;min-height:36px; }
    .monitor-station-v2 .monitor-map-fixed-tools { top:10px;right:10px; }
    .monitor-station-v2 .leaflet-top.leaflet-left { top:64px; }
    .monitor-station-v2 .monitor-map-fixed-icon-size { display:none; }
    .monitor-station-v2 .monitor-map-layers-panel { top:54px;right:0; }
    .monitor-station-v2 .monitor-follow-banner { top:68px;right:10px;left:64px;width:auto;min-height:50px;transform:none; }
    .monitor-station-v2 .map-tile-warning { top:68px;width:calc(100% - 92px); }
    .monitor-station-v2 .map-context-hint { display:none; }
    .monitor-station-v2 .map-legend { right:10px;bottom:94px;left:10px;overflow-x:auto;justify-content:flex-start;white-space:nowrap; }
    .monitor-station-v2 .weather-wind-control { right:10px;bottom:146px; }
}

/* Los laterales variables pueden dejar poco ancho al mapa aun en una PC.
   Estas reglas responden al espacio real del mapa y evitan carteles cruzados. */
@container (max-width:700px) {
    .monitor-map-commandbar { left:64px;right:72px;max-width:none; }
    .monitor-map-commandbar > div:first-child { display:none; }
    .monitor-map-command-actions { width:100%;min-width:0; }
    .monitor-route-dispatches,.monitor-active-incidents { min-width:0; }
    .monitor-active-incidents { flex:1;justify-content:center; }
    .monitor-station-v2 .monitor-follow-banner { top:78px;right:12px;left:64px;width:auto;transform:none; }
    .monitor-station-v2 .map-tile-warning { top:78px;width:calc(100% - 100px); }
}
@container (max-width:460px) {
    .monitor-route-dispatches span { display:none; }
    .monitor-map-commandbar { right:68px;gap:5px;padding-inline:6px; }
    .monitor-active-incidents { padding-inline:7px; }
    .monitor-active-incidents span { font-size:.66rem; }
    .monitor-station-v2 .monitor-follow-banner { grid-template-columns:30px minmax(0,1fr) auto;gap:6px;padding:7px; }
    .monitor-station-v2 .monitor-follow-banner .button { min-width:44px;padding-inline:8px; }
}

/* Auditoría visual E2E · estados, superposiciones y carga de vistas */
.view-loading { min-height:clamp(260px,55dvh,620px);display:grid;place-content:center;justify-items:center;gap:9px;padding:28px;color:#dce9f2;text-align:center; }
.view-loading-spinner { width:34px;height:34px;border:3px solid rgba(105,183,231,.2);border-top-color:#69b7e7;border-radius:50%;animation:view-loading-spin .8s linear infinite; }
.view-loading strong { font-size:.9rem; }
.view-loading small { color:#91a9ba;font-size:.76rem; }
@keyframes view-loading-spin { to { transform:rotate(360deg); } }

@media (min-width:1101px) and (min-height:700px) {
    .modal.callout-dispatch-modal .modal-body { overflow-y:auto;overflow-x:hidden; }
    .modal.callout-dispatch-modal .callout-dispatch-form { min-height:0;overflow:visible; }
    .modal.callout-dispatch-modal .callout-dispatch-secondary,
    .modal.callout-dispatch-modal .callout-dispatch-reception { max-height:none;overflow:visible; }
}

@media (max-width:760px) {
    .shell .emergency-callout-button.mobile-secondary-view { display:none; }
    .settings-section-nav,
    .settings-organization-tabs { scroll-snap-type:x proximity;scrollbar-width:thin;scrollbar-color:#315d80 transparent; }
    .settings-section-nav > *,
    .settings-organization-tabs > * { scroll-snap-align:start; }
    .view-loading { min-height:52dvh;padding-bottom:calc(90px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion:reduce) {
    .view-loading-spinner { animation-duration:1.8s; }
}

/* Comprobación preventiva diaria de teléfonos */
.device-check-panel { margin-top:14px;overflow:hidden; }
.device-check-panel .panel-header { align-items:center;gap:16px; }
.device-check-panel .panel-header > div { min-width:0; }
.device-check-panel .panel-header p { margin:4px 0 0;color:#91a9ba;font-size:.78rem;line-height:1.45; }
.device-check-summary { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px; }
.device-check-summary > div { min-height:76px;padding:13px 14px;border:1px solid #29465f;border-radius:13px;background:#0b2032; }
.device-check-summary span,.device-check-summary strong { display:block; }
.device-check-summary span { color:#9cb0bf;font-size:.68rem;font-weight:800;letter-spacing:.035em;text-transform:uppercase; }
.device-check-summary strong { margin-top:7px;color:#e8f3fa;font-size:1.35rem; }
.device-check-summary .success { border-left:3px solid #39b980; }
.device-check-summary .warning { border-left:3px solid #f4b545; }
.device-check-summary .error { border-left:3px solid #e43d54; }
.device-check-report-meta { display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0;padding:9px 11px;border:1px solid #29465f;border-radius:10px;color:#9fb2c0;background:#0a1d2e;font-size:.72rem; }
.device-check-report-meta span { display:flex;align-items:center;gap:6px; }
.device-check-report-meta .ui-icon { width:16px;height:16px;color:#69b7e7; }
.device-check-list { display:grid;gap:8px;max-height:430px;overflow:auto;scrollbar-gutter:stable; }
.device-check-row { display:grid;grid-template-columns:40px minmax(0,1fr) auto;align-items:center;gap:12px;min-height:82px;padding:11px 13px;border:1px solid #29465f;border-radius:12px;background:#0c2133; }
.device-check-row.success { border-left:3px solid #39b980; }
.device-check-row.warning,.device-check-row.pending { border-left:3px solid #f4b545; }
.device-check-row.error { border-left:3px solid #e43d54; }
.device-check-row-icon { display:grid;place-items:center;width:40px;height:40px;border-radius:11px;color:#8bb9d8;background:#14334d; }
.device-check-row-icon .ui-icon { width:21px;height:21px; }
.device-check-row > div { min-width:0; }
.device-check-row strong,.device-check-row small { display:block; }
.device-check-row > div > strong { color:#edf7fc;font-size:.83rem; }
.device-check-row > div > small { margin-top:2px;color:#91a8b7;font-size:.7rem; }
.device-check-row p { margin:6px 0 0;color:#c0cfda;font-size:.74rem;line-height:1.4; }
.device-check-row-state { min-width:132px;text-align:right; }
.device-check-row-state > span { display:inline-flex;padding:5px 8px;border:1px solid #3b5d76;border-radius:999px;color:#d8e6ef;font-size:.66rem;font-weight:850; }
.device-check-row.success .device-check-row-state > span { border-color:rgba(57,185,128,.5);color:#69d5a5;background:rgba(57,185,128,.08); }
.device-check-row.warning .device-check-row-state > span,.device-check-row.pending .device-check-row-state > span { border-color:rgba(244,181,69,.5);color:#f6c96f;background:rgba(244,181,69,.08); }
.device-check-row.error .device-check-row-state > span { border-color:rgba(228,61,84,.5);color:#ff7889;background:rgba(228,61,84,.08); }
.device-check-row-state small { margin-top:5px;color:#91a8b7;font-size:.66rem; }

@media (max-width:900px) {
    .device-check-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:600px) {
    .device-check-panel .panel-header { align-items:stretch;flex-direction:column; }
    .device-check-panel .panel-header .button { width:100%; }
    .device-check-report-meta { align-items:flex-start;flex-direction:column; }
    .device-check-row { grid-template-columns:40px minmax(0,1fr);align-items:start; }
    .device-check-row-state { grid-column:2;min-width:0;text-align:left; }
}

/* Sistema de botones · auditoría UX/UI 2026-08-23 */
:root {
    --action-primary:#2f86c8;
    --action-primary-hover:#3c96d9;
    --action-primary-text:#f7fbff;
    --action-danger:#c5233e;
    --action-danger-hover:#dc2d49;
    --action-focus:#74c9ff;
    --action-height:44px;
    --action-radius:11px;
}
button,.button,[role="button"] { -webkit-tap-highlight-color:transparent;touch-action:manipulation; }
.button {
    min-height:var(--action-height);
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    padding:10px 15px;
    border-radius:var(--action-radius);
    font-family:inherit;
    font-size:.82rem;
    font-weight:750;
    line-height:1.2;
    letter-spacing:0;
    text-align:center;
    text-decoration:none;
    white-space:normal;
    transition:border-color .16s ease,background-color .16s ease,color .16s ease,box-shadow .16s ease,transform .08s ease;
}
.button.primary,.shell .button.primary,.responder-shell .button.primary {
    color:var(--action-primary-text);
    border-color:#4397d0;
    background:linear-gradient(180deg,#388fcd,var(--action-primary));
    box-shadow:0 7px 18px rgba(47,134,200,.18);
}
.button.ghost,.shell .button.ghost,.responder-shell .button.ghost {
    color:#e5eef5;
    border-color:#36536a;
    background:#12283a;
    box-shadow:none;
}
.button.danger-button,.shell .button.danger-button,.responder-shell .button.danger-button {
    color:#fff;
    border-color:#e0445b;
    background:linear-gradient(180deg,#d02a45,var(--action-danger));
    box-shadow:0 7px 18px rgba(197,35,62,.22);
}
.button.small { min-height:40px;padding:8px 12px;font-size:.76rem; }
.button .ui-icon { flex:0 0 auto;width:18px;height:18px; }
.button.icon-action {
    width:44px;
    min-width:44px;
    min-height:44px;
    padding:0;
    border-radius:11px;
}
.button.icon-action .ui-icon { width:20px;height:20px; }
.page-primary-action { min-width:154px;white-space:nowrap; }
.button:hover { filter:none; }
.button:active { transform:none; }
.button:disabled,.button[aria-disabled="true"] { opacity:.48;filter:saturate(.45);cursor:not-allowed;box-shadow:none;transform:none; }
.button[aria-busy="true"] { pointer-events:none; }
.button:focus-visible,.nav-button:focus-visible,.close-button:focus-visible,.map-style-button:focus-visible,
.monitor-panel-tabs button:focus-visible,.settings-section-nav button:focus-visible,.settings-organization-tabs button:focus-visible,
.leaflet-control-zoom a:focus-visible {
    outline:3px solid color-mix(in srgb,var(--action-focus) 78%,transparent);
    outline-offset:2px;
    box-shadow:0 0 0 2px #071a2a;
}
.close-button { width:44px;height:44px;min-width:44px;display:grid;place-items:center;border-radius:12px; }
.leaflet-control-zoom a { width:42px!important;height:42px!important;line-height:42px!important;font-size:1.35rem!important; }
.monitor-panel-tabs button,.settings-section-nav button,.settings-organization-tabs button,.route-dispatch-target-tabs button { min-height:46px; }
.monitor-map-fixed-tools > button,.monitor-map-commandbar button { min-width:42px;min-height:42px; }

@media (hover:hover) and (pointer:fine) {
    .button.primary:hover { color:#fff;border-color:#59a9dd;background:linear-gradient(180deg,var(--action-primary-hover),#3289c9);filter:none; }
    .button.ghost:hover { color:#fff;border-color:#54748c;background:#19364b;filter:none; }
    .button.danger-button:hover { border-color:#f05b70;background:linear-gradient(180deg,var(--action-danger-hover),#c8233f);filter:none; }
    .button:not(:disabled):active { transform:translateY(1px); }
}

@media (max-width:700px) {
    :root { --action-height:48px; }
    .button { min-height:48px;padding:11px 14px;font-size:.84rem; }
    .button.small { min-height:44px;font-size:.78rem; }
    .button.icon-action,.close-button { width:46px;min-width:46px;min-height:46px;height:46px; }
    .page-primary-action { width:100%;min-width:0;white-space:normal; }
    .monitor-panel-tabs button,.settings-section-nav button,.settings-organization-tabs button,.route-dispatch-target-tabs button { min-height:50px; }
    .map-style-button,.responder-map-style button { min-height:42px; }
}

/* Coherencia visual global · auditoría integral 2026-08-23 */
:root {
    --design-canvas:#06152b;
    --design-surface:#0b213b;
    --design-surface-raised:#102b49;
    --design-surface-soft:#0b2541;
    --design-border:#315577;
    --design-border-soft:#294d70;
    --design-text:#f7f9fc;
    --design-muted:#aebfd0;
    --design-accent:#3d91d0;
    --design-accent-soft:rgba(61,145,208,.15);
    --design-radius-sm:10px;
    --design-radius-md:14px;
    --design-radius-lg:18px;
}
.shell,.responder-shell { color:var(--design-text);background:var(--design-canvas); }
.shell .panel,.shell .metric,.shell .entity-card,.shell .modal-card,
.responder-shell .panel,.responder-shell .responder-card,.responder-shell .responder-peer-finder,
.responder-shell .responder-map-layers,.responder-shell .responder-news-card {
    border-color:var(--design-border-soft);
    background:var(--design-surface);
}
.shell .panel-header,.shell .modal-header,.shell .modal-footer,
.responder-shell .panel-header,.responder-shell .modal-header,.responder-shell .modal-footer {
    border-color:var(--design-border-soft);
}
.shell .page-heading h1,.shell .page-heading h2,.shell .panel-header h2,.shell .panel-header h3,
.responder-shell h1,.responder-shell h2,.responder-shell h3 { color:var(--design-text); }
.shell .page-heading p,.shell .panel-header p,.shell .entity-card p,
.responder-shell .panel-header p,.responder-shell .responder-map-heading span,
.responder-shell .responder-account-intro { color:var(--design-muted); }
.shell .input,.shell .select,.shell .textarea,
.responder-shell .input,.responder-shell .select,.responder-shell .textarea {
    min-height:44px;
    color:var(--design-text);
    border-color:var(--design-border);
    border-radius:var(--design-radius-sm);
    background:#071a31;
}
.shell .textarea,.responder-shell .textarea { min-height:104px;line-height:1.45; }
.shell .input:hover,.shell .select:hover,.shell .textarea:hover,
.responder-shell .input:hover,.responder-shell .select:hover,.responder-shell .textarea:hover { border-color:#46749a; }
.shell .input:focus,.shell .select:focus,.shell .textarea:focus,
.responder-shell .input:focus,.responder-shell .select:focus,.responder-shell .textarea:focus {
    border-color:var(--design-accent);
    box-shadow:0 0 0 3px var(--design-accent-soft);
}
.shell .field>span,.shell .field>label,.responder-shell .field>span,.responder-shell .field>label {
    margin-bottom:6px;
    color:#dce7f0;
    font-weight:750;
}
.shell .field small,.responder-shell .field small { color:#91a8bb;line-height:1.4; }
.shell .empty-state,.shell .view-empty,.responder-shell .responder-peer-empty {
    border-color:var(--design-border-soft);
    border-radius:var(--design-radius-md);
    color:var(--design-muted);
    background:rgba(7,26,49,.62);
}
.shell table tbody tr { border-color:var(--design-border-soft); }
.shell table tbody tr:hover { background:rgba(61,145,208,.055); }
.shell .chip,.responder-shell .chip { border-color:#3b6384;background:#0c2947; }
.shell .support-nav-link {
    color:#dcefff;
    border-color:#315f88;
    background:#0c2948;
}
.shell .support-nav-link .nav-icon { color:#72bce9;background:var(--design-accent-soft); }
.shell .support-nav-link:hover { color:#fff;border-color:#4d83af;background:#123859; }
.help-hero { border-color:var(--design-border);background:linear-gradient(135deg,#0d2c4c,#0b213b); }
.help-hero .eyebrow,.help-topic-card summary small { color:#76bee9; }
.help-topic-card { border-color:var(--design-border-soft);background:var(--design-surface); }
.help-topic-card summary:hover { background:rgba(61,145,208,.06); }
.help-topic-icon { color:#86c8ef;border-color:#376587;background:#123454; }
.help-topic-card li::before { color:#06152b;background:#69b6e4; }
.help-support-card { border-color:var(--design-border);background:#0b2541; }
.responder-bottom-nav button.active,
.responder-nav-button.active { color:#e8f5ff;background:#123a60;box-shadow:inset 0 -4px var(--design-accent); }
.responder-peer-filters button[aria-pressed="true"] { color:#fff;border-color:#4385b8;background:#1f659a; }
.responder-peer-result { border-color:var(--design-border-soft);background:#0c2540; }
.responder-peer-result:hover { border-color:#41759c;background:#123452; }
.responder-peer-result-actions { gap:8px; }
.responder-peer-result-actions .button { min-width:88px; }
.responder-map-heading-actions { gap:10px; }
.responder-map-heading-actions .button { min-width:132px; }
.integrated-confirmation { border-color:var(--design-border);background:var(--design-surface); }
.modal-card { border-radius:var(--design-radius-lg); }
.toast { border-radius:var(--design-radius-md); }
.toast-region.monitor-toast-region { top:78px;right:18px;bottom:auto; }
.toast-region.responder-toast-region { bottom:calc(96px + env(safe-area-inset-bottom)); }

@media (max-width:700px) {
    .responder-map-heading-actions { display:grid;grid-template-columns:1fr 1fr;width:100%; }
    .responder-map-heading-actions .button { min-width:0;width:100%; }
    .responder-peer-result { align-items:start;gap:11px;padding:13px; }
    .responder-peer-result-actions { grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;width:100%; }
    .responder-peer-result-actions .button { width:100%;min-width:0; }
    .toast-region.monitor-toast-region { top:72px;right:10px;width:min(360px,calc(100vw - 20px)); }
}

/* SOS permanente · portada táctica del respondedor */
.responder-shell .guard-hero {
    display:grid;
    grid-template-columns:58px minmax(0,1fr);
    grid-template-areas:"avatar eyebrow" "avatar name" "avatar department";
    column-gap:13px;
    align-items:center;
    padding:12px 14px;
    text-align:left;
    border:1px solid var(--design-border-soft);
    border-radius:14px;
    background:#0b213b;
}
.responder-shell .guard-hero-eyebrow { grid-area:eyebrow;color:#76bee9;font-size:.62rem;font-weight:900;letter-spacing:.1em;text-transform:uppercase; }
.responder-shell .guard-hero .guard-avatar { grid-area:avatar;width:56px;height:56px;margin:0;border-width:2px; }
.responder-shell .guard-hero h1 { grid-area:name;margin:1px 0;font-size:1.08rem;line-height:1.15; }
.responder-shell .guard-hero p { grid-area:department;overflow:hidden;margin:0;color:var(--design-muted);font-size:.74rem;text-overflow:ellipsis;white-space:nowrap; }
.responder-shell .guard-card { padding:14px;margin-top:10px; }
.responder-shell .guard-state { margin-bottom:8px; }
.responder-shell .sos-button {
    width:min(292px,72vw);
    min-height:0;
    margin:14px auto 18px;
    border-width:5px;
    box-shadow:0 20px 52px rgba(181,31,50,.43),0 0 0 8px rgba(229,27,42,.1),inset 0 0 0 1px rgba(255,255,255,.28);
}
.responder-shell .sos-button span { max-width:78%;line-height:1.35; }
.responder-shell .sos-button span strong { font-size:2.65rem; }
.responder-shell .responder-sos-shortcut.active { animation:marker-pulse 1.1s infinite;background:#e51b2a; }
.responder-peer-sos-home {
    display:grid;
    gap:10px;
    margin:10px 0;
    padding:13px;
    border:1px solid rgba(239,68,88,.65);
    border-left:5px solid #ef4458;
    border-radius:15px;
    background:linear-gradient(135deg,rgba(112,16,35,.42),#0b213b 58%);
    box-shadow:0 12px 28px rgba(89,8,24,.2);
}
.responder-peer-sos-home-heading { display:flex;align-items:center;gap:10px; }
.responder-peer-sos-home-heading>span { display:grid;place-items:center;width:40px;height:40px;flex:0 0 auto;border-radius:12px;color:#fff;background:#c5233e; }
.responder-peer-sos-home-heading svg { width:22px;height:22px; }
.responder-peer-sos-home-heading small,.responder-peer-sos-home-heading strong { display:block; }
.responder-peer-sos-home-heading small { margin-bottom:2px;color:#ff8795;font-size:.62rem;font-weight:950;letter-spacing:.1em; }
.responder-peer-sos-home-heading strong { font-size:.94rem; }
.responder-peer-sos-home-list { display:grid;gap:8px; }
.responder-peer-sos-home-card { display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px;border:1px solid rgba(91,125,151,.45);border-radius:12px;background:#0c2540; }
.responder-peer-sos-home-card>img { width:44px;height:44px;border:2px solid #ef4458;border-radius:50%;object-fit:cover;background:#071a31; }
.responder-peer-sos-home-card>div:nth-child(2) { min-width:0; }
.responder-peer-sos-home-card>div:nth-child(2) strong,.responder-peer-sos-home-card>div:nth-child(2) span { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.responder-peer-sos-home-card>div:nth-child(2) strong { font-size:.84rem; }
.responder-peer-sos-home-card>div:nth-child(2) span { margin-top:3px;color:#b7c7d6;font-size:.68rem; }
.responder-peer-sos-home-actions { display:flex;gap:7px; }
.responder-peer-sos-home-actions .button { min-height:42px; }
.responder-peer-sos-home-actions .button:not(.icon-action) { min-width:96px; }
.responder-peer-sos-home-actions .is-muted { color:#8db4ce;border-color:#45657c;background:#0b1e30; }
.responder-peer-sos-home>p { margin:0;color:#aebfd0;font-size:.67rem;line-height:1.4; }

@media (max-width:600px) {
    .responder-shell .responder-main { padding-top:8px; }
    .responder-shell .guard-hero { grid-template-columns:50px minmax(0,1fr);padding:9px 11px; }
    .responder-shell .guard-hero .guard-avatar { width:48px;height:48px; }
    .responder-shell .guard-hero h1 { font-size:1rem; }
    .responder-shell .guard-card { padding:12px; }
    .responder-shell .guard-state { align-items:flex-start;margin-bottom:4px; }
    .responder-shell .guard-state strong { font-size:.9rem; }
    .responder-shell .guard-state>span { font-size:.62rem; }
    .responder-shell .sos-button { width:min(300px,76vw);margin:10px auto 16px; }
    .responder-shell .sos-button span strong { font-size:2.8rem; }
    .responder-peer-sos-home-card { grid-template-columns:40px minmax(0,1fr); }
    .responder-peer-sos-home-card>img { width:40px;height:40px; }
    .responder-peer-sos-home-actions { grid-column:1/-1;display:grid;grid-template-columns:48px 48px minmax(0,1fr); }
    .responder-peer-sos-home-actions .button { width:100%; }
}
