:root {
    --sidebar-width: 260px;
    --primary: #1a237e;
    --secondary: #3949ab;
    --bg: #f4f7fe;
    --white: #ffffff;
    --text-main: #2d3436;
    --text-muted: #636e72;
    --accent: #00d2ff;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Colores de Acción Globales */
    --clr-print :#455a64;
    --clr-excel :#2e7d32;
    --clr-report: #6a1b9a;
    --clr-link: #3f51b5;
}


* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }

body { 
    background: var(--bg); 
    color: var(--text-main); 
    overflow-x: hidden;
    width: 100%;
    /* SOPORTE PARA STICKY FOOTER */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Fix global para evitar desbordamientos */
body { overflow-x: hidden; width: 100%; }


/* =========== SIDEBAR  =========== */
#sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--primary);
    color: var(--white);
    transition: var(--transition);
    z-index: 1000;
    padding: 20px;
    
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Permite scroll incluso en PC si la ventana peque */
}

.brand {
    display: flex;
    flex-direction: column; 
    align-items: center;    
    justify-content: center;
    padding: 20px 15px;     
    width: 100%;
    gap: 10px;
}

.brand i {
    font-size: 36px;
    color: #e0e0e0; 
    opacity: 0.95;  
    margin: 0;             
    display: block;
}


.brand h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    text-align: center;     
    width: 100%;           
    line-height: 1.2;
}

/* Ocultar el perfil del sidebar en pantallas grandes */
.sidebar-user { 
    display: flex;
    justify-content: center; 
    align-items: center;     
    gap: 12px;               
    padding: 15px 0;         
    width: 100%;
}

/*  VARIABLE DEL PERFIL DEL USUARIO LOGEADOF */
.user-profile-link {
    text-decoration: none; 
    color: inherit;
}
.user-profile-link i{
    font-size: 32px; color: var(--white);
    
}


.user-profile-link p{
    font-size: 14px; font-weight: 700; margin: 0;
}
.user-profile-link span{
    font-size: 11px; color: #888;
}

.nav-links { list-style: none; flex: 1;}
.nav-links li { margin-bottom: 8px; }

.nav-links a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-radius: 12px;
    transition: var(--transition);
}

.nav-links li.active a, .nav-links a:hover {
    background: rgba(255,255,255,0.1);
    color: var(--white);
}

/* ESTILOS GENERALES DEL SIDEBAR */   
.nav-links .nav-label{
    margin: 20px 0 10px 25px; font-size: 10px; font-weight: 800; color: #888; text-transform: uppercase; letter-spacing: 1px;
}



/* ESPACIADOR EXTRA ENTRA MENUS */   
.separador-sidebar-tags {
    margin-top: 20px;       /* Corregido '15x' por '15px' */
    margin-bottom: 20px;    /* Espaciado también abajo para que respire el menú */
    
}

/* ===================  SIDEBAR FIN  =================== */   
/* --- CONTENT AREA --- */
#main-content {
    margin-left: var(--sidebar-width);  
    padding: 30px;
    transition: var(--transition);
    flex: 1 0 auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    padding: 8px 15px;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

/* --- CARDS & GRID --- */

.card {
    background: var(--white);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.card:hover { transform: translateY(-5px); }

.card i {
    font-size: 35px;
    padding: 15px;
    background: #eef2ff;
    color: var(--primary);
    border-radius: 15px;
}

.content-box {
    background: var(--white);
    padding: 30px;
    border-radius: 24px;
    min-height: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
}

/* --- RESPONSIVE --- */
.menu-toggle { display: none; font-size: 28px; cursor: pointer; color: var(--primary); }


/* OCULTAMOS LA VARIABLE DEL USUARIO LOGEADO 
Y EL ICONO, PARA QUE SOLO SE MUESTRE EN RESPONSIVE */

@media (min-width: 769px) {
    .sidebar-user { display: none; }
}

/* RESPONSIVE MOVIL */
@media screen and (max-width: 1024px) {
    .footer-ultra {
        margin-left: 0 !important;
        padding: 30px 15px !important; 
        text-align: center;
        height: auto !important; 
    }

    .footer-wrap {
        flex-direction: column !important; 
        gap: 20px !important;
        align-items: center !important;
    }

    .footer-brand-new p {
        display: flex;
        flex-direction: column;
        gap: 8px;
        align-items: center;
        white-space: normal !important;/
    }

    /* Ocultamos la barra separadora "|" en móviles */
    .sep-new { 
        display: none !important; 
    }

    /* Forzamos que el texto largo no rompa el diseño */
    .no-break {
        white-space: normal !important;
        display: block;
        line-height: 1.4;
    }

    .footer-meta-new {
        flex-direction: column-reverse !important; /* Badge abajo, Estado arriba */
        gap: 12px !important;
        width: 100%;
        align-items: center !important;
    }

    /* Los badges ocuparán un ancho cómodo, no todo el ancho para que luzcan mejor */
    .status-online-new, .v-badge-blue-new {
        width: fit-content;
    }





/* Colores dinámicos según el estado */
.status-blink-new.en-línea { background-color: #27ae60; } /* Verde */
.status-blink-new.en-desarrollo { background-color: #f39c12; } /* Naranja */
.status-blink-new.en-mantenimiento { background-color: #e74c3c; } /* Rojo */







}

/* --- BLOQUE MAESTRO RESPONSIVE (992px) --- */
@media (max-width: 992px) {
    /* ESTRUCTURA Y NAVEGACIO7N */
    #sidebar { left: -100%; }
    #main-content { margin-left: 0; padding: 20px; }
    #sidebar.active { left: 0; }
    .menu-toggle { display: block !important; margin: 0 !important; }

    /* VISIBILIDAD DEL PERFIL (ADMIN) */
    header a[href="configuracion.php"], 
    header .user-profile { 
        display: none !important; 
    }
    .sidebar-user {
        display: flex !important;
        align-items: center;
        gap: 12px;
        padding: 15px 25px;
        margin-bottom: 10px;
        background: rgba(26, 35, 126, 0.05); 
        border-bottom: 1px solid #eee;
    }

    /* HEADER (ALINEACIO7N IZQUIERDA Y REPORTES) */
    header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
        width: 100% !important;
    }
    /* Alineacion total a la izquierda del primer bloque */
    header > div:first-child {
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-start !important;
        align-items: center !important;
        gap: 15px !important;
        width: 100% !important;
    }
    header div:last-child {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 10px !important;
    }

    /* BOTONES (CORREGIDO PARA LECTOR QR) */
    .btn-add, .btn-print, .btn-save, .btn-cancel, .btn-filter {
        width: 100% !important;
        height: 48px !important;
        margin: 5px 0 !important;
        display: flex; 
        justify-content: center;
        align-items: center;
    }

    .btn-group { flex-direction: column !important; gap: 10px !important; width: 100% !important; }

    /* TABLAS Y GRIDS (EVITAR DESBORDE) */
    .stats-grid { grid-template-columns: 1fr !important; }
    
    div[style*="grid-template-columns: 2fr 1fr"],
    .dashboard-grid { 
        display: block !important;
        grid-template-columns: 1fr !important; 
        width: 100% !important;
    }
    
    .content-box { width: 100% !important; margin-bottom: 20px; overflow-x: hidden; }
    .table-container { width: 100% !important; overflow-x: auto !important; -webkit-overflow-scrolling: touch; }

    .actions-qr {
        display: flex !important;
        flex-direction: column !important; /* apilamos solo en movil para que no choquen */
        align-items: center !important;
        gap: 12px !important;
        width: 100% !important;
   }

    .btn-back, .btn-download, .btn-print {
        width: 100% !important;
        max-width: 320px !important; 
        justify-content: center !important;
        height: 45px !important;
        display: flex !important;
        align-items: center !important;
    }
}

/* --- RESPONSIVE: CENTRADO EN MOVILES --- */
@media (max-width: 768px) {
    .paginacion-footer {
        flex-direction: column !important; /* Texto arriba, botones abajo */
        gap: 15px;
        text-align: center;
    }
    
    .grupo-paginacion {
        justify-content: center !important;
        width: 100%;
    }
    
    
    #sidebar { /* Cambiado de .sidebar a #sidebar */
        height: 100vh;
        /* Usamos flex para que el scroll sepa cuonto espacio queda */
        display: flex;
        flex-direction: column;
        overflow-y: auto !important; 
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 20px; /* Espacio extra para que el ultimo menu no choque con el borde */
    }

}

@media (max-width: 576px) {
    .stats-grid { grid-template-columns: 1fr; }
    /* El header ya se maneja en el bloque 992  */
    
    .report-toolbar {
        flex-direction: column; /* Se apilan */
        width: 100%;
    }

    .btn-report {
        width: 100% !important; 
        height: 48px;           
    }
    
}

/* --- ESTILOS DE FORMULARIOS --- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}
.input-box { display: flex; flex-direction: column; gap: 5px; }
.input-box label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.input-box input, .input-box select {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    outline: none;
    transition: 0.3s;
}

.btn-add {
    background: var(--primary);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    /*display: flex; ESTA HACIENDO QUE SE ESTIRE MUCHO PARA REUTILIZAR MIS BOTONES*/
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}


.btn-secondary {
    background: var(--primary);
    color: white;
    border: none;

    font-size: 12px;
    padding: 10px 15px;
    border-radius: 20px;
    font-weight: 600;
    text-decoration: none;   
    
   
    align-items: center;
    gap: 8px;
}


/* --- ESTILOS DE TABLAS --- */
.table-container { overflow-x: auto; margin-top: 20px; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 15px; border-bottom: 2px solid #eee; color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
td { padding: 15px; border-bottom: 1px solid #eee; font-size: 14px; color: var(--text-main); }

/* --- BADGES DE ESTADO --- */
.status-pill { padding: 5px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.status-activo { background: #e8f5e9; color: #2e7d32; }
.status-inactivo { background: #ffebee; color: #c62828; }



.status-permiso { background: #e0e7ff; color: #3730a3; } 


/* --- COLORES POR CARRERA --- */
.carrera-badge {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    display: inline-block;
    text-transform: uppercase;
}

.carrera-sistemas { background-color: #3949ab; } 
.carrera-contabilidad { background-color: #e53935; } 
.carrera-negocios { background-color: #2e7d32; } 
.carrera-default { background-color: #757575; }

/* ========= ESTADO DE LOS PERMISOS =========*/
.status-badge.pendiente { background: #fff3cd; color: #856404; }
.status-badge.aprobado { background: #d4edda; color: #155724; }
.status-badge.rechazado { background: #ffebee; color: #dc3545; }

/* --- EFECTO GLASSMORPHISM PARA DASHBOARD --- */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}


.card-glass {
    position: relative;
    padding: 25px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.4); 
    background: rgba(255, 255, 255, 0.7); 
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.glass-blue { background: rgba(227, 242, 253, 0.6); }
.glass-green { background: rgba(232, 245, 233, 0.6); }
.glass-orange { background: rgba(255, 243, 224, 0.6); }

.card-glass:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

.glass-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.glass-blue .glass-icon { background: #1976d2; color: white; }
.glass-green .glass-icon { background: #2e7d32; color: white; }
.glass-orange .glass-icon { background: #f57c00; color: white; }

.glass-info h3 { font-size: 28px; font-weight: 700; margin: 0; color: #333; }
.glass-info p { font-size: 14px; color: #666; font-weight: 500; margin: 0; }

/* Ajuste para iconos de accion en telefonos (ALUMNOS.PHP) */
.table-container a i { font-size: 18px; transition: transform 0.2s; }
.table-container a:hover i { transform: scale(1.2); }



/* PARCHE: OCULTAR BOTON DETENER POR DEFECTO */
#btn-stop { display: none !important; }

/* =============================================
                FOOTER FINAL INTEGRADO
   ============================================= */
.footer-ultra {
    margin-left: var(--sidebar-width); 
    padding: 20px 40px;
    margin-top: auto; /* margin-top: 50px por auto para que siempre esté al fondo */
    background: #ffffff !important;
    border-top: 1px solid #eee; /* Cambié var(--grey) por un color fijo por si la variable falla */
    transition: all 0.3s ease;
    width: auto;
    overflow: hidden; /* Evita desbordamientos laterales */
}

/* Ajuste para Sidebar encogido */
#sidebar.hide ~ .footer-ultra,
.sidebar.hide ~ .footer-ultra {
    margin-left: 60px;
}

.footer-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.footer-brand-new p {
    color: #888;
    font-size: 13.5px;
    margin: 0;
}

/* Enlaces Azules */
.link-istepsa, .link-dev {
    color: #1A237F !important;
    text-decoration: none !important;
    font-weight: 700 !important;
}

.sep-new {
    margin: 0 8px;
    color: var(--grey);
}

.footer-meta-new {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Badge Azul Ovalado */
.v-badge-blue-new {
    background-color: #1A237F !important;
    color: #ffffff !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    padding: 4px 12px !important;
    border-radius: 50px !important;
    display: inline-block !important;
}

/* Estado Online */
.status-online-new {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #27ae60;
    background: rgba(39, 174, 96, 0.1);
    padding: 5px 12px;
    border-radius: 6px;
}

/* RECUPERADO: PUNTO VERDE Y ANIMACION */
.status-blink-new {
    width: 7px; 
    height: 7px;
    background-color: #27ae60;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    animation: blink-effect 1.5s infinite; 
}

.status-blink-new::after {
    content: ""; 
    width: 100%; 
    height: 100%;
    background-color: #27ae60; 
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    animation: pulse-ring-fx 1.5s infinite;
}

@keyframes pulse-ring-fx {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(3); opacity: 0; }
}

@keyframes blink-effect {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* --- FOOTER DASHBOARD --- */
.no-break, .copyright-group {
    white-space: nowrap; 
}

/* --- AJUSTE PA9GINAS SIN SIDEBAR (VER_QR) --- */
.qr-page-container .footer-ultra {
    margin-left: 0 !important; 
    width: 100% !important;
    padding: 20px 30px !important;
}

.qr-page-container .footer-wrap {
    max-width: 1200px; /* O el ancho que desees para que no se pegue a los bordes */
    margin: 0 auto;
    justify-content: space-between; /* Mantiene el logo a la izquierda y version a la derecha */
}

/* Para que el footer se pegue al ras del suelo sin aire blanco abajo */
.qr-page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#qr-main-wrapper {
    flex: 1; /* Esto empuja al footer hasta abajo de la pantalla */
}

/* =============================================
   CONFIGURACION DE IMPRESIO7N
   ============================================= */
@media print {
    .actions-qr, #sidebar, header, .footer-ultra, .btn-download, .qr-btn-group { 
        display: none !important; 
    }
    #main-content, .qr-page-container { 
        margin-left: 0 !important; padding: 0 !important; 
    }
}


/* --- ESTILOS EXPLUSIVO PARA MIS REPORTES YA QUE ENTRAN EN CONFLICO CON LAS OTRAS CLASES QUE ESTAN EN BLOQUE --- */

/* 1. Comportamiento en PC (Escritorio) */
.report-toolbar {
    display: flex;
    gap: 10px;
    justify-content: flex-end; /* Los manda a la derecha en PC */
    align-items: center;
}

.btn-report {
    height: 40px;
    padding: 0 20px;
    border-radius: 8px;
    border: none;
    color: white;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: 0.3s;
    width: auto; /* En PC miden solo lo que necesitan */
}

/* =================================================================
   FORMULARIOS DE CAMBIO DE PASSWORD Y EDICION DE DATOS DEL ALUMNO
   ================================================================= */ 
  /* perfil.php (CONFIGURACION.PHP) y edit_alumno.php comparten el mismo estilo de este bloque, incluyendo botones*/
  
    .center-container {
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 70vh;
        width: 100%;
    }
    .main-card-content {
        background: var(--white);
        padding: 40px;
        border-radius: 24px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.05);
        width: 100%;
        max-width: 450px; /*cambiar a 600px siel contenedor es muy estrecho*/
    }

    
    .btn-group { display: flex; gap: 10px; margin-top: 25px; }
    .btn-cancel {
        background: #eee;
        color: var(--text-main);
        padding: 12px 25px;
        border-radius: 12px;
        text-decoration: none;
        font-weight: 600;
        flex: 1;
        text-align: center;
    }
    .btn-save { flex: 2; }

/* =============================================
   SISTEMA DE PAGINACIION PERSONALIZADO
   ============================================= */

/* Contenedor principal (el que tiene el ID en el PHP de reportes/alumnos) */
.paginacion-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    width: 100%;
}

/* Contenedor de los botones (el que genera la funcion) */
.grupo-paginacion {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* Estilo de cada cuadrito/numero */
.btn-pagina {
    display: flex !important;
    justify-content: center;
    align-items: center;
    width: 36px !important; 
    height: 36px !important;
    background: #f1f3f9;
    color: var(--primary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    border: none !important; 
}

/* Pagina activa */
.btn-pagina.active {
    background: var(--primary) !important;
    color: white !important;
}

/* Puntos suspensivos */
.paginacion-puntos {
    color: var(--text-muted);
    font-weight: 700;
    padding: 0 5px;
}


/* =============================================
    SUBMENÚ DE PESTAÑAS (TABS)
   ============================================= */

.tabs-nav {
    display: flex !important;
    flex-direction: row !important; /* Alineación horizontal */
    justify-content: flex-start !important; /* Pegados a la izquierda */
    gap: 20px; /* Espacio entre cada tab */
    border-bottom: 2px solid #eef2f5;
    margin-bottom: 30px;
    padding-left: 5px; /* Pequeño respiro desde el borde izquierdo */
    width: 100%;
    max-width: 600px; /* Alineado al ancho del formulario */
}
.tab-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
    padding: 12px 5px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    white-space: nowrap; /* Evita que el texto se rompa en dos líneas */
}

.tab-link i { 
    font-size: 18px; 
}

.tab-link:hover { 
    color: var(--primary); 
}

.tab-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
/* Control estricto de visibilidad */
.tab-content { 
    display: none !important; /* Oculta por defecto todas las secciones */
    width: 100%;
}

.tab-content.active { 
    display: block !important; /* Muestra solo la sección activa */
    animation: fadeInTab 0.3s ease-in-out; 
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Zona de peligro en pestaña Backup */
.danger-zone {
    border: 1px solid #ffcdd2;
    background: #ffebee30;
    padding: 25px;
    border-radius: 16px;
    margin-top: 20px;
}

/* ESTILOS PARA VER QUIEN ESTA LOGEADO Y SU ROL */
.user-profile-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px; /*  espacio a los lados */
    background-color: #fff; /* fondo blanco que envuelve todo */
    border-radius: 50px; /* crea el efecto de cápsula/circular */
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-main);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
}

.user-profile-wrapper:hover {
    background-color: #f8f9fa; 
    transform: translateY(-1px);
}

.user-info-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-name-text {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-main);
    white-space: nowrap; /* Evita que el nombre se parta en dos líneas */
}

.user-role-label {
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}


/*===========================================================================
    ACCESO RAPIDO BOTON DEL ESCANER EN EL DASHBOARD COMO UN ACCESO DIRECTO 
===========================================================================*/

/* Contenedor del acceso directo */
.shortcut-container {
    display: flex;
    align-items: center;
    padding-right: 15px;
    border-right: 1px solid rgba(0,0,0,0.05);
}

/* Botón principal de escaneo */
.btn-scan-shortcut {
   text-decoration: none !important;
    display: inline-flex; /* 👈 SOLUCIÓN CLAVE: Activa gap/alineación interna sin estirarse */
    align-items: center;
    gap: 8px;
    color: white !important;
    background-color: var(--primary);
    padding: 10px 18px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

/* Ajuste del icono */
.btn-scan-shortcut i {
    font-size: 1.1rem;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

/* Ajuste del texto */
.btn-scan-shortcut span {
    letter-spacing: -0.2px;
}

/* Efectos de interacción */
.btn-scan-shortcut:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.btn-scan-shortcut:active {
    transform: translateY(1px);
}

/* Ajuste sutil para móviles */
@media (max-width: 768px) {
    .btn-scan-shortcut span {
        font-size: 12px;
    }
    .shortcut-container {
        padding-right: 10px;
    }
}

/* arreglo responsive del boton 3+ falas en faltas.php */
@media (max-width: 480px) {
    .local-faltas-responsive {
        display: flex !important; 
        width: 100%;
        justify-content: center;
        padding: 12px;
        box-sizing: border-box;
    }
}


/* ====================================================================== 
            DASHBOAD HOVER EN COLUMNAS 
 ====================================================================== */
 /* Efecto para hover para "ulimas marcaciones" y global? */
 tbody tr:hover {
                background-color: #f3f3f3;
                transition: background 0.2s;
            }
                
/* ====================================================================== */            


 /* estilo para el botón de WhatsApp de generar_masivo_qr.php y faltas.php */
.btn-whatsapp { 
    background: #25d366; 
    color: white; 
    padding: 5px 10px; 
    border-radius: 6px; 
    text-decoration: none; 
    display: inline-flex; 
    align-items: center; 
    gap: 5px; 
    font-size: 13px;
    transition: 0.3s;
}
.btn-whatsapp:hover { background: #128c7e; }
/* ====================================================================== */     

/* ===================================================================================================================================================================
    traido de reportes.php -  Contenedor principal de los filtros (Barra blanca superior) 
     
.filter-form { display: flex; flex-wrap: wrap; gap: 15px; align-items: flex-end; margin-bottom: 25px; background: #fff; padding: 20px; border-radius: 15px; box-shadow: 0 4px 12px rgba(0,0,0,0.02); }
*/

/* Alineacion de etiqueta e input en vertical */
.filter-group { display: flex; flex-direction: column; gap: 5px; }
    /* Estilo de las etiquetas de los filtros */
.filter-group label { font-size: 12px; font-weight: 700; color: var(--text-muted); }
    /* Estilo de los campos de entrada y selectores */
.filter-group input, .filter-group select { padding: 8px 12px; border-radius: 8px; border: 1px solid #ddd; outline: none; }
    /* Boton de filtrar (Azul Primario) 
.btn-filter { background: var(--primary); color: white; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; font-weight: 600; height: 40px; }*/

/* ===================================================================================================================================================================*/
  
/* ===================================================================================================================================================================
BOTON QUE REGRESA AL INICIO */
.back-to-top {
        position: fixed;
        bottom: 25px; 
        right: 25px;    
        width: 45px;
        height: 45px;
        background: var(--primary);
        color: white;
        border: none;
        border-radius: 50%;
        cursor: pointer;
        display: none; 
        align-items: center;
        justify-content: center;
        font-size: 24px;
        z-index: 2000;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .back-to-top:hover {
        transform: scale(1.1);
        background: var(--secondary);
    }
   
/* ===================================================================================================================================================================  */








/* =========================================================================================
              MIS CLASES GLOBALES QUE QUITE CUANDO HICE EL CSS INLINE
========================================================================================= */
.header-title-flex { display: flex; align-items: center; gap: 15px; }
.header-flex-wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }
.table-head-row { background: #f8f9fa; border-bottom: 2px solid #eee; }
.pagination-text { font-size: 13px; color: var(--text-muted); }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mt-30 { margin-top: 30px; }
.m-0 { margin: 0; }
.ml-5 { margin-left: 5px; }
.text-bold { font-weight: 600; }
.text-center { text-align: center; }
.text-14 { font-size: 14px; display: block; }
.text-danger-bold { color: #e53935; font-weight: 700; }
.text-primary-bold { font-weight: 700; color: var(--primary); }
.text-muted-light { color: #ccc; }
.link-unstyled { text-decoration: none; color: inherit; }
.clickable-header { cursor: pointer; }
.clickable-row { cursor: pointer; }
.form-actions-wrapper { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; margin-top: 20px; border-top: 1px solid #eee; padding-top: 20px; width: 100%; }
.student-info-flex { display: flex; align-items: center; gap: 10px; }
.avatar-primary { width: 35px; height: 35px; background: #f0f7ff; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #0061f2; }
.avatar-danger { width: 35px; height: 35px; background: #fff5f5; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #e53935; }
/*.btn-wsp-custom { background: #25d366; padding: 5px 10px; font-size: 11px; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; border-radius: 6px; color: #fff;}*/
.btn-success-custom { background: #2e7d32; text-decoration: none; }
.btn-success-sm { padding: 8px 15px; font-size: 12px; background: #2e7d32; }


.icon-reset { font-size: 18px; margin-right: 5px; }
.empty-icon-lg { font-size: 1.5rem; vertical-align: middle; margin-right: 8px; color: #999; }
.badge-motivo { background: #f0f4ff; color: #0056b3; padding: 3px 8px; border-radius: 5px; font-weight: bold; font-size: 11px; text-transform: uppercase; }
.badge-motivo-light { background: #e8f0fe; color: #1967d2; border: none; }
.user-profile-btn { cursor: pointer; transition: 0.3s; display: flex; align-items: center; gap: 8px; }
.icon-profile { font-size: 24px; color: var(--primary); } 
.pill-light-gray { background: #f5f5f5; }

/* =========================================================================================
       LOS CSS CON CONFLICTOS QUE TENIA Y LAS SOLUCIONE 
========================================================================================= *

/* ESPACIO ETIQUETA P EN FALTAS Y PERMISOS */
.page-desc { margin-bottom: 25px; color: var(--text-muted); font-size: 14px; margin-top: 5px; }

/*  */
.search-wrapper { display: flex; justify-content: flex-end; margin-bottom: 15px; }

/*  SEARCH BOX FLEX GLOBAL */
.search-box-flex { display: flex; gap: 5px; width: 100%; max-width: 400px; }
.search-box-flex input:focus, .search-box input:focus, .input-box input:focus, .input-box select:focus, .filter-group input:focus, .filter-group select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1); }
.search-input-clean { flex: 1; padding: 10px; border-radius: 10px; border: 1px solid #ddd; outline: none; font-size: 13px; }

/* ESTILOS Y SEARCH BOX DE REPORTE INDIVIDUAL*/
.search-container { background: #fff; padding: 25px; border-radius: 15px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); margin-bottom: 20px; } 
.search-box { display: flex; gap: 10px; max-width: 600px; margin-top: 10px; flex-wrap: wrap; }
.search-input-lg { flex: 1; padding: 12px; border: 1px solid #ddd; border-radius: 8px; outline: none; min-width: 250px; }
.results-list { list-style: none; padding: 0; margin-top: 10px; border: 1px solid #eee; border-radius: 8px; overflow: hidden; }
.results-list li a { display: block; padding: 12px; text-decoration: none; color: #333; background: #fff; border-bottom: 1px solid #eee; transition: 0.2s; }
.results-list li a:hover { background: #f0f7ff; color: var(--primary); }
.info-card { background: var(--primary); color: white; padding: 20px; border-radius: 15px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; }

.empty-search-item { padding: 15px; color: #999; text-align: center; }
.student-subtext-inline { color: #888; font-size: 0.85em; margin-left: 10px; }

/*  */
.student-subtext { display: block; color: #888; font-size: 11px; }

/*  */
.text-muted-xs { color: var(--text-muted); font-size: 12px; }

/*  */
.text-muted-xs-italic { font-size: 10px; color: #bbb; font-style: italic; padding-bottom: 20px;}



/* */
 .search-btn-primary { padding: 10px 15px; background: var(--primary); transition: 0.3s; }

/* */
.header-actions-flex { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }

/* =========================================================================================
                                    MIS CLASES ÚNICAS 
========================================================================================= */

/* --- ALUMNOS.PHP --- */
.btn-register-main { flex: 1; min-width: 280px; max-width: 320px; justify-content: center; }
.import-box-wrapper { display: flex; align-items: center; gap: 10px; background: #f8f9fa; padding: 12px; border-radius: 12px; border: 1px dashed #ccc; flex-wrap: wrap; flex: 1; min-width: 280px; justify-content: center; }
.import-label-flex { display: flex; flex-direction: column; gap: 2px; min-width: 120px; }
.import-label-text { font-size: 13px; font-weight: 700; color: #444; cursor: pointer; white-space: nowrap; }
.import-download-link { font-size: 11px; color: var(--primary); text-decoration: none; font-weight: 700; white-space: nowrap; }
.import-file-input { font-size: 11px; flex: 1; min-width: 130px; }
.btn-upload-csv { background: #555; padding: 8px 15px; font-size: 13px; white-space: nowrap; height: 35px; }
.icon-sort { font-size: 14px; opacity: 0.5; }
.th-contacto { width: 40px; }
.icon-xs { font-size: 10px; }
.ciclo-flex-container { display: flex; gap: 10px; margin-top: 4px; }
.text-gray { color: gray; }
.text-gray-sm { color: gray; font-size: 0.85em; }
.wsp-link-icon { color: #25d366; font-size: 20px; }
.wsp-disabled-icon { color: #ccc; font-size: 20px; }
.qr-link-icon { color: var(--primary); font-size: 20px; }
.actions-flex { display: flex; gap: 10px; }
.action-edit-icon { color: #3949ab; }
.action-delete-icon { color: #e53935; }

/* --- DASHBOARD.PHP --- */
.progress-bar-container { background: #eee; height: 10px; border-radius: 10px; overflow: hidden; margin-top: 5px; }
.progress-fill { height: 100%; transition: width 1s ease-in-out; }
.dashboard-grid { display: grid; grid-template-columns: 1.4fr 0.6fr; gap: 20px; align-items: start; }
.dashboard-footer-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 20px; align-items: stretch; }
.dashboard-footer-grid .content-box { min-height: auto !important; height: fit-content !important; padding: 15px 20px; }
.status-container { display: block; margin-top: 10px; }
.status-item { display: flex; align-items: center; gap: 10px; padding: 12px; background: #ffffff; border-radius: 8px; border: 1px solid #f0f0f0; margin-bottom: 10px; width: 100%; }
.status-item i { font-size: 20px; color: var(--primary); }
.status-info p { margin: 0; font-size: 11px; color: #888; }
.status-info span { font-weight: 600; font-size: 13px; color: #333; }
.ranking-item { display: flex; align-items: center; gap: 8px; padding: 8px; background: #fcfcfc; border-radius: 8px; border: 1px solid #f0f0f0; transition: all 0.3s ease; margin-bottom: 8px; }
.ranking-item:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.06); border-color: var(--primary) !important; background-color: #fff !important; }
.ranking-number { background: #fff0f0; color: #e53935; padding: 5px 10px; border-radius: 5px; font-weight: bold; font-size: 16px; min-width: 30px; text-align: center; transition: 0.3s; }
.ranking-item:hover .ranking-number { background-color: #e53935 !important; color: #fff !important; }
.r-name { font-weight: 600; color: #444 !important; font-size: 12px; } 
.r-dni { color: #e57373 !important; font-size: 11px; margin-left: 4px; font-family: monospace; }
.r-label { color: #888 !important; font-size: 10px; display: block; }
.ranking-item:hover .r-name { color: #444 !important; }
.ranking-item:hover .r-dni { color: #e57373 !important; }
.ranking-item:hover .r-label { color: #888 !important; }
.riesgo-container { display: flex; flex-direction: column; gap: 8px; }
.alerta-riesgo { padding: 10px; border-left: 4px solid #ff5252; background: #fff5f5; border-radius: 4px; display: flex; justify-content: space-between; align-items: center; transition: transform 0.2s ease; cursor: pointer; user-select: none; }
.alerta-riesgo:hover { transform: translateX(5px); background: #ffebeb; box-shadow: 2px 2px 8px rgba(255, 82, 82, 0.1); }
.alerta-riesgo:active { transform: scale(0.97) translateX(5px); background: #ffdada; }
.riesgo-info strong { color: #333; display: block; font-size: 13px; line-height: 1.2; }
.riesgo-info span { color: #666; font-size: 11px; }
.riesgo-icon { color: #ff5252; font-size: 18px; flex-shrink: 0; }
.notif-bajas-box { background: #fff8e1; border: 1px solid #ffe082; position: relative; }
.notif-bajas-title { font-size: 14px; margin-bottom: 12px; color: #f57f17; display: flex; align-items: center; gap: 6px; }
.notif-bajas-desc { font-size: 11px; color: #666; margin-bottom: 12px; padding-right: 25px; }
.notif-bajas-list { display: flex; flex-direction: column; gap: 8px; }
.notif-bajas-item { display: flex; flex-direction: column; background: #fff; padding: 8px 10px; border-radius: 6px; border-left: 3px solid #ffca28; }
.notif-bajas-name { font-weight: 600; font-size: 12px; color: #333; }
.notif-bajas-carrera { font-size: 10px; color: #888; }
.notif-close-btn { position: absolute; top: 12px; right: 15px; background: none; border: none; font-size: 18px; color: #f57f17; cursor: pointer; transition: 0.2s; }
.notif-close-btn:hover { color: #e65100; transform: scale(1.1); }
.glass-danger-custom { background: rgba(235, 87, 87, 0.1); border: 1px solid rgba(235, 87, 87, 0.2); }
.glass-danger-icon { color: #eb5757; }
.glass-warning-dyn { background: rgba(211, 47, 47, 0.1); border: 1px solid rgba(211, 47, 47, 0.2); }
.glass-warning-icon { color: #d32f2f; }
.glass-success-dyn { background: rgba(155, 81, 224, 0.1); border: 1px solid rgba(155, 81, 224, 0.2); }
.glass-success-icon { color: #9b51e0; }
.dash-section-title { margin-bottom: 20px; }
.dash-section-title-sm { margin-bottom: 15px; font-size: 15px; color: #333; }
.dash-section-title-danger { color: #d32f2f; font-size: 14px; margin-bottom: 15px; }
.td-flex-column { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.icon-entrada { color: #1976d2; font-size: 10px; }
.icon-salida { font-size: 10px; }
.text-success-bold { color: #27ae60; font-weight: 600; }
.status-small-bold { font-size: 9px; text-transform: uppercase; font-weight: bold; }
.action-link-container { text-align: center; margin-top: 15px; }
.btn-rounded-light { font-size: 11px; color: #666; text-decoration: none; background: #f0f0f0; padding: 5px 15px; border-radius: 20px; transition: 0.3s; display: inline-block; }
.btn-rounded-light:hover { background: #e0e0e0; }
.dashed-divider { margin: 25px 0; border-top: 1px dashed #eee; }
.solid-divider { border: 0; border-top: 1px solid #eee; margin: 25px 0; }
.solid-divider-dark { border: 0; border-top: 1px solid #d8c5c5; margin: 25px 0; }
.icon-danger { color: #e53935; }
.grid-2-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.empty-state-text { grid-column: span 2; text-align: center; font-size: 12px; color: #999; }
.empty-state-text-pad { font-size: 12px; color: #999; text-align: center; padding: 20px; }
.text-danger-uppercase { text-transform: uppercase; font-size: 10px; color: #d32f2f; }
.min-h-auto { min-height: auto; }
.flex-between-bold { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: #333; }
.flex-wrap-gap8-mt6 { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.badge-ciclo { font-size: 12px; background: #f0f2f5; padding: 6px 8px; border-radius: 4px; color: #555; border: 1px solid #e0e0e0; }
.text-dark-bold { color: #333; }
.content-box-light { background: #f8f9fa; }
.status-vacaciones { color: #e6000c; font-weight: 800; font-size: 11px; display: flex; align-items: center; gap: 4px; }
.icon-vacaciones { font-size: 14px; color: #e6000c; }
.status-online { color: #27ae60; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.icon-online { font-size: 14px; color: #27ae60; }

/* --- EDIT_ALUMNO.PHP --- */
.input-disabled-custom { background: #f5f5f5; color: #888; }
.grid-col-span-2 { grid-column: span 2; }
.btn-justify-center { justify-content: center; }   

/* --- LECTOR.PHP --- */
#reader { width: 100%; max-width: 500px; margin: 0 auto; border-radius: 20px; overflow: hidden; background: #000; border: none !important; }
.scanner-container { text-align: center; padding: 20px; }
.btn-controls { margin-top: 20px; display: flex; justify-content: center; gap: 15px; }
#status-text { font-weight: 600; transition: 0.3s; color: var(--primary); } 
.scanner-result-box { margin-top: 20px; padding: 15px; border-radius: 10px; background: #f8f9fa; border: 1px solid #ddd; }
.alert-info-box { margin: 15px 0; padding: 12px 15px; background: #e3f2fd; border-left: 4px solid #1976d2; border-radius: 8px; text-align: left; }
.alert-info-label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; color: #0d47a1; margin: 0; }
.checkbox-large { transform: scale(1.3); cursor: pointer; }
.alert-info-desc { margin: 5px 0 0 28px; font-size: 11px; color: #555; line-height: 1.4; }
.text-danger-custom { color: #d32f2f; }
.mb-15 { margin-bottom: 15px; }
.btn-scan-start { background: #2e7d32; display: flex !important; }
.btn-scan-stop { background: #e53935; display: none; }

/* --- PERFIL.PHP o CONFIGURACION.PHP --- */
input, select { max-width: 100%; box-sizing: border-box; }   
@media (max-width: 671px) { div[style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; } .hide-mobile { display: none !important; } }
fieldset[disabled] { opacity: 0.7; filter: grayscale(0.5); cursor: not-allowed; }
fieldset[disabled] button { pointer-events: none; }
.switch-container { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.switch { position: relative; display: inline-block; width: 46px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: 0.3s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: 0.3s; border-radius: 50%; }
input:checked + .slider { background-color: #27ae60; }
input:checked + .slider:before { transform: translateX(22px); }
.status-text { font-weight: bold; font-size: 14px; color: #c62828; }
input:checked ~ .status-text { color: #27ae60; }
.perfil-tab-container { display: flex; justify-content: center; width: 100%; padding: 10px; }
.perfil-card-content { max-width: 950px; width: 100%; }
.perfil-header { margin-bottom: 30px; border-bottom: 1px solid #eee; padding-bottom: 15px; }
.perfil-title { margin-bottom: 5px; }
.perfil-subtitle { color: var(--text-muted); font-size: 14px; }
.perfil-form-grid { display: flex; gap: 40px; flex-wrap: wrap; margin-bottom: 30px; }
.perfil-col { flex: 1; min-width: 200px; }
.perfil-section-title { margin-bottom: 20px; color: var(--primary-color); font-size: 16px; }
.perfil-input-wrapper { margin-bottom: 15px; }
.perfil-input-disabled { background: #f9f9f9; cursor: not-allowed; border: 1px dashed #ccc; }
.perfil-grid-2col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-bottom: 15px; }
.perfil-divider { width: 1px; background: #eee; align-self: stretch; }
.perfil-desc-text { font-size: 13px; color: var(--text-muted); margin-bottom: 15px; }
.perfil-footer { border-top: 1px solid #eee; padding-top: 20px; display: flex; justify-content: flex-end; gap: 15px; }
.perfil-btn-save { flex: 1; min-width: 280px; max-width: 320px; justify-content: center; }
.sys-tab-container { display: flex; justify-content: center; width: 100%; padding: 10px; }
.sys-card-content { max-width: 950px; width: 100%; }
.sys-header { margin-bottom: 30px; border-bottom: 1px solid #eee; padding-bottom: 15px; }
.sys-title { margin-bottom: 5px; }
.sys-subtitle { color: var(--text-muted); font-size: 14px; }
.sys-fieldset { border: none; padding: 0; margin: 0; }
.sys-form-grid { display: flex; gap: 40px; flex-wrap: wrap; margin-bottom: 30px; }
.sys-col { flex: 1; min-width: 200px; }
.sys-section-title { margin-bottom: 20px; color: var(--primary-color); font-size: 16px; }
.sys-input-wrapper { margin-bottom: 15px; }
.sys-select { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid #ddd; }
.sys-logo-wrapper { display: flex; align-items: center; gap: 15px; margin-top: 5px; }
.sys-logo-preview { width: 60px; height: 60px; background: #f0f0f0; border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.sys-logo-icon { font-size: 24px; color: #ccc; }
.sys-logo-img { width: 100%; height: 100%; object-fit: cover; }
.sys-file-input { font-size: 13px; }
.sys-divider { width: 1px; background: #eee; align-self: stretch; }
.sys-footer { border-top: 1px solid #eee; padding-top: 20px; display: flex; justify-content: flex-end; }
.sys-btn-save { flex: 1; min-width: 280px; max-width: 320px; justify-content: center; }
.backup-tab-container { display: flex; justify-content: center; width: 100%; }
.backup-card-content { max-width: 600px; width: 100%; }
.backup-fieldset { border: none; padding: 0; margin: 0; }
.backup-title { margin-bottom: 5px; }
.backup-subtitle { color: var(--text-muted); font-size: 14px; }
.backup-warning-title { color: #c62828; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.backup-warning-icon { font-size: 20px; }
.backup-warning-text { font-size: 13.5px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.4; }
.backup-btn-group { display: flex; gap: 10px; width: 100%; }
.backup-wrapper { flex: 1; }
.backup-btn-primary { background: var(--primary); width: 100%; border-radius: 12px; height: 45px; border: none; color: white; cursor: pointer; }
.backup-btn-danger { background: #c62828; width: 100%; border-radius: 12px; height: 45px; border: none; color: white; cursor: pointer; }
.backup-btn-warning { background: #f39c12; width: 100%; border-radius: 12px; height: 45px; border: none; color: white; cursor: pointer; }
.info-title-blue { color: #1976d2; }

/* --- JUSTIFICACIONES Y PERMISOS --- */
.sugerencias-box { position: absolute; background: white; border: 1px solid #ddd; z-index: 1000; width: 100%; max-height: 200px; overflow-y: auto; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); display: none; }
.sugerencia-item { padding: 10px 15px; cursor: pointer; font-size: 14px; }
.sugerencia-item:hover { background: #f0f4ff; color: var(--primary); }
.input-box-relative { position: relative; margin-bottom: 15px; }
.input-box-flex-1 { flex: 1; margin-bottom: 15px; }
.input-box-flex-0 { flex: 0; margin-bottom: 15px; }
.input-box-mb { margin-bottom: 15px; }
.form-control-custom { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid #ccc; }
.textarea-custom { font-family: inherit; }
.btn-action-main { flex: 1; min-width: 280px; max-width: 320px; justify-content: center; }
.btn-view-history { font-size: 12px; padding: 10px 15px; text-decoration: none; }
.btn-ver-evidencia { border: none; background: none; cursor: pointer; color: var(--primary); font-size: 20px; display: flex; align-items: center; gap: 5px; }
.modal-overlay { position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); align-items: center; justify-content: center; backdrop-filter: blur(3px); }
.modal-content { background: white; padding: 20px; border-radius: 15px; max-width: 90%; width: 700px; position: relative; box-shadow: 0 10px 25px rgba(0,0,0,0.3); }
.modal-close { position: absolute; top: 10px; right: 15px; font-size: 28px; font-weight: bold; color: #333; cursor: pointer; }
.modal-title { margin-top: 0; margin-bottom: 15px; color: var(--primary); }
.modal-divider { border: 0; border-top: 1px solid #eee; margin-bottom: 15px; }
.modal-body { text-align: center; min-height: 200px; display: flex; align-items: center; justify-content: center; }
.approval-btn { width: 35px; height: 35px; border-radius: 8px; display: flex; align-items: center; justify-content: center; border: none; cursor: pointer; transition: transform 0.2s, opacity 0.2s; color: white; padding: 5px 10px; }
.approval-btn:hover { transform: scale(1.1); }
.approval-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-approve { background: #10b981; }
.btn-reject { background: #ef4444; }
.check-status { font-size: 20px; } 
.actions-cell-flex { display: flex; gap: 8px; justify-content: center; }

/* --- HORARIOS.PHP --- */
.time-input-custom { padding: 8px; border-radius: 8px; border: 1px solid #ddd; outline: none; font-family: 'Inter', sans-serif; }
.pill-morning { background: #e3f2fd; color: #1565c0; }
.pill-afternoon { background: #fff3e0; color: #e65100; }

/* --- IMPRIMIR MASIVO --- */
.filter-form { display: flex; flex-wrap: wrap; gap: 15px; align-items: flex-end; margin-bottom: 25px; background: #fff; padding: 20px; border-radius: 15px; box-shadow: 0 4px 12px rgba(0,0,0,0.02); }
.filter-group { display: flex; flex-direction: column; gap: 5px; }
.filter-group label { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.filter-group select { padding: 8px 12px; border-radius: 8px; border: 1px solid #ddd; outline: none; min-width: 220px; }
.btn-filter { background: var(--primary); color: white; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; font-weight: 600; height: 40px; display: flex; align-items: center; gap: 5px; transition: all 0.3s; }
.btn-filter-reset { background: #eceff1; color: #455a64; text-decoration: none; }
.btn-filter-reset-flex { background: #eceff1; color: #455a64; text-decoration: none; display: flex; align-items: center; justify-content: center; }
.btn-print-custom { background: var(--clr-print); }
.masivo-header-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.btn-masivo-wa { background: #25d366; color: white; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 5px; transition: 0.3s; }
.masivo-title-flex { display: flex; align-items: center; gap: 10px; }
.masivo-count-badge { background: #f0f2f5; color: #455a64; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; border: 1px solid #e0e0e0; }
.masivo-action-btns { display: flex; gap: 10px; }
.alumno-check { width: 18px; height: 18px; cursor: pointer; }
#area-impresion { display: none; }

/* --- USUARIOS Y ROLES --- */
.users-header-actions { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 15px; margin-bottom: 30px; border-bottom: 1px solid #eee; padding-bottom: 20px; }
.users-grid { display: flex; gap: 30px; flex-wrap: wrap; }
.users-col-table { flex: 3; min-width: 400px; }
.users-col-info { flex: 1; min-width: 300px; background: #fafafa; border-radius: 12px; padding: 20px; border: 1px solid #f0f0f0; }
.section-title-icon { margin-bottom: 20px; color: var(--primary-color); font-size: 16px; }

 /* --- Tabla de Usuarios --- */
.table-users { width: 100%; border-collapse: collapse; font-size: 14px; }
.th-users { padding: 12px; border-bottom: 2px solid #eee; text-align: left; }
.td-users { padding: 12px; border-bottom: 1px solid #eee; }
.td-id { color: var(--text-muted); font-family: monospace; }
.status-active-text { display: flex; align-items: center; gap: 5px; color: #27ae60; font-size: 13px; font-weight: 600; }
.status-pending-text { display: flex; align-items: center; gap: 5px; color: #f39c12; font-size: 13px; font-weight: 600; }

/* --- Botones de Acción en Tabla --- */
.action-btns-flex { display: flex; gap: 15px; }
.btn-icon-only { background: none; border: none; cursor: pointer; font-size: 19px; padding: 0; }
.btn-icon-edit { color: #3f51b5; }
.btn-icon-delete { color: #d32f2f; }
.btn-icon-lock { color: #e0e0e0; cursor: not-allowed; }

/* --- Tarjetas de Nivel de Acceso --- */
.access-card { background: white; padding: 12px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); margin-bottom: 15px;}
.border-admin { border-left: 4px solid #1a237e; }
.border-asistente { border-left: 4px solid #455a64; }
.border-consulta { border-left: 4px solid #ffa000; }
.access-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.access-desc { font-size: 12px; color: var(--text-muted); } 

/* --- Modales de Usuario --- */
.modal-overlay-user { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); align-items: center; justify-content: center; }
.modal-box-user { background: white; padding: 25px; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.modal-box-sm { width: 400px; }
.modal-box-md { width: 450px; }
.modal-header-user { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-title-user { margin: 0; color: var(--primary-color); }
.modal-date-info { background: #f9f9f9; padding: 10px; border-radius: 6px; border: 1px dashed #ccc; margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center; }
.date-label { font-size: 12px; color: #666; font-weight: 600; }
.date-value { font-size: 13px; font-weight: bold; color: #333; }

/* --- Formularios en Modales --- */
.form-group-user { margin-bottom: 15px; }
.form-label-user { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.form-input-user { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 6px; font-family: inherit; }
.form-row-2 { display: flex; gap: 15px; margin-bottom: 15px; }
.form-row-2-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px; }
.form-col { flex: 1; }
.modal-footer-user { display: flex; gap: 10px; justify-content: flex-end; margin-top: 10px; }
.btn-cancel-user { padding: 10px 20px; background: #eee; border: none; border-radius: 6px; cursor: pointer; font-family: inherit; font-size: 13px; }
.btn-save-user { padding: 10px 20px; background: var(--primary); color: white; border: none; border-radius: 6px; cursor: pointer; font-weight: 600; font-family: inherit; font-size: 13px; }
.btn-save-admin { background: #1a237e; }

/* --- Celdas de Perfil y Rol --- */
.user-info-flex { display: flex; align-items: center; gap: 10px; }
.avatar-initials { width: 32px; height: 32px; background: #e8eaf6; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #1a237e; flex-shrink: 0; font-weight: bold; font-size: 12px; }
.user-name-text { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #333; }
.role-badge { padding: 4px 10px; border-radius: 6px; font-size: 10px; font-weight: 700; display: inline-block; }

/* --- REPORTES --- */
.filter-note { color: var(--text-muted); font-size: 11px; flex: 1 1 100%; margin-top: 5px; opacity: 0.8; }  
.btn-excel-custom { background: var(--clr-excel); text-decoration: none; }
.btn-consolidado-custom { background: #1a237e; text-decoration: none; }
.text-muted-gray { color: #777; }


/* =========================================================
    CLASES PARA SIDEBAR DINÁMICO 
    ========================================================= */
.sidebar-logo-img { 
    width: 45px; 
    height: 45px; 
    object-fit: contain; 
    margin: 0; 
    display: block; 
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); 
}
.sidebar-inst-name { 
    font-size: 10px; 
    color: rgba(255, 255, 255, 0.6); 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    text-align: center; 
    margin-top: -5px; 
    font-weight: 600; 
    line-height: 1.2; 
    display: block; 
    width: 100%; 
    word-wrap: break-word; 
}

