:root {
    /* Fondos: De negro absoluto a gris táctico oscuro */
    --bg: #0a0b0d;          /* Negro base profundo */
    --bg2: #111317;         /* Negro de interfaz para tarjetas/paneles */
    --bg3: #181b21;         /* Gris oscuro para elementos secundarios */
    --bg4: #22262f;         /* Gris de hover o inputs */
    
    /* Bordes y Separadores */
    --border: rgba(255, 255, 255, .05);
    --border-h: rgba(244, 180, 26, .35); /* Brillo amarillo al hacer hover */
    
    /* Textos (Mantenemos alta legibilidad con un toque frío) */
    --text: #f1f2f6;        /* Blanco brillante */
    --text-muted: #57606f;  /* Gris apagado */
    --text-soft: #a4b0be;   /* Gris suave */
    
    /* Colores de Identidad FIB (Amarillo Táctico y Azul Operativo) */
    --primary: #f4b41a;      /* Amarillo Oro FIB oficial */
    --primary-h: #fbc531;    /* Amarillo más brillante para Hover */
    --primary-glow: rgba(244, 180, 26, .18); /* Destello amarillo */
    
    /* Estados del Sistema */
    --success: #2ed573;     /* Verde operativo */
    --danger: #ff4757;      /* Rojo de alerta */
    --warning: #ffa502;     /* Naranja de advertencia */
    
    /* Estructura y Estilos */
    --radius: 8px;          /* Radio ligeramente más cuadrado/militar */
    --radius-lg: 14px;
    --shadow: 0 20px 50px rgba(0, 0, 0, .65);
    --shadow-sm: 0 8px 24px rgba(0, 0, 0, .45);
    --font: 'Segoe UI', system-ui, sans-serif;
    --transition: all .20s cubic-bezier(.4, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    padding-top: 100px;
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    color: var(--text);
    background:
        radial-gradient(circle at top center, var(--primary-glow), transparent 24%),
        linear-gradient(180deg, var(--bg2) 0%, var(--bg) 42%, var(--bg) 100%);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-h); }

.container { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }

/* --- NAVBAR FLOTANTE Y TRANSPARENTE --- */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 64px;
    padding: 0 1.5rem;
    
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%); 
    width: 90%; 
    max-width: 1200px; 
    
    /* Fondo translúcido con los nuevos tonos oscuros */
    background: rgba(17, 19, 23, 0.6); /* Basado en var(--bg2) */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); 
    
    /* Bordes estéticos */
    border: 1px solid var(--border);
    border-radius: var(--radius-lg); 
    
    z-index: 1000; 
    box-shadow: var(--shadow-sm); 
}

/* --- ESTILOS PARA LOS NAV-LINKS --- */
.nav-links {
    display: flex;
    align-items: center;
    list-style: none; 
    margin: 0;
    padding: 0;
    gap: 2rem; 
}

.nav-links a {
    text-decoration: none;
    color: var(--text-soft);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

/* Efecto hover para los enlaces */
.nav-links a:hover {
    color: var(--primary); 
}

/* --- OTROS ESTILOS --- */
.nav-brand {
    font-size: 1.08rem;
    font-weight: 800;
    /* Degradado metálico/dorado corporativo */
    background: linear-gradient(135deg, var(--text) 35%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.nav-auth { 
    display: flex; 
    align-items: center; 
    gap: .75rem; 
    color: var(--text);
}

/* --- FOOTER --- */
.footer {
    text-align: center;
    padding: 1.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    font-size: .82rem;
}

/* --- PAGINA DE ERROR 404 --- */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 85vh; 
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

/* El número gigante 404 */
.error-page h1 {
    font-size: clamp(6rem, 15vw, 10rem); 
    font-weight: 900;
    line-height: 1;
    margin: 0 0 1rem 0;
    
    background: linear-gradient(135deg, var(--text) 35%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    
    /* Destello sutil usando el amarillo táctico */
    filter: drop-shadow(0 4px 12px var(--primary-glow));
}

/* El texto de "Página no encontrada" */
.error-page p {
    font-size: 1.25rem;
    color: var(--text-soft);
    margin: 0 0 2.5rem 0;
    max-width: 400px;
    font-weight: 400;
}

/* Botón Amarillo Táctico / Texto Negro */
.error-page .btn-primary {
    display: inline-block;
    text-decoration: none;
    background: var(--primary);
    color: var(--bg); /* Texto en negro para un contraste brutal */
    padding: 0.8rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: 0 4px 14px var(--primary-glow);
}

/* Efecto hover para el botón */
.error-page .btn-primary:hover {
    background: var(--primary-h);
    transform: translateY(-2px); 
    box-shadow: 0 6px 20px rgba(244, 180, 26, 0.45);
}

/* PAGINA PRINCIPAL */
.hero {
            text-align: center;
            padding: 5rem 1rem 3rem 1rem;
            max-width: 800px;
            margin: 0 auto;
        }
        .hero h2 {
            font-size: clamp(2rem, 5vw, 3.5rem);
            font-weight: 800;
            line-height: 1.2;
            margin-bottom: 1rem;
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        .hero p {
            color: var(--text-soft);
            font-size: 1.15rem;
            margin-bottom: 2rem;
        }
        .badge-status {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            background: rgba(46, 213, 115, 0.1);
            color: var(--success);
            padding: 0.4rem 1rem;
            border-radius: var(--radius);
            font-size: 0.85rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 1.5rem;
            border: 1px solid rgba(46, 213, 115, 0.2);
        }
        .grid-features {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 1.5rem;
            margin-top: 2rem;
            margin-bottom: 4rem;
        }
        .card {
            background: var(--bg2);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            padding: 2rem;
            transition: var(--transition);
            box-shadow: var(--shadow-sm);
        }
        .card:hover {
            border-color: var(--border-h);
            transform: translateY(-4px);
            box-shadow: var(--shadow);
        }
        .card h3 {
            color: var(--primary);
            font-size: 1.3rem;
            margin-bottom: 0.75rem;
            font-weight: 700;
        }
        .card p {
            color: var(--text-soft);
            font-size: 0.95rem;
            line-height: 1.5;
        }
        .btn-group {
            display: flex;
            justify-content: center;
            gap: 1rem;
            flex-wrap: wrap;
        }
        .btn-secondary {
            display: inline-block;
            text-decoration: none;
            background: var(--bg3);
            color: var(--text);
            padding: 0.8rem 2rem;
            border-radius: var(--radius);
            font-weight: 600;
            font-size: 1rem;
            border: 1px solid var(--border);
            transition: var(--transition);
        }
        .btn-secondary:hover {
            background: var(--bg4);
            border-color: var(--text-muted);
        }

        /* --- CONTENEDOR DEL VIDEO EN LA CAPA TRASERA --- */
.video-bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2; /* Se posiciona detrás de todo */
    overflow: hidden;
    background-color: var(--bg); /* Fondo de respaldo mientras carga el video */
}

.video-bg-container video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Asegura que llene toda la pantalla sin deformarse */
}

/* --- CAPA CON LOS DEGRADADOS Y EL DESENFOQUE --- */
.video-bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1; /* Encima del video, pero debajo de los textos/tarjetas */
    
    /* El efecto difuso/borroso combinado con tus colores corporativos */
    backdrop-filter: blur(3px); 
    -webkit-backdrop-filter: blur(3px);
    
    /* Reutilizamos tus degradados exactos para fundir el video con la interfaz */
    background:
        radial-gradient(circle at top center, var(--primary-glow), transparent 35%),
        linear-gradient(180deg, rgba(17, 19, 23, 0.75) 0%, rgba(10, 11, 13, 0.92) 50%, var(--bg) 100%);
}

/* =========================================
   SECCIÓN DE DENUNCIAS (FORMULARIOS Y TABLAS)
   ========================================= */

/* --- ENCABEZADO DE PÁGINA --- */
.page-header {
    display: flex;
    flex-direction: column; /* Apila elementos si añades más cosas */
    align-items: center;    /* Centra horizontalmente */
    justify-content: center; /* Centra verticalmente */
    gap: 1rem;
    margin-bottom: 2rem;
    text-align: center;
    width: 100%;
}

.page-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    
    /* El text-align: center aquí es redundante con el padre, pero mantenlo */
    text-align: center;
    
    background: linear-gradient(135deg, var(--text) 35%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
/* --- ALERTAS (MENSAJES FLASH) --- */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-left: 4px solid;
    animation: fadeIn 0.3s ease-out;
}

.alert-success {
    background: rgba(46, 213, 115, 0.1);
    color: var(--success);
    border-left-color: var(--success);
    border-top: 1px solid rgba(46, 213, 115, 0.2);
    border-right: 1px solid rgba(46, 213, 115, 0.2);
    border-bottom: 1px solid rgba(46, 213, 115, 0.2);
}

.alert-error {
    background: rgba(255, 71, 87, 0.1);
    color: var(--danger);
    border-left-color: var(--danger);
    border-top: 1px solid rgba(255, 71, 87, 0.2);
    border-right: 1px solid rgba(255, 71, 87, 0.2);
    border-bottom: 1px solid rgba(255, 71, 87, 0.2);
}

/* --- ESTRUCTURA DEL FORMULARIO TÁCTICO --- */
.form-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    max-width: 800px;
    margin: 0 auto;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.8rem;
}

.form-label {
    display: block;
    color: var(--text-soft);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-control {
    width: 100%;
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.9rem 1.2rem;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
}

/* Efecto al hacer clic en un input/select (Brillo Amarillo) */
.form-control:focus {
    background: var(--bg4);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

textarea.form-control {
    resize: vertical;
    min-height: 140px;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* --- BOTONES GLOBALES --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0.8rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-family: var(--font);
}

.btn-primary {
    background: var(--primary);
    color: var(--bg); /* Texto oscuro para contraste agresivo */
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-h);
    transform: translateY(-2px);
    color: var(--bg); 
    box-shadow: 0 6px 20px rgba(244, 180, 26, 0.45);
}

.btn-danger {
    background: var(--danger);
    color: var(--text); /* Texto oscuro para contraste agresivo */
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-danger:hover {
    background: var(--danger);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 180, 26, 0.45);
}

.btn-text {
    color: var(--text-soft);
    background: transparent;
    padding: 0.8rem 1rem;
}

.btn-text:hover {
    color: var(--text);
    background: var(--bg4);
}

/* --- TABLA DE DENUNCIAS --- */
.table-container {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th {
    background: rgba(24, 27, 33, 0.5); /* Ligeramente más oscuro que bg2 */
    color: var(--text-soft);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 0.95rem;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: var(--bg4);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* --- ETIQUETAS DE ESTADO (BADGES) --- */
.status-badge {
    display: inline-block;
    padding: 0.35rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pendiente { 
    background: rgba(255, 165, 2, 0.1); 
    color: var(--warning); 
    border: 1px solid rgba(255, 165, 2, 0.3); 
}
.status-revision { 
    background: rgba(244, 180, 26, 0.1); 
    color: var(--primary); 
    border: 1px solid rgba(244, 180, 26, 0.3); 
}
.status-resuelta { 
    background: rgba(46, 213, 115, 0.1); 
    color: var(--success); 
    border: 1px solid rgba(46, 213, 115, 0.3); 
}
.status-rechazada { 
    background: rgba(255, 71, 87, 0.1); 
    color: var(--danger); 
    border: 1px solid rgba(255, 71, 87, 0.3); 
}

/* Estado Vacío de la Tabla */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.avatar    { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--primary-glow); }
.avatar-xs { width: 24px; height: 24px; border-radius: 50%; vertical-align: middle; margin-right: 4px; }

/* --- Estilos base del Admin --- */
.admin-body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f4f7f6; /* Fondo gris suave */
    color: #333;
}

.admin-wrapper {
    display: grid;
    grid-template-columns: 260px 1fr; /* Menú fijo de 260px, resto al contenido */
    min-height: 100vh;
}

/* --- Sidebar (Izquierda) --- */
.sidebar {
    background: #1e293b; /* Azul oscuro elegante */
    color: white;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.sidebar-brand a {
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    margin-bottom: 2rem;
    display: block;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #334155;
}

.sidebar-user img {
    border-radius: 50%;
}

.sidebar-section {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.sidebar-link {
    display: block;
    color: #cbd5e1;
    padding: 0.7rem 0.5rem;
    text-decoration: none;
    transition: 0.2s;
    border-radius: 0.4rem;
}

.sidebar-link:hover {
    background: #334155;
    color: white;
}

.sidebar-logout {
    margin-top: auto; /* Empuja el botón al fondo */
    color: #f87171;
}

/* --- Área de Contenido (Derecha) --- */
.admin-content {
    padding: 2.5rem;
    overflow-y: auto;
}

/* Ajuste responsivo: si la pantalla es pequeña, colapsa el menú */
@media (max-width: 768px) {
    .admin-wrapper {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none; /* Aquí podrías añadir un botón de menú hamburguesa */
    }
}