/* assets/css/admin-style.css */

/* 1. VARIABLES MAESTRAS */
:root { 
    --eme-blue: #337ab7; 
    --eme-dark: #2c3e50; 
    --eme-light-bg: #f4f7f6;
    --sidebar-width: 260px;
    --transition: all 0.3s ease;
}

/* 2. ESTILOS GENERALES */
* { box-sizing: border-box; }

body { 
    background-color: var(--eme-light-bg); 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    overflow-x: hidden;
}

/* 3. ESTILOS ESPECÍFICOS DEL LOGIN */
.login-body { 
    display: flex !important; 
    align-items: center; 
    justify-content: center;
    min-height: 100vh; 
    margin: 0;
    background-color: var(--eme-light-bg);
    padding: 15px;
}

.login-box { 
    width: 100%; 
    max-width: 400px; 
    background: white; 
    padding: 40px; 
    border-radius: 12px; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.1); 
    border-top: 6px solid var(--eme-blue); 
    text-align: center;
}

.logo-text {
    font-size: 24px;
    font-weight: 800;
    color: var(--eme-blue);
    letter-spacing: 1px;
    margin-bottom: 0;
}

.sub-text {
    font-size: 11px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 30px;
}

.form-group-login {
    margin-bottom: 20px;
    text-align: left;
}

.form-group-login label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--eme-dark);
}

.btn-eme { 
    background: var(--eme-blue); 
    color: white; 
    border: none; 
    padding: 12px 25px; 
    border-radius: 6px; 
    font-weight: 600;
    transition: background 0.2s;
    font-size: 16px;
    letter-spacing: 1px;
    width: 100%;
    cursor: pointer;
}

.btn-eme:hover { 
    background: #286090; 
    color: white; 
}

/* 4. ESTRUCTURA DEL PANEL */
.sidebar { 
    width: var(--sidebar-width); 
    background: var(--eme-dark); 
    height: 100vh; 
    position: fixed; 
    left: 0; top: 0; 
    color: white; 
    z-index: 2000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    transition: var(--transition);
    overflow-y: auto;
}

.main-content { 
    margin-left: var(--sidebar-width); 
    padding: 40px;
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    transition: var(--transition);
}

.sidebar-header { 
    padding: 20px; 
    background: #1a252f;
    text-align: center; 
    border-bottom: 1px solid rgba(255,255,255,0.05); 
}

.sidebar-menu { padding: 10px 10px 30px 10px; }

.menu-label {
    padding: 20px 10px 5px; 
    font-size: 10px; 
    color: #7f8c8d; 
    font-weight: 800; 
    text-transform: uppercase; 
    letter-spacing: 1.5px;
}

.sidebar-menu a { 
    color: #bdc3c7; 
    display: block; 
    padding: 10px 15px; 
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
    font-size: 13px;
    border-radius: 4px;
    margin-bottom: 2px;
}

.sidebar-menu a:hover, .sidebar-menu a.active { 
    background: #34495e; 
    color: white !important; 
    border-left-color: var(--eme-blue);
}

.btn-logout-red { 
    color: #e74c3c !important; 
    margin: 20px 10px 0; 
    font-weight: bold; 
    border: 1px solid #e74c3c;
    display: block;
    padding: 10px;
    text-align: center;
    border-radius: 4px;
    text-decoration: none;
}
.btn-logout-red:hover { background: #e74c3c !important; color: white !important; }

/* 5. RESPONSIVO MÓVIL (CORREGIDO) */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 12px; 
    left: 12px;
    z-index: 2500; /* Por encima de todo, pero debajo del menú lateral */
    background: var(--eme-blue);
    color: white; 
    border: none;
    padding: 8px 12px; 
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    cursor: pointer;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 1500;
}

@media (max-width: 768px) {
    .sidebar { left: -265px !important; }
    .sidebar.active { left: 0 !important; }
    
    .main-content { 
        margin-left: 0 !important; 
        width: 100% !important; 
        padding: 15px !important; 
        padding-top: 70px !important; /* Espacio para que el contenido baje y no sea tapado */
    }
    
    .sidebar-toggle { display: block !important; }
    .sidebar-overlay.active { display: block !important; }
}

/* 6. COMPONENTES DE PÁGINAS */
.welcome-box { 
    background: var(--eme-dark); 
    color: white; 
    padding: 30px; 
    border-radius: 12px; 
    margin-bottom: 30px; 
}

.section-header { 
    margin: 25px 0 15px 0; 
    padding-left: 15px; 
    border-left: 5px solid var(--eme-blue); 
}

.table-container-white { 
    background: white; 
    padding: 25px; 
    border-radius: 12px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
}

.card-select {
    background: white; 
    padding: 30px 15px; 
    border-radius: 12px; 
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    transition: var(--transition);
    border-bottom: 5px solid #eee; 
    margin-bottom: 25px;
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    height: 220px;
    text-decoration: none !important;
}

.card-select:hover { transform: translateY(-8px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.card-select i { font-size: 40px; margin-bottom: 15px; }
.card-select h4 { font-weight: 700; color: var(--eme-dark); font-size: 15px; text-transform: uppercase; margin-bottom: 10px; }
.card-select p { color: #7f8c8d; font-size: 12px; margin: 0; }

.f-eval-em { border-color: #3498db; } .f-eval-em i { color: #3498db; }
.f-inst-em { border-color: #2980b9; } .f-inst-em i { color: #2980b9; }
.f-eval-er { border-color: #27ae60; } .f-eval-er i { color: #27ae60; }
.f-inst-er { border-color: #d35400; } .f-inst-er i { color: #d35400; }

.badge-tipo { padding: 4px 8px; border-radius: 4px; font-size: 10px; color: white; font-weight: bold; text-transform: uppercase; }
.bg-em { background-color: #3498db; } .bg-er { background-color: #27ae60; }


/* del formulario evaluación em*/
:root { --form-bg: #ffffff; --form-text: #333; --input-border: #ced4da; --eme-blue: #0056b3; --section-title: #f4f7f6; }
body.dark-mode { --form-bg: #1e272e; --form-text: #dcdde1; --input-border: #485460; --section-title: #2f3640; background-color: #1a1a1a !important; }

.main-content { padding-top: 20px; }
.form-card { background: var(--form-bg); color: var(--form-text); padding: 40px; border-radius: 8px; box-shadow: 0 2px 15px rgba(0,0,0,0.1); max-width: 1000px; margin: 0 auto 50px auto; }


.admin-controls { 
    display: flex; 
    flex-wrap: wrap; 
    justify-content: space-between; 
    align-items: center; 
    padding: 15px 0; 
    margin-bottom: 20px; 
    border-bottom: 1px solid var(--input-border);
    gap: 15px; 
}

.load-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.folio-display span { color: #e74c3c; border: 1px solid #e74c3c; padding: 2px 8px; border-radius: 4px; font-weight: bold; }

@media (max-width: 600px) {
    .admin-controls { justify-content: center; text-align: center; }
    .load-controls { width: 100%; justify-content: center; }
    .load-controls .input-group { width: 100% !important; max-width: 300px; }
    .form-card { padding: 20px; }
}

.section-header { background-color: var(--section-title); padding: 10px 15px; font-size: 16px; font-weight: 700; margin: 30px 0 20px 0; border-radius: 4px; border-left: 4px solid var(--eme-blue); }
.form-group label { font-weight: 600; font-size: 13px; margin-bottom: 8px; display: block; }

.hidden { display: none; }
.total-box { background: var(--section-title); padding: 10px; border-radius: 4px; font-weight: bold; margin-top: 10px; border: 1px solid var(--input-border); }
.canalizacion-row { display: flex; align-items: center; margin-bottom: 8px; gap: 10px; }

.action-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 40px; }
@media (max-width: 480px) { .action-buttons { grid-template-columns: 1fr; } }

.btn-borrador { background: #3498db; color: white; padding: 15px; border: none; border-radius: 4px; font-weight: bold; cursor: pointer; }
.btn-finalizar { background: #27ae60; color: white; padding: 15px; border: none; border-radius: 4px; font-weight: bold; cursor: pointer; }

.dark-toggle { position: fixed; top: 20px; right: 20px; background: #2c3e50; color: white; border: none; padding: 8px 15px; border-radius: 20px; cursor: pointer; z-index: 1001; font-size: 11px; }

/* 7. CORRECCIONES DE COMPONENTES BOOTSTRAP */
.modal { z-index: 3000 !important; }
.modal-backdrop { z-index: 2900 !important; }
