/* =====================================================
   POPPER ACADEMY v9.2 — Estilos Corregidos
   ===================================================== */

/* ===================== 1. VARIABLES ===================== */
:root {
    --primary: #0F172A;
    --primary-light: #1E293B;
    --gold: #C59D5F;
    --gold-gradient: linear-gradient(135deg, #BF953F 0%, #FCF6BA 40%, #B38728 60%, #FBF5B7 100%);
    --accent: #B91C1C;
    --accent-success: #10B981;
    --bg-body: #020617;
    --text-main: #F8FAFC;
    --text-muted: #9CA3B0;
    --glass: rgba(30, 41, 59, 0.95);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --radius-xl: 20px;
    --radius-lg: 12px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --shadow-card: 0 4px 20px rgba(0,0,0,0.3);
    --shadow-card-hover: 0 20px 40px rgba(0,0,0,0.5);
}

/* ===================== 2. RESET ===================== */
* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-size: 14px;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    color: var(--text-main);
    margin: 0;
}

/* ===================== 3. SCROLLBAR ===================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(197,157,95,0.3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(197,157,95,0.6); }

/* ===================== 4. LAYOUT ===================== */
.app-shell { display: flex; height: 100vh; width: 100vw; }

.sidebar {
    width: 280px;
    background: var(--primary);
    border-right: var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 30px;
    z-index: 50;
    flex-shrink: 0;
    transition: var(--transition-normal);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at top right, #1E293B 0%, #020617 70%);
    position: relative;
    overflow: hidden;
}

.top-bar {
    height: 70px;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: var(--glass-border);
    background: rgba(2,6,23,0.9);
    flex-shrink: 0;
    gap: 15px;
}

.content-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    scroll-behavior: smooth;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* ===================== 5. BRAND & NAV ===================== */
.brand {
    font-family: 'Cinzel';
    font-size: 1.6rem;
    color: var(--gold);
    text-align: center;
    margin-bottom: 40px;
    cursor: pointer;
    letter-spacing: 2px;
    transition: var(--transition-normal);
}
.brand:hover { text-shadow: 0 0 20px rgba(197,157,95,0.4); }
.brand span { font-weight: 400; opacity: 0.7; }

.nav-item {
    padding: 12px 20px;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 5px;
    border-left: 3px solid transparent;
    font-size: 0.9rem;
}
.nav-item:hover, .nav-item.active {
    background: rgba(212,175,55,0.1);
    color: var(--gold);
    border-left-color: var(--gold);
}
.nav-item i { width: 20px; text-align: center; }

/* ===================== 6. BUTTONS ===================== */
.btn-action-main {
    padding: 10px 24px;
    background: var(--gold-gradient);
    color: #0F172A;
    border-radius: 50px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(212,175,55,0.3);
    transition: var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    text-decoration: none;
    white-space: nowrap;
    font-family: 'Montserrat', sans-serif;
}
.btn-action-main:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(212,175,55,0.5); }
.btn-action-main:active { transform: translateY(0); }
.btn-action-main:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-login-sec {
    padding: 10px 24px;
    background: rgba(255,255,255,0.05);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-normal);
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-family: 'Montserrat', sans-serif;
}
.btn-login-sec:hover { border-color: var(--gold); color: var(--gold); }

.btn-danger {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 10px;
    border-radius: 50px;
    width: 100%;
    cursor: pointer;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition-normal);
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
}
.btn-danger:hover { background: var(--accent); color: white; }

/* ===================== 7. SEARCH BAR ===================== */
.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50px;
    padding: 8px 20px;
    flex: 1;
    max-width: 400px;
    transition: var(--transition-normal);
}
.search-bar:focus-within { border-color: var(--gold); background: rgba(255,255,255,0.08); }
.search-bar i { color: var(--text-muted); font-size: 0.85rem; }
.search-bar input {
    background: none;
    border: none;
    color: white;
    font-family: 'Montserrat';
    font-size: 0.85rem;
    width: 100%;
}
.search-bar input::placeholder { color: var(--text-muted); }

/* ===================== 8. BREADCRUMBS ===================== */
#breadcrumbs span {
    cursor: pointer;
    transition: var(--transition-fast);
    padding: 2px 4px;
    border-radius: 4px;
}
#breadcrumbs span:hover { color: var(--gold); }
#breadcrumbs span.active { color: var(--gold); font-weight: 600; cursor: default; }
#breadcrumbs i { opacity: 0.4; margin: 0 2px; }

/* ===================== 9. CARDS ===================== */
.card {
    background: var(--primary-light);
    border-radius: 16px;
    border: var(--glass-border);
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 320px;
    box-shadow: var(--shadow-card);
}
.card:hover {
    transform: translateY(-8px);
    border-color: var(--gold);
    box-shadow: var(--shadow-card-hover);
}

.card-img {
    height: 160px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}
.card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.6) 100%);
}

.card-img-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-img-fallback i {
    font-size: 3rem;
    color: rgba(197,157,95,0.3);
}

.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }

.poster-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
    line-height: 1.3;
}

.poster-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 15px;
}

/* ===================== 10. PROGRESS BAR ===================== */
.progress-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 8px;
}
.progress-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s ease;
    background: var(--gold-gradient);
}
.progress-bar-fill.complete {
    background: linear-gradient(90deg, #10B981, #34d399);
}

/* ===================== 11. ADMIN BUTTONS ===================== */
.admin-btns {
    position: absolute;
    top: 15px;
    right: 15px;
    display: none;
    gap: 10px;
    z-index: 50;
    transition: var(--transition-normal);
}

/* FIX: Solo mostrar botones admin cuando es admin Y hover */
body.is-admin .card:hover .admin-btns {
    display: flex;
}

.admin-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
}
.edit-btn { background: rgba(0,0,0,0.8); border: 1px solid var(--gold); color: var(--gold); }
.edit-btn:hover { background: var(--gold); color: black; transform: scale(1.1); }
.del-btn { background: rgba(185, 28, 28, 0.9); border: 1px solid #ff5555; }
.del-btn:hover { background: red; transform: scale(1.1); }

/* ===================== 12. HERO BANNER ===================== */
.hero-banner {
    height: 350px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    margin-bottom: 40px;
    border: var(--glass-border);
}
.hero-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.5;
    transition: opacity 0.6s ease;
}
.hero-banner:hover .hero-bg { opacity: 0.6; }
.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    background: linear-gradient(0deg, var(--bg-body), transparent);
}

/* ===================== 13. COURSE BLOCKS ===================== */
.block-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.course-block {
    background: var(--primary-light);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition-normal);
}
.course-block:hover { border-color: rgba(255,255,255,0.15); }
.course-block.locked { opacity: 0.5; pointer-events: none; filter: grayscale(0.8); }
.course-block.completed { border-color: var(--accent-success); }

.block-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: rgba(255,255,255,0.02);
    transition: var(--transition-fast);
}
.block-header:hover { background: rgba(255,255,255,0.05); }

.block-title {
    font-family: 'Playfair Display';
    font-size: 1.2rem;
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: var(--transition-normal);
    flex-shrink: 0;
}
.completed .status-icon { background: var(--accent-success); color: black; }
.locked .status-icon { background: #333; color: #666; }

.block-body {
    display: none;
    padding: 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
    background: #151e32;
}
.course-block.open .block-body { display: block; animation: slideDown 0.3s ease; }

.block-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #cbd5e1;
    margin-bottom: 20px;
    word-wrap: break-word;
}
.block-text * {
    background-color: transparent !important;
    color: #cbd5e1 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 1rem !important;
    line-height: 1.8 !important;
    height: auto !important;
    width: auto !important;
    margin: 5px 0 !important;
}

/* ===================== 14. VIDEO & MEDIA ===================== */
.video-preview-card {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #000;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    position: relative;
    transition: var(--transition-normal);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.video-preview-card:hover { transform: scale(1.01); border-color: var(--gold); }

.video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
}
.video-preview-card:hover .video-overlay { background: rgba(0,0,0,0.2); }

.play-btn-lg {
    font-size: 4rem;
    color: #fff;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
    transition: var(--transition-normal);
}
.video-preview-card:hover .play-btn-lg { color: var(--gold); transform: scale(1.1); }

.img-zoom {
    width: 100%;
    cursor: zoom-in;
    transition: var(--transition-normal);
    border-radius: 10px;
    margin-top: 20px;
}

/* ===================== 15. MODALS ===================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(8px);
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
}
.modal-overlay.open { display: flex; animation: fadeIn 0.3s ease; }

.modal-box {
    background: var(--primary);
    width: 1100px;
    max-width: 95vw;
    height: 85vh;
    border-radius: 20px;
    border: 1px solid var(--gold);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(0,0,0,0.8);
}

/* ===================== 16. FORMS ===================== */
.form-group { margin-bottom: 15px; }
.form-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.form-input {
    width: 100%;
    padding: 12px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: white;
    font-family: 'Montserrat';
    transition: var(--transition-normal);
    font-size: 0.9rem;
}
.form-input:focus { border-color: var(--gold); background: rgba(0,0,0,0.6); }
.form-input.error { border-color: var(--accent); animation: shake 0.3s ease; }

select.form-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239CA3B0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

/* ===================== 17. RICH EDITOR ===================== */
.rich-toolbar {
    background: #1e293b;
    padding: 8px;
    border-radius: 8px 8px 0 0;
    border: 1px solid rgba(255,255,255,0.1);
    border-bottom: none;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}
.rich-btn {
    width: 30px;
    height: 30px;
    background: transparent;
    color: #cbd5e1;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rich-btn:hover { background: rgba(255,255,255,0.1); color: white; }

.rich-area-premium {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0 0 8px 8px;
    min-height: 150px;
    padding: 15px;
    outline: none;
    color: #e2e8f0;
    line-height: 1.6;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
}
.rich-area-premium:focus {
    border-color: var(--gold);
}

/* ===================== 18. TOAST NOTIFICATIONS ===================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast {
    padding: 15px 25px;
    border-radius: 12px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    animation: toastIn 0.4s ease;
    pointer-events: auto;
    max-width: 400px;
    border: 1px solid rgba(255,255,255,0.1);
}
.toast.success { background: rgba(16, 185, 129, 0.9); }
.toast.error { background: rgba(185, 28, 28, 0.9); }
.toast.info { background: rgba(59, 130, 246, 0.9); }
.toast.warning { background: rgba(245, 158, 11, 0.9); }
.toast.removing { animation: toastOut 0.3s ease forwards; }

/* ===================== 19. CONFIRM DIALOG ===================== */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    z-index: 60000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}
.confirm-box {
    background: var(--primary);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    animation: fadeInUp 0.3s ease;
}
.confirm-box h3 { margin-bottom: 10px; font-size: 1.3rem; }
.confirm-box p { color: var(--text-muted); margin-bottom: 25px; font-size: 0.9rem; line-height: 1.5; }
.confirm-btns { display: flex; gap: 10px; justify-content: center; }

/* ===================== 20. LOADING OVERLAY ===================== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
    z-index: 70000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 15px;
    animation: fadeIn 0.2s ease;
}
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(197,157,95,0.2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.loading-text {
    color: var(--gold);
    font-size: 0.9rem;
    font-weight: 600;
}

/* ===================== 21. EMPTY STATE ===================== */
.empty-state {
    text-align: center;
    padding: 80px 40px;
    color: var(--text-muted);
    animation: fadeInUp 0.5s ease;
}
.empty-state i { font-size: 4rem; color: rgba(197,157,95,0.3); margin-bottom: 20px; display: block; }
.empty-state h3 { color: white; margin-bottom: 10px; font-size: 1.3rem; }
.empty-state p { max-width: 400px; margin: 0 auto; line-height: 1.6; }

/* ===================== 22. VIEW TRANSITIONS ===================== */
.view-enter { animation: fadeInUp 0.4s ease; }

/* ===================== 23. ANIMATIONS ===================== */
@keyframes slideDown { from {opacity:0; transform:translateY(-10px);} to {opacity:1; transform:translateY(0);} }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes shake { 0%,100%{transform:translateX(0)}25%{transform:translateX(-5px)}75%{transform:translateX(5px)} }
@keyframes toastIn { from { opacity:0; transform:translateX(100px); } to { opacity:1; transform:translateX(0); } }
@keyframes toastOut { from { opacity:1; transform:translateX(0); } to { opacity:0; transform:translateX(100px); } }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ===================== 24. DIPLOMA ===================== */
@media print {
    @page { size: landscape; margin: 0; }
    body * { visibility: hidden; }
    #diploma-wrapper, #diploma-wrapper * { visibility: visible; }
    #diploma-wrapper {
        position: fixed; inset: 0; z-index: 99999; background: white;
        width: 100%; height: 100%; display: flex !important; align-items: center; justify-content: center;
    }
}

#diploma-wrapper { display: none; width: 100%; height: 100%; background: #fff; color: #1a1a1a; position: fixed; inset: 0; z-index: 90000; align-items: center; justify-content: center; }

.dip-frame {
    width: min(270mm, 95vw);
    height: auto;
    aspect-ratio: 270/190;
    border: 10px double #0F172A;
    padding: 5px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dip-inner {
    width: 100%; height: 100%; border: 2px solid #C59D5F; display: flex;
    flex-direction: column; align-items: center; justify-content: center;
    background: radial-gradient(circle, #fff 0%, #f7f7f7 100%);
    position: relative; padding: 40px; box-sizing: border-box;
}
.dip-header { text-align: center; margin-bottom: 20px; }
.dip-logo { font-family: 'Cinzel'; font-size: 2rem; color: #0F172A; font-weight: bold; margin-bottom: 10px; }
.dip-title { font-family: 'UnifrakturMaguntia', serif; font-size: 4rem; color: #C59D5F; margin: 0; letter-spacing: 2px; }
.dip-sub { font-family: 'Montserrat'; font-size: 1rem; text-transform: uppercase; letter-spacing: 5px; margin-top: 10px; color: #555; }
.dip-name { font-family: 'Great Vibes', cursive; font-size: 5rem; color: #0F172A; border-bottom: 1px solid #ccc; padding: 0 50px; margin: 30px 0; min-width: 500px; text-align: center; }
.dip-text { font-size: 1.2rem; color: #555; text-align: center; max-width: 800px; line-height: 1.6; font-family: 'Playfair Display', serif; }
.dip-footer { width: 100%; display: flex; justify-content: space-around; margin-top: 50px; align-items: flex-end; }
.dip-sign { text-align: center; border-top: 1px solid #0F172A; padding-top: 10px; width: 200px; font-size: 0.9rem; font-family: 'Montserrat'; }
.dip-seal { width: 120px; height: 120px; border-radius: 50%; border: 3px dashed #C59D5F; display: flex; align-items: center; justify-content: center; color: #C59D5F; font-weight: bold; font-family: 'Cinzel'; transform: rotate(-10deg); opacity: 0.8; font-size: 0.8rem; text-align: center; }

/* ===================== 25. ADMIN UTILS ===================== */
.admin-only { display: none !important; }
body.is-admin .admin-only { display: inline-flex !important; }

/* ===================== 26. USER CARD ===================== */
.user-card {
    background: rgba(255,255,255,0.03);
    padding: 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 30px;
    transition: var(--transition-normal);
}
.user-card:hover { border-color: rgba(197,157,95,0.2); }

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--gold-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #000;
    font-size: 1rem;
    flex-shrink: 0;
}

/* ===================== 27. MOBILE ===================== */
.mobile-menu-btn { display: none; font-size: 1.5rem; color: var(--gold); cursor: pointer; }
.close-menu-btn {
    display: none; position: absolute; top: 20px; right: 20px;
    font-size: 1.5rem; color: white; cursor: pointer; z-index: 1001;
}

.sidebar-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    z-index: 999; animation: fadeIn 0.3s ease;
}
.sidebar-overlay.show { display: block; }

/* ===================== 28. LOGIN ===================== */

/* ── Pantalla completa ───────────────────────────────── */
.login-screen {
    position: fixed; inset: 0; z-index: 9000;
    display: flex; align-items: center; justify-content: center;
    background: #050b17;
    overflow: hidden;
}

/* ── Fondo: gradiente ambiental + orbs ───────────────── */
.login-screen::before {
    content: '';
    position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(ellipse at 20% 10%, rgba(30,60,110,0.35) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 85%, rgba(197,157,95,0.07) 0%, transparent 50%);
}
.login-bg-decoration { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.login-orb {
    position: absolute; border-radius: 50%;
    background: radial-gradient(circle, rgba(197,157,95,0.08) 0%, transparent 70%);
    animation: orbFloat 9s ease-in-out infinite;
}
.login-orb-1 { width: 600px; height: 600px; top: -200px; left: -150px; animation-delay: 0s; }
.login-orb-2 { width: 400px; height: 400px; bottom: -120px; right: -100px; animation-delay: -4s; }
.login-orb-3 { width: 250px; height: 250px; top: 35%; right: 15%; animation-delay: -6s; opacity: 0.4; }
@keyframes orbFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50%       { transform: translateY(-24px) scale(1.04); }
}

/* ── Caja central: mobile-first ──────────────────────── */
.login-box {
    position: relative; z-index: 1;
    width: 100%;
    max-width: 420px;
    margin: 0 16px;
    background: rgba(7, 13, 28, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(197,157,95,0.22);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(197,157,95,0.04) inset;
    animation: loginAppear 0.5s cubic-bezier(.4,0,.2,1) both;
}
@keyframes loginAppear {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Header del login (logo + marca) ─────────────────── */
.login-header {
    padding: 36px 32px 28px;
    text-align: center;
    border-bottom: 1px solid rgba(197,157,95,0.1);
    background: linear-gradient(180deg, rgba(197,157,95,0.04) 0%, transparent 100%);
    position: relative;
}
.login-header::before {
    content: '';
    position: absolute;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 80px; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(197,157,95,0.6), transparent);
    border-radius: 0 0 4px 4px;
}

/* ── Logo ring ───────────────────────────────────────── */
.login-logo-wrap { display: flex; justify-content: center; margin-bottom: 18px; }
.login-logo-ring {
    width: 72px; height: 72px;
    background: rgba(197,157,95,0.05);
    border: 1px solid rgba(197,157,95,0.2);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.login-logo-ring::after {
    content: '';
    position: absolute; inset: -5px;
    border-radius: 50%;
    border: 1px solid rgba(197,157,95,0.07);
    animation: logoPulse 3.5s ease-in-out infinite;
}
@keyframes logoPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.08); opacity: 0; }
}

/* ── Marca tipográfica ───────────────────────────────── */
.login-brand {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    margin-bottom: 4px;
}
.login-brand-popper {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 4px;
    line-height: 1;
    background: linear-gradient(135deg, #F5D282 0%, #C59D5F 30%, #FFE5A0 55%, #B8862A 75%, #F0C060 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(245,210,130,0.5));
}
.login-brand-academy {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 4px;
    line-height: 1;
    background: linear-gradient(135deg, #F5D282 0%, #C59D5F 30%, #FFE5A0 55%, #B8862A 75%, #F0C060 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(245,210,130,0.5));
}
.login-subtitle {
    font-size: 0.62rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.2);
    margin-top: 10px;
}
.login-divider {
    width: 48px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 16px auto;
}

/* ── Cuerpo del formulario ───────────────────────────── */
.login-body {
    padding: 28px 32px 32px;
}

/* ── Indicador de paso ───────────────────────────────── */
.login-step-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
}
.login-step-label {
    font-size: 0.6rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(197,157,95,0.5);
    font-weight: 500;
}
.login-step-dots {
    display: flex;
    gap: 5px;
    margin-left: auto;
}
.login-step-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}
.login-step-dot.active {
    background: #C59D5F;
    width: 16px;
    border-radius: 3px;
}

/* ── Título del paso ─────────────────────────────────── */
.login-step-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
    line-height: 1.25;
}
.login-step-desc {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
    margin-bottom: 24px;
    line-height: 1.6;
}

/* ── Campos ──────────────────────────────────────────── */
.login-form-group { text-align: left; margin-bottom: 14px; }
.login-label {
    display: block;
    font-size: 0.6rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(197,157,95,0.6);
    margin-bottom: 8px;
    font-weight: 500;
}
.login-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(197,157,95,0.18);
    border-radius: 12px;
    color: #f0f4ff;
    font-size: 0.9rem;
    font-family: 'Montserrat', sans-serif;
    transition: border-color .2s, box-shadow .2s, background .2s;
    box-sizing: border-box;
    outline: none;
    -webkit-appearance: none;
}
.login-input::placeholder { color: rgba(255,255,255,0.18); }
.login-input:focus {
    border-color: rgba(197,157,95,0.5);
    background: rgba(255,255,255,0.06);
    box-shadow: 0 0 0 3px rgba(197,157,95,0.08);
}
.login-input.error {
    border-color: rgba(239,68,68,0.5);
    box-shadow: 0 0 0 3px rgba(239,68,68,0.06);
    animation: shake 0.3s ease;
}

/* ── Botón principal ─────────────────────────────────── */
.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #C59D5F 0%, #A07840 100%);
    border: none;
    border-radius: 12px;
    color: #07101f;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
    margin-top: 6px;
    transition: opacity .2s, transform .1s, box-shadow .2s;
    box-shadow: 0 6px 24px rgba(197,157,95,0.25);
    -webkit-appearance: none;
}
.login-btn:hover   { opacity: 0.9; box-shadow: 0 8px 28px rgba(197,157,95,0.35); }
.login-btn:active  { transform: scale(0.98); opacity: 1; }
.login-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ── Errores y éxito ─────────────────────────────────── */
.login-error {
    color: #f87171;
    font-size: 0.75rem;
    min-height: 18px;
    margin-bottom: 10px;
    text-align: left;
    line-height: 1.5;
}
.login-success {
    color: #34d399;
    font-size: 0.75rem;
    margin-bottom: 10px;
    padding: 10px 14px;
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 8px;
    line-height: 1.5;
}

/* ── Badge del usuario (paso 2) ──────────────────────── */
.login-user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(197,157,95,0.05);
    border: 1px solid rgba(197,157,95,0.15);
    border-radius: 10px;
    padding: 11px 14px;
    margin-bottom: 20px;
    font-size: 0.8rem;
    color: rgba(197,157,95,0.85);
}
.login-user-badge i { font-size: 1rem; color: #C59D5F; }
.login-user-badge span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.login-user-badge button {
    background: none; border: none;
    color: rgba(255,255,255,0.25);
    cursor: pointer; padding: 2px 4px;
    font-size: 0.8rem;
    transition: color .15s;
    border-radius: 4px;
}
.login-user-badge button:hover { color: rgba(255,255,255,0.6); }

/* ── Info box (primer acceso / reset) ────────────────── */
.login-info-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(197,157,95,0.05);
    border: 1px solid rgba(197,157,95,0.15);
    border-left: 2px solid rgba(197,157,95,0.5);
    border-radius: 0 10px 10px 0;
    padding: 12px 14px;
    margin-bottom: 20px;
    color: rgba(197,157,95,0.8);
    font-size: 0.76rem;
    line-height: 1.6;
}
.login-info-box i { flex-shrink: 0; margin-top: 1px; font-size: 0.9rem; }
.login-info-box p { margin: 0; }

/* ── Links y botones secundarios ─────────────────────── */
.login-link-btn {
    background: none; border: none;
    color: rgba(197,157,95,0.5);
    cursor: pointer;
    font-size: 0.73rem;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.3px;
    transition: color .15s;
    padding: 4px 6px;
    border-radius: 6px;
}
.login-link-btn:hover { color: #C59D5F; background: rgba(197,157,95,0.06); }

.login-back-btn {
    background: none; border: none;
    color: rgba(255,255,255,0.25);
    cursor: pointer;
    font-size: 0.72rem;
    font-family: 'Montserrat', sans-serif;
    display: flex; align-items: center; gap: 6px;
    padding: 4px 0; margin-bottom: 18px;
    transition: color .15s;
}
.login-back-btn:hover { color: rgba(255,255,255,0.6); }

/* ── Footer ──────────────────────────────────────────── */
.login-footer {
    font-size: 0.58rem;
    color: rgba(255,255,255,0.1);
    text-align: center;
    margin-top: 20px;
    letter-spacing: 1px;
    padding-top: 16px;
    border-top: 1px solid rgba(197,157,95,0.06);
}

/* ── Transición entre pasos ──────────────────────────── */
#loginStep1, #loginStep2, #loginStep3, #loginStep4, #loginStep5 {
    animation: stepIn 0.28s cubic-bezier(.4,0,.2,1) both;
}
@keyframes stepIn {
    from { opacity: 0; transform: translateX(12px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Mobile específico ───────────────────────────────── */
@media (max-width: 480px) {
    .login-box {
        margin: 0 12px;
        border-radius: 20px;
    }
    .login-header { padding: 28px 24px 22px; }
    .login-brand-popper { font-size: 1.2rem; letter-spacing: 3px; }
    .login-brand-academy { font-size: 1.2rem; letter-spacing: 3px; }
    .login-body { padding: 22px 24px 28px; }
    .login-input { padding: 14px 15px; font-size: 16px; }
    .login-btn { padding: 16px; font-size: 0.78rem; }
    .login-step-title { font-size: 1.2rem; }
}

/* ── Pantallas muy pequeñas ──────────────────────────── */
@media (max-height: 650px) {
    .login-header { padding: 20px 24px 16px; }
    .login-logo-ring { width: 56px; height: 56px; }
    .login-brand-popper { font-size: 1.3rem; }
    .login-body { padding: 18px 24px 22px; }
}


/* ===================== 29. RESPONSIVE ===================== */
@media (max-width: 768px) {
    .sidebar {
        position: fixed; left: -300px; top: 0; height: 100vh; z-index: 1000;
        transition: 0.3s ease; box-shadow: 5px 0 15px rgba(0,0,0,0.5);
    }
    .sidebar.show { left: 0; }
    .close-menu-btn { display: block; }
    .mobile-menu-btn { display: block; }

    /* ===== TOP BAR MOBILE ===== */
    .top-bar {
        padding: 0 12px;
        height: 56px;
        gap: 8px;
    }

    /* Breadcrumbs en mobile */
    #breadcrumbs {
        font-size: 0.7rem;
        max-width: 45%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Search bar en mobile */
    .search-bar {
        max-width: 120px;
        padding: 6px 12px;
        min-width: 0;
    }
    .search-bar input {
        font-size: 0.75rem;
    }
    .search-bar input::placeholder {
        font-size: 0.7rem;
    }

    /* Botones del top-bar en mobile */
    .top-bar .btn-action-main,
    .top-bar .btn-login-sec {
        padding: 6px 10px;
        font-size: 0.7rem;
        white-space: nowrap;
    }

    /* Botón cerrar sesión - solo mostrar icono en mobile */
    .top-bar .btn-login-sec span.btn-text-mobile {
        display: none;
    }

    /* ===== CONTENIDO MOBILE ===== */
    .content-scroll {
        padding: 15px;
        padding-bottom: 30px;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* ===== CARDS MOBILE ===== */
    .card {
        height: auto;
        min-height: 280px;
    }
    .card-img {
        height: 140px;
    }

    /* ===== HERO MOBILE ===== */
    .hero-banner {
        height: 200px;
        margin-bottom: 20px;
        border-radius: 12px;
    }
    .hero-content {
        padding: 20px;
    }
    .hero-content h1 {
        font-size: 1.4rem !important;
    }
    .hero-content p {
        font-size: 0.85rem !important;
    }

    /* ===== TÍTULOS MOBILE ===== */
    h1 { font-size: 1.4rem !important; }
    h2 { font-size: 1.2rem !important; }

    /* ===== BOTONES GENERALES MOBILE ===== */
    .btn-action-main {
        padding: 10px 18px;
        font-size: 0.8rem;
        width: 100%;
        justify-content: center;
    }
    .btn-action-secondary {
        padding: 8px 14px;
        font-size: 0.75rem;
    }
    .btn-login-sec {
        padding: 8px 12px;
        font-size: 0.75rem;
    }

    /* ===== BLOQUES DE CURSO MOBILE ===== */
    .block-container {
        max-width: 100%;
    }
    .block-header {
        padding: 15px;
    }
    .block-title {
        font-size: 1rem;
        gap: 10px;
    }
    .block-body {
        padding: 15px;
    }
    .block-text {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    /* ===== VIDEO MOBILE ===== */
    .video-preview-card {
        margin-top: 10px;
    }
    .play-btn-lg {
        font-size: 2.5rem;
    }

    /* ===== EXAMEN MOBILE ===== */
    .exam-option {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    .tf-option span {
        padding: 12px 15px;
        font-size: 0.85rem;
    }
    #examForm {
        padding-bottom: 100px;
    }

    /* ===== BOTÓN ENVIAR EXAMEN MOBILE ===== */
    div[style*="text-align:center"] .btn-action-main,
    button[onclick*="submitExam"] {
        position: relative;
        margin-top: 20px;
        margin-bottom: 30px;
    }

    /* ===== MODALES MOBILE ===== */
    .modal-box {
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    /* ===== DIPLOMA MOBILE ===== */
    .dip-name { font-size: 2.5rem; min-width: auto; padding: 0 15px; }
    .dip-title { font-size: 2rem; }
    .dip-text { font-size: 0.9rem; }
    .dip-footer { flex-direction: column; gap: 20px; align-items: center; }
    .dip-seal { width: 80px; height: 80px; font-size: 0.6rem; }

    /* ===== DASHBOARD MOBILE ===== */
    div[style*="grid-template-columns: repeat(4"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    div[style*="grid-template-columns: repeat(2"] {
        grid-template-columns: 1fr !important;
    }
    div[style*="display:flex"][style*="justify-content:space-between"] {
        flex-wrap: wrap;
        gap: 10px;
    }

    /* ===== TOAST MOBILE ===== */
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    .toast {
        max-width: 100%;
        font-size: 0.8rem;
        padding: 10px 15px;
    }

    /* ===== ADMIN BUTTONS MOBILE ===== */
    body.is-admin .card .admin-btns {
        display: flex;
        top: 10px;
        right: 10px;
    }
    .admin-btn {
        width: 30px;
        height: 30px;
    }

    /* ===== USER CARD MOBILE ===== */
    .user-card {
        padding: 12px;
        gap: 10px;
        margin-bottom: 15px;
    }

    /* ===== LOGIN MOBILE ===== */
    .login-box {
        padding: 30px 20px;
        width: 95vw;
   }

    .logout-text {
        display: none;
    }
}

/* ===== EXTRA SMALL (iPhone SE, etc) ===== */
@media (max-width: 380px) {
    .top-bar {
        padding: 0 8px;
        height: 50px;
    }
    #breadcrumbs {
        font-size: 0.6rem;
        max-width: 35%;
    }
    .search-bar {
        max-width: 90px;
        padding: 5px 10px;
    }
    .content-scroll {
        padding: 10px;
    }
    h1 { font-size: 1.2rem !important; }
    .hero-banner { height: 160px; }
}

/* ===================== 30. EDITOR COMPONENTS ===================== */
.icon-grid {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
    max-height: 220px; overflow-y: auto; padding-right: 5px; margin-top: 5px;
}
.icon-option {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px; padding: 12px 5px; text-align: center; cursor: pointer;
    transition: 0.2s; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.icon-option:hover { background: rgba(255,255,255,0.1); }
.icon-option.selected {
    background: var(--gold); color: #000; border-color: var(--gold);
    box-shadow: 0 0 15px rgba(197,157,95,0.4);
}
.icon-option i { font-size: 1.1rem; }
.icon-option span { font-size: 0.55rem; text-transform: uppercase; font-weight: 600; }

.editor-block-item {
    background: rgba(30, 41, 59, 0.6); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px; padding: 15px 20px; display: flex;
    justify-content: space-between; align-items: center; transition: 0.2s;
}
.editor-block-item:hover { border-color: rgba(255,255,255,0.3); background: rgba(30, 41, 59, 0.9); }

.block-order-btns {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-right: 12px;
}
.block-order-btns i {
    cursor: pointer;
    padding: 3px;
    font-size: 0.7rem;
    color: var(--gold);
    transition: 0.2s;
}
.block-order-btns i:hover { color: white; }
.block-order-btns i.disabled { color: #333; cursor: default; }

/* ===================== 31. PREMIUM MODAL ===================== */
.premium-modal {
    background: linear-gradient(165deg, #0f172a 0%, #1e293b 100%) !important;
    border: 1px solid rgba(197, 157, 95, 0.4) !important;
    box-shadow: 0 0 80px rgba(0,0,0,0.8) !important;
    padding: 0 !important; border-radius: 16px !important; overflow: hidden;
}
.modal-header-custom {
    padding: 20px 30px; background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex; justify-content: space-between; align-items: center;
}
.editor-tabs-wrapper {
    background: #0b1120; padding: 15px; display: flex; justify-content: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.editor-tabs {
    background: rgba(255,255,255,0.05); padding: 5px; border-radius: 50px; display: flex; gap: 5px;
}
.editor-tab {
    padding: 8px 25px; border-radius: 40px; color: #94a3b8; cursor: pointer;
    font-size: 0.85rem; font-weight: 600; text-transform: uppercase; transition: 0.3s;
}
.editor-tab.active {
    background: var(--gold); color: #000; box-shadow: 0 4px 15px rgba(197,157,95,0.3);
}

/* ===================== 32. QUESTION CARDS ===================== */
.question-card {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
    border-left: 3px solid var(--gold); padding: 15px; border-radius: 6px; margin-bottom: 10px;
    display: flex; justify-content: space-between; align-items: center; transition: all 0.2s;
}
.question-card:hover { background: rgba(255,255,255,0.06); transform: translateX(5px); }
.question-type {
    font-size: 0.65rem; background: rgba(16,185,129,0.15); color:#34d399;
    padding:3px 8px; border-radius:4px; margin-right:10px; border:1px solid rgba(16,185,129,0.2);
}
/* ===================== FIX: Exam options ===================== */
.exam-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}
.exam-option:hover {
    border-color: var(--gold);
    background: rgba(255,255,255,0.06);
}

/* ===================== FIX: Block chevron rotation ===================== */
.block-chevron {
    color: var(--text-muted);
    transition: transform 0.3s ease;
}
.course-block.open .block-chevron {
    transform: rotate(180deg);
}

/* ===================== FIX: Admin buttons always visible on course view ===================== */
.admin-btns {
    display: none;
    gap: 10px;
}
body.is-admin .card:hover .admin-btns {
    display: flex;
}

/* ===================== FIX: Block body images ===================== */
.block-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

/* ===================== FIX: Block body videos ===================== */
.block-body .video-preview-card {
    margin-top: 15px;
    margin-bottom: 15px;
}

/* ===================== FIX: Rich editor empty state ===================== */
.rich-area-premium:empty::before {
    content: 'Escribí el contenido del bloque aquí...';
    color: var(--text-muted);
    font-style: italic;
}

/* ========== PREGUNTAS MEJORADAS ========== */

/* Opciones Verdadero/Falso */
.tf-option {
    display: flex;
    margin-bottom: 10px;
    cursor: pointer;
}
.tf-option input[type="radio"] {
    display: none;
}
.tf-option span {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    transition: all 0.2s ease;
}
.tf-option span i {
    margin-right: 8px;
}
.tf-option:hover span {
    border-color: var(--gold);
}
.tf-option input:checked + span {
    background-color: var(--gold);
    color: var(--primary-dark);
    border-color: var(--gold);
}

/* Caja de justificación */
.justification {
    margin-top: 20px;
    padding: 15px;
    border-left: 4px solid var(--text-muted);
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 0 8px 8px 0;
}
.justification p {
    margin: 5px 0 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Respuestas correctas/incorrectas */
.exam-options label.correct-answer {
    color: var(--accent-success);
    font-weight: 700;
}
.exam-options label.wrong-answer {
    color: var(--accent);
    text-decoration: line-through;
}

/* ========== GAMIFICACIÓN ========== */
@keyframes scaleIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========== EXAMEN RESPONSIVE MOBILE ========== */
@media (max-width: 768px) {
    .exam-question h4 {
        font-size: 0.95rem;
    }
    .exam-options label {
        padding: 10px !important;
        font-size: 0.9rem;
    }
    .tf-option span {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    #examForm {
        padding-bottom: 80px;
    }
}

/* =====================================================
   NOTIFICACIONES ADMIN — Mejoras UI
   ===================================================== */

/* Placeholders más visibles en todo el formulario */
#notif-form input::placeholder,
#notif-form textarea::placeholder {
    color: #A0A8B8 !important;
    opacity: 1 !important;
}

/* Multiselect — opciones seleccionadas en dorado */
#notif-target-detail-select option:checked {
    background: linear-gradient(0deg, #C59D5F 0%, #e6bc5a 100%);
    color: #0F172A;
    font-weight: 600;
}

#notif-target-detail-select option {
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 2px;
}

/* Focus dorado en inputs del formulario */
#notif-form input:focus,
#notif-form select:focus,
#notif-form textarea:focus {
    outline: none;
    border-color: #C59D5F !important;
    box-shadow: 0 0 0 3px rgba(197, 157, 95, 0.3);
}

/* =====================================================
   FIX FINAL NOTIFICACIONES — v4 Definitivo
   ===================================================== */

/* Card y contenedor no se cortan */
#notif-form,
#view-container .card,
.card {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
}

#view-container {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    max-height: none !important;
}

/* Textarea mensaje alto y visible */
#notif-message {
    min-height: 150px !important;
    height: 150px !important;
    display: block !important;
    resize: vertical !important;
    line-height: 1.6 !important;
    font-family: inherit !important;
    padding: 12px !important;
    box-sizing: border-box !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    background: var(--primary-light) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    width: 100% !important;
}

/* Placeholders brillantes */
#notif-title::placeholder,
#notif-message::placeholder {
    color: #C8D0E0 !important;
    opacity: 1 !important;
}

/* Botón dorado enviar */
#notif-form button[type="submit"] {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    margin-top: 24px !important;
    margin-bottom: 10px !important;
    padding: 14px 32px !important;
    background: linear-gradient(135deg, #C59D5F, #e6bc5a) !important;
    color: #0F172A !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    letter-spacing: 0.5px !important;
    font-family: inherit !important;
}

#notif-form button[type="submit"]:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 24px rgba(197, 157, 95, 0.4) !important;
}

/* Focus dorado */
#notif-form input:focus,
#notif-form select:focus,
#notif-form textarea:focus {
    outline: none;
    border-color: #C59D5F !important;
    box-shadow: 0 0 0 3px rgba(197, 157, 95, 0.3);
}

/* Multiselect dorado */
#notif-target-detail-select option:checked {
    background: linear-gradient(0deg, #C59D5F 0%, #e6bc5a 100%);
    color: #0F172A;
    font-weight: 600;
}

/* Autocomplete buscador Naaloo */
.notif-autocomplete-wrapper {
    position: relative;
    width: 100%;
}

.notif-autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: #1E2538;
    border: 1px solid rgba(255,255,255,0.15);
    border-top: none;
    border-radius: 0 0 8px 8px;
    z-index: 999;
    display: none;
}

.notif-autocomplete-list.active {
    display: block;
}

.notif-autocomplete-item {
    padding: 10px 14px;
    color: #E0E0E0;
    cursor: pointer;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.15s ease;
}

.notif-autocomplete-item:hover {
    background: rgba(197, 157, 95, 0.15);
    color: #ffffff;
}

.notif-autocomplete-item .emp-name {
    font-weight: 600;
    color: #ffffff;
}

.notif-autocomplete-item .emp-detail {
    font-size: 0.78rem;
    color: #9CA3AF;
    margin-top: 2px;
}

.notif-selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.notif-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(197, 157, 95, 0.2);
    border: 1px solid rgba(197, 157, 95, 0.4);
    border-radius: 20px;
    color: #e6bc5a;
    font-size: 0.78rem;
    font-weight: 500;
}

.notif-tag-remove {
    cursor: pointer;
    font-size: 0.85rem;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.notif-tag-remove:hover {
    opacity: 1;
}

/* line-clamp compatibilidad */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 2;
}
/* ══════════════════════════════════════
   COMPANIES STRIP — Grupo Popper
══════════════════════════════════════ */
.logo-ticker {
    width: 100%;
    background: linear-gradient(180deg,
        rgba(212,175,55,0.07) 0%,
        rgba(212,175,55,0.02) 60%,
        rgba(0,0,0,0) 100%);
    border-top:    1px solid rgba(212,175,55,0.3);
    border-bottom: 1px solid rgba(212,175,55,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 54px;
    padding: 0 48px;
    box-sizing: border-box;
}
.logo-ticker-track {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1100px;
}
/* separador decorativo entre nombres */
.logo-ticker-sep {
    color: rgba(212,175,55,0.35);
    font-size: 0.32rem;
    flex-shrink: 0;
    letter-spacing: 0;
    line-height: 1;
    padding: 0 6px;
    display: inline-block;
    vertical-align: middle;
}
.logo-ticker-name {
    font-family: 'Cinzel', 'Georgia', serif;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.24em;
    color: rgba(212,175,55,0.72);
    text-transform: uppercase;
    white-space: nowrap;
    text-align: center;
    transition: color 0.35s ease, text-shadow 0.35s ease, letter-spacing 0.35s ease;
    cursor: default;
    padding: 0 12px;
}
.logo-ticker-name:hover {
    color: rgba(255,215,80,1);
    letter-spacing: 0.30em;
    text-shadow:
        0 0 10px rgba(212,175,55,0.55),
        0 0 24px rgba(212,175,55,0.22);
}


.logo-ticker-track {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1000px;
    gap: 0;
}
.logo-ticker-name {
    font-family: 'Cinzel', 'Georgia', serif;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.25em;
    color: rgba(212,175,55,0.7);
    text-transform: uppercase;
    white-space: nowrap;
    flex: 1;
    text-align: center;
    padding: 6px 8px;
    transition: color 0.35s ease, text-shadow 0.35s ease, letter-spacing 0.35s ease;
    cursor: default;
    position: relative;
}
.logo-ticker-name:hover {
    color: rgba(255,210,80,1);
    letter-spacing: 0.32em;
    text-shadow:
        0 0 12px rgba(212,175,55,0.6),
        0 0 28px rgba(212,175,55,0.25);
}
.logo-ticker-sep {
    color: rgba(212,175,55,0.3);
    font-size: 0.38rem;
    flex-shrink: 0;
    padding: 0 2px;
    letter-spacing: 0;
    position: relative;
    top: -1px;
}



/* =====================================================
   POPPER ACADEMY v9.5 — Premium UI Refresh
   Mismo nivel visual que el login en toda la app
   ===================================================== */

/* ─── SIDEBAR refinado ─────────────────────────────── */
.sidebar {
    background: rgba(2, 6, 23, 0.97) !important;
    border-right: 1px solid rgba(197,157,95,0.15) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.brand {
    font-family: 'Cinzel', serif !important;
    letter-spacing: 3px !important;
    font-size: 1.4rem !important;
    background: linear-gradient(135deg, #fff 30%, #C59D5F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 36px !important;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(197,157,95,0.15);
}
.brand span {
    opacity: 1 !important;
}

.nav-item {
    border-radius: 10px !important;
    font-size: 0.82rem !important;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    border-left: 2px solid transparent !important;
    transition: all 0.2s ease !important;
}
.nav-item:hover, .nav-item.active {
    background: rgba(197,157,95,0.08) !important;
    color: #C59D5F !important;
    border-left-color: #C59D5F !important;
    padding-left: 22px;
}

/* ─── TOP BAR refinada ─────────────────────────────── */
.top-bar {
    background: rgba(2, 6, 23, 0.92) !important;
    border-bottom: 1px solid rgba(197,157,95,0.12) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    height: 64px !important;
}

/* ─── MAIN CONTENT fondo ───────────────────────────── */
.main-content {
    background: radial-gradient(ellipse at 70% 10%, #1a2744 0%, #020617 60%) !important;
}

/* ─── CARDS premium ────────────────────────────────── */
.card {
    background: rgba(15, 23, 42, 0.85) !important;
    border: 1px solid rgba(197,157,95,0.12) !important;
    border-radius: 18px !important;
    backdrop-filter: blur(8px);
    transition: transform 0.35s cubic-bezier(.4,0,.2,1), border-color 0.25s ease, box-shadow 0.35s ease !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.35) !important;
}
.card:hover {
    transform: translateY(-6px) !important;
    border-color: rgba(197,157,95,0.45) !important;
    box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(197,157,95,0.15) !important;
}

.card-img-fallback {
    background: linear-gradient(135deg, rgba(30,41,59,0.9), rgba(15,23,42,0.95)) !important;
}
.card-img-fallback i {
    color: rgba(197,157,95,0.2) !important;
    font-size: 2.8rem !important;
}

/* ─── SEARCH BAR refinada ──────────────────────────── */
.search-bar {
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid rgba(197,157,95,0.18) !important;
    border-radius: 50px !important;
    transition: all 0.2s ease !important;
}
.search-bar:focus-within {
    border-color: rgba(197,157,95,0.5) !important;
    background: rgba(255,255,255,0.06) !important;
    box-shadow: 0 0 0 3px rgba(197,157,95,0.07);
}

/* ─── BOTONES principales ──────────────────────────── */
.btn-action-main {
    border-radius: 10px !important;
    font-size: 0.82rem !important;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 14px rgba(197,157,95,0.25) !important;
    transition: opacity 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease !important;
}
.btn-action-main:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(197,157,95,0.4) !important;
    opacity: 0.93;
}
.btn-action-main:active { transform: scale(0.98) !important; }

.btn-login-sec {
    border-radius: 10px !important;
    font-size: 0.82rem !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    transition: all 0.2s ease !important;
}
.btn-login-sec:hover {
    border-color: rgba(197,157,95,0.5) !important;
    color: #C59D5F !important;
    background: rgba(197,157,95,0.06) !important;
}

/* ─── COURSE BLOCKS refinados ──────────────────────── */
.course-block {
    background: rgba(15, 23, 42, 0.7) !important;
    border: 1px solid rgba(255,255,255,0.07) !important;
    border-radius: 14px !important;
    backdrop-filter: blur(8px);
    transition: border-color 0.25s ease !important;
}
.course-block:hover {
    border-color: rgba(197,157,95,0.25) !important;
}
.course-block.completed {
    border-color: rgba(16,185,129,0.4) !important;
    box-shadow: 0 0 0 1px rgba(16,185,129,0.1) inset;
}

.block-header {
    background: rgba(255,255,255,0.02) !important;
    padding: 18px 22px !important;
}
.block-header:hover { background: rgba(255,255,255,0.04) !important; }

.block-body {
    background: rgba(10, 15, 30, 0.6) !important;
    border-top: 1px solid rgba(197,157,95,0.08) !important;
    padding: 28px !important;
}

.status-icon {
    border-radius: 50% !important;
    border: 1px solid rgba(255,255,255,0.1);
}
.completed .status-icon {
    background: linear-gradient(135deg, #10B981, #34d399) !important;
    border-color: transparent !important;
    box-shadow: 0 0 10px rgba(16,185,129,0.3);
}

/* ─── HERO BANNER refinado ─────────────────────────── */
.hero-banner {
    border: 1px solid rgba(197,157,95,0.2) !important;
    border-radius: 18px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* ─── MODALS refinados ─────────────────────────────── */
.modal-overlay {
    background: rgba(0,0,0,0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}
.modal-box {
    background: rgba(10, 15, 30, 0.97) !important;
    border: 1px solid rgba(197,157,95,0.3) !important;
    border-radius: 20px !important;
    box-shadow: 0 0 80px rgba(0,0,0,0.8), 0 0 0 1px rgba(197,157,95,0.05) inset !important;
}

/* ─── FORMS refinados ──────────────────────────────── */
.form-input {
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 10px !important;
    transition: all 0.2s ease !important;
}
.form-input:focus {
    border-color: rgba(197,157,95,0.5) !important;
    background: rgba(255,255,255,0.06) !important;
    box-shadow: 0 0 0 3px rgba(197,157,95,0.07) !important;
}

/* ─── TOAST refinado ───────────────────────────────── */
.toast {
    border-radius: 12px !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4) !important;
    font-size: 0.85rem !important;
}

/* ─── SCROLLBAR dorada más refinada ────────────────── */
::-webkit-scrollbar { width: 5px !important; }
::-webkit-scrollbar-track { background: transparent !important; }
::-webkit-scrollbar-thumb {
    background: rgba(197,157,95,0.2) !important;
    border-radius: 10px !important;
}
::-webkit-scrollbar-thumb:hover { background: rgba(197,157,95,0.45) !important; }

/* ─── PROGRESS BAR más fina ────────────────────────── */
.progress-bar-container {
    height: 3px !important;
    background: rgba(255,255,255,0.06) !important;
    border-radius: 10px !important;
}
.progress-bar-fill {
    border-radius: 10px !important;
}

/* ─── DIPLOMA refinado ─────────────────────────────── */
.dip-frame {
    background: linear-gradient(135deg, #0a0f1e, #111827) !important;
    border: 1px solid rgba(197,157,95,0.4) !important;
    box-shadow: 0 0 60px rgba(197,157,95,0.08), 0 24px 48px rgba(0,0,0,0.6) !important;
}

/* ─── USER CARD refinada ───────────────────────────── */
.user-card-header {
    border-bottom: 1px solid rgba(197,157,95,0.12) !important;
}

/* ─── ADMIN BTNS en cards ──────────────────────────── */
.admin-btn {
    border-radius: 10px !important;
    width: 32px !important;
    height: 32px !important;
    backdrop-filter: blur(12px) !important;
}
.edit-btn {
    border: 1px solid rgba(197,157,95,0.4) !important;
    color: #C59D5F !important;
    background: rgba(2,6,23,0.85) !important;
}
.edit-btn:hover {
    background: rgba(197,157,95,0.9) !important;
    color: #020617 !important;
}

/* ─── BREADCRUMBS ──────────────────────────────────── */
#breadcrumbs {
    font-size: 0.78rem !important;
    letter-spacing: 0.3px;
}
#breadcrumbs span.active { color: #C59D5F !important; }

/* ─── CONTENT SCROLL padding refinado ─────────────── */
.content-scroll {
    padding: 32px 36px !important;
}

/* ─── Separador sutil en sidebar nav ───────────────── */
.nav-item.admin-only:first-of-type {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(197,157,95,0.1);
}

/* ─── Animación fadeInUp más suave ─────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* =====================================================
   POPPER ACADEMY v9.5 — Premium Experience Layer
   ===================================================== */

/* ─── Fondo de app con textura sutil ─────────────────── */
.app-shell::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(197,157,95,0.025) 0%, transparent 45%),
        radial-gradient(circle at 85% 20%, rgba(30,60,110,0.15) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

/* ─── Sidebar: logo ring + user card ────────────────── */
.sidebar .brand {
    position: relative;
}
.sidebar .brand::before {
    content: '';
    display: block;
    width: 36px;
    height: 36px;
    margin: 0 auto 10px;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='40' cy='40' r='38' fill='none' stroke='%23C59D5F' stroke-width='1' opacity='0.4'/%3E%3Cpolygon points='40,16 60,52 20,52' fill='none' stroke='%23C59D5F' stroke-width='1.8' stroke-linejoin='round'/%3E%3Cpolygon points='28,52 40,34 52,52' fill='%23C59D5F' opacity='0.18'/%3E%3Ccircle cx='54' cy='23' r='1.8' fill='%23C59D5F' opacity='0.7'/%3E%3C/svg%3E") center/contain no-repeat;
    opacity: 0.9;
}

.user-card {
    background: rgba(197,157,95,0.05) !important;
    border: 1px solid rgba(197,157,95,0.12) !important;
    border-radius: var(--radius-lg) !important;
    padding: 14px !important;
    margin-bottom: 10px !important;
    transition: background var(--transition-fast) !important;
}
.user-card:hover {
    background: rgba(197,157,95,0.08) !important;
}
.user-avatar {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    border: 1.5px solid rgba(197,157,95,0.3) !important;
    font-size: 0.85rem !important;
    flex-shrink: 0 !important;
}

/* ─── Sidebar nav separador admin ───────────────────── */
#navDashboard {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(197,157,95,0.08);
}

/* ─── Top bar: notif bell ───────────────────────────── */
#notif-bell-container i {
    font-size: 1rem !important;
    transition: color var(--transition-fast) !important;
}
#notif-bell-container:hover i { color: var(--gold) !important; }

#notif-badge {
    font-size: 9px !important;
    min-width: 14px !important;
    height: 14px !important;
    border: 1.5px solid var(--bg-body) !important;
}

/* ─── Notif panel ───────────────────────────────────── */
#notif-panel {
    background: linear-gradient(160deg, #0d1628, #080e1d) !important;
    border: 1px solid rgba(197,157,95,0.22) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6) !important;
    top: 68px !important;
}
#notif-panel > div:first-child {
    background: linear-gradient(135deg, rgba(197,157,95,0.15), rgba(197,157,95,0.05)) !important;
    border-bottom: 1px solid rgba(197,157,95,0.15) !important;
}

/* ─── Logo ticker ───────────────────────────────────── */
.logo-ticker {
    border-bottom: 1px solid rgba(197,157,95,0.08) !important;
    background: rgba(5,11,23,0.8) !important;
}

/* ─── Card: stagger animation ───────────────────────── */
.grid .card:nth-child(1) { animation: cardIn 0.4s 0.05s both cubic-bezier(.4,0,.2,1); }
.grid .card:nth-child(2) { animation: cardIn 0.4s 0.10s both cubic-bezier(.4,0,.2,1); }
.grid .card:nth-child(3) { animation: cardIn 0.4s 0.15s both cubic-bezier(.4,0,.2,1); }
.grid .card:nth-child(4) { animation: cardIn 0.4s 0.20s both cubic-bezier(.4,0,.2,1); }
.grid .card:nth-child(5) { animation: cardIn 0.4s 0.25s both cubic-bezier(.4,0,.2,1); }
.grid .card:nth-child(6) { animation: cardIn 0.4s 0.30s both cubic-bezier(.4,0,.2,1); }
@keyframes cardIn {
    from { opacity: 0; transform: translateY(14px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Card: overlay dorado al hover ─────────────────── */
.card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(197,157,95,0.04) 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}
.card:hover::after { opacity: 1; }

/* ─── Card footer separador ─────────────────────────── */
.card-body > div:last-child {
    border-top: 1px solid rgba(197,157,95,0.08) !important;
}

/* ─── Hero banner: título ───────────────────────────── */
.hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem !important;
    text-shadow: 0 2px 20px rgba(0,0,0,0.8);
    letter-spacing: -0.02em;
}
.hero-content p {
    text-shadow: 0 1px 8px rgba(0,0,0,0.6);
    font-size: 0.92rem !important;
}

/* ─── Course view: título sin hero ──────────────────── */
#view-container > div > h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem !important;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 30%, #C59D5F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Bloques: chevron dorado ───────────────────────── */
.block-chevron {
    color: rgba(197,157,95,0.5) !important;
    font-size: 0.8rem !important;
    transition: transform var(--transition-fast), color var(--transition-fast) !important;
}
.course-block.open .block-chevron {
    color: var(--gold) !important;
}

/* ─── Examen final block ─────────────────────────────── */
.course-block[style*="border-color:var(--gold)"],
.course-block[style*="border-color: var(--gold)"] {
    background: linear-gradient(145deg, rgba(197,157,95,0.06), rgba(8,14,29,0.95)) !important;
}

/* ─── Admin buttons en cards ─────────────────────────── */
.admin-btns {
    top: 12px !important;
    right: 12px !important;
    gap: 6px !important;
}
.admin-btn {
    width: 30px !important;
    height: 30px !important;
    border-radius: 8px !important;
    backdrop-filter: blur(12px) !important;
}
.edit-btn {
    background: rgba(8,14,29,0.9) !important;
    border: 1px solid rgba(197,157,95,0.35) !important;
    color: var(--gold) !important;
}
.edit-btn:hover { background: var(--gold) !important; color: #07101f !important; }
.del-btn { background: rgba(185,28,28,0.85) !important; border: 1px solid rgba(255,85,85,0.4) !important; }

/* ─── Modal header ───────────────────────────────────── */
.modal-header-custom {
    padding: 20px 28px !important;
    border-bottom: 1px solid rgba(197,157,95,0.12) !important;
    background: rgba(197,157,95,0.04) !important;
}
.modal-header-custom h3 {
    font-family: 'Playfair Display', serif !important;
    font-size: 1.15rem !important;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, #fff 30%, #C59D5F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Editor tabs ─────────────────────────────────────── */
.editor-tab {
    border-radius: 8px 8px 0 0 !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.5px !important;
    transition: all var(--transition-fast) !important;
}
.editor-tab.active {
    background: rgba(197,157,95,0.12) !important;
    color: var(--gold) !important;
    border-bottom-color: var(--gold) !important;
}

/* ─── Empty state ────────────────────────────────────── */
.empty-state {
    border: 1px solid rgba(197,157,95,0.1) !important;
    border-radius: var(--radius-xl) !important;
    background: linear-gradient(145deg, rgba(15,24,41,0.7), rgba(8,14,29,0.8)) !important;
}
.empty-state i {
    color: rgba(197,157,95,0.2) !important;
}

/* ─── Results table ───────────────────────────────────── */
.results-table, table {
    border-collapse: separate !important;
    border-spacing: 0 4px !important;
}
.results-table th, table th {
    background: rgba(197,157,95,0.06) !important;
    color: var(--gold) !important;
    font-size: 0.7rem !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    padding: 12px 16px !important;
}
.results-table tr, table tbody tr {
    background: rgba(15,24,41,0.6) !important;
    transition: background var(--transition-fast) !important;
}
.results-table tr:hover, table tbody tr:hover {
    background: rgba(197,157,95,0.05) !important;
}

/* ─── Breadcrumbs ─────────────────────────────────────── */
#breadcrumbs {
    font-size: 0.75rem !important;
    color: var(--text-muted) !important;
}
#breadcrumbs span.active { color: var(--gold) !important; font-weight: 600 !important; }
#breadcrumbs i { opacity: 0.25 !important; font-size: 0.6rem !important; }

/* ─── Block body: listas y párrafos ──────────────────── */
.block-text ul, .block-text ol {
    padding-left: 20px !important;
    margin: 10px 0 !important;
}
.block-text li {
    margin-bottom: 6px !important;
    color: #b8cce0 !important;
}
.block-text strong {
    color: var(--gold-light) !important;
    font-weight: 600 !important;
}

/* ─── Exam questions ──────────────────────────────────── */
.exam-question {
    border-radius: var(--radius-lg) !important;
    border: 1px solid rgba(197,157,95,0.1) !important;
    background: linear-gradient(145deg, rgba(15,24,41,0.8), rgba(8,14,29,0.9)) !important;
    transition: border-color var(--transition-fast) !important;
}
.exam-question:hover { border-color: rgba(197,157,95,0.2) !important; }

/* ─── Diploma ─────────────────────────────────────────── */
.dip-frame {
    border: 1px solid rgba(197,157,95,0.35) !important;
    background: linear-gradient(160deg, #0d1628, #080e1d) !important;
    box-shadow: 0 0 80px rgba(197,157,95,0.07), 0 32px 64px rgba(0,0,0,0.7) !important;
}
.dip-logo {
    background: linear-gradient(135deg, #fff 20%, #C59D5F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Loading overlay ─────────────────────────────────── */
.loading-overlay {
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    background: rgba(5,11,23,0.85) !important;
}

/* ─── Confirm dialog ──────────────────────────────────── */
.confirm-box {
    background: linear-gradient(160deg, #0d1628, #080e1d) !important;
    border: 1px solid rgba(197,157,95,0.22) !important;
    border-radius: var(--radius-xl) !important;
    box-shadow: 0 32px 80px rgba(0,0,0,0.7) !important;
}

/* ─── Gamification profile badges ─────────────────────── */
.badge-item {
    border: 1px solid rgba(197,157,95,0.15) !important;
    border-radius: var(--radius-md) !important;
    background: rgba(197,157,95,0.04) !important;
    transition: transform var(--transition-fast), border-color var(--transition-fast) !important;
}
.badge-item:hover {
    transform: translateY(-2px) !important;
    border-color: rgba(197,157,95,0.35) !important;
}

/* ─── Scrollbar ultra fina ────────────────────────────── */
.content-scroll::-webkit-scrollbar { width: 4px; }
.content-scroll::-webkit-scrollbar-thumb { background: rgba(197,157,95,0.15); border-radius: 10px; }
.content-scroll::-webkit-scrollbar-thumb:hover { background: rgba(197,157,95,0.35); }

/* ─── Mobile: sidebar mejorado ────────────────────────── */
@media (max-width: 768px) {
    .sidebar {
        background: rgba(5,11,23,0.98) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
    }
    .content-scroll { padding: 20px 16px !important; }
    .top-bar { padding: 0 16px !important; }
}

/* ─── Micro: selección de texto dorada ────────────────── */
::selection {
    background: rgba(197,157,95,0.25);
    color: #fff;
}


/* ─── Login: pasos adicionales ────────────────────────── */
.login-user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(197,157,95,0.07);
    border: 1px solid rgba(197,157,95,0.2);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.82rem;
    color: var(--gold-light, #D4AF6F);
}
.login-user-badge i { font-size: 1rem; color: var(--gold, #C59D5F); }
.login-user-badge span { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.login-user-badge button {
    background: none; border: none; color: rgba(255,255,255,0.3);
    cursor: pointer; padding: 2px 4px; font-size: 0.8rem;
    transition: color 0.15s;
}
.login-user-badge button:hover { color: rgba(255,255,255,0.7); }

.login-info-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(197,157,95,0.06);
    border: 1px solid rgba(197,157,95,0.15);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 18px;
    color: rgba(197,157,95,0.85);
    font-size: 0.78rem;
    line-height: 1.6;
}
.login-info-box i { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.login-info-box p { margin: 0; }

.login-link-btn {
    background: none; border: none;
    color: rgba(197,157,95,0.65);
    cursor: pointer; font-size: 0.75rem;
    font-family: 'Montserrat', sans-serif;
    transition: color 0.15s; padding: 4px 8px;
    border-radius: 6px;
}
.login-link-btn:hover { color: var(--gold, #C59D5F); background: rgba(197,157,95,0.06); }

.login-back-btn {
    background: none; border: none;
    color: rgba(255,255,255,0.35); cursor: pointer;
    font-size: 0.75rem; font-family: 'Montserrat', sans-serif;
    display: flex; align-items: center; gap: 6px;
    padding: 4px 0; margin-bottom: 16px;
    transition: color 0.15s;
}
.login-back-btn:hover { color: rgba(255,255,255,0.7); }

.login-success {
    color: #34d399; font-size: 0.8rem;
    margin-bottom: 10px; text-align: left;
    padding: 8px 12px;
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 8px;
    line-height: 1.5;
}
