/* ============================================================
   UNIVERSIDAD DEL ALUMINIO — SISTEMA DE DISEÑO MODERNO (LMS PRO)
   ============================================================ */

/* Fuentes Inter y Plus Jakarta Sans: libs/fuentes/fuentes.css (servidas localmente, enlazadas en cada página) */

:root {
    /* Paleta Institucional Aluminio & Azul Profundo */
    --primary-color: #0f2b48;       /* Azul institucional profundo */
    --primary-light: #1e3a8a;       /* Azul cobalto */
    --primary-dark: #091a2c;        /* Azul noche */
    --accent-color: #0284c7;        /* Cyan cobalto vibrante */
    --accent-hover: #0369a1;        /* Cyan hover */
    --aluminum-light: #f8fafc;      /* Blanco hielo */
    --aluminum-border: #e2e8f0;     /* Gris aluminio pulido */
    --aluminum-metallic: #94a3b8;   /* Metálico medio */
    
    /* Estados Semánticos Suaves */
    --success-color: #10b981;       /* Esmeralda */
    --success-soft: rgba(16, 185, 129, 0.12);
    --warning-color: #f59e0b;       /* Ámbar */
    --warning-soft: rgba(245, 158, 11, 0.12);
    --danger-color: #ef4444;        /* Carmesí */
    --danger-soft: rgba(239, 68, 68, 0.12);
    --info-color: #38bdf8;          /* Celeste */
    --info-soft: rgba(56, 189, 248, 0.12);

    /* Textos & Fondos */
    --bg-body: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    /* Geometría y Sombras */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --shadow-sm: 0 2px 8px -2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 35px -8px rgba(15, 23, 42, 0.12), 0 10px 15px -5px rgba(15, 23, 42, 0.06);
    --shadow-glow: 0 0 25px rgba(2, 132, 199, 0.25);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   ESTILOS BASE Y TIPOGRAFÍA
   ============================================================ */
body {
    background-color: var(--bg-body);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, .navbar-brand {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

/* ============================================================
   NAVBAR INSTITUCIONAL ELEGANTE
   ============================================================ */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(15, 43, 72, 0.15);
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.35rem;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.navbar-brand i {
    color: var(--info-color);
    font-size: 1.5rem;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 600;
    font-size: 0.925rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.navbar .nav-link:hover, .navbar .nav-link.active {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.12);
}

.nav-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ============================================================
   HERO BANNER & KPI STATS CARDS
   ============================================================ */
.hero-banner {
    background: linear-gradient(135deg, #0f2b48 0%, #1e3a8a 50%, #0284c7 100%);
    color: white;
    padding: 3.5rem 0 3rem 0;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-banner h1 {
    color: #ffffff;
    font-size: 2.3rem;
    font-weight: 800;
}

.hero-banner p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    max-width: 650px;
}

/* Tarjetas de Estadísticas KPI */
.kpi-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--aluminum-border);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: var(--transition);
    height: 100%;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(2, 132, 199, 0.3);
}

.kpi-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.kpi-icon.blue   { background: var(--info-soft); color: var(--accent-color); }
.kpi-icon.green  { background: var(--success-soft); color: var(--success-color); }
.kpi-icon.amber  { background: var(--warning-soft); color: var(--warning-color); }
.kpi-icon.purple { background: rgba(147, 51, 234, 0.12); color: #9333ea; }

.kpi-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1.1;
}

.kpi-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 0.2rem;
}

/* ============================================================
   BUSCADOR Y BARRA DE FILTROS
   ============================================================ */
.filter-toolbar {
    background: var(--card-bg);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--aluminum-border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.search-input-group {
    position: relative;
}

.search-input-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--aluminum-metallic);
    font-size: 1.1rem;
}

.search-input-group input {
    padding-left: 2.75rem !important;
    padding-right: 2rem !important;
    border-radius: var(--radius-full);
    border: 1px solid var(--aluminum-border);
    font-size: 0.925rem;
}

.search-input-group .search-clear-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: #e2e8f0;
    border: none;
    color: #64748b;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
}

.search-input-group .search-clear-btn:hover {
    background: #cbd5e1;
    color: #0f172a;
}

.filter-pill-btn {
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.45rem 1rem;
    border: 1px solid var(--aluminum-border);
    background: white;
    color: var(--text-muted);
    transition: var(--transition);
    cursor: pointer;
}

.filter-pill-btn:hover {
    background: var(--aluminum-light);
    color: var(--primary-color);
    border-color: var(--aluminum-metallic);
}

.filter-pill-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(15, 43, 72, 0.25);
}

/* ============================================================
   TARJETAS DE CURSOS (LMS CARDS)
   ============================================================ */
.course-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--aluminum-border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.course-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(2, 132, 199, 0.3);
}

.course-thumb-container {
    position: relative;
    width: 100%;
    height: 185px;
    background: #0f172a;
    overflow: hidden;
}

.course-thumb-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.course-card:hover .course-thumb-container img {
    transform: scale(1.05);
}

.course-thumb-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.75) 0%, rgba(15, 23, 42, 0) 60%);
}

.course-badge-floating {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 2;
}

.course-body {
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.course-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.6rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-meta {
    font-size: 0.825rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.course-meta i {
    color: var(--accent-color);
}

.course-progress-wrapper {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--aluminum-border);
}

.course-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.progress-modern {
    height: 7px;
    border-radius: var(--radius-full);
    background-color: var(--aluminum-border);
    overflow: hidden;
}

.progress-modern .progress-bar {
    border-radius: var(--radius-full);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   BADGES SUAVES (SOFT PILLS)
   ============================================================ */
.badge-soft-primary {
    background: rgba(2, 132, 199, 0.12);
    color: #0284c7;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.775rem;
}

.badge-soft-success {
    background: var(--success-soft);
    color: #059669;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.775rem;
}

.badge-soft-warning {
    background: var(--warning-soft);
    color: #d97706;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.775rem;
}

.badge-soft-danger {
    background: var(--danger-soft);
    color: #dc2626;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.775rem;
}

.badge-soft-secondary {
    background: var(--aluminum-border);
    color: var(--text-muted);
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.775rem;
}

/* ============================================================
   PESTAÑAS MODERNAS ADMIN (NAV PILLS)
   ============================================================ */
.nav-pills-admin {
    background: white;
    padding: 0.4rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--aluminum-border);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
}

.nav-pills-admin .nav-link {
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 0.6rem 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.nav-pills-admin .nav-link:hover {
    color: var(--primary-color);
    background: var(--aluminum-light);
}

.nav-pills-admin .nav-link.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 3px 10px rgba(15, 43, 72, 0.2);
}

/* ============================================================
   TABLAS MODERNAS CON AVATARES Y BUSCADORES
   ============================================================ */
.table-card {
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--aluminum-border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--aluminum-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    background: white;
}

.table-modern {
    margin-bottom: 0;
    width: 100%;
}

.table-modern thead th {
    background: #f8fafc;
    color: var(--text-muted);
    font-size: 0.775rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--aluminum-border);
}

.table-modern tbody td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

.table-modern tbody tr:hover {
    background-color: #f8fafc;
}

/* Avatar con Iniciales */
.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* ============================================================
   LMS PLAYER: AULA VIRTUAL Y CONTENIDO
   ============================================================ */
.lms-sidebar {
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--aluminum-border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.lms-sidebar-header {
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
}

.lms-sidebar-header h5 {
    color: white;
    font-size: 1.15rem;
    margin-bottom: 0.4rem;
}

.lms-accordion .accordion-item {
    border: none;
    border-bottom: 1px solid var(--aluminum-border);
}

.lms-accordion .accordion-button {
    background: #f8fafc;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.85rem 1.15rem;
    box-shadow: none !important;
}

.lms-accordion .accordion-button:not(.collapsed) {
    background: rgba(2, 132, 199, 0.08);
    color: var(--accent-color);
}

.lesson-item-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.75rem 1.15rem;
    border: none;
    background: transparent;
    border-left: 3px solid transparent;
    text-align: left;
    font-size: 0.875rem;
    color: var(--text-main);
    transition: var(--transition);
    cursor: pointer;
}

.lesson-item-btn:hover {
    background: #f1f5f9;
    color: var(--accent-color);
}

.lesson-item-btn.active {
    background: rgba(2, 132, 199, 0.1);
    border-left-color: var(--accent-color);
    color: var(--accent-color);
    font-weight: 600;
}

.lesson-item-btn.completed i.lesson-status-icon {
    color: var(--success-color);
}

.lesson-item-btn.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Reproductor de Video 16:9 */
.player-container {
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    margin-bottom: 1.5rem;
}

.player-container iframe,
.player-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.player-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--aluminum-border);
    box-shadow: var(--shadow-sm);
}

/* ============================================================
   EVALUACIÓN Y QUIZ MODAL
   ============================================================ */
.quiz-card {
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--aluminum-border);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.quiz-option-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.2rem;
    border: 1.5px solid var(--aluminum-border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.925rem;
}

.quiz-option-label:hover {
    border-color: var(--accent-color);
    background: #f0f9ff;
}

.quiz-option-label input[type="radio"]:checked + span {
    font-weight: 700;
    color: var(--accent-color);
}

.quiz-option-label:has(input[type="radio"]:checked) {
    border-color: var(--accent-color);
    background: rgba(2, 132, 199, 0.08);
}

.quiz-question-img-container {
    margin: 0.75rem 0 1.25rem 0;
    text-align: center;
}

.quiz-question-img {
    max-height: 260px;
    max-width: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
    border: 1px solid var(--aluminum-border);
    background: #fff;
    padding: 4px;
    box-shadow: var(--shadow-sm);
    cursor: zoom-in;
    transition: transform 0.2s ease;
}

.quiz-question-img:hover {
    transform: scale(1.02);
}

.quiz-option-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-grow: 1;
}

.quiz-option-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--aluminum-border);
    background: #fff;
    flex-shrink: 0;
}

.quiz-score-badge {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 800;
    font-family: 'Plus Jakarta Sans', sans-serif;
    margin: 1rem auto;
}

.quiz-score-badge.pass {
    background: var(--success-soft);
    color: var(--success-color);
    border: 3px solid var(--success-color);
}

.quiz-score-badge.fail {
    background: var(--danger-soft);
    color: var(--danger-color);
    border: 3px solid var(--danger-color);
}

/* ============================================================
   BOTONES Y ELEMENTOS DE ACCIÓN
   ============================================================ */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    padding: 0.55rem 1.25rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.btn-primary {
    background: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: white !important;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}

.btn-primary:hover {
    background: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
}

.btn-dark {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-dark:hover {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

/* Form Controls */
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: 1px solid var(--aluminum-border);
    padding: 0.65rem 0.95rem;
    font-size: 0.925rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* ============================================================
   INDICADOR DE GUARDADO Y ESTADOS UX
   ============================================================ */
.save-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.save-indicator.saving {
    opacity: 1;
    transform: translateY(0);
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
}

.save-indicator.saved {
    opacity: 1;
    transform: translateY(0);
    background: rgba(16, 185, 129, 0.2);
    color: #4ade80;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.save-indicator.error {
    opacity: 1;
    transform: translateY(0);
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

/* Modal Pop In */
.modal.fade .modal-dialog {
    transform: scale(0.95);
    transition: transform 0.2s ease-out;
}

.modal.show .modal-dialog {
    transform: scale(1);
}

.modal-content {
    border-radius: var(--radius-md);
    border: 1px solid var(--aluminum-border);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--aluminum-border);
    padding: 1.25rem 1.5rem;
}

.modal-header .modal-title {
    font-size: 1.2rem;
    font-weight: 700;
}

/* Footer */
footer {
    background: var(--primary-dark);
    color: var(--aluminum-metallic);
    font-size: 0.875rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Scrollbar estilizado */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ============================================================
   PANEL DE CONFIGURACIÓN — TARJETAS Y CONTROLES DE COLOR
   ============================================================ */

/* Tarjeta de configuración institucional */
.config-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--aluminum-border);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    transition: var(--transition);
}

.config-card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(2, 132, 199, 0.25);
}

/* Encabezado de tarjeta con icono */
.config-card-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--aluminum-border);
}

.config-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

/* Letras espaciadas para labels */
.ls-1 {
    letter-spacing: 0.05em;
}

/* Color Picker Row */
.color-picker-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* Swatch nativo del color picker */
.color-swatch-input {
    -webkit-appearance: none;
    appearance: none;
    width: 44px;
    height: 44px;
    border: 2px solid var(--aluminum-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 2px;
    background: none;
    flex-shrink: 0;
    transition: var(--transition);
}

.color-swatch-input:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.color-swatch-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-swatch-input::-webkit-color-swatch {
    border: none;
    border-radius: calc(var(--radius-sm) - 3px);
}

/* Input hex monospace */
.font-mono {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875rem;
    letter-spacing: 0.04em;
}

/* Barra de previsualización de colores */
.color-preview-bar {
    display: flex;
    border-radius: var(--radius-sm);
    overflow: hidden;
    height: 36px;
    border: 1px solid var(--aluminum-border);
}

.color-preview-segment {
    flex: 1;
    transition: background 0.25s ease;
}

/* Caja de preview del logo */
.logo-preview-box {
    background: #f8fafc;
    border: 1px dashed var(--aluminum-border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    min-height: 60px;
}

/* ============================================================
   REPORTES — TOP LEARNERS Y BRECHAS DE APRENDIZAJE
   ============================================================ */

/* Encabezado de tabla de reportes */
.report-thead th {
    background: var(--primary-color);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.85rem 1rem;
    border: none;
}

/* Filas de tabla de reportes */
.report-row td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--aluminum-border);
    vertical-align: middle;
    font-size: 0.9rem;
}

.report-row:last-child td { border-bottom: none; }
.report-row:hover td { background: #f8fafc; }

/* Badge de ranking */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--aluminum-light);
    color: var(--text-muted);
}

/* Tarjeta de usuario para brechas */
.brecha-user-card {
    border: 1px solid var(--aluminum-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.brecha-user-card:hover {
    border-color: rgba(2, 132, 199, 0.2);
    box-shadow: var(--shadow-md);
}

.brecha-user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    cursor: pointer;
    background: #fafbfc;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
    user-select: none;
}

.brecha-user-header:hover { background: #f1f5f9; }

.brecha-user-card.open .brecha-user-header {
    background: rgba(2, 132, 199, 0.05);
    border-bottom-color: var(--aluminum-border);
}

.brecha-user-body {
    display: none;
    padding: 1rem 1.25rem;
}

.brecha-user-card.open .brecha-user-body { display: block; }

.brecha-chevron {
    transition: transform 0.25s ease;
    color: var(--text-muted);
}

.brecha-user-card.open .brecha-chevron { transform: rotate(180deg); }

/* Badges de estado */
.badge-brecha {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-brecha.completado {
    background: var(--success-soft);
    color: #059669;
}

.badge-brecha.pendiente {
    background: var(--warning-soft);
    color: #b45309;
}

/* Árbol de brechas */
.brecha-details { margin-bottom: 0.5rem; }
.brecha-details summary { list-style: none; cursor: pointer; }
.brecha-details summary::-webkit-details-marker { display: none; }

.brecha-curso-summary,
.brecha-modulo-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--aluminum-border);
    background: #f8fafc;
    margin-bottom: 0.35rem;
    transition: var(--transition);
}

.brecha-curso-summary:hover,
.brecha-modulo-summary:hover {
    background: #f0f9ff;
    border-color: var(--accent-color);
}

details[open] > summary.brecha-curso-summary,
details[open] > summary.brecha-modulo-summary {
    background: rgba(2, 132, 199, 0.08);
    border-color: var(--accent-color);
}

.brecha-summary-icon {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

details[open] .brecha-summary-icon { transform: rotate(90deg); }

.brecha-modulos-list,
.brecha-lecciones-list {
    padding: 0.5rem 0 0.25rem 1rem;
    border-left: 2px solid var(--aluminum-border);
    margin-left: 0.5rem;
}

.brecha-leaf {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.brecha-empty {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Estado de brecha */
.brecha-estado-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-full);
}

.brecha-estado-badge.sin-iniciar {
    background: var(--danger-soft);
    color: #dc2626;
}

.brecha-estado-badge.en-progreso {
    background: var(--warning-soft);
    color: #b45309;
}

/* Color para ícono de módulo */
.text-purple { color: #9333ea; }

/* ============================================================
   RESPONSIVIDAD MÓVIL MEJORADA
   ============================================================ */

/* Tabs del admin: scroll horizontal en móvil */
@media (max-width: 768px) {
    .nav-pills-admin {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.3rem;
    }

    .nav-pills-admin::-webkit-scrollbar { display: none; }

    .nav-pills-admin .nav-item { flex-shrink: 0; }

    .nav-pills-admin .nav-link {
        font-size: 0.8rem;
        padding: 0.5rem 0.85rem;
        white-space: nowrap;
    }
}

/* Hero banner en móvil */
@media (max-width: 576px) {
    .hero-banner {
        padding: 2rem 0 1.5rem;
        border-radius: 0 0 var(--radius-md) var(--radius-md);
    }

    .hero-banner h1 {
        font-size: 1.6rem;
    }

    .hero-banner p {
        font-size: 0.9rem;
    }

    /* KPIs en 2 columnas en móvil */
    #student-kpis .col-4 {
        width: 50% !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }

    #student-kpis .col-4:last-child {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* KPI admin: 2 cols */
    .row.g-3 > .col-sm-6.col-xl-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Barra de filtros en móvil */
@media (max-width: 767px) {
    .filter-toolbar .row { gap: 0.75rem; }

    #filtros-categoria {
        justify-content: flex-start !important;
        overflow-x: auto;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.25rem;
    }

    #filtros-categoria::-webkit-scrollbar { display: none; }
    #filtros-categoria .filter-pill-btn { flex-shrink: 0; }
}

/* Tablas responsivas en móvil */
@media (max-width: 576px) {
    .table-responsive { border-radius: var(--radius-sm); }

    /* Ocultar columnas menos importantes en móvil */
    .table th:nth-child(4),
    .table td:nth-child(4) {
        display: none;
    }

    /* Botones de acción: solo icono */
    .btn.btn-xs span { display: none; }
    .btn.btn-xs { padding: 0.2rem 0.4rem; }
}

/* Modales: full-screen en móvil */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
    }

    .modal-body { padding: 1rem !important; }
    .modal-footer { padding: 0.75rem 1rem !important; }

    .lms-sidebar { margin-bottom: 1rem; }
}

/* Navbar: ajustes móvil */
@media (max-width: 576px) {
    .navbar { padding: 0.6rem 0; }
    .navbar-brand { font-size: 1.1rem; }
    .navbar-brand span { display: none; } /* Solo icono en pantalla muy pequeña */

    /* Panel admin: main padding reducido */
    .container-fluid.px-lg-4 { padding: 0 0.75rem !important; }
}

/* Cards de configuración: stack en móvil */
@media (max-width: 991px) {
    .config-card { margin-bottom: 0; }
}

/* Brecha user cards: compactar en móvil */
@media (max-width: 576px) {
    .brecha-user-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .brecha-modulos-list,
    .brecha-lecciones-list {
        margin-left: 0.25rem;
        padding-left: 0.5rem;
    }
}

/* LMS Player: sidebar a pantalla completa en móvil */
@media (max-width: 767px) {
    .lms-sidebar { order: -1; }
    .player-nav-bar { flex-direction: column; gap: 0.75rem; text-align: center; }
}

/* ============================================================
   DISEÑO MODERNO DE TABLAS DE ADMINISTRACIÓN Y REPORTES
   ============================================================ */

.table-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px -10px rgba(15, 43, 72, 0.08), 0 0 1px rgba(15, 43, 72, 0.12);
    border: 1px solid var(--aluminum-border);
}

.table-custom-header th {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.9rem 1rem;
    border-bottom: 2px solid var(--aluminum-border);
}

.table-hover tbody tr {
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.table-hover tbody tr:hover {
    background-color: rgba(2, 132, 199, 0.03) !important;
}

/* Data Table Badges & Chips */
.code-chip {
    background: #f1f5f9;
    color: var(--primary-color);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-family: monospace;
    font-weight: 700;
    font-size: 0.82rem;
    border: 1px solid #e2e8f0;
}

.badge-soft-primary {
    background: rgba(2, 132, 199, 0.1);
    color: #0284c7;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
}

.badge-soft-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
}

.badge-soft-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
}

.badge-soft-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
}

/* Action button groups */
.btn-action-group {
    display: inline-flex;
    gap: 0.3rem;
}

.btn-action-group .btn {
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-action-group .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

/* ============================================================
   SPINNER DE CARGA DEL SERVIDOR
   ============================================================ */
.admin-loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.admin-loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.admin-loading-content {
    text-align: center;
    padding: 2rem 2.5rem;
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px -15px rgba(15, 43, 72, 0.15), 0 0 1px rgba(15, 43, 72, 0.12);
    border: 1px solid var(--aluminum-border);
    animation: fadeInScale 0.3s ease;
}

/* Badges suaves de alto contraste para reportes */
.badge-soft-success {
    background-color: #d1e7dd !important;
    color: #0f5132 !important;
    border: 1px solid #badbcc !important;
}

.badge-soft-warning {
    background-color: #fff3cd !important;
    color: #664d03 !important;
    border: 1px solid #ffecb5 !important;
}

.badge-soft-danger {
    background-color: #f8d7da !important;
    color: #842029 !important;
    border: 1px solid #f5c2c7 !important;
}

@keyframes spinFast {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.spin-animation {
    animation: spinFast 0.6s linear infinite;
    display: inline-block;
}

/* ============================================================
   ESTILOS PARA EL REPORTE DE EVALUACIONES
   ============================================================ */
.badge-score-perfect {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
}

.badge-score-high {
    background-color: #10b981 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}

.badge-score-pass {
    background-color: #0284c7 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}

.badge-score-fail {
    background-color: #ef4444 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}

#tabla-reporte-evaluaciones tbody tr {
    transition: background-color 0.15s ease;
}

#tabla-reporte-evaluaciones tbody tr:hover {
    background-color: rgba(15, 43, 72, 0.03);
}

#vista-evaluaciones .card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#vista-evaluaciones .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(15, 43, 72, 0.08) !important;
}

/* Tarjetas de Evaluación Agrupadas por Colaborador */
.user-eval-card {
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--aluminum-border) !important;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease !important;
}

.user-eval-card:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 6px 18px -3px rgba(15, 43, 72, 0.09) !important;
}

.user-eval-header {
    cursor: pointer;
    user-select: none;
    background-color: #ffffff;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid transparent;
}

.user-eval-header:hover {
    background-color: #f8fafc;
}

.user-eval-header .chevron-icon {
    transition: transform 0.25s ease-in-out;
}

.user-eval-header.collapsed .chevron-icon {
    transform: rotate(-90deg);
}

.user-eval-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(15, 43, 72, 0.1) 0%, rgba(2, 132, 199, 0.15) 100%);
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(15, 43, 72, 0.1);
}

@media print {
    body * {
        visibility: hidden;
    }
    #vista-evaluaciones, #vista-evaluaciones * {
        visibility: visible;
    }
    #vista-evaluaciones {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
}

/* ============================================================
   PESTAÑAS Y VISTAS DEL CAMPUS (Cursos / Carreras / Certificados)
   ============================================================ */

.campus-tabs-container {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 8px 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--aluminum-border);
}

.campus-tab-btn {
    background: transparent;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.campus-tab-btn:hover {
    color: var(--primary-color);
    background: rgba(15, 43, 72, 0.05);
}

.campus-tab-btn.active {
    color: #ffffff;
    background: var(--primary-color);
    box-shadow: 0 4px 12px rgba(15, 43, 72, 0.25);
}

/* Tarjetas de Carreras */
.career-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--aluminum-border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

.career-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.career-card-header {
    background: linear-gradient(135deg, #0f2b48 0%, #1e3a8a 100%);
    color: #ffffff;
    padding: 24px;
    position: relative;
}

.career-card-header.completed {
    background: linear-gradient(135deg, #0f2b48 0%, #173b61 60%, #b8860b 100%);
}

.career-progress-wrapper {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 9999px;
    height: 10px;
    overflow: hidden;
    margin-top: 12px;
}

.career-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #38bdf8 0%, #10b981 100%);
    border-radius: 9999px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.career-progress-fill.gold {
    background: linear-gradient(90deg, #f59e0b 0%, #d4af37 100%);
}

.career-course-item {
    padding: 14px 18px;
    border-bottom: 1px solid var(--aluminum-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.15s ease;
}

.career-course-item:last-child {
    border-bottom: none;
}

.career-course-item:hover {
    background: #f8fafc;
}

.career-graduation-banner {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1.5px solid #fde68a;
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
}

/* Vitrina de Credenciales y Diplomas */
.credential-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--aluminum-border);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.credential-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.credential-card.career-diploma {
    border-top: 4px solid #d4af37;
    background: linear-gradient(180deg, #fffdfa 0%, #ffffff 100%);
}

.credential-card.course-cert {
    border-top: 4px solid var(--accent-color);
}

.credential-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.credential-icon.gold {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.credential-icon.blue {
    background: rgba(2, 132, 199, 0.12);
    color: var(--accent-color);
}

/* Modal Mi Perfil */
.profile-avatar-lg {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(15, 43, 72, 0.2);
    border: 3px solid #ffffff;
}

.profile-metric-box {
    background: #f8fafc;
    border: 1px solid var(--aluminum-border);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    transition: var(--transition);
}

.profile-metric-box:hover {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.profile-metric-box .metric-val {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1.2;
}

.profile-metric-box .metric-lbl {
    font-size: 0.775rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================================
   PAGINACIÓN MODERNA & ELEGANTE
   ============================================================ */
.pagination {
    gap: 4px;
}

.pagination .page-item .page-link {
    border: 1px solid var(--aluminum-border);
    border-radius: var(--radius-sm);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.35rem 0.65rem;
    background-color: #ffffff;
    transition: var(--transition);
}

.pagination .page-item .page-link:hover {
    background-color: var(--aluminum-light);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(15, 43, 72, 0.25);
}

.pagination .page-item.disabled .page-link {
    background-color: transparent;
    border-color: transparent;
    color: var(--aluminum-metallic);
    opacity: 0.5;
}


