/* --- ESTILOS GENERALES --- */
body {
    background-color: #041326; 
    background-image: url('fondo_principal.png'); 
    background-position: center center; 
    background-repeat: no-repeat; 
    background-size: cover; 
    background-attachment: fixed; 
    
    color: #5CBDE8; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* --- BARRA LATERAL (SIDEBAR) --- */
.sidebar {
    width: 260px;
    background-color: rgba(27, 69, 109, 0.80); /* Azul Petróleo con 80% opacidad */
    backdrop-filter: blur(12px); /* Efecto Cristal (desenfoque) */
    -webkit-backdrop-filter: blur(12px);
    border-right: 2px solid rgba(92, 189, 232, 0.5); /* Borde sutil */
    height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
    z-index: 100;
}

.sidebar h2 {
    color: #5CBDE8; 
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 0;
    font-size: 26px;
    font-weight: 900;
    text-shadow: 2px 2px 4px rgba(4, 19, 38, 0.8); 
}

.sidebar span {
    color: #5CBDE8 !important;
    font-weight: 600;
}

.sidebar div[style*="border-bottom"] {
    border-bottom-color: rgba(92, 189, 232, 0.5) !important; 
}

.menu {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.menu li {
    margin-bottom: 10px;
}

.menu li a {
    color: #FFFFFF; 
    text-decoration: none;
    display: block;
    padding: 10px 15px;
    border-radius: 6px;
    transition: background 0.3s, border 0.3s, transform 0.2s;
    font-size: 14px;
    font-weight: bold;
}

.menu li a:hover, .menu li a.active {
    background-color: rgba(92, 189, 232, 0.2); 
    color: #5CBDE8; 
    border-left: 4px solid #5CBDE8; 
    transform: translateX(5px);
}

.logout-btn {
    display: block;
    background-color: rgba(255, 76, 76, 0.9);
    color: #FFFFFF; 
    border: 1px solid rgba(255, 76, 76, 0.5); 
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: 0.3s;
}

.logout-btn:hover { background-color: #ff4c4c; box-shadow: 0 0 10px rgba(255, 76, 76, 0.5); }

/* --- CONTENIDO PRINCIPAL --- */
main {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    height: 100vh;
    box-sizing: border-box;
    background-color: transparent; /* Transparente para dejar ver la imagen */
}

/* --- TARJETAS GLOBALES (Glassmorphism) --- */
.responsive-row { display: flex; gap: 20px; width: 100%; }
.responsive-col {
    flex: 1;
    background-color: rgba(27, 69, 109, 0.80); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(92, 189, 232, 0.3); 
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

/* --- MODAL EDICIÓN --- */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(4, 19, 38, 0.7); z-index: 1000; justify-content: center; align-items: center;
    backdrop-filter: blur(5px);
}
.modal-content {
    background-color: rgba(27, 69, 109, 0.90); 
    border: 1px solid #5CBDE8; 
    border-radius: 12px;
    padding: 30px; width: 90%; max-width: 500px; max-height: 85vh; overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6); 
    color: #FFFFFF;
}

/* =====================================================================
   OVERRIDES MAESTROS PARA VISTAS (Inscripción, FAQ, etc)
   ===================================================================== */
div[style*="background-color: #050b10"], div[style*="background-color: #071c2b"], details[style*="background-color: #050b10"] {
    background-color: rgba(27, 69, 109, 0.80) !important; 
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-color: rgba(92, 189, 232, 0.3) !important; 
    color: #FFFFFF !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
}

main h1, main h2, main h3, main h4, main p, main span, main li, main label, main summary, details summary, th, td, b, strong, a {
    color: #FFFFFF !important;
}

main h1, main h2 {
    color: #5CBDE8 !important;
    text-shadow: 0px 2px 10px rgba(92, 189, 232, 0.3);
}

/* INPUTS Y SELECTS (Cristalinos) */
input, select, textarea {
    background-color: rgba(255, 255, 255, 0.95) !important; 
    border: 1px solid #5CBDE8 !important; 
    color: #041326 !important;
    font-weight: 500;
}

/* BOTONES GLOBALES */
button, .btn, a[style*="background-color"] {
    color: #041326 !important; 
    font-weight: 900 !important;
    border: none !important; 
    box-shadow: 0 4px 15px rgba(92, 189, 232, 0.3);
}

button[style*="background-color: #239bd9"], div[style*="background-color: #239bd9"] { background-color: #5CBDE8 !important; }
button[style*="background-color: #174c6c"], div[style*="background-color: #174c6c"] { background-color: rgba(92, 189, 232, 0.8) !important; }

div[style*="border-left: 4px solid"] { 
    border-left-color: #5CBDE8 !important; 
}

/* --- IMPRESIÓN --- */
@media print {
    body * { visibility: hidden; }
    #seccion-impresion, #seccion-impresion * { visibility: visible; }
    #seccion-impresion { display: block !important; position: absolute; left: 0; top: 0; width: 100%; background-color: #fff !important; color: #000 !important; }
    table { page-break-inside: auto; }
    tr { page-break-inside: avoid; page-break-after: auto; }
}

/* --- CELULARES --- */
@media (max-width: 768px) {
    body { display: block !important; height: auto !important; overflow: auto !important; }
    .sidebar { width: 100% !important; height: auto !important; border-right: none !important; border-bottom: 2px solid rgba(92, 189, 232, 0.5) !important; padding-bottom: 20px !important; position: relative !important; }
    main, .main-content { width: 100% !important; height: auto !important; overflow: visible !important; padding: 15px !important; display: block !important; box-sizing: border-box !important; }
    
    div[style*="display: flex"], .responsive-row { flex-direction: column !important; flex-wrap: wrap !important; gap: 15px !important; }
    div[style*="flex: 1"], .responsive-col { flex: 0 0 100% !important; max-width: 100% !important; width: 100% !important; margin-bottom: 15px !important; box-sizing: border-box !important; }
    input:not([type="checkbox"]), select, button, .btn { width: 100% !important; font-size: 16px !important; box-sizing: border-box !important; }
    input[type="checkbox"] { width: 18px !important; height: 18px !important; margin: 0 !important; flex-shrink: 0; accent-color: #5CBDE8; }
    table { display: block !important; width: 100% !important; overflow-x: auto !important; }
}
