:root {
    --orange: #ff6b00;
    --orange-light: #ff8c00;
    --orange-grad: linear-gradient(135deg, #ff8c00, #ff4500);

    /* Sidebar dark */
    --sidebar-bg: #111318;
    --sidebar-hover: rgba(255, 255, 255, 0.07);
    --sidebar-active: rgba(255, 107, 0, 0.18);
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --text-muted: rgba(255, 255, 255, 0.38);
    --text-soft: rgba(255, 255, 255, 0.65);

    --bg-white: #f9fafb;
    --bg-soft: #f3f4f6;
    --text-dark: #111827;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    text-transform: lowercase;
}

body {
    background: var(--bg-white);
    color: var(--text-dark);
    display: flex;
    min-height: 100vh;
}

/* ─────────────────────────────────────
   MARCA DE AGUA GLOBAL
───────────────────────────────────── */
.watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 6vw;
    font-weight: 800;
    color: rgba(0, 0, 0, 0.025);
    z-index: 0;
    pointer-events: none;
    white-space: nowrap;
}

/* ─────────────────────────────────────
   TOAST DE ESTADO DE CONEXIÓN
───────────────────────────────────── */
.db-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    background: #1a1a2e;
    color: #fff;
    padding: 12px 20px;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateY(80px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
    pointer-events: none;
}

.db-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.db-toast.success {
    border-color: rgba(34, 197, 94, 0.4);
}

.db-toast.error {
    border-color: rgba(239, 68, 68, 0.4);
}

.db-toast-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.db-toast.success .db-toast-dot {
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
}

.db-toast.error .db-toast-dot {
    background: #ef4444;
    box-shadow: 0 0 6px #ef4444;
}

/* ═══════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════ */
.sidebar {
    width: 270px;
    background: var(--sidebar-bg);
    color: white;
    position: fixed;
    height: 100vh;
    z-index: 200;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.35);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* En modo rail: overflow visible para que los tooltips salgan del sidebar */
.sidebar.collapsed,
body.sidebar-collapsed .sidebar {
    overflow: visible !important;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* ── HEADER ── */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 16px;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
    gap: 10px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 11px;
}

.logo-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #ff8c00, #ff4500);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.4);
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.logo-fallback {
    color: white;
    font-size: 1.4rem;
    font-weight: 900;
    text-transform: uppercase;
}

.sidebar-logo-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.logo-pre {
    font-size: 0.58rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.logo-name {
    font-size: 1.18rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    text-transform: lowercase;
}

.logo-sub {
    font-size: 0.62rem;
    color: var(--text-muted);
    text-transform: none;
    margin-top: 1px;
    line-height: 1.3;
}

.sidebar-ext-logo {
    flex-shrink: 0;
    margin-left: 6px;
}

.ext-logo-img {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--sidebar-border);
    display: block;
}

/* ── SESIÓN DE USUARIO ── */
.user-session {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin: 14px 12px 4px;
    background: #2a2a2a;
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.user-session:hover {
    background: #333;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--orange-grad);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.95rem;
    color: white;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.user-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: lowercase;
}

.user-status {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    text-transform: none;
}

.status-dot {
    font-size: 0.4rem;
    color: #22c55e;
}

.user-arrow {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ── SECCIONES NAV ── */
.nav-section {
    padding: 14px 12px 4px;
}

.section-title {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 0 4px;
    display: block;
    margin-bottom: 6px;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.nav-item>a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 10px;
    border-radius: 11px;
    color: var(--text-soft);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: background 0.18s, color 0.18s;
    text-transform: lowercase;
    cursor: pointer;
}

.nav-item>a:hover {
    background: var(--sidebar-hover);
    color: #ffffff;
}

.nav-item-active>a {
    background: var(--sidebar-active) !important;
    color: #ffffff !important;
    border-left: 3px solid var(--orange);
    padding-left: 7px !important;
}

.nav-label {
    flex: 1;
    text-transform: lowercase;
}

/* ── ÍCONOS ── */
.nav-icon {
    width: 33px;
    height: 33px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    transition: transform 0.18s;
}

.nav-item>a:hover .nav-icon {
    transform: scale(1.08);
}

.nav-icon-inicio {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
}

.nav-icon-anki {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: #fff;
}

.nav-icon-video {
    background: linear-gradient(135deg, #06b6d4, #0284c7);
    color: #fff;
}

.nav-icon-fire {
    background: linear-gradient(135deg, #78350f, #92400e);
    color: #fff;
}

.nav-icon-banco {
    background: linear-gradient(135deg, #166534, #15803d);
    color: #fff;
}

.nav-icon-sim {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #fff;
}

.nav-icon-eval {
    background: linear-gradient(135deg, #991b1b, #b91c1c);
    color: #fff;
}

.nav-icon-quiz {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
}

.nav-icon-hang {
    background: linear-gradient(135deg, #0ea5e9, #0369a1);
    color: #fff;
}

/* ── ARROW ── */
.arrow {
    font-size: 0.72rem;
    color: var(--text-muted);
    transition: transform 0.3s;
    flex-shrink: 0;
    margin-left: auto;
}

/* ── BADGES ── */
.nav-badge {
    font-size: 0.56rem;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.badge-soon {
    background: #1e40af;
    color: #93c5fd;
}

.badge-new {
    background: #166534;
    color: #86efac;
}

.badge-game {
    background: #7c2d12;
    color: #fb923c;
}

.nav-emoji {
    font-size: 0.95rem;
    flex-shrink: 0;
}

/* ══════════════════════════════════════
   SUBMENÚ NIVEL 1 — Materias
══════════════════════════════════════ */
.submenu {
    list-style: none;
    display: none;
    margin: 2px 0 4px 0;
}

.submenu.active {
    display: block;
}

.subject-item {
    margin-bottom: 2px;
}

.subject-item>a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px 9px 44px;
    border-radius: 9px;
    color: var(--text-soft);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: background 0.18s, color 0.18s;
    text-transform: lowercase;
    cursor: pointer;
}

.subject-item>a:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.arrow-sub {
    font-size: 0.65rem;
    color: var(--text-muted);
    transition: transform 0.25s;
    flex-shrink: 0;
}

/* ══════════════════════════════════════
   SUBMENÚ NIVEL 2 — Temas
══════════════════════════════════════ */
.submenu-topics {
    padding-left: 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.07);
    margin-left: 52px;
}

.submenu-topics li a {
    display: block;
    padding: 7px 10px;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.83rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    text-transform: lowercase;
}

.submenu-topics li a:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.loading {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-style: italic;
    padding: 7px 10px;
    display: block;
}

/* ══════════════════════════════════════
   MI PROGRESO
══════════════════════════════════════ */
.progress-section {
    margin-top: auto;
    padding-top: 14px;
}

.progress-card {
    background: #242424;
    border: 1px solid var(--sidebar-border);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.progress-stats-row {
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.prog-stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.prog-num {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--orange-light);
    line-height: 1;
    text-transform: none;
}

.prog-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: lowercase;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.prog-divider {
    width: 1px;
    height: 28px;
    background: var(--sidebar-border);
}

.prog-materia-row {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
}

.prog-book-icon {
    font-size: 0.8rem;
    color: var(--orange-light);
    flex-shrink: 0;
}

.prog-materia-row span {
    font-size: 0.78rem;
    color: var(--text-soft);
    text-transform: lowercase;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prog-bar-wrap {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 99px;
    overflow: hidden;
}

.prog-bar-fill {
    height: 100%;
    background: var(--orange-grad);
    border-radius: 99px;
    width: 0%;
    transition: width 0.5s ease;
}

.prog-bar-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.prog-bar-labels span {
    font-size: 0.62rem;
    color: var(--text-muted);
    text-transform: none;
    font-weight: 600;
}

/* ─────────────────────────────────────
   MAIN CONTENT
───────────────────────────────────── */
.main-content {
    margin-left: 270px;
    flex: 1;
    padding: 40px 50px;
    position: relative;
    z-index: 5;
    background: var(--bg-white);
    transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.top-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: var(--bg-soft);
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid #eee;
}

.st-label {
    font-size: 0.78rem;
    color: #95a5a6;
    display: block;
}

.st-val {
    font-size: 1.2rem;
    font-weight: 800;
    color: #ff4500;
}

/* ═══════════════════════════════════════════════
   PANTALLA INICIO
═══════════════════════════════════════════════ */
.home-screen {
    max-width: 860px;
}

/* Hero */
.home-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d1a00 100%);
    border-radius: 24px;
    padding: 40px 44px;
    margin-bottom: 32px;
    overflow: hidden;
    position: relative;
}

.home-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 50%, rgba(255, 107, 0, 0.18) 0%, transparent 65%);
}

.home-hero-text {
    position: relative;
    z-index: 2;
}

.home-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 10px;
    text-transform: lowercase;
}

.home-title-accent {
    background: var(--orange-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: none;
    font-weight: 400;
}

.home-hero-art {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.hero-icon-ring {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid rgba(255, 107, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
    color: var(--orange-light);
    background: rgba(255, 107, 0, 0.08);
    animation: pulse-ring 2.5s ease-in-out infinite;
}

@keyframes pulse-ring {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 0, 0.25);
    }

    50% {
        box-shadow: 0 0 0 14px rgba(255, 107, 0, 0);
    }
}

/* Grid de acceso rápido */
.home-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.home-card {
    border-radius: 20px;
    padding: 22px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s;
    border: 1.5px solid transparent;
}

.home-card:hover {
    transform: translateY(-4px);
}

.home-card:active {
    transform: scale(0.97);
    transition: transform 0.1s ease;
}

.home-card-orange {
    background: linear-gradient(135deg, #fff4ed, #ffe8d6);
    border-color: #fcd5b0;
}

.home-card-orange:hover {
    box-shadow: 0 8px 24px rgba(255, 107, 0, 0.2);
}

.home-card-purple {
    background: linear-gradient(135deg, #f5f0ff, #ede8ff);
    border-color: #d8cfff;
}

.home-card-purple:hover {
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2);
}

.home-card-green {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-color: #bbf7d0;
}

.home-card-green:hover {
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.2);
}

.home-card-blue {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-color: #bfdbfe;
}

.home-card-blue:hover {
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.hc-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.home-card-orange .hc-icon {
    background: var(--orange-grad);
    color: #fff;
}

.home-card-purple .hc-icon {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: #fff;
}

.home-card-green .hc-icon {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
}

.home-card-blue .hc-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
}

.hc-body {
    flex: 1;
}

.hc-body h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 4px;
    text-transform: lowercase;
}

.hc-body p {
    font-size: 0.78rem;
    color: #6b7280;
    font-weight: 400;
    line-height: 1.4;
    text-transform: none;
}

.hc-arrow {
    color: #9ca3af;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.hc-soon {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: #dbeafe;
    color: #1d4ed8;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* Materias */
.home-subjects {
    margin-bottom: 28px;
}

.home-section-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: lowercase;
}

.home-section-title i {
    color: var(--orange);
}

.subjects-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.subject-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s;
    text-transform: lowercase;
}

.subject-chip:hover {
    transform: translateY(-2px);
}

.subject-morf {
    background: #fff4ed;
    color: #ea580c;
    border: 2px solid #fed7aa;
}

.subject-morf:hover {
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.2);
}

.subject-bio {
    background: #f0fdf4;
    color: #16a34a;
    border: 2px solid #bbf7d0;
}

.subject-bio:hover {
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.2);
}

.subject-salud {
    background: #eff6ff;
    color: #2563eb;
    border: 2px solid #bfdbfe;
}

.subject-salud:hover {
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2);
}

/* Stats sesión */
.home-session-stats {
    margin-bottom: 28px;
}

.session-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.ss-box {
    background: var(--bg-soft);
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.ss-icon {
    font-size: 1.2rem;
    color: var(--orange);
}

.ss-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-dark);
    text-transform: none;
    line-height: 1;
}

.ss-label {
    font-size: 0.7rem;
    color: #9ca3af;
    text-transform: lowercase;
    font-weight: 600;
}

/* Tip del día */
.home-tip-card {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1px solid #fde68a;
    border-radius: 16px;
    padding: 18px 22px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.tip-icon {
    font-size: 1.4rem;
    color: #f59e0b;
    flex-shrink: 0;
    margin-top: 2px;
}

.tip-body h4 {
    font-size: 0.82rem;
    font-weight: 800;
    color: #92400e;
    margin-bottom: 5px;
    text-transform: lowercase;
}

.tip-body p {
    font-size: 0.85rem;
    color: #78350f;
    font-weight: 400;
    line-height: 1.5;
    text-transform: none;
}

/* ─────────────────────────────────────
   FLASHCARD — TIPOGRAFÍA MEJORADA
───────────────────────────────────── */
.study-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Header del área de flashcards */
.study-area-header {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 660px;
    margin-bottom: 20px;
}

.study-area-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-dark);
    text-transform: lowercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.study-area-title i {
    color: #a855f7;
}

.card-container {
    perspective: 1200px;
    width: 620px;
    height: 400px;
    margin: 0 auto 16px;
}

.card {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.card.flipped {
    transform: rotateY(180deg);
}

.face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background: var(--bg-white);
    border-radius: 28px;
    border: 1.5px solid #e8ecef;
    padding: 44px 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08), 0 6px 16px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.back {
    transform: rotateY(180deg);
    background: linear-gradient(155deg, #fffaf5, #fff4e6);
    border: 2px solid #ffb347;
    box-shadow: 0 20px 50px rgba(255, 107, 0, 0.12), 0 6px 16px rgba(255, 107, 0, 0.08);
}

/* Marca de agua tarjeta */
.card-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: clamp(1.4rem, 5.5vw, 2.2rem);
    font-weight: 900;
    letter-spacing: 6px;
    white-space: nowrap;
    color: rgba(0, 0, 0, 0.10);
    pointer-events: none;
    z-index: 1;
    user-select: none;
    text-transform: uppercase;
    width: max-content;
}

.card-tag {
    position: absolute;
    top: 18px;
    left: 24px;
    font-size: 0.76rem;
    font-weight: 700;
    color: #c0c8d0;
    z-index: 1;
    background: rgba(0, 0, 0, 0.04);
    padding: 3px 10px;
    border-radius: 20px;
}

/* ── TEXTO DE LA TARJETA — TAMAÑO MEJORADO Y LEGIBLE ── */
.text-inner {
    overflow-y: auto;
    max-height: 100%;
    position: relative;
    z-index: 1;
    width: 100%;
    text-align: center;
    padding: 8px 4px;
}

.text-inner p {
    font-size: clamp(1.25rem, 2.2vw, 1.65rem);
    font-weight: 600;
    line-height: 1.55;
    color: #1e272e;
    text-transform: none;
    letter-spacing: -0.01em;
}

/* El reverso con color naranja más legible */
.back-text p {
    color: #c0450a;
    font-size: clamp(1.2rem, 2.1vw, 1.6rem);
    font-weight: 700;
    line-height: 1.5;
}

/* Scrollbar suave dentro de la tarjeta */
.text-inner::-webkit-scrollbar {
    width: 3px;
}

.text-inner::-webkit-scrollbar-track {
    background: transparent;
}

.text-inner::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

/* ─────────────────────────────────────
   CONTADOR DE TARJETAS
───────────────────────────────────── */
.card-counter {
    text-align: center;
    font-size: 0.82rem;
    color: #95a5a6;
    font-weight: 600;
    margin-bottom: 18px;
    letter-spacing: 1px;
}

/* ─────────────────────────────────────
   BOTÓN REVELAR
───────────────────────────────────── */
.btn-primary {
    background: var(--orange-grad);
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 800;
    width: 100%;
    max-width: 580px;
    display: block;
    margin: 0 auto;
    transition: 0.2s;
    box-shadow: 0 4px 14px rgba(255, 69, 0, 0.35);
    text-transform: lowercase;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 69, 0, 0.45);
}

/* ─────────────────────────────────────
   BOTONES ANKI
───────────────────────────────────── */
.action-zone {
    width: 100%;
    max-width: 620px;
}

.anki-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 620px;
    margin: 0 auto;
}

.anki-rating-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.btn-anki {
    border: none;
    padding: 16px 10px;
    border-radius: 14px;
    color: #fff;
    cursor: pointer;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
    text-transform: lowercase;
}

.btn-anki:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.btn-anki:active {
    transform: translateY(0px);
}

.yellow-intense {
    background: #f59e0b;
}

.red-intense {
    background: #dc2626;
}

.gold-intense {
    background: #ca8a04;
}

.blue-intense {
    background: #1d4ed8;
}

.nav-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.btn-nav {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 14px;
    background: #6b7280;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.35);
    letter-spacing: 0.5px;
    text-transform: lowercase;
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 16px rgba(107, 114, 128, 0.45);
}

.btn-nav:active {
    transform: translateY(0px);
}

.hidden {
    display: none !important;
}

/* ─────────────────────────────────────
   JUEGOS — SECCIÓN COMÚN
───────────────────────────────────── */
.game-section {
    max-width: 800px;
    width: 100%;
}

.game-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.game-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: lowercase;
}

.game-header h2 i {
    color: var(--orange);
}

.btn-back-game {
    background: var(--bg-soft);
    color: var(--text-dark);
    border: 1px solid #e5e7eb;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s;
    text-transform: lowercase;
}

.btn-back-game:hover {
    background: #e5e7eb;
}

/* ─────────────────────────────────────
   QUIZ RELÁMPAGO
───────────────────────────────────── */
.quiz-wrapper {
    max-width: 680px;
    margin: 0 auto;
}

.quiz-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-soft);
    border-radius: 16px;
    padding: 14px 20px;
    margin-bottom: 22px;
    border: 1px solid #e5e7eb;
}

.quiz-score-box {
    font-size: 1rem;
    font-weight: 800;
    color: var(--orange);
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: none;
}

.quiz-timer-box {
    font-size: 1rem;
    font-weight: 800;
    color: #6b7280;
    background: white;
    padding: 6px 16px;
    border-radius: 50px;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    text-transform: none;
}

.quiz-timer-box.timer-danger {
    color: #dc2626;
    border-color: #fca5a5;
    background: #fef2f2;
    animation: blink 0.5s ease infinite alternate;
}

@keyframes blink {
    from {
        opacity: 1;
    }

    to {
        opacity: 0.6;
    }
}

.quiz-q-count {
    font-size: 0.9rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: none;
}

.quiz-question-card {
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    border-radius: 20px;
    padding: 32px 36px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    min-height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.quiz-subject-tag {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--orange);
    text-transform: uppercase;
    margin-bottom: 12px;
    display: block;
}

.quiz-question-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.4;
    text-transform: none;
    white-space: pre-wrap;
}

.quiz-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.quiz-opt-btn {
    background: #f8f9fa;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    text-align: left;
    text-transform: none;
    transition: all 0.18s;
    line-height: 1.35;
}

.quiz-opt-btn:hover:not(:disabled) {
    background: #fff4ed;
    border-color: var(--orange);
    color: var(--orange);
}

.quiz-opt-btn:disabled {
    cursor: default;
}

.opt-correct {
    background: #f0fdf4 !important;
    border-color: #22c55e !important;
    color: #16a34a !important;
}

.opt-wrong {
    background: #fef2f2 !important;
    border-color: #ef4444 !important;
    color: #dc2626 !important;
}

.quiz-feedback {
    text-align: center;
    font-size: 1rem;
    font-weight: 800;
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 12px;
    text-transform: none;
}

.feedback-ok {
    background: #f0fdf4;
    color: #16a34a;
}

.feedback-fail {
    background: #fef2f2;
    color: #dc2626;
}

.quiz-result {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.quiz-wrapper {
    position: relative;
}

.quiz-result-inner {
    text-align: center;
    padding: 40px;
}

.result-emoji {
    font-size: 4rem;
    margin-bottom: 12px;
    line-height: 1;
}

.quiz-result-inner h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 8px;
    text-transform: lowercase;
}

.quiz-result-inner p {
    font-size: 1rem;
    color: #6b7280;
    text-transform: none;
}

/* ─────────────────────────────────────
   AHORCADO MÉDICO
───────────────────────────────────── */
.hangman-wrapper {
    max-width: 720px;
    margin: 0 auto;
}

.hangman-top {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    background: var(--bg-soft);
    border: 1.5px solid #e5e7eb;
    border-radius: 24px;
    padding: 28px 32px;
    margin-bottom: 24px;
}

.hangman-figure {
    flex-shrink: 0;
}

.hangman-svg {
    width: 130px;
    height: 175px;
    color: #374151;
}

.hm-part {
    opacity: 0;
    transition: opacity 0.3s;
}

.hangman-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hm-category-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #fff4ed;
    color: var(--orange);
    padding: 4px 12px;
    border-radius: 20px;
    align-self: flex-start;
}

.hm-hint {
    font-size: 0.9rem;
    color: #6b7280;
    font-style: italic;
    font-weight: 500;
    text-transform: none;
    line-height: 1.4;
}

.hm-word {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-end;
}

.hm-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 40px;
    border-bottom: 3px solid #374151;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-dark);
    text-transform: uppercase;
    transition: color 0.2s;
}

.hm-letter.hm-revealed {
    color: var(--orange);
    border-color: var(--orange);
}

.hm-space {
    border-bottom: none;
    width: 20px;
}

.hm-errors {
    font-size: 0.88rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: none;
}

/* Teclado ahorcado */
.hm-keyboard {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.hm-key {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    text-transform: lowercase;
    transition: all 0.15s;
}

.hm-key:hover:not(:disabled) {
    background: #fff4ed;
    border-color: var(--orange);
    color: var(--orange);
}

.hm-key:disabled {
    cursor: default;
    opacity: 0.6;
}

.hm-key-correct {
    background: #f0fdf4 !important;
    border-color: #22c55e !important;
    color: #16a34a !important;
    opacity: 1 !important;
}

.hm-key-wrong {
    background: #fef2f2 !important;
    border-color: #ef4444 !important;
    color: #dc2626 !important;
    opacity: 1 !important;
}

.hm-result {
    text-align: center;
    background: var(--bg-soft);
    border: 1.5px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px 30px;
}

.hm-result p {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
    text-transform: none;
}

.hm-result strong {
    color: var(--orange);
}

/* ─────────────────────────────────────
   HAMBURGUESA + OVERLAY
───────────────────────────────────── */

/* Botón flotante legacy - hidden, replaced by mobile-topbar */
.hamburger-open {
    display: none;
}

/* ── BOTÓN UNIFICADO HAMBURGUESA (sidebar header) ── */
.sidebar-toggle-btn {
    display: flex;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    width: 38px;
    height: 38px;
    font-size: 1rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
    margin-left: auto;
}

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

/* ── MOBILE TOPBAR (barra superior en mobile) ── */
.mobile-topbar {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.07);
}

.mobile-menu-btn {
    background: linear-gradient(135deg, #ff8c00, #ff4500);
    color: white;
    border: none;
    border-radius: 10px;
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(255, 69, 0, 0.3);
}

.mobile-topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-topbar-logo {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, #ff8c00, #ff4500);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-topbar-name {
    font-size: clamp(0.72rem, 3.8vw, 0.94rem);
    font-weight: 800;
    color: #111;
    text-transform: lowercase;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 50;
}

.overlay.active {
    display: block;
}

/* ─────────────────────────────────────
   RESPONSIVE MOBILE
───────────────────────────────────── */
@media (max-width: 768px) {
    .mobile-topbar {
        display: flex;
    }

    /* Ocultar topbar cuando sidebar está abierto */
    body.sidebar-open .mobile-topbar {
        display: none;
    }

    .sidebar-toggle-btn {
        /* En mobile se muestra normalmente (cierra el sidebar) */
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 100;
    }

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

    .main-content {
        margin-left: 0;
        padding: 0 0 30px;
    }

    .top-stats {
        flex-direction: column;
        gap: 10px;
        margin: 14px 14px 16px;
    }

    .stat-box {
        padding: 10px 16px;
    }

    /* Home mobile */
    .home-screen {
        padding: 0 16px 30px;
    }

    .home-hero {
        flex-direction: column;
        padding: 24px 18px;
        text-align: center;
        gap: 20px;
        margin-bottom: 20px;
        border-radius: 18px;
    }

    .home-title {
        font-size: 1.9rem;
    }

    /* Home grid mobile - 2 columnas mejoradas */
    .home-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0;
        margin-bottom: 24px;
    }

    .home-card {
        padding: 16px 14px;
        gap: 10px;
        flex-direction: column;
        align-items: flex-start;
        border-radius: 18px;
        overflow: hidden;
        min-width: 0;
        min-height: 120px;
        border-width: 2px;
    }

    .hc-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        font-size: 1.15rem;
        flex-shrink: 0;
    }

    .hc-body {
        width: 100%;
        min-width: 0;
        overflow: hidden;
    }

    .hc-body h3 {
        font-size: 0.88rem;
        font-weight: 800;
        margin-bottom: 4px;
        line-height: 1.2;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .hc-body p {
        font-size: 0.72rem;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        word-break: break-word;
        color: inherit;
        opacity: 0.75;
    }

    .hc-arrow {
        display: none;
    }

    .session-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .subjects-row {
        flex-direction: column;
    }

    .subject-chip {
        justify-content: center;
    }

    /* Flashcard mobile */
    .card-container {
        width: 100%;
        height: 340px;
        margin-bottom: 14px;
    }
    .text-inner p { font-size: clamp(1.15rem, 5vw, 1.4rem); }
    .back-text p { font-size: clamp(1.1rem, 4.8vw, 1.35rem); }
    .face { padding: 28px 24px; }

    .btn-anki {
        padding: 12px 8px;
        font-size: 0.88rem;
        border-radius: 14px;
        flex: 1;
        font-weight: 800;
    }

    .anki-rating-row {
        gap: 8px;
    }

    .btn-nav {
        font-size: 0.85rem;
        padding: 10px 14px;
    }

    /* --- SIMULACRO MOBILE OPTIMIZATION --- */
    .sim-top-bar {
        padding: 8px 12px;
        margin-bottom: 10px;
        gap: 8px;
    }
    .sim-timer-wrap {
        padding: 5px 12px;
        font-size: 0.85rem;
        background: #f8fafc;
    }
    .sim-top-counter { font-size: 0.85rem; }
    .sim-top-meta { font-size: 0.7rem; }
    
    .sim-question-card {
        padding: 14px 16px !important;
        margin-bottom: 8px !important;
        border-radius: 16px !important;
    }
    .bq-question-text {
        font-size: 1.05rem !important;
        line-height: 1.4 !important;
    }
    .bq-question-meta { margin-bottom: 4px !important; }
    .bq-dificultad-label { display: none; } /* Gana espacio horizontal */

    .bq-options { gap: 6px !important; }
    .bq-opt-btn {
        padding: 8px 12px !important;
        font-size: 0.82rem !important;
        border-radius: 12px !important;
        line-height: 1.2 !important;
    }
    .bq-opt-letter {
        width: 24px !important;
        height: 24px !important;
        font-size: 0.75rem !important;
        margin-right: 8px !important;
    }

    .mobile-topbar {
        height: 56px;
        padding: 0 16px;
    }
}

@media (max-width: 400px) {
    .hm-key {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
        border-radius: 7px;
    }
}

/* ═══════════════════════════════════════════════════
   BANCO DE PREGUNTAS — ESTILOS COMPLETOS
═══════════════════════════════════════════════════ */

.banco-section {
    max-width: 860px;
    width: 100%;
}

/* ── HEADER BANCO ── */
.banco-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
}

.banco-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: lowercase;
    margin: 0;
}

.banco-title i {
    color: var(--orange);
}

.banco-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 3px;
    text-transform: none;
    font-weight: 400;
}

/* ── TARJETA CONFIG ── */
.banco-config-card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.banco-selects-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 0;
}

/* Dificultad va en su propia fila debajo de materia+tema */
.banco-dificultad-row {
    margin-top: 16px;
    margin-bottom: 24px;
}

.banco-dificultad-row .banco-select-label {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.banco-dificultad-row .banco-select-label i {
    color: var(--orange);
    font-size: 0.8rem;
}

/* ── Difficulty selector buttons ── */
.banco-dificultad-btns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.banco-dif-btn {
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    color: #6b7280;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-family: inherit;
    text-transform: lowercase;
    letter-spacing: 0.3px;
}

.banco-dif-btn i { font-size: 0.75rem; }

.banco-dif-btn:hover { transform: translateY(-1px); }

.banco-dif-btn.banco-dif-active {
    border-color: #6366f1;
    background: #eef2ff;
    color: #6366f1;
    box-shadow: 0 2px 8px rgba(99,102,241,0.2);
}

.banco-dif-btn.banco-dif-facil.active-selected {
    border-color: #10b981;
    background: #d1fae5;
    color: #065f46;
    box-shadow: 0 2px 8px rgba(16,185,129,0.2);
}

.banco-dif-btn.banco-dif-medio.active-selected {
    border-color: #f59e0b;
    background: #fef3c7;
    color: #92400e;
    box-shadow: 0 2px 8px rgba(245,158,11,0.2);
}

.banco-dif-btn.banco-dif-dificil.active-selected {
    border-color: #ef4444;
    background: #fee2e2;
    color: #991b1b;
    box-shadow: 0 2px 8px rgba(239,68,68,0.2);
}

/* ── Panel preguntas difíciles ── */
.banco-dificiles-panel {
    margin-top: 28px;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    border-radius: 20px;
    padding: 28px;
    color: #fff;
    box-shadow: 0 8px 32px rgba(99,102,241,0.18);
    position: relative;
    overflow: hidden;
}

.banco-dificiles-panel::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(99,102,241,0.3) 0%, transparent 70%);
    pointer-events: none;
}

.banco-dificiles-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.banco-dificiles-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.banco-dificiles-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99,102,241,0.4);
}

.banco-dificiles-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 3px;
}

.banco-dificiles-subtitle {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.55);
    margin: 0;
}

.banco-dificiles-practica-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(99,102,241,0.35);
    white-space: nowrap;
    flex-shrink: 0;
}

.banco-dificiles-practica-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(99,102,241,0.5);
}

.banco-dificiles-state {
    text-align: center;
    padding: 20px;
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.banco-dificiles-state p { margin: 0; line-height: 1.5; }

.banco-dificiles-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

.banco-dificiles-list::-webkit-scrollbar { width: 4px; }
.banco-dificiles-list::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 4px; }
.banco-dificiles-list::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.4); border-radius: 4px; }

.banco-dificil-item {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
}

.banco-dificil-item:hover { background: rgba(255,255,255,0.1); }

.banco-dificil-rank {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.banco-dificil-rank.rank-2 { background: linear-gradient(135deg, #f97316, #ea580c); }
.banco-dificil-rank.rank-3 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.banco-dificil-rank.rank-n { background: rgba(255,255,255,0.12); }

.banco-dificil-body {
    flex: 1;
    min-width: 0;
}

.banco-dificil-pregunta {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.banco-dificil-meta {
    display: flex;
    gap: 10px;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    align-items: center;
}

.banco-dificil-meta span { display: flex; align-items: center; gap: 4px; }

.banco-dificil-rate {
    flex-shrink: 0;
    text-align: right;
}

.banco-dificil-pct {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: #ef4444;
    line-height: 1;
}

.banco-dificil-pct.rate-ok { color: #10b981; }
.banco-dificil-pct.rate-med { color: #f59e0b; }

.banco-dificil-label {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.35);
}

.banco-select-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.banco-select-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.banco-select-label i {
    color: var(--orange);
    font-size: 0.8rem;
}

.banco-custom-select {
    position: relative;
}

.banco-select-btn {
    width: 100%;
    background: var(--bg-soft);
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    text-transform: lowercase;
    text-align: left;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: 'Outfit', sans-serif;
}

.banco-select-btn:hover:not(.banco-select-disabled) {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.banco-select-btn i {
    font-size: 0.72rem;
    color: #9ca3af;
    transition: transform 0.25s;
    flex-shrink: 0;
}

.banco-select-btn.open i {
    transform: rotate(180deg);
}

.banco-select-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.banco-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
    z-index: 100;
    max-height: 240px;
    overflow-y: auto;
    padding: 6px;
}

.banco-dropdown::-webkit-scrollbar {
    width: 4px;
}

.banco-dropdown::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 4px;
}

.banco-dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    border-radius: 9px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    text-align: left;
    text-transform: lowercase;
    font-family: 'Outfit', sans-serif;
    transition: background 0.15s, color 0.15s;
}

.banco-dropdown-item:hover {
    background: #fff4ed;
    color: var(--orange);
}

.banco-dropdown-item.selected {
    background: rgba(255, 107, 0, 0.1);
    color: var(--orange);
    font-weight: 700;
}

.banco-dropdown-item.all-option {
    color: #6b7280;
    font-style: italic;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 4px;
}

.banco-dropdown-item.all-option:hover {
    background: #f9fafb;
    color: var(--text-dark);
}

.banco-loading-opts {
    padding: 14px 16px;
    font-size: 0.85rem;
    color: #9ca3af;
    text-align: center;
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ── RESUMEN CONFIG ── */
.banco-config-summary {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.banco-summary-item {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.87rem;
    color: #6b7280;
    text-transform: none;
}

.banco-summary-item i {
    color: var(--orange);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.banco-summary-item strong {
    color: var(--text-dark);
    font-weight: 800;
}

.banco-start-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.banco-start-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ══════════════════════════════════════════════
   BANCO QUIZ — ÁREA DE PREGUNTAS
══════════════════════════════════════════════ */

.banco-quiz-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.banco-quiz-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    flex-wrap: wrap;
}

.banco-meta-materia {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #fff4ed;
    color: var(--orange);
    padding: 4px 12px;
    border-radius: 20px;
}

.banco-meta-sep {
    color: #d1d5db;
    font-size: 0.9rem;
}

.banco-meta-tema {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: none;
}

.banco-quiz-counter {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--bg-soft);
    border: 1.5px solid #e5e7eb;
    border-radius: 50px;
    padding: 6px 18px;
    flex-shrink: 0;
}

.bq-num {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--orange);
    text-transform: none;
}

.bq-sep {
    font-size: 0.9rem;
    color: #d1d5db;
    margin: 0 2px;
    text-transform: none;
}

.bq-total {
    font-size: 1rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: none;
}

/* ── TARJETA DE PREGUNTA ── */
.bq-question-card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 20px;
    padding: 28px 32px;
    margin-bottom: 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.bq-question-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--orange-grad);
    border-radius: 4px 0 0 4px;
}

.bq-question-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.bq-dificultad-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bq-dificultad-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.bq-dot {
    width: 12px;
    height: 5px;
    border-radius: 3px;
    background: #e5e7eb;
    display: inline-block;
}

.bq-dot.active-facil {
    background: #22c55e;
}

.bq-dot.active-medio {
    background: #f59e0b;
}

.bq-dot.active-dificil {
    background: #ef4444;
}

.bq-num-badge {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 700;
    background: #f3f4f6;
    color: #6b7280;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: none;
}

.bq-question-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.55;
    text-transform: none;
}

/* ── OPCIONES ── */
.bq-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.bq-option-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 18px;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    cursor: pointer;
    text-align: left;
    font-size: 0.93rem;
    font-weight: 600;
    color: var(--text-dark);
    text-transform: none;
    font-family: 'Outfit', sans-serif;
    transition: all 0.18s;
    position: relative;
}

.bq-option-btn:hover:not(:disabled) {
    background: #fff4ed;
    border-color: var(--orange);
    color: var(--orange);
}

.bq-option-btn:hover:not(:disabled) .bq-option-letter {
    background: var(--orange-grad);
    color: #fff;
    border-color: transparent;
}

.bq-option-btn:disabled {
    cursor: default;
}

.bq-option-letter {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1.5px solid #e5e7eb;
    background: var(--bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
    color: #6b7280;
    flex-shrink: 0;
    transition: all 0.18s;
    text-transform: uppercase;
}

/* Opción correcta */
.bq-option-btn.bq-correct {
    background: #f0fdf4 !important;
    border-color: #22c55e !important;
    color: #15803d !important;
}

.bq-option-btn.bq-correct .bq-option-letter {
    background: #22c55e;
    color: #fff;
    border-color: transparent;
}

.bq-option-btn.bq-correct .bq-option-check {
    display: flex;
}

/* Opción incorrecta */
.bq-option-btn.bq-wrong {
    background: #fef2f2 !important;
    border-color: #ef4444 !important;
    color: #dc2626 !important;
}

.bq-option-btn.bq-wrong .bq-option-letter {
    background: #ef4444;
    color: #fff;
    border-color: transparent;
}

/* ícono check/x dentro de la opción */
.bq-option-check {
    display: none;
    margin-left: auto;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    flex-shrink: 0;
}

.bq-correct .bq-option-check {
    background: #22c55e;
    color: #fff;
    display: flex;
}

.bq-wrong .bq-option-check {
    background: #ef4444;
    color: #fff;
    display: flex;
}

/* ── COMENTARIO ── */
.bq-comentario-wrap {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 24px;
}

.bq-comentario-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
    color: #92400e;
    width: 100%;
    text-align: left;
    font-family: 'Outfit', sans-serif;
    text-transform: lowercase;
}

.bq-comentario-toggle i:first-child {
    color: #f59e0b;
    font-size: 0.95rem;
}

.bq-comentario-toggle span {
    flex: 1;
}

.bq-comentario-toggle #bq-comentario-arrow {
    font-size: 0.72rem;
    transition: transform 0.25s;
    color: #b45309;
}

.bq-comentario-toggle.open #bq-comentario-arrow {
    transform: rotate(180deg);
}

.bq-comentario-body {
    padding: 0 18px 16px;
}

.bq-comentario-body p {
    font-size: 0.9rem;
    color: #78350f;
    line-height: 1.6;
    text-transform: none;
    font-weight: 400;
}

/* ── CÍRCULOS DE NAVEGACIÓN MIR ── */
.bq-nav-section {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 18px;
    padding: 20px 24px;
    margin-bottom: 20px;
}

.bq-nav-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.bq-nav-title i {
    color: var(--orange);
}

.bq-circles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bq-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    background: var(--bg-soft);
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s;
    flex-shrink: 0;
    text-transform: none;
    font-family: 'Outfit', sans-serif;
}

.bq-circle:hover {
    border-color: var(--orange);
    color: var(--orange);
    background: #fff4ed;
}

.bq-circle.bq-circle-active {
    background: var(--orange-grad);
    border-color: var(--orange);
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.35);
}

.bq-circle.bq-circle-correct {
    background: #22c55e;
    border-color: #22c55e;
    color: #fff;
}

.bq-circle.bq-circle-wrong {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

.bq-circle.bq-circle-active.bq-circle-correct {
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.bq-circle.bq-circle-active.bq-circle-wrong {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* ── NAVEGACIÓN INFERIOR ── */
.bq-bottom-nav {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 30px;
}

.bq-btn-prev {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--bg-soft);
    border: 1.5px solid #e5e7eb;
    color: #6b7280;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s;
    flex-shrink: 0;
}

.bq-btn-prev:hover {
    background: #e5e7eb;
    color: var(--text-dark);
}

.bq-btn-prev:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.bq-btn-next {
    flex: 1;
    padding: 14px 20px;
    background: var(--orange-grad);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.18s;
    text-transform: lowercase;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 4px 14px rgba(255, 107, 0, 0.3);
}

.bq-btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 107, 0, 0.4);
}

.bq-btn-next:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.bq-btn-finish {
    padding: 14px 18px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: all 0.18s;
    text-transform: lowercase;
    font-family: 'Outfit', sans-serif;
    flex-shrink: 0;
}

.bq-btn-finish:hover {
    background: #333;
}

/* ── RESULTADO FINAL ── */
.bq-result {
    position: fixed;
    top: 0;
    left: 270px;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.97);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 20px;
}

.bq-result-inner {
    text-align: center;
    max-width: 480px;
    width: 100%;
    background: #fff;
    border-radius: 28px;
    padding: 40px 36px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1.5px solid #e5e7eb;
}

.bq-result-emoji {
    font-size: 3.5rem;
    margin-bottom: 14px;
    line-height: 1;
}

.bq-result-inner h3 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 6px;
    text-transform: lowercase;
}

.bq-result-inner p {
    font-size: 0.95rem;
    color: #6b7280;
    text-transform: none;
    margin-bottom: 20px;
}

.bq-result-stats {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 6px;
}

.bq-rs-box {
    flex: 1;
    border-radius: 14px;
    padding: 16px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    border: 1.5px solid transparent;
}

.bq-rs-box i {
    font-size: 1rem;
    margin-bottom: 2px;
}

.bq-rs-box span {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
    text-transform: none;
}

.bq-rs-box label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: lowercase;
    letter-spacing: 0.3px;
}

.bq-rs-correct {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.bq-rs-correct i,
.bq-rs-correct span {
    color: #16a34a;
}

.bq-rs-correct label {
    color: #166534;
}

.bq-rs-wrong {
    background: #fef2f2;
    border-color: #fecaca;
}

.bq-rs-wrong i,
.bq-rs-wrong span {
    color: #dc2626;
}

.bq-rs-wrong label {
    color: #991b1b;
}

.bq-rs-pending {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.bq-rs-pending i,
.bq-rs-pending span {
    color: #6b7280;
}

.bq-rs-pending label {
    color: #6b7280;
}


/* ── RESPONSIVE BANCO ── */
@media (max-width: 768px) {
    .banco-selects-row {
        grid-template-columns: 1fr;
    }

    .banco-dificultad-btns {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .banco-dif-btn {
        font-size: 0.75rem;
        padding: 10px 8px;
    }

    .banco-dificiles-panel {
        padding: 20px 16px;
    }

    .banco-dificiles-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .banco-dificiles-practica-btn {
        width: 100%;
        justify-content: center;
    }

    .banco-config-card {
        padding: 20px 18px;
    }

    .bq-question-card {
        padding: 20px 18px 20px 22px;
    }

    .bq-question-text {
        font-size: 0.97rem;
    }

    .bq-options {
        gap: 8px;
    }

    .bq-option-btn {
        padding: 12px 14px;
        font-size: 0.88rem;
        gap: 11px;
    }

    .bq-circles {
        gap: 6px;
    }

    .bq-circle {
        width: 34px;
        height: 34px;
        font-size: 0.75rem;
    }

    .bq-result-stats {
        gap: 8px;
    }

    .bq-rs-box span {
        font-size: 1.5rem;
    }

    .banco-quiz-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    /* Bottom nav en mobile: prev | siguiente | finalizar en una fila */
    .bq-bottom-nav {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        align-items: center;
        padding: 0 0 12px;
    }

    .bq-btn-prev {
        width: 46px;
        height: 46px;
        min-width: 46px;
        flex-shrink: 0;
        border-radius: 12px;
    }

    .bq-btn-next {
        flex: 1;
        min-width: 0;
        padding: 13px 10px;
        font-size: 0.88rem;
    }

    .bq-btn-finish {
        padding: 13px 12px;
        font-size: 0.8rem;
        flex-shrink: 0;
        white-space: nowrap;
    }

    .bq-result {
        left: 0;
    }

    .db-toast {
        bottom: 16px;
        right: 16px;
        left: 16px;
        font-size: 0.82rem;
    }
}

/* ── ANIMACIONES EXTRA ── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

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

.banco-dropdown-item {
    animation: fadeInUp 0.2s ease both;
}

.banco-dropdown-item:nth-child(1) {
    animation-delay: 0.02s;
}

.banco-dropdown-item:nth-child(2) {
    animation-delay: 0.04s;
}

.banco-dropdown-item:nth-child(3) {
    animation-delay: 0.06s;
}

.banco-dropdown-item:nth-child(4) {
    animation-delay: 0.08s;
}

.banco-dropdown-item:nth-child(5) {
    animation-delay: 0.10s;
}

.banco-dropdown-item:nth-child(6) {
    animation-delay: 0.12s;
}

/* Skeleton loader para preguntas del banco */
.bq-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
    border-radius: 8px;
    display: block;
}

@keyframes shimmer {
    from {
        background-position: 200% 0;
    }

    to {
        background-position: -200% 0;
    }
}

/* Pulsing loader para el spinner en materias */
.fa-spinner.fa-spin {
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Mejorar transición de pantallas */
.banco-section,
.home-screen,
.study-area,
.game-section {
    animation: fadeInUp 0.3s ease both;
}

/* Resaltar el item del banco activo en sidebar */
#nav-banco a:hover .nav-icon,
#nav-inicio a:hover .nav-icon {
    transform: scale(1.12) rotate(-4deg);
}

/* Borde naranja animado al cargar el banco */
.banco-config-card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s;
}

.banco-config-card:focus-within {
    box-shadow: 0 8px 32px rgba(255, 107, 0, 0.12);
    border-color: rgba(255, 107, 0, 0.25);
}

/* ── HOME CARDS NUEVAS ── */
.home-card-sim {
    background: linear-gradient(135deg, #f5f0ff, #ede8ff);
    border-color: #d8cfff;
}

.home-card-sim:hover {
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.2);
}

.home-card-sim .hc-icon {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #fff;
}

.home-card-eval {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-color: #bbf7d0;
}

.home-card-eval:hover {
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.2);
}

.home-card-eval .hc-icon {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
}

/* ═══════════════════════════════════════════════════
   SIMULACRO
═══════════════════════════════════════════════════ */
.simulacro-section {
    max-width: 860px;
    width: 100%;
}

.sim-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
}

.sim-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: lowercase;
    margin: 0;
}

.sim-title i {
    color: var(--orange);
}

.sim-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 3px;
    text-transform: none;
    font-weight: 400;
}

.sim-config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.sim-config-card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 20px;
    padding: 24px 26px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.sim-config-card:focus-within {
    border-color: rgba(255, 107, 0, 0.3);
    box-shadow: 0 8px 28px rgba(255, 107, 0, 0.1);
}

.sim-config-section-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.sim-config-section-title i {
    color: var(--orange);
}

/* Modos */
.sim-mode-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.sim-mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 14px 10px;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    background: var(--bg-soft);
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: all 0.2s;
    text-align: center;
}

.sim-mode-btn i {
    font-size: 1.2rem;
    color: #9ca3af;
}

.sim-mode-btn span {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: lowercase;
}

.sim-mode-btn small {
    font-size: 0.7rem;
    color: #9ca3af;
    text-transform: none;
}

.sim-mode-btn:hover {
    border-color: var(--orange);
    background: #fff4ed;
}

.sim-mode-btn:hover i {
    color: var(--orange);
}

.sim-mode-active {
    border-color: var(--orange) !important;
    background: linear-gradient(135deg, #fff4ed, #ffe8d6) !important;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.18);
}

.sim-mode-active i {
    color: var(--orange) !important;
}

.sim-materia-group {
    margin-top: 12px;
}

/* Duración */
.sim-duration-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.sim-dur-btn {
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: var(--bg-soft);
    font-size: 0.9rem;
    font-weight: 700;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.18s;
    font-family: 'Outfit', sans-serif;
    text-transform: lowercase;
}

.sim-dur-btn:hover {
    border-color: var(--orange);
    color: var(--orange);
}

.sim-dur-active {
    border-color: var(--orange) !important;
    background: var(--orange-grad) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
}

/* Slider NQ */
.sim-nq-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sim-nq-slider {
    flex: 1;
    -webkit-appearance: none;
    height: 6px;
    border-radius: 99px;
    background: #e5e7eb;
    outline: none;
    cursor: pointer;
}

.sim-nq-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--orange-grad);
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.4);
    cursor: pointer;
    border: 3px solid #fff;
}

.sim-nq-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 56px;
}

.sim-nq-display span {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--orange);
    line-height: 1;
    text-transform: none;
}

.sim-nq-display label {
    font-size: 0.65rem;
    color: #9ca3af;
    text-transform: lowercase;
    font-weight: 600;
}

/* Launch card */
.sim-launch-card {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d1a00 100%);
    border-color: rgba(255, 107, 0, 0.2);
}

.sim-launch-card .sim-config-section-title {
    color: rgba(255, 255, 255, 0.5);
}

.sim-summary-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
}

.sim-summary-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.88rem;
}

.sim-summary-item i {
    color: var(--orange);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sim-summary-item div {
    display: flex;
    flex-direction: column;
}

.sim-summary-item strong {
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    text-transform: lowercase;
}

.sim-summary-item span {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: lowercase;
}

.sim-summary-divider {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.12);
}

.sim-start-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sim-warning-text {
    margin-top: 12px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    text-align: center;
    text-transform: none;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.sim-warning-text i {
    color: #f59e0b;
}

/* ── BARRA SUPERIOR DEL EXAMEN ── */
.sim-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 16px;
    padding: 12px 18px;
    margin-bottom: 20px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    gap: 12px;
    flex-wrap: wrap;
}

.sim-top-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.sim-top-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sim-top-meta span {
    font-size: 0.82rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: lowercase;
}

.sim-top-sep {
    color: #d1d5db;
}

.sim-timer-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #f3f4f6;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-dark);
    border: 2px solid #e5e7eb;
    transition: all 0.3s;
    text-transform: none;
}

.sim-timer-wrap i {
    color: #6b7280;
    font-size: 0.95rem;
}

.sim-timer-danger {
    color: #dc2626 !important;
    border-color: #fca5a5 !important;
    background: #fef2f2 !important;
    animation: blink 0.5s ease infinite alternate;
}

.sim-top-counter {
    font-size: 0.9rem;
    font-weight: 700;
    color: #6b7280;
    background: var(--bg-soft);
    padding: 6px 14px;
    border-radius: 50px;
    border: 1.5px solid #e5e7eb;
    text-transform: none;
}

/* Opción seleccionada en simulacro (sin revelar correcto/incorrecto) */
.sim-opt-selected {
    background: linear-gradient(135deg, #fff4ed, #ffe8d6) !important;
    border-color: var(--orange) !important;
    color: var(--orange) !important;
}

.sim-opt-selected .bq-option-letter {
    background: var(--orange-grad) !important;
    color: #fff !important;
    border-color: transparent !important;
}

.sim-question-card {
    margin-bottom: 18px;
}

/* ── RESULTADO SIMULACRO ── */
.sim-result-wrap {
    max-width: 680px;
    margin: 0 auto;
    background: #fff;
    border-radius: 28px;
    padding: 36px 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1.5px solid #e5e7eb;
}

.sim-result-header {
    text-align: center;
    margin-bottom: 28px;
}

.sim-result-emoji {
    font-size: 3.5rem;
    margin-bottom: 12px;
    line-height: 1;
}

.sim-result-header h2 {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text-dark);
    text-transform: lowercase;
    margin-bottom: 6px;
}

.sim-result-header p {
    font-size: 0.95rem;
    color: #6b7280;
    text-transform: none;
}

.sim-stats-row {
    margin-bottom: 20px;
}

.bq-rs-time {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.bq-rs-time i,
.bq-rs-time span {
    color: #2563eb;
}

.bq-rs-time label {
    color: #1e40af;
}

.sim-grade-bar-wrap {
    width: 100%;
    height: 10px;
    background: #e5e7eb;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 6px;
}

.sim-grade-bar-fill {
    height: 100%;
    border-radius: 99px;
    width: 0%;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.sim-grade-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #9ca3af;
    font-weight: 700;
    text-transform: none;
    margin-bottom: 24px;
}

/* Revisión */
.sim-review-section {
    margin-bottom: 24px;
}

.sim-review-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: lowercase;
}

.sim-review-title i {
    color: var(--orange);
}

.sim-review-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sim-review-item {
    border-radius: 14px;
    padding: 16px 18px;
    border: 1.5px solid #e5e7eb;
    background: #f9fafb;
}

.sim-rev-ok {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.sim-rev-fail {
    border-color: #fecaca;
    background: #fef2f2;
}

.sim-rev-pending {
    border-color: #e5e7eb;
    background: #f9fafb;
}

.sim-rev-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.sim-rev-num {
    font-size: 0.72rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: none;
}

.sim-rev-badge {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: lowercase;
}

.sim-rev-ok .sim-rev-badge {
    background: #dcfce7;
    color: #16a34a;
}

.sim-rev-fail .sim-rev-badge {
    background: #fee2e2;
    color: #dc2626;
}

.sim-rev-pending .sim-rev-badge {
    background: #f3f4f6;
    color: #6b7280;
}

.sim-rev-question {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.4;
    text-transform: none;
    margin-bottom: 8px;
}

.sim-rev-tu-resp,
.sim-rev-correcta {
    font-size: 0.82rem;
    color: #6b7280;
    text-transform: none;
    margin-bottom: 4px;
}

.sim-rev-correcta strong {
    color: #16a34a;
}

.sim-rev-tu-resp strong {
    color: #dc2626;
}

.sim-rev-ok .sim-rev-tu-resp strong {
    color: #16a34a;
}

.sim-rev-justif {
    font-size: 0.8rem;
    color: #78350f;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 8px 12px;
    margin-top: 8px;
    text-transform: none;
    line-height: 1.5;
    display: flex;
    gap: 7px;
    align-items: flex-start;
}

.sim-rev-justif i {
    color: #f59e0b;
    flex-shrink: 0;
    margin-top: 2px;
}

.sim-result-actions {
    text-align: center;
}


/* ═══════════════════════════════════════════════════
   EVALUACIÓN
═══════════════════════════════════════════════════ */
.evaluacion-section {
    max-width: 860px;
    width: 100%;
}

.eval-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
}

.eval-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: lowercase;
    margin: 0;
}

.eval-title i {
    color: var(--orange);
}

.eval-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 3px;
    text-transform: none;
    font-weight: 400;
}

/* Métricas globales */
.eval-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.eval-metric-card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 18px;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}

.eval-metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.09);
}

.eval-metric-icon {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.eval-metric-num {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
    text-transform: none;
}

.eval-metric-card label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: lowercase;
    letter-spacing: 0.3px;
}

/* Sección cards */
.eval-section-card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 20px;
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.eval-section-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: lowercase;
}

.eval-section-title i {
    color: var(--orange);
}

/* Materias */
.eval-materias-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.eval-materia-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.eval-materia-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.eval-materia-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: lowercase;
}

.eval-materia-pct {
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: none;
}

.eval-materia-bar-wrap {
    width: 100%;
    height: 7px;
    background: #f3f4f6;
    border-radius: 99px;
    overflow: hidden;
}

.eval-materia-bar {
    height: 100%;
    border-radius: 99px;
    transition: width 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.eval-materia-sub {
    font-size: 0.72rem;
    color: #9ca3af;
    text-transform: none;
    font-weight: 600;
}

/* Historial */
.eval-historial {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.eval-hist-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--bg-soft);
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    transition: background 0.18s;
    gap: 12px;
}

.eval-hist-card:hover {
    background: #fff;
}

.eval-hist-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.eval-hist-num {
    font-size: 0.72rem;
    font-weight: 800;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 4px 9px;
    border-radius: 8px;
    text-transform: none;
    flex-shrink: 0;
}

.eval-hist-materia {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: lowercase;
}

.eval-hist-fecha {
    display: block;
    font-size: 0.72rem;
    color: #9ca3af;
    text-transform: none;
    font-weight: 500;
    margin-top: 1px;
}

.eval-hist-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.eval-hist-pct {
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: none;
    line-height: 1;
}

.eval-hist-detail {
    font-size: 0.7rem;
    color: #9ca3af;
    text-transform: none;
    font-weight: 600;
}

.eval-empty {
    font-size: 0.88rem;
    color: #9ca3af;
    text-align: center;
    padding: 28px 0;
    text-transform: none;
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.eval-empty i {
    font-size: 1.5rem;
    color: #d1d5db;
}


/* ── RESPONSIVE SIMULACRO + EVALUACIÓN ── */
@media (max-width: 768px) {
    .sim-config-grid {
        grid-template-columns: 1fr;
    }

    .sim-launch-card {
        grid-column: 1;
    }

    .sim-mode-grid {
        grid-template-columns: 1fr 1fr;
    }

    .sim-duration-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sim-summary-row {
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .sim-top-bar {
        padding: 10px 14px;
        gap: 8px;
    }

    .sim-result-wrap {
        padding: 24px 18px;
    }

    .sim-review-item {
        padding: 12px 14px;
    }

    .eval-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .eval-section-card {
        padding: 18px 16px;
    }

    .eval-hist-card {
        padding: 12px 14px;
    }
}

/* ═══════════════════════════════════════════════════
   SIDEBAR TOGGLE BUTTON (desktop & mobile unified)
═══════════════════════════════════════════════════ */
.sidebar-toggle-desktop {
    /* Legacy: keep hidden, replaced by sidebar-toggle-btn */
    display: none !important;
}

/* ══════════════════════════════════════════
   SIDEBAR COLAPSADO (rail mode)
   Triggered by: .sidebar.collapsed  +  body.sidebar-collapsed
══════════════════════════════════════════ */

/* ── Ancho rail ── */
.sidebar.collapsed,
body.sidebar-collapsed .sidebar {
    width: 68px !important;
    overflow: visible !important;
}

/* ── Ocultar textos, badges, logos ── */
.sidebar.collapsed .sidebar-logo-text,
.sidebar.collapsed .sidebar-ext-logo,
.sidebar.collapsed .user-info,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .nav-emoji,
.sidebar.collapsed .section-title,
.sidebar.collapsed .progress-section,
.sidebar.collapsed .logo-pre,
.sidebar.collapsed .logo-sub,
.sidebar.collapsed .logo-icon,
body.sidebar-collapsed .sidebar-logo-text,
body.sidebar-collapsed .sidebar-ext-logo,
body.sidebar-collapsed .user-info,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .nav-badge,
body.sidebar-collapsed .nav-emoji,
body.sidebar-collapsed .section-title,
body.sidebar-collapsed .progress-section,
body.sidebar-collapsed .logo-pre,
body.sidebar-collapsed .logo-sub,
body.sidebar-collapsed .logo-icon {
    display: none !important;
}

/* ── Header: centrar solo el toggle btn ── */
.sidebar.collapsed .sidebar-logo,
body.sidebar-collapsed .sidebar .sidebar-logo {
    display: none !important;
}

.sidebar.collapsed .sidebar-header,
body.sidebar-collapsed .sidebar .sidebar-header {
    justify-content: center !important;
    padding: 12px 0 !important;
}

.sidebar.collapsed .sidebar-toggle-btn,
body.sidebar-collapsed .sidebar .sidebar-toggle-btn {
    display: flex !important;
    margin-left: 0 !important;
}

/* ── Nav sections ── */
.sidebar.collapsed .nav-section,
body.sidebar-collapsed .sidebar .nav-section {
    padding: 4px 0 !important;
    overflow: visible !important;
}

.sidebar.collapsed .nav-links,
body.sidebar-collapsed .sidebar .nav-links {
    gap: 2px !important;
    padding: 0 !important;
    overflow: visible !important;
}

/* ── Nav items: icono perfectamente centrado ── */
.sidebar.collapsed .nav-item > a,
.sidebar.collapsed .nav-item-simple > a,
body.sidebar-collapsed .sidebar .nav-item > a,
body.sidebar-collapsed .sidebar .nav-item-simple > a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 0 !important;
    width: 68px !important;
    min-width: 68px !important;
    position: relative;
    border-left: none !important;
    padding-left: 0 !important;
    gap: 0 !important;
}

/* ── Active item en rail ── */
.sidebar.collapsed .nav-item-active > a,
body.sidebar-collapsed .sidebar .nav-item-active > a {
    border-left: 3px solid var(--orange) !important;
    padding-left: 0 !important;
    background: var(--sidebar-active) !important;
}

/* ── Ocultar arrows/chevrons ── */
.sidebar.collapsed .arrow,
.sidebar.collapsed .user-arrow,
body.sidebar-collapsed .sidebar .arrow,
body.sidebar-collapsed .sidebar .user-arrow {
    display: none !important;
}

/* ── Iconos sin margen extra ── */
.sidebar.collapsed .nav-icon,
body.sidebar-collapsed .sidebar .nav-icon {
    margin: 0 !important;
    flex-shrink: 0;
}

/* ── Usuario en rail ── */
.sidebar.collapsed .user-session,
body.sidebar-collapsed .sidebar .user-session {
    justify-content: center !important;
    padding: 10px 0 !important;
    margin: 8px 0 4px !important;
    border-radius: 0 !important;
    gap: 0 !important;
}

.sidebar.collapsed .user-avatar,
body.sidebar-collapsed .sidebar .user-avatar {
    margin: 0 !important;
}

/* ══════════════════════════════════════════
   TOOLTIPS — aparecen al hover en rail mode
══════════════════════════════════════════ */

/* Base: pseudoelemento siempre presente pero invisible */
.sidebar.collapsed .nav-item a,
.sidebar.collapsed .nav-item-simple a,
body.sidebar-collapsed .sidebar .nav-item a,
body.sidebar-collapsed .sidebar .nav-item-simple a {
    overflow: visible !important;
}

.sidebar.collapsed .nav-item a::after,
.sidebar.collapsed .nav-item-simple a::after,
body.sidebar-collapsed .sidebar .nav-item a::after,
body.sidebar-collapsed .sidebar .nav-item-simple a::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
    background: #1a2035;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    padding: 6px 12px;
    border-radius: 8px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 99999;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255,255,255,0.08);
    letter-spacing: 0.3px;
    text-transform: lowercase;
}

/* Flecha del tooltip */
.sidebar.collapsed .nav-item a::before,
.sidebar.collapsed .nav-item-simple a::before,
body.sidebar-collapsed .sidebar .nav-item a::before,
body.sidebar-collapsed .sidebar .nav-item-simple a::before {
    content: '';
    position: absolute;
    left: calc(100% + 5px);
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: #1a2035;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 99999;
}

/* Mostrar al hover */
.sidebar.collapsed .nav-item a:hover::after,
.sidebar.collapsed .nav-item-simple a:hover::after,
body.sidebar-collapsed .sidebar .nav-item a:hover::after,
body.sidebar-collapsed .sidebar .nav-item-simple a:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.sidebar.collapsed .nav-item a:hover::before,
.sidebar.collapsed .nav-item-simple a:hover::before,
body.sidebar-collapsed .sidebar .nav-item a:hover::before,
body.sidebar-collapsed .sidebar .nav-item-simple a:hover::before {
    opacity: 1;
}

/* ── Main content se expande cuando sidebar está en rail ── */
.main-expanded {
    margin-left: 68px !important;
}

/* ── HOME CARDS VIDEO + FIRE ── */
.home-card-video {
    background: linear-gradient(135deg, #fff0f5, #fce7f3);
    border-color: #fbcfe8;
}

.home-card-video:hover {
    box-shadow: 0 8px 24px rgba(236, 72, 153, 0.2);
}

.home-card-video .hc-icon {
    background: linear-gradient(135deg, #ec4899, #db2777);
    color: #fff;
}

.home-card-fire {
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    border-color: #fed7aa;
}

.home-card-fire:hover {
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.25);
}

.home-card-fire .hc-icon {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
}

/* ═══════════════════════════════════════════════════
   VIDEOCLASES
═══════════════════════════════════════════════════ */
.vc-section {
    max-width: 960px;
    width: 100%;
}

.vc-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}

.vc-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: lowercase;
    margin: 0;
}

.vc-title i {
    color: #ec4899;
}

.vc-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 3px;
    text-transform: none;
    font-weight: 400;
}

/* Filtros */
.vc-filters {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.vc-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 200px;
}

.vc-search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 16px;
    flex: 1;
    max-width: 320px;
    transition: border-color 0.2s;
}

.vc-search-wrap:focus-within {
    border-color: #ec4899;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}

.vc-search-wrap i {
    color: #9ca3af;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.vc-search-input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    font-family: 'Outfit', sans-serif;
    width: 100%;
}

.vc-search-input::placeholder {
    color: #d1d5db;
    font-weight: 400;
}

/* Estados */
.vc-state-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    gap: 12px;
    color: #9ca3af;
}

.vc-state-wrap i {
    font-size: 2.5rem;
    color: #d1d5db;
}

.vc-state-wrap h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #6b7280;
    text-transform: lowercase;
    margin: 0;
}

.vc-state-wrap p {
    font-size: 0.88rem;
    text-transform: none;
    margin: 0;
    line-height: 1.6;
}

.vc-spinner {
    font-size: 1.8rem;
    color: #ec4899;
}

/* Grid de videos */
.vc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

/* Tarjeta video */
.vc-card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.vc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(236, 72, 153, 0.18);
    border-color: #fbcfe8;
}

.vc-thumb-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 */
    background: #f1f5f9;
    overflow: hidden;
}

.vc-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.vc-card:hover .vc-thumb {
    transform: scale(1.05);
}

.vc-thumb-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #d1d5db;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.vc-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s;
}

.vc-card:hover .vc-play-overlay {
    background: rgba(236, 72, 153, 0.55);
}

.vc-play-overlay i {
    font-size: 2rem;
    color: #fff;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.25s, transform 0.25s;
}

.vc-card:hover .vc-play-overlay i {
    opacity: 1;
    transform: scale(1);
}

.vc-duration {
    position: absolute;
    bottom: 8px;
    right: 10px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: none;
}

.vc-card-body {
    padding: 14px 16px 16px;
}

.vc-card-materia {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    background: #fce7f3;
    color: #be185d;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: lowercase;
    margin-bottom: 7px;
}

.vc-card-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 6px;
    text-transform: none;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vc-card-desc {
    font-size: 0.78rem;
    color: #6b7280;
    line-height: 1.45;
    text-transform: none;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vc-card-tema {
    font-size: 0.7rem;
    color: #9ca3af;
    font-weight: 600;
    text-transform: lowercase;
    display: flex;
    align-items: center;
    gap: 5px;
}

.vc-card-tema i {
    color: #ec4899;
    font-size: 0.65rem;
}

/* Modal video */
.vc-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(6px);
}

.vc-modal-inner {
    background: #111;
    border-radius: 20px;
    width: 100%;
    max-width: 820px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    position: relative;
}

.vc-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.vc-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.vc-modal-meta {
    padding: 16px 50px 12px 20px;
}

.vc-modal-materia {
    font-size: 0.68rem;
    font-weight: 700;
    background: #be185d;
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: lowercase;
    display: inline-block;
    margin-bottom: 6px;
}

.vc-modal-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 4px;
    text-transform: none;
}

.vc-modal-desc {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    text-transform: none;
}

.vc-player-wrap {
    position: relative;
    padding-top: 56.25%;
    background: #000;
}

.vc-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ═══════════════════════════════════════════════════
   INTOCABLES
═══════════════════════════════════════════════════ */
.intoc-section {
    max-width: 960px;
    width: 100%;
}

.intoc-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
}

.intoc-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: lowercase;
    margin: 0;
}

.intoc-title i {
    color: #f97316;
}

.intoc-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 3px;
    text-transform: none;
    font-weight: 400;
}

/* Hero */
.intoc-hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #3d1500 100%);
    border-radius: 20px;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 22px;
    border: 1px solid rgba(249, 115, 22, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.intoc-hero-icon {
    font-size: 3rem;
    flex-shrink: 0;
    filter: drop-shadow(0 0 12px rgba(249, 115, 22, 0.6));
}

.intoc-hero-text {
    flex: 1;
}

.intoc-hero-text h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    text-transform: lowercase;
    margin: 0 0 5px;
}

.intoc-hero-text p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: none;
    margin: 0;
}

.intoc-hero-stats {
    display: flex;
    gap: 20px;
    flex-shrink: 0;
}

.intoc-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.intoc-stat span {
    font-size: 2rem;
    font-weight: 800;
    color: #f97316;
    line-height: 1;
    text-transform: none;
}

.intoc-stat label {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: lowercase;
    font-weight: 600;
}

/* Tabs */
.intoc-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 22px;
    background: #f3f4f6;
    padding: 5px;
    border-radius: 14px;
    width: fit-content;
}

.intoc-tab {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #6b7280;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    text-transform: lowercase;
    transition: all 0.2s;
    position: relative;
}

.intoc-tab:hover {
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.5);
}

.intoc-tab-active {
    background: #fff !important;
    color: var(--text-dark) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.intoc-tab-active i {
    color: #f97316;
}

.intoc-tab-badge {
    font-size: 0.58rem;
    font-weight: 700;
    background: #e5e7eb;
    color: #9ca3af;
    padding: 2px 7px;
    border-radius: 20px;
    text-transform: lowercase;
    letter-spacing: 0.2px;
}

/* Filtro mapas */
.intoc-filter-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* Grid mapas mentales */
.mm-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

/* Card mapa */
.mm-card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.mm-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.2);
    border-color: #fed7aa;
}

.mm-card-thumb {
    position: relative;
    width: 100%;
    padding-top: 70%;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    overflow: hidden;
}

.mm-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.mm-card:hover .mm-card-img {
    transform: scale(1.04);
}

.mm-card-img-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #fed7aa;
}

.mm-zoom-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s;
}

.mm-card:hover .mm-zoom-overlay {
    background: rgba(249, 115, 22, 0.45);
}

.mm-zoom-overlay i {
    font-size: 1.6rem;
    color: #fff;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.25s, transform 0.25s;
}

.mm-card:hover .mm-zoom-overlay i {
    opacity: 1;
    transform: scale(1);
}

.mm-card-body {
    padding: 12px 14px 14px;
}

.mm-card-materia {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    background: #fff7ed;
    color: #c2410c;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: lowercase;
    margin-bottom: 6px;
}

.mm-card-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 5px;
    text-transform: none;
    line-height: 1.3;
}

.mm-card-desc {
    font-size: 0.76rem;
    color: #6b7280;
    line-height: 1.45;
    text-transform: none;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Lightbox */
.mm-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(8px);
}

.mm-lb-close {
    position: fixed;
    top: 16px;
    right: 18px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
    z-index: 10;
}

.mm-lb-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.mm-lb-inner {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
}

.mm-lb-img {
    max-width: 65%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.mm-lb-info {
    flex: 1;
    padding-top: 10px;
}

.mm-lb-materia {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    background: #f97316;
    color: #fff;
    padding: 3px 12px;
    border-radius: 20px;
    text-transform: lowercase;
    margin-bottom: 10px;
}

.mm-lb-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 10px;
    text-transform: none;
    line-height: 1.3;
}

.mm-lb-desc {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.6;
    text-transform: none;
    margin: 0 0 20px;
}

.mm-lb-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(249, 115, 22, 0.15);
    border: 1.5px solid rgba(249, 115, 22, 0.4);
    color: #f97316;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    text-transform: lowercase;
    transition: all 0.2s;
}

.mm-lb-download:hover {
    background: #f97316;
    color: #fff;
    border-color: #f97316;
}

/* ── RESPONSIVE NUEVAS SECCIONES ── */
@media (max-width: 768px) {

    /* Sidebar toggle btn en mobile ya se muestra en mobile-topbar */
    .sidebar-toggle-btn {
        display: flex;
    }

    .vc-grid {
        grid-template-columns: 1fr 1fr;
    }

    .vc-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .vc-search-wrap {
        max-width: 100% !important;
    }

    .vc-modal-inner {
        border-radius: 14px;
    }

    .vc-modal-meta {
        padding: 12px 44px 10px 14px;
    }

    .intoc-hero {
        flex-direction: column;
        text-align: center;
        gap: 14px;
        padding: 20px;
    }

    .intoc-hero-stats {
        justify-content: center;
    }

    .intoc-tabs {
        width: 100%;
        flex-wrap: wrap;
    }

    .mm-grid {
        grid-template-columns: 1fr 1fr;
    }

    .mm-lb-inner {
        flex-direction: column;
    }

    .mm-lb-img {
        max-width: 100%;
        max-height: 55vh;
    }

    .intoc-filter-row {
        flex-direction: column;
    }
}

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

    .mm-grid {
        grid-template-columns: 1fr;
    }

    .home-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ═══════════════════════════════════════════════════
   MOBILE SECTION PADDING FIX
   Todas las secciones del contenido principal
═══════════════════════════════════════════════════ */
@media (max-width: 768px) {

    .home-screen,
    .study-area,
    .game-section,
    .banco-section,
    .simulacro-section,
    .evaluacion-section,
    .vc-section,
    .intoc-section {
        padding-left: 14px;
        padding-right: 14px;
    }

    /* Home screen ya tiene su propio padding desde arriba */
    .home-screen {
        padding: 0 14px 20px;
    }

    /* Evitar desbordamiento horizontal global */
    body {
        overflow-x: hidden;
    }

    /* Sidebar header en mobile: logo izq, hamburguesa der */
    .sidebar-header {
        padding: 14px 14px;
    }

    .sidebar-logo-text .logo-sub {
        font-size: 0.58rem;
        line-height: 1.2;
    }

    /* Tarjetas de banco y simulacro en mobile */
    .banco-config-card,
    .sim-config-card {
        padding: 16px 14px;
    }

    /* Eval metrics 2 cols */
    .eval-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* Barra superior del simulacro */
    .sim-top-bar {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px;
    }

    /* Navbar sections spacing */
    .nav-section {
        padding: 0 8px;
    }

    /* Corregir quiz options en mobile */
    .quiz-wrapper,
    .hangman-wrapper {
        padding: 0;
    }
}

@media (max-width: 400px) {
    .home-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .hc-body h3 {
        font-size: 0.76rem;
    }

    .hc-body p {
        font-size: 0.65rem;
    }

    .home-title {
        font-size: 1.65rem;
    }
}


/* ══════════════════════════════════════════════════
   PANTALLA DE LOGIN
══════════════════════════════════════════════════ */

/* Mientras hay login activo, ocultar la app */
body.login-active .sidebar,
body.login-active .main-content,
body.login-active .watermark,
body.login-active .overlay {
    display: none !important;
}

.login-screen {
    position: fixed;
    inset: 0;
    background: #0c0e13;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

.login-screen.hidden {
    display: none;
}

/* Glows de fondo animados */
.login-bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.18) 0%, transparent 70%);
    top: -200px;
    left: -200px;
    pointer-events: none;
    animation: glow-pulse 6s ease-in-out infinite;
}

.login-bg-glow-2 {
    background: radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, transparent 70%);
    top: auto;
    left: auto;
    bottom: -200px;
    right: -100px;
    animation-delay: 3s;
}

@keyframes glow-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
}

/* Card principal */
.login-card {
    position: relative;
    z-index: 2;
    background: rgba(20, 22, 30, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: 44px 48px;
    width: 100%;
    max-width: 440px;
    box-shadow:
        0 0 0 1px rgba(255, 107, 0, 0.06),
        0 32px 64px rgba(0, 0, 0, 0.6),
        0 0 80px rgba(255, 107, 0, 0.06);
    animation: card-enter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes card-enter {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }

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

/* Logo / Branding */
.login-logo-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 32px;
}

.login-logo-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, #ff8c00, #ff4500);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.45);
    flex-shrink: 0;
}

.login-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-logo-fallback {
    color: white;
    font-size: 1.6rem;
    font-weight: 900;
    text-transform: uppercase;
}

.login-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.login-brand-pre {
    font-size: 0.55rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.login-brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    text-transform: lowercase;
    line-height: 1.1;
}

.login-brand-sub {
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.35);
    text-transform: none;
}

/* Título */
.login-title-wrap {
    margin-bottom: 28px;
}

.login-title {
    font-size: 1.7rem;
    font-weight: 800;
    color: #ffffff;
    text-transform: lowercase;
    line-height: 1.15;
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: none;
    font-weight: 400;
    line-height: 1.4;
}

/* Formulario */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    text-transform: lowercase;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.login-label i {
    color: var(--orange);
    font-size: 0.72rem;
}

.login-input-wrap {
    position: relative;
}

.login-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 13px 16px;
    color: #ffffff;
    font-size: 0.92rem;
    font-family: 'Outfit', sans-serif;
    text-transform: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    outline: none;
}

.login-input-wrap .login-input {
    padding-right: 48px;
}

.login-input::placeholder {
    color: rgba(255, 255, 255, 0.22);
}

.login-input:focus {
    border-color: var(--orange);
    background: rgba(255, 107, 0, 0.06);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.15);
}

.login-eye-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    padding: 4px 6px;
    font-size: 0.88rem;
    transition: color 0.18s;
}

.login-eye-btn:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* Error */
.login-error {
    display: flex;
    align-items: center;
    gap: 9px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    padding: 11px 14px;
    color: #f87171;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: none;
    animation: shake 0.35s ease;
}

@keyframes shake {

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

    20% {
        transform: translateX(-6px);
    }

    60% {
        transform: translateX(6px);
    }

    80% {
        transform: translateX(-3px);
    }
}

/* Botón de ingresar */
.login-btn {
    width: 100%;
    background: var(--orange-grad);
    border: none;
    border-radius: 13px;
    padding: 14px 20px;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    text-transform: lowercase;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: transform 0.18s, box-shadow 0.18s, opacity 0.18s;
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 4px;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(255, 107, 0, 0.5);
}

.login-btn:active:not(:disabled) {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Footer */
.login-footer {
    margin-top: 28px;
    text-align: center;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.2);
    text-transform: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.login-footer i {
    color: var(--orange);
    opacity: 0.6;
}

/* Decoraciones flotantes */
.login-deco {
    position: absolute;
    font-size: 5rem;
    opacity: 0.04;
    pointer-events: none;
    color: var(--orange-light);
    animation: float-deco 8s ease-in-out infinite;
}

.login-deco-1 {
    top: 10%;
    right: 8%;
    animation-delay: 0s;
    font-size: 6rem;
}

.login-deco-2 {
    bottom: 15%;
    left: 6%;
    animation-delay: 2.5s;
    font-size: 4.5rem;
    color: #a855f7;
}

.login-deco-3 {
    top: 50%;
    right: 5%;
    animation-delay: 5s;
    font-size: 3.5rem;
    color: #06b6d4;
    opacity: 0.05;
}

@keyframes float-deco {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    33% {
        transform: translateY(-18px) rotate(5deg);
    }

    66% {
        transform: translateY(10px) rotate(-4deg);
    }
}

/* Botón logout en sidebar */
.sidebar-logout-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    color: rgba(239, 68, 68, 0.7);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
    flex-shrink: 0;
}

.sidebar-logout-btn:hover {
    background: rgba(239, 68, 68, 0.22);
    border-color: rgba(239, 68, 68, 0.5);
    color: #f87171;
}

/* Pantalla de carga al verificar sesión */
.login-checking {
    position: fixed;
    inset: 0;
    background: #0c0e13;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    transition: opacity 0.3s;
}

.login-checking.fade-out {
    opacity: 0;
    pointer-events: none;
}

.login-checking-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 107, 0, 0.15);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: spin-check 0.8s linear infinite;
}

@keyframes spin-check {
    to {
        transform: rotate(360deg);
    }
}

.login-checking-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.3);
    text-transform: none;
}

/* Responsive login */
@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px;
        border-radius: 20px;
    }

    .login-title {
        font-size: 1.4rem;
    }

    .login-deco {
        display: none;
    }
}


/* ══════════════════════════════════════════════════
   META DIARIA — BARRA DE PROGRESO DIARIO
══════════════════════════════════════════════════ */

.daily-goal-card {
    background: #1c1e26;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-top: 2px solid var(--orange);
    border-radius: 14px;
    padding: 14px 14px 12px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.daily-goal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(180deg, rgba(255, 107, 0, 0.07) 0%, transparent 100%);
    pointer-events: none;
}

/* Header: título + contador */
.daily-goal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.daily-goal-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.daily-fire-icon {
    font-size: 0.85rem;
    color: var(--orange-light);
    animation: fire-flicker 1.8s ease-in-out infinite;
}

@keyframes fire-flicker {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.75;
        transform: scale(1.15);
    }
}

.daily-goal-title {
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.daily-goal-count {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--orange-light);
    text-transform: none;
    line-height: 1;
}

.daily-sep {
    color: rgba(255, 255, 255, 0.25);
    margin: 0 2px;
    font-weight: 400;
}

/* Barra principal */
.daily-bar-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 99px;
    overflow: visible;
    position: relative;
}

.daily-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff8c00, #ff4500);
    border-radius: 99px;
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
}

/* Punto brillante en el extremo de la barra */
.daily-bar-glow {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff8c00;
    box-shadow: 0 0 8px 3px rgba(255, 140, 0, 0.6);
    transition: left 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2;
    pointer-events: none;
}

/* Mensaje motivacional */
.daily-goal-msg {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    text-transform: none;
    font-weight: 500;
    line-height: 1.3;
    min-height: 1.3em;
    transition: color 0.3s;
}

/* Hitos */
.daily-milestones {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2px;
}

.daily-milestone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    opacity: 0.3;
    transition: opacity 0.3s, transform 0.3s;
}

.daily-milestone.ms-reached {
    opacity: 1;
}

.daily-milestone.ms-reached .ms-dot {
    background: var(--orange);
    box-shadow: 0 0 6px rgba(255, 107, 0, 0.6);
    transform: scale(1.3);
}

.ms-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: background 0.3s, box-shadow 0.3s, transform 0.3s;
}

.daily-milestone span {
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.35);
    text-transform: lowercase;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.daily-milestone.ms-reached span {
    color: var(--orange-light);
}

/* Racha */
.daily-streak-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.streak-bolt {
    font-size: 0.75rem;
    color: #f59e0b;
}

.streak-label {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
    flex: 1;
    text-transform: none;
}

.streak-label span {
    color: #f59e0b;
    font-weight: 800;
    text-transform: none;
}

.streak-best {
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.3);
    text-transform: none;
    white-space: nowrap;
}

.streak-best span {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 700;
    text-transform: none;
}

/* ══════════════════════════════════════════════════
   PANTALLA DE DISPOSITIVO BLOQUEADO
══════════════════════════════════════════════════ */
.device-blocked-screen {
    position: fixed;
    inset: 0;
    background: #0c0e13;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.db-card {
    background: rgba(20, 22, 30, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 28px;
    padding: 44px 48px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.6), 0 0 80px rgba(239, 68, 68, 0.06);
    animation: card-enter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.db-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.12);
    border: 2px solid rgba(239, 68, 68, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #f87171;
    margin: 0 auto 24px;
    animation: pulse-ring-red 2.5s ease-in-out infinite;
}

@keyframes pulse-ring-red {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.25);
    }

    50% {
        box-shadow: 0 0 0 14px rgba(239, 68, 68, 0);
    }
}

.db-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
    text-transform: lowercase;
    margin-bottom: 14px;
    line-height: 1.2;
}

.db-msg {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.45);
    text-transform: none;
    line-height: 1.6;
    margin-bottom: 28px;
}

.db-btn {
    width: 100%;
    margin-top: 0;
}

/* ══════════════════════════════════════════════════
   SIDEBAR DESKTOP — RAIL COLAPSADO + HOVER EXPAND
══════════════════════════════════════════════════ */
@media (min-width: 769px) {

    /* ── Estado colapsado: ancho de solo iconos ─────── */
    .sidebar.collapsed {
        width: 68px;
        overflow-x: hidden;
    }

    /* ── Hover sobre sidebar colapsado: se expande ──── */
    .sidebar.collapsed:hover {
        width: 270px;
        box-shadow: 6px 0 40px rgba(0, 0, 0, 0.55);
        z-index: 20;
        overflow-x: hidden;
    }

    /* ── Main content se encoge cuando sidebar colapsa ─ */
    body.sidebar-collapsed .main-content {
        margin-left: 68px;
    }

    /* ── Elementos de texto: transición suave ───────── */
    .sidebar-logo-text,
    .user-info,
    .sidebar-logout-btn,
    .nav-label,
    .nav-badge,
    .nav-emoji,
    .arrow,
    .section-title {
        transition: opacity 0.18s ease, max-width 0.28s ease, flex 0.28s ease;
        white-space: nowrap;
        overflow: hidden;
        max-width: 200px;
    }

    /* ── Ocultar texto cuando está colapsado y sin hover ─ */
    .sidebar.collapsed:not(:hover) .sidebar-logo-text,
    .sidebar.collapsed:not(:hover) .user-info,
    .sidebar.collapsed:not(:hover) .sidebar-logout-btn,
    .sidebar.collapsed:not(:hover) .nav-label,
    .sidebar.collapsed:not(:hover) .nav-badge,
    .sidebar.collapsed:not(:hover) .nav-emoji,
    .sidebar.collapsed:not(:hover) .arrow {
        opacity: 0;
        max-width: 0;
        flex: 0 0 0;
        padding: 0;
        margin: 0;
        pointer-events: none;
    }

    .sidebar.collapsed:not(:hover) .section-title {
        opacity: 0;
        max-width: 0;
        padding: 0;
        margin: 0;
    }

    /* Ocultar progreso y submenus abiertos */
    .sidebar.collapsed:not(:hover) .progress-section {
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        margin: 0;
        pointer-events: none;
        transition: opacity 0.18s, max-height 0.28s, padding 0.28s, margin 0.28s;
    }

    .sidebar.collapsed:not(:hover) .submenu {
        display: none !important;
    }

    /* ── Centrar ítems cuando está colapsado ────────── */
    .sidebar.collapsed:not(:hover) .nav-item>a {
        justify-content: center;
        gap: 0;
        padding: 8px 0;
    }

    .sidebar.collapsed:not(:hover) .user-session {
        justify-content: center;
        gap: 0;
        padding: 10px 8px;
        margin: 12px 6px 4px;
    }

    .sidebar.collapsed:not(:hover) .sidebar-header {
        justify-content: center;
        padding: 14px 8px;
        gap: 0;
    }

    /* ── Iconos uniformes en estado colapsado ───────── */
    .sidebar.collapsed:not(:hover) .nav-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        border-radius: 11px;
        flex-shrink: 0;
    }

    .sidebar.collapsed:not(:hover) .user-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    /* Logo icon se mantiene visible */
    .sidebar.collapsed:not(:hover) .logo-icon {
        flex-shrink: 0;
    }

    /* ── Toggle button centrado en header colapsado ─── */
    .sidebar.collapsed:not(:hover) .sidebar-toggle-btn {
        margin-left: 0;
    }

    /* ── Tooltip de nombre al hacer hover sobre íconos ─ */
    .sidebar.collapsed:not(:hover) .nav-item {
        position: relative;
    }

    .sidebar.collapsed:not(:hover) .nav-item>a[data-tooltip]:hover::after {
        content: attr(data-tooltip);
        position: absolute;
        left: 72px;
        top: 50%;
        transform: translateY(-50%);
        background: #1e2030;
        color: #fff;
        padding: 6px 12px;
        border-radius: 8px;
        font-size: 0.78rem;
        font-weight: 600;
        white-space: nowrap;
        pointer-events: none;
        z-index: 300;
        border: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
        text-transform: lowercase;
    }

    .sidebar.collapsed:not(:hover) .nav-item>a[data-tooltip]:hover::before {
        content: '';
        position: absolute;
        left: 66px;
        top: 50%;
        transform: translateY(-50%);
        border: 5px solid transparent;
        border-right-color: #1e2030;
        z-index: 300;
        pointer-events: none;
    }

    /* ── Scrollbar oculto en colapsado ──────────────── */
    .sidebar.collapsed:not(:hover)::-webkit-scrollbar {
        width: 0;
    }
}

/* ══════════════════════════════════════════════════════════
   SINGLE-DEVICE LOCK — Pantalla de bloqueo por dispositivo
   ══════════════════════════════════════════════════════════ */

/* Overlay de fondo */
.device-blocked-screen {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 20, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: dbFadeIn 0.4s ease both;
}

@keyframes dbFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Tarjeta central */
.db-card {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border: 1.5px solid rgba(255, 140, 0, 0.25);
    border-radius: 28px;
    padding: 48px 40px 44px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 140, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: dbSlideUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes dbSlideUp {
    from {
        opacity: 0;
        transform: translateY(32px) scale(0.96);
    }

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

/* Ícono con anillo pulsante */
.db-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff8c00, #ff4500);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 2rem;
    color: #fff;
    position: relative;
    box-shadow: 0 8px 32px rgba(255, 107, 0, 0.45);
    animation: dbPulse 2.4s ease-in-out infinite;
}

@keyframes dbPulse {

    0%,
    100% {
        box-shadow: 0 8px 32px rgba(255, 107, 0, 0.45);
    }

    50% {
        box-shadow: 0 8px 48px rgba(255, 107, 0, 0.75), 0 0 0 14px rgba(255, 107, 0, 0.08);
    }
}

/* Título */
.db-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 14px;
    text-transform: lowercase;
    letter-spacing: -0.3px;
    font-family: 'Outfit', sans-serif;
}

/* Mensaje */
.db-msg {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.65;
    margin: 0 0 32px;
    font-weight: 400;
    text-transform: none;
    font-family: 'Outfit', sans-serif;
}

/* Botón de acción */
.db-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: linear-gradient(135deg, #ff8c00, #ff4500);
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 15px 32px;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: lowercase;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s;
    box-shadow: 0 6px 24px rgba(255, 107, 0, 0.4);
    width: 100%;
}

.db-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(255, 107, 0, 0.55);
}

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

/* ── Spinner de verificación de sesión ───────────── */
.login-checking {
    position: fixed;
    inset: 0;
    background: #0f1117;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 9998;
    transition: opacity 0.35s ease;
}

.login-checking.fade-out {
    opacity: 0;
    pointer-events: none;
}

.login-checking-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #ff8c00;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.login-checking-text {
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: lowercase;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.bq-question-text {
    white-space: pre-wrap !important;
}
/* ──────────────────────────────────────────────
   SKELETON LOADING — mejora velocidad percibida
────────────────────────────────────────────── */
@keyframes skeleton-pulse {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg,
        rgba(255,255,255,0.06) 25%,
        rgba(255,255,255,0.12) 50%,
        rgba(255,255,255,0.06) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: 8px;
}

.banco-loading-opts {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
}

/* Spinner más rápido */
.fa-spin {
    animation: fa-spin 0.6s linear infinite !important;
}
