/* === CSS VARIABLES === */
        :root {
            --bg-body: #f5f5f7;
            --bg-header: #ffffff;
            --bg-panel: rgba(255,255,255,0.85);
            --bg-section: #ffffff;
            --bg-input: #f0f0f5;
            --bg-modal: rgba(255,255,255,0.92);
            --text-primary: #1d1d1f;
            --text-secondary: #6e6e73;
            --text-value: #1d1d1f;
            --border-color: rgba(0,0,0,0.1);
            --border-subtle: rgba(0,0,0,0.05);
            --accent: #007aff;
            --shadow: rgba(0,0,0,0.1);
            --btn-bg: #007aff;
            --btn-hover: #005ec4;
            --fab-bg: #ffffff;
            --scrollbar-track: #f0f0f5;
            --scrollbar-thumb: #c7c7cc;
        }
        .dark-mode {
            --bg-body: #1e2530;
            --bg-header: #263040;
            --bg-panel: rgba(42,53,69,0.88);
            --bg-section: #2a3545;
            --bg-input: rgba(36,47,62,0.8);
            --bg-modal: rgba(38,48,64,0.92);
            --text-primary: #e0e0e0;
            --text-secondary: #90a4ae;
            --text-value: #ffffff;
            --border-color: rgba(255,255,255,0.12);
            --border-subtle: rgba(255,255,255,0.06);
            --accent: #00d4ff;
            --shadow: rgba(0,0,0,0.4);
            --btn-bg: #2a3545;
            --btn-hover: #38414e;
            --fab-bg: #263040;
            --scrollbar-track: #2a3545;
            --scrollbar-thumb: #444;
        }

        /* === RESET & BASE === */
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: var(--bg-body);
            color: var(--text-primary);
            height: 100vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            transition: background 0.3s, color 0.3s;
        }

        /* === HEADER === */
        header {
            background: var(--bg-header);
            padding: 12px 24px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            z-index: 1000;
            flex-shrink: 0;
            transition: background 0.3s;
            border-bottom: 1px solid var(--border-color);
        }
        header h1 {
            font-size: 1.4rem;
            font-weight: 600;
            letter-spacing: 1px;
        }
        .ws-status {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.85rem;
            color: var(--text-secondary);
        }
        .ws-dot {
            width: 10px; height: 10px;
            border-radius: 50%;
            background: #ff1744;
            transition: background 0.3s;
        }
        .ws-dot.connected { background: #00e676; }
        .header-right {
            display: flex;
            align-items: center;
            gap: 14px;
        }
        .auth-status {
            display: flex;
            align-items: center;
            gap: 8px;
            color: var(--text-secondary);
            font-size: 0.82rem;
        }
        .logout-btn {
            border: 1px solid var(--border-color);
            border-radius: 6px;
            background: var(--bg-input);
            color: var(--text-primary);
            padding: 6px 9px;
            font-size: 0.75rem;
            cursor: pointer;
        }
        .logout-btn:hover { border-color: var(--accent); color: var(--accent); }

        /* === MAIN CONTENT (flex row: history panel + map) === */
        #mainContent {
            display: flex;
            flex: 1;
            min-height: 0;
            overflow: hidden;
        }

        /* === MAP === */
        #map {
            flex: 1;
            z-index: 1;
        }

        /* === FOOTER === */
        footer {
            background: var(--bg-header);
            padding: 8px 24px;
            font-size: 0.8rem;
            display: flex;
            justify-content: space-between;
            z-index: 1000;
            flex-shrink: 0;
            color: var(--text-secondary);
            transition: background 0.3s, color 0.3s;
            border-top: 1px solid var(--border-color);
        }

        /* === SOS FLASH OVERLAY === */
        .sos-flash {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(255, 23, 68, 0.4);
            z-index: 2000;
            pointer-events: none;
            animation: flashFade 1s ease-out forwards;
        }
        @keyframes flashFade {
            0%   { opacity: 1; }
            100% { opacity: 0; }
        }

        /* === SOS BORDER PULSE === */
        .sos-border {
            animation: borderPulse 1s infinite;
        }
        @keyframes borderPulse {
            0%, 100% { box-shadow: inset 0 0 0 4px #ff1744; }
            50%      { box-shadow: inset 0 0 0 4px transparent; }
        }

        /* === PULSING SOS MARKER (for OverlayView) === */
        .sos-marker {
            width: 20px; height: 20px;
            background: #ff1744;
            border-radius: 50%;
            border: 3px solid #fff;
            animation: markerPulse 1s infinite;
            cursor: pointer;
        }
        @keyframes markerPulse {
            0%, 100% { transform: scale(1); opacity: 1; }
            50%      { transform: scale(1.6); opacity: 0.5; }
        }

        /* === ALERT PANEL === */
        .alert-panel {
            position: fixed;
            top: 50%; left: 20px;
            transform: translateY(-50%);
            background: var(--bg-section);
            border: 2px solid #ff1744;
            border-radius: 12px;
            padding: 32px;
            z-index: 3000;
            min-width: 360px;
            max-width: 90vw;
            text-align: center;
            box-shadow: 0 0 40px rgba(255, 23, 68, 0.4);
            display: none;
            transition: background 0.3s;
        }
        .alert-close {
            position: absolute;
            top: 10px; right: 14px;
            background: none;
            border: none;
            color: var(--text-secondary);
            font-size: 1.6rem;
            cursor: pointer;
            line-height: 1;
        }
        .alert-close:hover { color: var(--text-primary); }
        .alert-panel.visible { display: block; }
        .alert-panel h2 {
            color: #ff1744;
            font-size: 1.8rem;
            margin-bottom: 16px;
        }
        .alert-panel .info-row {
            display: flex;
            justify-content: space-between;
            padding: 6px 0;
            border-bottom: 1px solid var(--border-subtle);
            font-size: 0.95rem;
        }
        .alert-panel .info-row .label { color: var(--text-secondary); }
        .alert-panel .info-row .value { color: var(--text-value); font-weight: 600; }
        .alert-panel .phone {
            margin-top: 16px;
            font-size: 1.1rem;
            color: var(--accent);
        }
        .btn-ack {
            margin-top: 20px;
            padding: 14px 32px;
            background: #00c853;
            color: #fff;
            border: none;
            border-radius: 12px;
            font-size: 1.05rem;
            font-weight: 700;
            cursor: pointer;
            letter-spacing: 1px;
            box-shadow: 0 4px 24px rgba(0, 200, 83, 0.4);
            animation: btnResolvePulse 2s infinite;
            transition: background 0.2s, transform 0.2s;
        }
        .btn-ack:hover { background: #00a844; transform: scale(1.05); }
        @keyframes btnResolvePulse {
            0%, 100% { box-shadow: 0 4px 24px rgba(0, 200, 83, 0.4); }
            50%      { box-shadow: 0 4px 32px rgba(0, 200, 83, 0.7); }
        }

        /* === ID CARD (SOS Alert) === */
        .id-card {
            background: var(--border-subtle);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 14px 18px;
            margin-bottom: 18px;
            text-align: left;
        }
        .id-card-title {
            font-size: 0.75rem;
            letter-spacing: 1.5px;
            color: var(--text-secondary);
            text-transform: uppercase;
            margin-bottom: 10px;
        }
        .id-card-row {
            display: flex;
            justify-content: space-between;
            padding: 4px 0;
            font-size: 0.9rem;
        }
        .id-card-row .label { color: var(--text-secondary); }
        .id-card-row .value { color: var(--text-value); font-weight: 600; }

        /* === INFO CONTAINER (collapsible panels) === */
        .info-container {
            position: absolute;
            top: 60px;
            right: 12px;
            z-index: 1500;
            min-width: 240px;
            display: none;
        }
        .info-container.visible { display: block; }

        .info-section {
            background: var(--bg-panel);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            margin-bottom: 8px;
            overflow: hidden;
            box-shadow: 0 4px 24px var(--shadow);
            transition: background 0.3s, border-color 0.3s;
        }

        .info-toggle {
            width: 100%;
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 12px 16px;
            background: none;
            border: none;
            color: var(--text-secondary);
            font-size: 0.9rem;
            font-weight: 600;
            letter-spacing: 1px;
            text-transform: uppercase;
            cursor: pointer;
            transition: color 0.2s;
        }
        .info-toggle:hover { color: var(--text-primary); }

        .toggle-arrow {
            font-size: 0.7rem;
            transition: transform 0.2s;
            display: inline-block;
        }
        .toggle-arrow.open { transform: rotate(90deg); }

        .info-body {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.25s ease;
            padding: 0 16px;
            font-size: 0.85rem;
            color: var(--text-primary);
        }
        .info-body.open {
            max-height: 300px;
            padding: 0 16px 12px;
        }

        .telemetry-row {
            display: flex;
            justify-content: space-between;
            padding: 4px 0;
            border-bottom: 1px solid var(--border-subtle);
        }
        .telemetry-row:last-child { border-bottom: none; }
        .telemetry-label { color: var(--text-secondary); }
        .telemetry-value { font-weight: 600; color: var(--text-value); }

        .id-panel-row {
            display: flex;
            justify-content: space-between;
            padding: 4px 0;
            border-bottom: 1px solid var(--border-subtle);
        }
        .id-panel-row:last-child { border-bottom: none; }
        .id-panel-row .label { color: var(--text-secondary); }
        .id-panel-row .value { font-weight: 600; color: var(--text-value); }

        .id-panel-photo {
            text-align: center;
            margin-bottom: 12px;
        }
        .id-panel-photo svg {
            width: 64px;
            height: 64px;
            background: var(--border-subtle);
            border-radius: 50%;
            overflow: hidden;
        }

        /* === SOS ACTIVE PULSING TEXT === */
        .sos-active {
            color: #ff1744 !important;
            animation: sosPulseText 1s infinite;
            font-weight: 700;
        }
        @keyframes sosPulseText {
            0%, 100% { opacity: 1; }
            50%      { opacity: 0.4; }
        }

        /* === FAB (Floating Action Button) === */
        .fab {
            position: fixed;
            bottom: 60px;
            right: 24px;
            z-index: 1500;
            width: 56px;
            height: 56px;
            border-radius: 50%;
            background: var(--fab-bg);
            border: 1px solid var(--border-color);
            color: var(--text-primary);
            font-size: 28px;
            cursor: pointer;
            box-shadow: 0 4px 16px var(--shadow);
            transition: background 0.2s, transform 0.2s, color 0.3s;
            backdrop-filter: blur(12px);
        }
        .fab:hover { background: var(--btn-hover); color: #fff; transform: scale(1.1); }

        /* === MODAL OVERLAY === */
        .modal-overlay {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.6);
            z-index: 3500;
            display: none;
            justify-content: center;
            align-items: center;
        }
        .modal-overlay.visible { display: flex; }

        .modal-content {
            background: var(--bg-modal);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 24px;
            min-width: 340px;
            max-width: 90vw;
            box-shadow: 0 4px 24px var(--shadow);
            transition: background 0.3s, border-color 0.3s;
        }
        .modal-content h2 {
            color: var(--text-primary);
            margin-bottom: 16px;
            font-size: 1.2rem;
        }
        .modal-content label {
            display: block;
            color: var(--text-secondary);
            font-size: 0.85rem;
            margin-bottom: 4px;
            margin-top: 12px;
        }
        .modal-input {
            width: 100%;
            padding: 10px 14px;
            background: var(--bg-input);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 0.95rem;
            outline: none;
            transition: border-color 0.2s, background 0.3s, color 0.3s;
        }
        .modal-input:focus { border-color: var(--accent); }
        .modal-hint {
            margin-top: 14px;
            font-size: 0.78rem;
            color: var(--text-secondary);
        }
        .modal-actions {
            display: flex;
            gap: 12px;
            margin-top: 20px;
        }
        .btn-save {
            flex: 1;
            padding: 10px;
            background: var(--btn-bg);
            color: #fff;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            font-size: 0.95rem;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.2s;
        }
        .btn-save:hover { background: var(--btn-hover); }
        .btn-cancel {
            flex: 1;
            padding: 10px;
            background: var(--border-subtle);
            color: var(--text-secondary);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            font-size: 0.95rem;
            cursor: pointer;
            transition: background 0.2s;
        }
        .btn-cancel:hover { background: rgba(144,164,174,0.35); }

        /* === TRAIL SLIDER POPUP (absolute div over map) === */
        .trail-slider-popup {
            position: absolute;
            background: var(--bg-modal);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            box-shadow: 0 4px 24px var(--shadow);
            padding: 12px 16px;
            min-width: 220px;
            display: none;
            animation: trailPopupIn 0.3s ease-out;
            transition: background 0.3s, border-color 0.3s;
        }
        .trail-slider-popup.visible { display: block; }
        .trail-slider-popup .trail-close {
            position: absolute;
            top: 4px; right: 8px;
            background: none;
            border: none;
            color: var(--text-secondary);
            font-size: 16px;
            cursor: pointer;
        }
        .trail-slider-popup .trail-close:hover { color: var(--text-primary); }
        .trail-label {
            color: var(--text-primary);
            font-size: 0.85rem;
            font-weight: 600;
            text-align: center;
            margin-bottom: 8px;
            letter-spacing: 0.5px;
        }
        .trail-range {
            -webkit-appearance: none;
            appearance: none;
            width: 100%;
            height: 6px;
            border-radius: 3px;
            background: rgba(255, 255, 255, 0.12);
            outline: none;
            cursor: pointer;
        }
        .trail-range::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #fff;
            box-shadow: 0 0 8px rgba(0, 122, 255, 0.8);
            cursor: pointer;
            transition: box-shadow 0.2s;
        }
        .trail-range::-webkit-slider-thumb:hover {
            box-shadow: 0 0 14px rgba(0, 122, 255, 1);
        }
        .trail-range::-moz-range-thumb {
            width: 18px;
            height: 18px;
            border: none;
            border-radius: 50%;
            background: #fff;
            box-shadow: 0 0 8px rgba(0, 122, 255, 0.8);
            cursor: pointer;
        }
        .trail-range::-webkit-slider-runnable-track {
            background: linear-gradient(90deg, #007AFF, rgba(0, 122, 255, 0.3));
            height: 6px;
            border-radius: 3px;
        }
        .trail-range-labels {
            display: flex;
            justify-content: space-between;
            font-size: 0.7rem;
            color: var(--text-secondary);
            margin-top: 4px;
        }

        @keyframes trailPopupIn {
            from { opacity: 0; transform: translateY(10px); }
            to   { opacity: 1; transform: translateY(0); }
        }

        /* === SOS TOAST === */
        .sos-toast {
            position: fixed;
            bottom: 60px;
            left: 50%;
            transform: translateX(-50%) translateY(100px);
            z-index: 2500;
            background: rgba(255, 23, 68, 0.92);
            backdrop-filter: blur(12px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 12px;
            padding: 12px 20px;
            display: flex;
            align-items: center;
            gap: 12px;
            cursor: pointer;
            box-shadow: 0 4px 24px rgba(255, 23, 68, 0.5);
            opacity: 0;
            pointer-events: none;
            transition: transform 0.4s ease, opacity 0.4s ease;
            min-width: 280px;
        }
        .sos-toast.visible {
            opacity: 1;
            pointer-events: auto;
            transform: translateX(-50%) translateY(0);
        }
        .sos-toast-icon {
            font-size: 1.5rem;
            animation: sosPulseText 1s infinite;
        }
        .sos-toast-body {
            flex: 1;
        }
        .sos-toast-title {
            font-weight: 700;
            font-size: 0.95rem;
            color: #fff;
            letter-spacing: 1px;
        }
        .sos-toast-detail {
            font-size: 0.8rem;
            color: rgba(255,255,255,0.85);
            margin-top: 2px;
        }
        .sos-toast-arrow {
            font-size: 1.4rem;
            color: rgba(255,255,255,0.7);
            font-weight: 700;
        }

        /* === THEME TOGGLE === */
        .theme-toggle {
            position: fixed;
            bottom: 60px;
            right: 90px;
            z-index: 1500;
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: var(--fab-bg);
            border: 1px solid var(--border-color);
            color: var(--text-primary);
            font-size: 20px;
            cursor: pointer;
            box-shadow: 0 4px 16px var(--shadow);
            backdrop-filter: blur(12px);
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.3s, transform 0.2s, color 0.3s, border-color 0.3s;
            line-height: 1;
        }
        .theme-toggle:hover { transform: scale(1.1); }
        .theme-toggle:active { transform: scale(0.95); }

        /* === NAV LINKS (replace inline styles) === */
        .header-nav { display: flex; align-items: center; gap: 16px; }
        .header-nav a {
            text-decoration: none;
            font-size: 0.85rem;
            transition: color 0.2s;
        }
        .header-nav a.active { color: var(--accent); font-weight: 600; }
        .header-nav a:not(.active) { color: var(--text-secondary); }
        .header-nav a:hover { color: var(--accent); }

        /* === HISTORY PANEL === */
        .history-panel {
            width: 0;
            flex-shrink: 0;
            overflow: hidden;
            background: var(--bg-header);
            border-right: 1px solid var(--border-color);
            display: flex;
            flex-direction: column;
            transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 2;
            position: relative;
        }
        .history-panel.open { width: 380px; }
        .history-panel.resizing { transition: none; }

        .hp-resize-handle {
            position: absolute;
            top: 0;
            right: 0;
            width: 6px;
            height: 100%;
            cursor: col-resize;
            background: transparent;
            z-index: 3;
            transition: background 0.2s;
        }
        .hp-resize-handle:hover,
        .hp-resize-handle.active {
            background: var(--accent);
            opacity: 0.5;
        }

        .hp-header { display:flex; justify-content:space-between; align-items:center; padding:10px 14px; border-bottom:1px solid var(--border-color); }
        .hp-title { font-weight:600; font-size:0.95rem; }
        .hp-header button { background:none; border:none; font-size:1.4rem; cursor:pointer; color:var(--text-secondary); line-height:1; }
        .hp-header button:hover { color:var(--text-primary); }

        .hp-controls { padding:10px 14px; display:flex; flex-direction:column; gap:6px; border-bottom:1px solid var(--border-color); }
        .hp-controls select, .hp-controls input { width:100%; font-size:0.8rem; padding:5px 8px; border-radius:6px; border:1px solid var(--border-color); background:var(--bg-body); color:var(--text-primary); }
        .hp-dates { display:flex; flex-direction:column; gap:4px; }
        .hp-date-row { display:flex; align-items:center; gap:6px; }
        .hp-date-row label { font-size:0.75rem; color:var(--text-secondary); min-width:40px; }
        .hp-date-row input { flex:1; }
        .hp-actions { display:flex; align-items:center; gap:6px; }
        .hp-btn-search { flex:1; padding:6px; border:none; border-radius:6px; background:var(--accent); color:#fff; cursor:pointer; font-size:0.8rem; font-weight:600; }
        .hp-btn-search:hover { opacity:0.85; }
        .hp-btn-export { padding:6px 10px; border:none; border-radius:6px; background:var(--border-color); color:var(--text-primary); cursor:pointer; font-size:0.75rem; }
        .hp-btn-export:hover { opacity:0.8; }
        .hp-count { font-size:0.7rem; color:var(--text-secondary); white-space:nowrap; }

        .hp-tabs { display:flex; border-bottom:1px solid var(--border-color); }
        .hp-tab { flex:1; padding:7px; border:none; background:none; cursor:pointer; font-size:0.8rem; color:var(--text-secondary); border-bottom:2px solid transparent; transition:color 0.2s; }
        .hp-tab.active { color:var(--accent); border-bottom-color:var(--accent); font-weight:600; }
        .hp-tab:hover { color:var(--text-primary); }

        .hp-table { flex:1; overflow-y:auto; overflow-x:auto; font-size:0.75rem; }
        .hp-table::-webkit-scrollbar { width:5px; }
        .hp-table::-webkit-scrollbar-track { background:var(--scrollbar-track); }
        .hp-table::-webkit-scrollbar-thumb { background:var(--scrollbar-thumb); border-radius:3px; }
        .hp-table table { width:100%; border-collapse:collapse; }
        .hp-table th, .hp-table td { padding:4px 6px; text-align:left; border-bottom:1px solid var(--border-color); white-space:nowrap; }
        .hp-table th { position:sticky; top:0; background:var(--bg-header); font-weight:600; font-size:0.7rem; text-transform:uppercase; color:var(--text-secondary); z-index:1; }
        .hp-table tr { cursor:pointer; transition:background 0.15s; }
        .hp-table tr:hover { background:rgba(0,122,255,0.08); }
        .hp-table tr.selected { background:rgba(0,122,255,0.15); }
        .hp-table .sos-row { background:rgba(255,23,68,0.08); }
        .hp-table .sos-row:hover { background:rgba(255,23,68,0.15); }
        .hp-table .badge-type { display:inline-block; padding:1px 5px; border-radius:3px; font-size:0.65rem; font-weight:700; text-transform:uppercase; }
        .hp-table .badge-type.LOCATION { background:#004d40; color:#00e5ff; }
        .hp-table .badge-type.TRACKING { background:#4a3000; color:#ffa500; }
        .hp-table .badge-type.SOS { background:#4a0000; color:#ff5252; }
        .hp-table .badge-resolved { display:inline-block; padding:1px 5px; border-radius:3px; font-size:0.65rem; font-weight:700; }
        .hp-table .badge-resolved.yes { background:#003300; color:#00e676; }
        .hp-table .badge-resolved.no { background:#4a0000; color:#ff5252; }
        .hp-placeholder { padding:40px 14px; text-align:center; color:var(--text-secondary); font-size:0.8rem; }

        /* === OPERATIONS PANEL === */
        .operations-panel {
            width: 0;
            flex-shrink: 0;
            overflow: hidden;
            background: var(--bg-header);
            border-right: 1px solid var(--border-color);
            display: flex;
            flex-direction: column;
            transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 2;
        }
        .operations-panel.open { width: 460px; }
        .ops-header { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:10px 14px; border-bottom:1px solid var(--border-color); }
        .ops-title { font-weight:700; font-size:0.95rem; }
        .ops-close { background:none; border:none; color:var(--text-secondary); font-size:1.4rem; cursor:pointer; line-height:1; }
        .ops-close:hover { color:var(--text-primary); }
        .ops-scroll { flex:1; overflow-y:auto; padding:12px; display:flex; flex-direction:column; gap:12px; }
        .ops-scroll::-webkit-scrollbar { width:5px; }
        .ops-scroll::-webkit-scrollbar-track { background:var(--scrollbar-track); }
        .ops-scroll::-webkit-scrollbar-thumb { background:var(--scrollbar-thumb); border-radius:3px; }
        .ops-summary { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; }
        .ops-metric { border:1px solid var(--border-color); background:var(--bg-body); border-radius:8px; padding:10px; min-height:58px; }
        .ops-metric span { display:block; font-size:0.68rem; color:var(--text-secondary); text-transform:uppercase; letter-spacing:0.3px; }
        .ops-metric strong { display:block; margin-top:4px; font-size:1.2rem; color:var(--text-primary); }
        .ops-tabs {
            display:grid;
            grid-template-columns:repeat(4, minmax(0, 1fr));
            position:sticky;
            top:0;
            z-index:8;
            border:1px solid var(--border-color);
            border-radius:8px;
            overflow:visible;
            background:var(--bg-body);
        }
        .ops-tab {
            width:100%;
            min-width:0;
            padding:8px 6px;
            border:none;
            background:var(--bg-body);
            color:var(--text-secondary);
            cursor:pointer;
            font-size:0.78rem;
            line-height:1.12;
            text-align:center;
            white-space:normal;
        }
        .ops-tab:last-child { border-right:none; }
        .ops-tab.active { background:var(--accent); color:#fff; font-weight:700; }
        .ops-section { display:none; flex-direction:column; gap:10px; }
        .ops-section.active { display:flex; }
        .ops-toolbar { display:flex; align-items:center; justify-content:space-between; gap:8px; }
        .ops-toolbar h3 { font-size:0.92rem; font-weight:700; }
        .ops-status { min-height:18px; color:var(--text-secondary); font-size:0.76rem; }
        .ops-list { display:flex; flex-direction:column; gap:8px; }
        .ops-item { border:1px solid var(--border-color); background:var(--bg-section); border-radius:8px; padding:10px; display:flex; flex-direction:column; gap:7px; }
        .ops-item.critical { border-color:rgba(255,23,68,0.65); box-shadow:0 0 0 1px rgba(255,23,68,0.12); }
        .ops-row { display:flex; justify-content:space-between; gap:10px; align-items:flex-start; font-size:0.78rem; }
        .ops-row .muted { color:var(--text-secondary); }
        .ops-name { font-weight:700; color:var(--text-primary); overflow-wrap:anywhere; }
        .ops-badge { display:inline-flex; align-items:center; justify-content:center; padding:2px 7px; border-radius:999px; font-size:0.68rem; font-weight:700; text-transform:uppercase; background:var(--border-color); color:var(--text-primary); }
        .ops-badge.pending { background:#4a0000; color:#ff8a80; }
        .ops-badge.in_progress { background:#4a3000; color:#ffcc80; }
        .ops-badge.resolved { background:#003300; color:#69f0ae; }
        .ops-badge.high, .ops-badge.critical { background:#4a0000; color:#ff8a80; }
        .ops-badge.medium, .ops-badge.assigned { background:#4a3000; color:#ffcc80; }
        .ops-badge.available, .ops-badge.open { background:#003300; color:#69f0ae; }
        .ops-badge.admin { background:#08345c; color:#8fd3ff; }
        .ops-badge.supervisor { background:#183b25; color:#8ff0b2; }
        .ops-badge.operator { background:#2d2a55; color:#c5c2ff; }
        .ops-badge.viewer { background:#343b45; color:#d5dde7; }
        .ops-badge.inactive { background:#3b1f24; color:#ffb4bd; }
        .ops-form { display:grid; gap:8px; }
        .ops-form label { display:grid; gap:4px; color:var(--text-secondary); font-size:0.72rem; }
        .ops-form input, .ops-form select, .ops-form textarea {
            width:100%;
            border:1px solid var(--border-color);
            background:var(--bg-body);
            color:var(--text-primary);
            border-radius:6px;
            padding:7px 8px;
            font-size:0.82rem;
        }
        .ops-form textarea { resize:vertical; min-height:68px; }
        .ops-item textarea {
            width:100%;
            min-height:56px;
            resize:vertical;
            border:1px solid var(--border-color);
            background:var(--bg-body);
            color:var(--text-primary);
            border-radius:6px;
            padding:7px 8px;
            font-size:0.82rem;
        }
        .ops-history { display:none; border-top:1px solid var(--border-color); padding-top:6px; color:var(--text-secondary); font-size:0.75rem; }
        .ops-history.open { display:block; }
        .ops-history div { padding:4px 0; border-bottom:1px solid var(--border-subtle); }
        .ops-grid2 { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
        .ops-grid3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:8px; }
        .ops-actions { display:flex; gap:6px; flex-wrap:wrap; }
        .ops-btn { border:none; border-radius:6px; background:var(--accent); color:#fff; cursor:pointer; font-size:0.76rem; font-weight:700; padding:7px 10px; }
        .ops-btn:hover { opacity:0.85; }
        .ops-btn.secondary { background:var(--border-color); color:var(--text-primary); }
        .ops-btn.danger { background:#ff1744; color:#fff; }
        .ops-empty { padding:22px 10px; color:var(--text-secondary); text-align:center; font-size:0.8rem; border:1px dashed var(--border-color); border-radius:8px; }
        @media (max-width: 760px) {
            header { padding:10px 12px; gap:10px; }
            header h1 { font-size:1.05rem; }
            .header-nav { gap:10px; }
            .header-right { gap:8px; }
            .auth-status span { display:none; }
            .operations-panel.open, .history-panel.open { width:100vw; }
            .ops-grid2, .ops-grid3, .ops-summary { grid-template-columns:1fr; }
        }

        /* === C4 PROFESSIONAL MONITORING UI === */
        :root {
            --bg-body: #eef2f5;
            --bg-header: #ffffff;
            --bg-panel: rgba(255,255,255,0.94);
            --bg-section: #ffffff;
            --bg-input: #f4f7fa;
            --text-primary: #17202a;
            --text-secondary: #5f6f80;
            --text-value: #0c1520;
            --border-color: rgba(16,30,46,0.12);
            --border-subtle: rgba(16,30,46,0.07);
            --accent: #0877b9;
            --accent-2: #00a6a6;
            --ok: #138a45;
            --warn: #b77900;
            --danger: #d92d20;
            --critical-bg: #fff1f0;
            --shadow: rgba(7,21,37,0.16);
            --btn-bg: #0877b9;
            --btn-hover: #075f94;
            --fab-bg: #ffffff;
            --scrollbar-track: #e7edf2;
            --scrollbar-thumb: #9cadbd;
        }
        .dark-mode {
            --bg-body: #111820;
            --bg-header: #18222d;
            --bg-panel: rgba(24,34,45,0.95);
            --bg-section: #202d3a;
            --bg-input: #17212b;
            --bg-modal: rgba(24,34,45,0.96);
            --text-primary: #edf4fb;
            --text-secondary: #a8b8c7;
            --text-value: #ffffff;
            --border-color: rgba(220,235,248,0.14);
            --border-subtle: rgba(220,235,248,0.08);
            --accent: #18a0d8;
            --accent-2: #1fb6a6;
            --ok: #35c46f;
            --warn: #f0ad2c;
            --danger: #ff4d4f;
            --critical-bg: rgba(217,45,32,0.13);
            --shadow: rgba(0,0,0,0.45);
            --btn-bg: #0f78a8;
            --btn-hover: #1293cc;
            --fab-bg: #202d3a;
            --scrollbar-track: #17212b;
            --scrollbar-thumb: #405266;
        }
        body {
            font-family: "Segoe UI", Roboto, Arial, sans-serif;
            letter-spacing: 0;
        }
        header {
            min-height: 64px;
            padding: 10px 18px;
            gap: 18px;
            box-shadow: 0 8px 24px rgba(0,0,0,0.08);
        }
        .brand-block {
            display: flex;
            align-items: center;
            gap: 14px;
            min-width: 290px;
        }
        .brand-mark {
            width: 52px;
            height: 52px;
            border-radius: 10px;
            display: block;
            position: relative;
            overflow: hidden;
            flex: 0 0 52px;
            background: #02070f;
            border: 1px solid rgba(255,255,255,0.16);
            box-shadow: 0 0 0 1px rgba(8,119,185,0.2), 0 12px 30px rgba(0,0,0,0.22);
        }
        .brand-mark img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transform: scale(1.58);
            transform-origin: center 36%;
            filter: saturate(1.08) contrast(1.06);
        }
        .brand-copy { display: grid; gap: 2px; min-width: 0; }
        .brand-copy h1 {
            font-size: 1.08rem;
            line-height: 1.15;
            letter-spacing: 0;
            font-weight: 800;
            color: var(--text-primary);
        }
        .brand-copy span {
            color: var(--text-secondary);
            font-size: 0.76rem;
            white-space: nowrap;
        }
        .header-nav {
            flex: 1;
            justify-content: center;
            gap: 8px;
        }
        .header-nav a {
            padding: 8px 11px;
            border-radius: 7px;
            border: 1px solid transparent;
            font-weight: 700;
        }
        .header-nav a.active {
            color: #ffffff;
            background: var(--accent);
            border-color: rgba(255,255,255,0.12);
        }
        .header-nav a:not(.active) {
            background: var(--bg-input);
            color: var(--text-secondary);
        }
        .ws-status, .auth-status {
            min-height: 32px;
            padding: 6px 9px;
            border: 1px solid var(--border-color);
            border-radius: 7px;
            background: var(--bg-input);
        }
        .ws-dot {
            width: 9px;
            height: 9px;
            box-shadow: 0 0 0 3px rgba(217,45,32,0.13);
        }
        .ws-dot.connected { box-shadow: 0 0 0 3px rgba(19,138,69,0.16); }
        .logout-btn, .ops-btn, .hp-btn-search, .hp-btn-export, .btn-save, .btn-cancel {
            border-radius: 7px;
            font-weight: 800;
        }
        .command-strip {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 8px;
            padding: 8px 12px;
            background: var(--bg-body);
            border-bottom: 1px solid var(--border-color);
            z-index: 900;
        }
        .command-tile {
            min-height: 50px;
            border: 1px solid var(--border-color);
            border-left: 5px solid var(--accent);
            border-radius: 8px;
            background: var(--bg-header);
            padding: 8px 10px;
            display: grid;
            gap: 2px;
            box-shadow: 0 6px 18px rgba(0,0,0,0.05);
        }
        .command-tile span {
            color: var(--text-secondary);
            font-size: 0.68rem;
            font-weight: 800;
            text-transform: uppercase;
        }
        .command-tile strong {
            color: var(--text-primary);
            font-size: 1rem;
        }
        .command-tile.danger { border-left-color: var(--danger); }
        .command-tile.success { border-left-color: var(--ok); }
        #map {
            background: #101820;
            box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
        }
        .operations-panel.open { width: min(540px, 46vw); }
        .history-panel.open { width: 410px; }
        .operations-panel, .history-panel {
            background: var(--bg-panel);
            backdrop-filter: blur(14px);
            box-shadow: 12px 0 32px rgba(0,0,0,0.14);
        }
        .ops-header, .hp-header {
            min-height: 48px;
            background: var(--bg-header);
        }
        .ops-title, .hp-title {
            font-size: 0.92rem;
            text-transform: uppercase;
            letter-spacing: 0.4px;
        }
        .ops-scroll { padding: 12px; gap: 12px; }
        .ops-summary {
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 9px;
        }
        .ops-metric {
            min-height: 72px;
            border-radius: 8px;
            border-left: 4px solid var(--accent);
            background: var(--bg-section);
            box-shadow: 0 8px 18px rgba(0,0,0,0.06);
        }
        .ops-metric:nth-child(2), .ops-metric.c4-metric:first-of-type { border-left-color: var(--danger); }
        .ops-metric:nth-child(3), .ops-metric.c4-metric:last-of-type { border-left-color: var(--ok); }
        .ops-metric:nth-child(4) { border-left-color: var(--warn); }
        .ops-metric span {
            font-size: 0.66rem;
            font-weight: 900;
        }
        .ops-metric strong {
            font-size: 1.45rem;
            line-height: 1.2;
            letter-spacing: 0;
        }
        .ops-tabs {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            position: sticky;
            top: 0;
            z-index: 12;
            overflow: visible;
            border-radius: 8px;
            background: var(--bg-input);
            padding: 4px;
            gap: 4px;
            border: 1px solid var(--border-color);
        }
        .ops-tab {
            width: 100%;
            min-width: 0;
            min-height: 34px;
            border: none;
            border-radius: 6px;
            padding: 8px 6px;
            font-weight: 800;
            background: transparent;
            white-space: normal;
            line-height: 1.12;
            text-align: center;
        }
        .ops-tab.active {
            background: var(--accent);
            box-shadow: 0 5px 14px rgba(8,119,185,0.28);
        }
        .ops-toolbar {
            min-height: 34px;
            padding: 2px 0;
            border-bottom: 1px solid var(--border-subtle);
        }
        .ops-toolbar h3 {
            font-size: 0.93rem;
            letter-spacing: 0;
        }
        .ops-item {
            border-radius: 8px;
            padding: 12px;
            border-left: 4px solid var(--accent);
            box-shadow: 0 6px 16px rgba(0,0,0,0.05);
        }
        .ops-item.critical {
            background: var(--critical-bg);
            border-left-color: var(--danger);
            border-color: rgba(217,45,32,0.35);
        }
        .ops-row {
            font-size: 0.8rem;
            line-height: 1.35;
        }
        .ops-name { font-size: 0.9rem; }
        .ops-badge {
            min-height: 22px;
            padding: 3px 8px;
            border-radius: 7px;
            letter-spacing: 0;
        }
        .ops-badge.pending, .ops-badge.high, .ops-badge.critical {
            background: rgba(217,45,32,0.15);
            color: var(--danger);
        }
        .ops-badge.in_progress, .ops-badge.medium, .ops-badge.assigned {
            background: rgba(183,121,0,0.16);
            color: var(--warn);
        }
        .ops-badge.resolved, .ops-badge.available, .ops-badge.open {
            background: rgba(19,138,69,0.16);
            color: var(--ok);
        }
        .ops-form {
            padding: 10px;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            background: var(--bg-section);
        }
        .ops-form label {
            font-weight: 800;
            font-size: 0.7rem;
            text-transform: uppercase;
        }
        .ops-form input, .ops-form select, .ops-form textarea, .hp-controls select, .hp-controls input {
            min-height: 34px;
            border-radius: 7px;
            font-size: 0.82rem;
        }
        .ops-btn {
            min-height: 32px;
            padding: 7px 12px;
            box-shadow: 0 4px 12px rgba(8,119,185,0.18);
        }
        .ops-btn.secondary {
            box-shadow: none;
            background: var(--bg-input);
            border: 1px solid var(--border-color);
        }
        .ops-btn.danger {
            background: var(--danger);
            box-shadow: 0 4px 12px rgba(217,45,32,0.22);
        }
        .ops-empty {
            background: var(--bg-section);
            border-radius: 8px;
        }
        .info-container {
            top: 88px;
            right: 14px;
            min-width: 290px;
        }
        .info-section, .id-card {
            border-radius: 8px;
            box-shadow: 0 6px 18px rgba(0,0,0,0.08);
        }
        .alert-panel {
            left: 24px;
            border-radius: 8px;
            border-width: 1px;
            border-left: 6px solid var(--danger);
            box-shadow: 0 24px 70px rgba(217,45,32,0.32);
        }
        .alert-panel h2 {
            font-size: 1.35rem;
            letter-spacing: 0;
        }
        .btn-ack {
            border-radius: 8px;
            background: var(--ok);
        }
        .sos-toast {
            border-radius: 8px;
            border-left: 5px solid var(--danger);
            box-shadow: 0 14px 40px rgba(0,0,0,0.3);
        }
        .theme-toggle, .fab {
            border-radius: 8px;
            width: 48px;
            height: 48px;
        }
        footer {
            min-height: 34px;
            background: var(--bg-header);
            border-top: 1px solid var(--border-color);
            font-weight: 700;
        }
        @media (max-width: 980px) {
            header {
                flex-wrap: wrap;
                min-height: auto;
            }
            .brand-block { min-width: 240px; }
            .header-nav { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; }
            .command-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            .operations-panel.open, .history-panel.open { width: 100vw; }
        }
        @media (max-width: 560px) {
            .brand-block { min-width: 0; width: 100%; }
            .brand-mark { width: 46px; height: 46px; flex-basis: 46px; }
            .brand-copy span { white-space: normal; }
            .command-strip { grid-template-columns: 1fr; }
            .ops-summary { grid-template-columns: 1fr; }
            .ops-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            .ops-tab { font-size: 0.72rem; }
            .auth-status { padding: 6px; }
        }

        /* === 2026 C4 COMMAND CENTER REFRESH === */
        body {
            background:
                radial-gradient(circle at 18% 12%, rgba(24,160,216,0.16), transparent 34%),
                linear-gradient(135deg, #0b1119 0%, #111820 48%, #101923 100%);
        }
        .dark-mode {
            --bg-body: #0f1720;
            --bg-header: rgba(17,25,34,0.95);
            --bg-panel: rgba(18,29,40,0.96);
            --bg-section: #162231;
            --bg-input: #101a25;
            --border-color: rgba(183,206,229,0.16);
            --border-subtle: rgba(183,206,229,0.08);
            --text-primary: #f3f8fc;
            --text-secondary: #9eb0c0;
            --accent: #18a8e0;
            --accent-2: #24c0a9;
        }
        header {
            background: linear-gradient(180deg, rgba(16,25,35,0.98), rgba(13,21,30,0.94));
            border-bottom-color: rgba(120,160,194,0.18);
            box-shadow: 0 10px 30px rgba(0,0,0,0.28);
        }
        .brand-copy h1 { color: #f8fbff; }
        .brand-copy span { color: #9fb4c8; }
        .brand-mark {
            border-radius: 12px;
            box-shadow: 0 0 0 1px rgba(24,168,224,0.32), 0 0 28px rgba(24,168,224,0.18);
        }
        .header-nav a {
            background: transparent !important;
            color: #aab8c6 !important;
            border-color: rgba(154,177,197,0.14);
        }
        .header-nav a.active {
            color: #ffffff !important;
            background: linear-gradient(135deg, #168bc3, #11a9d8) !important;
            box-shadow: 0 8px 22px rgba(17,169,216,0.24);
        }
        .ws-status, .auth-status {
            background: rgba(255,255,255,0.05);
            color: #c9d6e2;
        }
        .command-strip {
            grid-template-columns: 1.1fr 1fr 1fr 0.85fr;
            padding: 10px 14px;
            background: rgba(8,14,22,0.72);
            border-bottom-color: rgba(120,160,194,0.16);
        }
        .command-tile {
            min-height: 58px;
            background: linear-gradient(180deg, rgba(27,42,57,0.96), rgba(20,31,43,0.96));
            border-color: rgba(142,174,204,0.18);
            box-shadow: 0 10px 28px rgba(0,0,0,0.18);
        }
        .command-tile span { color: #94a9ba; }
        .command-tile strong { color: #ffffff; font-size: 1.08rem; }
        #mainContent {
            position: relative;
            background: #0b121b;
        }
        #map {
            min-height: 0;
            filter: saturate(1.05) contrast(1.02);
        }
        .situation-hud {
            position: absolute;
            top: 18px;
            left: 18px;
            z-index: 1200;
            width: min(430px, calc(100vw - 36px));
            pointer-events: none;
            display: grid;
            gap: 10px;
        }
        .situation-card {
            pointer-events: auto;
            border: 1px solid rgba(167,199,225,0.2);
            background: linear-gradient(180deg, rgba(19,31,43,0.96), rgba(13,22,31,0.94));
            border-radius: 10px;
            box-shadow: 0 18px 48px rgba(0,0,0,0.32);
            backdrop-filter: blur(14px);
            padding: 14px;
            color: #eff7ff;
        }
        .situation-head {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            align-items: flex-start;
            margin-bottom: 10px;
        }
        .situation-kicker {
            display: block;
            color: #8ea7bb;
            font-size: 0.68rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.6px;
        }
        .situation-title {
            margin-top: 3px;
            font-size: 1rem;
            font-weight: 900;
            color: #ffffff;
        }
        .situation-pill {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            min-height: 26px;
            padding: 4px 8px;
            border-radius: 999px;
            font-size: 0.7rem;
            font-weight: 900;
            color: #b9ffdf;
            background: rgba(19,138,69,0.18);
            border: 1px solid rgba(78,214,137,0.24);
            white-space: nowrap;
        }
        .situation-pill::before {
            content: "";
            width: 8px;
            height: 8px;
            border-radius: 999px;
            background: #35c46f;
            box-shadow: 0 0 0 4px rgba(53,196,111,0.14);
        }
        .situation-pill.alert {
            color: #ffd0cc;
            background: rgba(217,45,32,0.2);
            border-color: rgba(255,102,91,0.32);
        }
        .situation-pill.alert::before {
            background: #ff4d4f;
            box-shadow: 0 0 0 4px rgba(255,77,79,0.16);
        }
        .situation-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 8px;
        }
        .situation-stat {
            min-height: 58px;
            border-radius: 8px;
            background: rgba(255,255,255,0.045);
            border: 1px solid rgba(255,255,255,0.08);
            padding: 8px;
        }
        .situation-stat span {
            display: block;
            color: #91a8ba;
            font-size: 0.64rem;
            font-weight: 900;
            text-transform: uppercase;
        }
        .situation-stat strong {
            display: block;
            margin-top: 6px;
            color: #ffffff;
            font-size: 1.2rem;
        }
        .situation-actions {
            display: flex;
            gap: 8px;
            margin-top: 12px;
        }
        .situation-actions button {
            flex: 1;
            min-height: 36px;
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px;
            background: rgba(24,168,224,0.16);
            color: #dff6ff;
            font-weight: 900;
            cursor: pointer;
        }
        .situation-actions button.primary {
            background: linear-gradient(135deg, #0877b9, #18a8e0);
            color: #ffffff;
            box-shadow: 0 10px 24px rgba(24,168,224,0.22);
        }
        .response-playbook {
            position: absolute;
            right: 18px;
            top: 18px;
            z-index: 1190;
            width: 310px;
            border-radius: 10px;
            border: 1px solid rgba(167,199,225,0.18);
            background: linear-gradient(180deg, rgba(19,31,43,0.94), rgba(13,22,31,0.92));
            color: #eff7ff;
            box-shadow: 0 18px 48px rgba(0,0,0,0.3);
            backdrop-filter: blur(14px);
            padding: 13px;
        }
        .playbook-title {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 8px;
            margin-bottom: 10px;
            color: #ffffff;
            font-size: 0.82rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.4px;
        }
        .playbook-title span {
            color: #91a8ba;
            font-size: 0.68rem;
            font-weight: 800;
        }
        .playbook-list {
            display: grid;
            gap: 8px;
        }
        .playbook-step {
            display: grid;
            grid-template-columns: 24px 1fr;
            gap: 8px;
            align-items: start;
            color: #c9d8e5;
            font-size: 0.76rem;
            line-height: 1.3;
        }
        .playbook-step strong {
            display: grid;
            place-items: center;
            width: 24px;
            height: 24px;
            border-radius: 7px;
            color: #ffffff;
            background: rgba(24,168,224,0.24);
            border: 1px solid rgba(24,168,224,0.28);
            font-size: 0.74rem;
        }
        .operations-panel, .history-panel {
            border-right-color: rgba(167,199,225,0.18);
        }
        .operations-panel.open {
            width: min(520px, 44vw);
        }
        .ops-header, .hp-header {
            background: linear-gradient(180deg, rgba(22,34,47,0.98), rgba(18,29,40,0.98));
            color: #f7fbff;
        }
        .ops-tabs {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }
        .ops-tab {
            min-height: 38px;
            color: #9fb3c5;
        }
        .ops-tab.active {
            background: linear-gradient(135deg, #0877b9, #18a8e0);
        }
        .ops-summary {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
        .ops-metric, .ops-item, .ops-form {
            background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.025));
            border-color: rgba(167,199,225,0.16);
        }
        .info-container {
            top: auto;
            bottom: 54px;
            right: 18px;
            min-width: 320px;
        }
        .info-section {
            background: rgba(19,31,43,0.95);
            color: #f3f8fc;
            border-color: rgba(167,199,225,0.18);
        }
        .theme-toggle {
            right: 82px;
            bottom: 52px;
            background: rgba(19,31,43,0.94);
            color: #dff6ff;
        }
        .fab {
            bottom: 52px;
            background: linear-gradient(135deg, #0877b9, #18a8e0);
            color: #fff;
            border-color: rgba(255,255,255,0.18);
        }
        footer {
            background: rgba(12,20,29,0.96);
            color: #aabdcd;
        }
        .mapboxgl-popup-content {
            border-radius: 8px;
            box-shadow: 0 14px 34px rgba(0,0,0,0.28);
        }
        @media (max-width: 1120px) {
            .response-playbook { display: none; }
            .situation-hud { width: min(460px, calc(100vw - 36px)); }
        }
        @media (max-width: 760px) {
            .command-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            .situation-hud {
                top: 12px;
                left: 12px;
                width: calc(100vw - 24px);
            }
            .situation-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
            .situation-actions { flex-direction: column; }
            .operations-panel.open, .history-panel.open { width: 100vw; }
            .info-container {
                left: 12px;
                right: 12px;
                bottom: 48px;
                min-width: 0;
            }
        }

        /* === TARGET DESIGN: STARGUARD C4 MAPA OPERATIVO === */
        :root {
            --rail-width: 64px;
            --c4-bg: #061322;
            --c4-bg-2: #0a1a2d;
            --c4-panel: rgba(10, 28, 47, 0.96);
            --c4-panel-2: rgba(13, 35, 58, 0.96);
            --c4-line: rgba(128, 169, 209, 0.18);
            --c4-text: #eef6ff;
            --c4-muted: #9fb3c7;
            --c4-blue: #0b74d1;
            --c4-blue-2: #1292f3;
            --c4-green: #2ed573;
            --c4-red: #ff4d57;
            --c4-orange: #ff9f1a;
        }
        html, body { width: 100%; height: 100%; }
        body {
            padding-left: var(--rail-width);
            background:
                radial-gradient(circle at 35% -10%, rgba(14, 119, 198, 0.3), transparent 34%),
                linear-gradient(180deg, #071727 0%, #061322 100%);
            color: var(--c4-text);
        }
        .side-rail {
            position: fixed;
            inset: 0 auto 0 0;
            width: var(--rail-width);
            z-index: 5000;
            background: linear-gradient(180deg, #071321 0%, #04101c 100%);
            border-right: 1px solid rgba(133, 178, 219, 0.17);
            display: flex;
            flex-direction: column;
            align-items: center;
            box-shadow: 10px 0 26px rgba(0,0,0,0.26);
        }
        .rail-menu,
        .top-menu {
            width: 44px;
            height: 44px;
            border: 0;
            background: transparent;
            display: grid;
            place-content: center;
            gap: 5px;
            cursor: pointer;
        }
        .rail-menu { margin: 18px 0 28px; }
        .top-menu { display: none; }
        .rail-menu span,
        .top-menu span {
            display: block;
            width: 25px;
            height: 3px;
            border-radius: 99px;
            background: #c7d7e8;
        }
        .rail-nav {
            display: grid;
            gap: 18px;
            width: 100%;
            justify-items: center;
        }
        .rail-bottom {
            margin-top: auto;
            padding-bottom: 22px;
            display: grid;
            gap: 16px;
            width: 100%;
            justify-items: center;
        }
        .rail-btn {
            width: 38px;
            height: 38px;
            display: grid;
            place-items: center;
            text-decoration: none;
            color: #b7c8dc;
            border-radius: 8px;
            border: 1px solid transparent;
            background: transparent;
            font-size: 1rem;
            font-weight: 900;
        }
        .rail-btn.active,
        .rail-btn:hover {
            color: #ffffff;
            background: linear-gradient(135deg, #0b5ead, #1594ea);
            border-color: rgba(255,255,255,0.18);
            box-shadow: 0 8px 22px rgba(11, 116, 209, 0.34);
        }
        header {
            min-height: 78px;
            padding: 0 18px;
            background: linear-gradient(180deg, rgba(6, 23, 39, 0.98), rgba(6, 19, 34, 0.96));
            border-bottom: 1px solid var(--c4-line);
            box-shadow: 0 10px 26px rgba(0,0,0,0.28);
        }
        .brand-block {
            min-width: 360px;
            gap: 14px;
        }
        .brand-mark {
            width: 56px;
            height: 56px;
            flex-basis: 56px;
            border-radius: 9px;
            background: #020916;
            border: 1px solid rgba(79, 156, 231, 0.45);
            box-shadow: 0 0 0 1px rgba(255,255,255,0.05), 0 0 28px rgba(11,116,209,0.16);
        }
        .brand-copy h1 {
            font-size: 1.28rem;
            font-weight: 900;
            color: #ffffff;
        }
        .brand-copy span {
            font-size: 0.88rem;
            color: #b9c9dc;
        }
        .header-nav {
            flex: 1;
            justify-content: center;
            gap: 2px;
        }
        .header-nav a {
            min-width: 118px;
            min-height: 48px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            border: 1px solid rgba(141, 177, 213, 0.22);
            background: rgba(255,255,255,0.035) !important;
            color: #d2deea !important;
            font-size: 0.98rem;
            font-weight: 800;
        }
        .header-nav a.active {
            color: #ffffff !important;
            background: linear-gradient(135deg, #0b64b9, #0c7ee8) !important;
            box-shadow: 0 10px 25px rgba(11,116,209,0.32);
        }
        .header-right { gap: 10px; }
        .ws-status,
        .auth-status,
        .notification-btn {
            min-height: 44px;
            border-radius: 8px;
            border: 1px solid rgba(141, 177, 213, 0.18);
            background: rgba(255,255,255,0.035);
            color: #dce8f3;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
        }
        .ws-status { padding: 0 13px; font-size: 0.95rem; }
        .ws-dot.connected {
            background: #2ed573;
            box-shadow: 0 0 0 4px rgba(46,213,115,0.14), 0 0 14px rgba(46,213,115,0.55);
        }
        .auth-status { padding: 0 13px; font-size: 0.92rem; }
        .auth-caret { color: #7f99b2; font-size: 1rem; }
        .notification-btn {
            position: relative;
            width: 52px;
            cursor: pointer;
        }
        .bell-shape {
            display: grid;
            place-items: center;
            width: 24px;
            height: 24px;
            margin: auto;
            border-radius: 50%;
            border: 2px solid #d9e6f3;
            font-weight: 900;
            color: transparent;
        }
        .notification-btn strong {
            position: absolute;
            right: 8px;
            top: 6px;
            min-width: 18px;
            height: 18px;
            padding: 0 4px;
            display: grid;
            place-items: center;
            border-radius: 999px;
            background: var(--c4-red);
            color: #fff;
            font-size: 0.68rem;
            line-height: 1;
        }
        .logout-shell { padding: 0; }
        .logout-btn {
            height: 44px;
            padding: 0 14px;
            border: 0;
            background: transparent;
            color: #ffffff;
            font-size: 0.92rem;
            font-weight: 800;
        }
        .command-strip {
            grid-template-columns: 1fr 1.1fr 1.1fr 1fr 1.1fr 1.1fr 1.1fr 180px;
            gap: 0;
            padding: 14px 14px 10px;
            background: linear-gradient(180deg, rgba(7, 21, 36, 0.98), rgba(6, 19, 34, 0.98));
            border-bottom: 1px solid var(--c4-line);
        }
        .command-tile {
            min-height: 86px;
            border-radius: 0;
            border: 0;
            border-right: 1px solid rgba(132, 171, 208, 0.18);
            border-left: 4px solid var(--c4-blue);
            background: linear-gradient(180deg, rgba(17, 41, 67, 0.92), rgba(12, 32, 54, 0.92));
            padding: 17px 18px;
            box-shadow: none;
        }
        .command-tile:first-child {
            border-radius: 9px 0 0 9px;
        }
        .command-tile:last-child {
            border-radius: 9px;
            margin-left: 18px;
            border-right: 0;
        }
        .command-tile.danger { border-left-color: var(--c4-red); }
        .command-tile.success { border-left-color: var(--c4-green); }
        .command-tile.warning { border-left-color: var(--c4-orange); }
        .command-tile span {
            color: #b9c9dc;
            font-size: 0.75rem;
            font-weight: 900;
            letter-spacing: 0.2px;
        }
        .command-tile strong {
            display: block;
            margin-top: 7px;
            color: #ffffff;
            font-size: 1.85rem;
            font-weight: 900;
            line-height: 1;
        }
        .clock-tile {
            display: grid;
            align-content: center;
        }
        .clock-tile strong {
            font-size: 1.2rem;
        }
        #mainContent {
            gap: 10px;
            padding: 0 14px 14px;
            background: linear-gradient(180deg, #061322 0%, #071625 100%);
        }
        .operations-panel,
        .history-panel {
            height: 100%;
            border: 1px solid rgba(132, 171, 208, 0.18);
            border-radius: 9px;
            background: linear-gradient(180deg, rgba(8, 27, 46, 0.98), rgba(6, 22, 38, 0.98));
            box-shadow: 0 16px 40px rgba(0,0,0,0.24);
        }
        .operations-panel:not(.open),
        .history-panel:not(.open) {
            border: 0;
            box-shadow: none;
        }
        .operations-panel.open {
            width: clamp(520px, 34vw, 620px);
        }
        .history-panel.open {
            width: clamp(380px, 28vw, 520px);
        }
        .ops-close {
            display: none;
        }
        .ops-header,
        .hp-header {
            min-height: 50px;
            padding: 0 16px;
            background: transparent;
            border-bottom: 0;
        }
        .ops-title,
        .hp-title {
            color: #ffffff;
            font-size: 1rem;
            font-weight: 900;
            letter-spacing: 0.3px;
            text-transform: uppercase;
        }
        .ops-scroll {
            padding: 0 10px 12px;
            gap: 12px;
        }
        .ops-summary {
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 10px;
        }
        .ops-metric {
            min-height: 76px;
            border-radius: 7px;
            border: 1px solid rgba(132, 171, 208, 0.18);
            border-bottom-color: rgba(132, 171, 208, 0.28);
            background: linear-gradient(180deg, rgba(16, 43, 70, 0.88), rgba(10, 33, 55, 0.88));
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
            display: grid;
            align-content: center;
        }
        .ops-metric span {
            color: #b4c4d5;
            font-size: 0.74rem;
            font-weight: 800;
            text-transform: none;
        }
        .ops-metric strong {
            color: #ffffff;
            font-size: 1.8rem;
            margin-top: 3px;
        }
        .ops-tabs {
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 0;
            padding: 0;
            overflow: hidden;
            border-radius: 7px;
            border: 1px solid rgba(132, 171, 208, 0.18);
            background: rgba(13, 35, 58, 0.72);
            position: static;
        }
        .ops-tab {
            min-height: 42px;
            border-radius: 0;
            border-right: 1px solid rgba(132, 171, 208, 0.13);
            background: rgba(15, 38, 62, 0.55);
            color: #d4e0ec;
            font-size: 0.88rem;
            font-weight: 800;
        }
        .ops-tab.active {
            background: linear-gradient(135deg, #0b64b9, #0c7ee8);
            color: #ffffff;
            box-shadow: none;
        }
        .ops-toolbar {
            min-height: 50px;
            padding: 0 6px;
            border-bottom: 0;
        }
        .ops-toolbar h3 {
            color: #ffffff;
            font-size: 0.98rem;
            text-transform: uppercase;
            font-weight: 900;
        }
        .ops-btn {
            min-height: 34px;
            border-radius: 7px;
            background: linear-gradient(135deg, #0b64b9, #0c7ee8);
        }
        .ops-btn.secondary {
            background: rgba(255,255,255,0.07);
            color: #d7e5f2;
            border: 1px solid rgba(132, 171, 208, 0.18);
        }
        .ops-btn.danger {
            background: linear-gradient(135deg, #c92f37, #e84650);
        }
        .ops-list {
            gap: 8px;
        }
        .ops-item,
        .ops-form {
            border-radius: 8px;
            border: 1px solid rgba(132, 171, 208, 0.16);
            background: linear-gradient(180deg, rgba(13, 35, 58, 0.8), rgba(8, 28, 48, 0.8));
            box-shadow: none;
        }
        .ops-item.critical {
            border-color: rgba(255, 77, 87, 0.36);
            border-left-color: var(--c4-red);
            background: linear-gradient(180deg, rgba(68, 24, 31, 0.52), rgba(22, 32, 48, 0.78));
        }
        .ops-row {
            color: #e8f1fb;
            font-size: 0.82rem;
        }
        .ops-name {
            color: #ffffff;
            font-size: 0.9rem;
        }
        .ops-row .muted,
        .ops-status {
            color: #9fb3c7;
        }
        .ops-badge {
            border-radius: 6px;
            font-size: 0.7rem;
            min-height: 22px;
        }
        .ops-form label {
            color: #b9c9dc;
        }
        .ops-form input,
        .ops-form select,
        .ops-form textarea,
        .ops-item textarea,
        .hp-controls select,
        .hp-controls input {
            background: rgba(4, 16, 28, 0.7);
            border-color: rgba(132, 171, 208, 0.19);
            color: #ffffff;
        }
        .ops-empty {
            background: rgba(13, 35, 58, 0.55);
            border-color: rgba(132, 171, 208, 0.18);
            color: #aebfd0;
        }
        #map {
            border-radius: 9px;
            overflow: hidden;
            border: 1px solid rgba(132, 171, 208, 0.18);
            box-shadow: 0 16px 40px rgba(0,0,0,0.28);
        }
        .situation-hud,
        .response-playbook {
            display: none !important;
        }
        .info-container {
            bottom: 30px;
            right: 28px;
        }
        footer {
            display: none;
        }
        .theme-toggle,
        .fab {
            border-radius: 9px;
            background: rgba(7, 21, 36, 0.88);
            color: #ffffff;
            border-color: rgba(132, 171, 208, 0.24);
        }
        .fab {
            background: linear-gradient(135deg, #0b64b9, #0c7ee8);
        }
        @media (max-width: 1320px) {
            .command-strip {
                grid-template-columns: repeat(4, minmax(0, 1fr));
                gap: 8px;
            }
            .command-tile,
            .command-tile:first-child,
            .command-tile:last-child {
                border-radius: 9px;
                margin-left: 0;
                border-right: 0;
            }
            .operations-panel.open {
                width: 500px;
            }
        }
        @media (max-width: 920px) {
            body { padding-left: 0; }
            .side-rail { display: none; }
            .top-menu { display: grid; }
            header { flex-wrap: wrap; padding: 10px 12px; }
            .brand-block { min-width: 0; flex: 1; }
            .header-nav { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; }
            .command-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            #mainContent { padding: 8px; }
            .operations-panel.open,
            .history-panel.open { width: 100%; position: absolute; inset: 8px; z-index: 1500; }
        }

        /* === COMPACT VIEW WITHOUT TOP METRIC STRIP === */
        :root { --rail-width: 52px; }
        body { padding-left: var(--rail-width); }
        .side-rail { width: var(--rail-width); }
        .rail-menu {
            width: 38px;
            height: 38px;
            margin: 12px 0 22px;
        }
        .rail-menu span {
            width: 23px;
            height: 3px;
        }
        .rail-nav { gap: 13px; }
        .rail-bottom { gap: 12px; padding-bottom: 14px; }
        .rail-btn {
            width: 34px;
            height: 34px;
            border-radius: 7px;
            font-size: 0.88rem;
        }
        header {
            min-height: 58px;
            padding: 0 12px;
        }
        .brand-block {
            min-width: 310px;
            gap: 10px;
        }
        .brand-mark {
            width: 46px;
            height: 46px;
            flex-basis: 46px;
        }
        .brand-copy h1 {
            font-size: 1.08rem;
            line-height: 1.05;
        }
        .brand-copy span {
            font-size: 0.78rem;
        }
        .header-nav a {
            min-width: 104px;
            min-height: 40px;
            border-radius: 7px;
            font-size: 0.9rem;
            padding: 6px 10px;
        }
        .header-right { gap: 7px; }
        .ws-status,
        .auth-status,
        .notification-btn,
        .logout-btn {
            min-height: 38px;
            height: 38px;
            font-size: 0.84rem;
        }
        .ws-status,
        .auth-status {
            padding: 0 10px;
        }
        .notification-btn { width: 44px; }
        .notification-btn strong {
            right: 5px;
            top: 4px;
        }
        .command-strip {
            display: none !important;
        }
        #mainContent {
            gap: 8px;
            padding: 8px;
        }
        .operations-panel.open {
            width: clamp(405px, 31vw, 500px);
        }
        .history-panel.open {
            width: clamp(340px, 26vw, 450px);
        }
        .ops-header,
        .hp-header {
            min-height: 38px;
            padding: 0 12px;
        }
        .ops-title,
        .hp-title {
            font-size: 0.88rem;
        }
        .ops-scroll {
            padding: 0 8px 8px;
            gap: 8px;
        }
        .ops-summary {
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 7px;
        }
        .ops-metric {
            min-height: 58px;
            padding: 8px 10px;
            border-radius: 7px;
        }
        .ops-metric span {
            font-size: 0.66rem;
            line-height: 1.1;
        }
        .ops-metric strong {
            font-size: 1.32rem;
            margin-top: 2px;
        }
        .ops-tabs {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }
        .ops-tab {
            min-height: 34px;
            padding: 6px 4px;
            font-size: 0.78rem;
        }
        .ops-toolbar {
            min-height: 38px;
            padding: 0 4px;
        }
        .ops-toolbar h3 {
            font-size: 0.86rem;
        }
        .ops-btn {
            min-height: 30px;
            padding: 6px 9px;
            font-size: 0.72rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
        }
        .ops-btn:disabled {
            opacity: 0.45;
            cursor: not-allowed;
        }
        .ops-list { gap: 6px; }
        .ops-item,
        .ops-form {
            border-radius: 7px;
            padding: 8px;
        }
        .ops-row {
            font-size: 0.74rem;
            gap: 7px;
        }
        .ops-name { font-size: 0.82rem; }
        .ops-badge {
            min-height: 20px;
            padding: 2px 6px;
            font-size: 0.62rem;
        }
        .ops-form {
            gap: 6px;
        }
        .ops-form label {
            gap: 3px;
            font-size: 0.62rem;
        }
        .ops-form input,
        .ops-form select,
        .ops-form textarea,
        .ops-item textarea {
            min-height: 30px;
            padding: 5px 7px;
            font-size: 0.74rem;
            border-radius: 6px;
        }
        .ops-form textarea,
        .ops-item textarea {
            min-height: 46px;
        }
        .ops-grid2,
        .ops-grid3 {
            gap: 6px;
        }
        .ops-empty {
            padding: 14px 8px;
            font-size: 0.74rem;
        }
        .ops-alert-guidance {
            display: grid;
            grid-template-columns: 1fr;
            gap: 5px;
            padding: 8px;
            border: 1px solid rgba(45, 160, 255, 0.22);
            border-radius: 7px;
            background: linear-gradient(180deg, rgba(6, 34, 58, 0.86), rgba(4, 20, 34, 0.86));
            color: #d7e9f8;
            font-size: 0.68rem;
        }
        .ops-alert-guidance strong {
            color: #ffffff;
            font-size: 0.74rem;
            text-transform: uppercase;
        }
        .ops-alert-guidance span {
            color: #a9c0d6;
        }
        .ops-alert-head {
            display: grid;
            grid-template-columns: 38px minmax(0, 1fr) auto;
            gap: 8px;
            align-items: start;
        }
        .ops-alert-icon {
            width: 34px;
            height: 34px;
            border-radius: 8px;
            display: grid;
            place-items: center;
            background: linear-gradient(135deg, #c92f37, #ff5965);
            color: #ffffff;
            font-size: 0.68rem;
            font-weight: 950;
            letter-spacing: 0;
            box-shadow: 0 0 18px rgba(255, 66, 78, 0.28);
        }
        .ops-alert-kind {
            margin-top: 2px;
            color: #ffb3b9;
            font-size: 0.68rem;
            font-weight: 800;
            text-transform: uppercase;
        }
        .ops-alert-summary {
            margin: 7px 0;
            padding: 7px 8px;
            border-radius: 7px;
            background: rgba(255, 255, 255, 0.05);
            color: #f3f8ff;
            font-size: 0.74rem;
            line-height: 1.32;
        }
        .ops-alert-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 6px;
        }
        .ops-alert-field {
            padding: 6px;
            border-radius: 6px;
            background: rgba(4, 16, 28, 0.48);
            border: 1px solid rgba(132, 171, 208, 0.12);
        }
        .ops-alert-field span {
            display: block;
            color: #8fa9c3;
            font-size: 0.6rem;
            text-transform: uppercase;
            font-weight: 900;
        }
        .ops-alert-field strong {
            display: block;
            margin-top: 2px;
            color: #ffffff;
            font-size: 0.72rem;
            line-height: 1.25;
            overflow-wrap: anywhere;
        }
        .ops-alert-flags {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
            margin: 7px 0;
        }
        .ops-chip {
            border-radius: 999px;
            padding: 3px 7px;
            border: 1px solid rgba(132, 171, 208, 0.18);
            background: rgba(255,255,255,0.06);
            color: #cfe1f4;
            font-size: 0.62rem;
            font-weight: 800;
        }
        .ops-chip.danger {
            border-color: rgba(255, 76, 87, 0.42);
            color: #ffb7bd;
            background: rgba(255, 76, 87, 0.12);
        }
        .ops-chip.warn {
            border-color: rgba(255, 180, 54, 0.42);
            color: #ffd38a;
            background: rgba(255, 180, 54, 0.12);
        }
        .ops-chip.info {
            border-color: rgba(43, 154, 255, 0.42);
            color: #bfe0ff;
            background: rgba(43, 154, 255, 0.12);
        }
        #map {
            border-radius: 8px;
        }
        .info-container {
            min-width: 270px;
            right: 18px;
            bottom: 18px;
        }
        .theme-toggle,
        .fab {
            width: 42px;
            height: 42px;
            bottom: 18px;
        }
        .theme-toggle { right: 68px; }
        .fab { right: 18px; }
        .header-nav,
        .ws-status {
            display: none !important;
        }
        .header-ops-summary {
            flex: 1 1 auto;
            display: grid;
            grid-template-columns: repeat(6, minmax(90px, 1fr));
            gap: 6px;
            max-width: 820px;
            margin: 0 14px;
            align-items: stretch;
        }
        .header-ops-summary .ops-metric {
            min-height: 42px;
            padding: 6px 9px;
            border-radius: 7px;
            background: linear-gradient(180deg, rgba(12, 39, 67, 0.92), rgba(8, 29, 51, 0.92));
            border: 1px solid rgba(43, 154, 255, 0.2);
            box-shadow: none;
        }
        .header-ops-summary .ops-metric span {
            font-size: 0.56rem;
            letter-spacing: 0;
            white-space: nowrap;
        }
        .header-ops-summary .ops-metric strong {
            font-size: 1rem;
            line-height: 1.05;
            margin-top: 1px;
            white-space: nowrap;
        }
        .side-rail {
            overflow: hidden;
            transition: width 0.22s ease, box-shadow 0.22s ease;
            align-items: stretch;
        }
        .side-rail:hover,
        body.rail-expanded .side-rail {
            width: 188px;
            box-shadow: 16px 0 34px rgba(0,0,0,0.34);
        }
        .rail-menu {
            align-self: center;
            flex: 0 0 auto;
            margin: 12px 0 12px;
        }
        .rail-nav {
            flex: 1 1 auto;
            display: flex;
            flex-direction: column;
            gap: 5px;
            padding: 0 7px 8px;
            overflow-y: auto;
            overflow-x: hidden;
            justify-items: stretch;
            align-items: stretch;
        }
        .rail-nav::-webkit-scrollbar {
            width: 4px;
        }
        .rail-nav::-webkit-scrollbar-thumb {
            background: rgba(130, 176, 219, 0.28);
            border-radius: 99px;
        }
        .rail-bottom {
            flex: 0 0 auto;
            gap: 6px;
            padding: 7px;
            justify-items: stretch;
        }
        .rail-btn {
            width: 100%;
            height: 38px;
            min-height: 38px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            padding: 0;
            border-radius: 9px;
            font-size: 0.78rem;
            line-height: 1;
        }
        .rail-icon {
            flex: 0 0 28px;
            width: 28px;
            display: grid;
            place-items: center;
            font-size: 0.95rem;
            font-weight: 900;
        }
        .rail-label {
            min-width: 0;
            width: 0;
            opacity: 0;
            overflow: hidden;
            white-space: nowrap;
            color: inherit;
            font-size: 0.74rem;
            font-weight: 850;
            text-transform: uppercase;
            letter-spacing: 0;
            transition: opacity 0.16s ease, width 0.16s ease;
        }
        .side-rail:hover .rail-btn,
        body.rail-expanded .rail-btn {
            justify-content: flex-start;
            padding: 0 10px;
        }
        .side-rail:hover .rail-label,
        body.rail-expanded .rail-label {
            width: auto;
            opacity: 1;
        }
        .ops-tabs {
            display: none !important;
        }
        .info-container,
        .alert-panel {
            display: none !important;
            visibility: hidden !important;
            pointer-events: none !important;
        }

        /* === DISENO NUEVO SOLO PARA METRICAS SUPERIORES === */
        .header-ops-summary {
            position: relative;
            isolation: isolate;
            flex: 1 1 auto;
            max-width: 900px;
            margin: 0 auto;
            padding: 6px;
            display: grid;
            grid-template-columns: repeat(6, minmax(104px, 1fr));
            gap: 8px;
            align-items: stretch;
            border-radius: 15px;
            background:
                linear-gradient(90deg, rgba(20, 91, 154, 0.08), rgba(18, 219, 255, 0.08), rgba(20, 91, 154, 0.08)),
                rgba(3, 14, 27, 0.28);
            border: 1px solid rgba(69, 160, 255, 0.14);
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 10px 26px rgba(0,0,0,0.16);
        }
        .header-ops-summary::before {
            content: "";
            position: absolute;
            inset: -1px;
            z-index: -1;
            border-radius: inherit;
            background: linear-gradient(90deg, transparent, rgba(35, 178, 255, 0.24), transparent);
            opacity: 0.55;
        }
        .header-ops-summary .ops-metric {
            position: relative;
            min-height: 44px;
            padding: 8px 9px 7px 10px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            overflow: hidden;
            border-radius: 10px;
            border: 1px solid rgba(255,255,255,0.12);
            background: linear-gradient(145deg, rgba(9, 35, 64, 0.96), rgba(5, 18, 34, 0.96));
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 20px rgba(0,0,0,0.2);
        }
        .header-ops-summary .ops-metric::before {
            content: "";
            position: absolute;
            inset: 0 auto 0 0;
            width: 3px;
            background: currentColor;
            box-shadow: 0 0 16px currentColor;
        }
        .metric-glow {
            position: absolute;
            right: -18px;
            top: -22px;
            width: 64px;
            height: 64px;
            border-radius: 50%;
            background: currentColor;
            opacity: 0.16;
            filter: blur(9px);
            pointer-events: none;
        }
        .metric-copy {
            position: relative;
            z-index: 1;
            display: grid;
            gap: 1px;
            min-width: 0;
        }
        .header-ops-summary .ops-metric span {
            color: rgba(236, 246, 255, 0.82);
            font-size: 0.56rem;
            font-weight: 950;
            line-height: 1;
            letter-spacing: 0;
            text-transform: uppercase;
            white-space: nowrap;
        }
        .header-ops-summary .ops-metric strong {
            color: #ffffff;
            font-size: 1.18rem;
            font-weight: 950;
            line-height: 1.02;
            margin: 1px 0 0;
            letter-spacing: 0;
            white-space: nowrap;
            text-shadow: 0 0 12px rgba(255,255,255,0.14);
        }
        .header-ops-summary .ops-metric em {
            display: block;
            color: rgba(203, 220, 238, 0.72);
            font-size: 0.52rem;
            font-style: normal;
            line-height: 1;
            white-space: nowrap;
        }
        .metric-symbol {
            position: relative;
            z-index: 1;
            flex: 0 0 30px;
            width: 30px;
            height: 30px;
            display: grid;
            place-items: center;
            border-radius: 10px;
            color: currentColor;
            background: rgba(0,0,0,0.18);
            border: 1px solid rgba(255,255,255,0.13);
            filter: drop-shadow(0 0 10px currentColor);
        }
        .metric-icon {
            width: 18px;
            height: 18px;
        }
        .metric-devices { color: #3aa7ff; }
        .metric-sos { color: #ff4d6d; }
        .metric-online { color: #33e27f; }
        .metric-battery { color: #ffb23f; }
        .metric-incidents { color: #ff6666; }
        .metric-units { color: #b875ff; }
        .header-ops-summary .ops-metric:hover {
            transform: translateY(-1px);
            border-color: rgba(255,255,255,0.22);
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 12px 24px rgba(0,0,0,0.28), 0 0 22px color-mix(in srgb, currentColor 20%, transparent);
        }

        /* === MENU LATERAL OPERATIVO === */
        .side-rail {
            background:
                radial-gradient(circle at 42px 30px, rgba(26, 153, 255, 0.22), transparent 38px),
                linear-gradient(180deg, rgba(7, 22, 38, 0.98), rgba(2, 11, 21, 0.99)) !important;
            border-right: 1px solid rgba(87, 157, 221, 0.22);
            box-shadow: 12px 0 34px rgba(0, 0, 0, 0.32), inset -1px 0 0 rgba(255,255,255,0.03);
        }
        .side-rail::after {
            content: "";
            position: absolute;
            inset: 82px 8px auto 8px;
            height: 1px;
            background: linear-gradient(90deg, transparent, rgba(60, 176, 255, 0.45), transparent);
            pointer-events: none;
        }
        .rail-menu {
            width: 44px;
            height: 44px;
            border-radius: 12px;
            background: rgba(14, 43, 70, 0.72);
            border: 1px solid rgba(94, 171, 241, 0.2);
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
        }
        .rail-menu span {
            width: 23px;
            height: 3px;
            background: linear-gradient(90deg, #cfe7ff, #7cc9ff);
            box-shadow: 0 0 10px rgba(80, 180, 255, 0.35);
        }
        .rail-nav {
            gap: 8px;
            padding: 0 7px 8px;
        }
        .rail-btn {
            position: relative;
            min-height: 42px;
            overflow: hidden;
            border-radius: 11px;
            border: 1px solid transparent;
            color: #c8d7e7;
            background: transparent;
            transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
        }
        .rail-btn::before {
            content: "";
            position: absolute;
            left: 0;
            top: 9px;
            bottom: 9px;
            width: 3px;
            border-radius: 99px;
            background: #18a8ff;
            opacity: 0;
            box-shadow: 0 0 16px rgba(24, 168, 255, 0.75);
            transition: opacity 0.18s ease;
        }
        .rail-btn::after {
            content: "";
            position: absolute;
            inset: 0;
            background: linear-gradient(90deg, rgba(22, 130, 221, 0.2), transparent 68%);
            opacity: 0;
            transition: opacity 0.18s ease;
        }
        .rail-btn:hover,
        .rail-btn.active {
            color: #ffffff;
            border-color: rgba(79, 171, 255, 0.28);
            background: rgba(11, 42, 72, 0.82);
            transform: translateX(2px);
            box-shadow: 0 10px 22px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.06);
        }
        .rail-btn:hover::before,
        .rail-btn.active::before,
        .rail-btn:hover::after,
        .rail-btn.active::after {
            opacity: 1;
        }
        .rail-btn.active {
            background: linear-gradient(135deg, rgba(8, 96, 206, 0.94), rgba(13, 145, 232, 0.9));
            border-color: rgba(128, 205, 255, 0.46);
            box-shadow: 0 12px 26px rgba(7, 122, 223, 0.33), inset 0 1px 0 rgba(255,255,255,0.14);
        }
        .rail-icon {
            position: relative;
            z-index: 1;
            flex-basis: 30px;
            width: 30px;
            height: 30px;
            border-radius: 9px;
            background: rgba(255,255,255,0.045);
            border: 1px solid rgba(255,255,255,0.08);
            color: inherit;
            text-shadow: 0 0 12px rgba(115, 202, 255, 0.35);
        }
        .rail-btn.active .rail-icon {
            background: rgba(255,255,255,0.14);
            border-color: rgba(255,255,255,0.22);
        }
        .rail-label {
            position: relative;
            z-index: 1;
            font-size: 0.75rem;
            font-weight: 950;
            letter-spacing: 0;
        }
        .rail-bottom {
            border-top: 1px solid rgba(87, 157, 221, 0.12);
            padding-top: 10px;
        }

        /* === TARJETA INFORMATIVA DERECHA === */
        :root {
            --victim-dock-width: 392px;
        }
        #mainContent {
            padding-right: calc(var(--victim-dock-width) + 8px) !important;
        }
        .victim-dock {
            position: fixed;
            top: 86px;
            right: 8px;
            bottom: 8px;
            width: var(--victim-dock-width);
            z-index: 1250;
            display: flex;
            flex-direction: column;
            gap: 10px;
            padding: 12px;
            border-radius: 0 0 10px 10px;
            border: 1px solid rgba(50, 160, 255, 0.22);
            background:
                radial-gradient(circle at 20% 0%, rgba(0, 206, 255, 0.15), transparent 34%),
                radial-gradient(circle at 95% 20%, rgba(42, 117, 255, 0.14), transparent 28%),
                linear-gradient(180deg, rgba(3, 24, 42, 0.98), rgba(2, 15, 29, 0.98));
            box-shadow: -14px 0 38px rgba(0,0,0,0.38), inset 0 1px 0 rgba(255,255,255,0.06);
            color: #eef7ff;
        }
        .victim-searchbar {
            min-height: 46px;
            display: grid;
            grid-template-columns: 34px 1fr 40px;
            align-items: center;
            gap: 8px;
            padding: 0 7px 0 10px;
            border-radius: 13px;
            border: 1px solid rgba(94, 173, 242, 0.22);
            background: rgba(0, 11, 23, 0.62);
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
        }
        .victim-search-icon,
        .victim-filter-btn {
            width: 34px;
            height: 34px;
            display: grid;
            place-items: center;
            color: #d7ebff;
        }
        .victim-search-icon svg,
        .victim-filter-btn svg {
            width: 20px;
            height: 20px;
            fill: none;
            stroke: currentColor;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
        }
        .victim-searchbar input {
            width: 100%;
            min-width: 0;
            border: 0;
            outline: 0;
            background: transparent;
            color: #ffffff;
            font-size: 0.78rem;
        }
        .victim-searchbar input::placeholder {
            color: rgba(195, 216, 237, 0.66);
        }
        .victim-filter-btn {
            border: 1px solid rgba(117, 189, 255, 0.22);
            border-radius: 10px;
            background: rgba(28, 64, 100, 0.42);
            cursor: pointer;
        }
        .victim-filter-btn:hover {
            color: #ffffff;
            border-color: rgba(117, 189, 255, 0.42);
            background: rgba(30, 112, 188, 0.48);
        }
        .victim-count {
            color: rgba(207, 226, 244, 0.74);
            font-size: 0.66rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0;
            padding: 0 4px;
        }
        .victim-list {
            flex: 1 1 auto;
            min-height: 0;
            display: flex;
            flex-direction: column;
            gap: 10px;
            overflow-y: auto;
            overflow-x: hidden;
            padding-right: 2px;
        }
        .victim-list::-webkit-scrollbar {
            width: 5px;
        }
        .victim-list::-webkit-scrollbar-thumb {
            background: rgba(72, 162, 242, 0.34);
            border-radius: 99px;
        }
        .victim-card {
            position: relative;
            overflow: hidden;
            border: 1px solid rgba(64, 160, 255, 0.2);
            border-radius: 13px;
            background:
                linear-gradient(135deg, rgba(0, 82, 131, 0.38), rgba(1, 31, 55, 0.96) 48%, rgba(4, 21, 40, 0.98));
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 12px 26px rgba(0,0,0,0.26);
        }
        .victim-card.alert {
            border-color: rgba(255, 70, 91, 0.48);
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 0 0 1px rgba(255, 70, 91, 0.12), 0 12px 26px rgba(0,0,0,0.28);
        }
        .victim-card::before {
            content: "";
            position: absolute;
            inset: 0;
            background: radial-gradient(circle at 18% 8%, rgba(0, 204, 255, 0.14), transparent 34%);
            pointer-events: none;
        }
        .victim-card-main {
            position: relative;
            z-index: 1;
            display: grid;
            grid-template-columns: 72px 1fr 88px;
            gap: 12px;
            padding: 12px;
            align-items: stretch;
        }
        .victim-avatar {
            width: 72px;
            height: 86px;
            border-radius: 12px;
            overflow: hidden;
            display: grid;
            place-items: center;
            color: #ffffff;
            font-size: 1.05rem;
            font-weight: 950;
            background:
                radial-gradient(circle at 50% 30%, #f0c5a8 0 18%, transparent 19%),
                radial-gradient(circle at 50% 70%, #28374d 0 35%, transparent 36%),
                linear-gradient(160deg, #2c4264, #0b1d32);
            border: 1px solid rgba(255,255,255,0.14);
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.11), 0 10px 20px rgba(0,0,0,0.22);
        }
        .victim-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        .victim-person {
            min-width: 0;
            display: flex;
            flex-direction: column;
            justify-content: center;
            gap: 8px;
        }
        .victim-name {
            color: #ffffff;
            font-size: 0.94rem;
            line-height: 1.12;
            font-weight: 950;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .victim-meta {
            display: grid;
            gap: 6px;
            color: #c7d8ea;
            font-size: 0.72rem;
        }
        .victim-meta-row {
            display: flex;
            align-items: center;
            gap: 7px;
            min-width: 0;
        }
        .victim-mini-icon {
            width: 16px;
            height: 16px;
            display: grid;
            place-items: center;
            color: #8dbdff;
            flex: 0 0 auto;
        }
        .victim-mini-icon svg {
            width: 14px;
            height: 14px;
            fill: none;
            stroke: currentColor;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
        }
        .victim-device-box {
            min-width: 0;
            padding: 8px 8px 38px;
            border-radius: 10px;
            border: 1px solid rgba(79, 155, 239, 0.22);
            background: rgba(9, 26, 48, 0.76);
            display: grid;
            gap: 4px;
            align-content: start;
        }
        .victim-device-title {
            color: #cfe5ff;
            font-size: 0.61rem;
            font-weight: 950;
            text-transform: uppercase;
        }
        .victim-device-line {
            color: #d9e9f8;
            font-size: 0.58rem;
            line-height: 1.25;
            word-break: break-word;
        }
        .victim-device-line span {
            color: #8faac5;
        }
        .victim-online-pill {
            width: fit-content;
            margin-top: 2px;
            padding: 2px 6px;
            border-radius: 6px;
            background: rgba(44, 213, 115, 0.18);
            color: #72f59e;
            font-size: 0.55rem;
            font-weight: 950;
            text-transform: uppercase;
        }
        .victim-online-pill.offline {
            background: rgba(132, 151, 170, 0.16);
            color: #bcc9d6;
        }
        .victim-toggle {
            position: absolute;
            right: 13px;
            bottom: 10px;
            z-index: 2;
            width: 50px;
            height: 34px;
            display: grid;
            place-items: center;
            border-radius: 10px;
            border: 1px solid rgba(111, 177, 255, 0.26);
            background: rgba(20, 44, 79, 0.78);
            color: #ffffff;
            cursor: pointer;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
        }
        .victim-toggle svg {
            width: 20px;
            height: 20px;
            fill: none;
            stroke: currentColor;
            stroke-width: 2.5;
            stroke-linecap: round;
            stroke-linejoin: round;
            transition: transform 0.18s ease;
        }
        .victim-card.expanded .victim-toggle svg {
            transform: rotate(180deg);
        }
        .victim-details {
            position: relative;
            z-index: 1;
            display: none;
            padding: 0 12px 12px;
            gap: 10px;
        }
        .victim-card.expanded .victim-details {
            display: grid;
        }
        .victim-section {
            border: 1px solid rgba(79, 155, 239, 0.18);
            border-radius: 11px;
            background: rgba(3, 18, 34, 0.66);
            padding: 10px;
        }
        .victim-section-title {
            display: flex;
            align-items: center;
            gap: 7px;
            color: #f4f8ff;
            font-size: 0.68rem;
            font-weight: 950;
            text-transform: uppercase;
            margin-bottom: 8px;
        }
        .victim-status-grid {
            display: grid;
            grid-template-columns: repeat(5, minmax(0, 1fr));
            gap: 7px;
        }
        .victim-status-tile {
            min-height: 72px;
            padding: 7px 5px;
            border-radius: 10px;
            display: grid;
            place-items: center;
            text-align: center;
            gap: 4px;
            border: 1px solid rgba(255,255,255,0.1);
            background: linear-gradient(145deg, rgba(14, 101, 42, 0.72), rgba(7, 46, 34, 0.82));
            color: #ffffff;
            font-size: 0.58rem;
            line-height: 1.15;
        }
        .victim-status-tile.warn {
            background: linear-gradient(145deg, rgba(124, 72, 4, 0.82), rgba(68, 38, 4, 0.84));
        }
        .victim-status-tile.danger {
            background: linear-gradient(145deg, rgba(131, 22, 34, 0.84), rgba(70, 12, 24, 0.86));
        }
        .victim-status-tile.neutral {
            background: linear-gradient(145deg, rgba(21, 69, 122, 0.78), rgba(8, 36, 72, 0.86));
        }
        .victim-status-tile strong {
            font-size: 0.66rem;
        }
        .victim-location-grid {
            display: grid;
            grid-template-columns: 1fr 130px;
            gap: 10px;
            align-items: stretch;
        }
        .victim-location-text {
            display: grid;
            gap: 7px;
            color: #cad9e9;
            font-size: 0.68rem;
            line-height: 1.35;
        }
        .victim-mini-map {
            min-height: 116px;
            border-radius: 11px;
            border: 1px solid rgba(67, 165, 255, 0.28);
            overflow: hidden;
            position: relative;
            background:
                linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px),
                linear-gradient(0deg, rgba(255,255,255,0.08) 1px, transparent 1px),
                radial-gradient(circle at 58% 44%, rgba(49, 234, 111, 0.28), transparent 14%),
                #0d2037;
            background-size: 28px 28px, 28px 28px, auto, auto;
        }
        .victim-mini-map::after {
            content: "";
            position: absolute;
            left: 56%;
            top: 42%;
            width: 22px;
            height: 22px;
            transform: translate(-50%, -50%) rotate(-45deg);
            border-radius: 50% 50% 50% 0;
            background: #5cff79;
            box-shadow: 0 0 18px rgba(92, 255, 121, 0.85);
        }
        .victim-mini-map::before {
            content: "";
            position: absolute;
            left: 56%;
            top: 42%;
            width: 8px;
            height: 8px;
            z-index: 1;
            transform: translate(-50%, -50%);
            border-radius: 50%;
            background: #062017;
        }
        .victim-actions-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 8px;
        }
        .victim-action {
            min-height: 58px;
            border: 1px solid rgba(255,255,255,0.14);
            border-radius: 10px;
            display: grid;
            place-items: center;
            gap: 4px;
            text-align: center;
            color: #ffffff;
            text-decoration: none;
            font-size: 0.62rem;
            font-weight: 850;
            background: linear-gradient(135deg, rgba(11, 111, 42, 0.92), rgba(5, 70, 34, 0.92));
            cursor: pointer;
        }
        .victim-action.blue { background: linear-gradient(135deg, rgba(9, 92, 214, 0.94), rgba(4, 62, 148, 0.94)); }
        .victim-action.purple { background: linear-gradient(135deg, rgba(109, 48, 190, 0.94), rgba(67, 34, 139, 0.94)); }
        .victim-action.orange { background: linear-gradient(135deg, rgba(219, 104, 9, 0.96), rgba(137, 55, 5, 0.96)); }
        .victim-action.teal { background: linear-gradient(135deg, rgba(0, 136, 158, 0.94), rgba(0, 82, 105, 0.94)); }
        .victim-action.red { background: linear-gradient(135deg, rgba(199, 47, 61, 0.95), rgba(121, 25, 39, 0.95)); }
        .victim-contact-list {
            display: grid;
            gap: 7px;
        }
        .victim-contact-row {
            min-height: 34px;
            display: grid;
            grid-template-columns: 22px 1fr auto 28px;
            align-items: center;
            gap: 8px;
            padding: 5px 7px;
            border-radius: 9px;
            background: rgba(7, 30, 52, 0.78);
            border: 1px solid rgba(255,255,255,0.08);
            color: #dcecff;
            font-size: 0.64rem;
        }
        .victim-contact-icon,
        .victim-call-dot {
            width: 22px;
            height: 22px;
            display: grid;
            place-items: center;
            border-radius: 50%;
            background: rgba(35, 190, 215, 0.22);
            color: #9af5ff;
            text-decoration: none;
            font-weight: 950;
        }
        .victim-call-dot {
            background: rgba(45, 213, 115, 0.24);
            color: #82ffad;
        }
        .victim-empty {
            padding: 28px 14px;
            border-radius: 12px;
            border: 1px dashed rgba(100, 177, 245, 0.28);
            color: #a9bfd4;
            text-align: center;
            font-size: 0.78rem;
            background: rgba(4, 20, 36, 0.62);
        }
        @media (max-width: 1360px) {
            :root { --victim-dock-width: 350px; }
            .victim-card-main {
                grid-template-columns: 62px 1fr;
            }
            .victim-avatar {
                width: 62px;
                height: 74px;
            }
            .victim-device-box {
                grid-column: 1 / -1;
            }
            .victim-status-grid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }
            .victim-location-grid {
                grid-template-columns: 1fr;
            }
        }
        @media (max-width: 980px) {
            #mainContent {
                padding-right: 0 !important;
            }
            .victim-dock {
                left: calc(var(--rail-width) + 8px);
                width: auto;
                top: auto;
                max-height: 52vh;
            }
        }
        @media (max-width: 1400px) {
            .header-ops-summary {
                max-width: 820px;
                grid-template-columns: repeat(6, minmax(96px, 1fr));
                gap: 6px;
            }
            .header-ops-summary .ops-metric {
                padding-right: 7px;
            }
            .metric-symbol {
                flex-basis: 26px;
                width: 26px;
                height: 26px;
            }
            .metric-icon {
                width: 16px;
                height: 16px;
            }
        }
        @media (max-width: 1180px) {
            .operations-panel.open {
                width: 390px;
            }
            .brand-block { min-width: 260px; }
            .header-nav a { min-width: 92px; }
            .header-ops-summary {
                grid-template-columns: repeat(3, minmax(92px, 1fr));
                max-width: 500px;
            }
        }
        @media (max-width: 920px) {
            body { padding-left: var(--rail-width); }
            .side-rail { display: flex; }
            #mainContent { padding: 6px; }
            header { flex-wrap: wrap; height: auto; min-height: 66px; }
            .header-ops-summary {
                order: 3;
                width: 100%;
                max-width: none;
                margin: 6px 0 0;
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
            .operations-panel.open,
            .history-panel.open {
                inset: 6px;
                width: auto;
            }
        }

/* === TARJETA INFORMATIVA C4 - DISENO OPERATIVO === */
:root {
    --victim-dock-width: 422px;
}

#mainContent {
    padding-right: calc(var(--victim-dock-width) + 12px) !important;
}

.victim-dock {
    top: 88px;
    right: 6px;
    bottom: 8px;
    width: var(--victim-dock-width);
    padding: 10px;
    gap: 8px;
    border-radius: 0 0 8px 8px;
    border: 1px solid rgba(0, 176, 255, 0.32);
    background:
        radial-gradient(circle at 8% 4%, rgba(0, 204, 255, 0.16), transparent 28%),
        radial-gradient(circle at 96% 20%, rgba(38, 230, 255, 0.12), transparent 30%),
        linear-gradient(180deg, rgba(1, 25, 42, 0.98), rgba(2, 17, 31, 0.99) 54%, rgba(0, 12, 23, 0.99));
    box-shadow:
        -10px 0 28px rgba(0, 0, 0, 0.44),
        inset 0 0 0 1px rgba(255, 255, 255, 0.035),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 28px rgba(0, 190, 255, 0.1);
}

.victim-dock::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(0, 221, 255, 0.28), transparent 18%, transparent 82%, rgba(0, 145, 255, 0.24)),
        linear-gradient(180deg, rgba(255,255,255,0.05), transparent 12%);
    opacity: 0.7;
}

.victim-searchbar {
    position: relative;
    z-index: 1;
    min-height: 42px;
    grid-template-columns: 28px 1fr 38px;
    gap: 7px;
    padding: 0 6px 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(106, 178, 255, 0.28);
    background: rgba(0, 11, 23, 0.62);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.06),
        0 8px 18px rgba(0, 0, 0, 0.18);
}

.victim-searchbar input {
    font-size: 0.74rem;
    color: #eaf6ff;
}

.victim-searchbar input::placeholder {
    color: rgba(198, 218, 238, 0.68);
}

.victim-search-icon,
.victim-filter-btn {
    width: 32px;
    height: 32px;
}

.victim-filter-btn {
    border-radius: 9px;
    background: linear-gradient(180deg, rgba(31, 59, 99, 0.86), rgba(11, 28, 55, 0.92));
    border-color: rgba(105, 166, 246, 0.32);
}

.victim-filter-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(180deg, rgba(41, 87, 139, 0.9), rgba(14, 45, 83, 0.96));
}

.victim-count {
    display: none;
}

.victim-list {
    position: relative;
    z-index: 1;
    gap: 8px;
    padding-right: 0;
}

.victim-list::-webkit-scrollbar {
    width: 4px;
}

.victim-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(41, 202, 255, 0.6), rgba(34, 96, 166, 0.46));
}

.victim-card {
    border-radius: 8px;
    border: 1px solid rgba(0, 179, 255, 0.23);
    background:
        radial-gradient(circle at 8% 12%, rgba(0, 198, 255, 0.14), transparent 34%),
        linear-gradient(135deg, rgba(0, 62, 92, 0.84), rgba(1, 28, 48, 0.96) 47%, rgba(2, 17, 33, 0.99));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.06),
        inset 0 -1px 0 rgba(0, 171, 255, 0.08),
        0 14px 24px rgba(0, 0, 0, 0.22);
}

.victim-card.alert {
    border-color: rgba(255, 66, 88, 0.62);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.07),
        0 0 0 1px rgba(255, 66, 88, 0.14),
        0 0 22px rgba(255, 40, 80, 0.16),
        0 14px 24px rgba(0,0,0,0.24);
}

.victim-card::before {
    background:
        linear-gradient(90deg, rgba(0, 220, 255, 0.08), transparent 42%),
        radial-gradient(circle at 16% 8%, rgba(0, 217, 255, 0.16), transparent 30%);
}

.victim-card-main {
    grid-template-columns: 78px minmax(0, 1fr) 124px;
    gap: 10px;
    min-height: 146px;
    padding: 12px 10px;
    align-items: stretch;
}

.victim-avatar {
    width: 76px;
    height: 92px;
    border-radius: 8px;
    align-self: start;
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.14),
        0 10px 20px rgba(0,0,0,0.28);
}

.victim-person {
    justify-content: flex-start;
    padding-top: 13px;
    gap: 12px;
}

.victim-name {
    font-size: 0.95rem;
    line-height: 1.16;
    font-weight: 950;
    white-space: normal;
}

.victim-meta {
    gap: 9px;
    font-size: 0.74rem;
    color: #d7e6f8;
}

.victim-meta-row {
    gap: 8px;
}

.victim-mini-icon {
    width: 15px;
    height: 15px;
    color: #95c7ff;
}

.victim-mini-icon svg {
    width: 14px;
    height: 14px;
}

.victim-device-box {
    min-height: 124px;
    padding: 9px 8px;
    border-radius: 8px;
    border: 1px solid rgba(88, 147, 235, 0.32);
    background: rgba(7, 25, 49, 0.62);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.05),
        inset 0 0 18px rgba(0, 127, 255, 0.06);
}

.victim-device-title {
    margin-bottom: 3px;
    color: #e7f3ff;
    font-size: 0.66rem;
}

.victim-device-line {
    color: #d2e3f6;
    font-size: 0.6rem;
    line-height: 1.35;
    word-break: break-word;
}

.victim-device-line span,
.victim-b2b-line span {
    color: #93aeca;
}

.victim-b2b-line {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
    font-size: 0.6rem;
}

.victim-online-pill {
    margin: 0;
    padding: 2px 7px;
    border-radius: 5px;
    background: linear-gradient(180deg, rgba(55, 222, 103, 0.9), rgba(24, 140, 55, 0.92));
    color: #ffffff;
    font-size: 0.55rem;
    line-height: 1.15;
    box-shadow: 0 0 12px rgba(53, 233, 104, 0.3);
}

.victim-online-pill.offline {
    background: linear-gradient(180deg, rgba(116, 129, 148, 0.72), rgba(68, 80, 96, 0.82));
    color: #e4edf7;
    box-shadow: none;
}

.victim-toggle {
    right: 140px;
    bottom: 12px;
    width: 48px;
    height: 38px;
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(23, 49, 86, 0.88), rgba(9, 28, 57, 0.96));
    border-color: rgba(102, 163, 246, 0.36);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        0 8px 16px rgba(0,0,0,0.24);
}

.victim-toggle:hover {
    border-color: rgba(0, 191, 255, 0.68);
    background: linear-gradient(180deg, rgba(31, 76, 124, 0.92), rgba(11, 40, 82, 0.98));
}

.victim-details {
    padding: 0 10px 10px;
    gap: 8px;
}

.victim-section {
    border-radius: 8px;
    border: 1px solid rgba(0, 173, 255, 0.2);
    background:
        radial-gradient(circle at 4% 0%, rgba(24, 202, 255, 0.08), transparent 36%),
        rgba(2, 21, 37, 0.78);
    padding: 8px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.045);
}

.victim-section-title {
    gap: 6px;
    margin-bottom: 8px;
    font-size: 0.68rem;
    letter-spacing: 0;
    color: #f4f8ff;
}

.victim-status-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.victim-status-tile {
    min-height: 86px;
    padding: 8px 5px 7px;
    border-radius: 7px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 1px solid rgba(81, 255, 125, 0.18);
    background:
        radial-gradient(circle at 50% 12%, rgba(104, 255, 119, 0.28), transparent 46%),
        linear-gradient(145deg, rgba(20, 117, 40, 0.9), rgba(5, 57, 37, 0.96));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        0 0 16px rgba(52, 225, 97, 0.12);
}

.victim-status-tile.warn {
    border-color: rgba(255, 193, 56, 0.24);
    background:
        radial-gradient(circle at 50% 12%, rgba(255, 214, 73, 0.25), transparent 46%),
        linear-gradient(145deg, rgba(139, 94, 9, 0.92), rgba(75, 49, 5, 0.96));
    box-shadow: 0 0 16px rgba(255, 184, 41, 0.12);
}

.victim-status-tile.danger {
    border-color: rgba(255, 89, 109, 0.3);
    background:
        radial-gradient(circle at 50% 12%, rgba(255, 92, 119, 0.25), transparent 46%),
        linear-gradient(145deg, rgba(139, 28, 43, 0.94), rgba(72, 13, 28, 0.97));
    box-shadow: 0 0 16px rgba(255, 50, 82, 0.14);
}

.victim-status-tile.neutral {
    border-color: rgba(32, 143, 255, 0.28);
    background:
        radial-gradient(circle at 50% 12%, rgba(37, 152, 255, 0.3), transparent 46%),
        linear-gradient(145deg, rgba(14, 84, 154, 0.93), rgba(7, 42, 90, 0.98));
    box-shadow: 0 0 16px rgba(32, 143, 255, 0.14);
}

.victim-status-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #dcffdf;
    background: rgba(255,255,255,0.09);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.12),
        0 0 18px rgba(104, 255, 119, 0.32);
}

.victim-status-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.victim-status-tile.neutral .victim-status-icon {
    color: #85c6ff;
    box-shadow: 0 0 18px rgba(33, 149, 255, 0.32);
}

.victim-status-tile.warn .victim-status-icon {
    color: #ffdf72;
    box-shadow: 0 0 18px rgba(255, 188, 43, 0.28);
}

.victim-status-tile.danger .victim-status-icon {
    color: #ffd7dc;
    box-shadow: 0 0 18px rgba(255, 68, 98, 0.3);
}

.victim-status-tile span {
    color: #e8f3ff;
    font-size: 0.56rem;
    line-height: 1.1;
}

.victim-status-tile strong {
    max-width: 100%;
    color: #ffffff;
    font-size: 0.58rem;
    line-height: 1.1;
    white-space: normal;
}

.victim-location-grid {
    grid-template-columns: 1fr 132px;
    gap: 10px;
}

.victim-location-text {
    gap: 7px;
    font-size: 0.64rem;
    line-height: 1.38;
    color: #d5e4f5;
}

.victim-location-actions {
    display: grid;
    gap: 7px;
    margin-top: 3px;
}

.victim-location-btn {
    width: 100%;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(55, 162, 255, 0.38);
    border-radius: 7px;
    color: #dcefff;
    background: linear-gradient(180deg, rgba(0, 99, 186, 0.82), rgba(3, 55, 121, 0.9));
    font-size: 0.66rem;
    font-weight: 800;
    cursor: pointer;
}

.victim-location-btn.secondary {
    border-color: rgba(136, 166, 203, 0.2);
    background: rgba(20, 42, 73, 0.74);
}

.victim-location-btn:hover {
    border-color: rgba(0, 209, 255, 0.72);
    filter: brightness(1.08);
}

.victim-location-btn .victim-action-icon {
    width: 17px;
    height: 17px;
    margin-bottom: 0;
}

.victim-mini-map {
    min-height: 126px;
    border-radius: 8px;
    border: 1px solid rgba(41, 147, 255, 0.42);
    background:
        linear-gradient(117deg, transparent 0 46%, rgba(116, 145, 170, 0.34) 47% 48%, transparent 49%),
        linear-gradient(76deg, transparent 0 35%, rgba(116, 145, 170, 0.32) 36% 38%, transparent 39%),
        linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255,255,255,0.08) 1px, transparent 1px),
        radial-gradient(circle at 58% 44%, rgba(75, 255, 107, 0.24), transparent 16%),
        #122538;
    background-size: auto, auto, 28px 28px, 28px 28px, auto, auto;
    box-shadow: inset 0 0 24px rgba(0,0,0,0.28);
}

.victim-mini-map::after {
    width: 26px;
    height: 26px;
    background: #5cff72;
    box-shadow: 0 0 22px rgba(92, 255, 114, 0.86);
}

.victim-mini-map::before {
    width: 9px;
    height: 9px;
    background: #083120;
}

.victim-actions-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.victim-action {
    min-height: 70px;
    padding: 8px 4px 7px;
    border-radius: 7px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid rgba(255,255,255,0.14);
    background:
        radial-gradient(circle at 50% 8%, rgba(109, 255, 139, 0.22), transparent 42%),
        linear-gradient(145deg, rgba(16, 157, 59, 0.96), rgba(4, 93, 43, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.12),
        0 10px 18px rgba(0,0,0,0.2);
    font-size: 0.58rem;
    line-height: 1.08;
    font-weight: 850;
}

.victim-action:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.victim-action:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.victim-action-icon {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    margin-bottom: 1px;
}

.victim-action-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.victim-action span {
    display: block;
}

.victim-action.blue {
    background:
        radial-gradient(circle at 50% 8%, rgba(95, 180, 255, 0.26), transparent 42%),
        linear-gradient(145deg, rgba(12, 105, 219, 0.96), rgba(4, 65, 164, 0.98));
}

.victim-action.purple {
    background:
        radial-gradient(circle at 50% 8%, rgba(188, 105, 255, 0.28), transparent 42%),
        linear-gradient(145deg, rgba(126, 53, 193, 0.96), rgba(78, 31, 146, 0.98));
}

.victim-action.orange {
    background:
        radial-gradient(circle at 50% 8%, rgba(255, 211, 73, 0.24), transparent 42%),
        linear-gradient(145deg, rgba(239, 119, 4, 0.98), rgba(174, 64, 4, 0.98));
}

.victim-action.teal {
    background:
        radial-gradient(circle at 50% 8%, rgba(50, 242, 255, 0.24), transparent 42%),
        linear-gradient(145deg, rgba(0, 163, 184, 0.96), rgba(0, 93, 122, 0.98));
}

.victim-action.amber {
    background:
        radial-gradient(circle at 50% 8%, rgba(255, 223, 82, 0.24), transparent 42%),
        linear-gradient(145deg, rgba(214, 151, 7, 0.98), rgba(143, 91, 3, 0.98));
}

.victim-action.rose {
    background:
        radial-gradient(circle at 50% 8%, rgba(255, 139, 190, 0.25), transparent 42%),
        linear-gradient(145deg, rgba(205, 61, 112, 0.98), rgba(132, 37, 85, 0.98));
}

.victim-action.red {
    background:
        radial-gradient(circle at 50% 8%, rgba(255, 135, 138, 0.25), transparent 42%),
        linear-gradient(145deg, rgba(211, 58, 61, 0.98), rgba(134, 32, 41, 0.98));
}

.victim-contact-list {
    gap: 6px;
}

.victim-contact-row {
    min-height: 33px;
    grid-template-columns: 24px minmax(0, 1fr) auto 28px;
    gap: 7px;
    padding: 5px 7px;
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(8, 39, 61, 0.78), rgba(5, 28, 48, 0.86));
    border-color: rgba(96, 175, 237, 0.12);
    font-size: 0.62rem;
}

.victim-contact-row span:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.victim-contact-row strong {
    color: #e9f4ff;
    font-size: 0.62rem;
    white-space: nowrap;
}

.victim-contact-icon,
.victim-call-dot {
    width: 23px;
    height: 23px;
    background: linear-gradient(180deg, rgba(60, 194, 214, 0.42), rgba(22, 101, 131, 0.7));
    color: #d8fbff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.victim-call-dot {
    background: linear-gradient(180deg, rgba(51, 204, 84, 0.9), rgba(23, 121, 54, 0.94));
    color: #ffffff;
}

@media (max-width: 1360px) {
    :root { --victim-dock-width: 390px; }
    .victim-card-main {
        grid-template-columns: 70px minmax(0, 1fr) 116px;
        gap: 9px;
    }
    .victim-avatar {
        width: 68px;
        height: 84px;
    }
    .victim-toggle {
        right: 130px;
    }
    .victim-status-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
    }
    .victim-status-tile {
        min-height: 78px;
        padding-inline: 3px;
    }
    .victim-status-icon {
        width: 28px;
        height: 28px;
    }
    .victim-status-icon svg {
        width: 19px;
        height: 19px;
    }
    .victim-actions-grid {
        gap: 6px;
    }
    .victim-action {
        min-height: 64px;
        font-size: 0.54rem;
    }
    .victim-location-grid {
        grid-template-columns: 1fr 120px;
    }
}

@media (max-width: 980px) {
    #mainContent {
        padding-right: 0 !important;
    }
    .victim-dock {
        left: calc(var(--rail-width) + 8px);
        right: 8px;
        width: auto;
        top: auto;
        max-height: 58vh;
    }
    .victim-card-main {
        grid-template-columns: 70px minmax(0, 1fr);
    }
    .victim-device-box {
        grid-column: 1 / -1;
    }
    .victim-toggle {
        right: 14px;
    }
    .victim-location-grid {
        grid-template-columns: 1fr;
    }
}

/* === MENU VERTICAL C4 === */
:root {
    --rail-width: 248px;
    --rail-compact-width: 64px;
}

body {
    padding-left: var(--rail-width);
}

.side-rail {
    width: var(--rail-width);
    align-items: stretch;
    padding: 10px 14px 8px;
    overflow: hidden;
    background:
        radial-gradient(circle at 26% 5%, rgba(0, 161, 255, 0.22), transparent 32%),
        radial-gradient(circle at 100% 18%, rgba(0, 208, 255, 0.12), transparent 30%),
        linear-gradient(180deg, rgba(3, 18, 34, 0.99), rgba(0, 10, 22, 1) 58%, rgba(0, 8, 18, 1)) !important;
    border-right: 1px solid rgba(43, 161, 255, 0.28);
    box-shadow:
        12px 0 32px rgba(0, 0, 0, 0.42),
        inset -1px 0 0 rgba(255,255,255,0.04),
        inset 0 1px 0 rgba(255,255,255,0.05);
    transition: width 0.2s ease, padding 0.2s ease, box-shadow 0.2s ease;
}

.side-rail:hover,
body.rail-expanded .side-rail {
    width: var(--rail-width);
}

.side-rail::before {
    content: "";
    position: absolute;
    inset: 8px 10px;
    border: 1px solid rgba(30, 154, 255, 0.12);
    border-radius: 20px;
    pointer-events: none;
    box-shadow: inset 0 0 28px rgba(0, 126, 255, 0.08);
}

.side-rail::after {
    inset: 72px 18px auto 18px;
    background: linear-gradient(90deg, transparent, rgba(22, 184, 255, 0.46), transparent);
}

.rail-menu {
    position: relative;
    z-index: 1;
    width: 44px;
    height: 44px;
    margin: 0 0 12px;
    align-self: flex-start;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(20, 57, 92, 0.86), rgba(5, 25, 51, 0.92));
    border: 1px solid rgba(89, 179, 255, 0.32);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.09),
        0 8px 20px rgba(0,0,0,0.26),
        0 0 22px rgba(17, 140, 255, 0.16);
}

.rail-menu:hover {
    border-color: rgba(0, 197, 255, 0.7);
    background: linear-gradient(180deg, rgba(23, 82, 128, 0.95), rgba(6, 39, 81, 0.98));
}

.rail-menu span {
    width: 24px;
    height: 3px;
    background: linear-gradient(90deg, #dff4ff, #71c9ff);
    box-shadow: 0 0 10px rgba(68, 189, 255, 0.55);
}

.rail-nav {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding: 0 0 10px;
    overflow-y: auto;
    overflow-x: hidden;
    align-items: stretch;
    justify-items: stretch;
}

.rail-nav::-webkit-scrollbar {
    width: 4px;
}

.rail-nav::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(16, 184, 255, 0.68), rgba(21, 72, 137, 0.64));
    border-radius: 99px;
}

.rail-bottom {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 10px 0 0;
    border-top: 1px solid rgba(61, 154, 240, 0.14);
}

.rail-btn {
    position: relative;
    width: 100%;
    height: 49px;
    min-height: 49px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding: 0 14px;
    overflow: hidden;
    border-radius: 9px;
    border: 1px solid rgba(77, 150, 225, 0.22);
    background:
        linear-gradient(180deg, rgba(9, 39, 66, 0.84), rgba(4, 20, 39, 0.92));
    color: #d9e7f8;
    text-decoration: none;
    font-size: 0.8rem;
    line-height: 1;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.05),
        0 8px 16px rgba(0,0,0,0.16);
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.rail-btn::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 99px;
    background: #00c8ff;
    opacity: 0;
    box-shadow: 0 0 18px rgba(0, 200, 255, 0.86);
    transition: opacity 0.16s ease;
}

.rail-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 22% 50%, rgba(0, 196, 255, 0.18), transparent 38%),
        linear-gradient(90deg, rgba(0, 142, 255, 0.22), transparent 72%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease;
}

.rail-btn:hover {
    transform: translateX(2px);
    color: #ffffff;
    border-color: rgba(0, 187, 255, 0.48);
    background:
        linear-gradient(180deg, rgba(12, 52, 88, 0.92), rgba(5, 27, 53, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        0 12px 22px rgba(0,0,0,0.24),
        0 0 20px rgba(0, 177, 255, 0.16);
}

.rail-btn.active {
    color: #ffffff;
    border-color: rgba(74, 200, 255, 0.78);
    background:
        radial-gradient(circle at 18% 50%, rgba(35, 215, 255, 0.32), transparent 42%),
        linear-gradient(135deg, #0534d9 0%, #0879ff 50%, #00a9ff 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.2),
        inset 0 -1px 0 rgba(0,0,0,0.2),
        0 0 0 1px rgba(0, 198, 255, 0.2),
        0 0 24px rgba(0, 125, 255, 0.64),
        0 10px 24px rgba(0, 72, 255, 0.28);
}

.rail-btn:hover::before,
.rail-btn.active::before,
.rail-btn:hover::after,
.rail-btn.active::after {
    opacity: 1;
}

.rail-icon {
    position: relative;
    z-index: 1;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #cde7ff;
    background: linear-gradient(180deg, rgba(25, 55, 92, 0.86), rgba(8, 29, 56, 0.9));
    border: 1px solid rgba(125, 185, 255, 0.22);
    text-shadow: none;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        0 0 14px rgba(0, 127, 255, 0.14);
}

.rail-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rail-btn.active .rail-icon {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(30, 147, 255, 0.88), rgba(18, 75, 208, 0.94));
    border-color: rgba(146, 221, 255, 0.42);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.18),
        0 0 18px rgba(0, 203, 255, 0.46);
}

.rail-label {
    position: relative;
    z-index: 1;
    min-width: 0;
    width: auto;
    opacity: 1;
    overflow: hidden;
    color: inherit;
    font-size: 0.8rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0;
    white-space: nowrap;
}

.rail-badge {
    position: relative;
    z-index: 1;
    margin-left: auto;
    min-width: 21px;
    height: 21px;
    padding: 0 6px;
    display: none;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(180deg, #ff4f5e, #cf1028);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 0 16px rgba(255, 49, 74, 0.46);
    font-size: 0.62rem;
    font-weight: 950;
}

.rail-badge.visible {
    display: grid;
}

body.rail-compact {
    --rail-width: var(--rail-compact-width);
}

body.rail-compact .side-rail {
    width: var(--rail-compact-width);
    padding: 10px 7px 8px;
}

body.rail-compact .rail-menu {
    align-self: center;
}

body.rail-compact .rail-nav {
    gap: 9px;
}

body.rail-compact .rail-btn {
    justify-content: center;
    gap: 0;
    padding: 0;
}

body.rail-compact .rail-label,
body.rail-compact .rail-badge {
    width: 0;
    min-width: 0;
    padding: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

@media (max-width: 1180px) {
    :root {
        --rail-width: 70px;
    }

    .side-rail {
        width: var(--rail-width);
        padding: 10px 8px 8px;
    }

    .rail-menu {
        align-self: center;
    }

    .rail-btn {
        justify-content: center;
        gap: 0;
        padding: 0;
    }

    .rail-label,
    .rail-badge {
        width: 0;
        min-width: 0;
        padding: 0;
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
    }

    .side-rail:hover {
        width: 230px;
        padding: 10px 12px 8px;
    }

    .side-rail:hover .rail-btn {
        justify-content: flex-start;
        gap: 14px;
        padding: 0 12px;
    }

    .side-rail:hover .rail-label {
        width: auto;
        opacity: 1;
    }

    .side-rail:hover .rail-badge.visible {
        min-width: 21px;
        padding: 0 6px;
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 760px) {
    :root {
        --rail-width: 58px;
        --rail-compact-width: 58px;
    }

    .side-rail {
        padding: 8px 6px;
    }

    .rail-btn {
        height: 44px;
        min-height: 44px;
    }

    .rail-icon {
        flex-basis: 31px;
        width: 31px;
        height: 31px;
    }

    .rail-icon svg {
        width: 18px;
        height: 18px;
    }
}

/* === TARJETA PRINCIPAL DE VICTIMA - FORMATO HERO === */
:root {
    --victim-dock-width: clamp(560px, 36vw, 760px);
}

#mainContent {
    padding-right: calc(var(--victim-dock-width) + 12px) !important;
}

.victim-dock {
    width: var(--victim-dock-width);
    padding: 12px;
    gap: 10px;
    border-color: rgba(0, 180, 255, 0.34);
    background:
        radial-gradient(circle at 12% 6%, rgba(12, 214, 255, 0.13), transparent 30%),
        radial-gradient(circle at 92% 12%, rgba(37, 126, 255, 0.14), transparent 32%),
        linear-gradient(180deg, rgba(0, 26, 43, 0.98), rgba(1, 17, 32, 0.99));
}

.victim-list {
    gap: 12px;
}

.victim-card {
    border-radius: 8px;
    border: 1px solid rgba(0, 164, 255, 0.28);
    background:
        radial-gradient(circle at 14% 50%, rgba(0, 212, 255, 0.18), transparent 34%),
        radial-gradient(circle at 92% 50%, rgba(0, 138, 255, 0.12), transparent 36%),
        linear-gradient(135deg, rgba(0, 18, 33, 0.98), rgba(0, 36, 61, 0.96) 48%, rgba(0, 15, 30, 0.99));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.07),
        inset 0 0 44px rgba(0, 151, 255, 0.08),
        0 0 0 1px rgba(0, 211, 255, 0.06),
        0 16px 34px rgba(0,0,0,0.32);
}

.victim-card::before {
    background:
        linear-gradient(90deg, rgba(0, 240, 255, 0.12), transparent 26%, transparent 74%, rgba(0, 188, 255, 0.1)),
        radial-gradient(circle at 18% 50%, rgba(10, 255, 113, 0.11), transparent 28%);
}

.victim-card-main {
    grid-template-columns: 164px minmax(0, 1fr) 72px;
    min-height: 214px;
    gap: 22px;
    padding: 24px 22px;
    align-items: center;
}

.victim-avatar-shell {
    position: relative;
    width: 150px;
    height: 150px;
    align-self: center;
    justify-self: center;
    filter: drop-shadow(0 0 24px rgba(8, 212, 88, 0.28));
}

.victim-avatar-shell .victim-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid rgba(14, 207, 79, 0.9);
    background:
        radial-gradient(circle at 50% 35%, #f0c2a4 0 20%, transparent 21%),
        radial-gradient(circle at 50% 71%, #263348 0 36%, transparent 37%),
        linear-gradient(160deg, #d6dde7, #526171);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.22),
        0 0 0 1px rgba(22, 255, 105, 0.2),
        0 0 24px rgba(13, 222, 87, 0.45);
}

.victim-avatar-shell .victim-avatar img {
    border-radius: 50%;
    object-fit: cover;
}

.victim-avatar-shell .victim-avatar span {
    font-size: 1.6rem;
    letter-spacing: 0;
}

.victim-presence-dot {
    position: absolute;
    right: 8px;
    bottom: 16px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 5px solid rgba(0, 24, 28, 0.92);
    background: #13dd5d;
    box-shadow: 0 0 24px rgba(19, 221, 93, 0.82);
}

.victim-presence-dot.offline {
    background: #66758a;
    box-shadow: 0 0 18px rgba(102, 117, 138, 0.46);
}

.victim-identity {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
}

.victim-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 14px;
}

.victim-name {
    color: #ffffff;
    font-size: 1.45rem;
    line-height: 1.1;
    font-weight: 950;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.58);
    white-space: normal;
}

.victim-role-pill,
.victim-presence-pill {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    border-radius: 999px;
    text-transform: uppercase;
    color: #19f36c;
    background: rgba(0, 91, 44, 0.2);
    border: 1px solid rgba(31, 239, 107, 0.26);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.05),
        0 0 18px rgba(22, 236, 103, 0.12);
    font-size: 0.84rem;
    font-weight: 950;
    letter-spacing: 0;
}

.victim-presence-pill {
    color: #24f36d;
}

.victim-presence-pill i {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 15px currentColor;
}

.victim-presence-pill.offline {
    color: #b9c5d2;
    background: rgba(118, 137, 156, 0.14);
    border-color: rgba(166, 184, 204, 0.22);
}

.victim-hero-meta {
    display: grid;
    gap: 12px;
    color: #f2f6fb;
    font-size: 1.02rem;
    line-height: 1.25;
}

.victim-hero-meta .victim-meta-row {
    gap: 14px;
}

.victim-hero-meta .victim-meta-row span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 8px rgba(0,0,0,0.48);
}

.victim-hero-meta .victim-mini-icon {
    width: 25px;
    height: 25px;
    color: #18b8ff;
}

.victim-hero-meta .victim-mini-icon svg {
    width: 23px;
    height: 23px;
    stroke-width: 2.2;
}

.victim-hero-meta .victim-mini-icon-phone {
    color: #9b55ff;
}

.victim-hero-meta .victim-mini-icon-imei {
    color: #ffb000;
}

.victim-hero-meta .victim-mini-icon-device {
    color: #0fe6ff;
}

.victim-card-main .victim-toggle {
    position: relative;
    right: auto;
    bottom: auto;
    justify-self: center;
    align-self: center;
    width: 66px;
    height: 66px;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #b9f8ff;
}

.victim-card-main .victim-toggle:hover {
    background: transparent;
    color: #ffffff;
    filter: brightness(1.12);
}

.victim-card-main .victim-toggle svg {
    width: 62px;
    height: 62px;
    stroke-width: 1.7;
    filter:
        drop-shadow(0 0 7px rgba(117, 236, 255, 0.9))
        drop-shadow(0 0 18px rgba(51, 206, 255, 0.46));
}

.victim-card.expanded .victim-card-main .victim-toggle svg {
    transform: rotate(180deg);
}

.victim-details {
    padding: 0 12px 12px;
}

@media (max-width: 1480px) {
    :root {
        --victim-dock-width: 560px;
    }

    .victim-card-main {
        grid-template-columns: 132px minmax(0, 1fr) 54px;
        min-height: 184px;
        gap: 16px;
        padding: 20px 18px;
    }

    .victim-avatar-shell {
        width: 122px;
        height: 122px;
    }

    .victim-presence-dot {
        width: 28px;
        height: 28px;
        right: 6px;
        bottom: 12px;
        border-width: 4px;
    }

    .victim-name {
        font-size: 1.15rem;
    }

    .victim-role-pill,
    .victim-presence-pill {
        min-height: 29px;
        padding: 0 12px;
        font-size: 0.7rem;
    }

    .victim-hero-meta {
        gap: 9px;
        font-size: 0.82rem;
    }

    .victim-hero-meta .victim-mini-icon {
        width: 20px;
        height: 20px;
    }

    .victim-hero-meta .victim-mini-icon svg {
        width: 19px;
        height: 19px;
    }

    .victim-card-main .victim-toggle {
        width: 52px;
        height: 52px;
    }

    .victim-card-main .victim-toggle svg {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 1180px) {
    :root {
        --victim-dock-width: 430px;
    }

    .victim-card-main {
        grid-template-columns: 94px minmax(0, 1fr) 42px;
        min-height: 150px;
        gap: 12px;
        padding: 16px 14px;
    }

    .victim-avatar-shell {
        width: 88px;
        height: 88px;
    }

    .victim-presence-dot {
        width: 22px;
        height: 22px;
        border-width: 3px;
        bottom: 8px;
    }

    .victim-title-row {
        gap: 8px;
    }

    .victim-name {
        width: 100%;
        font-size: 0.96rem;
    }

    .victim-role-pill,
    .victim-presence-pill {
        min-height: 24px;
        padding: 0 9px;
        font-size: 0.58rem;
    }

    .victim-hero-meta {
        gap: 7px;
        font-size: 0.7rem;
    }

    .victim-card-main .victim-toggle,
    .victim-card-main .victim-toggle svg {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 980px) {
    #mainContent {
        padding-right: 0 !important;
    }

    .victim-dock {
        left: calc(var(--rail-width) + 8px);
        right: 8px;
        width: auto;
        top: auto;
        max-height: 60vh;
    }
}

/* === TARJETA INFORMATIVA COMPACTA CON SCROLL === */
:root {
    --victim-dock-width: clamp(420px, 31vw, 520px);
}

#mainContent {
    padding-right: calc(var(--victim-dock-width) + 10px) !important;
}

.victim-dock {
    width: var(--victim-dock-width);
    padding: 9px;
    gap: 8px;
}

.victim-list {
    gap: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    padding-right: 4px;
}

.victim-list::-webkit-scrollbar,
.victim-details::-webkit-scrollbar {
    width: 7px;
}

.victim-list::-webkit-scrollbar-track,
.victim-details::-webkit-scrollbar-track {
    background: rgba(4, 22, 39, 0.78);
    border-radius: 999px;
}

.victim-list::-webkit-scrollbar-thumb,
.victim-details::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(0, 209, 255, 0.82), rgba(19, 86, 165, 0.9));
    border-radius: 999px;
    border: 2px solid rgba(4, 22, 39, 0.78);
}

.victim-card-main {
    grid-template-columns: 88px minmax(0, 1fr) 38px;
    min-height: 118px;
    gap: 11px;
    padding: 12px 12px;
}

.victim-avatar-shell {
    width: 78px;
    height: 78px;
}

.victim-avatar-shell .victim-avatar {
    border-width: 3px;
}

.victim-avatar-shell .victim-avatar span {
    font-size: 0.92rem;
}

.victim-presence-dot {
    right: 1px;
    bottom: 8px;
    width: 20px;
    height: 20px;
    border-width: 3px;
}

.victim-identity {
    gap: 8px;
}

.victim-title-row {
    gap: 7px;
}

.victim-name {
    width: 100%;
    font-size: 0.86rem;
    line-height: 1.12;
}

.victim-role-pill,
.victim-presence-pill {
    min-height: 20px;
    padding: 0 8px;
    font-size: 0.52rem;
}

.victim-presence-pill i {
    width: 8px;
    height: 8px;
}

.victim-hero-meta {
    gap: 5px;
    font-size: 0.62rem;
    line-height: 1.18;
}

.victim-hero-meta .victim-meta-row {
    gap: 7px;
}

.victim-hero-meta .victim-mini-icon {
    width: 16px;
    height: 16px;
}

.victim-hero-meta .victim-mini-icon svg {
    width: 15px;
    height: 15px;
    stroke-width: 2;
}

.victim-card-main .victim-toggle,
.victim-card-main .victim-toggle svg {
    width: 34px;
    height: 34px;
}

.victim-card-main .victim-toggle svg {
    stroke-width: 2;
}

.victim-details {
    max-height: 0;
    overflow: hidden;
    padding: 0 9px;
    scrollbar-gutter: stable;
}

.victim-card.expanded .victim-details {
    max-height: min(372px, calc(100vh - 360px));
    overflow-y: auto;
    padding: 0 7px 9px 9px;
}

.victim-section {
    padding: 7px;
}

.victim-section-title {
    margin-bottom: 6px;
    font-size: 0.58rem;
}

.victim-section-title .victim-mini-icon,
.victim-section-title .victim-mini-icon svg {
    width: 13px;
    height: 13px;
}

.victim-status-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
}

.victim-status-tile {
    min-height: 58px;
    padding: 5px 3px;
    border-radius: 6px;
    gap: 2px;
}

.victim-status-icon {
    width: 22px;
    height: 22px;
    border-radius: 7px;
}

.victim-status-icon svg {
    width: 15px;
    height: 15px;
}

.victim-status-tile span,
.victim-status-tile strong {
    font-size: 0.48rem;
}

.victim-location-grid {
    grid-template-columns: 1fr 92px;
    gap: 8px;
}

.victim-location-text {
    gap: 5px;
    font-size: 0.55rem;
}

.victim-location-actions {
    gap: 5px;
}

.victim-location-btn {
    min-height: 27px;
    font-size: 0.54rem;
}

.victim-location-btn .victim-action-icon,
.victim-location-btn .victim-action-icon svg {
    width: 14px;
    height: 14px;
}

.victim-mini-map {
    min-height: 92px;
}

.victim-mini-map::after {
    width: 19px;
    height: 19px;
}

.victim-mini-map::before {
    width: 6px;
    height: 6px;
}

.victim-actions-grid {
    gap: 5px;
}

.victim-action {
    min-height: 52px;
    padding: 5px 3px;
    font-size: 0.48rem;
}

.victim-action-icon,
.victim-action-icon svg {
    width: 18px;
    height: 18px;
}

.victim-contact-row {
    min-height: 28px;
    grid-template-columns: 20px minmax(0, 1fr) auto 22px;
    gap: 5px;
    padding: 4px 5px;
    font-size: 0.52rem;
}

.victim-contact-row strong {
    font-size: 0.52rem;
}

.victim-contact-icon,
.victim-call-dot {
    width: 19px;
    height: 19px;
}

@media (max-width: 1480px) {
    :root {
        --victim-dock-width: 410px;
    }

    .victim-card-main {
        grid-template-columns: 76px minmax(0, 1fr) 34px;
        min-height: 110px;
        gap: 9px;
        padding: 11px 10px;
    }

    .victim-avatar-shell {
        width: 68px;
        height: 68px;
    }

    .victim-name {
        font-size: 0.78rem;
    }

    .victim-role-pill,
    .victim-presence-pill {
        font-size: 0.48rem;
        min-height: 18px;
        padding: 0 7px;
    }

    .victim-hero-meta {
        font-size: 0.56rem;
    }

    .victim-card-main .victim-toggle,
    .victim-card-main .victim-toggle svg {
        width: 31px;
        height: 31px;
    }

    .victim-card.expanded .victim-details {
        max-height: min(330px, calc(100vh - 330px));
    }
}

@media (max-width: 1180px) {
    :root {
        --victim-dock-width: 360px;
    }

    .victim-card-main {
        grid-template-columns: 62px minmax(0, 1fr) 30px;
    }

    .victim-avatar-shell {
        width: 56px;
        height: 56px;
    }

    .victim-presence-dot {
        width: 16px;
        height: 16px;
    }

    .victim-title-row {
        gap: 5px;
    }

    .victim-name {
        font-size: 0.7rem;
    }

    .victim-hero-meta {
        font-size: 0.5rem;
    }
}

@media (max-width: 980px) {
    #mainContent {
        padding-right: 0 !important;
    }

    .victim-dock {
        left: calc(var(--rail-width) + 8px);
        right: 8px;
        width: auto;
        top: auto;
        max-height: 58vh;
    }

    .victim-card.expanded .victim-details {
        max-height: 260px;
    }
}

/* Victimas: carga y vista previa de fotografia */
.ops-photo-upload {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(38, 162, 255, 0.28);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(0, 145, 255, 0.16), rgba(0, 255, 178, 0.06)),
        rgba(1, 20, 35, 0.78);
    box-shadow: inset 0 0 20px rgba(0, 180, 255, 0.06);
}

.ops-photo-preview {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 2px solid rgba(32, 215, 106, 0.72);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.22), rgba(16, 37, 60, 0.92));
    box-shadow: 0 0 20px rgba(32, 215, 106, 0.24);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 900;
}

.ops-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ops-photo-controls {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.ops-photo-controls input[type="file"] {
    min-width: 0;
    padding: 8px;
    font-size: 0.72rem;
}

.ops-photo-controls small {
    color: #8fb6d6;
    font-size: 0.68rem;
}

.ops-photo-controls .ops-btn {
    justify-self: start;
    min-height: 30px;
    padding: 7px 11px;
    font-size: 0.72rem;
}

.ops-user-brief {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}

.ops-user-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(55, 209, 119, 0.72);
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.2), rgba(28, 44, 69, 0.96)),
        #122236;
    box-shadow: 0 0 14px rgba(32, 215, 106, 0.2);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 900;
}

.ops-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ops-user-brief .ops-name {
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .ops-photo-upload {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .ops-photo-preview {
        width: 64px;
        height: 64px;
    }
}

/* Ajuste operativo: scroll completo de tarjetas informativas */
.victim-dock {
    height: auto;
    max-height: calc(100vh - 76px);
    overflow: hidden;
}

.victim-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: scroll;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-gutter: stable both-edges;
    padding-right: 7px;
    scrollbar-width: thin;
    scrollbar-color: rgba(37, 198, 255, 0.9) rgba(3, 21, 38, 0.88);
}

.victim-list::-webkit-scrollbar {
    width: 9px;
}

.victim-list::-webkit-scrollbar-track {
    background: rgba(3, 21, 38, 0.88);
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(80, 161, 255, 0.12);
}

.victim-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #42d9ff, #0969c9);
    border: 2px solid rgba(3, 21, 38, 0.88);
    border-radius: 999px;
}

.victim-card {
    flex: 0 0 auto;
}

.victim-details {
    max-height: 0;
    overflow: hidden;
}

.victim-card.expanded {
    border-color: rgba(92, 225, 255, 0.72);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 0 1px rgba(0, 196, 255, 0.22),
        0 0 26px rgba(0, 196, 255, 0.18),
        0 16px 28px rgba(0, 0, 0, 0.34);
}

.victim-card.expanded .victim-details {
    max-height: none;
    overflow: visible;
    padding-bottom: 10px;
}

@media (max-width: 980px) {
    .victim-dock {
        max-height: 58vh;
        overflow: hidden;
    }

    .victim-card.expanded .victim-details {
        max-height: none;
        overflow: visible;
    }
}

/* Diseno desplegado tipo ficha C4 */
.victim-card.expanded .victim-details {
    display: grid;
    gap: 10px;
    max-height: none;
    overflow: visible;
    padding: 0 8px 11px;
}

.victim-card.expanded .victim-section {
    position: relative;
    overflow: hidden;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(0, 173, 255, 0.25);
    background:
        radial-gradient(circle at 4% 0%, rgba(0, 213, 255, 0.12), transparent 35%),
        linear-gradient(180deg, rgba(1, 34, 57, 0.96), rgba(1, 20, 36, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        inset 0 0 28px rgba(0, 180, 255, 0.06),
        0 10px 20px rgba(0, 0, 0, 0.22);
}

.victim-card.expanded .victim-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 9px;
    color: #e9f6ff;
    font-size: 0.68rem;
    line-height: 1;
    font-weight: 950;
    text-transform: uppercase;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.victim-card.expanded .victim-section-title .victim-mini-icon,
.victim-card.expanded .victim-section-title .victim-mini-icon svg {
    width: 16px;
    height: 16px;
    color: #c9efff;
    stroke-width: 2.4;
}

.victim-card.expanded .victim-status-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.victim-card.expanded .victim-status-tile {
    min-height: 87px;
    padding: 8px 4px 7px;
    border-radius: 7px;
    border: 1px solid rgba(78, 255, 115, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background:
        radial-gradient(circle at 50% 13%, rgba(117, 255, 89, 0.32), transparent 45%),
        linear-gradient(145deg, rgba(18, 140, 44, 0.94), rgba(4, 65, 39, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 18px rgba(46, 231, 90, 0.13);
}

.victim-card.expanded .victim-status-tile.neutral {
    border-color: rgba(42, 159, 255, 0.35);
    background:
        radial-gradient(circle at 50% 13%, rgba(48, 163, 255, 0.36), transparent 45%),
        linear-gradient(145deg, rgba(13, 96, 176, 0.95), rgba(5, 49, 111, 0.98));
    box-shadow: 0 0 18px rgba(32, 143, 255, 0.16);
}

.victim-card.expanded .victim-status-tile.warn {
    border-color: rgba(255, 193, 56, 0.35);
    background:
        radial-gradient(circle at 50% 13%, rgba(255, 224, 83, 0.3), transparent 45%),
        linear-gradient(145deg, rgba(151, 99, 7, 0.96), rgba(78, 50, 5, 0.98));
    box-shadow: 0 0 18px rgba(255, 187, 39, 0.14);
}

.victim-card.expanded .victim-status-tile.danger {
    border-color: rgba(255, 91, 114, 0.38);
    background:
        radial-gradient(circle at 50% 13%, rgba(255, 92, 119, 0.28), transparent 45%),
        linear-gradient(145deg, rgba(148, 30, 46, 0.96), rgba(76, 13, 29, 0.98));
    box-shadow: 0 0 18px rgba(255, 50, 82, 0.17);
}

.victim-card.expanded .victim-status-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: #ddffdc;
    background: rgba(255, 255, 255, 0.1);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 0 18px rgba(104, 255, 119, 0.34);
}

.victim-card.expanded .victim-status-icon svg {
    width: 23px;
    height: 23px;
    stroke-width: 2.2;
}

.victim-card.expanded .victim-status-tile span {
    color: #eef8ff;
    font-size: 0.59rem;
    line-height: 1.08;
    text-align: center;
}

.victim-card.expanded .victim-status-tile strong {
    max-width: 100%;
    color: #ffffff;
    font-size: 0.6rem;
    line-height: 1.08;
    text-align: center;
    white-space: normal;
}

.victim-card.expanded .victim-location-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(145px, 46%);
    gap: 10px;
    align-items: stretch;
}

.victim-card.expanded .victim-location-text {
    display: grid;
    align-content: start;
    gap: 7px;
    color: #d4e5f7;
    font-size: 0.64rem;
    line-height: 1.36;
}

.victim-card.expanded .victim-location-text > div:not(.victim-location-actions) {
    overflow-wrap: anywhere;
}

.victim-card.expanded .victim-location-actions {
    display: grid;
    gap: 7px;
    margin-top: 4px;
}

.victim-card.expanded .victim-location-btn {
    min-height: 34px;
    border-radius: 7px;
    border: 1px solid rgba(39, 153, 255, 0.48);
    color: #eaf7ff;
    background: linear-gradient(180deg, rgba(0, 102, 195, 0.92), rgba(2, 58, 133, 0.96));
    font-size: 0.66rem;
    font-weight: 850;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 7px 15px rgba(0, 0, 0, 0.2);
}

.victim-card.expanded .victim-location-btn.secondary {
    border-color: rgba(132, 166, 207, 0.24);
    background: linear-gradient(180deg, rgba(28, 52, 83, 0.84), rgba(16, 35, 62, 0.92));
}

.victim-card.expanded .victim-location-btn .victim-action-icon,
.victim-card.expanded .victim-location-btn .victim-action-icon svg {
    width: 17px;
    height: 17px;
}

.victim-card.expanded .victim-mini-map {
    min-height: 155px;
    border-radius: 8px;
    border: 1px solid rgba(35, 151, 255, 0.58);
    background:
        linear-gradient(112deg, transparent 0 45%, rgba(132, 157, 181, 0.38) 46% 48%, transparent 49%),
        linear-gradient(74deg, transparent 0 35%, rgba(132, 157, 181, 0.32) 36% 38%, transparent 39%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        radial-gradient(circle at 59% 42%, rgba(83, 255, 103, 0.26), transparent 15%),
        #13283c;
    background-size: auto, auto, 29px 29px, 29px 29px, auto, auto;
    box-shadow:
        inset 0 0 28px rgba(0, 0, 0, 0.34),
        0 0 18px rgba(0, 142, 255, 0.14);
}

.victim-card.expanded .victim-mini-map::after {
    width: 27px;
    height: 27px;
    background: #65ff72;
    box-shadow: 0 0 22px rgba(92, 255, 114, 0.9);
}

.victim-card.expanded .victim-mini-map::before {
    width: 9px;
    height: 9px;
    background: #082f1d;
}

.victim-card.expanded .victim-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.victim-card.expanded .victim-action {
    min-height: 76px;
    padding: 8px 4px 7px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #ffffff;
    background:
        radial-gradient(circle at 50% 8%, rgba(109, 255, 139, 0.24), transparent 42%),
        linear-gradient(145deg, rgba(16, 157, 59, 0.98), rgba(4, 93, 43, 0.99));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.13),
        0 10px 18px rgba(0, 0, 0, 0.2);
    font-size: 0.6rem;
    line-height: 1.08;
    font-weight: 850;
    text-align: center;
}

.victim-card.expanded .victim-action-icon,
.victim-card.expanded .victim-action-icon svg {
    width: 25px;
    height: 25px;
    stroke-width: 2.25;
}

.victim-card.expanded .victim-action.blue {
    background: radial-gradient(circle at 50% 8%, rgba(95, 180, 255, 0.26), transparent 42%), linear-gradient(145deg, rgba(12, 105, 219, 0.98), rgba(4, 65, 164, 0.99));
}

.victim-card.expanded .victim-action.purple {
    background: radial-gradient(circle at 50% 8%, rgba(188, 105, 255, 0.28), transparent 42%), linear-gradient(145deg, rgba(126, 53, 193, 0.98), rgba(78, 31, 146, 0.99));
}

.victim-card.expanded .victim-action.orange {
    background: radial-gradient(circle at 50% 8%, rgba(255, 211, 73, 0.24), transparent 42%), linear-gradient(145deg, rgba(239, 119, 4, 0.99), rgba(174, 64, 4, 0.99));
}

.victim-card.expanded .victim-action.teal {
    background: radial-gradient(circle at 50% 8%, rgba(50, 242, 255, 0.24), transparent 42%), linear-gradient(145deg, rgba(0, 163, 184, 0.98), rgba(0, 93, 122, 0.99));
}

.victim-card.expanded .victim-action.amber {
    background: radial-gradient(circle at 50% 8%, rgba(255, 223, 82, 0.24), transparent 42%), linear-gradient(145deg, rgba(214, 151, 7, 0.99), rgba(143, 91, 3, 0.99));
}

.victim-card.expanded .victim-action.rose {
    background: radial-gradient(circle at 50% 8%, rgba(255, 139, 190, 0.25), transparent 42%), linear-gradient(145deg, rgba(205, 61, 112, 0.99), rgba(132, 37, 85, 0.99));
}

.victim-card.expanded .victim-action.red {
    background: radial-gradient(circle at 50% 8%, rgba(255, 135, 138, 0.25), transparent 42%), linear-gradient(145deg, rgba(211, 58, 61, 0.99), rgba(134, 32, 41, 0.99));
}

.victim-card.expanded .victim-contact-list {
    display: grid;
    gap: 6px;
}

.victim-card.expanded .victim-contact-row {
    min-height: 34px;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto 28px;
    align-items: center;
    gap: 7px;
    padding: 5px 7px;
    border-radius: 8px;
    border: 1px solid rgba(96, 175, 237, 0.12);
    background: linear-gradient(180deg, rgba(8, 39, 61, 0.78), rgba(5, 28, 48, 0.88));
    color: #dbeaff;
    font-size: 0.62rem;
}

.victim-card.expanded .victim-contact-row span:nth-child(2) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.victim-card.expanded .victim-contact-row strong {
    color: #f2f9ff;
    font-size: 0.62rem;
    font-weight: 750;
    white-space: nowrap;
}

.victim-card.expanded .victim-contact-icon,
.victim-card.expanded .victim-call-dot {
    width: 23px;
    height: 23px;
    display: grid;
    place-items: center;
    border-radius: 50%;
}

.victim-card.expanded .victim-contact-icon {
    color: #d8fbff;
    background: linear-gradient(180deg, rgba(60, 194, 214, 0.42), rgba(22, 101, 131, 0.76));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.victim-card.expanded .victim-call-dot {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(51, 204, 84, 0.96), rgba(23, 121, 54, 0.98));
    box-shadow: 0 0 13px rgba(49, 216, 93, 0.28);
}

.victim-card.expanded .victim-contact-icon svg,
.victim-card.expanded .victim-call-dot svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 1180px) {
    .victim-card.expanded .victim-status-grid,
    .victim-card.expanded .victim-actions-grid {
        gap: 6px;
    }

    .victim-card.expanded .victim-location-grid {
        grid-template-columns: 1fr;
    }

    .victim-card.expanded .victim-mini-map {
        min-height: 130px;
    }
}

/* Ajuste de encabezado compacto de tarjeta */
.victim-card .victim-card-main {
    align-items: center;
}

.victim-card .victim-identity {
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 9px;
}

.victim-card .victim-title-row {
    width: 100%;
    justify-content: center;
    gap: 7px;
}

.victim-card .victim-name {
    width: 100%;
    text-align: center;
    font-size: 0.92rem;
    line-height: 1.14;
}

.victim-card .victim-role-pill,
.victim-card .victim-presence-pill {
    font-size: 0.55rem;
}

.victim-card .victim-hero-meta {
    width: 100%;
    justify-items: center;
    gap: 6px;
    font-size: 0.66rem;
    line-height: 1.18;
}

.victim-card .victim-hero-meta .victim-meta-row {
    width: 100%;
    justify-content: center;
}

.victim-card .victim-hero-meta .victim-meta-row span:last-child {
    flex: 0 1 auto;
    max-width: calc(100% - 28px);
    text-align: left;
}

@media (max-width: 1180px) {
    .victim-card .victim-name {
        font-size: 0.82rem;
    }

    .victim-card .victim-hero-meta {
        font-size: 0.58rem;
    }
}

/* Ajuste solicitado: datos principales a la izquierda y boton Centrar */
.victim-card .victim-identity {
    align-items: flex-start;
    text-align: left;
}

.victim-card .victim-title-row {
    justify-content: flex-start;
}

.victim-card .victim-name {
    text-align: left;
    font-size: 0.96rem;
}

.victim-card .victim-hero-meta {
    justify-items: start;
    font-size: 0.69rem;
}

.victim-card .victim-hero-meta .victim-meta-row {
    justify-content: flex-start;
}

.victim-card .victim-hero-meta .victim-meta-row span:last-child {
    text-align: left;
}

.victim-card.expanded .victim-location-btn.center {
    justify-self: start;
    width: auto;
    min-width: 86px;
    min-height: 30px;
    padding: 0 12px;
    border-color: rgba(71, 142, 255, 0.55);
    color: #075dff;
    background: linear-gradient(180deg, #ffffff, #eef6ff);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 7px 15px rgba(0, 0, 0, 0.16);
}

.victim-card.expanded .victim-location-btn.center .victim-status-icon,
.victim-card.expanded .victim-location-btn.center .victim-status-icon svg {
    width: 16px;
    height: 16px;
}

.victim-card.expanded .victim-location-btn.center .victim-status-icon {
    background: transparent;
    box-shadow: none;
    color: #075dff;
}

/* Menu lateral: compacto automatico y despliegue por hover */
:root {
    --rail-expanded-width: 248px;
}

body.rail-compact:not(.rail-pinned) {
    --rail-width: var(--rail-compact-width);
}

body.rail-compact:not(.rail-pinned) .side-rail {
    width: var(--rail-compact-width);
    padding: 10px 7px 8px;
}

body.rail-compact:not(.rail-pinned) .rail-menu {
    align-self: center;
}

body.rail-compact:not(.rail-pinned) .rail-nav {
    gap: 9px;
}

body.rail-compact:not(.rail-pinned) .rail-btn {
    justify-content: center;
    gap: 0;
    padding: 0;
}

body.rail-compact:not(.rail-pinned) .rail-label,
body.rail-compact:not(.rail-pinned) .rail-badge {
    width: 0;
    min-width: 0;
    padding: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

body.rail-compact:not(.rail-pinned) .side-rail:hover,
body.rail-compact:not(.rail-pinned) .side-rail:focus-within {
    width: var(--rail-expanded-width);
    padding: 10px 14px 8px;
    box-shadow:
        16px 0 38px rgba(0, 0, 0, 0.42),
        inset -1px 0 0 rgba(255, 255, 255, 0.04),
        0 0 28px rgba(0, 163, 255, 0.12);
}

body.rail-compact:not(.rail-pinned) .side-rail:hover .rail-menu,
body.rail-compact:not(.rail-pinned) .side-rail:focus-within .rail-menu {
    align-self: flex-start;
}

body.rail-compact:not(.rail-pinned) .side-rail:hover .rail-btn,
body.rail-compact:not(.rail-pinned) .side-rail:focus-within .rail-btn {
    justify-content: flex-start;
    gap: 16px;
    padding: 0 14px;
}

body.rail-compact:not(.rail-pinned) .side-rail:hover .rail-label,
body.rail-compact:not(.rail-pinned) .side-rail:focus-within .rail-label {
    width: auto;
    opacity: 1;
    pointer-events: auto;
}

body.rail-compact:not(.rail-pinned) .side-rail:hover .rail-badge.visible,
body.rail-compact:not(.rail-pinned) .side-rail:focus-within .rail-badge.visible {
    width: auto;
    min-width: 21px;
    padding: 0 6px;
    opacity: 1;
    pointer-events: auto;
}

body.rail-pinned {
    --rail-width: var(--rail-expanded-width);
}

/* Intensidad moderada del halo en avatars de victimas */
.victim-list .victim-avatar-shell {
    filter: drop-shadow(0 0 14px rgba(8, 212, 88, 0.18));
}

.victim-list .victim-avatar-shell .victim-avatar {
    border-color: rgba(14, 207, 79, 0.78);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.17),
        0 0 0 1px rgba(22, 255, 105, 0.13),
        0 0 15px rgba(13, 222, 87, 0.26);
}

.victim-list .victim-presence-dot {
    box-shadow: 0 0 13px rgba(19, 221, 93, 0.48);
}

/* Panel informativo mas estrecho y reacomodado */
:root {
    --victim-dock-width: clamp(350px, 24vw, 390px);
}

#mainContent {
    padding-right: calc(var(--victim-dock-width) + 8px) !important;
}

.victim-dock {
    right: 6px;
    width: var(--victim-dock-width);
    padding: 8px;
}

.victim-card .victim-card-main {
    grid-template-columns: 68px minmax(0, 1fr) 30px;
    min-height: 104px;
    gap: 10px;
    padding: 10px;
}

.victim-list .victim-avatar-shell {
    width: 62px;
    height: 62px;
}

.victim-list .victim-presence-dot {
    right: 0;
    bottom: 7px;
    width: 18px;
    height: 18px;
    border-width: 3px;
}

.victim-card .victim-name {
    font-size: 0.88rem;
}

.victim-card .victim-hero-meta {
    gap: 5px;
    font-size: 0.62rem;
}

.victim-card .victim-hero-meta .victim-mini-icon,
.victim-card .victim-hero-meta .victim-mini-icon svg {
    width: 14px;
    height: 14px;
}

.victim-card-main .victim-toggle,
.victim-card-main .victim-toggle svg {
    width: 29px;
    height: 29px;
}

.victim-card.expanded .victim-details {
    gap: 8px;
    padding: 0 7px 10px;
}

.victim-card.expanded .victim-status-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
}

.victim-card.expanded .victim-status-tile {
    min-height: 76px;
    padding: 7px 3px 6px;
}

.victim-card.expanded .victim-status-icon {
    width: 30px;
    height: 30px;
}

.victim-card.expanded .victim-status-icon svg {
    width: 20px;
    height: 20px;
}

.victim-card.expanded .victim-location-grid {
    grid-template-columns: minmax(0, 1fr) 130px;
    gap: 8px;
}

.victim-card.expanded .victim-mini-map {
    min-height: 132px;
}

.victim-card.expanded .victim-actions-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.victim-card.expanded .victim-action {
    min-height: 68px;
    padding: 7px 4px 6px;
}

.victim-card.expanded .victim-action-icon,
.victim-card.expanded .victim-action-icon svg {
    width: 22px;
    height: 22px;
}

@media (max-width: 1180px) {
    :root {
        --victim-dock-width: 340px;
    }

    .victim-card.expanded .victim-location-grid {
        grid-template-columns: 1fr;
    }
}

/* Tarjeta informativa auto-ocultable */
:root {
    --victim-dock-peek: 46px;
}

#mainContent {
    padding-right: 8px !important;
}

.victim-dock {
    transform: translateX(calc(100% - var(--victim-dock-peek)));
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease;
    will-change: transform;
}

.victim-dock:hover,
.victim-dock:focus,
.victim-dock:focus-within {
    transform: translateX(0);
    border-color: rgba(40, 199, 255, 0.54);
    box-shadow:
        -18px 0 42px rgba(0, 0, 0, 0.46),
        0 0 28px rgba(0, 178, 255, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.victim-dock > * {
    transition: opacity 0.16s ease;
}

.victim-dock:not(:hover):not(:focus):not(:focus-within) > * {
    opacity: 0;
    pointer-events: none;
}

.victim-dock::after {
    content: "VICTIMAS";
    position: absolute;
    left: 7px;
    top: 50%;
    z-index: 5;
    width: 32px;
    height: 148px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #e9f8ff;
    background:
        radial-gradient(circle at 50% 10%, rgba(0, 214, 255, 0.24), transparent 36%),
        linear-gradient(180deg, rgba(8, 92, 157, 0.96), rgba(4, 30, 62, 0.98));
    border: 1px solid rgba(92, 199, 255, 0.42);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 0 18px rgba(0, 180, 255, 0.26);
    font-size: 0.62rem;
    font-weight: 950;
    letter-spacing: 0.7px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: translateY(-50%) rotate(180deg);
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.14s ease;
}

.victim-dock:hover::after,
.victim-dock:focus::after,
.victim-dock:focus-within::after {
    opacity: 0;
}

@media (max-width: 980px) {
    #mainContent {
        padding-right: 0 !important;
    }

    .victim-dock {
        transform: translateY(calc(100% - 46px));
    }

    .victim-dock:hover,
    .victim-dock:focus,
    .victim-dock:focus-within {
        transform: translateY(0);
    }

    .victim-dock::after {
        left: 50%;
        top: 8px;
        width: 148px;
        height: 30px;
        writing-mode: horizontal-tb;
        transform: translateX(-50%);
    }
}

/* Alertas SOS compactas */
#opsPanel > .ops-header {
    display: none !important;
}

#opsSectionAlerts .ops-item.critical {
    gap: 6px;
    padding: 8px;
    border-radius: 8px;
}

#opsSectionAlerts .ops-alert-head {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

#opsSectionAlerts .ops-alert-icon {
    width: 32px;
    height: 32px;
    font-size: 0.62rem;
    border-radius: 8px;
}

#opsSectionAlerts .ops-name {
    font-size: 0.84rem;
    line-height: 1.12;
}

#opsSectionAlerts .muted {
    font-size: 0.72rem;
    line-height: 1.12;
}

#opsSectionAlerts .ops-alert-kind {
    margin-top: 1px;
    font-size: 0.62rem;
}

#opsSectionAlerts .ops-alert-comment {
    min-height: 38px;
    margin-top: 4px;
}

#opsSectionAlerts .ops-actions {
    gap: 5px;
}

#opsSectionAlerts .ops-actions .ops-btn {
    min-height: 28px;
    padding: 5px 8px;
    font-size: 0.68rem;
}

.sos-toast {
    left: calc(var(--rail-width, 64px) + 20px);
    bottom: 24px;
    min-width: 0;
    width: auto;
    max-width: 250px;
    transform: translateY(90px);
    padding: 9px 13px;
    gap: 8px;
    border-radius: 8px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.16),
        0 12px 28px rgba(255, 23, 68, 0.34);
}

.sos-toast.visible {
    transform: translateY(0);
}

.sos-toast-icon {
    font-size: 1.05rem;
}

.sos-toast-title {
    font-size: 0.78rem;
    line-height: 1;
}

.sos-toast-detail {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.7rem;
    line-height: 1.15;
}

.sos-toast-arrow {
    display: none;
}

/* Acciones SOS dentro de tarjeta informativa */
.victim-card.alert.expanded .victim-alert-ops {
    border-color: rgba(255, 54, 90, 0.48);
    background:
        radial-gradient(circle at 0% 0%, rgba(255, 45, 85, 0.18), transparent 34%),
        linear-gradient(180deg, rgba(35, 13, 30, 0.97), rgba(4, 25, 42, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 0 1px rgba(255, 54, 90, 0.16),
        0 0 22px rgba(255, 31, 71, 0.14);
}

.victim-alert-ops-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.victim-alert-status {
    min-width: 52px;
    padding: 5px 8px;
    border-radius: 7px;
    text-align: center;
    color: #ffdce4;
    background: rgba(255, 23, 68, 0.16);
    border: 1px solid rgba(255, 77, 109, 0.3);
    font-size: 0.62rem;
    font-weight: 950;
    text-transform: uppercase;
}

.victim-alert-comment {
    width: 100%;
    min-height: 42px;
    margin: 0 0 8px;
    resize: vertical;
    border-radius: 8px;
    border: 1px solid rgba(124, 175, 218, 0.22);
    color: #eaf7ff;
    background:
        linear-gradient(180deg, rgba(7, 18, 33, 0.94), rgba(6, 27, 48, 0.94));
    padding: 9px 10px;
    font-size: 0.74rem;
    font-weight: 750;
    outline: none;
}

.victim-alert-comment:focus {
    border-color: rgba(0, 194, 255, 0.7);
    box-shadow: 0 0 0 2px rgba(0, 194, 255, 0.12);
}

.victim-alert-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
}

.victim-alert-btn {
    min-height: 34px;
    border: 1px solid rgba(140, 184, 225, 0.2);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 8px;
    color: #f2f8ff;
    background:
        radial-gradient(circle at 50% 0%, rgba(80, 151, 219, 0.18), transparent 52%),
        linear-gradient(180deg, rgba(34, 50, 70, 0.98), rgba(20, 34, 52, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 7px 16px rgba(0, 0, 0, 0.2);
    font-size: 0.72rem;
    font-weight: 950;
    text-decoration: none;
    cursor: pointer;
}

.victim-alert-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(75, 190, 255, 0.52);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 18px rgba(0, 158, 255, 0.18);
}

.victim-alert-btn.primary {
    border-color: rgba(46, 179, 255, 0.46);
    background: linear-gradient(180deg, rgba(13, 121, 221, 0.98), rgba(7, 69, 157, 0.98));
}

.victim-alert-btn.danger {
    border-color: rgba(255, 95, 119, 0.6);
    background: linear-gradient(180deg, rgba(255, 70, 93, 0.98), rgba(178, 28, 48, 0.98));
}

.victim-alert-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.victim-alert-history {
    margin-top: 8px;
}

@media (max-width: 1280px) {
    .victim-alert-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Tarjeta independiente para alertas SOS */
#opsSectionAlerts .ops-alert-card {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 9px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(0, 210, 255, 0.42);
    background:
        radial-gradient(circle at 4% 0%, rgba(0, 255, 210, 0.16), transparent 38%),
        linear-gradient(145deg, rgba(0, 77, 94, 0.96), rgba(1, 29, 51, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 0 1px rgba(255, 48, 86, 0.4),
        0 16px 34px rgba(0, 0, 0, 0.35),
        0 0 26px rgba(0, 210, 255, 0.14);
}

#opsSectionAlerts .ops-alert-person {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr) 42px;
    gap: 13px;
    align-items: center;
    min-width: 0;
}

#opsSectionAlerts .ops-alert-person .victim-avatar-shell {
    width: 72px;
    height: 72px;
}

#opsSectionAlerts .ops-alert-person-body {
    min-width: 0;
}

#opsSectionAlerts .ops-alert-person-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 5px;
}

#opsSectionAlerts .ops-alert-person-title strong {
    min-width: 100%;
    color: #ffffff;
    font-size: 0.9rem;
    line-height: 1.08;
    font-weight: 950;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

#opsSectionAlerts .ops-alert-location-line {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
    color: #9edcff;
    font-size: 0.68rem;
    font-weight: 850;
}

#opsSectionAlerts .ops-alert-location-line .victim-mini-icon,
#opsSectionAlerts .ops-alert-location-line .victim-mini-icon svg {
    width: 13px;
    height: 13px;
}

#opsSectionAlerts .ops-alert-toggle {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(113, 242, 255, 0.28);
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #b9fbff;
    background:
        radial-gradient(circle at 50% 20%, rgba(109, 238, 255, 0.24), transparent 48%),
        linear-gradient(180deg, rgba(15, 48, 79, 0.84), rgba(5, 24, 45, 0.92));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 20px rgba(0, 213, 255, 0.12);
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

#opsSectionAlerts .ops-alert-toggle:hover {
    color: #ffffff;
    border-color: rgba(117, 250, 255, 0.62);
    transform: translateY(-1px);
}

#opsSectionAlerts .ops-alert-toggle svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 9px rgba(116, 245, 255, 0.55));
    transition: transform 0.18s ease;
}

#opsSectionAlerts .ops-alert-card.expanded .ops-alert-toggle svg {
    transform: rotate(180deg);
}

#opsSectionAlerts .ops-alert-details {
    display: grid;
    gap: 10px;
}

#opsSectionAlerts .ops-alert-card.collapsed .ops-alert-details {
    display: none;
}

#opsSectionAlerts .ops-alert-extra-section {
    position: relative;
    overflow: hidden;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(0, 173, 255, 0.26);
    background:
        radial-gradient(circle at 3% 0%, rgba(0, 225, 255, 0.14), transparent 36%),
        linear-gradient(180deg, rgba(1, 35, 58, 0.96), rgba(1, 20, 36, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        inset 0 0 28px rgba(0, 180, 255, 0.06),
        0 10px 20px rgba(0, 0, 0, 0.22);
}

#opsSectionAlerts .ops-alert-extra-section .victim-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 9px;
    color: #e9f6ff;
    font-size: 0.68rem;
    line-height: 1;
    font-weight: 950;
    text-transform: uppercase;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

#opsSectionAlerts .ops-alert-extra-section .victim-section-title .victim-mini-icon,
#opsSectionAlerts .ops-alert-extra-section .victim-section-title .victim-mini-icon svg {
    width: 16px;
    height: 16px;
    color: #c9efff;
    stroke-width: 2.4;
}

#opsSectionAlerts .ops-alert-extra-section .victim-location-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 124px;
    gap: 10px;
    align-items: stretch;
}

#opsSectionAlerts .ops-alert-extra-section .victim-location-text {
    display: grid;
    align-content: start;
    gap: 7px;
    color: #d4e5f7;
    font-size: 0.64rem;
    line-height: 1.36;
}

#opsSectionAlerts .ops-alert-extra-section .victim-location-text > div:not(.victim-location-actions) {
    overflow-wrap: anywhere;
}

#opsSectionAlerts .ops-alert-extra-section .victim-location-actions {
    display: grid;
    gap: 7px;
    margin-top: 4px;
}

#opsSectionAlerts .ops-alert-extra-section .victim-location-btn {
    min-height: 32px;
    border-radius: 7px;
    border: 1px solid rgba(39, 153, 255, 0.48);
    color: #eaf7ff;
    background: linear-gradient(180deg, rgba(0, 102, 195, 0.92), rgba(2, 58, 133, 0.96));
    font-size: 0.64rem;
    font-weight: 850;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 7px 15px rgba(0, 0, 0, 0.2);
}

#opsSectionAlerts .ops-alert-extra-section .victim-location-btn.secondary {
    border-color: rgba(132, 166, 207, 0.24);
    background: linear-gradient(180deg, rgba(28, 52, 83, 0.84), rgba(16, 35, 62, 0.92));
}

#opsSectionAlerts .ops-alert-extra-section .victim-location-btn.center {
    justify-self: start;
    width: auto;
    min-width: 86px;
    min-height: 30px;
    padding: 0 12px;
    border-color: rgba(71, 142, 255, 0.55);
    color: #075dff;
    background: linear-gradient(180deg, #ffffff, #eef6ff);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 7px 15px rgba(0, 0, 0, 0.16);
}

#opsSectionAlerts .ops-alert-extra-section .victim-location-btn .victim-action-icon,
#opsSectionAlerts .ops-alert-extra-section .victim-location-btn .victim-action-icon svg,
#opsSectionAlerts .ops-alert-extra-section .victim-location-btn.center .victim-status-icon,
#opsSectionAlerts .ops-alert-extra-section .victim-location-btn.center .victim-status-icon svg {
    width: 16px;
    height: 16px;
}

#opsSectionAlerts .ops-alert-extra-section .victim-location-btn.center .victim-status-icon {
    background: transparent;
    box-shadow: none;
    color: #075dff;
}

#opsSectionAlerts .ops-alert-extra-section .victim-mini-map {
    min-height: 126px;
    border-radius: 8px;
    border: 1px solid rgba(35, 151, 255, 0.58);
    background:
        linear-gradient(112deg, transparent 0 45%, rgba(132, 157, 181, 0.38) 46% 48%, transparent 49%),
        linear-gradient(74deg, transparent 0 35%, rgba(132, 157, 181, 0.32) 36% 38%, transparent 39%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        radial-gradient(circle at 59% 42%, rgba(83, 255, 103, 0.26), transparent 15%),
        #13283c;
    background-size: auto, auto, 29px 29px, 29px 29px, auto, auto;
    box-shadow:
        inset 0 0 28px rgba(0, 0, 0, 0.34),
        0 0 18px rgba(0, 142, 255, 0.14);
}

#opsSectionAlerts .ops-alert-extra-section .victim-mini-map::after {
    width: 25px;
    height: 25px;
    background: #65ff72;
    box-shadow: 0 0 22px rgba(92, 255, 114, 0.82);
}

#opsSectionAlerts .ops-alert-extra-section .victim-mini-map::before {
    width: 8px;
    height: 8px;
    background: #082f1d;
}

#opsSectionAlerts .ops-alert-extra-section .victim-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

#opsSectionAlerts .ops-alert-extra-section .victim-action {
    min-height: 68px;
    padding: 7px 4px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #ffffff;
    background:
        radial-gradient(circle at 50% 8%, rgba(109, 255, 139, 0.24), transparent 42%),
        linear-gradient(145deg, rgba(16, 157, 59, 0.98), rgba(4, 93, 43, 0.99));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.13),
        0 10px 18px rgba(0, 0, 0, 0.2);
    font-size: 0.58rem;
    line-height: 1.08;
    font-weight: 850;
    text-align: center;
}

#opsSectionAlerts .ops-alert-extra-section .victim-action-icon,
#opsSectionAlerts .ops-alert-extra-section .victim-action-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.25;
}

#opsSectionAlerts .ops-alert-extra-section .victim-action.blue {
    background: radial-gradient(circle at 50% 8%, rgba(95, 180, 255, 0.26), transparent 42%), linear-gradient(145deg, rgba(12, 105, 219, 0.98), rgba(4, 65, 164, 0.99));
}

#opsSectionAlerts .ops-alert-extra-section .victim-action.purple {
    background: radial-gradient(circle at 50% 8%, rgba(188, 105, 255, 0.28), transparent 42%), linear-gradient(145deg, rgba(126, 53, 193, 0.98), rgba(78, 31, 146, 0.99));
}

#opsSectionAlerts .ops-alert-extra-section .victim-action.orange {
    background: radial-gradient(circle at 50% 8%, rgba(255, 211, 73, 0.24), transparent 42%), linear-gradient(145deg, rgba(239, 119, 4, 0.99), rgba(174, 64, 4, 0.99));
}

#opsSectionAlerts .ops-alert-extra-section .victim-action.teal {
    background: radial-gradient(circle at 50% 8%, rgba(50, 242, 255, 0.24), transparent 42%), linear-gradient(145deg, rgba(0, 163, 184, 0.98), rgba(0, 93, 122, 0.99));
}

#opsSectionAlerts .ops-alert-extra-section .victim-action.amber {
    background: radial-gradient(circle at 50% 8%, rgba(255, 223, 82, 0.24), transparent 42%), linear-gradient(145deg, rgba(214, 151, 7, 0.99), rgba(143, 91, 3, 0.99));
}

#opsSectionAlerts .ops-alert-extra-section .victim-action:disabled {
    opacity: 0.48;
    cursor: not-allowed;
    filter: grayscale(0.45);
}

#opsSectionAlerts .ops-alert-extra-section .victim-contact-list {
    display: grid;
    gap: 6px;
}

#opsSectionAlerts .ops-alert-extra-section .victim-contact-row {
    min-height: 34px;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto 28px;
    align-items: center;
    gap: 7px;
    padding: 5px 7px;
    border-radius: 8px;
    border: 1px solid rgba(96, 175, 237, 0.12);
    background: linear-gradient(180deg, rgba(8, 39, 61, 0.78), rgba(5, 28, 48, 0.88));
    color: #dbeaff;
    font-size: 0.62rem;
}

#opsSectionAlerts .ops-alert-extra-section .victim-contact-row span:nth-child(2) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#opsSectionAlerts .ops-alert-extra-section .victim-contact-row strong {
    color: #f2f9ff;
    font-size: 0.62rem;
    font-weight: 750;
    white-space: nowrap;
}

#opsSectionAlerts .ops-alert-extra-section .victim-contact-icon,
#opsSectionAlerts .ops-alert-extra-section .victim-call-dot {
    width: 23px;
    height: 23px;
    display: grid;
    place-items: center;
    border-radius: 50%;
}

#opsSectionAlerts .ops-alert-extra-section .victim-contact-icon {
    color: #d8fbff;
    background: linear-gradient(180deg, rgba(60, 194, 214, 0.42), rgba(22, 101, 131, 0.76));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

#opsSectionAlerts .ops-alert-extra-section .victim-call-dot {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(51, 204, 84, 0.96), rgba(23, 121, 54, 0.98));
    box-shadow: 0 0 13px rgba(49, 216, 93, 0.28);
}

#opsSectionAlerts .ops-alert-extra-section .victim-contact-icon svg,
#opsSectionAlerts .ops-alert-extra-section .victim-call-dot svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 1180px) {
    #opsSectionAlerts .ops-alert-extra-section .victim-location-grid {
        grid-template-columns: 1fr;
    }

    #opsSectionAlerts .ops-alert-extra-section .victim-actions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #opsSectionAlerts .ops-alert-extra-section .victim-mini-map {
        min-height: 110px;
    }
}

.ops-alert-management {
    display: grid;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(38, 195, 255, 0.38);
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 43, 120, 0.16), transparent 34%),
        linear-gradient(180deg, rgba(3, 38, 66, 0.98), rgba(2, 24, 43, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 24px rgba(0, 185, 255, 0.12);
}

.ops-alert-management-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ops-alert-management-title {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #f4fbff;
    font-size: 0.78rem;
    font-weight: 950;
    text-transform: uppercase;
}

.ops-alert-action-icon,
.ops-alert-action-icon svg {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
}

.ops-alert-action-icon svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ops-alert-management-title .ops-alert-action-icon {
    color: #bff3ff;
}

.ops-alert-management-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 42, 132, 0.58);
    color: #ffd4e5;
    background: rgba(129, 13, 72, 0.58);
    font-size: 0.66rem;
    font-weight: 950;
    text-transform: uppercase;
    white-space: nowrap;
}

.ops-alert-management-status i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4bb1;
    box-shadow: 0 0 12px rgba(255, 75, 177, 0.9);
}

.ops-alert-comment-box {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
    min-height: 58px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(85, 186, 234, 0.32);
    background:
        linear-gradient(180deg, rgba(5, 33, 58, 0.95), rgba(3, 25, 45, 0.95));
}

.ops-alert-comment-box > .ops-alert-action-icon {
    color: #9be8ff;
    margin-top: 2px;
}

.ops-alert-comment-box textarea {
    width: 100%;
    min-height: 30px;
    max-height: 88px;
    resize: vertical;
    border: 0;
    outline: 0;
    color: #edf9ff;
    background: transparent;
    font-size: 0.78rem;
    line-height: 1.25;
    font-weight: 760;
}

.ops-alert-comment-box textarea.invalid {
    color: #ffdce3;
}

.ops-alert-comment-box:has(textarea.invalid) {
    border-color: rgba(255, 57, 90, 0.78);
    box-shadow: 0 0 0 2px rgba(255, 57, 90, 0.14);
}

.ops-alert-comment-box small {
    display: block;
    margin-top: 3px;
    color: #72cfff;
    font-size: 0.68rem;
    font-weight: 850;
}

.ops-alert-comment-box small.error {
    color: #ff6884;
}

.ops-alert-management-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ops-alert-management-btn {
    min-height: 60px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 10px 12px;
    color: #f6fbff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 12px 24px rgba(0, 0, 0, 0.26);
    font-size: 0.88rem;
    font-weight: 950;
    cursor: pointer;
    transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.ops-alert-management-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.34);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 0 22px rgba(0, 194, 255, 0.18);
}

.ops-alert-management-btn.cyan {
    background: linear-gradient(145deg, rgba(3, 185, 204, 0.98), rgba(7, 112, 169, 0.98));
}

.ops-alert-management-btn.blue {
    background: linear-gradient(145deg, rgba(0, 162, 226, 0.98), rgba(4, 80, 177, 0.98));
}

.ops-alert-management-btn.indigo {
    background: linear-gradient(145deg, rgba(56, 91, 224, 0.98), rgba(37, 44, 151, 0.98));
}

.ops-alert-management-btn.violet {
    background: linear-gradient(145deg, rgba(119, 67, 221, 0.98), rgba(62, 35, 143, 0.98));
}

.ops-alert-management-btn.red {
    background: linear-gradient(145deg, rgba(244, 38, 74, 0.98), rgba(160, 18, 42, 0.98));
}

.ops-alert-management-btn.wide {
    grid-column: 1 / -1;
    min-height: 52px;
}

.ops-alert-management-history {
    margin-top: 0;
}

.patrol-assigned-view {
    display: grid;
    gap: 16px;
}

.patrol-incident-card,
.patrol-action-card {
    border: 1px solid rgba(93, 180, 255, 0.24);
    border-radius: 18px;
    background:
        radial-gradient(circle at 14% 0%, rgba(0, 171, 255, 0.12), transparent 36%),
        linear-gradient(180deg, rgba(9, 34, 58, 0.96), rgba(5, 23, 40, 0.96));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 18px 42px rgba(0, 0, 0, 0.28);
    padding: 20px 22px;
}

.patrol-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.patrol-card-head h3,
.patrol-action-card h3 {
    color: #f5fbff;
    font-size: 1.1rem;
    line-height: 1.1;
    font-weight: 900;
    text-transform: none;
    letter-spacing: 0;
}

.patrol-status-pill {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    border-radius: 999px;
    color: #d9e6ef;
    background: linear-gradient(180deg, rgba(255,255,255,0.13), rgba(255,255,255,0.07));
    border: 1px solid rgba(255,255,255,0.08);
    font-size: 0.82rem;
    font-weight: 900;
}

.patrol-incident-data {
    display: grid;
    gap: 10px;
    margin: 0;
}

.patrol-incident-data div {
    display: flex;
    align-items: baseline;
    gap: 5px;
    min-width: 0;
}

.patrol-incident-data dt,
.patrol-incident-data dd {
    margin: 0;
    color: #eaf5ff;
    font-size: 0.98rem;
    line-height: 1.25;
}

.patrol-incident-data dt {
    color: #ffffff;
    font-weight: 950;
}

.patrol-incident-data dd {
    overflow-wrap: anywhere;
}

.patrol-action-card h3 {
    margin-bottom: 14px;
}

.patrol-action-stack {
    display: grid;
    gap: 10px;
}

.patrol-action-btn {
    width: 100%;
    min-height: 40px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 850;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.patrol-action-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: 0 0 18px rgba(0, 178, 255, 0.18);
}

.patrol-action-btn.slate {
    background: linear-gradient(135deg, #536a7c, #435769);
}

.patrol-action-btn.live {
    border-color: rgba(57, 255, 20, 0.44);
    background: linear-gradient(135deg, #07833d, #04b95c);
    box-shadow: 0 0 18px rgba(57, 255, 20, 0.18), inset 0 1px 0 rgba(255,255,255,0.16);
}

.patrol-action-btn.rose {
    background: linear-gradient(135deg, #e87482, #e36575);
}

.patrol-action-btn.bronze {
    background: linear-gradient(135deg, #987757, #806448);
}

.patrol-action-btn.outline {
    color: #f8fbff;
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.58);
}

.patrol-action-btn.outline.muted {
    color: #c4d0db;
    border-color: rgba(185, 202, 218, 0.54);
}

.patrol-action-status {
    margin: 14px 0 0;
    color: #aebfd0;
    font-size: 0.86rem;
    line-height: 1.35;
}

.patrol-btn-icon {
    display: inline-grid;
    place-items: center;
    width: 17px;
    height: 17px;
}

.patrol-btn-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.patrol-mode .operations-panel.open {
    width: clamp(420px, 31vw, 560px);
}

body.patrol-mode .patrol-assigned-view {
    padding-top: 4px;
}

.rail-menu-group {
    display: grid;
    gap: 6px;
    width: 100%;
}

.rail-parent .rail-chevron {
    position: relative;
    z-index: 1;
    margin-left: auto;
    width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    color: #9edcff;
    transition: transform 0.16s ease, opacity 0.16s ease;
}

.rail-parent .rail-chevron svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rail-parent.submenu-open .rail-chevron {
    transform: rotate(180deg);
}

.rail-parent.submenu-open {
    color: #eefbff;
    border-color: rgba(0, 214, 255, 0.54);
    background:
        radial-gradient(circle at 16% 50%, rgba(0, 205, 255, 0.2), transparent 44%),
        linear-gradient(180deg, rgba(10, 55, 92, 0.95), rgba(4, 26, 50, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.09),
        0 10px 22px rgba(0,0,0,0.22),
        0 0 18px rgba(0, 184, 255, 0.18);
}

.rail-parent.submenu-open::before,
.rail-parent.submenu-open::after {
    opacity: 1;
}

.rail-parent.submenu-open::before {
    background: #6eefff;
    box-shadow: 0 0 16px rgba(110, 239, 255, 0.72);
}

.rail-parent.submenu-open::after {
    opacity: 0.52;
}

.rail-parent.submenu-open .rail-icon {
    color: #dffaff;
    background: linear-gradient(180deg, rgba(15, 109, 167, 0.88), rgba(8, 55, 102, 0.94));
    border-color: rgba(135, 226, 255, 0.38);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.14),
        0 0 16px rgba(0, 214, 255, 0.28);
}

.rail-parent.submenu-open.active {
    color: #ffffff;
    border-color: rgba(74, 200, 255, 0.78);
    background:
        radial-gradient(circle at 18% 50%, rgba(35, 215, 255, 0.32), transparent 42%),
        linear-gradient(135deg, #0534d9 0%, #0879ff 50%, #00a9ff 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.2),
        inset 0 -1px 0 rgba(0,0,0,0.2),
        0 0 0 1px rgba(0, 198, 255, 0.2),
        0 0 24px rgba(0, 125, 255, 0.64),
        0 10px 24px rgba(0, 72, 255, 0.28);
}

.rail-parent.submenu-open.active .rail-icon {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(30, 147, 255, 0.88), rgba(18, 75, 208, 0.94));
    border-color: rgba(146, 221, 255, 0.42);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.18),
        0 0 18px rgba(0, 203, 255, 0.46);
}

.rail-submenu {
    display: grid;
    gap: 6px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-4px);
    transition: max-height 0.2s ease, opacity 0.16s ease, transform 0.16s ease;
    padding-left: 11px;
    border-left: 1px solid rgba(0, 190, 255, 0.28);
}

.rail-submenu.open {
    max-height: 130px;
    opacity: 1;
    transform: translateY(0);
}

.rail-sub-btn {
    min-height: 36px;
    display: flex;
    align-items: center;
    padding: 0 12px 0 14px;
    border-radius: 8px;
    border: 1px solid rgba(77, 150, 225, 0.16);
    background: linear-gradient(180deg, rgba(7, 30, 52, 0.72), rgba(3, 18, 35, 0.84));
    color: #bdd5ea;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.1;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.rail-sub-btn:hover,
.rail-sub-btn.active {
    color: #ffffff;
    border-color: rgba(0, 199, 255, 0.5);
    background: linear-gradient(135deg, rgba(5, 73, 160, 0.94), rgba(0, 132, 255, 0.94));
    box-shadow: 0 0 18px rgba(0, 160, 255, 0.22);
}

.rail-sub-btn.active {
    border-color: rgba(95, 221, 255, 0.86);
    background:
        radial-gradient(circle at 18% 50%, rgba(76, 237, 255, 0.26), transparent 38%),
        linear-gradient(135deg, #0744df 0%, #0789ff 58%, #00c2ff 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.16),
        0 0 0 1px rgba(0, 221, 255, 0.16),
        0 0 18px rgba(0, 165, 255, 0.34);
}

.incident-filter-form {
    padding: 10px;
}

body.rail-compact:not(.rail-pinned) .rail-submenu,
body.rail-compact:not(.rail-pinned) .rail-chevron {
    display: none;
}

body.rail-compact:not(.rail-pinned) .side-rail:hover .rail-submenu,
body.rail-compact:not(.rail-pinned) .side-rail:focus-within .rail-submenu {
    display: grid;
}

body.rail-compact:not(.rail-pinned) .side-rail:hover .rail-chevron,
body.rail-compact:not(.rail-pinned) .side-rail:focus-within .rail-chevron {
    display: inline-grid;
}

/* === RESPONSIVE MOVIL C4 === */
@media (max-width: 760px) {
    :root {
        --mobile-header-offset: 122px;
        --rail-width: 0px;
        --rail-compact-width: 0px;
        --rail-expanded-width: min(82vw, 312px);
        --victim-dock-width: calc(100vw - 16px);
        --victim-dock-peek: 44px;
    }

    html,
    body {
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    body,
    body.rail-compact,
    body.rail-pinned,
    body.rail-compact:not(.rail-pinned) {
        padding-left: 0 !important;
        padding-bottom: 0 !important;
    }

    body.mobile-rail-open::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 6500;
        background: rgba(0, 6, 14, 0.62);
        backdrop-filter: blur(2px);
    }

    header {
        min-height: 0 !important;
        height: auto;
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr) auto;
        grid-template-areas:
            "menu brand actions"
            "summary summary summary";
        align-items: center;
        gap: 6px 8px;
        padding: 7px 8px 8px !important;
        position: relative;
        z-index: 3000;
    }

    .top-menu {
        grid-area: menu;
        display: grid !important;
        width: 42px;
        height: 42px;
        border-radius: 11px;
        border: 1px solid rgba(86, 183, 255, 0.34);
        background: linear-gradient(180deg, rgba(13, 65, 111, 0.92), rgba(4, 28, 55, 0.96));
        box-shadow: 0 0 18px rgba(0, 162, 255, 0.18), inset 0 1px 0 rgba(255,255,255,0.1);
    }

    .top-menu span {
        width: 22px;
        height: 3px;
        background: #e6f6ff;
    }

    .brand-block {
        grid-area: brand;
        min-width: 0 !important;
        gap: 8px;
        overflow: hidden;
    }

    .brand-mark {
        width: 42px !important;
        height: 42px !important;
        flex-basis: 42px !important;
        border-radius: 8px;
    }

    .brand-copy {
        min-width: 0;
    }

    .brand-copy h1 {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.98rem !important;
        line-height: 1.05;
    }

    .brand-copy span {
        display: block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.66rem !important;
        line-height: 1.1;
    }

    .header-right {
        grid-area: actions;
        gap: 5px !important;
        min-width: 0;
        justify-content: flex-end;
    }

    .header-right .ws-status {
        display: none !important;
    }

    .auth-status {
        min-height: 38px !important;
        max-width: 118px;
        padding: 0 8px !important;
        font-size: 0.7rem !important;
    }

    #authUser {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .auth-caret {
        display: none;
    }

    .notification-btn {
        width: 39px !important;
        min-height: 38px !important;
        border-radius: 9px;
    }

    .notification-btn strong {
        top: 3px;
        right: 3px;
    }

    .logout-shell {
        padding: 0 !important;
    }

    .logout-btn {
        min-height: 38px;
        padding: 0 10px;
        font-size: 0.72rem;
    }

    .header-ops-summary {
        grid-area: summary;
        width: 100%;
        max-width: 100% !important;
        margin: 0 !important;
        display: flex !important;
        gap: 7px !important;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 1px 0 4px;
        scrollbar-width: thin;
        scroll-snap-type: x proximity;
    }

    .header-ops-summary .ops-metric {
        flex: 0 0 128px;
        min-height: 50px !important;
        padding: 7px 9px !important;
        border-radius: 9px !important;
        scroll-snap-align: start;
    }

    .header-ops-summary .ops-metric span {
        font-size: 0.52rem !important;
    }

    .header-ops-summary .ops-metric strong {
        font-size: 1.02rem !important;
    }

    #mainContent {
        position: relative;
        flex: 1 1 auto;
        min-height: 0;
        height: auto;
        padding: 6px 6px 48px !important;
        overflow: hidden;
        gap: 0 !important;
    }

    #map {
        position: absolute;
        inset: 6px 6px 48px 6px;
        width: auto;
        height: auto;
        min-height: 0;
        border-radius: 11px;
    }

    .side-rail,
    body.rail-compact .side-rail,
    body.rail-compact:not(.rail-pinned) .side-rail {
        position: fixed;
        inset: 0 auto 0 0;
        width: var(--rail-expanded-width) !important;
        padding: 10px 12px 14px !important;
        transform: translateX(-105%);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        z-index: 7000;
        border-radius: 0 18px 18px 0;
        overflow: hidden;
    }

    body.mobile-rail-open .side-rail,
    body.mobile-rail-open.rail-compact:not(.rail-pinned) .side-rail {
        transform: translateX(0);
        box-shadow: 22px 0 48px rgba(0, 0, 0, 0.52), 0 0 32px rgba(0, 162, 255, 0.14);
    }

    .side-rail:hover,
    body.rail-expanded .side-rail,
    body.rail-compact:not(.rail-pinned) .side-rail:hover,
    body.rail-compact:not(.rail-pinned) .side-rail:focus-within {
        width: var(--rail-expanded-width) !important;
    }

    .rail-menu,
    body.rail-compact .rail-menu,
    body.rail-compact:not(.rail-pinned) .rail-menu {
        align-self: flex-start;
        margin: 0 0 12px;
        width: 42px;
        height: 42px;
    }

    .rail-nav,
    body.rail-compact .rail-nav,
    body.rail-compact:not(.rail-pinned) .rail-nav {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-items: stretch;
        gap: 8px;
        width: 100%;
        padding: 0 2px 10px;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .rail-btn,
    body.rail-compact .rail-btn,
    body.rail-compact:not(.rail-pinned) .rail-btn,
    body.rail-compact:not(.rail-pinned) .side-rail:hover .rail-btn,
    body.rail-compact:not(.rail-pinned) .side-rail:focus-within .rail-btn {
        width: 100% !important;
        height: 45px;
        min-height: 45px;
        display: flex;
        justify-content: flex-start;
        gap: 12px;
        padding: 0 12px !important;
    }

    .rail-label,
    .rail-badge,
    body.rail-compact .rail-label,
    body.rail-compact .rail-badge,
    body.rail-compact:not(.rail-pinned) .rail-label,
    body.rail-compact:not(.rail-pinned) .rail-badge,
    body.rail-compact:not(.rail-pinned) .side-rail:hover .rail-label,
    body.rail-compact:not(.rail-pinned) .side-rail:focus-within .rail-label {
        width: auto !important;
        min-width: 0 !important;
        opacity: 1 !important;
        padding: 0 !important;
        pointer-events: auto;
    }

    body.rail-compact:not(.rail-pinned) .rail-submenu,
    body.rail-compact:not(.rail-pinned) .side-rail:hover .rail-submenu,
    body.rail-compact:not(.rail-pinned) .side-rail:focus-within .rail-submenu {
        display: grid;
    }

    body.rail-compact:not(.rail-pinned) .rail-chevron,
    body.rail-compact:not(.rail-pinned) .side-rail:hover .rail-chevron,
    body.rail-compact:not(.rail-pinned) .side-rail:focus-within .rail-chevron {
        display: inline-grid;
    }

    .rail-submenu {
        margin-left: 18px;
        padding-left: 10px;
    }

    .rail-sub-btn {
        min-height: 38px;
        font-size: 0.72rem;
    }

    .rail-bottom {
        width: 100%;
        padding: 9px 2px 0;
    }

    .operations-panel,
    .history-panel {
        position: fixed !important;
        inset: var(--mobile-header-offset) 8px 10px 8px !important;
        width: auto !important;
        max-width: none !important;
        height: auto !important;
        z-index: 5200;
        border-radius: 13px !important;
        transform: translateY(12px);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.18s ease, opacity 0.18s ease;
    }

    .operations-panel.open,
    .history-panel.open,
    body.patrol-mode .operations-panel.open {
        width: auto !important;
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .operations-panel:not(.open),
    .history-panel:not(.open) {
        width: auto !important;
        border: 0;
        box-shadow: none;
    }

    .ops-close,
    #hpClose {
        display: grid !important;
        place-items: center;
        min-width: 34px;
        min-height: 34px;
    }

    .ops-header,
    #opsPanel > .ops-header,
    .hp-header {
        display: flex !important;
        min-height: 44px;
        padding: 0 10px;
    }

    .ops-scroll {
        padding: 8px;
        gap: 9px;
    }

    .ops-toolbar {
        min-height: 42px;
        gap: 8px;
    }

    .ops-toolbar h3 {
        font-size: 0.86rem;
    }

    .ops-summary,
    .ops-form,
    .hp-dates {
        grid-template-columns: 1fr !important;
    }

    .ops-row {
        gap: 8px;
        flex-wrap: wrap;
    }

    .ops-actions,
    .victim-alert-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .hp-controls {
        padding: 8px;
    }

    .hp-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hp-table {
        overflow: auto;
    }

    .victim-dock,
    body.rail-compact:not(.rail-pinned) .victim-dock {
        left: 8px !important;
        right: 8px !important;
        top: auto !important;
        bottom: 8px !important;
        width: auto !important;
        max-width: none !important;
        max-height: min(76vh, 620px);
        padding: 8px;
        border-radius: 14px 14px 10px 10px;
        transform: translateY(calc(100% - var(--victim-dock-peek))) !important;
        z-index: 5600;
    }

    .victim-dock:hover,
    .victim-dock:focus,
    .victim-dock:focus-within {
        transform: translateY(0) !important;
    }

    .victim-dock::after {
        left: 50%;
        top: 8px;
        width: 150px;
        height: 30px;
        writing-mode: horizontal-tb;
        text-orientation: mixed;
        transform: translateX(-50%);
    }

    .victim-searchbar {
        min-height: 40px;
        grid-template-columns: 30px 1fr 34px;
        border-radius: 11px;
    }

    .victim-list {
        max-height: calc(76vh - 70px);
        gap: 7px;
        padding-right: 4px;
    }

    .victim-card .victim-card-main,
    .victim-card-main {
        grid-template-columns: 62px minmax(0, 1fr) 34px !important;
        min-height: 92px;
        gap: 8px;
        padding: 9px !important;
    }

    .victim-avatar-shell,
    .victim-list .victim-avatar-shell {
        width: 56px;
        height: 56px;
    }

    .victim-presence-dot,
    .victim-list .victim-presence-dot {
        width: 17px;
        height: 17px;
        bottom: 5px;
    }

    .victim-title-row {
        align-items: flex-start;
        gap: 5px;
    }

    .victim-name,
    .victim-card .victim-name {
        font-size: 0.78rem;
        line-height: 1.15;
    }

    .victim-role-pill,
    .victim-presence-pill {
        min-height: 18px;
        padding: 0 6px;
        font-size: 0.48rem;
    }

    .victim-hero-meta,
    .victim-card .victim-hero-meta {
        gap: 4px;
        font-size: 0.58rem;
    }

    .victim-hero-meta .victim-meta-row span:last-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .victim-card-main .victim-toggle,
    .victim-card-main .victim-toggle svg {
        width: 30px;
        height: 30px;
    }

    .victim-card.expanded .victim-details {
        max-height: calc(76vh - 160px) !important;
        overflow-y: auto;
        padding: 0 6px 8px;
    }

    .victim-card.expanded .victim-status-grid,
    #opsSectionAlerts .ops-alert-extra-section .victim-status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .victim-card.expanded .victim-location-grid,
    #opsSectionAlerts .ops-alert-extra-section .victim-location-grid {
        grid-template-columns: 1fr !important;
    }

    .victim-card.expanded .victim-mini-map,
    #opsSectionAlerts .ops-alert-extra-section .victim-mini-map {
        min-height: 150px;
    }

    .victim-card.expanded .victim-actions-grid,
    #opsSectionAlerts .ops-alert-extra-section .victim-actions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .victim-card.expanded .victim-action {
        min-height: 62px;
    }

    .theme-toggle,
    .fab {
        bottom: 10px;
        width: 39px;
        height: 39px;
        z-index: 5700;
    }

    .theme-toggle {
        right: 54px;
    }

    .fab {
        right: 10px;
    }

    .sos-toast {
        left: 8px;
        right: 8px;
        bottom: 58px;
        width: auto;
        max-width: none;
    }
}

@media (max-width: 520px) {
    :root {
        --mobile-header-offset: 116px;
    }

    header {
        grid-template-columns: 40px minmax(0, 1fr) auto;
        gap: 5px 6px;
        padding: 6px !important;
    }

    .top-menu {
        width: 40px;
        height: 40px;
    }

    .brand-mark {
        width: 36px !important;
        height: 36px !important;
        flex-basis: 36px !important;
    }

    .brand-copy h1 {
        font-size: 0.86rem !important;
    }

    .brand-copy span {
        font-size: 0.58rem !important;
    }

    .auth-status:not(.logout-shell) {
        display: none !important;
    }

    .logout-btn {
        min-height: 36px;
        padding: 0 9px;
        font-size: 0.68rem;
    }

    .notification-btn {
        width: 36px !important;
        min-height: 36px !important;
    }

    .header-ops-summary .ops-metric {
        flex-basis: 112px;
        min-height: 46px !important;
    }

    .header-ops-summary .ops-metric strong {
        font-size: 0.92rem !important;
    }

    #mainContent {
        padding: 5px 5px 46px !important;
    }

    #map {
        inset: 5px 5px 46px 5px;
    }

    .operations-panel,
    .history-panel {
        inset: var(--mobile-header-offset) 6px 8px 6px !important;
    }

    .victim-dock {
        left: 6px !important;
        right: 6px !important;
        bottom: 6px !important;
        max-height: 78vh;
    }

    .victim-list {
        max-height: calc(78vh - 68px);
    }

    .victim-card .victim-card-main,
    .victim-card-main {
        grid-template-columns: 54px minmax(0, 1fr) 30px !important;
    }

    .victim-avatar-shell,
    .victim-list .victim-avatar-shell {
        width: 50px;
        height: 50px;
    }

    .victim-name,
    .victim-card .victim-name {
        font-size: 0.74rem;
    }

    .victim-hero-meta,
    .victim-card .victim-hero-meta {
        font-size: 0.54rem;
    }

    .victim-card.expanded .victim-details {
        max-height: calc(78vh - 150px) !important;
    }
}

/* === INCIDENTES C4: FORMULARIO Y LISTADO PROFESIONAL === */
.incident-c4-card {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(42, 145, 255, 0.58);
    background:
        radial-gradient(circle at 12% 0%, rgba(0, 140, 255, 0.18), transparent 34%),
        radial-gradient(circle at 100% 10%, rgba(0, 205, 255, 0.08), transparent 30%),
        linear-gradient(180deg, rgba(3, 20, 38, 0.98), rgba(2, 12, 25, 0.98));
    box-shadow:
        0 0 0 1px rgba(0, 166, 255, 0.12),
        0 0 30px rgba(0, 132, 255, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.incident-c4-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, rgba(255,255,255,0.08), transparent 26%, transparent 72%, rgba(0, 196, 255, 0.06));
    opacity: 0.58;
}

.incident-c4-head {
    position: relative;
    z-index: 1;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px 12px;
}

.incident-c4-heading {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.incident-c4-logo {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #43a8ff;
    background: radial-gradient(circle at 50% 38%, rgba(0, 173, 255, 0.22), rgba(0, 51, 109, 0.18));
    border: 1px solid rgba(46, 150, 255, 0.48);
    box-shadow: 0 0 20px rgba(0, 149, 255, 0.22), inset 0 1px 0 rgba(255,255,255,0.1);
}

.incident-c4-logo.alert {
    color: #ff596b;
    border-color: rgba(255, 65, 86, 0.45);
    background: radial-gradient(circle at 50% 38%, rgba(255, 50, 74, 0.22), rgba(71, 14, 29, 0.24));
    box-shadow: 0 0 22px rgba(255, 52, 82, 0.2), inset 0 1px 0 rgba(255,255,255,0.08);
}

.incident-c4-logo svg,
.incident-c4-mini-btn svg,
.incident-field-label svg,
.incident-control svg,
.incident-primary-action svg,
.incident-secondary-action svg,
.incident-c4-item-icon svg,
.incident-c4-meta-icon svg,
.incident-c4-action svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.incident-c4-heading h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.35rem;
    line-height: 1;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0;
}

.incident-c4-heading p {
    margin: 6px 0 0;
    color: #8eb7df;
    font-size: 0.78rem;
    font-weight: 700;
}

.incident-c4-mini-btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 16px;
    border-radius: 9px;
    border: 1px solid rgba(125, 178, 231, 0.28);
    color: #c9ddf4;
    background: rgba(8, 22, 40, 0.72);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
}

.incident-c4-mini-btn:hover {
    color: #ffffff;
    border-color: rgba(61, 166, 255, 0.56);
    background: rgba(12, 52, 88, 0.82);
}

.incident-c4-mini-btn span {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    color: #49a9ff;
}

.incident-create-form {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 17px;
    padding: 5px 20px 20px;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.incident-form-grid {
    display: grid;
    gap: 16px;
}

.incident-form-grid3 {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.incident-form-grid2 {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.incident-field {
    display: grid !important;
    gap: 8px !important;
    min-width: 0;
}

.incident-field-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #a9c5e7;
    font-size: 0.78rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0;
}

.incident-field-label svg {
    width: 18px;
    height: 18px;
    color: #4aa9ff;
}

.incident-control {
    min-height: 54px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    border-radius: 9px;
    border: 1px solid rgba(137, 170, 210, 0.36);
    color: #9db6d4;
    background: rgba(1, 12, 25, 0.64);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 0 0 1px rgba(0,0,0,0.12);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.incident-control:focus-within {
    border-color: rgba(0, 178, 255, 0.74);
    box-shadow: 0 0 0 1px rgba(0, 178, 255, 0.18), 0 0 18px rgba(0, 145, 255, 0.14);
    background: rgba(2, 17, 34, 0.82);
}

.incident-control-priority {
    border-color: rgba(255, 63, 82, 0.74);
    color: #ff596b;
}

.incident-control > svg {
    width: 24px;
    height: 24px;
}

.incident-control input,
.incident-control select,
.incident-control textarea {
    width: 100%;
    min-width: 0;
    border: 0 !important;
    outline: 0;
    padding: 0 !important;
    color: #f8fbff !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 0.94rem !important;
    font-weight: 650;
}

.incident-control input::placeholder,
.incident-control textarea::placeholder {
    color: rgba(172, 185, 207, 0.65);
}

.incident-control select {
    cursor: pointer;
}

.incident-textarea-control {
    min-height: 98px;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
    padding-top: 15px;
}

.incident-textarea-control textarea {
    min-height: 72px !important;
    resize: vertical;
    line-height: 1.35;
}

.incident-create-actions {
    margin-top: 10px;
    padding-top: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-top: 1px solid rgba(91, 145, 204, 0.18);
}

.incident-primary-action,
.incident-secondary-action {
    min-height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-radius: 9px;
    padding: 0 22px;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 950;
    cursor: pointer;
}

.incident-primary-action {
    min-width: min(100%, 288px);
    border: 1px solid rgba(0, 216, 255, 0.72);
    background: linear-gradient(135deg, #006cff, #0046ca);
    box-shadow: 0 0 24px rgba(0, 127, 255, 0.34), inset 0 1px 0 rgba(255,255,255,0.16);
}

.incident-secondary-action {
    min-width: min(100%, 270px);
    border: 1px solid rgba(130, 170, 210, 0.36);
    color: #a8cff8;
    background: rgba(8, 22, 40, 0.72);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.incident-primary-action span,
.incident-secondary-action span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
}

.incident-create-status {
    min-height: 18px;
    color: #89d7ff;
    font-weight: 800;
}

.incident-list-card {
    padding-bottom: 18px;
}

.incident-list-filter {
    position: relative;
    z-index: 1;
    margin: 0 20px 16px;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(76, 152, 233, 0.2);
    background: rgba(2, 15, 30, 0.62);
}

.incident-list-filter label {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: auto minmax(130px, 220px);
    align-items: center;
    gap: 12px;
    color: #a9c5e7;
    font-size: 0.76rem;
    font-weight: 950;
    text-transform: uppercase;
}

.incident-list-filter select {
    min-height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(100, 165, 235, 0.28);
    color: #ffffff;
    background: rgba(4, 20, 38, 0.9);
    padding: 0 10px;
    outline: 0;
}

.incident-list-count {
    flex: 0 0 auto;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    color: #b9daf9;
    border: 1px solid rgba(74, 169, 255, 0.24);
    background: rgba(6, 42, 77, 0.54);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.incident-c4-list {
    position: relative;
    z-index: 1;
    gap: 14px;
    padding: 0 20px;
}

.incident-c4-item {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 8px 92px minmax(0, 1fr);
    gap: 18px;
    padding: 22px 22px 22px 0;
    border-radius: 14px;
    border: 1px solid rgba(35, 119, 229, 0.56);
    background:
        radial-gradient(circle at 6% 20%, rgba(0, 136, 255, 0.16), transparent 28%),
        linear-gradient(135deg, rgba(2, 20, 39, 0.98), rgba(4, 13, 27, 0.98));
    box-shadow:
        0 0 0 1px rgba(0, 132, 255, 0.08),
        0 12px 30px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255,255,255,0.05);
}

.incident-c4-item.critical {
    border-color: rgba(255, 62, 82, 0.52);
    background:
        radial-gradient(circle at 6% 20%, rgba(255, 60, 82, 0.16), transparent 28%),
        linear-gradient(135deg, rgba(24, 14, 30, 0.98), rgba(4, 13, 27, 0.98));
}

.incident-c4-strip {
    position: absolute;
    left: 22px;
    top: 22px;
    bottom: 22px;
    width: 7px;
    border-radius: 99px;
    background: linear-gradient(180deg, #ff3d56, #ff5b6d);
    box-shadow: 0 0 22px rgba(255, 62, 82, 0.42);
}

.incident-c4-item-icon {
    grid-column: 2;
    width: 78px;
    height: 78px;
    align-self: start;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #ff4e61;
    border: 1px solid rgba(255, 71, 93, 0.28);
    background:
        radial-gradient(circle at 50% 40%, rgba(255, 65, 86, 0.24), transparent 48%),
        rgba(33, 16, 32, 0.82);
    box-shadow: 0 0 24px rgba(255, 60, 82, 0.18), inset 0 1px 0 rgba(255,255,255,0.06);
}

.incident-c4-item-icon svg {
    width: 42px;
    height: 42px;
    stroke-width: 1.9;
}

.incident-c4-content {
    grid-column: 3;
    min-width: 0;
    display: grid;
    gap: 18px;
}

.incident-c4-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid rgba(98, 143, 195, 0.2);
    padding-bottom: 16px;
}

.incident-c4-title-copy {
    min-width: 0;
}

.incident-c4-title-copy h4 {
    margin: 0;
    color: #ffffff;
    font-size: 1.16rem;
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: 0;
}

.incident-c4-title-copy p {
    margin: 8px 0 0;
    color: #8fb0d3;
    font-size: 0.9rem;
    font-weight: 750;
}

.incident-c4-title-copy p span {
    color: #47749d;
    margin: 0 8px;
}

.incident-c4-badges {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.incident-c4-priority,
.incident-c4-status {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border-radius: 9px;
    font-size: 0.86rem;
    font-weight: 950;
    text-transform: uppercase;
}

.incident-c4-priority {
    color: #ff5c6d;
    border: 1px solid rgba(255, 64, 87, 0.68);
    background: rgba(255, 46, 72, 0.12);
    box-shadow: 0 0 20px rgba(255, 54, 78, 0.16);
}

.incident-c4-priority.high,
.incident-c4-priority.medium {
    color: #ffc36d;
    border-color: rgba(255, 166, 42, 0.58);
    background: rgba(255, 157, 22, 0.12);
}

.incident-c4-priority.low {
    color: #8fddff;
    border-color: rgba(55, 170, 255, 0.48);
    background: rgba(55, 145, 255, 0.1);
}

.incident-c4-status {
    color: #9eb5ce;
    border: 1px solid rgba(142, 174, 210, 0.36);
    background: rgba(97, 124, 155, 0.11);
}

.incident-c4-status.open,
.incident-c4-status.assigned,
.incident-c4-status.in_progress {
    color: #8ef5c1;
    border-color: rgba(46, 213, 115, 0.42);
    background: rgba(46, 213, 115, 0.1);
}

.incident-c4-status.closed {
    color: #9eb5ce;
}

.incident-c4-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.incident-c4-meta-cell {
    min-width: 0;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 6px 0;
}

.incident-c4-meta-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #348fff;
}

.incident-c4-meta-icon svg {
    width: 34px;
    height: 34px;
}

.incident-c4-meta-cell span {
    display: block;
    color: #8db0d5;
    font-size: 0.84rem;
    font-weight: 800;
}

.incident-c4-meta-cell strong {
    display: block;
    margin-top: 4px;
    color: #ffffff;
    font-size: 0.98rem;
    line-height: 1.15;
    font-weight: 950;
}

.incident-c4-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.incident-c4-action {
    min-height: 56px;
    min-width: 142px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-radius: 9px;
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 950;
    cursor: pointer;
}

.incident-c4-action span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
}

.incident-c4-action.map {
    border: 1px solid rgba(50, 147, 255, 0.58);
    color: #d8ecff;
    background: rgba(7, 31, 58, 0.82);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.incident-c4-action.close {
    border: 1px solid rgba(255, 75, 95, 0.66);
    background: linear-gradient(180deg, rgba(222, 49, 66, 0.94), rgba(155, 22, 42, 0.96));
    box-shadow: 0 0 24px rgba(255, 57, 82, 0.24), inset 0 1px 0 rgba(255,255,255,0.16);
}

.incident-empty-state {
    min-height: 120px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    border: 1px dashed rgba(92, 170, 255, 0.32);
    color: #99b8d8;
    background: rgba(5, 22, 42, 0.58);
    font-weight: 800;
}

@media (max-width: 1360px) {
    .incident-form-grid3 {
        grid-template-columns: 1fr;
    }

    .incident-c4-item {
        grid-template-columns: 7px 72px minmax(0, 1fr);
        gap: 13px;
    }

    .incident-c4-item-icon {
        width: 62px;
        height: 62px;
        border-radius: 13px;
    }

    .incident-c4-item-icon svg {
        width: 34px;
        height: 34px;
    }

    .incident-c4-title-row,
    .incident-c4-meta-grid,
    .incident-c4-actions {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .incident-c4-badges {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .incident-c4-card {
        border-radius: 12px;
    }

    .incident-c4-head {
        min-height: 58px;
        padding: 12px 12px 8px;
        align-items: flex-start;
    }

    .incident-c4-logo {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
        border-radius: 9px;
    }

    .incident-c4-logo svg {
        width: 19px;
        height: 19px;
    }

    .incident-c4-heading {
        gap: 9px;
    }

    .incident-c4-heading h3 {
        font-size: 0.96rem;
    }

    .incident-c4-heading p {
        font-size: 0.62rem;
    }

    .incident-c4-mini-btn {
        min-height: 34px;
        padding: 0 9px;
        font-size: 0.68rem;
    }

    .incident-c4-mini-btn span,
    .incident-c4-mini-btn svg {
        width: 17px;
        height: 17px;
    }

    .incident-create-form {
        gap: 12px;
        padding: 4px 12px 14px;
    }

    .incident-form-grid,
    .incident-form-grid2,
    .incident-form-grid3 {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .incident-field-label {
        font-size: 0.68rem;
    }

    .incident-control {
        min-height: 46px;
        grid-template-columns: 28px minmax(0, 1fr);
        padding: 0 10px;
    }

    .incident-control > svg {
        width: 19px;
        height: 19px;
    }

    .incident-control input,
    .incident-control select,
    .incident-control textarea {
        font-size: 0.82rem !important;
    }

    .incident-create-actions,
    .incident-c4-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .incident-primary-action,
    .incident-secondary-action,
    .incident-c4-action {
        width: 100%;
        min-width: 0;
        min-height: 48px;
        font-size: 0.82rem;
    }

    .incident-list-filter {
        margin: 0 12px 12px;
        display: grid;
        gap: 8px;
    }

    .incident-list-filter label {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .incident-list-count {
        justify-content: center;
    }

    .incident-c4-list {
        padding: 0 12px;
        gap: 10px;
    }

    .incident-c4-item {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px;
    }

    .incident-c4-strip {
        left: 12px;
        top: 12px;
        bottom: auto;
        width: 52px;
        height: 5px;
    }

    .incident-c4-item-icon {
        grid-column: 1;
        width: 54px;
        height: 54px;
        margin-left: 0;
    }

    .incident-c4-content {
        grid-column: 1;
        gap: 12px;
    }

    .incident-c4-title-row {
        gap: 11px;
        padding-bottom: 12px;
    }

    .incident-c4-title-copy h4 {
        font-size: 0.9rem;
    }

    .incident-c4-title-copy p {
        font-size: 0.72rem;
    }

    .incident-c4-priority,
    .incident-c4-status {
        min-height: 30px;
        padding: 0 10px;
        font-size: 0.68rem;
    }

    .incident-c4-meta-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .incident-c4-meta-cell {
        grid-template-columns: 32px minmax(0, 1fr);
        gap: 8px;
    }

    .incident-c4-meta-icon,
    .incident-c4-meta-icon svg {
        width: 28px;
        height: 28px;
    }

    .incident-c4-meta-cell span {
        font-size: 0.7rem;
    }

    .incident-c4-meta-cell strong {
        font-size: 0.82rem;
    }
}

/* === C4 GLOBAL MODULE DESIGN === */
#opsPanel .ops-scroll {
    gap: 14px;
}

#opsPanel .ops-section {
    gap: 14px;
}

#opsPanel .ops-section:not(#opsSectionIncidentsCreate):not(#opsSectionIncidentsList) > .ops-toolbar,
#opsPanel .ops-section:not(#opsSectionIncidentsCreate):not(#opsSectionIncidentsList) > .ops-form,
#opsPanel .ops-section:not(#opsSectionIncidentsCreate):not(#opsSectionIncidentsList) > .ops-summary,
#opsPanel .ops-section:not(#opsSectionIncidentsCreate):not(#opsSectionIncidentsList) > .ops-list,
#historyPanel .hp-controls,
#historyPanel .hp-tabs,
#historyPanel .hp-table,
#opsSectionAssignedIncident .patrol-incident-card,
#opsSectionAssignedIncident .patrol-action-card {
    position: relative;
    border: 1px solid rgba(42, 145, 255, 0.34);
    background:
        radial-gradient(circle at 12% 0%, rgba(29, 146, 255, 0.18), transparent 38%),
        radial-gradient(circle at 88% 18%, rgba(0, 219, 255, 0.09), transparent 34%),
        linear-gradient(145deg, rgba(2, 18, 36, 0.97), rgba(3, 35, 58, 0.94));
    box-shadow:
        0 18px 42px rgba(0, 10, 26, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        inset 0 0 32px rgba(0, 151, 255, 0.05);
}

#opsPanel .ops-section:not(#opsSectionIncidentsCreate):not(#opsSectionIncidentsList) > .ops-toolbar {
    min-height: 62px;
    padding: 14px 16px;
    border-radius: 16px 16px 10px 10px;
    border-bottom-color: rgba(42, 145, 255, 0.34);
}

#opsPanel .ops-toolbar h3,
#historyPanel .hp-title,
#opsSectionAssignedIncident .patrol-card-head h3,
#opsSectionAssignedIncident .patrol-action-card h3 {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #f7fbff;
    font-size: 1rem;
    font-weight: 950;
    line-height: 1.15;
    letter-spacing: 0;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.42);
}

#opsPanel .ops-toolbar h3::before,
#historyPanel .hp-title::before,
#opsSectionAssignedIncident .patrol-card-head h3::before,
#opsSectionAssignedIncident .patrol-action-card h3::before {
    content: "";
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 11px;
    border: 1px solid rgba(55, 162, 255, 0.55);
    background:
        linear-gradient(135deg, rgba(0, 194, 255, 0.2), rgba(0, 92, 255, 0.18)),
        rgba(3, 23, 46, 0.92);
    box-shadow:
        0 0 24px rgba(0, 153, 255, 0.2),
        inset 0 0 18px rgba(15, 118, 255, 0.18);
}

#opsPanel .ops-toolbar .ops-btn,
#historyPanel .hp-btn-search,
#historyPanel .hp-btn-export {
    min-height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid rgba(120, 183, 255, 0.3);
    background: linear-gradient(180deg, rgba(15, 70, 122, 0.82), rgba(8, 31, 61, 0.92));
    color: #dbeeff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#opsPanel .ops-toolbar .ops-btn:hover,
#historyPanel .hp-btn-search:hover,
#historyPanel .hp-btn-export:hover {
    opacity: 1;
    transform: translateY(-1px);
    border-color: rgba(82, 177, 255, 0.64);
    box-shadow: 0 10px 24px rgba(0, 130, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

#opsPanel .ops-section:not(#opsSectionIncidentsCreate):not(#opsSectionIncidentsList) > .ops-form {
    display: grid;
    gap: 15px;
    padding: 16px;
    border-radius: 14px;
}

#opsPanel .ops-form label,
#historyPanel .hp-date-row label {
    color: #a9c8eb;
    font-size: 0.74rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0;
}

#opsPanel .ops-form input,
#opsPanel .ops-form select,
#opsPanel .ops-form textarea,
#opsPanel .ops-item textarea,
#historyPanel .hp-controls select,
#historyPanel .hp-controls input {
    min-height: 46px;
    border-radius: 11px;
    border: 1px solid rgba(92, 166, 255, 0.28);
    background:
        linear-gradient(180deg, rgba(3, 18, 36, 0.93), rgba(4, 26, 48, 0.9));
    color: #f4f9ff;
    font-size: 0.9rem;
    font-weight: 750;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 0 18px rgba(0, 0, 0, 0.14);
}

#opsPanel .ops-form textarea,
#opsPanel .ops-item textarea {
    min-height: 94px;
    line-height: 1.45;
}

#opsPanel .ops-form input::placeholder,
#opsPanel .ops-form textarea::placeholder,
#historyPanel .hp-controls input::placeholder {
    color: rgba(181, 202, 226, 0.56);
}

#opsPanel .ops-form input:focus,
#opsPanel .ops-form select:focus,
#opsPanel .ops-form textarea:focus,
#opsPanel .ops-item textarea:focus,
#historyPanel .hp-controls select:focus,
#historyPanel .hp-controls input:focus {
    outline: none;
    border-color: rgba(0, 194, 255, 0.88);
    box-shadow:
        0 0 0 3px rgba(0, 174, 255, 0.12),
        0 0 24px rgba(0, 153, 255, 0.18),
        inset 0 0 20px rgba(0, 111, 255, 0.08);
}

#opsPanel .ops-grid2,
#opsPanel .ops-grid3 {
    gap: 12px;
}

#opsPanel .ops-actions {
    gap: 10px;
}

#opsPanel .ops-section:not(#opsSectionAlerts) .ops-actions .ops-btn,
#opsPanel .ops-form > .ops-btn,
#opsSectionAssignedIncident .patrol-action-btn {
    min-height: 48px;
    border-radius: 11px;
    border: 1px solid rgba(55, 165, 255, 0.48);
    background: linear-gradient(180deg, #12b7db, #045ed0);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 950;
    box-shadow: 0 12px 26px rgba(0, 104, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

#opsPanel .ops-section:not(#opsSectionAlerts) .ops-actions .ops-btn.secondary,
#opsPanel .ops-form > .ops-btn.secondary,
#opsSectionAssignedIncident .patrol-action-btn.outline,
#opsSectionAssignedIncident .patrol-action-btn.slate {
    background: linear-gradient(180deg, rgba(18, 49, 82, 0.92), rgba(8, 27, 53, 0.96));
    color: #d8ecff;
    border-color: rgba(120, 183, 255, 0.32);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#opsPanel .ops-section:not(#opsSectionAlerts) .ops-actions .ops-btn.danger,
#opsPanel .ops-form > .ops-btn.danger,
#opsSectionAssignedIncident .patrol-action-btn.rose,
#opsSectionAssignedIncident .patrol-action-btn.outline.muted {
    background: linear-gradient(180deg, #ff5264, #c01834);
    border-color: rgba(255, 113, 128, 0.7);
    box-shadow: 0 12px 26px rgba(255, 43, 70, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

#opsSectionAssignedIncident .patrol-action-btn.bronze {
    background: linear-gradient(180deg, #c8872a, #725436);
    border-color: rgba(255, 194, 93, 0.48);
}

#opsPanel .ops-section:not(#opsSectionIncidentsCreate):not(#opsSectionIncidentsList) > .ops-list {
    gap: 11px;
    padding: 10px;
    border-radius: 14px;
}

#opsPanel .ops-section:not(#opsSectionAlerts):not(#opsSectionIncidentsCreate):not(#opsSectionIncidentsList) .ops-list > .ops-item,
#historyPanel .hp-table table {
    overflow: hidden;
    border-radius: 13px;
    border: 1px solid rgba(74, 155, 255, 0.28);
    border-left: 5px solid rgba(0, 153, 255, 0.8);
    background:
        radial-gradient(circle at 0% 0%, rgba(21, 143, 255, 0.16), transparent 40%),
        linear-gradient(145deg, rgba(4, 25, 47, 0.98), rgba(4, 38, 64, 0.96));
    box-shadow: 0 14px 30px rgba(0, 11, 28, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#opsPanel .ops-section:not(#opsSectionAlerts) .ops-item.critical {
    border-left-color: rgba(255, 69, 91, 0.94);
    background:
        radial-gradient(circle at 0% 0%, rgba(255, 59, 82, 0.18), transparent 42%),
        linear-gradient(145deg, rgba(44, 13, 26, 0.98), rgba(4, 28, 52, 0.95));
}

#opsPanel .ops-row {
    align-items: center;
    min-height: 28px;
    color: #dceaff;
    font-size: 0.86rem;
    line-height: 1.35;
}

#opsPanel .ops-row .muted {
    color: #8fb1d5;
    font-weight: 850;
    text-transform: uppercase;
    font-size: 0.7rem;
}

#opsPanel .ops-name {
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 950;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.36);
}

#opsPanel .ops-badge,
#historyPanel .badge-type,
#historyPanel .badge-resolved {
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(50, 82, 116, 0.55);
    color: #dcecff;
    font-size: 0.68rem;
    font-weight: 950;
}

#opsPanel .ops-badge.pending,
#opsPanel .ops-badge.high,
#opsPanel .ops-badge.critical,
#historyPanel .badge-type.SOS,
#historyPanel .badge-resolved.no {
    border-color: rgba(255, 80, 100, 0.5);
    background: rgba(255, 48, 76, 0.16);
    color: #ff7d8c;
}

#opsPanel .ops-badge.in_progress,
#opsPanel .ops-badge.medium,
#opsPanel .ops-badge.assigned,
#historyPanel .badge-type.TRACKING {
    border-color: rgba(255, 180, 58, 0.48);
    background: rgba(255, 174, 40, 0.14);
    color: #ffc66b;
}

#opsPanel .ops-badge.resolved,
#opsPanel .ops-badge.available,
#opsPanel .ops-badge.open,
#historyPanel .badge-type.LOCATION,
#historyPanel .badge-resolved.yes {
    border-color: rgba(38, 224, 114, 0.44);
    background: rgba(0, 201, 83, 0.14);
    color: #64f59b;
}

#opsPanel .ops-badge.admin {
    border-color: rgba(47, 158, 255, 0.5);
    background: rgba(0, 111, 255, 0.18);
    color: #8ed0ff;
}

#opsPanel .ops-badge.supervisor {
    border-color: rgba(73, 222, 128, 0.4);
    background: rgba(34, 197, 94, 0.14);
    color: #9bf6b9;
}

#opsPanel .ops-badge.operator {
    border-color: rgba(168, 85, 247, 0.42);
    background: rgba(124, 58, 237, 0.18);
    color: #d5b8ff;
}

#opsPanel .ops-badge.viewer {
    border-color: rgba(20, 184, 166, 0.42);
    background: rgba(13, 148, 136, 0.18);
    color: #9af8eb;
}

#opsPanel .ops-badge.inactive {
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(71, 85, 105, 0.38);
    color: #cbd5e1;
}

#opsPanel .ops-empty,
#historyPanel .hp-placeholder {
    min-height: 92px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    border: 1px dashed rgba(98, 176, 255, 0.34);
    background: rgba(3, 24, 45, 0.72);
    color: #9dbadd;
    font-size: 0.84rem;
    font-weight: 850;
}

#opsSectionAlerts .ops-alert-guidance {
    border: 1px solid rgba(42, 145, 255, 0.32);
    border-radius: 14px;
    padding: 13px 15px;
    background:
        linear-gradient(145deg, rgba(5, 31, 57, 0.97), rgba(2, 49, 74, 0.9));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#opsSectionAlerts .ops-alert-guidance strong {
    color: #f7fbff;
    font-size: 0.83rem;
}

#opsSectionAlerts .ops-alert-guidance span {
    color: #bfd5ed;
    font-size: 0.78rem;
}

#opsSectionKpis .ops-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
}

#opsSectionKpis .ops-metric {
    min-height: 98px;
    border-radius: 14px;
    border: 1px solid rgba(42, 145, 255, 0.32);
    border-left: 5px solid rgba(0, 153, 255, 0.9);
    background:
        radial-gradient(circle at 82% 10%, rgba(0, 209, 255, 0.13), transparent 36%),
        linear-gradient(145deg, rgba(4, 30, 56, 0.98), rgba(3, 44, 70, 0.94));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 14px 28px rgba(0, 11, 28, 0.22);
}

#opsSectionKpis .ops-metric span {
    color: #9fc0e3;
}

#opsSectionKpis .ops-metric strong {
    color: #ffffff;
}

#opsPanel .ops-photo-upload {
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid rgba(92, 166, 255, 0.26);
    border-radius: 13px;
    background: rgba(2, 20, 39, 0.62);
}

#opsPanel .ops-photo-preview {
    width: 86px;
    height: 86px;
    border-radius: 18px;
    border: 2px solid rgba(42, 210, 120, 0.76);
    box-shadow: 0 0 22px rgba(0, 216, 103, 0.18);
    background-color: rgba(12, 30, 53, 0.9);
}

#opsPanel .ops-photo-controls small {
    color: #8fb1d5;
    font-weight: 750;
}

#opsSectionAssignedIncident .patrol-assigned-view {
    gap: 14px;
}

#opsSectionAssignedIncident .patrol-incident-card,
#opsSectionAssignedIncident .patrol-action-card {
    border-radius: 16px;
    padding: 18px;
}

#opsSectionAssignedIncident .patrol-status-pill {
    border-radius: 999px;
    border: 1px solid rgba(92, 166, 255, 0.3);
    background: rgba(11, 45, 79, 0.72);
    color: #dcecff;
    font-weight: 950;
}

#opsSectionAssignedIncident .patrol-incident-data {
    gap: 10px;
}

#opsSectionAssignedIncident .patrol-incident-data div {
    border-radius: 12px;
    border: 1px solid rgba(92, 166, 255, 0.22);
    background: rgba(3, 20, 38, 0.58);
    padding: 11px 12px;
}

#opsSectionAssignedIncident .patrol-incident-data dt {
    color: #8fb1d5;
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
}

#opsSectionAssignedIncident .patrol-incident-data dd {
    color: #ffffff;
    font-size: 0.94rem;
    font-weight: 850;
}

#historyPanel .hp-header {
    min-height: 58px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(42, 145, 255, 0.26);
    background:
        linear-gradient(145deg, rgba(3, 19, 36, 0.98), rgba(4, 36, 63, 0.94));
}

#historyPanel .hp-header button {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    border: 1px solid rgba(120, 183, 255, 0.3);
    background: rgba(8, 29, 55, 0.86);
    color: #dbeeff;
}

#historyPanel .hp-controls {
    gap: 10px;
    padding: 14px;
    border-radius: 0;
    border-left: none;
    border-right: none;
}

#historyPanel .hp-tabs {
    gap: 8px;
    padding: 10px;
    border-left: none;
    border-right: none;
    border-radius: 0;
}

#historyPanel .hp-tab {
    min-height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(92, 166, 255, 0.22);
    background: rgba(5, 27, 51, 0.82);
    color: #9fc0e3;
    font-weight: 900;
}

#historyPanel .hp-tab.active {
    color: #ffffff;
    border-color: rgba(0, 194, 255, 0.72);
    background: linear-gradient(180deg, #11b6dc, #0562d5);
    box-shadow: 0 10px 24px rgba(0, 104, 255, 0.22);
}

#historyPanel .hp-table {
    border-radius: 0;
    border-left: none;
    border-right: none;
}

#historyPanel .hp-table th {
    background: rgba(7, 28, 52, 0.98);
    color: #a9c8eb;
    font-weight: 950;
}

#historyPanel .hp-table td {
    color: #dceaff;
    border-bottom-color: rgba(92, 166, 255, 0.12);
}

#historyPanel .hp-table tr:hover,
#historyPanel .hp-table tr.selected {
    background: rgba(0, 122, 255, 0.16);
}

@media (max-width: 1280px) {
    #opsPanel .ops-grid3,
    #opsSectionKpis .ops-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    #opsPanel .ops-section:not(#opsSectionIncidentsCreate):not(#opsSectionIncidentsList) > .ops-toolbar {
        min-height: 54px;
        padding: 11px 12px;
        border-radius: 12px;
    }

    #opsPanel .ops-toolbar h3,
    #historyPanel .hp-title,
    #opsSectionAssignedIncident .patrol-card-head h3,
    #opsSectionAssignedIncident .patrol-action-card h3 {
        font-size: 0.88rem;
    }

    #opsPanel .ops-toolbar h3::before,
    #historyPanel .hp-title::before,
    #opsSectionAssignedIncident .patrol-card-head h3::before,
    #opsSectionAssignedIncident .patrol-action-card h3::before {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
        border-radius: 9px;
    }

    #opsPanel .ops-section:not(#opsSectionIncidentsCreate):not(#opsSectionIncidentsList) > .ops-form,
    #opsPanel .ops-section:not(#opsSectionIncidentsCreate):not(#opsSectionIncidentsList) > .ops-list {
        padding: 12px;
        border-radius: 12px;
    }

    #opsPanel .ops-grid2,
    #opsPanel .ops-grid3,
    #opsSectionKpis .ops-summary {
        grid-template-columns: 1fr;
    }

    #opsPanel .ops-form input,
    #opsPanel .ops-form select,
    #opsPanel .ops-form textarea,
    #opsPanel .ops-item textarea {
        min-height: 44px;
        font-size: 0.84rem;
    }

    #opsPanel .ops-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    #opsPanel .ops-section:not(#opsSectionAlerts) .ops-actions .ops-btn,
    #opsPanel .ops-form > .ops-btn,
    #opsSectionAssignedIncident .patrol-action-btn {
        width: 100%;
        min-height: 46px;
    }

    #opsPanel .ops-photo-upload {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    #opsPanel .ops-row {
        align-items: flex-start;
        gap: 8px;
    }

    #opsPanel .ops-row:not(:first-child) {
        flex-direction: column;
    }

    #historyPanel .hp-actions {
        display: grid;
        grid-template-columns: 1fr 86px;
    }
}

/* Compact monitor cards for the "Ver incidentes" submenu. */
#opsSectionIncidentsList .incident-list-card {
    border-radius: 15px;
}

#opsSectionIncidentsList .incident-c4-list {
    gap: 9px;
    padding: 0 10px 12px;
}

#opsSectionIncidentsList .incident-c4-item {
    grid-template-columns: 4px 38px minmax(0, 1fr);
    gap: 9px;
    padding: 10px 10px 10px 0;
    border-radius: 12px;
    min-height: 0;
}

#opsSectionIncidentsList .incident-c4-strip {
    left: 10px;
    top: 10px;
    bottom: 10px;
    width: 4px;
    box-shadow: 0 0 12px rgba(255, 62, 82, 0.34);
}

#opsSectionIncidentsList .incident-c4-item-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    margin-left: 4px;
    box-shadow: 0 0 14px rgba(255, 60, 82, 0.14), inset 0 1px 0 rgba(255,255,255,0.06);
}

#opsSectionIncidentsList .incident-c4-item-icon svg {
    width: 22px;
    height: 22px;
}

#opsSectionIncidentsList .incident-c4-content {
    gap: 8px;
}

#opsSectionIncidentsList .incident-c4-title-row {
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 8px;
}

#opsSectionIncidentsList .incident-c4-title-copy h4 {
    display: grid;
    gap: 2px;
    font-size: 0.78rem;
    line-height: 1.18;
}

#opsSectionIncidentsList .incident-c4-folio {
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#opsSectionIncidentsList .incident-c4-title-text {
    color: #cfe4ff;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#opsSectionIncidentsList .incident-c4-title-copy p {
    margin-top: 3px;
    font-size: 0.66rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#opsSectionIncidentsList .incident-c4-title-copy p span {
    margin: 0 5px;
}

#opsSectionIncidentsList .incident-c4-badges {
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

#opsSectionIncidentsList .incident-c4-priority,
#opsSectionIncidentsList .incident-c4-status {
    min-height: 24px;
    padding: 0 8px;
    border-radius: 7px;
    font-size: 0.58rem;
    letter-spacing: 0;
}

#opsSectionIncidentsList .incident-c4-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

#opsSectionIncidentsList .incident-c4-meta-cell {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 6px;
    padding: 0;
}

#opsSectionIncidentsList .incident-c4-meta-icon {
    width: 22px;
    height: 22px;
}

#opsSectionIncidentsList .incident-c4-meta-icon svg {
    width: 18px;
    height: 18px;
}

#opsSectionIncidentsList .incident-c4-meta-cell span {
    font-size: 0.6rem;
    line-height: 1.1;
}

#opsSectionIncidentsList .incident-c4-meta-cell strong {
    margin-top: 2px;
    font-size: 0.66rem;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#opsSectionIncidentsList .incident-c4-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

#opsSectionIncidentsList .incident-c4-action {
    min-height: 34px;
    min-width: 0;
    gap: 7px;
    border-radius: 8px;
    font-size: 0.72rem;
}

#opsSectionIncidentsList .incident-c4-action span {
    width: 18px;
    height: 18px;
}

#opsSectionIncidentsList .incident-c4-action svg {
    width: 17px;
    height: 17px;
}

@media (max-width: 1360px) {
    #opsSectionIncidentsList .incident-c4-item {
        grid-template-columns: 4px 38px minmax(0, 1fr);
        gap: 9px;
    }

    #opsSectionIncidentsList .incident-c4-title-row {
        flex-direction: row;
        align-items: flex-start;
    }

    #opsSectionIncidentsList .incident-c4-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #opsSectionIncidentsList .incident-c4-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    #opsSectionIncidentsList .incident-c4-list {
        padding: 0 8px 10px;
    }

    #opsSectionIncidentsList .incident-c4-item {
        grid-template-columns: 4px 34px minmax(0, 1fr);
        gap: 8px;
        padding: 9px 9px 9px 0;
    }

    #opsSectionIncidentsList .incident-c4-item-icon {
        width: 34px;
        height: 34px;
    }
}

#opsPanel .ops-filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(112px, 0.44fr) auto;
    align-items: end;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(44, 157, 255, 0.24);
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(0, 148, 255, 0.1), rgba(0, 27, 50, 0.12)),
        rgba(2, 19, 36, 0.74);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

#opsPanel .ops-filter-bar.single {
    grid-template-columns: minmax(0, 1fr) auto;
}

#opsPanel .ops-filter-bar label {
    display: grid;
    gap: 5px;
    color: #a9c6df;
    font-size: 0.64rem;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

#opsPanel .ops-filter-bar input,
#opsPanel .ops-filter-bar select {
    width: 100%;
    min-height: 36px;
    border: 1px solid rgba(83, 162, 234, 0.34);
    border-radius: 9px;
    color: #eaf6ff;
    background: rgba(1, 13, 27, 0.82);
    padding: 0 10px;
    font-size: 0.78rem;
    outline: none;
}

#opsPanel .ops-filter-bar input:focus,
#opsPanel .ops-filter-bar select:focus {
    border-color: rgba(0, 205, 255, 0.72);
    box-shadow: 0 0 0 2px rgba(0, 184, 255, 0.14);
}

/* Native dropdown menus need explicit option colors, otherwise some browsers
   render a white popup with inherited light text. */
#opsPanel select,
#historyPanel select,
.incident-control select,
.incident-list-filter select {
    color-scheme: dark;
}

#opsPanel select option,
#opsPanel select optgroup,
#historyPanel select option,
#historyPanel select optgroup,
.incident-control select option,
.incident-control select optgroup,
.incident-list-filter select option,
.incident-list-filter select optgroup {
    color: #eef8ff;
    background-color: #061a31;
}

#opsPanel select option:checked,
#historyPanel select option:checked,
.incident-control select option:checked,
.incident-list-filter select option:checked {
    color: #ffffff;
    background-color: #0879ff;
}

#opsPanel select option:disabled,
#historyPanel select option:disabled,
.incident-control select option:disabled,
.incident-list-filter select option:disabled {
    color: #7f96ac;
    background-color: #061a31;
}

#opsPanel select option:hover,
#historyPanel select option:hover,
.incident-control select option:hover,
.incident-list-filter select option:hover {
    color: #ffffff;
    background-color: #0b4f91;
}

#opsPanel .ops-filter-count {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: end;
    padding: 0 10px;
    border-radius: 999px;
    color: #cdf0ff;
    background: rgba(10, 50, 86, 0.78);
    border: 1px solid rgba(94, 176, 255, 0.26);
    font-size: 0.68rem;
    font-weight: 900;
    white-space: nowrap;
}

@media (max-width: 760px) {
    #opsPanel .ops-filter-bar,
    #opsPanel .ops-filter-bar.single {
        grid-template-columns: 1fr;
    }

    #opsPanel .ops-filter-count {
        justify-self: start;
    }
}

/* Dispatch submenu cards. */
.incident-c4-logo.route {
    color: #7ee9ff;
    border-color: rgba(0, 217, 255, 0.5);
    background: radial-gradient(circle at 50% 38%, rgba(0, 217, 255, 0.22), rgba(0, 70, 118, 0.2));
    box-shadow: 0 0 22px rgba(0, 217, 255, 0.2), inset 0 1px 0 rgba(255,255,255,0.08);
}

.incident-c4-logo.neutral {
    color: #9cc7ff;
    border-color: rgba(95, 158, 255, 0.44);
    background: radial-gradient(circle at 50% 38%, rgba(46, 150, 255, 0.18), rgba(8, 35, 75, 0.24));
    box-shadow: 0 0 18px rgba(46, 150, 255, 0.18), inset 0 1px 0 rgba(255,255,255,0.08);
}

.dispatch-c4-card {
    margin-bottom: 14px;
    border-radius: 15px;
}

.dispatch-c4-form {
    margin: 0 14px 16px;
}

.dispatch-filter {
    padding: 0 14px 10px;
}

.dispatch-c4-list {
    display: grid;
    gap: 10px;
    padding: 0 14px 16px;
}

.dispatch-c4-item,
.dispatch-unit-item {
    border-color: rgba(37, 161, 255, 0.24);
    background:
        linear-gradient(135deg, rgba(0, 133, 255, 0.12), rgba(0, 27, 48, 0.1)),
        rgba(3, 25, 45, 0.82);
    box-shadow: inset 3px 0 0 rgba(0, 178, 255, 0.55), 0 10px 26px rgba(0,0,0,0.16);
}

.dispatch-c4-item .ops-name,
.dispatch-unit-item .ops-name {
    font-size: 0.82rem;
    line-height: 1.25;
}

.dispatch-c4-item .ops-row,
.dispatch-unit-item .ops-row {
    gap: 10px;
}

.dispatch-c4-item .ops-actions,
.dispatch-unit-item .ops-actions {
    margin-top: 8px;
}

.dispatch-c4-item.unit-available {
    box-shadow: inset 3px 0 0 rgba(30, 218, 104, 0.62), 0 10px 26px rgba(0,0,0,0.16);
}

.dispatch-c4-item.unit-offline {
    box-shadow: inset 3px 0 0 rgba(148, 163, 184, 0.54), 0 10px 26px rgba(0,0,0,0.16);
    opacity: 0.82;
}

@media (max-width: 760px) {
    .dispatch-c4-form {
        margin: 0 10px 12px;
    }

    .dispatch-filter,
    .dispatch-c4-list {
        padding-left: 10px;
        padding-right: 10px;
    }
}

.c4-route-label {
    min-width: 86px;
    padding: 8px 10px;
    border-radius: 9px;
    border: 1px solid rgba(28, 126, 255, 0.45);
    background: rgba(255, 255, 255, 0.94);
    color: #1f2937;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28), 0 0 18px rgba(70, 38, 255, 0.22);
    font-family: Arial, sans-serif;
    text-align: left;
}

.c4-route-label::before {
    content: "";
    position: absolute;
    left: 18px;
    bottom: -7px;
    width: 13px;
    height: 13px;
    transform: rotate(45deg);
    background: rgba(255, 255, 255, 0.94);
    border-right: 1px solid rgba(28, 126, 255, 0.35);
    border-bottom: 1px solid rgba(28, 126, 255, 0.35);
}

.c4-route-label strong {
    display: block;
    color: #e53935;
    font-size: 0.94rem;
    line-height: 1;
    font-weight: 950;
}

.c4-route-label span {
    display: block;
    margin-top: 3px;
    color: #4b5563;
    font-size: 0.72rem;
    line-height: 1;
    font-weight: 800;
}
