:root {
    --bg: #08111f;
    --bg-elev: rgba(10, 20, 38, 0.84);
    --bg-card: rgb(234, 236, 239, 1.0);
    --muted-card: rgba(218, 220, 227, 1.0);
    --muted-card-text: #797f87;
    --text-card: #000;
    --text-info-card: darkblue;
    --line: rgba(130, 178, 255, 0.16);
    --text: #ecf4ff;
    --muted: #90a7c6;
    --gold: #D4AF37;
    --accent: #3da1ff;
    --success: #1ec892;
    --warning: #f8bc3a;
    --danger: #ff5c80;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
    --radius: 20px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: Inter, Segoe UI, Arial, sans-serif; background: var(--bg); color: var(--text); height: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
.glass-panel { backdrop-filter: blur(18px); background: var(--bg-elev); border: 1px solid var(--line); box-shadow: var(--shadow); }
.theme-dark { min-height: 100vh; }
.login-page {
    background: url('/img/skyline.png') no-repeat center center fixed;
    background-size: cover;
}
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 32px; background: linear-gradient(rgba(8, 17, 31, 0.9), rgba(8, 17, 31, 0.0)); position: relative; }
.branding-top-left { position: absolute; top: 32px; left: 32px; }
.branding-top-left img { height: 100px; width: auto; }
.login-container { display: flex; align-items: stretch; gap: 40px; max-width: 1000px; width: 100%; }
.login-info { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 20px; }
.info-line-1 { font-size: 1.0rem; font-weight: 300; color: var(--accent); letter-spacing: 0.2em; margin: 0 0 10px; font-family: 'Arial', sans-serif; }
.info-line-2 { font-size: 2.4rem; font-weight: 700; margin: 0 0 20px; font-family: 'Arial', sans-serif; }
.info-line-3 { font-size: 1rem; color: var(--muted); line-height: 1.6; margin-bottom: 40px; font-family: 'Arial', sans-serif; }
.info-grid { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; margin-top: auto; padding-top: 10px; }
.info-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(61, 161, 255, 0.1);
    border: 1px solid var(--line);
    border-radius: 12px;
    font-size: 1.4rem;
    color: var(--text);
}
.text-upper { font-weight: 400; font-size: 1.0rem; color: var(--text); }
.text-lower { color: var(--muted); font-size: 0.9rem; }
.login-card { width: min(480px, 100%); border-radius: 28px; padding: 32px; flex-shrink: 0; }
.brand-row {
    align-items: center;
    margin-bottom: 18px;
}
.brand-badge {
    width: 100%;
    display: flex;
    justify-content: center;
}
.brand-badge img { width: 100px; height: 100px; }
.eyebrow { margin: 0 0 6px; color: var(--gold); text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; }
.login-card h1 { margin: 0; font-size: 2rem; }
.login-copy { color: var(--muted); line-height: 1.6; margin-bottom: 24px; }
.login-form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.input-container { position: relative; display: flex; align-items: center; }
.input-container i { position: absolute; left: 16px; color: var(--muted); pointer-events: none; }
.input { width: 100%; border-radius: 14px; border: 1px solid var(--muted); background: rgba(7, 15, 29, 0.95); color: var(--text); padding: 14px 16px 14px 44px; transition: border-color 0.2s, box-shadow 0.2s; }
.input[type="password"] { width: 100%; border-radius: 14px; border: 1px solid var(--muted); background: rgba(7, 15, 29, 0.95); color: var(--text); padding: 14px 16px 14px 44px; transition: border-color 0.2s, box-shadow 0.2s; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(61, 161, 255, 0.2); }
.btn-primary, .btn-inline, .btn-ghost { border: 0; border-radius: 14px; cursor: pointer; transition: .2s ease; }
.btn-primary { background: linear-gradient(135deg, #1f7ef1, #42b3ff); color: white; padding: 14px 18px; display: inline-flex; gap: 10px; align-items: center; justify-content: center; }
.btn-inline, .btn-ghost { background: rgba(61, 161, 255, 0.70); color: var(--text); padding: 10px 12px; display: inline-flex; align-items: center; gap: 8px; }
.btn-primary:hover, .btn-inline:hover, .btn-ghost:hover, .rail-btn:hover, .btn-location:hover { transform: translateY(-1px); }

.btn-location {
    background: rgba(61, 161, 255, 0.15);
    border: 1px solid var(--line);
    color: var(--accent);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-location:hover {
    background: var(--accent);
    color: white;
}

.detail-transcript {
    margin: 12px 0 0;
    padding-left: 12px;
    border-left: 3px solid var(--accent);
    font-size: 0.9em;
    color: var(--muted-card-text);
}

/* AI Notes Styling */
.ai-notes-box {
    background: rgba(61, 161, 255, 0.08);
    border: 1px solid rgba(61, 161, 255, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.ai-notes-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #103765;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ai-notes-header i {
    color: var(--accent);
    font-size: 1.1rem;
}

.ai-notes-body {
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
    margin-bottom: 12px;
}

.ai-notes-footer {
    font-size: 0.8rem;
    color: var(--muted-card-text);
    font-style: italic;
    border-top: 1px solid rgba(61, 161, 255, 0.15);
    padding-top: 8px;
}
.alert { padding: 14px 16px; border-radius: 14px; margin-bottom: 18px; }
.alert.danger { background: rgba(255, 92, 128, 0.12); border: 1px solid rgba(255, 92, 128, 0.25); color: #ffd8e1; }
.app-shell { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.top-filters {
    position: relative; inset: auto; z-index: 1010;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    padding: 10px 20px; border-bottom: 1px solid var(--line); border-radius: 0;
    background: linear-gradient(180deg, rgba(18, 32, 58, 0.92), rgba(10, 20, 38, 0.82));
}
.top-filters::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(61, 161, 255, 0.5), transparent);
}

.brand-inline { display: flex; align-items: center; gap: 14px; }
.brand-inline .logo { height: 52px; width: auto; }
.brand-titles { display: flex; flex-direction: column; line-height: 1.15; padding-left: 14px; border-left: 1px solid var(--line); }
.brand-title { font-size: 1.02rem; font-weight: 600; letter-spacing: 0.02em; color: var(--text); }
.brand-sub { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.05em; }

.header-center { display: flex; align-items: center; gap: 16px; }
.live-badge {
    display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px;
    border: 1px solid var(--line); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em;
    text-transform: uppercase; white-space: nowrap; transition: all 0.3s ease;
}
.live-badge .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); transition: background 0.3s ease; }
.live-badge.is-live { background: rgba(30, 200, 146, 0.12); border-color: rgba(30, 200, 146, 0.35); color: var(--success); }
.live-badge.is-live .live-dot { background: var(--success); animation: livePulse 1.8s infinite; }
.live-badge.is-off { background: rgba(144, 167, 198, 0.08); color: var(--muted); }
.live-badge.is-off .live-dot { background: var(--muted); animation: none; }
@keyframes livePulse {
    0% { box-shadow: 0 0 0 0 rgba(30, 200, 146, 0.55); }
    70% { box-shadow: 0 0 0 7px rgba(30, 200, 146, 0); }
    100% { box-shadow: 0 0 0 0 rgba(30, 200, 146, 0); }
}

.user-dropdown-container { display: flex; align-items: center; gap: 12px; }
.user-chip {
    display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 5px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); color: var(--text);
    cursor: pointer; transition: all 0.18s ease;
}
.user-chip:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(61, 161, 255, 0.4); }
.user-chip .user-name { font-size: 0.88rem; font-weight: 500; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .fa-chevron-down { font-size: 0.7rem; color: var(--muted); }
.user-initials {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(180deg, var(--accent), #2b8be6); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; flex-shrink: 0;
}
.dropdown { position: relative; }
.dropdown-toggle { display: flex; align-items: center; gap: 8px; padding: 8px 12px; }
.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 180px;
    background: var(--bg-elev);
    backdrop-filter: blur(18px);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: none;
    flex-direction: column;
    padding: 8px;
    z-index: 1100;
}
.dropdown.show .dropdown-menu { display: flex; }
.dropdown-item {
    padding: 10px 14px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
    color: var(--text);
    font-size: 0.9rem;
}
.dropdown-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--accent); }
.main-content { display: flex; flex: 1; overflow: hidden; position: relative; }
.left-rail { position: relative; top: auto; left: auto; z-index: 1010; width: 114px; border-radius: 0; border-top: 0; border-bottom: 0; padding: 12px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.rail-btn {
    width: 88px;
    height: 78px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 14px;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 8px;
}
.rail-btn i { font-size: 1.35rem; transition: transform 0.2s ease; }
.rail-btn span { font-size: 0.68rem; font-weight: 500; text-align: center; }
.rail-btn:hover { background: rgba(255, 255, 255, 0.05); border-color: var(--line); color: var(--text); }
.rail-btn:hover i { transform: scale(1.08); }
.rail-btn.active {
    border-color: rgba(61, 161, 255, 0.35);
    color: var(--accent);
    background: rgba(61, 161, 255, 0.12);
    box-shadow: inset 0 0 12px rgba(61, 161, 255, 0.12);
}
.rail-footer {
    margin-top: auto;
    padding-top: 16px;
    padding-bottom: 6px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    border-top: 1px solid var(--line);
}
.rail-footer img { width: 62px; height: auto; border-radius: 6px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.08); }
.rail-country { font-size: 0.6rem; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }
.cr-flag {
    width: 60px;
    height: 36px;
    display: flex;
    flex-direction: column;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
}
.cr-flag .stripe { width: 100%; flex: 1; }
.cr-flag .stripe.blue { background: #002B7F; }
.cr-flag .stripe.white { background: #FFFFFF; }
.cr-flag .stripe.red { background: #EF3340; flex: 2; }
.floating-panel-stack { position: relative; top: auto; left: auto; bottom: auto; width: 420px; z-index: 1000; pointer-events: auto; transition: width 0.3s ease; }
.floating-panel-stack.collapsed { width: 0; }
.floating-panel-stack.collapsed .side-panel { transform: translateX(-420px); opacity: 0; }
.floating-panel-stack.collapsed .panel-collapse-btn { right: -24px; border-left: 1px solid var(--line); border-radius: 8px; }

.panel-collapse-btn {
    position: absolute;
    top: 50%;
    right: -12px;
    transform: translateY(-50%);
    width: 24px;
    height: 48px;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-left: 0;
    border-radius: 0 8px 8px 0;
    color: var(--muted);
    cursor: pointer;
    z-index: 1010;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(18px);
    transition: all 0.2s ease;
}
.panel-collapse-btn:hover {
    color: var(--accent);
    padding-left: 4px;
}
.side-panel { position: absolute; inset: 0; border-radius: 0; border-top: 0; border-bottom: 0; padding: 0; opacity: 0; transform: translateX(-18px); transition: .24s ease; pointer-events: none; overflow: hidden; display: flex; flex-direction: column; }
.side-panel.visible { opacity: 1; transform: translateX(0); pointer-events: auto; }
.panel-wide { width: 760px; }
.map-wrapper { flex: 1; position: relative; background: #000; }
.map-wrapper::before, .map-wrapper::after { content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.map-wrapper::before { width: 40px; background: linear-gradient(to right, rgba(8, 17, 31, 0.8), transparent); }
.map-wrapper::after { height: 40px; background: linear-gradient(to bottom, rgba(8, 17, 31, 0.8), transparent); }
#map { position: absolute; inset: 0; }
.panel-header-fixed { padding: 20px 20px 10px; border-bottom: 1px solid var(--line); background: var(--bg-elev); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.panel-head h2 { margin: 0; font-size: 1.1rem; }
.filters-group {
    display: flex; align-items: center; gap: 12px;
    padding: 6px 12px 6px 14px; border-radius: 14px;
    background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
}
.filters-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.filters-grid { display: flex; gap: 8px; align-items: center; }
.toggle-pill { position: relative; cursor: pointer; }
.toggle-pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-pill i {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 11px;
    color: var(--muted);
    transition: all 0.18s ease;
    font-size: 1.05rem;
}
.toggle-pill:hover i { background: rgba(255, 255, 255, 0.1); color: var(--text); transform: translateY(-1px); }
.toggle-pill input:checked + i {
    background: linear-gradient(180deg, var(--accent), #2b8be6);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 4px 14px rgba(61, 161, 255, 0.35);
}

.incident-filters { display: grid; gap: 12px; margin-bottom: 10px; }
.dark-input { background: rgba(0, 0, 0, 0.3) !important; border-color: var(--line) !important; }
.criticity-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.criticity-pill { position: relative; }
.criticity-pill input { position: absolute; opacity: 0; }
.criticity-pill span { display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--line); padding: 6px 12px; color: var(--muted); background: rgba(255,255,255,.02); cursor: pointer; font-size: 0.75rem; transition: all 0.2s; }
.criticity-pill input:checked + span { color: var(--text); border-color: rgba(255, 255, 255, 0.4); }

.criticity-pill.critica input:checked + span { background: var(--danger); color: white; border-color: var(--danger); }
.criticity-pill.alta input:checked + span { background: #ff7e9d; color: white; border-color: #ff7e9d; }
.criticity-pill.media input:checked + span { background: var(--warning); color: #000; border-color: var(--warning); }
.criticity-pill.baja input:checked + span { background: var(--success); color: white; border-color: var(--success); }
.criticity-pill.all input:checked + span { background: var(--accent); color: white; border-color: var(--accent); }

.scrollable-list { flex: 1; overflow-y: auto; padding: 20px; display: grid; gap: 14px; }
.case-list { display: grid; gap: 14px; }
.case-card, .prediction-card { border-radius: 20px; padding: 16px; background: var(--bg-card); color: var(--text-info-card); border: 1px solid var(--line); cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.case-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.case-card.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.case-card.muted { background: var(--muted-card); color: var(--muted-card-text); }
.case-top, .case-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.case-card h3, .prediction-card h3 { margin: 12px 0 8px; }
.case-card p, .prediction-card p { margin: 0 0 10px; color: var(--text-info-card); line-height: 1.5; }
.pill { display: inline-flex; align-items: center; padding: 8px 10px; border-radius: 999px; font-size: .82rem; }
.pill.danger { background: rgba(255, 92, 128, .14); color: #ffdce5; }
.pill.info { background: rgba(61, 161, 255, .14); color: #cde6ff; }
.pill.info.black { background: rgba(61, 161, 255, .14); color: var(--text-info-card); }
.priority { border-radius: 999px; padding: 6px 10px; font-size: .78rem; }
.priority.alta, .priority.critica { background: rgba(255, 92, 128, .70); color: #ffd9e2; }
.priority.media { background: rgba(248, 188, 58, .70); color: #ffe5ac; }
.priority.baja { background: rgba(30, 200, 146, .70); color: #d1f7ea; }
.incident-closed-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(255, 92, 128, .16);
    color: var(--danger);
    border: 1px solid rgba(255, 92, 128, .35);
    border-radius: 10px;
    font-weight: 600;
    font-size: .9rem;
}
.incident-detail-card {
    top: 0;
    left: 100%;
    bottom: 0;
    width: calc(90ch * 0.78);
    z-index: 1100;
    border-radius: 0;
    border-top: 0;
    border-bottom: 0;
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: Arial, sans-serif;
    font-size: 1em;
    background: var(--bg-card);
    color: var(--text-card);
}
.incident-detail-card.visible {
    display: flex;
}
.incident-detail-card .panel-header-fixed {
    background: var(--muted-card);
    color: var(--text-card);
    border-bottom: 1px solid rgba(0,0,0,0.1);
}
.incident-detail-card .panel-head h2 { color: var(--text-card); }
.incident-detail-card .btn-ghost { color: var(--text-card); }

.incident-detail-card .scrollable-list {
    flex: 1;
    overflow-y: auto;
    align-content: start;
}
.detail-section-v2 {
    padding: 12px 14px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-left: 3px solid var(--accent);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.detail-section-v2.is-ia { border-left-color: var(--accent); }
.detail-section-v2.is-device { border-left-color: var(--warning); }
.detail-section-v2.is-agent { border-left-color: var(--success); }
.detail-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: .92em;
}
.detail-agent {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: var(--text-card);
}
.detail-agent strong { font-weight: 600; }
.detail-agent i { color: var(--muted-card-text); }
.detail-section-v2.is-ia .detail-agent i { color: var(--accent); }
.detail-section-v2.is-device .detail-agent i { color: var(--warning); }
.detail-section-v2.is-agent .detail-agent i { color: var(--success); }
.detail-kind {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted-card-text);
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 7px;
    border-radius: 999px;
}
.detail-date { color: var(--muted-card-text); font-size: .8rem; white-space: nowrap; }
.detail-content p {
    margin: 0;
    line-height: 1.5;
    color: var(--text-card);
}
.detail-multimedia {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}
.multimedia-transcript {
    font-style: italic;
    color: var(--text-card);
    font-size: 0.9em;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}
.modal-overlay.visible {
    display: flex;
}
.modal-content {
    position: relative;
    padding: 40px 20px 20px;
    max-width: 90%;
    max-height: 90%;
    background: var(--bg-elev);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
}
.multimedia-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--muted-card);
    border-radius: 6px;
    color: var(--text-info-card);
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}
.multimedia-item:hover {
    background: #d0d2d9;
}
.detail-input-container {
    padding: 16px;
    background: var(--muted-card);
    border-top: 1px solid rgba(0,0,0,0.1);
}

.new-updates-badge {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #007bff;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    z-index: 100;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.new-updates-badge:hover {
    background: #0056b3;
    transform: translateX(-50%) translateY(-2px);
}
.detail-input-container .input {
    background: #fff !important;
    color: #000 !important;
    border-radius: 10px;
}
.detail-input-container {
    position: relative;
}
.detail-spinner {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-card-text);
    display: none;
}
.prediction-card { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: start; }
.prediction-score { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 18px; background: linear-gradient(135deg, #103765, #1d79d5); font-weight: 700; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; }
iframe { width: 100%; min-height: 70vh; border: 0; border-radius: 18px; background: #06101d; }
.settings-grid { display: grid; gap: 16px; }
.login-footer {
    position: absolute;
    bottom: 32px;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 32px;
}
.footer-grid {
    display: flex;
    gap: 40px;
    align-items: center;
    color: var(--muted);
    font-size: 0.9rem;
}
.footer-item {
    display: flex;
    align-items: center;
    gap: 10px;
}
.footer-item i {
    color: var(--text);
}
.footer-item a:hover {
    color: var(--text);
    text-decoration: underline;
}
.footer-logo {
    width: 24px;
    height: 24px;
}

/* Google Maps InfoWindow Overrides */
.gm-style-iw-c {
    background-color: #fff !important;
    border: 1px solid var(--line) !important;
}

.gm-style-iw-d {
    overflow: hidden !important;
    color: #111 !important;
}

.gm-style-iw-tc::after {
    background: #fff !important;
}

/* Classic Checklist Modal */
.classic-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 4000;
    display: none;
    align-items: center;
    justify-content: center;
}

.classic-modal-overlay.visible {
    display: flex;
}

.classic-modal {
    background: #fff;
    color: #333;
    width: 600px;
    max-width: 95%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.classic-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.classic-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #222;
}

.classic-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.classic-modal-footer {
    padding: 12px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f8f9fa;
}

.classic-btn {
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
    transition: all 0.2s;
}

.classic-btn:hover {
    background: #f0f0f0;
}

.classic-btn-primary {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.classic-btn-primary:hover {
    background: #0069d9;
}

.checklist-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.closure-form-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.indicators-container {
    display: flex;
    flex-direction: column;
}

.closure-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.closure-form-field label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #444;
}

.closure-form-field textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    background: #f9f9f9;
}

.closure-form-field textarea:focus {
    outline: none;
    border-color: #007bff;
    background: #fff;
}

.checklist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 6px;
    transition: background 0.2s;
}

.checklist-item:hover {
    background: #fcfcfc;
}

.checklist-item-text {
    flex: 1;
    margin-right: 15px;
    font-size: 0.95rem;
}

.checklist-item-actions {
    display: flex;
    gap: 8px;
}

.checklist-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #eee;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.checklist-action-btn.check:hover {
    background: #e6ffed;
    color: #28a745;
    border-color: #28a745;
}

.checklist-action-btn.reject:hover {
    background: #fff5f5;
    color: #dc3545;
    border-color: #dc3545;
}

.checklist-item.checked {
    background: #f0fff4;
    border-color: #c6f6d5;
}

.checklist-item.checked .checklist-item-text {
    text-decoration: line-through;
    color: #666;
}

.checklist-item.rejected {
    background: #fff5f5;
    border-color: #fed7d7;
}

.checklist-item.rejected .checklist-item-text {
    color: #999;
}

.audit-grid-container {
    width: 100%;
}

.audit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    color: #333;
    background: #fff;
    min-width: 1200px;
}

.audit-table th, .audit-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.audit-table th {
    background: #f4f4f4;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.audit-table tr:nth-child(even) {
    background: #f9f9f9;
}

.audit-table tr:hover {
    background: #f1f1f1;
}

.audit-table .cell-datetime { width: 150px; }
.audit-table .cell-agent { width: 180px; }
.audit-table .cell-type { width: 150px; }
.audit-table .cell-description { min-width: 300px; }

@media (max-width: 1200px) {
    .floating-panel-stack { width: 350px; }
}
@media (max-width: 900px) {
    .app-shell { display: block; overflow: auto; }
    .main-content { flex-direction: column; height: auto; }
    .left-rail { width: 100%; grid-auto-flow: column; justify-content: center; border-left: 0; border-right: 0; border-bottom: 1px solid var(--line); }
    .floating-panel-stack { width: 100%; height: 500px; position: relative; }
    .map-wrapper { height: 400px; width: 100%; }
    .incident-detail-card { position: fixed; inset: 0; width: 100% !important; z-index: 2000; }
    .login-container { flex-direction: column; align-items: center; }
    .login-info { text-align: center; }
    .info-grid { justify-content: center; }
    .footer-grid { flex-direction: column; gap: 15px; text-align: center; }
    .login-footer { bottom: 20px; }
}
