:root {
    --bg-deep: #050505; 
    --bg-glass: rgba(10, 15, 20, 0.95);
    --bg-card: #0d1218;
    
    /* Colores Principales */
    --gold: #d4af37;       /* Color Principal Oasis */
    --gold-dim: #b88a00;   /* Oro oscuro */
    --neon-blue: #00f0ff;  /* Tech */
    --police-blue: #0051ff; 
    
    /* Estados */
    --danger: #ff2a2a; 
    --success: #00ff9d; 
    --warn: #ffae00;
    --purple: #bf00ff;     /* Nuevo: Para Requisados */
    --grey: #7a8fa3;       /* Nuevo: Para Caducados/Archivados */
    
    /* Texto y Bordes */
    --text-main: #ffffff; 
    --text-dim: #8b9bb4;
    --border: 1px solid rgba(212, 175, 55, 0.25);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-deep);
    background-image: 
        linear-gradient(rgba(0, 5, 10, 0.95), rgba(0, 5, 10, 0.95)), 
        url("https://i.ibb.co/Gfsgfqd8/LSPD-SEALS.webp");
    background-size: 500px auto; 
    background-repeat: no-repeat;
    background-position: center;
    color: var(--text-main); 
    font-family: 'Inter', sans-serif;
    height: 100vh; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column;
    
    /* 🟢 ANTI-COPY / ANTI-SELECT (SEGURIDAD) */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Permitir selección solo en inputs y textareas para poder escribir */
input, textarea {
    user-select: text;
    -webkit-user-select: text;
}

h1, h2, h3, .brand-text, .nav-btn, .btn, .d-app-name, th, .oasis-title { 
    font-family: 'Rajdhani', sans-serif; 
    text-transform: uppercase; 
}

.hidden { display: none !important; }

/* SCROLLBARS */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.3); }
::-webkit-scrollbar-thumb { background: #334; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* =========================================
   UI ELEMENTS (Inputs, Buttons)
   ========================================= */
input, select, textarea {
    background: rgba(255, 255, 255, 0.05); 
    border: 1px solid #334; 
    color: white;
    padding: 12px; 
    width: 100%; 
    font-family: 'Inter', sans-serif; 
    outline: none;
    margin-bottom: 15px; 
    border-radius: 4px; 
    transition: 0.3s;
}

textarea { resize: vertical; }

select option { background-color: #000; color: white; }

input:focus, select:focus, textarea:focus { 
    border-color: var(--gold); 
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.15); 
}

/* Inputs transparentes para edición (usados en modales de vista) */
input.editable-field {
    background: transparent;
    border: none;
    border-bottom: 1px solid #555;
    padding: 5px;
    margin: 0;
    color: var(--neon-blue);
    font-weight: bold;
}
input.editable-field:focus {
    border-bottom-color: var(--gold);
    box-shadow: none;
}

.btn {
    border: none; cursor: pointer; padding: 10px 25px; font-weight: 700; font-size: 14px;
    transition: all 0.3s ease; display: inline-flex; align-items: center; gap: 8px; justify-content: center;
    background: linear-gradient(90deg, var(--gold-dim), var(--gold)); 
    color: black;
    border-radius: 2px;
}

.btn:hover { 
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4); 
    transform: translateY(-2px); 
    color: white;
}

.btn-primary { background: var(--police-blue); color: white; }
.btn-primary:hover { box-shadow: 0 0 15px var(--police-blue); }
.btn-danger { background: rgba(50,0,0,0.8); border: 1px solid var(--danger); color: var(--danger); }
.btn-ghost { background: transparent; border: 1px solid var(--text-dim); color: var(--text-dim); }
.btn-ghost:hover { border-color: white; color: white; background: rgba(255,255,255,0.05); }

/* Botones pequeños para acciones */
.btn-small { 
    padding: 6px 10px;
    font-size: 11px;
    border-radius: 4px;
    background: rgba(0, 81, 255, 0.2);
    border: 1px solid var(--police-blue);
    color: var(--police-blue);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-small:hover {
    background: var(--police-blue);
    color: white;
    box-shadow: 0 0 10px var(--police-blue);
}


/* =========================================
   LOGIN SCREEN
   ========================================= */
#view-login { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    display: flex; justify-content: center; align-items: center; 
    z-index: 1000; 
    backdrop-filter: blur(15px); 
    background: rgba(0,0,0,0.6); 
    padding: 20px;
}

.login-card { 
    width: 100%; max-width: 450px; padding: 40px; 
    background: rgba(10, 12, 15, 0.95); 
    border: 1px solid var(--gold); 
    border-top: 4px solid var(--gold); 
    box-shadow: 0 0 60px rgba(212, 175, 55, 0.15); 
    border-radius: 8px;
}

.oasis-logo-container { text-align: center; margin-bottom: 20px; }
.oasis-icon { font-size: 60px; color: var(--gold); text-shadow: 0 0 20px rgba(212, 175, 55, 0.5); }
.oasis-title { font-size: 36px; color: white; letter-spacing: 5px; margin: 0; text-align: center; }
.oasis-subtitle { color: var(--text-dim); text-align: center; font-size: 12px; letter-spacing: 3px; }

/* =========================================
   INTRO SEQUENCE
   ========================================= */
#view-intro {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #000000; z-index: 3000;
    display: flex; justify-content: center; align-items: center;
    flex-direction: column;
}
.intro-container { text-align: center; width: 90%; max-width: 700px; }
.laser-svg { width: 220px; height: 220px; margin-bottom: 40px; }
.laser-path { stroke-dasharray: 900; stroke-dashoffset: 900; animation: laserDraw 2.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards; }
.laser-path-delay { stroke-dasharray: 300; stroke-dashoffset: 300; animation: laserDraw 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.5s forwards; }
@keyframes laserDraw { to { stroke-dashoffset: 0; } }
.intro-title { font-weight: 900; color: white; font-size: 32px; letter-spacing: 6px; margin: 0; opacity: 0; transform: translateY(20px); animation: fadeInUp 0.8s ease 2.2s forwards; text-shadow: 0 0 30px rgba(212, 175, 55, 0.4); }
.intro-subtitle { font-weight: 700; color: var(--gold); font-size: 16px; letter-spacing: 4px; margin-top: 10px; opacity: 0; transform: translateY(20px); animation: fadeInUp 0.8s ease 2.5s forwards; }
.intro-loading-bar { width: 300px; height: 3px; background: #1a1a1a; margin: 30px auto; position: relative; overflow: hidden; opacity: 0; border-radius: 2px; animation: fadeIn 0.5s ease 2.5s forwards; }
.intro-progress { position: absolute; top: 0; left: 0; height: 100%; width: 0%; background: var(--gold); box-shadow: 0 0 15px var(--gold); animation: loadBar 2s ease-in-out 2.5s forwards; }
@keyframes loadBar { 0% { width: 0%; } 100% { width: 100%; } }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { to { opacity: 1; } }

/* =========================================
   DASHBOARD & WORKSPACE
   ========================================= */
#view-dashboard { width: 100%; height: 100%; display: flex; flex-direction: column; }
header { 
    height: 70px; 
    background: rgba(5, 5, 5, 0.98); 
    border-bottom: 1px solid #333; 
    display: flex; align-items: center; justify-content: space-between; 
    padding: 0 20px; 
    flex-shrink: 0;
}
.brand-section { display: flex; align-items: center; gap: 15px; }
.brand-logo { font-size: 26px; color: var(--gold); filter: drop-shadow(0 0 5px var(--gold)); }
.agent-img { width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--gold); object-fit: cover; }
.duty-timer-box { text-align: center; border: 1px solid #333; padding: 4px 10px; border-radius: 4px; background: rgba(0,0,0,0.5); }
.user-profile-section { display: flex; gap: 10px; align-items: center; }
.server-badge { color:var(--success); border:1px solid var(--success); padding:4px 10px; font-size:12px; font-family:monospace; }

.workspace { display: flex; flex: 1; overflow: hidden; position: relative; }

/* SIDEBAR (Desktop por defecto) */
.sidebar { 
    width: 80px; 
    background: rgba(5, 5, 5, 0.98); 
    border-right: 1px solid #333; 
    display: flex; flex-direction: column; align-items: center; 
    padding-top: 20px; gap: 10px; 
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 5000;
}
.nav-btn { 
    width: 50px; height: 50px; border-radius: 10px; 
    display: flex; justify-content: center; align-items: center; 
    font-size: 20px; color: var(--text-dim); cursor: pointer; 
    transition: 0.3s; background: rgba(255,255,255,0.03); 
    flex-shrink: 0; position: relative;
}
.nav-btn span { display: none; } /* Ocultar texto en desktop cerrado */
.nav-btn:hover { color: white; background: rgba(255,255,255,0.1); }
.nav-btn.active { 
    background: var(--gold); color: black; 
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3); border: 1px solid white;
}

.main-content { 
    flex: 1; padding: 20px; overflow-y: auto; position: relative; 
    background: rgba(0,0,0,0.6); 
}
.screen { display: none; animation: fadeIn 0.4s ease; height: 100%; flex-direction: column; }
.screen.active { display: flex; }

/* =========================================
   WIDGETS & LAYOUTS
   ========================================= */
.dashboard-grid { display: grid; grid-template-columns: 3fr 1fr; gap: 20px; height: 100%; overflow: hidden; }
.apps-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 15px; align-content: start; overflow-y: auto; padding-right: 5px; }
.d-app-card { 
    background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255,255,255,0.05); 
    padding: 20px; height: 140px; 
    display: flex; flex-direction: column; justify-content: space-between; 
    cursor: pointer; transition: 0.3s; position: relative; overflow: hidden; border-radius: 6px;
}
.d-app-card:hover { background: rgba(212, 175, 55, 0.1); border-color: var(--gold); transform: translateY(-3px); }
.d-app-icon { font-size: 30px; color: #556; transition: 0.3s; }
.d-app-card:hover .d-app-icon { color: var(--gold); text-shadow: 0 0 10px var(--gold); }
.panic-card { border-color: rgba(255,0,0,0.2); background: linear-gradient(135deg, rgba(50,0,0,0.2), rgba(20,0,0,0.5)); }
.panic-card:hover { border-color: red; box-shadow: 0 0 20px red; }

.widget-box { background: var(--bg-glass); border: 1px solid #333; display: flex; flex-direction: column; border-radius: 6px; overflow: hidden; margin-bottom: 20px;}
.widget-header { padding: 12px; background: rgba(255, 255, 255, 0.02); border-bottom: 1px solid rgba(255,255,255,0.05); font-weight: 700; color: var(--gold); display: flex; justify-content: space-between; font-size: 13px; }

/* =========================================
   TABLAS Y LISTAS (FIXED FOR MOBILE)
   ========================================= */
.app-container { background: rgba(0,0,0,0.8); border: var(--border); flex: 1; display: flex; flex-direction: column; overflow: hidden; height: 100%; border-radius: 6px; }
.app-topbar { padding: 15px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; align-items: center; background: rgba(0,0,0,0.5); }
.app-topbar h2 { font-size: 18px; margin: 0; }
.list-layout { padding: 20px; display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.search-bar-row { display: flex; gap: 10px; margin-bottom: 20px; }
.table-responsive { overflow-y: auto; flex: 1; border: 1px solid rgba(255,255,255,0.05); }

.data-table { width: 100%; border-collapse: collapse; min-width: 600px; } 
.data-table th { text-align: left; padding: 12px; background: rgba(212, 175, 55, 0.1); color: var(--gold); font-size: 11px; letter-spacing: 1px; border-bottom: 1px solid #444; position: sticky; top: 0; }
.data-table td { padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 13px; color: #ddd; vertical-align: middle; }
.data-table tr:hover { background: rgba(255, 255, 255, 0.05); }

.mugshot-preview { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; }

.unit-row { padding: 10px 15px; border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; align-items: center; gap: 10px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 5px currentColor; }

/* --- AQUI ESTAN LOS COLORES DE ESTADO --- */
.state-success { 
    color: var(--success); 
    border: 1px solid var(--success); 
    background: rgba(0, 255, 157, 0.1); 
    padding: 2px 6px; 
    border-radius: 3px; 
    font-size: 10px; 
    font-weight: bold; 
    text-transform: uppercase;
}

.state-danger { 
    color: var(--danger); 
    border: 1px solid var(--danger); 
    background: rgba(255, 42, 42, 0.1); 
    padding: 2px 6px; 
    border-radius: 3px; 
    font-size: 10px; 
    font-weight: bold; 
    text-transform: uppercase;
}

.state-warn { 
    color: var(--warn); 
    border: 1px solid var(--warn); 
    background: rgba(255, 174, 0, 0.1); 
    padding: 2px 6px; 
    border-radius: 3px; 
    font-size: 10px; 
    font-weight: bold; 
    text-transform: uppercase;
}

.state-purple { 
    color: var(--purple); 
    border: 1px solid var(--purple); 
    background: rgba(191, 0, 255, 0.1); 
    padding: 2px 6px; 
    border-radius: 3px; 
    font-size: 10px; 
    font-weight: bold; 
    text-transform: uppercase;
}

.state-grey { 
    color: var(--grey); 
    border: 1px solid var(--grey); 
    background: rgba(122, 143, 163, 0.1); 
    padding: 2px 6px; 
    border-radius: 3px; 
    font-size: 10px; 
    font-weight: bold; 
    text-transform: uppercase;
}

.state-info {
    background: rgba(0, 240, 255, 0.1); 
    color: white; 
    padding: 2px 8px; 
    border-radius: 3px; 
    font-size: 10px; 
    vertical-align: middle; 
    background: #334; 
    margin-right: 5px; 
}
.badge-type { background: #334; color:white; padding:2px 8px; border-radius:3px; font-size:10px; vertical-align:middle; margin-right: 5px; }


/* =========================================
   CALCULADORA & CHAT
   ========================================= */
.calc-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 20px; height: 100%; overflow: hidden; }
.calc-list-section { display: flex; flex-direction: column; gap: 10px; height: 100%; overflow: hidden; }
.calc-result-section { display: flex; flex-direction: column; gap: 15px; background: rgba(0,0,0,0.3); padding: 15px; border-radius: 6px; overflow-y: auto; }
.calc-item { padding: 10px; border-bottom: 1px solid #334; cursor: pointer; transition: 0.2s; display: flex; justify-content: space-between; align-items: center; }
.calc-item:hover { background: rgba(255,255,255,0.05); color: white; }
.calc-item-selected { background: rgba(212,175,55,0.2); color: var(--gold); border-left: 3px solid var(--gold); }
.calc-stat-box { background: rgba(0,0,0,0.4); border: 1px solid #445; padding: 10px; text-align: center; border-radius: 4px; }
.calc-label { font-size: 9px; color: #889; letter-spacing: 1px; margin-bottom: 5px; }
.calc-value { font-size: 18px; font-weight: bold; }

.chat-msg { background: rgba(30, 30, 30, 0.8); padding: 8px; border-radius: 4px; font-size: 13px; border-left: 3px solid var(--gold); margin-bottom: 5px; }
.chat-msg-header { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 10px; color: #aaa; }
.chat-msg-content { color: white; word-wrap: break-word; font-weight: 500; }

/* =========================================
   RADIO
   ========================================= */
.radio-grid { display: flex; flex:1; padding: 20px; gap: 20px; overflow: hidden; }
.radio-control-pane { width: 300px; border-right: var(--border); padding-right: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.radio-agent-pane { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.radio-btn-big { 
    width: 150px; height: 150px; border-radius: 50%; border: 4px solid #333; background: rgba(20,25,35,0.5); 
    color: var(--text-dim); font-size: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; 
    cursor: pointer; transition: all 0.3s; margin: 20px 0;
}
.radio-btn-big.active { border-color: var(--success); color: var(--success); box-shadow: 0 0 40px rgba(0,255,157,0.2); animation: radioPulse 2s infinite; }
@keyframes radioPulse { 0% { box-shadow: 0 0 20px rgba(0,255,157,0.2); } 50% { box-shadow: 0 0 50px rgba(0,255,157,0.4); } 100% { box-shadow: 0 0 20px rgba(0,255,157,0.2); } }
.radio-freq-input { font-size: 40px; font-family: monospace; text-align: center; background: transparent; border: none; border-bottom: 2px solid var(--police-blue); width: 180px; color: white; }
.radio-control-buttons { display: flex; gap: 15px; }
.control-btn { width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; justify-content: center; align-items: center; cursor: pointer; font-size: 20px; border: 1px solid rgba(255,255,255,0.1); }
.control-btn.active-mic { background: var(--success); color: black; }
.control-btn.active-deafen { background: var(--danger); color: white; }
.control-btn.disabled { opacity: 0.3; pointer-events: none; }
.agent-list-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px dashed rgba(255,255,255,0.05); color: var(--text-dim); }
.status-icon { margin-left: 10px; font-size: 10px; }
.status-icon.mic-on { color: var(--success); }

/* =========================================
   MODALES & ALERTS (Z-INDEX CORREGIDO)
   ========================================= */
.modal-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.9); 
    z-index: 10000; /* IMPORTANTE: MÁS ALTO QUE LA SIDEBAR */
    display: none; justify-content: center; align-items: center; 
    backdrop-filter: blur(5px); padding: 10px; 
}
.modal-card { background: #0a0f16; border: 1px solid var(--gold); width: 100%; max-width: 500px; padding: 25px; box-shadow: 0 0 40px rgba(0,0,0,0.8); max-height: 95vh; overflow-y: auto; border-radius: 8px; display: flex; flex-direction: column; position: relative; }
.modal-card.wide-modal { max-width: 750px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.modal-actions.center { justify-content: center; }

/* Helpers de Modal */
.lbl-dim { color:var(--text-dim); font-size:11px; display: block; margin-bottom: 4px; }
.lbl-warn { color:var(--warn); font-size:11px; font-weight:bold; display: block; margin-bottom: 4px; }
.txt-neon { color:var(--neon-blue); font-size:16px; }
.txt-white { color:white; }
.data-box-text { background:rgba(0,0,0,0.3); padding:10px; border:1px solid #334; color:#ddd; font-size:13px; font-family:monospace; white-space: pre-wrap; border-radius: 4px; }
.data-box-text.tall { height: 180px; overflow-y: auto; }
.data-box-simple { background:rgba(0,0,0,0.3); padding:10px; border:1px solid #334; color:white; font-size:14px; margin-bottom:15px; }
.data-box-alert { background:rgba(50,0,0,0.2); padding:10px; border:1px solid rgba(255,0,0,0.3); color:#ffaaaa; font-size:13px; margin-bottom:10px; min-height:40px; }
.info-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px; }
.profile-header { display: flex; gap: 20px; margin-bottom: 20px; }
.profile-img-large { width: 100px; height: 100px; object-fit: cover; border: 2px solid var(--neon-blue); border-radius: 8px; background: #000; }
.plate-box { background:white; color:black; font-weight:900; padding:5px 10px; border-radius:4px; font-family:monospace; font-size:18px; border: 2px solid #999; }
.photo-upload-box { 
    border: 2px dashed #445; 
    padding: 20px; 
    text-align: center; 
    cursor: pointer; 
    transition: 0.3s; 
    color: #889; 
    border-radius: 4px; 
    margin-bottom: 15px; 
    background: rgba(0,0,0,0.2);
}
.photo-upload-box:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(212, 175, 55, 0.05);
}
.report-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.report-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 15px; margin-bottom: 20px; }
.involved-box { background:rgba(255,255,255,0.03); padding:15px; border:1px solid #334; margin:15px 0; border-radius:4px; }

/* Panic & Info */
#panic-screen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(30,0,0,0.98); z-index: 5000; display: none; flex-direction: column; justify-content: center; align-items: center; animation: pulseRed 1s infinite alternate; }
@keyframes pulseRed { from { box-shadow: inset 0 0 50px #500; } to { box-shadow: inset 0 0 150px #f00; } }
.panic-box { border: 5px solid var(--danger); background: black; padding: 30px; text-align: center; width: 90%; max-width: 600px; border-radius: 10px; }
.panic-title { font-size: 40px; color: var(--danger); font-weight: 900; animation: blink 0.3s infinite; margin-bottom: 30px; }

#info-screen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,10,20,0.98); z-index: 4999; display: none; flex-direction: column; justify-content: center; align-items: center; }
.info-box { border: 3px solid var(--gold); background: black; padding: 30px; text-align: center; width: 90%; max-width: 500px; border-radius: 10px; }

/* Map Overlay */
.map-overlay-header { position: absolute; top: 0; left: 0; width: 100%; height: 60px; background: #000; z-index: 50; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid rgba(255,255,255,0.1); }
.btn-discord-map { background: #5865F2; color: white; font-family: 'Rajdhani', sans-serif; font-weight: 800; font-size: 16px; text-decoration: none; padding: 8px 20px; border-radius: 4px; display: flex; align-items: center; gap: 8px; }

/* Info Table */
.info-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.info-table th, .info-table td { border: 1px solid #445; padding: 8px; font-size: 13px; text-align: left; }
.info-table th { color: var(--gold); background: rgba(0,0,0,0.5); width: 30%; }

/* Mobile Menu Toggle Button */
.mobile-menu-btn {
    display: none; /* Hidden on desktop */
    font-size: 24px;
    color: var(--gold);
    cursor: pointer;
    margin-right: 15px;
}
.sidebar-header-mobile {
    display: none;
}
#mobile-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 4999; display: none;
    backdrop-filter: blur(3px);
}

/* =========================================
   RESPONSIVE (MOBILE) - MENU HAMBURGUESA
   ========================================= */
@media (max-width: 768px) {
    /* Login */
    .login-card { width: 90%; padding: 25px; }

    /* Dashboard Layout */
    .dashboard-grid { grid-template-columns: 1fr; display: flex; flex-direction: column; overflow-y: auto; }
    .sidebar-widgets { display: none; /* Hide sidebar widgets on mobile */ }

    /* Header */
    header { padding: 0 15px; height: 60px; }
    .brand-text-container { display: none; } 
    .hide-mobile { display: none !important; }
    .mobile-menu-btn { display: block; } /* Show hamburger */

    /* SIDEBAR (Drawer Style) */
    .sidebar {
        position: fixed;
        top: 0;
        left: -280px; /* Hidden off-screen */
        width: 250px;
        height: 100vh;
        background: #000000;
        border-right: 1px solid var(--gold);
        z-index: 5000;
        transition: left 0.3s ease;
        padding-top: 0;
        align-items: stretch;
    }
    .sidebar.open {
        left: 0; /* Slide in */
    }
    
    /* Overlay for menu */
    #mobile-overlay.active {
        display: block;
    }

    /* Sidebar Items in Mobile */
    .sidebar-header-mobile {
        display: flex; justify-content: space-between; align-items: center;
        padding: 20px; border-bottom: 1px solid #333; margin-bottom: 10px;
    }
    .nav-btn {
        width: 100%;
        height: auto;
        padding: 15px 20px;
        border-radius: 0;
        justify-content: flex-start;
        font-size: 16px;
        gap: 15px;
    }
    .nav-btn i { width: 25px; text-align: center; }
    .nav-btn span { display: inline; font-weight: 600; letter-spacing: 1px; }
    .nav-btn.active { border: none; border-left: 4px solid var(--gold); background: rgba(255,255,255,0.05); }

    /* Content Area */
    .main-content { padding: 10px; padding-bottom: 20px; }

    /* App Grids */
    .apps-container { grid-template-columns: 1fr 1fr; gap: 10px; }
    .d-app-card { height: 110px; padding: 15px; }
    .d-app-icon { font-size: 24px; }
    .d-app-name { font-size: 14px; }
    .d-app-desc { font-size: 10px; }

    /* Radio */
    .radio-grid { flex-direction: column; overflow-y: auto; }
    .radio-control-pane { width: 100%; border-right: none; border-bottom: 1px solid #333; padding-bottom: 20px; padding-right: 0; }
    
    /* Calculator */
    .calc-layout { grid-template-columns: 1fr; display: flex; flex-direction: column; }
    .calc-list-section { height: 50%; }
    .calc-result-section { height: 50%; }

    /* Report Modal */
    .report-grid { grid-template-columns: 1fr; }
    .report-sidebar { border-left: none; border-top: 1px solid #333; padding-top: 20px; padding-left: 0; margin-top: 20px; }
    
    /* General Tables */
    .search-bar-row { flex-direction: column; }
    .search-bar-row.mobile-col { flex-direction: column; }
    
    /* MESA COMPACTA EN MOVIL */
    .data-table th { padding: 8px; font-size: 10px; }
    .data-table td { padding: 8px; font-size: 11px; }
    .mugshot-preview { width: 35px; height: 35px; }

    /* Text & Modals */
    .panic-title { font-size: 28px; }
    .intro-title { font-size: 22px; }
}

/* ANIMACIÓN ALERTA AZUL (ENTORNO) */
@keyframes pulseBlue { from { box-shadow: inset 0 0 50px #002; } to { box-shadow: inset 0 0 150px #0051ff; } }

/* TARJETAS DE DISPATCH */
.dispatch-card {
    background: rgba(20, 30, 45, 0.9);
    border-left: 4px solid var(--police-blue);
    padding: 15px;
    border-radius: 4px;
    position: relative;
    animation: fadeIn 0.5s;
    margin-bottom: 15px;
}
.dispatch-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
}
.dispatch-loc { font-weight: bold; font-size: 16px; color: var(--gold); }
.dispatch-time { font-size: 11px; color: #889; font-family: monospace; }
.dispatch-msg { color: #ddd; font-size: 14px; margin-bottom: 15px; line-height: 1.4; }
.responders-box {
    background: rgba(0,0,0,0.3); padding: 8px; border-radius: 4px; font-size: 12px; color: #aaa; margin-bottom: 10px;
}
.dispatch-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* Botones específicos dispatch */
.btn-accept { background: rgba(0, 255, 157, 0.2); border: 1px solid var(--success); color: var(--success); }
.btn-accept:hover { background: var(--success); color: black; }
.btn-finish { background: rgba(255, 255, 255, 0.1); border: 1px solid #777; color: #ccc; }
.btn-finish:hover { background: #333; color: white; }