/* =============== VARIABLES & RESET =============== */
:root {
    --primary: #04585B;
    /* Lafise Brand Colors */
    --primary-light: #0A7D80;
    --primary-dark: #024244;
    --bg-gradient: linear-gradient(135deg, #fdfbfb 0%, #bde0fe 50%, #d1f2e8 100%);
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    --text-main: #024244;
    --text-muted: #04585B;
    --white: #ffffff;
    --danger: #ef4444;
}

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

body {
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 11px;
}

/* =============== APP LAYOUT =============== */
.app-container {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* =============== SIDEBAR (GLASSMORPHISM) =============== */
.sidebar {
    width: 210px;
    background: linear-gradient(180deg, #ffffff 0%, #ffffff 15%, #f1f5f9 100%);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.sidebar-header {
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: none;
}

.brand-logo {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    overflow: visible;
}

.brand-title {
    font-size: 0.85rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
    margin: 0;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
}

.brand-subtitle {
    font-size: 8px;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 2px;
    white-space: nowrap;
    letter-spacing: -0.2px;
}

.desktop-toggle-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.desktop-toggle-btn:hover {
    color: var(--primary);
}

.close-sidebar-btn {
    display: none;
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
}

.sidebar-nav {
    padding: 12px 0;
    overflow-y: auto;
    flex: 1;
}

.nav-section {
    margin-bottom: 16px;
}

.nav-title {
    padding: 0 14px;
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.nav-list {
    list-style: none;
}

.nav-list li a {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 9px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-list li a i {
    margin-right: 8px;
    font-size: 16px;
    color: var(--text-muted);
    transition: all 0.2s;
}

.nav-list li a:hover {
    background: rgba(0, 125, 64, 0.05);
}

.nav-list li a.active {
    background: rgba(0, 125, 64, 0.08);
    border-left-color: var(--primary);
    color: var(--primary);
}

.nav-list li a.active i {
    color: var(--primary);
}

/* =============== MAIN CONTENT =============== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: calc(100% - 240px);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.topbar {
    height: 46px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-main);
    cursor: pointer;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.user-info {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.user-name {
    font-weight: 700;
    font-size: 10px;
    color: var(--text-main);
}

.user-role {
    font-size: 8px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.view-container {
    padding: 12px;
    flex: 1;
    overflow-y: auto;
}

.view {
    display: none;
    animation: fadeIn 0.4s ease;
}

.view.active {
    display: block;
}

.view-header {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.view-title {
    display: flex;
    align-items: center;
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--primary-dark);
}

.view-title i {
    color: var(--primary);
    font-size: 16px;
    margin-right: 6px;
    padding: 4px;
    background: rgba(2, 132, 199, 0.1);
    border-radius: 8px;
}

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

/* =============== COURSES GRID =============== */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.course-card {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 125, 64, 0.1);
    border-color: var(--primary-light);
}

.course-image-wrapper {
    width: 100%;
    height: 100px;
    background: #e2e8f0;
}

.course-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-content {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-title {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.3;
    color: var(--primary-dark);
}

.course-desc {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.course-tag {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(0, 125, 64, 0.1);
    color: var(--primary);
    border-radius: 12px;
    font-size: 9px;
    font-weight: 600;
}

.progress-wrapper {
    width: 60%;
}

.progress-text {
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
    text-align: right;
    display: block;
    margin-bottom: 4px;
}

.progress-container {
    width: 100%;
    background: #e2e8f0;
    border-radius: 8px;
    height: 6px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 8px;
    transition: width 1s ease-in-out;
}

/* =============== BUTTONS & TABLES =============== */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: scale(1.02);
}

.table-container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid var(--glass-border);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    padding: 3px 5px;
    border-bottom: 2px solid #e2e8f0;
    color: var(--text-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
}

.data-table td {
    padding: 3px 5px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 11px;
    color: var(--text-main);
}

.text-right {
    text-align: right !important;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px;
    font-size: 13px; /* Icons need to be slightly larger than text to look good */
    color: var(--text-muted);
    transition: color 0.2s, transform 0.1s;
    display: inline-block;
}

.action-btn:hover {
    transform: scale(1.1);
}

.action-btn.edit:hover {
    color: var(--primary);
}

.action-btn.delete:hover {
    color: var(--danger);
}

/* =============== SWEETALERT ELEGANT =============== */
.swal2-popup.swal2-popup-elegant {
    padding: 1.2em 1.5em !important;
    border-radius: 12px !important;
}
.swal2-popup-elegant .swal2-title {
    font-size: 15px !important;
    padding: 0 0 12px 0 !important;
    color: var(--primary-dark) !important;
}
.swal2-popup-elegant .swal2-html-container {
    margin: 0 !important;
}
.swal2-popup-elegant .swal2-actions {
    margin-top: 15px !important;
}
.swal2-popup-elegant .swal2-confirm, 
.swal2-popup-elegant .swal2-cancel {
    padding: 6px 16px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
}
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content, .modal {
    background: rgba(255, 255, 255, 0.84) !important; /* Frosted glass effect */
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    width: 85%;
    max-width: 400px;
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04), inset 0 0 0 1px rgba(255, 255, 255, 0.65) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    transform: scale(0.96) translateY(12px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content,
.modal-overlay.active .modal,
.modal-overlay[style*="display: flex"] .modal-content,
.modal-overlay[style*="display: flex"] .modal,
.modal-overlay[style*="display: flex "] .modal-content,
.modal-overlay[style*="display: flex "] .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent !important; /* Transparent background to let the glass content flow */
}

.modal-header h3 {
    font-size: 14px;
    color: var(--primary-dark);
    font-weight: 700;
    text-shadow: none;
    margin: 0;
}

.modal-body {
    padding: 20px 24px;
}

.close-btn {
    background: rgba(0, 0, 0, 0.04);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 16px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-btn:hover {
    color: #ef4444;
    background: #fef2f2;
    border-color: #fee2e2;
    transform: scale(1.05);
}

/* Styled form elements inside modals */
.modal-content .form-control, .modal .form-control {
    background: rgba(255, 255, 255, 0.55) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-size: 11px !important;
    color: #1e293b !important;
    transition: all 0.2s ease !important;
}

.modal-content .form-control:focus, .modal .form-control:focus {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 125, 64, 0.12), 0 2px 4px rgba(0,0,0,0.02) !important;
}

.modal-content label, .modal label {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    margin-bottom: 4px !important;
    display: block !important;
    text-transform: none !important;
    letter-spacing: 0.01em !important;
}

/* Scrollbars elegantes y finas para modales */
.modal-body::-webkit-scrollbar,
#evaluacion-competences-list::-webkit-scrollbar,
.modal-content::-webkit-scrollbar,
.modal::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.modal-body::-webkit-scrollbar-track,
#evaluacion-competences-list::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track,
.modal::-webkit-scrollbar-track {
    background: transparent;
}
.modal-body::-webkit-scrollbar-thumb,
#evaluacion-competences-list::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb,
.modal::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 10px;
}
.modal-body::-webkit-scrollbar-thumb:hover,
#evaluacion-competences-list::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover,
.modal::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.22);
}

/* Estilos de competencias mejorados */
.competence-checkbox-item {
    display: flex !important;
    gap: 10px !important;
    align-items: flex-start !important;
    padding: 10px 12px !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    background: rgba(255, 255, 255, 0.6) !important;
    margin: 0 !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.01) !important;
}

.competence-checkbox-item:hover {
    border-color: var(--primary) !important;
    background: rgba(0, 125, 64, 0.02) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px -2px rgba(0, 0, 0, 0.05) !important;
}

.competence-checkbox-item:has(input:checked) {
    border-color: var(--primary) !important;
    background: rgba(0, 125, 64, 0.05) !important;
    box-shadow: 0 4px 10px rgba(0, 125, 64, 0.06) !important;
}

.video-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16/9;
    max-height: 55vh;
    padding: 12px;
    box-sizing: border-box;
    background: radial-gradient(circle at center, var(--primary) 0%, var(--primary-dark) 100%);
}

video {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

/* =============== COLLAPSIBLE SIDEBAR DESKTOP =============== */
.app-container.sidebar-collapsed .sidebar {
    width: 64px;
}

.app-container.sidebar-collapsed .main-content {
    width: calc(100% - 64px);
}

.app-container.sidebar-collapsed .brand-logo {
    gap: 0;
    padding: 0;
    width: 100%;
    justify-content: center;
}

.app-container.sidebar-collapsed .brand-logo img {
    content: url("https://play-lh.googleusercontent.com/5sF_unNhQce0qB1Pphqa8lCnE52CjtC6lImhODUcZ0syHUEC1gPCMvOLOcLhkcyLeg=w240-h480-rw");
    width: 36px !important;
    height: 36px !important;
    margin: 0 auto;
    object-fit: contain !important;
    mix-blend-mode: normal !important;
}

.app-container.sidebar-collapsed .brand-text {
    display: none !important;
}

.app-container.sidebar-collapsed .sidebar-header {
    padding: 15px 0;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
}

.app-container.sidebar-collapsed .desktop-toggle-btn {
    margin: 0 auto;
    transform: rotate(180deg);
    position: static;
}

.app-container.sidebar-collapsed .nav-title {
    display: none;
}

.app-container.sidebar-collapsed .nav-collapsible {
    display: none !important;
}

.app-container.sidebar-collapsed .nav-list {
    max-height: none !important;
    margin-bottom: 0 !important;
}

.app-container.sidebar-collapsed .nav-list li a {
    font-size: 0;
    padding: 15px 0;
    justify-content: center;
}

.app-container.sidebar-collapsed .nav-list li a i {
    font-size: 20px;
    margin-right: 0;
}

/* =============== RESPONSIVE (IPAD & IPHONE) =============== */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        transform: translateX(-100%);
        margin-left: 0 !important;
        width: 250px !important;
    }

    .sidebar.open {
        transform: translateX(0);
    }

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

    .hamburger-btn {
        display: block;
    }

    .close-sidebar-btn {
        display: block;
    }

    .desktop-toggle-btn {
        display: none;
    }
}

@media (max-width: 640px) {
    .courses-grid {
        grid-template-columns: 1fr;
    }

    .view-container {
        padding: 15px;
    }

    .modal-content {
        width: 95%;
        border-radius: 16px;
    }

    .video-wrapper {
        padding: 0;
    }

    video {
        border-radius: 0;
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============== FORMS & SWITCHES =============== */
.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 9px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 10px;
    color: var(--text-main);
    transition: border-color 0.2s, box-shadow 0.2s;
    background: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 125, 64, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--text-main);
    border: 1px solid #cbd5e1;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.switch-group {
    margin-bottom: 12px;
}

.switch-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 36px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    user-select: none;
}

.switch-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 18px;
    width: 32px;
    background-color: #cbd5e1;
    border-radius: 20px;
    transition: background-color 0.3s;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: block;
    left: 3px;
    top: 3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.switch-container input:checked~.checkmark {
    background-color: var(--primary);
}

.switch-container input:checked~.checkmark:after {
    transform: translateX(14px);
}

/* =============== VIDEO MANAGER LIST =============== */
.video-list-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.video-list-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e1;
}

.video-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.video-item-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 13px;
    margin-bottom: 2px;
}

.video-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    gap: 8px;
    align-items: center;
}

.video-actions {
    display: flex;
    gap: 8px;
    margin-left: 16px;
}

.drag-handle {
    color: #cbd5e1;
    cursor: grab;
    font-size: 20px;
    padding-right: 12px;
    display: flex;
    align-items: center;
}

.drag-handle:active {
    cursor: grabbing;
}

/* FIX Z-INDEX Y TAMAÃ‘O ELEGANTE PARA SWEETALERT */
.swal2-container {
    z-index: 9999 !important;
}

.swal2-popup {
    font-size: 0.85rem !important;
    padding: 1.5rem !important;
    max-width: 95vw !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1) !important;
}

.swal2-title {
    font-size: 1.3rem !important;
}

.swal2-icon {
    transform: scale(0.65) !important;
    margin-bottom: 0.5rem !important;
    margin-top: 0 !important;
}

.swal2-html-container {
    font-size: 0.9rem !important;
    margin-top: 0 !important;
}

.swal2-actions {
    margin-top: 1rem !important;
}

.swal2-confirm,
.swal2-cancel {
    font-size: 0.85rem !important;
    padding: 8px 20px !important;
    border-radius: 8px !important;
}

/* =============== ONEPAGE COURSE VIEW =============== */
.course-landing-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
    align-items: stretch;
    transition: grid-template-columns 0.3s cubic-bezier(0.4, 0, 0.2, 1), gap 0.3s;
}

.course-landing-layout.syllabus-collapsed {
    grid-template-columns: 0px 1fr;
    gap: 0;
}

.course-landing-layout.syllabus-collapsed .syllabus-sidebar {
    padding: 0;
    border: none;
    opacity: 0;
}

@media (max-width: 900px) {
    .course-landing-layout {
        grid-template-columns: 1fr;
    }

    .course-landing-layout.syllabus-collapsed {
        grid-template-columns: 1fr;
    }

    .course-landing-layout.syllabus-collapsed .syllabus-sidebar {
        display: none;
    }
}

.syllabus-sidebar {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
}

.syllabus-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: 12px;
}

.syllabus-list::-webkit-scrollbar {
    width: 4px;
}

.syllabus-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* =============== VIDEO BUILDER =============== */
.question-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.question-card.type-multiple {
    border-left-color: #f59e0b;
}

.question-card.type-open {
    border-left-color: #3b82f6;
}

.qc-option-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.syllabus-item {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
}

.syllabus-item:hover:not(.locked):not(.active) {
    background: white;
    border-color: #cbd5e1;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.syllabus-item.active {
    background: rgba(0, 166, 80, 0.05);
    border-color: rgba(0, 166, 80, 0.3);
}

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

.syllabus-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
    transition: all 0.3s;
}

.syllabus-item.completed .syllabus-icon {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 6px rgba(0, 166, 80, 0.3);
}

.syllabus-item.active .syllabus-icon {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.syllabus-item.locked .syllabus-icon {
    background: #e2e8f0;
    color: #94a3b8;
}

.syllabus-item.pending .syllabus-icon {
    background: white;
    border: 1px solid #cbd5e1;
    color: var(--text-muted);
}

.syllabus-text {
    flex: 1;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.3;
    transition: color 0.2s;
}

.syllabus-item.active .syllabus-text {
    color: var(--primary-dark);
    font-weight: 700;
}

.syllabus-item.locked .syllabus-text {
    color: #94a3b8;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 166, 80, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(0, 166, 80, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 166, 80, 0);
    }
}


@keyframes shakeError {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-10px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(10px);
    }
}

@keyframes successPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 166, 80, 0.7);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 20px rgba(0, 166, 80, 0);
        border-color: var(--success);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 166, 80, 0);
    }
}

.shake-error {
    animation: shakeError 0.6s cubic-bezier(.36, .07, .19, .97) both;
    border: 2px solid var(--danger) !important;
}

.success-pulse {
    animation: successPulse 0.6s ease-out both;
    border: 2px solid var(--success) !important;
}

.swal2-container {
    z-index: 9999999 !important;
}

.swal2-popup {
    z-index: 9999999 !important;
}

/* --- PUBLIC LANDING --- */
.public-landing {
    min-height: 100vh;
    background: #ffffff;
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
}

.public-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    border-bottom: 1px solid #f1f5f9;
    background: white;
}

.public-logo h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.5px;
}

.public-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.btn-text {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.3s;
}

.btn-text:hover {
    color: var(--primary);
}

.public-hero {
    text-align: center;
    padding: 30px 20px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.public-hero h2 {
    font-size: 34px;
    font-weight: 300;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 10px;
}

.public-hero h2 .hero-subtitle {
    display: block;
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 20px;
    margin-top: 8px;
}

.animated-brand {
    font-weight: 800;
    display: inline-block;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 50%, var(--primary) 100%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shine 3s linear infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.wavy-text span {
    display: inline-block;
    animation: wavy 1.5s ease-in-out infinite;
    animation-delay: calc(0.1s * var(--i));
    color: var(--primary-dark);
}

@keyframes wavy {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

.public-hero p {
    font-size: 15px;
    color: var(--text-muted);
}

.public-videos {
    padding: 0 5% 30px;
    flex: 1;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.public-video-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    aspect-ratio: 16/9;
}

.public-video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 166, 80, 0.15);
}

.public-video-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.2) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    color: white;
}

.video-card-overlay i {
    font-size: 48px;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.8;
    transition: opacity 0.3s, transform 0.3s;
}

.public-video-card:hover .video-card-overlay i {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
    color: var(--primary);
}

.video-card-overlay h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}


/* --- ELEGANT MODALS --- */
.elegant-modal-container {
    padding: 10px;
}

.elegant-modal-logo {
    font-size: 50px;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 10px;
}

.elegant-modal-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.elegant-modal-subtitle {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.elegant-input-group {
    position: relative;
    margin-bottom: 16px;
    text-align: left;
}

.elegant-input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 20px;
}

.elegant-input {
    width: 100% !important;
    max-width: 100%;
    height: 52px;
    padding: 0 20px 0 48px !important;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    color: var(--text-main);
    transition: all 0.3s ease;
    box-sizing: border-box;
    margin: 0 !important;
    box-shadow: none !important;
}

.elegant-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(0, 166, 80, 0.1) !important;
    outline: none;
}

.swal2-popup.elegant-swal {
    border-radius: 20px;
    padding: 30px 20px;
}

.swal2-confirm.elegant-btn-confirm {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    padding: 14px 32px !important;
    font-size: 16px !important;
    width: 100%;
}

.swal2-cancel.elegant-btn-cancel {
    background: #f1f5f9 !important;
    color: var(--text-main) !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    padding: 14px 32px !important;
    font-size: 16px !important;
}

.swal2-actions.elegant-actions {
    width: 100%;
    margin-top: 10px;
    flex-direction: column;
    gap: 12px;
}

.swal2-actions.elegant-actions button {
    margin: 0 !important;
    width: 100%;
}


/* Syllabus Modules (Accordion) */
.syllabus-module {
    border-bottom: 1px solid var(--glass-border);
}

.syllabus-module:last-child {
    border-bottom: none;
}

.syllabus-module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    background: #f8fafc;
    transition: background 0.2s;
    user-select: none;
}

.syllabus-module-header:hover {
    background: #f1f5f9;
}

.syllabus-module-header.active {
    background: #e2e8f0;
}

.syllabus-module-content {
    background: white;
}

/* =============== ACCORDION STYLES =============== */
.accordion-wrapper {
    margin-bottom: 0px;
    border: 1px solid #f3f4f6;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.accordion-header {
    margin: 0;
    padding: 6px 10px;
    font-size: 10px;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    user-select: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.accordion-header:hover {
    background: #f9fafb;
}

.accordion-icon {
    color: #00a650;
    font-size: 14px;
}

.accordion-toggle-icon {
    margin-left: auto;
    font-size: 16px;
    color: #00a650;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.accordion-content {
    overflow-x: auto;
    background: white;
    transition: max-height 0.3s ease-in-out;
    max-height: 5000px;
    overflow-y: hidden;
    border-top: 1px solid #f3f4f6;
}

.accordion-content.collapsed {
    max-height: 0px !important;
    border-top: none;
}
/* Custom Slider 360 Elegant */
.custom-slider-elegant {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
    outline: none;
}
.custom-slider-elegant::-webkit-slider-runnable-track {
    width: 100%;
    height: 16px;
    cursor: pointer;
    background: transparent;
    border-radius: 0;
}
.custom-slider-elegant::-webkit-slider-thumb {
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: #00A65A;
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: 2px;
    box-shadow: 0 0 0 3px white, 0 1px 3px rgba(0,0,0,0.15);
    transition: transform 0.1s;
}
.custom-slider-elegant::-moz-range-track {
    width: 100%;
    height: 16px;
    cursor: pointer;
    background: transparent;
    border-radius: 0;
}
.custom-slider-elegant::-moz-range-thumb {
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: #00A65A;
    cursor: pointer;
    box-shadow: 0 0 0 3px white, 0 1px 3px rgba(0,0,0,0.15);
    border: none;
    transition: transform 0.1s;
}
.custom-slider-elegant:active::-webkit-slider-thumb {
    transform: scale(1.2);
}
.custom-slider-elegant:active::-moz-range-thumb {
    transform: scale(1.2);
}

.slider-labels-elegant span {
    position: absolute;
    transform: translateX(-50%);
    cursor: pointer;
    white-space: normal !important;
    max-width: 70px;
    width: auto;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    text-align: center;
    line-height: 1.2;
}
.slider-labels-elegant span:hover {
    color: #0f172a !important;
}
.slider-labels-elegant span .lbl-num {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 2px;
    transition: all 0.2s ease;
}
.slider-labels-elegant span:hover .lbl-num {
    transform: scale(1.15);
    color: #00A65A;
}
.slider-labels-elegant span.active-lbl {
    color: #00A65A !important;
}
.slider-labels-elegant span.active-lbl .lbl-num {
    color: #00A65A !important;
    font-size: 11.5px;
    font-weight: 800;
}


/* --- MODERN DASHBOARD HUB --- */
.hero-banner {
    position: relative;
    width: 100%;
    height: 250px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    display: flex;
    align-items: center;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.hero-banner::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('https://images.unsplash.com/photo-1522202176988-66273c2fd55f?ixlib=rb-4.0.3&auto=format&fit=crop&w=1000&q=80') center/cover;
    opacity: 0.2;
    mix-blend-mode: overlay;
}
.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 500px;
}
.hero-tag {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 12px;
    backdrop-filter: blur(5px);
}
.hero-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.2;
}
.hero-desc {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 20px;
}
.hero-btn-play {
    background: white;
    color: var(--primary-dark);
    border: none;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}
.hero-btn-play:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.filter-pills {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 5px;
}
.filter-pills::-webkit-scrollbar { display: none; }
.filter-pill {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.filter-pill:hover, .filter-pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.carousel-section {
    margin-bottom: 40px;
}
.carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 16px;
}
.carousel-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0;
}
.carousel-link {
    font-size: 12px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}
.carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 15px;
    scroll-snap-type: x mandatory;
}
.carousel-track::-webkit-scrollbar {
    height: 6px;
}
.carousel-track::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}
.carousel-track::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.media-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #f1f5f9;
    flex-shrink: 0;
    scroll-snap-align: start;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}
.media-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}
.media-img-wrapper {
    position: relative;
    width: 100%;
    background: #e2e8f0;
    overflow: hidden;
}
.media-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.media-card:hover .media-img-wrapper img {
    transform: scale(1.05);
}
.media-play-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}
.media-card:hover .media-play-overlay {
    opacity: 1;
}
.media-play-overlay i {
    font-size: 40px;
    color: white;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5));
}
.media-info {
    padding: 15px;
}
.media-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.media-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* Aspect Ratios */
.card-course { width: 280px; }
.card-course .media-img-wrapper { height: 150px; }

.card-audiobook { width: 180px; }
.card-audiobook .media-img-wrapper { height: 180px; } /* Square 1:1 */

.card-document { width: 200px; }
.card-document .media-img-wrapper { height: 260px; } /* Vertical 3:4 */

.card-microvideo { width: 220px; }
.card-microvideo .media-img-wrapper { height: 350px; border-radius: 12px; } /* Reels/Shorts ratio */
.card-microvideo .media-info { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,0.8)); color: white; padding: 20px 15px 15px; }
.card-microvideo .media-title { color: white; }
.card-microvideo .media-meta { color: rgba(255,255,255,0.8); }

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 30px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* =============== ADICIONALES DE RESPONSIVIDAD Y COMPATIBILIDAD MÓVIL =============== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}
.table-responsive .data-table {
    min-width: 600px;
}

@media (max-width: 600px) {
    /* Ocultar etiquetas de texto descriptivo e íconos en el slider en móviles */
    .slider-labels-elegant span .lbl-txt {
        display: none !important;
    }
    .slider-labels-elegant span i {
        display: none !important;
    }
    .slider-labels-elegant span {
        font-size: 11px !important;
        font-weight: 700 !important;
        transform: translateX(-50%) !important;
    }
    /* Los spans se alinean al centro de los ticks por su posicion absoluta con offset */
}

@media (max-width: 640px) {
    /* Cuadrícula de audiolibros en 2 columnas para móviles */
    #student-audiobooks-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
        gap: 12px !important;
    }
    
    /* Seguridad de desbordamiento horizontal general */
    .main-content {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    .app-container {
        overflow-x: hidden !important;
    }
}

/* =============== DASHBOARD SPLIT LAYOUT =============== */
.dashboard-split-layout {
    display: flex;
    gap: 20px;
    width: 100%;
    align-items: flex-start;
}
.dashboard-left-col {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}
.dashboard-right-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

@media (max-width: 1024px) {
    .dashboard-split-layout {
        flex-direction: column;
    }
    .dashboard-left-col, .dashboard-right-col {
        flex: 1;
        width: 100%;
    }
}

/* ==========================================================================
   OPTIMIZACIONES PARA PREGUNTAS INTERACTIVAS Y AUDIOLIBROS
   ========================================================================== */

/* 1. Adaptabilidad de Pregunta Interactiva dentro de .video-wrapper */
.video-wrapper #interactive-question-modal {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(15, 23, 42, 0.85) !important; /* Capa oscura sobre el video */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important;
    padding: 12px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* Modal Card dentro del reproductor */
.video-wrapper #iq-modal-card {
    width: 100% !important;
    max-width: 680px !important;
    height: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    background: #ffffff !important;
    overflow: hidden !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

/* Columna Izquierda (Fondo degradado e información de la pregunta) */
.video-wrapper #iq-modal-card > div:first-child {
    flex: 1 !important;
    padding: 20px !important;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: flex-start !important;
}

/* Ocultar el icono gigante decorativo para ganar espacio vertical */
.video-wrapper #iq-modal-card > div:first-child > div {
    display: none !important;
}

/* Título de la pregunta compactado */
.video-wrapper #iq-title {
    font-size: 15px !important;
    line-height: 1.4 !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    margin: 0 !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2) !important;
}

/* Columna Derecha (Opciones y botón) */
.video-wrapper #iq-modal-card > div:last-child {
    flex: 1.3 !important;
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 100% !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
}

/* Contenedor de opciones con scroll vertical */
.video-wrapper #iq-options-container {
    flex: 1 !important;
    overflow-y: auto !important;
    margin-bottom: 12px !important;
    padding-right: 4px !important;
    gap: 8px !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Barra de scroll personalizada */
.video-wrapper #iq-options-container::-webkit-scrollbar {
    width: 5px;
}
.video-wrapper #iq-options-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}
.video-wrapper #iq-options-container::-webkit-scrollbar-track {
    background: transparent;
}

/* Fila de opción compacta */
.video-wrapper #iq-options-container > div {
    padding: 10px 12px !important;
    border-radius: 10px !important;
    border-width: 1px !important;
    gap: 10px !important;
}

/* Tamaño de las etiquetas de opción */
.video-wrapper #iq-options-container label {
    font-size: 13px !important;
    line-height: 1.3 !important;
}

/* Tamaño del input (radio/checkbox) */
.video-wrapper #iq-options-container input[type="radio"],
.video-wrapper #iq-options-container input[type="checkbox"] {
    width: 15px !important;
    height: 15px !important;
}

/* Botón de envío compactado */
.video-wrapper #iq-modal-card button.btn-primary {
    padding: 10px 16px !important;
    font-size: 13px !important;
    border-radius: 10px !important;
    margin-top: 0 !important;
    width: 100% !important;
    height: auto !important;
}

/* Responsivo para pantallas de menor resolución o reproductor estrecho */
@media (max-width: 768px), (max-height: 420px) {
    .video-wrapper #iq-modal-card {
        flex-direction: column !important;
    }
    
    .video-wrapper #iq-modal-card > div:first-child {
        flex: none !important;
        width: 100% !important;
        padding: 12px 16px !important;
        background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    }
    
    .video-wrapper #iq-modal-card > div:last-child {
        flex: 1 !important;
        padding: 12px 16px !important;
    }
    
    .video-wrapper #iq-title {
        font-size: 13px !important;
    }
    
    .video-wrapper #iq-options-container {
        max-height: 110px !important;
    }
}

/* 2. Rediseño Premium de Tarjetas de Audiolibros */

/* Limitar ancho para que no se estire cuando hay pocas tarjetas */
#student-audiobooks-grid .course-card {
    max-width: 240px !important;
    width: 100% !important;
    margin: 0 !important;
    border-radius: 16px !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    background: #ffffff !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    flex-direction: column !important;
}

#student-audiobooks-grid .course-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 12px 25px rgba(0, 166, 80, 0.08) !important;
    border-color: rgba(0, 166, 80, 0.2) !important;
}

/* Forzar portada cuadrada (1/1) y anular la altura fija de 100px */
#student-audiobooks-grid .course-image-wrapper {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1/1 !important;
    position: relative !important;
    overflow: hidden !important;
    background: #f8fafc !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

#student-audiobooks-grid .course-image-wrapper img {
    transition: transform 0.5s ease !important;
}

#student-audiobooks-grid .course-card:hover .course-image-wrapper img {
    transform: scale(1.05) !important;
}

/* Estilo para los botones en las tarjetas de audiolibros */
#student-audiobooks-grid .btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    border: none !important;
    box-shadow: 0 4px 10px rgba(0, 166, 80, 0.15) !important;
    border-radius: 20px !important;
    padding: 6px 14px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: white !important;
    transition: all 0.2s ease !important;
}

#student-audiobooks-grid .btn-primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 12px rgba(0, 166, 80, 0.25) !important;
}

/* ==========================================================================
   SMART PREMIUM SEARCH BAR
   ========================================================================== */
.search-container {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    transition: all 0.3s ease !important;
}

.search-input {
    width: 100% !important;
    height: 38px !important;
    padding: 8px 16px 8px 40px !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    color: var(--primary-dark) !important;
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(4, 88, 91, 0.18) !important;
    border-radius: 20px !important; /* Pill shape */
    outline: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.search-input::placeholder {
    color: rgba(4, 88, 91, 0.5) !important;
    font-weight: 500 !important;
}

.search-input:hover {
    border-color: rgba(4, 88, 91, 0.35) !important;
    background: rgba(255, 255, 255, 0.92) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
}

.search-input:focus {
    border-color: var(--primary) !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(4, 88, 91, 0.15), 0 4px 20px rgba(0, 0, 0, 0.06) !important;
    padding-left: 42px !important;
}

.search-icon {
    position: absolute !important;
    left: 15px !important;
    font-size: 16px !important;
    color: rgba(4, 88, 91, 0.6) !important;
    pointer-events: none !important;
    transition: all 0.3s ease !important;
}

.search-input:focus + .search-icon {
    color: var(--primary) !important;
    transform: scale(1.1) !important;
}

/* Keyboard Shortcut Badge "Ctrl K" */
.search-container::after {
    content: "Ctrl K" !important;
    position: absolute !important;
    right: 14px !important;
    font-size: 8px !important;
    font-weight: 700 !important;
    color: rgba(4, 88, 91, 0.5) !important;
    background: rgba(4, 88, 91, 0.06) !important;
    border: 1px solid rgba(4, 88, 91, 0.1) !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    pointer-events: none !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
}

.search-container:focus-within::after {
    opacity: 0 !important;
    transform: translateX(5px) !important;
}

/* ==========================================================================
   HORIZONTAL CAROUSEL SLIDERS FOR HOME VIEW
   ========================================================================== */
.horizontal-slider {
    display: flex !important;
    flex-direction: row !important;
    gap: 16px !important;
    overflow-x: auto !important;
    scroll-behavior: smooth !important;
    padding: 8px 4px !important;
    width: 100% !important;
    -ms-overflow-style: none !important; /* IE/Edge */
    scrollbar-width: none !important; /* Firefox */
}

.horizontal-slider::-webkit-scrollbar {
    display: none !important; /* Webkit (Chrome/Safari) */
}

/* Card sizing inside home categories/courses slider */
.horizontal-slider#grid-other-categories .course-card {
    flex: 0 0 220px !important;
    width: 220px !important;
}

/* Card sizing inside home audiobooks slider */
.horizontal-slider#grid-home-audiobooks .course-card {
    flex: 0 0 180px !important;
    width: 180px !important;
    cursor: pointer !important;
}

#grid-home-audiobooks .course-image-wrapper {
    height: auto !important;
    aspect-ratio: 1/1 !important;
    width: 100% !important;
}

/* Home slider navigation button hover effects */
.horizontal-slider-wrapper button {
    transition: all 0.2s ease !important;
}
.horizontal-slider-wrapper button:hover {
    background: #f8fafc !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12) !important;
}

/* UBITS-style Dashboard Panel Containers */
.dashboard-panel {
    background: #ffffff !important;
    border-radius: 20px !important;
    padding: 24px !important;
    box-shadow: 0 10px 30px rgba(2, 66, 68, 0.02) !important;
    border: 1px solid rgba(226, 232, 240, 0.7) !important;
    margin-bottom: 24px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.dashboard-panel-header {
    font-size: 14px !important;
    font-weight: 800 !important;
    color: var(--primary-dark) !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 18px !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.dashboard-panel-header i {
    color: var(--primary) !important;
    font-size: 18px !important;
}

/* Ensure course cards inside slider have UBITS-like style */
.horizontal-slider .course-card {
    border-radius: 16px !important;
    border: 1px solid #f1f5f9 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.015) !important;
    background: #ffffff !important;
    overflow: hidden !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.horizontal-slider .course-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 25px rgba(0, 166, 80, 0.08) !important;
    border-color: rgba(0, 166, 80, 0.15) !important;
}

.horizontal-slider .course-image-wrapper {
    border-radius: 16px 16px 0 0 !important;
    overflow: hidden !important;
}

/* EFECTO CRISTAL IPAD */
.crystal-card {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(25px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(200%) !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.25), 0 18px 36px -18px rgba(0, 0, 0, 0.3) !important;
}

/* Prevent Google Translate from translating and duplicating range slider labels */
.slider-labels-elegant span .lbl-txt::after {
    content: attr(data-text) !important;
}





