.final-exam-card {
    background: linear-gradient(120deg, rgba(10,95,140,0.08), rgba(255,255,255,0.7));
    border: 1px solid rgba(10,95,140,0.15);
    border-radius: 20px;
    padding: 1.75rem;
}
.final-exam-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0a3760;
    background: rgba(255,255,255,0.6);
}
.final-exam-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #05263b;
}
.final-exam-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}
.final-exam-meta li {
    flex: 1 1 180px;
    background: rgba(255,255,255,0.65);
    border: 1px solid rgba(10,95,140,0.1);
    border-radius: 14px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #0a3760;
}
.final-exam-meta i {
    font-size: 1.2rem;
    color: #0a5f8c;
}
.final-exam-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-radius: 14px;
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(10,95,140,0.12);
}
.final-exam-progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(10,95,140,0.12);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}
.final-exam-progress-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #0a5f8c, #2b9fcc);
    border-radius: inherit;
    width: 0;
    transition: width 0.4s ease;
}
.final-exam-number {
    font-weight: 700;
    color: #0a3760;
}
.final-exam-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.final-exam-actions .btn {
    width: 100%;
    justify-content: center;
    border-radius: 14px;
    padding: 0.9rem 1.2rem;
    font-weight: 600;
    gap: 0.35rem;
}
.final-exam-status {
    border-radius: 14px;
    padding: 0.9rem 1rem;
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(10,95,140,0.08);
}
@media (min-width: 992px) {
    .final-exam-actions {
        flex-direction: row;
    }
    .final-exam-actions .btn {
        flex: 1;
    }
}
.final-exam-actions .btn {
    gap: 0.35rem;
}
/* ===================================
   AUTOCOMPLETE STYLES
   =================================== */

.autocomplete-dropdown {
    top: 100%;
    left: 0;
    z-index: 1050;
    max-height: 260px;
    overflow-y: auto;
}
/* ===================================
   CAMPUS VIRTUAL - ESTILOS GENERALES
   =================================== */

:root {
    --primary-blue: #0A5F8C;
    --primary-light-blue: #1E8AB8;
    --secondary-blue: #2B9FCC;
    --accent-teal: #4CB5D9;
    --light-blue: #A8D8E8;
    
    --sidebar-width: 280px;
    --topbar-height: 70px;
    
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
}

/* ===================================
   SWITCHES MODERNOS Y MEJORADOS
   =================================== */

.form-switch-lg .form-check-input {
    width: 3.5rem;
    height: 1.75rem;
    cursor: pointer;
    background-color: #dee2e6;
    border: none;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

.form-switch-lg .form-check-input:checked {
    background-color: var(--primary-blue);
    box-shadow: 0 0 10px rgba(10, 95, 140, 0.3);
}

.form-switch-lg .form-check-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.25rem rgba(10, 95, 140, 0.15);
}

.form-switch .form-check-input {
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-switch .form-check-input:checked {
    background-color: var(--primary-blue);
}

/* Tarjetas de canales de comunicación */
#communicationChannels .card {
    transition: all 0.3s ease;
    cursor: pointer;
}

#communicationChannels .card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

#communicationChannels .card:has(.form-check-input:checked) {
    border-color: var(--primary-blue) !important;
    background-color: rgba(10, 95, 140, 0.03);
}

/* Secciones del formulario */
.border-bottom {
    border-color: #e0e6ed !important;
}

/* Filtros dinámicos con transición suave */
#dynamicFilters > div {
    transition: all 0.3s ease;
}

/* Mejora de los badges */
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
}

/* Alertas mejoradas */
.alert {
    border-radius: 8px;
    border: none;
}

.alert-info {
    background-color: #e7f6fd;
    color: #0c5460;
}

/* Tarjetas de modo test */
#testOptions .card,
.card.border-2 {
    transition: all 0.3s ease;
}

.campus-body {
    font-family: 'Inter', sans-serif;
    background: #f5f7fa;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* ===================================
   TOPBAR - REDESIGNED
   =================================== */

.campus-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    background: #026292;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 0 0 auto;
}

.sidebar-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: none;
    backdrop-filter: blur(10px);
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.sidebar-toggle:active {
    transform: scale(0.95);
}

.topbar-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    letter-spacing: -0.5px;
}

.topbar-logo:hover {
    color: #DDDDDD;
    transform: translateY(-1px);
}

.topbar-logo i {
    font-size: 1.6rem;
    margin-right: 10px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

/* Búsqueda mejorada */
.topbar-search {
    position: relative;
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
}

.topbar-search form {
    position: relative;
    width: 100%;
}

.topbar-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    pointer-events: none;
    z-index: 2;
    transition: color 0.3s ease;
}

.topbar-search input {
    width: 100%;
    padding: 12px 45px 12px 45px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    font-size: 14px;
    color: white;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.topbar-search input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.topbar-search input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.topbar-search input:focus + i {
    color: white;
}

.topbar-search-submit {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.topbar-search-submit:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.05);
}

/* Botones de iconos modernos */
.topbar-icon-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    font-size: 20px;
    color: white;
    cursor: pointer;
    padding: 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.topbar-icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.topbar-icon-btn:active {
    transform: translateY(0);
}

.badge-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #ff4757;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4);
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Botón de usuario mejorado */
.topbar-user-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    padding: 6px 12px 6px 6px;
    border-radius: 30px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.topbar-user-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.topbar-user-btn:active {
    transform: translateY(0);
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d2ff, #3a7bd5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.user-info {
    text-align: left;
    line-height: 1.3;
}

.user-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: white;
}

.user-role {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.topbar-user-btn i.bi-chevron-down {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    transition: transform 0.3s ease;
}

.topbar-user-btn:hover i.bi-chevron-down {
    transform: translateY(2px);
}

/* Sistema de dropdown custom (sin Bootstrap) */
.topbar-dropdown-custom {
    position: relative;
}

.topbar-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 380px;
    max-height: 520px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1050;
    overflow: hidden;
}

.topbar-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-divider {
    height: 1px;
    background: #e8ecef;
    margin: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: #2d3748;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
}

.dropdown-item:hover {
    background: linear-gradient(90deg, #f8f9fa 0%, #ffffff 100%);
    color: #026292;
}

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

.dropdown-item.text-danger:hover {
    background: linear-gradient(90deg, #fff5f5 0%, #ffffff 100%);
    color: #dc3545;
}

.dropdown-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e8ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-header h6 {
    margin: 0;
    font-weight: 700;
    color: var(--primary-blue);
    font-size: 16px;
}

.notifications-list,
.messages-list {
    max-height: 380px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
}

.notifications-list::-webkit-scrollbar,
.messages-list::-webkit-scrollbar {
    width: 6px;
}

.notifications-list::-webkit-scrollbar-track,
.messages-list::-webkit-scrollbar-track {
    background: #f7fafc;
}

.notifications-list::-webkit-scrollbar-thumb,
.messages-list::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.notification-item,
.message-item {
    display: flex;
    gap: 14px;
    padding: 16px 24px;
    text-decoration: none;
    color: #2d3748;
    border-bottom: 1px solid #f0f4f8;
    transition: all 0.2s ease;
    cursor: pointer;
}

.notification-item:hover,
.message-item:hover {
    background: linear-gradient(90deg, #f8f9fa 0%, #ffffff 100%);
    transform: translateX(4px);
}

.notification-item.unread,
.message-item.unread {
    background: linear-gradient(90deg, #e3f2fd 0%, #f5f9ff 100%);
    border-left: 4px solid #026292;
}

.notification-item.unread:hover,
.message-item.unread:hover {
    background: linear-gradient(90deg, #d6eaff 0%, #f0f7ff 100%);
}

.notification-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.notification-icon.bg-info {
    background: linear-gradient(135deg, #17a2b8, #138496);
}

.notification-icon.bg-success {
    background: linear-gradient(135deg, #28a745, #218838);
}

.notification-icon.bg-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
}

.notification-icon.bg-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-content p {
    margin: 0 0 4px 0;
    font-size: 14px;
    line-height: 1.5;
}

.notification-content strong {
    font-weight: 600;
    color: #1a202c;
}

.notification-content small {
    color: #718096;
    font-size: 12px;
}

.message-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #026292, #0288d1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(2, 98, 146, 0.3);
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-content p {
    margin: 0 0 4px 0;
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-content strong {
    font-weight: 600;
    color: #1a202c;
}

.message-content small {
    color: #718096;
    font-size: 12px;
}

.dropdown-footer {
    padding: 16px 24px;
    border-top: 2px solid #e8ecef;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-footer a {
    color: #026292;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.dropdown-footer a:hover {
    color: #014a73;
    text-decoration: underline;
}

/* ===================================
   SIDEBAR
   =================================== */

.campus-layout {
    display: flex;
    padding-top: var(--topbar-height);
}

.campus-sidebar {
    position: sticky;
    top: var(--topbar-height);
    width: var(--sidebar-width);
    height: calc(100vh - var(--topbar-height));
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
    z-index: 999;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.sidebar-content {
    padding: 20px 0;
}

.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-header {
    padding: 0 20px;
    margin-bottom: 10px;
}

.sidebar-header h6 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin: 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: #555;
    font-size: 15px;
    transition: all 0.2s;
    position: relative;
}

.sidebar-link:hover {
    background: #f8f9fa;
    color: var(--primary-blue);
}

.sidebar-link.active {
    background: linear-gradient(90deg, rgba(43, 159, 204, 0.1) 0%, transparent 100%);
    color: var(--primary-blue);
    font-weight: 600;
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--secondary-blue);
}

.sidebar-link i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.sidebar-link .badge {
    margin-left: auto;
    font-size: 11px;
    padding: 3px 7px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

/* ===================================
   MAIN CONTENT
   =================================== */

.campus-main {
    flex: 1;
    min-height: calc(100vh - var(--topbar-height));
    transition: margin-left 0.3s ease;
    display: flex;
    flex-direction: column;
}

.campus-content {
    padding: 30px;
    flex: 1;
}

/* ===================================
   CAMPUS FOOTER
   =================================== */

.campus-footer {
    background: var(--primary-blue);
    color: white;
    padding: 16px 30px;
    margin-top: auto;
}

.campus-footer .copyright {
    font-size: 13px;
    opacity: 0.9;
}

.campus-footer .credits {
    font-size: 13px;
    opacity: 0.9;
}

.campus-footer .credit-link {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.campus-footer .credit-link:hover {
    opacity: 1;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* ===================================
   DASHBOARD CARDS
   =================================== */

.stats-card {
    background: white;
    border-radius: 12px;
    padding: 30px 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 20px;
    color: white;
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: inherit;
    opacity: 0.95;
    z-index: 1;
}

.stats-card > * {
    position: relative;
    z-index: 2;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.stats-card-icon {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.stats-card h3 {
    font-size: 36px;
    font-weight: 700;
    margin: 0;
    color: white;
    line-height: 1;
}

.stats-card p {
    margin: 5px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 500;
}

.stats-card-link {
    display: inline-flex;
    align-items: center;
    color: white;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    transition: all 0.2s;
    margin-top: 8px;
}

.stats-card:hover .stats-card-link {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(3px);
}

.stats-card-link i {
    transition: transform 0.2s;
}

.stats-card:hover .stats-card-link i {
    transform: translateX(3px);
}

/* Course Cards */
.course-card-campus {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.course-card-campus:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.course-card-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
}

.course-card-body {
    padding: 20px;
}

.progress-bar-campus {
    height: 8px;
    border-radius: 10px;
    background: #e0e0e0;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
    transition: width 0.3s ease;
}

/* ===================================
   TAB CARDS (shared component)
   =================================== */

.tab-card-nav .tab-card {
    border: 1px solid #e6e9ed;
    border-radius: 1rem;
    padding: 1rem;
    background: #fff;
    box-shadow: 0 0.25rem 0.75rem rgba(15, 31, 64, 0.08);
    transition: all 0.25s ease;
}

.tab-card-nav .tab-card:not(.active) {
    opacity: 0.85;
}

.tab-card-nav .tab-card:hover,
.tab-card-nav .tab-card:focus,
.tab-card-nav .tab-card.active {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.2rem rgba(15, 31, 64, 0.12);
}

.tab-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(13, 110, 253, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.tab-card-icon.text-warning {
    background: rgba(255, 193, 7, 0.18);
}

.tab-card-icon.text-success {
    background: rgba(25, 135, 84, 0.18);
}

.tab-card-icon.text-danger {
    background: rgba(220, 53, 69, 0.18);
}

.tab-card-label {
    font-weight: 600;
    color: inherit;
}

.tab-card-count {
    font-size: 1.5rem;
    font-weight: 700;
}

@media (max-width: 576px) {
    .tab-card-nav .tab-card {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .tab-card-count {
        font-size: 1.25rem;
    }
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 991px) {
    .sidebar-toggle {
        display: block;
    }
    
    .campus-sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-100%);
    }
    
    .campus-sidebar.show {
        transform: translateX(0);
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    .campus-main {
        margin-left: 0;
    }
    
    .topbar-search {
        display: none !important;
    }
    
    .campus-footer {
        padding: 12px 15px;
    }
}

@media (max-width: 768px) {
    .campus-content {
        padding: 20px 15px;
    }
    
    .topbar-dropdown-menu {
        position: fixed;
        top: var(--topbar-height);
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
    }
    
    .topbar-right {
        gap: 6px;
    }
    
    .topbar-icon-btn {
        padding: 10px;
        font-size: 18px;
    }
    
    .topbar-user-btn {
        padding: 4px 10px 4px 4px;
    }
    
    .user-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .campus-topbar {
        height: 60px;
        padding: 0 12px;
    }
    
    :root {
        --topbar-height: 60px;
    }
}

@media (max-width: 576px) {
    .topbar-logo span {
        display: none;
    }
    
    .topbar-logo i {
        font-size: 1.4rem;
    }
    
    .user-info {
        display: none !important;
    }
    
    .topbar-user-btn i.bi-chevron-down {
        display: none;
    }
    
    .campus-topbar {
        padding: 0 10px;
    }
    
    .topbar-dropdown-menu {
        width: calc(100vw - 20px);
        max-width: 340px;
    }
    
    .dropdown-header {
        padding: 16px 20px;
    }
    
    .notification-item,
    .message-item {
        padding: 14px 20px;
    }
    
    .topbar-icon-btn,
    .topbar-user-btn {
        padding: 8px;
    }
}

/* ===================================
   UNIT NAVIGATION
   =================================== */

.unit-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.unit-item {
    margin-bottom: 15px;
}

.unit-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    cursor: pointer;
}

.unit-card:hover:not(.locked) {
    border-color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(10, 95, 140, 0.15);
    transform: translateY(-2px);
}

.unit-card.completed {
    background: #e8f8f1;
    border-color: #28a745;
}

.unit-card.in_progress {
    background: #fff8e1;
    border-color: #ffc107;
}

.unit-card.locked {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f5f5f5;
}

.unit-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
}

.unit-card .unit-icon {
    background: var(--primary-blue);
}

.unit-card.completed .unit-icon {
    background: #28a745;
}

.unit-card.in_progress .unit-icon {
    background: #ffc107;
}

.unit-card.locked .unit-icon {
    background: #999;
}

.unit-content {
    flex: 1;
}

.unit-title {
    font-weight: 600;
    color: var(--primary-blue);
    margin: 0;
    font-size: 18px;
}

.unit-card.locked .unit-title {
    color: #999;
}

.unit-arrow {
    font-size: 24px;
    color: var(--primary-blue);
    transition: transform 0.2s;
}

.unit-card:hover:not(.locked) .unit-arrow {
    transform: translateX(5px);
}

/* Material Items (dentro de unit_view) */
.material-item {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
}

.material-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
}

.material-icon.video {
    background: #dc3545;
}

.material-icon.pdf {
    background: #28a745;
}

/* Materials Navigation Tabs */
.materials-nav {
    border-bottom: 2px solid #e0e0e0;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 10px;
}

.materials-nav::-webkit-scrollbar {
    height: 6px;
}

.materials-nav::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.materials-nav::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.materials-nav::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.material-tab {
    background: white;
    border: 2px solid #e0e0e0 !important;
    color: #666;
    border-radius: 10px !important;
    padding: 12px 16px;
    white-space: nowrap;
    transition: all 0.3s;
    font-weight: 500;
}

.material-tab:hover {
    border-color: var(--primary-blue) !important;
    background: #f8f9fa;
}

.material-tab.active {
    background: var(--primary-blue) !important;
    color: white !important;
    border-color: var(--primary-blue) !important;
}

.material-tab.completed {
    border-color: #28a745 !important;
}

.material-tab.completed:not(.active) {
    background: #e8f8f1;
    color: #28a745;
}

.material-tab-icon {
    font-size: 18px;
}

.material-icon-large {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    flex-shrink: 0;
}

.material-icon-large.video {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.material-icon-large.pdf {
    background: linear-gradient(135deg, #28a745, #218838);
}

.material-header {
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.pdf-download-box {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
}

.material-actions {
    margin-top: 20px;
}

.progress-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 700;
}

/* Responsive para tabs */
@media (max-width: 768px) {
    .material-tab {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .material-icon-large {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .progress-circle {
        width: 60px;
        height: 60px;
        font-size: 16px;
    }
}

.lesson-list {
    list-style: none;
    padding: 10px;
    margin: 0;
}

.lesson-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    transition: background 0.2s;
    text-decoration: none;
    color: #333;
}

.lesson-item:hover:not(.locked) {
    background: #f8f9fa;
}

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

.lesson-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
}

.lesson-icon.video {
    background: #dc3545;
}

.lesson-icon.pdf {
    background: #28a745;
}

.lesson-icon.exam {
    background: #ffc107;
}

.lesson-info {
    flex: 1;
}

.lesson-title {
    font-weight: 500;
    margin: 0;
}

.lesson-meta {
    font-size: 12px;
    color: #999;
}

/* ===================================
   VIDEO PLAYER
   =================================== */

.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

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

/* ===================================
   EXAM STYLES
   =================================== */

.exam-header-final {
    background: linear-gradient(135deg, #0A5F8C, #2B9FCC);
}

.exam-header-unit {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
}

.exam-question {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
}

.exam-question h5 {
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.exam-question-number {
    display: inline-block;
    width: 35px;
    height: 35px;
    background: var(--primary-blue);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 35px;
    font-weight: 700;
    margin-right: 10px;
    font-size: 16px;
}

.exam-options {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
}

.exam-option {
    position: relative;
}

.exam-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.exam-option label {
    display: block;
    padding: 15px 20px 15px 50px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.exam-option input[type="radio"]:checked + label {
    background: #e8f4fd;
    border-color: var(--secondary-blue);
    font-weight: 600;
}

.exam-option label::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #999;
    border-radius: 50%;
    background: white;
}

.exam-option input[type="radio"]:checked + label::before {
    border-color: var(--secondary-blue);
    background: var(--secondary-blue);
    box-shadow: inset 0 0 0 4px white;
}

/* ===================================
   UTILITIES
   =================================== */

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.card-campus {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 25px;
    margin-bottom: 24px;
}

.card-campus.exam-header-unit,
.card-campus.exam-header-final {
    color: #fff;
    border: none;
    box-shadow: 0 15px 35px rgba(10, 95, 140, 0.25);
}

.card-campus.exam-header-unit {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
}

.card-campus.exam-header-final {
    background: linear-gradient(135deg, #0A5F8C, #2B9FCC);
}

.content-rich p:last-child {
    margin-bottom: 0;
}

.btn-campus-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-campus-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(43, 159, 204, 0.4);
    color: white;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #999;
    font-weight: 600;
    margin-bottom: 10px;
}

.empty-state p {
    color: #999;
}

/* ===================================
   Evaluations - Acordeones y Drag & Drop
   =================================== */

.question-item {
    transition: all 0.3s ease;
    background: white;
}

.question-item.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

.question-item.drag-over {
    border-top: 3px solid #0a5f8c !important;
    margin-top: 10px;
}

.accordion-button {
    background-color: #f8f9fa;
    padding: 1rem 1.25rem;
}

.accordion-button:not(.collapsed) {
    background-color: #e7f1ff;
    color: #0a5f8c;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.125);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(10, 95, 140, 0.25);
    border-color: #0a5f8c;
}

.accordion-button::after {
    margin-left: auto;
}

.drag-handle {
    cursor: move !important;
    padding: 0.25rem;
    margin-right: 0.5rem;
}

.drag-handle:hover {
    color: #0a5f8c !important;
}

.accordion-body {
    padding: 1.5rem;
}

.accordion-body hr {
    border-top: 2px solid rgba(10, 95, 140, 0.15);
    margin: 1.5rem 0;
}

.options-section .bg-white {
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.options-section .border-dashed {
    border-style: dashed !important;
}

/* Modal de confirmación personalizado */
.modal-delete-confirm .modal-content {
    border-radius: 12px;
}

.modal-delete-confirm .modal-header {
    background-color: #f8d7da;
    border-bottom: 2px solid #dc3545;
    border-radius: 12px 12px 0 0;
}

.modal-delete-confirm .modal-title {
    color: #842029;
}

.modal-delete-confirm .btn-close {
    filter: brightness(0) saturate(100%) invert(14%) sepia(50%) saturate(1800%) hue-rotate(335deg);
}

/* Spinner overlay para operaciones */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
    color: white;
}

