/* =====================================================
   POPPER ACADEMY v9.2 — Estilos Corregidos
   ===================================================== */

/* font-display:swap — evita texto invisible mientras cargan las tipografías */
@font-face { font-family: 'Font Awesome 6 Free'; font-display: swap; }
@font-face { font-family: 'Font Awesome 6 Brands'; font-display: swap; }
@font-face { font-family: 'Montserrat'; font-display: swap; }
@font-face { font-family: 'Playfair Display'; font-display: swap; }
@font-face { font-family: 'Cinzel'; font-display: swap; }

/* ===================== 1. VARIABLES ===================== */
:root {
    --primary: #0F172A;
    --primary-light: #1E293B;
    --gold: #C59D5F;
    --gold-rgb: 197, 157, 95;
    --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);
    /* Safe area para notch/Dynamic Island/home indicator */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    /* Bottom nav height + safe area */
    --bottom-nav-h: 60px;
}

/* ===================== 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;
    min-height: 100dvh; /* iOS Safari: excluye barra de dirección */
    display: flex;
    overscroll-behavior: none; /* evita el bounce y pull-to-refresh accidental */
    flex-direction: column;
    overflow: hidden;
    font-size: 15px;
}

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(var(--gold-rgb),0.3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(var(--gold-rgb),0.6); }

/* ===================== 4. LAYOUT ===================== */
.app-shell { display: flex; height: 100vh; height: 100dvh; 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(var(--gold-rgb),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;
    position: relative;
    overflow: hidden;
}
.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.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(var(--gold-rgb),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;
}
/* Neutralizar colores de fondo/texto que vienen de copiar desde Word/Google Docs */
.block-text [style*="background"],
.block-text [style*="color"],
.block-text font {
    background-color: transparent !important;
    color: inherit !important;
}
/* Preservar estructura tipográfica del rich editor */
.block-text h1, .block-text h2, .block-text h3, .block-text h4 {
    color: #f1f5f9;
    margin: 16px 0 8px;
    line-height: 1.3;
    font-size: revert;
}
.block-text p { margin: 8px 0; }
.block-text ul, .block-text ol { padding-left: 24px; margin: 8px 0; }
.block-text li { margin: 4px 0; }
.block-text strong, .block-text b { color: #f8fafc; font-weight: 700; }
.block-text em { font-style: italic; }
.block-text code {
    font-family: monospace;
    background: rgba(255,255,255,0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}
.block-text a { color: var(--gold); text-decoration: underline; }
.block-text table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.block-text th, .block-text td { padding: 8px 12px; border: 1px solid rgba(255,255,255,0.1); }
.block-text th { background: rgba(255,255,255,0.05); color: #f8fafc; }

/* ===================== 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;
}
/* Opciones del dropdown siempre visibles en tema oscuro */
select.form-input option {
    background: #0d1628;
    color: #e2e8f0;
}

/* ===================== 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(var(--gold-rgb),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(var(--gold-rgb),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} }
@keyframes bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(4px)} }

/* ===================== 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 ===================== */
#diploma-wrapper {
    display: none; position: fixed; inset: 0; z-index: 90000;
    background: rgba(0,0,0,0.85); align-items: center; justify-content: center;
    overflow-y: auto; padding: 20px; box-sizing: border-box;
}
.dip-controls {
    position: fixed; top: 16px; right: 16px; display: flex; gap: 10px; z-index: 90001;
}
.dip-btn-print {
    background: #C59D5F; color: #fff; border: none; border-radius: 8px;
    padding: 10px 18px; font-family: 'Montserrat', sans-serif; font-size: 0.82rem;
    font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 7px;
}
.dip-btn-close {
    background: rgba(255,255,255,0.12); color: #fff; border: none; border-radius: 8px;
    padding: 10px 14px; font-size: 0.9rem; cursor: pointer;
}
.dip-frame {
    width: min(260mm, 96vw);
    background: #fffdf7;
    box-shadow: 0 32px 80px rgba(0,0,0,0.6);
    border-radius: 4px;
    overflow: hidden;
}
.dip-inner {
    margin: 14px; border: 2px solid #C59D5F;
    padding: 44px 56px 36px; box-sizing: border-box;
    position: relative; display: flex; flex-direction: column; align-items: center;
    background: #fffdf7; min-height: 340px;
}
/* Esquinas decorativas */
.dip-corner {
    position: absolute; width: 32px; height: 32px;
    border-color: #C59D5F; border-style: solid;
}
.dip-corner.tl { top: 8px; left: 8px; border-width: 2px 0 0 2px; }
.dip-corner.tr { top: 8px; right: 8px; border-width: 2px 2px 0 0; }
.dip-corner.bl { bottom: 8px; left: 8px; border-width: 0 0 2px 2px; }
.dip-corner.br { bottom: 8px; right: 8px; border-width: 0 2px 2px 0; }

.dip-logo-wrap { text-align: center; margin-bottom: 8px; }
.dip-logo-text {
    display: block; font-family: 'Cinzel', serif; font-size: 1.6rem;
    font-weight: 700; color: #0f1628; letter-spacing: 6px;
}
.dip-logo-sub {
    display: block; font-family: 'Montserrat', sans-serif; font-size: 0.65rem;
    color: #C59D5F; letter-spacing: 3px; text-transform: uppercase; margin-top: 3px;
}
.dip-divider {
    color: #C59D5F; letter-spacing: 10px; font-size: 0.75rem; margin: 10px 0 8px;
}
.dip-label {
    font-family: 'Cinzel', serif; font-size: 0.75rem; font-weight: 700;
    letter-spacing: 5px; color: #555; text-transform: uppercase; margin: 0 0 16px;
}
.dip-presenta {
    font-family: 'Playfair Display', serif; font-size: 0.95rem; color: #666; margin: 0;
}
.dip-name {
    font-family: 'Cinzel', serif; font-size: 2.4rem; font-weight: 700;
    color: #0f1628; margin: 10px 0; text-align: center; line-height: 1.2;
    border-bottom: 1px solid #C59D5F; padding-bottom: 10px;
    min-width: 60%; letter-spacing: 2px;
}
.dip-body {
    font-family: 'Playfair Display', serif; font-size: 0.95rem; color: #555; margin: 10px 0 4px;
}
.dip-course {
    font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 700;
    color: #0f1628; text-align: center; margin: 0 0 14px; font-style: italic;
}
.dip-score-wrap {
    display: flex; flex-direction: column; align-items: center; margin-bottom: 16px;
    background: #f0f8f0; border: 1px solid #a3d9a5; border-radius: 8px; padding: 8px 28px;
}
.dip-score { font-family: 'Cinzel', serif; font-size: 1.7rem; font-weight: 700; color: #2d7a2d; }
.dip-score-label { font-family: 'Montserrat', sans-serif; font-size: 0.62rem; color: #555; text-transform: uppercase; letter-spacing: 2px; }
.dip-footer {
    width: 100%; display: flex; justify-content: space-around;
    align-items: flex-end; margin-top: 20px;
}
.dip-sign-col { text-align: center; width: 180px; }
.dip-sign-line { border-top: 1px solid #0f1628; margin-bottom: 7px; }
.dip-sign-name { font-family: 'Montserrat', sans-serif; font-size: 0.78rem; font-weight: 600; color: #1a1a1a; }
.dip-sign-role { font-family: 'Montserrat', sans-serif; font-size: 0.62rem; color: #888; margin-top: 2px; }
.dip-seal {
    width: 100px; height: 100px; border-radius: 50%;
    border: 2px dashed #C59D5F; display: flex; align-items: center; justify-content: center;
    transform: rotate(-8deg);
}
.dip-seal-inner {
    font-family: 'Cinzel', serif; font-size: 0.62rem; font-weight: 700;
    color: #C59D5F; text-align: center; line-height: 1.6; letter-spacing: 1px;
}
.dip-certid {
    margin-top: 4px; font-family: 'Montserrat', sans-serif; font-size: 0.6rem;
    color: #bbb; letter-spacing: 2px; text-transform: uppercase;
}
.dip-verify-wrap {
    margin-top: 18px; display: flex; align-items: center; justify-content: center;
    gap: 12px; padding: 10px 16px; background: rgba(15,22,40,0.06);
    border-radius: 8px; border: 1px solid rgba(15,22,40,0.1);
}

/* Print */
@media print {
    body > *:not(#diploma-wrapper) { display: none !important; }
    #diploma-wrapper { display: flex !important; position: static !important; background: #fff !important; padding: 0 !important; }
    .dip-controls { display: none !important; }
    .dip-frame { box-shadow: none !important; }
}

/* ===================== FILTER CHIPS ===================== */
.filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: 'Montserrat', sans-serif;
    white-space: nowrap;
}
.chip:hover {
    border-color: rgba(var(--gold-rgb), 0.4);
    color: var(--gold);
    background: rgba(var(--gold-rgb), 0.06);
}
.chip.active {
    border-color: var(--gold);
    background: rgba(var(--gold-rgb), 0.12);
    color: var(--gold);
}
.chip-count {
    background: rgba(var(--gold-rgb), 0.18);
    color: var(--gold);
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 0.7rem;
    font-weight: 700;
}
.chip.active .chip-count {
    background: rgba(var(--gold-rgb), 0.32);
}

/* ===================== 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(var(--gold-rgb),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(var(--gold-rgb),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(var(--gold-rgb),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(var(--gold-rgb),0.22);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(var(--gold-rgb),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(var(--gold-rgb),0.1);
    background: linear-gradient(180deg, rgba(var(--gold-rgb),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(var(--gold-rgb),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(var(--gold-rgb),0.05);
    border: 1px solid rgba(var(--gold-rgb),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(var(--gold-rgb),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(var(--gold-rgb),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(var(--gold-rgb),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(var(--gold-rgb),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(var(--gold-rgb),0.5);
    background: rgba(255,255,255,0.06);
    box-shadow: 0 0 0 3px rgba(var(--gold-rgb),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(var(--gold-rgb),0.25);
    -webkit-appearance: none;
}
.login-btn:hover   { opacity: 0.9; box-shadow: 0 8px 28px rgba(var(--gold-rgb),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;
}

/* ── Indicador de fuerza de contraseña ───────────────── */
.pw-strength {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 7px;
    animation: fadeIn 0.2s ease;
}
.pw-strength-bars {
    display: flex;
    gap: 4px;
    flex: 1;
}
.pw-bar {
    height: 4px;
    border-radius: 2px;
    flex: 1;
    background: rgba(255,255,255,0.1);
    transition: background 0.3s ease;
}
.pw-strength-label {
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 58px;
    text-align: right;
    transition: color 0.3s ease;
    letter-spacing: 0.3px;
}

/* ── Badge del usuario (paso 2) ──────────────────────── */
.login-user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(var(--gold-rgb),0.05);
    border: 1px solid rgba(var(--gold-rgb),0.15);
    border-radius: 10px;
    padding: 11px 14px;
    margin-bottom: 20px;
    font-size: 0.8rem;
    color: rgba(var(--gold-rgb),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(var(--gold-rgb),0.05);
    border: 1px solid rgba(var(--gold-rgb),0.15);
    border-left: 2px solid rgba(var(--gold-rgb),0.5);
    border-radius: 0 10px 10px 0;
    padding: 12px 14px;
    margin-bottom: 20px;
    color: rgba(var(--gold-rgb),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(var(--gold-rgb),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(var(--gold-rgb),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(var(--gold-rgb),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-inner { padding: 28px 20px 24px; }
    .dip-name { font-size: 1.4rem; min-width: auto; }
    .dip-footer { flex-direction: column; gap: 16px; align-items: center; }
    .dip-seal { width: 70px; height: 70px; }

    /* ===== 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; }
}

/* ===================== 29b. BOTTOM NAVIGATION ===================== */

/* Desktop: oculto */
.bottom-nav { display: none; }

@media (max-width: 768px) {
    /* Bottom nav visible en mobile */
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(var(--bottom-nav-h) + var(--safe-bottom));
        padding-bottom: var(--safe-bottom);
        background: rgba(10, 16, 32, 0.97);
        border-top: 1px solid rgba(var(--gold-rgb), 0.15);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        z-index: 900;
        align-items: stretch;
    }

    .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        color: var(--text-muted);
        cursor: pointer;
        transition: color 0.2s ease;
        font-size: 0.6rem;
        font-weight: 600;
        letter-spacing: 0.02em;
        text-transform: uppercase;
        /* Tap target mínimo 44px */
        min-height: 44px;
        padding: 6px 4px;
        -webkit-tap-highlight-color: transparent;
        position: relative;
    }

    .bottom-nav-item i {
        font-size: 1.15rem;
        transition: transform 0.2s ease, color 0.2s ease;
    }

    .bottom-nav-item:active i {
        transform: scale(0.88);
    }

    .bottom-nav-item.active {
        color: var(--gold);
    }

    .bottom-nav-item.active i {
        filter: drop-shadow(0 0 6px rgba(var(--gold-rgb), 0.5));
    }

    /* Indicador activo: línea dorada arriba */
    .bottom-nav-item.active::before {
        content: '';
        position: absolute;
        top: 0;
        left: 20%;
        right: 20%;
        height: 2px;
        background: var(--gold);
        border-radius: 0 0 2px 2px;
    }

    /* Badge de notificaciones en el ícono de la bottom nav */
    .bottom-nav-item .bn-badge {
        position: absolute;
        top: 4px;
        right: calc(50% - 18px);
        background: #ef4444;
        color: white;
        border-radius: 9px;
        min-width: 16px;
        height: 16px;
        font-size: 0.55rem;
        font-weight: 700;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 0 4px;
        line-height: 1;
    }

    .bottom-nav-item .bn-badge.visible {
        display: flex;
    }

    /* El contenido principal necesita padding para no quedar detrás del bottom nav */
    .content-scroll {
        padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 16px) !important;
    }

    /* La sidebar también respeta el safe area izquierdo (landscape en iPhone) */
    .sidebar {
        padding-left: calc(20px + var(--safe-left));
        padding-top: calc(20px + var(--safe-top));
    }

    /* Top bar con safe area top (modo standalone PWA en iPhone) */
    .top-bar {
        padding-top: var(--safe-top);
        height: calc(56px + var(--safe-top));
    }

    /* Todos los inputs en mobile: font-size mínimo 16px para evitar zoom en iOS */
    input, select, textarea {
        font-size: 16px !important;
    }

    /* Tap targets: elementos interactivos mínimo 44×44px */
    .nav-item,
    .btn-action-main,
    .btn-action-secondary,
    .btn-login-sec {
        min-height: 44px;
    }

    .admin-btn {
        width: 44px !important;
        height: 44px !important;
    }

    /* Notif bell en top bar — tap target correcto */
    #notif-bell-container {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Landscape en mobile: bottom nav más compacto */
@media (max-width: 768px) and (orientation: landscape) {
    .bottom-nav {
        height: calc(48px + var(--safe-bottom));
    }
    .bottom-nav-item {
        font-size: 0.5rem;
        gap: 2px;
    }
    .bottom-nav-item i {
        font-size: 0.95rem;
    }
    /* En landscape el sidebar ocupa la altura completa con safe areas laterales */
    .sidebar {
        padding-left: calc(20px + var(--safe-left));
        padding-right: calc(20px + var(--safe-right));
    }
}

/* ===================== 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(var(--gold-rgb),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(var(--gold-rgb), 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(var(--gold-rgb),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(var(--gold-rgb), 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(var(--gold-rgb), 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(var(--gold-rgb), 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(var(--gold-rgb), 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(var(--gold-rgb), 0.2);
    border: 1px solid rgba(var(--gold-rgb), 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 (oculto)
══════════════════════════════════════ */
.logo-ticker {
    display: none;
}
.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(var(--gold-rgb),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(var(--gold-rgb),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(var(--gold-rgb),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(var(--gold-rgb),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(var(--gold-rgb),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(var(--gold-rgb),0.45) !important;
    box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(var(--gold-rgb),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(var(--gold-rgb),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(var(--gold-rgb),0.18) !important;
    border-radius: 50px !important;
    transition: all 0.2s ease !important;
}
.search-bar:focus-within {
    border-color: rgba(var(--gold-rgb),0.5) !important;
    background: rgba(255,255,255,0.06) !important;
    box-shadow: 0 0 0 3px rgba(var(--gold-rgb),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(var(--gold-rgb),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(var(--gold-rgb),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(var(--gold-rgb),0.5) !important;
    color: #C59D5F !important;
    background: rgba(var(--gold-rgb),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(var(--gold-rgb),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(var(--gold-rgb),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(var(--gold-rgb),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(var(--gold-rgb),0.3) !important;
    border-radius: 20px !important;
    box-shadow: 0 0 80px rgba(0,0,0,0.8), 0 0 0 1px rgba(var(--gold-rgb),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(var(--gold-rgb),0.5) !important;
    background: rgba(255,255,255,0.06) !important;
    box-shadow: 0 0 0 3px rgba(var(--gold-rgb),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(var(--gold-rgb),0.2) !important;
    border-radius: 10px !important;
}
::-webkit-scrollbar-thumb:hover { background: rgba(var(--gold-rgb),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;
}


/* ─── USER CARD refinada ───────────────────────────── */
.user-card-header {
    border-bottom: 1px solid rgba(var(--gold-rgb),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(var(--gold-rgb),0.4) !important;
    color: #C59D5F !important;
    background: rgba(2,6,23,0.85) !important;
}
.edit-btn:hover {
    background: rgba(var(--gold-rgb),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(var(--gold-rgb),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(var(--gold-rgb),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(var(--gold-rgb),0.05) !important;
    border: 1px solid rgba(var(--gold-rgb),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(var(--gold-rgb),0.08) !important;
}
.user-avatar {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    border: 1.5px solid rgba(var(--gold-rgb),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(var(--gold-rgb),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 (rediseño completo) ───────────────── */
.notif-panel-box {
    display: none;
    position: fixed;
    top: 68px;
    right: 20px;
    width: min(380px, calc(100vw - 24px));
    max-height: 520px;
    background: linear-gradient(160deg, #0d1628, #080e1d);
    border: 1px solid rgba(var(--gold-rgb), 0.22);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.65);
    z-index: 9999;
    overflow: hidden;
    transform-origin: top right;
    animation: notifPanelIn 0.2s cubic-bezier(.4,0,.2,1) both;
}
@keyframes notifPanelIn {
    from { opacity: 0; transform: scale(0.95) translateY(-8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.notif-panel-header {
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(var(--gold-rgb),0.14), rgba(var(--gold-rgb),0.05));
    border-bottom: 1px solid rgba(var(--gold-rgb),0.14);
}
.notif-btn-read {
    background: rgba(var(--gold-rgb),0.1);
    border: 1px solid rgba(var(--gold-rgb),0.25);
    color: var(--gold);
    padding: 4px 10px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: background 0.15s, border-color 0.15s;
}
.notif-btn-read:hover {
    background: rgba(var(--gold-rgb),0.22);
    border-color: rgba(var(--gold-rgb),0.45);
}
.notif-btn-close {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.5);
    width: 28px;
    height: 28px;
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: background 0.15s, color 0.15s;
}
.notif-btn-close:hover {
    background: rgba(239,68,68,0.18);
    border-color: rgba(239,68,68,0.35);
    color: #f87171;
}
.notif-tabs {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.notif-tab {
    background: none;
    border: none;
    color: rgba(255,255,255,0.45);
    font-size: 0.8rem;
    padding: 5px 12px;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 5px;
}
.notif-tab:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.75); }
.notif-tab.active { background: rgba(var(--gold-rgb),0.12); color: var(--gold); font-weight: 600; }
.notif-tab span {
    background: rgba(var(--gold-rgb),0.2);
    color: var(--gold);
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 20px;
    font-weight: 700;
}
.notif-list-scroll {
    max-height: 380px;
    overflow-y: auto;
    padding: 4px 0 8px;
}
.notif-list-scroll::-webkit-scrollbar { width: 4px; }
.notif-list-scroll::-webkit-scrollbar-track { background: transparent; }
.notif-list-scroll::-webkit-scrollbar-thumb {
    background: rgba(var(--gold-rgb),0.2);
    border-radius: 4px;
}
.notif-item {
    padding: 11px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-left: 3px solid transparent;
    margin: 2px 8px;
    border-radius: 8px;
}
.notif-item:hover { background: rgba(255,255,255,0.05); }
.notif-item.unread {
    border-left-color: var(--gold);
    background: rgba(var(--gold-rgb),0.06);
}
.notif-item.unread:hover { background: rgba(var(--gold-rgb),0.1); }
.notif-item.read { opacity: 0.65; }
.notif-item.read:hover { opacity: 0.85; background: rgba(255,255,255,0.04); }
.notif-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: #e8eaf0;
    margin-bottom: 3px;
    line-height: 1.35;
}
.notif-item.unread .notif-title { color: #fff; font-weight: 600; }
.notif-message {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.4;
    margin-bottom: 4px;
}
.notif-time { font-size: 0.72rem; color: rgba(var(--gold-rgb),0.6); }
#notif-bell-container.active i { color: var(--gold) !important; }
@media (max-width: 480px) {
    .notif-panel-box {
        top: 56px;
        right: 12px;
        width: calc(100vw - 24px);
        max-height: 80vh;
        border-radius: 12px;
    }
}

/* ─── Logo ticker ───────────────────────────────────── */
.logo-ticker {
    border-bottom: 1px solid rgba(var(--gold-rgb),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(var(--gold-rgb),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(var(--gold-rgb),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(var(--gold-rgb),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(var(--gold-rgb),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(var(--gold-rgb),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(var(--gold-rgb),0.12) !important;
    background: rgba(var(--gold-rgb),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(var(--gold-rgb),0.12) !important;
    color: var(--gold) !important;
    border-bottom-color: var(--gold) !important;
}

/* ─── Empty state ────────────────────────────────────── */
.empty-state {
    border: 1px solid rgba(var(--gold-rgb),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(var(--gold-rgb),0.2) !important;
}

/* ─── Results table ───────────────────────────────────── */
.results-table, table {
    border-collapse: separate !important;
    border-spacing: 0 4px !important;
}
.results-table th, table th {
    background: rgba(var(--gold-rgb),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(var(--gold-rgb),0.05) !important;
}

/* ─── Breadcrumbs ─────────────────────────────────────── */
#breadcrumbs {
    font-size: 0.82rem !important;
    color: var(--text-muted) !important;
    letter-spacing: 0.02em !important;
}
#breadcrumbs span.active { color: var(--gold) !important; font-weight: 600 !important; }
#breadcrumbs i { opacity: 0.3 !important; font-size: 0.65rem !important; }

/* ─── Block body: listas y párrafos ──────────────────── */
.block-text ul, .block-text ol {
    padding-left: 22px !important;
    margin: 14px 0 !important;
}
.block-text li {
    margin-bottom: 8px !important;
    color: #cbd5e1 !important;
    line-height: 1.7 !important;
}
.block-text li::marker {
    color: var(--gold) !important;
}
.block-text strong {
    color: var(--gold) !important;
    font-weight: 700 !important;
}
.block-text em {
    color: #e0e7ef !important;
    font-style: italic !important;
}
.block-text p {
    margin: 0 0 14px 0 !important;
}

/* ─── Block body PRO: headings, blockquotes, code, table, hr ──── */
/* Headings — jerarquía visual con dorado */
.block-text h2,
.block-text h3 {
    font-family: 'Montserrat', sans-serif !important;
    color: var(--gold) !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    letter-spacing: -0.01em !important;
    margin: 28px 0 12px !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid rgba(var(--gold-rgb), 0.15) !important;
}
.block-text h2 { font-size: 1.4rem !important; }
.block-text h3 { font-size: 1.18rem !important; }
.block-text h4 {
    font-family: 'Montserrat', sans-serif !important;
    color: #e2e8f0 !important;
    font-weight: 600 !important;
    font-size: 1.02rem !important;
    margin: 20px 0 8px !important;
    line-height: 1.3 !important;
}

/* Blockquote — callout con borde dorado y fondo sutil */
.block-text blockquote {
    margin: 18px 0 !important;
    padding: 14px 18px !important;
    background: linear-gradient(90deg, rgba(var(--gold-rgb), 0.08), rgba(var(--gold-rgb), 0.02)) !important;
    border-left: 4px solid var(--gold) !important;
    border-radius: 0 10px 10px 0 !important;
    color: #e0e7ef !important;
    font-size: 0.97rem !important;
    line-height: 1.7 !important;
    position: relative !important;
}
.block-text blockquote p {
    margin: 0 !important;
    color: #e0e7ef !important;
}
.block-text blockquote strong {
    color: var(--gold) !important;
}

/* Code inline — con fondo dark y borde dorado */
.block-text code {
    background: rgba(var(--gold-rgb), 0.1) !important;
    color: var(--gold) !important;
    border: 1px solid rgba(var(--gold-rgb), 0.25) !important;
    padding: 2px 8px !important;
    border-radius: 5px !important;
    font-family: 'JetBrains Mono', 'Consolas', 'Monaco', monospace !important;
    font-size: 0.88em !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
}

/* Code block — para bloques de código multi-línea */
.block-text pre {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-left: 3px solid var(--gold) !important;
    border-radius: 8px !important;
    padding: 14px 16px !important;
    margin: 16px 0 !important;
    overflow-x: auto !important;
    font-family: 'JetBrains Mono', 'Consolas', monospace !important;
}
.block-text pre code {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    color: #cbd5e1 !important;
    white-space: pre !important;
}

/* Tables — comparativas con look pro */
.block-text table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    margin: 18px 0 !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.block-text thead {
    background: linear-gradient(90deg, rgba(var(--gold-rgb), 0.15), rgba(var(--gold-rgb), 0.05)) !important;
}
.block-text th {
    text-align: left !important;
    padding: 12px 16px !important;
    font-weight: 700 !important;
    color: var(--gold) !important;
    font-size: 0.85rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border-bottom: 1px solid rgba(var(--gold-rgb), 0.2) !important;
}
.block-text td {
    padding: 12px 16px !important;
    color: #cbd5e1 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
}
.block-text tbody tr:hover {
    background: rgba(var(--gold-rgb), 0.04) !important;
}

/* Separadores — finos y elegantes */
.block-text hr {
    border: none !important;
    height: 1px !important;
    background: linear-gradient(90deg, transparent, rgba(var(--gold-rgb), 0.3), transparent) !important;
    margin: 28px 0 !important;
}

/* Links inline */
.block-text a {
    color: var(--gold) !important;
    text-decoration: underline !important;
    text-decoration-thickness: 1px !important;
    text-underline-offset: 3px !important;
    transition: color 0.15s !important;
}
.block-text a:hover {
    color: #fff !important;
    text-shadow: 0 0 12px rgba(var(--gold-rgb), 0.5) !important;
}

/* Listas anidadas */
.block-text ul ul, .block-text ol ol, .block-text ul ol, .block-text ol ul {
    margin: 6px 0 !important;
}

/* Espaciado correcto entre elementos consecutivos */
.block-text > * + h2,
.block-text > * + h3,
.block-text > * + h4 { margin-top: 24px !important; }
.block-text > h2:first-child,
.block-text > h3:first-child,
.block-text > h4:first-child { margin-top: 0 !important; }

/* ─── Exam questions ──────────────────────────────────── */
.exam-question {
    border-radius: var(--radius-lg) !important;
    border: 1px solid rgba(var(--gold-rgb),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(var(--gold-rgb),0.2) !important; }


/* ─── 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(var(--gold-rgb),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(var(--gold-rgb),0.15) !important;
    border-radius: var(--radius-md) !important;
    background: rgba(var(--gold-rgb),0.04) !important;
    transition: transform var(--transition-fast), border-color var(--transition-fast) !important;
}
.badge-item:hover {
    transform: translateY(-2px) !important;
    border-color: rgba(var(--gold-rgb),0.35) !important;
}

/* ─── Scrollbar ultra fina ────────────────────────────── */
.content-scroll::-webkit-scrollbar { width: 4px; }
.content-scroll::-webkit-scrollbar-thumb { background: rgba(var(--gold-rgb),0.15); border-radius: 10px; }
.content-scroll::-webkit-scrollbar-thumb:hover { background: rgba(var(--gold-rgb),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(var(--gold-rgb),0.25);
    color: #fff;
}


/* ─── Gamification: metallic XP bar shimmer ──────────── */
.xp-bar-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255,255,255,0.35) 40%,
        rgba(255,255,255,0.5)  50%,
        rgba(255,255,255,0.35) 60%,
        transparent 100%);
    background-size: 200% 100%;
    animation: xpShimmer 2.4s ease-in-out infinite;
}
@keyframes xpShimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

/* ─── Gamification: badge card hover ─────────────────── */
.badge-popup { user-select: none; }

/* ─── Offline banner ──────────────────────────────────── */
#offlineBanner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: #1c0a0a;
    border-bottom: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 9px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: slideDownBanner 0.3s ease;
    box-shadow: 0 2px 12px rgba(239, 68, 68, 0.15);
}
#offlineBanner i {
    font-size: 0.9rem;
    color: #ef4444;
    flex-shrink: 0;
}
@keyframes slideDownBanner {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}
/* Puntos parpadeantes "..." */
@keyframes offlineDots {
    0%   { content: '.';   }
    33%  { content: '..';  }
    66%  { content: '...'; }
}
.offline-dots {
    display: inline-block;
    animation: offlineDotsBlink 1.2s steps(3, end) infinite;
    min-width: 16px;
    text-align: left;
}
@keyframes offlineDotsBlink {
    0%,100% { opacity: 1; }
    33%     { opacity: 0.4; }
    66%     { opacity: 0.7; }
}

/* ─── Login: pasos adicionales ────────────────────────── */
.login-user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(var(--gold-rgb),0.07);
    border: 1px solid rgba(var(--gold-rgb),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(var(--gold-rgb),0.06);
    border: 1px solid rgba(var(--gold-rgb),0.15);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 18px;
    color: rgba(var(--gold-rgb),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(var(--gold-rgb),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(var(--gold-rgb),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;
}

/* ══════════════════════════════════════
   MODAL BASE (.modal)
══════════════════════════════════════ */
.modal {
    background: rgba(8, 12, 28, 0.98);
    border: 1px solid rgba(var(--gold-rgb), 0.2);
    border-radius: 20px;
    box-shadow: 0 0 80px rgba(0,0,0,0.8), 0 0 0 1px rgba(var(--gold-rgb),0.04) inset;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    width: 100%;
    animation: fadeIn 0.25s ease;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 26px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.modal-header h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    display: flex;
    align-items: center;
}
.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    line-height: 1;
    flex-shrink: 0;
}
.modal-close:hover { color: var(--text-main); background: rgba(255,255,255,0.06); }
.modal-body { padding: 22px 26px; }

/* ══════════════════════════════════════
   IMPORT JSON MODAL — STEPPER
══════════════════════════════════════ */
.import-stepper {
    display: flex;
    align-items: center;
    padding: 18px 32px 0;
}
.import-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 74px;
}
.import-step-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    border: 2px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.3s ease;
}
.import-step-item.active .import-step-dot {
    background: rgba(var(--gold-rgb), 0.1);
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 14px rgba(var(--gold-rgb), 0.18);
}
.import-step-item.done .import-step-dot {
    background: var(--accent-success);
    border-color: var(--accent-success);
    color: white;
}
.import-step-item > span {
    font-size: 0.63rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    transition: color 0.3s;
}
.import-step-item.active > span { color: var(--gold); }
.import-step-item.done > span { color: var(--accent-success); }
.import-step-bar {
    flex: 1;
    height: 2px;
    background: rgba(255,255,255,0.07);
    margin-bottom: 22px;
    border-radius: 2px;
    transition: background 0.4s;
}
.import-step-bar.done { background: var(--accent-success); }

/* ══════════════════════════════════════
   IMPORT JSON MODAL — FORM
══════════════════════════════════════ */
.import-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 18px;
}
.import-field { display: flex; flex-direction: column; gap: 5px; }
.import-label {
    font-size: 0.67rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.09em;
}
.import-select {
    width: 100%;
    padding: 10px 13px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 0.87rem;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.import-select:focus {
    border-color: rgba(var(--gold-rgb), 0.45);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--gold-rgb), 0.07);
}
.import-select:disabled { opacity: 0.4; cursor: default; }
.import-select option {
    background: #1E293B;
    color: #F8FAFC;
}

/* ══════════════════════════════════════
   IMPORT JSON MODAL — DROPZONE
══════════════════════════════════════ */
.import-dropzone {
    border: 2px dashed rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 34px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.22s, background 0.22s;
    background: transparent;
    margin-bottom: 12px;
}
.import-dropzone:hover,
.import-dropzone.dragging {
    border-color: rgba(var(--gold-rgb), 0.45);
    background: rgba(var(--gold-rgb), 0.03);
}
.import-dz-icon {
    font-size: 2.6rem;
    color: rgba(var(--gold-rgb), 0.28);
    margin-bottom: 12px;
    display: block;
    transition: color 0.22s, transform 0.22s;
}
.import-dropzone:hover .import-dz-icon,
.import-dropzone.dragging .import-dz-icon {
    color: rgba(var(--gold-rgb), 0.7);
    transform: translateY(-5px);
}
.import-dz-main { color: var(--text-main); font-weight: 600; margin-bottom: 6px; font-size: 0.92rem; }
.import-dz-sub { color: var(--text-muted); font-size: 0.77rem; }

/* ══════════════════════════════════════
   IMPORT JSON MODAL — FILE CARD
══════════════════════════════════════ */
.import-file-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: rgba(var(--gold-rgb), 0.04);
    border: 1px solid rgba(var(--gold-rgb), 0.16);
    border-radius: 11px;
    margin-bottom: 14px;
    animation: fadeIn 0.2s ease;
}
.import-file-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(var(--gold-rgb), 0.09);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 1rem;
    flex-shrink: 0;
}
.import-file-meta { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.import-file-name { font-weight: 700; font-size: 0.87rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.import-file-size { font-size: 0.73rem; color: var(--text-muted); }
.import-ready-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    background: rgba(16,185,129,0.09);
    border: 1px solid rgba(16,185,129,0.22);
    border-radius: 20px;
    color: var(--accent-success);
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}
.import-file-remove {
    background: none;
    border: none;
    color: rgba(255,255,255,0.25);
    cursor: pointer;
    font-size: 1.15rem;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.2s;
    flex-shrink: 0;
    line-height: 1;
}
.import-file-remove:hover { color: var(--accent); }

.import-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}
.import-template-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.09);
    color: var(--text-muted);
    padding: 8px 15px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 0.79rem;
    transition: border-color 0.2s, color 0.2s;
    font-family: 'Montserrat', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.import-template-btn:hover { border-color: rgba(var(--gold-rgb), 0.35); color: var(--gold); }

/* ══════════════════════════════════════
   GENERATE AI MODAL — FORM INPUTS
══════════════════════════════════════ */
.gen-input {
    width: 100%;
    padding: 10px 13px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 0.88rem;
    font-family: 'Montserrat', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.gen-input:focus {
    border-color: rgba(var(--gold-rgb), 0.45);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--gold-rgb), 0.07);
}
.gen-input::placeholder { color: var(--text-muted); opacity: 0.6; }
.gen-input option { background: #1E293B; color: #F8FAFC; }
.gen-textarea {
    resize: vertical;
    min-height: 72px;
    max-height: 160px;
    line-height: 1.5;
}

/* ══════════════════════════════════════
   GENERATE AI MODAL — SPINNER
══════════════════════════════════════ */
.gen-spinner {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 3px solid rgba(var(--gold-rgb), 0.12);
    border-top-color: var(--gold);
    animation: gen-spin 0.9s linear infinite;
    margin: 0 auto;
}
@keyframes gen-spin {
    to { transform: rotate(360deg); }
}

/* Tabs de fuente de contenido */
.gen-src-tab {
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
    font-family: inherit;
    white-space: nowrap;
}
.gen-src-tab:hover {
    border-color: rgba(var(--gold-rgb), .35);
    color: rgba(var(--gold-rgb), .85);
}
.gen-src-tab.active {
    background: rgba(var(--gold-rgb), .1);
    border-color: rgba(var(--gold-rgb), .4);
    color: var(--gold);
}

/* ═════════════════════════════════════════════════════════════════
   DASHBOARD COCKPIT PRO
   ═════════════════════════════════════════════════════════════════ */
.dash-root {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 4px;
}

/* Skeleton loader */
.skel {
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 100%);
    background-size: 200% 100%;
    animation: skelShimmer 1.4s ease-in-out infinite;
    border-radius: 12px;
}
@keyframes skelShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Filtros sticky */
.dash-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
    background: rgba(13, 22, 40, 0.65);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 22px;
    position: sticky;
    top: 0;
    z-index: 10;
}
.dash-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
}
.dash-filter-group label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}
.dash-filter-group select {
    background: var(--primary-light);
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.88rem;
    cursor: pointer;
    transition: border-color 0.15s;
}
.dash-filter-group select:hover,
.dash-filter-group select:focus {
    border-color: rgba(var(--gold-rgb), 0.5);
    outline: none;
}

/* Botones */
.dash-btn {
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
}
.dash-btn:hover {
    background: rgba(var(--gold-rgb), 0.12);
    border-color: rgba(var(--gold-rgb), 0.4);
    color: var(--gold);
}
.dash-btn-clear {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}
.dash-btn-clear:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}
.dash-btn-mini {
    background: rgba(var(--gold-rgb), 0.1);
    border: 1px solid rgba(var(--gold-rgb), 0.3);
    color: var(--gold);
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.78rem;
    transition: all 0.15s;
}
.dash-btn-mini:hover {
    background: rgba(var(--gold-rgb), 0.2);
}

/* Hero: Health + KPIs */
.dash-hero {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 18px;
    margin-bottom: 22px;
}
.dash-health-card {
    background: linear-gradient(160deg, rgba(13,22,40,0.95), rgba(8,14,29,1));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    box-shadow: 0 0 40px rgba(0,0,0,0.3);
}
.dash-health-title {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 14px;
    font-weight: 700;
}
.dash-health-formula {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 10px;
    opacity: 0.7;
}

.dash-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.dash-kpi {
    background: linear-gradient(160deg, rgba(13,22,40,0.85), rgba(8,14,29,0.95));
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 16px 18px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s;
}
.dash-kpi:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--gold-rgb), 0.3);
}
.dash-kpi-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.dash-kpi-label {
    font-size: 0.74rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 600;
}
.dash-kpi-value {
    font-size: 1.9rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    display: flex;
    align-items: baseline;
}
.dash-kpi-sub {
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dash-kpi-spark {
    position: absolute;
    bottom: 12px;
    right: 14px;
    opacity: 0.85;
}

/* Insights */
.dash-insights {
    background: linear-gradient(160deg, rgba(13,22,40,0.6), rgba(8,14,29,0.8));
    border: 1px solid rgba(var(--gold-rgb), 0.18);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 22px;
}
.dash-insights-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gold);
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}
.dash-insight {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 6px;
}
.dash-insight i { margin-top: 2px; flex-shrink: 0; }
.dash-insight-warning { background: rgba(245, 158, 11, 0.08); color: #fbbf24; border-left: 3px solid #f59e0b; }
.dash-insight-success { background: rgba(16, 185, 129, 0.08); color: #34d399; border-left: 3px solid #10b981; }
.dash-insight-info    { background: rgba(34, 211, 238, 0.08); color: #67e8f9; border-left: 3px solid #22d3ee; }

/* Tabs */
.dash-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    overflow-x: auto;
}
.dash-tab {
    background: transparent;
    color: var(--text-muted);
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.18s;
}
.dash-tab:hover {
    color: rgba(var(--gold-rgb), 0.85);
}
.dash-tab.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}
.dash-tab-content {
    animation: dashFadeIn 0.3s ease;
}
@keyframes dashFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Paneles */
.dash-panel {
    background: var(--primary-light);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 18px;
}
.dash-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
}
.dash-panel-title i { color: var(--gold); }

.dash-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.dash-grid-alumnos {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;
}

/* Tabla */
.dash-table {
    width: 100%;
    border-collapse: collapse;
}
.dash-table thead th {
    text-align: left;
    padding: 10px;
    color: var(--text-muted);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-weight: 700;
}
.dash-table th:not(:first-child),
.dash-table td:not(:first-child):not(:nth-child(2)) {
    text-align: center;
}
.dash-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s;
}
.dash-table tbody tr:hover {
    background: rgba(var(--gold-rgb), 0.03);
}

/* Filas pequeñas (lista de inactivos) */
.dash-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    transition: background 0.15s;
}
.dash-row:hover {
    background: rgba(255,255,255,0.03);
}

/* Mini stat */
.dash-mini {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 12px 14px;
}
.dash-mini span { font-size: 0.82rem; color: var(--text-muted); }
.dash-mini strong { font-size: 1.3rem; color: var(--gold); font-weight: 800; }

/* Responsive */
@media (max-width: 900px) {
    .dash-hero            { grid-template-columns: 1fr; }
    .dash-grid-2          { grid-template-columns: 1fr; }
    .dash-grid-alumnos    { grid-template-columns: 1fr; }
    .dash-kpi-grid        { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .dash-kpi-grid           { grid-template-columns: 1fr; }
    .dash-filters            { padding: 12px; }
    .dash-filter-group       { min-width: 100%; }
    .dash-kpi-value          { font-size: 1.6rem; }
    .dash-tabs               { font-size: 0.82rem; }
    .dash-tab                { padding: 8px 12px; }
}

/* ═════════════════════════════════════════════════════════════════
   ADMIN TOOLBAR — botones de acciones (Nuevo / IA / Importar)
   ═════════════════════════════════════════════════════════════════ */
.admin-toolbar {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 22px;
    align-items: center;
    justify-content: space-between;
}
.admin-toolbar-filters {
    display: flex;
    gap: 10px;
    flex: 1 1 320px;
    min-width: 280px;
    align-items: center;
}
.admin-toolbar-filters input,
.admin-toolbar-filters select {
    padding: 9px 14px;
    background: var(--primary-light);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 9px;
    color: var(--text-primary);
    font-size: 0.86rem;
    transition: border-color 0.18s, box-shadow 0.18s;
}
.admin-toolbar-filters input { flex: 1; min-width: 180px; }
.admin-toolbar-filters input:focus,
.admin-toolbar-filters select:focus {
    outline: none;
    border-color: rgba(var(--gold-rgb), 0.4);
    box-shadow: 0 0 0 3px rgba(var(--gold-rgb), 0.08);
}

.admin-toolbar-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* Botón base */
.adm-btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    border: 1px solid transparent;
    font-family: inherit;
}
.adm-btn i { font-size: 0.95rem; }
.adm-btn:hover { transform: translateY(-1px); }
.adm-btn:active { transform: translateY(0); }

/* PRIMARIO — Generar con IA (dorado metalizado, hero del toolbar) */
.adm-btn-primary {
    background: var(--gold-gradient);
    color: #1a1208;
    border-color: rgba(var(--gold-rgb), 0.6);
    font-weight: 700;
    letter-spacing: 0.2px;
    box-shadow:
        0 4px 14px rgba(var(--gold-rgb), 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        inset 0 -1px 0 rgba(0, 0, 0, 0.15);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}
.adm-btn-primary:hover {
    box-shadow:
        0 6px 22px rgba(var(--gold-rgb), 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.18);
    filter: brightness(1.05);
}
.adm-btn-primary i { color: #1a1208; }

/* Shimmer animado en el botón primario */
.adm-btn-shimmer {
    position: absolute;
    top: 0;
    left: -120%;
    width: 80%;
    height: 100%;
    background: linear-gradient(110deg,
        transparent 0%,
        rgba(255, 255, 255, 0.45) 50%,
        transparent 100%);
    transform: skewX(-20deg);
    pointer-events: none;
    animation: admBtnShimmer 3.5s ease-in-out infinite;
}
@keyframes admBtnShimmer {
    0%, 60% { left: -120%; }
    100%    { left: 130%; }
}

/* SECUNDARIO — Nuevo Curso (outline dorado sutil) */
.adm-btn-secondary {
    background: rgba(var(--gold-rgb), 0.08);
    color: var(--gold);
    border-color: rgba(var(--gold-rgb), 0.3);
}
.adm-btn-secondary:hover {
    background: rgba(var(--gold-rgb), 0.16);
    border-color: rgba(var(--gold-rgb), 0.5);
    box-shadow: 0 4px 14px rgba(var(--gold-rgb), 0.15);
}

/* GHOST — Importar (acción discreta) */
.adm-btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border-color: rgba(255, 255, 255, 0.08);
}
.adm-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Responsive: en mobile, los botones se apilan a ancho completo */
@media (max-width: 700px) {
    .admin-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .admin-toolbar-filters,
    .admin-toolbar-actions {
        width: 100%;
    }
    .admin-toolbar-actions {
        justify-content: stretch;
    }
    .admin-toolbar-actions .adm-btn {
        flex: 1;
        justify-content: center;
        padding: 10px 12px;
        font-size: 0.82rem;
    }
}

/* ═════════════════════════════════════════════════════════════════
   GENERADOR IA — Panel de sugerencias automáticas
   ═════════════════════════════════════════════════════════════════ */
.gen-ai-suggestions {
    margin-top: 14px;
    background: linear-gradient(160deg, rgba(197,157,95,0.08), rgba(34,211,238,0.04));
    border: 1px solid rgba(197,157,95,0.25);
    border-radius: 12px;
    padding: 14px 16px;
    animation: genAiAppear 0.4s ease-out;
}
@keyframes genAiAppear {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.gen-ai-suggest-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--gold);
    padding: 4px 0;
}
.gen-ai-suggest-loading i { font-size: 1rem; }

.gen-ai-suggest-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.92rem;
    color: var(--gold);
}
.gen-ai-suggest-head i { font-size: 1.05rem; }
.gen-ai-suggest-head strong { color: #fff; font-weight: 700; }
.gen-ai-suggest-head > span { flex: 1; }
.gen-ai-suggest-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 6px;
    border-radius: 6px;
    transition: all 0.15s;
}
.gen-ai-suggest-close:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}

.gen-ai-suggest-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gen-ai-suggest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}
.gen-ai-suggest-grid > div {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.gen-ai-suggest-grid > div span {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.gen-ai-suggest-grid > div strong {
    font-size: 1.1rem;
    color: #fff;
    font-weight: 700;
}

.gen-ai-suggest-line {
    font-size: 0.84rem;
    color: var(--text-primary);
    line-height: 1.5;
}
.gen-ai-suggest-line span:first-child {
    color: var(--text-muted);
    font-weight: 600;
    margin-right: 6px;
}

.gen-ai-chips {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
.gen-ai-chip {
    background: rgba(34,211,238,0.1);
    border: 1px solid rgba(34,211,238,0.3);
    color: #67e8f9;
    font-size: 0.74rem;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.gen-ai-suggest-rationale {
    background: rgba(197,157,95,0.08);
    border-left: 3px solid var(--gold);
    border-radius: 0 8px 8px 0;
    padding: 10px 12px;
    font-size: 0.82rem;
    color: var(--text-primary);
    line-height: 1.5;
    font-style: italic;
}
.gen-ai-suggest-rationale i {
    color: var(--gold);
    margin-right: 6px;
    font-style: normal;
}

.gen-ai-suggest-actions {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 8px;
    margin-top: 4px;
}
.gen-ai-suggest-actions small {
    color: var(--text-muted);
    font-size: 0.76rem;
}

/* Highlight breve cuando un campo recibe un valor sugerido */
.gen-ai-applied {
    animation: genAiHighlight 1.8s ease-out;
}
@keyframes genAiHighlight {
    0%   { box-shadow: 0 0 0 0 rgba(197,157,95,0.7); border-color: var(--gold); }
    50%  { box-shadow: 0 0 0 6px rgba(197,157,95,0); border-color: var(--gold); }
    100% { box-shadow: 0 0 0 0 rgba(197,157,95,0); }
}

/* ═════════════════════════════════════════════════════════════════
   REGENERACIÓN INDIVIDUAL — botón + dropdown en preview
   ═════════════════════════════════════════════════════════════════ */
.regen-menu {
    position: relative;
    flex-shrink: 0;
}
.regen-menu-trigger {
    background: rgba(34, 211, 238, 0.08);
    border: 1px solid rgba(34, 211, 238, 0.3);
    color: #67e8f9;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.15s;
}
.regen-menu-trigger:hover {
    background: rgba(34, 211, 238, 0.18);
    border-color: rgba(34, 211, 238, 0.6);
    transform: rotate(45deg);
}

.regen-menu-options {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 220px;
    background: linear-gradient(160deg, #0d1628, #0a1020);
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 10px;
    padding: 6px;
    z-index: 100;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(34, 211, 238, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.18s, visibility 0.18s, transform 0.18s;
}
.regen-menu-options.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.regen-menu-options button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    font-size: 0.83rem;
    transition: background 0.12s, color 0.12s;
    font-family: inherit;
}
.regen-menu-options button:hover {
    background: rgba(34, 211, 238, 0.1);
    color: #67e8f9;
}
.regen-menu-options button i {
    color: var(--text-muted);
    font-size: 0.85rem;
    width: 16px;
    text-align: center;
}
.regen-menu-options button:hover i {
    color: #67e8f9;
}
.regen-menu-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 4px 4px;
}

/* Loading state mientras regenera */
.regen-loading {
    pointer-events: none;
    position: relative;
}
.regen-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 30%, rgba(34, 211, 238, 0.12) 50%, transparent 70%);
    background-size: 200% 100%;
    animation: regenShimmer 1.4s infinite;
    pointer-events: none;
}
@keyframes regenShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Highlight cuando se acaba de regenerar */
.regen-just-updated {
    animation: regenJustUpdated 1.8s ease-out;
}
@keyframes regenJustUpdated {
    0%   { background: rgba(34, 211, 238, 0.15); }
    100% { background: transparent; }
}

/* ═════════════════════════════════════════════════════════════════
   VER COMO ALUMNO — banner, modal, botón
   ═════════════════════════════════════════════════════════════════ */

/* Botón sidebar */
.btn-view-as {
    width: 100%;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(139, 92, 246, 0.08));
    border: 1px solid rgba(34, 211, 238, 0.35);
    color: #67e8f9;
    padding: 9px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
    transition: all 0.18s;
    font-family: inherit;
}
.btn-view-as:hover {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(139, 92, 246, 0.16));
    border-color: rgba(34, 211, 238, 0.6);
    box-shadow: 0 0 14px rgba(34, 211, 238, 0.2);
}

/* Banner persistente arriba */
.view-as-banner {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1500;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(90deg, #06b6d4, #8b5cf6);
    color: #fff;
    padding: 10px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    animation: viewAsBannerSlide 0.3s ease-out;
}
@keyframes viewAsBannerSlide {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}
.view-as-banner > i:first-child {
    font-size: 1.05rem;
}
.view-as-banner > span {
    flex: 1;
    font-weight: 500;
}
.view-as-banner > span strong {
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 10px;
    border-radius: 12px;
    margin-left: 4px;
}
.view-as-banner button {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.15s;
    font-family: inherit;
}
.view-as-banner button:hover {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Cuando hay banner activo, ocultar todos los elementos admin-only */
body.view-as-student .admin-only {
    display: none !important;
}
/* Pero el banner no se oculta a sí mismo (no tiene .admin-only) */
body.view-as-student .view-as-banner {
    display: flex !important;
}

/* Modal selector de alumnos */
.view-as-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: viewAsModalFade 0.2s ease-out;
}
@keyframes viewAsModalFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.view-as-modal-card {
    background: linear-gradient(160deg, #0d1628, #0a1020);
    border: 1px solid rgba(34, 211, 238, 0.25);
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 540px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: viewAsModalScale 0.25s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes viewAsModalScale {
    from { transform: scale(0.92); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}
.view-as-modal-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.view-as-modal-head h2 {
    flex: 1;
    margin: 0;
    font-size: 1.2rem;
    color: #fff;
}
.view-as-modal-head i {
    font-size: 1.2rem;
}
.view-as-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 6px;
    border-radius: 6px;
    transition: all 0.15s;
}
.view-as-close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}
.view-as-search {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 12px;
    box-sizing: border-box;
    transition: border-color 0.15s;
    font-family: inherit;
}
.view-as-search:focus {
    outline: none;
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.08);
}
.view-as-list {
    flex: 1;
    overflow-y: auto;
    margin: 0 -8px;
    padding: 0 8px;
}
.view-as-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
    margin-bottom: 4px;
}
.view-as-item:hover {
    background: rgba(34, 211, 238, 0.08);
    transform: translateX(2px);
}
.view-as-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #06b6d4, #8b5cf6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

/* ═════════════════════════════════════════════════════════════════
   DRIVE SHARE WARNING — aviso al admin sobre permisos de Drive
   ═════════════════════════════════════════════════════════════════ */
.drive-warn {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.04));
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 10px;
    padding: 14px 18px;
    margin-top: 12px;
    font-size: 0.84rem;
    line-height: 1.55;
    color: #e2e8f0;
}
.drive-warn-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #fbbf24;
    font-size: 0.92rem;
}
.drive-warn-head strong {
    color: #fbbf24;
    font-weight: 700;
}
.drive-warn p {
    margin: 0 0 8px;
    color: #cbd5e1;
}
.drive-warn ol {
    margin: 0 0 10px;
    padding-left: 22px;
    color: #cbd5e1;
}
.drive-warn ol li {
    margin-bottom: 4px;
}
.drive-warn ol li strong {
    color: #fff;
    background: rgba(245, 158, 11, 0.18);
    padding: 1px 7px;
    border-radius: 5px;
    font-weight: 600;
}
.drive-warn-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(245, 158, 11, 0.15);
}
.drive-warn-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.5);
    color: #fbbf24;
    padding: 7px 14px;
    border-radius: 7px;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.15s;
}
.drive-warn-btn:hover {
    background: rgba(245, 158, 11, 0.28);
    border-color: rgba(245, 158, 11, 0.7);
    color: #fbbf24 !important;
    text-decoration: none !important;
    text-shadow: none !important;
}
.drive-warn-hint {
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.55);
}

/* ═══════════════════════════════════════════════════
   NOTIF VIEW — Admin send notifications (premium)
   ═══════════════════════════════════════════════════ */

/* Hero header */
.nv-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(197,157,95,0.12);
}
.nv-hero-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.nv-hero-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(197,157,95,0.25), rgba(197,157,95,0.08));
    border: 1px solid rgba(197,157,95,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--gold);
    flex-shrink: 0;
}
.nv-hero-title {
    margin: 0 0 4px;
    font-size: 1.55rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    background: linear-gradient(135deg, #fff 30%, #C59D5F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}
.nv-hero-sub {
    margin: 0;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.45);
}

/* 2-column layout */
.nv-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
}
@media (max-width: 900px) {
    .nv-layout { grid-template-columns: 1fr; }
    .nv-col-preview { order: -1; }
}

/* Card base */
.nv-card {
    background: linear-gradient(145deg, rgba(13,22,40,0.9), rgba(8,14,29,0.95));
    border: 1px solid rgba(197,157,95,0.14);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.nv-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #e8eaf0;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(197,157,95,0.1);
}

/* Labels */
.nv-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.nv-req { color: var(--gold); }

/* Inputs */
.nv-input, .nv-textarea, .nv-select {
    width: 100%;
    padding: 11px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: #e8eaf0;
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
}
.nv-input:focus, .nv-textarea:focus, .nv-select:focus {
    outline: none;
    border-color: rgba(197,157,95,0.5);
    background: rgba(197,157,95,0.05);
    box-shadow: 0 0 0 3px rgba(197,157,95,0.1);
}
.nv-input::placeholder, .nv-textarea::placeholder { color: rgba(255,255,255,0.25); }
.nv-textarea {
    resize: vertical;
    min-height: 130px;
    line-height: 1.6;
}
.nv-select-wrap { position: relative; }
.nv-select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.3);
    font-size: 0.75rem;
    pointer-events: none;
}
.nv-select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer; }
.nv-select-multi { appearance: auto; padding-right: 14px; }

/* Field row */
.nv-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 600px) {
    .nv-field-row { grid-template-columns: 1fr; }
}

/* Type chips */
.nv-type-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.nv-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.5);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}
.nv-chip:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.8);
    border-color: rgba(255,255,255,0.2);
}
.nv-chip.active {
    background: rgba(197,157,95,0.14);
    border-color: rgba(197,157,95,0.45);
    color: var(--gold);
    font-weight: 600;
}

/* Submit button */
.nv-submit-btn {
    margin-top: 28px;
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #C59D5F, #e6bc5a);
    color: #07101f;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    transition: transform 0.18s, box-shadow 0.18s, filter 0.18s;
    box-shadow: 0 4px 20px rgba(197,157,95,0.25);
}
.nv-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(197,157,95,0.4);
    filter: brightness(1.07);
}
.nv-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(197,157,95,0.25);
}

/* Preview */
.nv-preview-hint {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.35);
    margin: -10px 0 16px;
}
.nv-preview-item {
    display: flex;
    gap: 12px;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid rgba(59,130,246,0.35);
    background: rgba(59,130,246,0.1);
    transition: background 0.3s, border-color 0.3s;
}
.nv-preview-icon { font-size: 1.3rem; flex-shrink: 0; line-height: 1; margin-top: 2px; }
.nv-preview-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    line-height: 1.3;
}
.nv-preview-msg {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.45;
    margin-bottom: 6px;
}
.nv-preview-time {
    font-size: 0.7rem;
    color: rgba(197,157,95,0.6);
}

/* Tips card */
.nv-tips-list {
    list-style: none;
    padding: 0;
    margin: -4px 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.nv-tips-list li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.45;
}
.nv-tips-list li i {
    color: rgba(197,157,95,0.6);
    font-size: 0.75rem;
    margin-top: 2px;
    flex-shrink: 0;
}
.nv-tips-list li em {
    color: rgba(197,157,95,0.8);
    font-style: normal;
}
