/* ==================================================
   ESTILOS PARA GESTIÓN DE PERMISOS DE ADMINISTRADORES
   ================================================== */

/* Sección Campus Only - Oculta por defecto */
.admin-sede-campus-section {
    display: none !important;
}

/* Botón Super Admin only */
.super-admin-only {
    background-color: #7c3aed !important;
    border-color: #7c3aed !important;
}

.super-admin-only:hover {
    background-color: #6d28d9 !important;
}

/* Modal de Permisos */
#modalGestionarPermisos .modal-body {
    padding: 25px;
}

#modalGestionarPermisos .info-text {
    background-color: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 6px;
    font-size: 14px;
    color: #1e40af;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

#modalGestionarPermisos .info-text i {
    margin-top: 2px;
    font-size: 18px;
}

/* Secciones de Permisos */
.permisos-section {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.permisos-section h4 {
    margin-bottom: 15px;
    color: #374151;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.permisos-section h4 i {
    color: #6366f1;
    font-size: 18px;
}

/* Grupo de Checkboxes */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
}

.checkbox-group label:hover {
    background-color: #f3f4f6;
    border-color: #6366f1;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #6366f1;
}

.checkbox-group input[type="checkbox"]:checked + span {
    color: #6366f1;
}

/* Contenedor de Permisos */
#permisosAdminContainer {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Badge para Super Admin en tabla */
.badge-super-admin {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-super-admin i {
    font-size: 12px;
}

/* Select de Admin */
#selectAdminPermisos {
    font-size: 16px;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background-color: white;
    transition: all 0.2s;
}

#selectAdminPermisos:focus {
    border-color: #6366f1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Estado de carga */
.loading-permisos {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.loading-permisos i {
    font-size: 32px;
    margin-bottom: 15px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .permisos-section {
        padding: 15px;
    }
    
    #modalGestionarPermisos .modal-body {
        padding: 15px;
    }
}
