/* base.css - Estilos base: reset, body, navbar, dropdown, courses, sidebar, etc. */
/* Variables CSS centralizadas en variables.css */
/* Estilos compartidos (main-card, drive-grid, badges) en shared.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-padding-top: 80px;  /* Espacio para el navbar sticky */
    scroll-behavior: smooth;
}

/* Asegurar que el contenido principal no se solape con el navbar */
main {
    display: block;
    position: relative;
}

/* Estilos base - Ajuste dinámico para navbar fijo */
body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);

    min-height: 100vh;
}


/* Header institucional - usando azul ULagos */
.navbar-custom {
    background: linear-gradient(135deg, var(--ulagos-dark-blue) 0%, var(--ulagos-blue) 100%) !important;
    box-shadow: 0 4px 15px rgba(0, 61, 166, 0.2);
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-custom .navbar-brand,
.navbar-custom .nav-link {
    color: white !important;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.navbar-custom .navbar-brand:hover,
.navbar-custom .nav-link:hover {
    opacity: 0.9;
}

/* Dropdown menu estilizado */
.dropdown-menu {
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border: none;
    margin-top: 8px;
}

.dropdown-item {
    padding: 8px 20px;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, var(--ulagos-blue) 0%, var(--ulagos-dark-blue) 100%);
    color: white;
}

.dropdown-item i {
    width: 20px;
}

/* Tarjeta principal - definición en shared.css */

.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--ulagos-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--ulagos-dark-blue);
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* Grid de cursos - ocupa todo el ancho disponible */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
    width: 100%;
}

/* Tarjetas de cursos - altura consistente y ancho flexible */
.course-card {
    border: none;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 61, 166, 0.1);
    background: white;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 61, 166, 0.2);
}

/* Header de las tarjetas - ALTURA FLEXIBLE */
.card-header-custom {
    background: linear-gradient(135deg, var(--ulagos-dark-blue) 0%, var(--ulagos-blue) 100%);
    padding: 1rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    height: auto;
    display: flex;
    align-items: center;
    width: 100%;
}

.card-header-custom h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100%;
}

.card-header-custom h3 a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: opacity 0.3s ease;
    width: 100%;
}

.card-header-custom h3 a i {
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* Cuerpo de las tarjetas */
.course-card .card-body {
    padding: 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Código y grupo del curso */
.course-card .card-body > .text-muted {
    margin-bottom: 0.75rem;
    flex-shrink: 0;
    word-break: break-word;
    font-size: 0.85rem;
}

/* Meta información */
.course-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.5rem 0 0.75rem 0;
    font-size: 0.8rem;
    color: #6c757d;
    flex-shrink: 0;
}

.course-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    word-break: break-word;
}

.course-meta i {
    color: var(--ulagos-blue);
    width: 18px;
    flex-shrink: 0;
    font-size: 0.85rem;
}

/* Enlaces de Zoom y Drive */
.course-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0 0.75rem 0;
    flex-shrink: 0;
}

.course-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.course-links a i {
    font-size: 0.85rem;
}

/* Botón de ingresar al curso - siempre al final */
.btn-course {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--ulagos-dark-blue) 0%, var(--ulagos-blue) 100%);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    margin-top: auto;
    border: none;
    cursor: pointer;
    gap: 8px;
    width: 100%;
    font-size: 0.9rem;
}

.btn-course:hover {
    transform: translateX(5px);
    background: linear-gradient(135deg, #001a4d 0%, var(--ulagos-dark-blue) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 61, 166, 0.3);
}

.btn-course i {
    transition: transform 0.3s ease;
    font-size: 0.85rem;
}

.btn-course:hover i {
    transform: translateX(4px);
}

/* ========== TABS DE CONVERSATORIOS ========== */
.conv-tabs {
    border-bottom: 2px solid #dee2e6;
}
.conv-tabs .nav-link {
    color: var(--ulagos-dark-blue);
    font-weight: 500;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0.6rem 1.2rem;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
    background: transparent;
}
.conv-tabs .nav-link:hover {
    color: var(--ulagos-blue);
    background: rgba(0, 61, 166, 0.05);
}
.conv-tabs .nav-link.active {
    color: var(--ulagos-dark-blue);
    border-bottom: 3px solid var(--ulagos-blue);
    background: white;
    font-weight: 600;
}
.conv-tabs .nav-link .badge {
    font-size: 0.7rem;
}

/* ========== BOTÓN TOGGLE "VER TODOS" ========== */
.btn-ver-toggle {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.5rem;
    background: transparent;
    color: var(--ulagos-blue);
    border: 2px solid var(--ulagos-blue);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-ver-toggle:hover {
    background: var(--ulagos-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 61, 166, 0.3);
}
.btn-ver-toggle i {
    transition: transform 0.3s ease;
}
.btn-ver-toggle:hover i {
    transform: scale(1.2);
}

/* Avatar de usuario */
.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.05);
}

/* Ocultar elementos de admin */
.block_settings,
#block-region-side-pre,
.adminsearchform {
    display: none !important;
}

.region-main {
    width: 100% !important;
}

/* Estilos para alertas */
.alert {
    border-radius: 10px;
    border: none;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #fff5f5 100%);
    color: #721c24;
    border-left: 4px solid var(--ulagos-red);
}

/* Alertas de éxito con verde ULagos */
.alert-success {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f0 100%);
    color: var(--ulagos-dark-green);
    border-left: 4px solid var(--ulagos-green);
}

/* Alertas de advertencia con amarillo ULagos */
.alert-warning {
    background: linear-gradient(135deg, #fff8e1 0%, #fffef5 100%);
    color: #856404;
    border-left: 4px solid var(--ulagos-yellow);
}

/* Alertas de asistencia con azul ULagos - Versión con mayor especificidad */
.alert.alert-attendance {
    background: linear-gradient(135deg, #e8f0fe 0%, #d4e2fc 100%) !important;
    color: var(--ulagos-dark-blue) !important;
    border-left: 4px solid var(--ulagos-blue) !important;
    border-top: none !important;
    border-right: none !important;
    border-bottom: none !important;
    border-radius: 10px !important;
}

/* Botón de asistencia azul ULagos - Versión con mayor especificidad */
.btn.btn-attendance {
    background: linear-gradient(135deg, var(--ulagos-blue) 0%, var(--ulagos-dark-blue) 100%) !important;
    border: none !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 10px 24px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 6px rgba(0, 61, 166, 0.25) !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.btn.btn-attendance:hover {
    background: linear-gradient(135deg, var(--ulagos-dark-blue) 0%, #001a4d 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 61, 166, 0.35) !important;
    color: white !important;
}

.btn.btn-attendance:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 3px rgba(0, 61, 166, 0.2) !important;
}

.btn.btn-attendance i {
    color: white !important;
}

/* Badges - definición en shared.css */

/* Responsive */
@media (max-width: 850px) {
    html {
        scroll-padding-top: 95px;
    }
}

@media (max-width: 768px) {
    html {
        scroll-padding-top: 110px;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .navbar-custom {
        padding: 0.6rem 0.8rem;
        min-height: auto;
    }
    
    .card-header-custom {
        height: auto;
        padding: 0.8rem 1rem;
    }
    
    .card-header-custom h3 {
        font-size: 0.9rem;
    }
    
    .card-header-custom h3 a {
        gap: 8px;
    }
    
    .card-header-custom h3 a i {
        font-size: 1.1rem;
    }
    
    .course-card .card-body {
        padding: 1rem;
    }
    
    .course-meta {
        gap: 0.4rem;
        margin: 0.4rem 0 0.6rem 0;
    }
    
    .btn-course {
        padding: 0.45rem 0.9rem;
        font-size: 0.85rem;
    }
    
    .platform-change-wrapper {
        margin-left: 10px;
    }
    
    .platform-change-wrapper .btn-course {
        padding: 6px 12px !important;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    html {
        scroll-padding-top: 120px;
    }
}

@media (max-width: 480px) {
    html {
        scroll-padding-top: 130px;
    }
    
    .courses-grid {
        gap: 0.75rem;
    }
    
    .card-header-custom {
        height: auto;
        padding: 0.6rem 0.8rem;
    }
    
    .card-header-custom h3 {
        font-size: 0.9rem;
    }
    
    .course-card .card-body {
        padding: 0.75rem;
    }
    
    .course-card .card-body > .text-muted {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .course-meta {
        font-size: 0.7rem;
        gap: 0.3rem;
        margin: 0.3rem 0 0.5rem 0;
    }
    
    .course-meta i {
        width: 16px;
        font-size: 0.75rem;
    }
    
    .course-links {
        gap: 0.35rem;
        margin: 0.4rem 0 0.6rem 0;
    }
    
    .course-links a {
        padding: 0.25rem 0.5rem;
        font-size: 0.65rem;
    }
    
    .btn-course {
        padding: 0.35rem 0.7rem;
        font-size: 0.8rem;
    }
}

/* Scrollbar personalizada con colores ULagos */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--ulagos-blue);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ulagos-dark-blue);
}

/* Contenedor para el botón de cambio de plataforma - alineado a la izquierda */
.platform-change-wrapper {
    margin-right: auto; 
    margin-left: 20px;  
}

/* Asegurar que el botón mantenga su estilo original */
.platform-change-wrapper .btn-course {
    margin: 0;          
    white-space: nowrap; 
}

/* Ajustes responsive para móviles */
@media (max-width: 768px) {
    .platform-change-wrapper {
        margin-left: 10px;
    }
    
    .platform-change-wrapper .btn-course {
        padding: 6px 12px !important;
        font-size: 0.9rem;
    }
}



/* WhatsApp Float Button - Colapsable */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: -20px;
    background-color: #25D366;
    color: white;
    border-radius: 50px;
    padding: 12px 14px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    z-index: 1000;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0;
    transition: right 0.3s ease, padding 0.3s ease, gap 0.3s ease, border-radius 0.3s ease;
    font-family: 'Roboto', sans-serif;
    border: none;
    cursor: pointer;
    overflow: hidden;
}

.whatsapp-float .whatsapp-text {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
    margin-left: 0;
}

.whatsapp-float.whatsapp-expanded {
    right: 25px;
    padding: 12px 20px;
    gap: 10px;
    border-radius: 50px;
}

.whatsapp-float.whatsapp-expanded .whatsapp-text {
    max-width: 250px;
    opacity: 1;
    margin-left: 10px;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    color: white;
    text-decoration: none;
}

.whatsapp-float.whatsapp-expanded:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.whatsapp-float i {
    font-size: 24px;
    flex-shrink: 0;
}

.whatsapp-float.whatsapp-expanded {
    animation: pulse-whatsapp 2s infinite;
}

@keyframes pulse-whatsapp {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

@media (max-width: 768px) {
    .whatsapp-float .whatsapp-text {
        display: none;
    }
    .whatsapp-float {
        padding: 12px;
        right: -18px;
    }
    .whatsapp-float.whatsapp-expanded {
        right: 15px;
        padding: 12px;
    }
    .whatsapp-float i {
        margin: 0;
    }
}

/* Drive Grid - definición en shared.css */

/* ============================================ */
/* SIDEBAR LATERAL FIJO (como Sistema PEM)      */
/* ============================================ */

/* Sidebar - oculto por defecto (funciona igual en desktop y móvil) */
.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, var(--ulagos-dark-blue) 0%, var(--ulagos-blue) 100%);
    z-index: 1002;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Sidebar abierto */
.sidebar.open {
    left: 0;
}

/* Sidebar header */
.sidebar-header {
    padding: 20px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.sidebar-header a {
    display: flex !important;
}

.sidebar-header a svg {
    height: 35px;
    width: auto;
}

/* Botón toggle dentro del sidebar - OCULTO (se usa el del header) */
.sidebar-toggle-sidebar {
    display: none !important;
}

/* Botón cerrar (X) - visible */
.sidebar-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px;
    display: block !important;
    transition: opacity 0.3s;
}

.sidebar-close:hover {
    opacity: 0.7;
}

/* Menú del sidebar */
.sidebar-menu {
    flex: 1;
    padding: 20px 0;
}

/* Items del sidebar */
.sidebar-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 16px;
    margin: 4px 0;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
}

.sidebar-item i {
    width: 24px;
    font-size: 1.2rem;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-item span {
    display: inline;
    opacity: 1;
    visibility: visible;
}

/* Dropdown toggle */
.sidebar-item.has-dropdown {
    position: relative;
}

.sidebar-item.has-dropdown .dropdown-icon {
    margin-left: auto;
    transition: transform 0.2s ease;
    display: inline-block;
    opacity: 1;
    visibility: visible;
}

.sidebar-item.has-dropdown.open .dropdown-icon {
    transform: rotate(90deg);
}

/* Cursos list en sidebar */
.sidebar-cursos-list {
    margin-left: 36px;
    padding-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.sidebar-cursos-list.open {
    max-height: 500px;
    overflow-y: auto;
}

.sidebar-curso-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 10px 12px;
    margin: 4px 0;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    white-space: normal;
    word-break: break-word;
}

.sidebar-curso-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    text-decoration: none;
}

.sidebar-curso-item i {
    width: 20px;
    font-size: 0.9rem;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-curso-item span {
    display: inline;
    opacity: 1;
    visibility: visible;
}

/* Mensaje vacío */
.sidebar-empty {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

.sidebar-empty i {
    width: 20px;
    font-size: 0.9rem;
    text-align: center;
}

.sidebar-empty span {
    display: inline;
    opacity: 1;
    visibility: visible;
}

/* Botones de plataforma en sidebar */
.sidebar-btn-platform {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 16px;
    margin: 8px 12px;
    border-radius: 25px;
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.sidebar-btn-platform span {
    display: inline;
}

.sidebar-btn-green {
    background: var(--ulagos-green, #76BC21);
}

.sidebar-btn-green:hover {
    background: var(--ulagos-dark-green, #47712C);
    text-decoration: none;
    color: white;
}

.sidebar-btn-purple {
    background: var(--ulagos-purple, #7E57C5);
}

.sidebar-btn-purple:hover {
    background: #6a4caf;
    text-decoration: none;
    color: white;
}

/* Información del usuario en sidebar */
.sidebar-user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
    padding: 0 16px;
}

.sidebar-user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 12px;
    object-fit: cover;
}

.sidebar-user-name {
    color: white;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 4px;
    display: block;
}

.sidebar-user-email {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    display: block;
}

/* Sidebar link - base style for standalone links in sidebar-menu */
.sidebar-menu .sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin: 4px 0;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sidebar-menu .sidebar-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
}

.sidebar-menu .sidebar-link i {
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-menu .sidebar-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-weight: 600;
}

/* User actions */
.sidebar-user-actions {
    padding: 0 16px;
}

.sidebar-user-actions .sidebar-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.85rem;
}

.sidebar-user-actions .sidebar-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-user-actions .sidebar-link span {
    display: inline;
    opacity: 1;
    visibility: visible;
}

.sidebar-user-actions .sidebar-link i {
    width: 24px;
    font-size: 1.1rem;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-divider {
    margin: 12px 0;
    border-color: rgba(255, 255, 255, 0.1);
}

/* Logout button */
.sidebar-logout-btn {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: #ff6b6b;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.sidebar-logout-btn span {
    display: inline;
    opacity: 1;
    visibility: visible;
}

.sidebar-logout-btn i {
    width: 24px;
    font-size: 1.1rem;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-logout-btn:hover {
    background: rgba(255, 107, 107, 0.15);
}

/* Footer del sidebar */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer .sidebar-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.8rem;
}

.sidebar-footer .sidebar-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-footer .sidebar-link span {
    display: inline;
    opacity: 1;
    visibility: visible;
}

.sidebar-footer .sidebar-link i {
    width: 24px;
    font-size: 1.1rem;
    text-align: center;
    flex-shrink: 0;
}

/* Botón toggle del header (visible en todos los tamaños) */
.navbar-custom .sidebar-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.navbar-custom .sidebar-toggle:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

/* Overlay para el sidebar */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: none;
}

.sidebar-overlay.active {
    display: block;
}

/* Ajustes del body y header cuando el sidebar está abierto */
body {
    margin-left: 0 !important;
}

.navbar-custom {
    left: 0 !important;
}

/* El logo del header siempre se ve */
body.sidebar-expanded .navbar-brand {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.sidebar-expanded {
    margin-left: 0 !important;
}

/* ============================================ */
/* POPUP CALENDARIO - ESTILOS                   */
/* ============================================ */

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

.calendar-popup-image {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    z-index: 9999;
    display: none;
    width: 90%;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    flex-direction: column;
}

.calendar-popup-image.show {
    display: flex;
}

.popup-overlay.show {
    display: block;
}

.popup-image-header {
    display: flex;
    justify-content: flex-end;
    padding: 10px;
}

.close-popup-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    color: #666;
}

.close-popup-btn:hover {
    background: #e0e0e0;
}

.popup-image-container {
    overflow: auto;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    flex: 1;
}

.image-wrapper {
    transform: scale(1);
    transition: transform 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-image {
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
}

.zoom-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
}

.zoom-btn {
    padding: 8px 20px;
    background: var(--ulagos-blue, #003DA6);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.zoom-btn:hover {
    background: var(--ulagos-dark-blue, #002760);
}

@media (max-width: 989px) {
    .calendar-popup-image {
        width: 95%;
        max-width: 95vw;
        max-height: 90vh;
    }
    .zoom-btn {
        padding: 6px 16px;
        font-size: 0.9rem;
    }
}

/* ============================================ */
/* INFORMACIÓN DEL USUARIO EN HEADER (DESKTOP)  */
/* ============================================ */

/* Contenedor de la información del usuario - solo visible en desktop */
.user-info-desktop {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.user-info-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 12px 5px 8px;
    border-radius: 40px;
    transition: all 0.3s ease;
    cursor: default;
}

.user-info-wrapper:hover {
    background: rgba(255, 255, 255, 0.2);
}

.user-info-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.user-info-name {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

/* En móvil, ocultar esta información */
@media (max-width: 989px) {
    .user-info-desktop {
        display: none !important;
    }
}

/* ============================================ */
/* ASEGURAR QUE EL SIDEBAR ABRA EN DESKTOP      */
/* ============================================ */

@media (min-width: 990px) {
    /* Asegurar que el sidebar pueda abrirse correctamente */
    .sidebar {
        left: -280px !important;
    }
    
    .sidebar.open {
        left: 0 !important;
    }
    
    /* Asegurar que el overlay funcione */
    .sidebar-overlay {
        display: none;
    }
    
    .sidebar-overlay.active {
        display: block !important;
    }
}