﻿/* =========================================================
   BIOS PC - Theme System (Light + Dark)
   ========================================================= */

:root {
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-soft: rgba(59, 130, 246, 0.12);
    --accent-2: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    --bg: #f6f7fb;
    --bg-elev: #ffffff;
    --bg-soft: #eef1f7;
    --text: #0f172a;
    --text-muted: #64748b;
    --text-muted-2: #94a3b8;
    --border: rgba(15, 23, 42, 0.08);
    --border-strong: rgba(15, 23, 42, 0.14);
    --navbar-bg: rgba(255, 255, 255, 0.88);
    --navbar-text: #0f172a;
    --card-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
    --card-shadow-hover: 0 4px 8px rgba(15, 23, 42, 0.06), 0 16px 40px rgba(15, 23, 42, 0.10);
    --ring: 0 0 0 3px rgba(59, 130, 246, 0.25);
    --gradient-accent: linear-gradient(135deg, #3b82f6, #8b5cf6);
    /* Hero - tema claro */
    --hero-bg: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 45%, #ede9fe 100%);
    --hero-text: #0f172a;
    --hero-text-muted: rgba(15, 23, 42, 0.7);
    --hero-glow-1: rgba(59, 130, 246, 0.20);
    --hero-glow-2: rgba(139, 92, 246, 0.18);
    --hero-border: rgba(15, 23, 42, 0.08);
    --hero-stat-bg: rgba(255, 255, 255, 0.65);
    --hero-stat-border: rgba(15, 23, 42, 0.08);
    --hero-stat-hover-bg: rgba(255, 255, 255, 0.95);
    --hero-stat-number: #1e293b;
    --hero-stat-label: rgba(15, 23, 42, 0.6);
}

[data-bs-theme="dark"] {
    --bg: #0b1020;
    --bg-elev: #131a2c;
    --bg-soft: #1a2236;
    --text: #e6ecff;
    --text-muted: #94a3b8;
    --text-muted-2: #64748b;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);
    --navbar-bg: rgba(11, 16, 32, 0.88);
    --navbar-text: #e6ecff;
    --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    --card-shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.4), 0 16px 40px rgba(0, 0, 0, 0.55);
    --ring: 0 0 0 3px rgba(139, 92, 246, 0.35);
    --accent-soft: rgba(139, 92, 246, 0.18);
    /* Hero - tema oscuro */
    --hero-bg: linear-gradient(135deg, #050814 0%, #0b1020 60%, #1e1b4b 100%);
    --hero-text: #ffffff;
    --hero-text-muted: rgba(255, 255, 255, 0.85);
    --hero-glow-1: rgba(59, 130, 246, 0.35);
    --hero-glow-2: rgba(139, 92, 246, 0.30);
    --hero-border: transparent;
    --hero-stat-bg: rgba(255, 255, 255, 0.06);
    --hero-stat-border: rgba(255, 255, 255, 0.12);
    --hero-stat-hover-bg: rgba(255, 255, 255, 0.12);
    --hero-stat-number: #ffffff;
    --hero-stat-label: rgba(255, 255, 255, 0.7);
}

/* =========================================================
   BASE
   ========================================================= */
html, body {
    min-height: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: filter 0.3s ease;
}

    .app-shell .main-content {
        flex: 1 0 auto;
    }

    .app-shell.page-blurred {
        filter: blur(6px) brightness(0.7);
        user-select: none;
        /* NO poner pointer-events: none aquí.
       El overlay del gate ya tiene su propio pointer-events: auto
       y bloqueará la interacción con el fondo. */
    }

        /* Solo bloquear el contenido principal, no el header ni los modales */
        .app-shell.page-blurred .main-content {
            pointer-events: none;
        }

main {
    flex: 1 0 auto;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

    a:hover {
        color: var(--accent-hover);
    }

.text-muted-2 {
    color: var(--text-muted-2) !important;
}

/* Utilidad propia para no pisar .text-secondary de Bootstrap */
.text-slate {
    color: #64748b !important;
}

[data-bs-theme="dark"] .text-slate {
    color: #cbd5e1 !important;
}

/* =========================================================
   NAVBAR
   ========================================================= */
.app-navbar {
    background: var(--navbar-bg);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
    color: var(--navbar-text);
    transition: background-color 0.25s ease, border-color 0.25s ease;
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.03);
    position: relative;
    z-index: 1030;
}

    .app-navbar .navbar-brand {
        color: var(--navbar-text);
        font-weight: 700;
        letter-spacing: 0.3px;
        font-size: 1.15rem;
    }

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--gradient-accent);
    color: white;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
    font-size: 1rem;
}

.brand-text .text-accent {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 10px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

    .app-nav-link:hover {
        color: var(--text) !important;
        background: var(--accent-soft);
    }

    .app-nav-link.active {
        color: var(--accent) !important;
        background: var(--accent-soft);
    }

/* =========================================================
   NAVBAR - Desktop: centrar links y acciones
   ========================================================= */
@media (min-width: 992px) {
    .navbar-collapse {
        display: flex !important;
        align-items: center;
        gap: 12px;
    }

    .navbar-nav.main-nav {
        flex-direction: row;
        margin: 0 auto;
        gap: 6px;
    }

    .navbar-nav.nav-actions {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        margin: 0;
    }

        .navbar-nav.nav-actions > .nav-item {
            display: inline-flex;
            align-items: center;
            margin: 0;
        }
}

/* =========================================================
   NAVBAR - Móvil: acciones en fila horizontal centradas
   ========================================================= */
@media (max-width: 991.98px) {
    .navbar-collapse {
        padding-top: 12px;
    }

    .navbar-nav.main-nav {
        margin-bottom: 0 !important;
    }

    .navbar-nav.nav-actions {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap;
        align-items: center !important;
        justify-content: center;
        gap: 8px;
        width: 100%;
        margin-top: 12px;
        padding-top: 14px;
        border-top: 1px solid var(--border);
    }

        .navbar-nav.nav-actions > .nav-item {
            display: inline-flex;
            align-items: center;
            margin: 0 !important;
        }

        .navbar-nav.nav-actions .icon-btn {
            width: 40px;
            height: 40px;
        }

        .navbar-nav.nav-actions .btn-auth-login,
        .navbar-nav.nav-actions .btn-auth-register {
            padding: 0.4rem 0.85rem;
            font-size: 0.85rem;
            height: 40px;
        }
}

/* =========================================================
   ICON BUTTONS (buscar, tema)
   ========================================================= */
.icon-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-elev);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1rem;
    line-height: 1;
    vertical-align: middle;
    flex-shrink: 0;
}

    .icon-btn i {
        display: block;
        line-height: 1;
        font-size: 1rem;
    }

    .icon-btn:hover {
        border-color: var(--accent);
        color: var(--accent);
        transform: translateY(-1px);
        box-shadow: var(--card-shadow);
    }

    .icon-btn.active {
        border-color: var(--accent);
        color: var(--accent);
        background: var(--accent-soft);
    }

/* =========================================================
   BOTONES DE AUTENTICACIÓN
   ========================================================= */
.btn-auth-login,
.btn-auth-register {
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-auth-login {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

    .btn-auth-login:hover {
        color: var(--accent);
        border-color: var(--accent);
        background: var(--accent-soft);
    }

.btn-auth-register {
    background: var(--gradient-accent);
    color: white;
    border: 1px solid transparent;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.25);
}

    .btn-auth-register:hover {
        color: white;
        transform: translateY(-1px);
        box-shadow: 0 8px 22px rgba(59, 130, 246, 0.4);
    }

/* Avatar */
.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient-accent);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* =========================================================
   SEARCH PANEL (colapsable debajo del navbar)
   ========================================================= */
.search-panel {
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.25s ease, opacity 0.25s ease;
    padding: 0;
    opacity: 0;
    position: relative;
    z-index: 5;
}

    .search-panel.open {
        max-height: 260px;
        padding: 20px 0;
        opacity: 1;
    }

.search-panel-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.search-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}

    .search-input-wrap .search-icon {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-muted);
        font-size: 1rem;
        pointer-events: none;
        line-height: 1;
        z-index: 1;
    }

    .search-input-wrap input {
        width: 100%;
        padding: 0.75rem 1rem 0.75rem 2.6rem;
        border-radius: 12px;
        border: 1px solid var(--border);
        background: var(--bg-soft);
        color: var(--text);
        font-size: 1rem;
        transition: all 0.2s ease;
        min-width: 0;
        line-height: 1.4;
    }

        .search-input-wrap input:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: var(--ring);
            background: var(--bg-elev);
        }

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

    .btn-ghost:hover {
        color: var(--danger);
        border-color: var(--danger);
    }

.search-hints {
    margin-top: 14px;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

    .search-hints a {
        display: inline-block;
        padding: 4px 12px;
        border-radius: 20px;
        background: var(--bg-soft);
        color: var(--text-muted);
        font-size: 0.8rem;
        transition: all 0.2s ease;
    }

        .search-hints a:hover {
            background: var(--accent);
            color: white;
        }

@media (max-width: 576px) {
    .search-input-wrap input {
        font-size: 0.95rem;
        padding: 0.65rem 0.9rem 0.65rem 2.4rem;
    }

    .search-panel-form .btn-accent {
        padding: 0.65rem 0.9rem;
        font-size: 0.85rem;
    }

    .btn-ghost {
        width: 42px;
        height: 42px;
    }
}

/* =========================================================
   CARDS
   ========================================================= */
.card {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
    color: var(--text);
}

    .card:hover {
        transform: translateY(-3px);
        box-shadow: var(--card-shadow-hover);
        border-color: var(--border-strong);
    }

.card-item {
    overflow: hidden;
}

.card-body {
    color: var(--text);
}

/* =========================================================
   BOTONES
   ========================================================= */
.btn {
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
}

    .btn-primary:hover {
        background: var(--accent-hover);
        border-color: var(--accent-hover);
        transform: translateY(-1px);
        box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
    }

.btn-outline-primary:hover {
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
}

.btn-accent {
    background: var(--gradient-accent);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.55rem 1.1rem;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.25);
}

    .btn-accent:hover {
        color: white;
        transform: translateY(-1px);
        box-shadow: 0 8px 22px rgba(59, 130, 246, 0.4);
    }

/* =========================================================
   HERO
   ========================================================= */
.hero-section {
    background: var(--hero-bg);
    background-size: cover;
    color: var(--hero-text);
    padding: 90px 0 70px;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--card-shadow-hover);
    margin-bottom: 40px;
    border: 1px solid var(--hero-border);
    transition: background-image 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

    .hero-section::before {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at 20% 20%, var(--hero-glow-1), transparent 45%), radial-gradient(circle at 80% 60%, var(--hero-glow-2), transparent 45%);
        pointer-events: none;
        transition: background 0.3s ease;
    }

    .hero-section h1,
    .hero-section p,
    .hero-section .btn {
        position: relative;
        z-index: 1;
    }

    .hero-section h1 {
        color: var(--hero-text);
    }

    .hero-section p,
    .hero-section .lead {
        color: var(--hero-text-muted);
    }

    .hero-section .display-3 {
        letter-spacing: -1px;
    }

    .hero-section .btn-outline-light {
        color: var(--hero-text);
        border-color: var(--hero-stat-border);
        background: transparent;
        transition: all 0.2s ease;
    }

        .hero-section .btn-outline-light:hover {
            background: var(--hero-stat-hover-bg);
            color: var(--hero-text);
            border-color: var(--hero-stat-border);
        }

/* =========================================================
   STATS (dentro del hero)
   ========================================================= */
.stat-card {
    background: var(--hero-stat-bg);
    border: 1px solid var(--hero-stat-border);
    border-radius: 14px;
    padding: 18px 12px;
    text-align: center;
    transition: all 0.25s ease;
    backdrop-filter: blur(6px);
}

    .stat-card:hover {
        background: var(--hero-stat-hover-bg);
        transform: translateY(-4px);
        border-color: var(--hero-stat-border);
    }

    .stat-card .number {
        font-size: 2rem;
        font-weight: 800;
        color: var(--hero-stat-number);
        line-height: 1;
        margin-bottom: 6px;
    }

    .stat-card .label {
        font-size: 0.72rem;
        color: var(--hero-stat-label);
        text-transform: uppercase;
        letter-spacing: 1.2px;
        font-weight: 600;
    }

/* =========================================================
   SECCIÓN HEADER (icono + título + link)
   ========================================================= */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 10px;
}

.section-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.section-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

/* section-title declarado UNA SOLA VEZ */
.section-title {
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text);
    font-size: 1.05rem;
    margin: 0;
    border: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.section-link {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

    .section-link:hover {
        color: var(--accent);
        gap: 8px;
    }

/* Backgrounds suaves por color */
.bg-primary-soft {
    background: rgba(59, 130, 246, 0.14);
}

.bg-info-soft {
    background: rgba(6, 182, 212, 0.14);
}

.bg-warning-soft {
    background: rgba(245, 158, 11, 0.16);
}

.bg-success-soft {
    background: rgba(16, 185, 129, 0.14);
}

.bg-secondary-soft {
    background: rgba(100, 116, 139, 0.15);
}

/* =========================================================
   CARD GRID - Lista de tarjetas verticales
   ========================================================= */
.card-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* =========================================================
   ITEM CARD
   ========================================================= */
.item-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px;
    border-radius: 14px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
    color: var(--text);
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}

    .item-card::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 3px;
        background: var(--accent);
        opacity: 0;
        transition: opacity 0.22s ease;
    }

.item-card-primary::before {
    background: #3b82f6;
}

.item-card-info::before {
    background: #06b6d4;
}

.item-card-warning::before {
    background: #f59e0b;
}

.item-card-success::before {
    background: #10b981;
}

.item-card-secondary::before {
    background: #64748b;
}

.item-card:hover {
    transform: translateX(3px);
    border-color: var(--border-strong);
    box-shadow: var(--card-shadow-hover);
}

    .item-card:hover::before {
        opacity: 1;
    }

/* Icono de categoría */
.item-card-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: transform 0.22s ease;
}

.item-card-primary .item-card-icon {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

.item-card-info .item-card-icon {
    background: rgba(6, 182, 212, 0.12);
    color: #06b6d4;
}

.item-card-warning .item-card-icon {
    background: rgba(245, 158, 11, 0.14);
    color: #f59e0b;
}

.item-card-success .item-card-icon {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.item-card-secondary .item-card-icon {
    background: rgba(100, 116, 139, 0.12);
    color: #64748b;
}

.item-card:hover .item-card-icon {
    transform: scale(1.08) rotate(-4deg);
}

/* Cuerpo */
.item-card-body {
    flex: 1 1 auto;
    min-width: 0;
}

.item-card-title {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text);
    line-height: 1.25;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-card-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 6px;
    min-height: 18px;
}

.chip {
    font-size: 0.68rem;
    padding: 2px 7px;
    border-radius: 6px;
    background: var(--bg-soft);
    color: var(--text-muted);
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}

[data-bs-theme="dark"] .chip {
    background: rgba(255, 255, 255, 0.06);
}

.chip-success {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.chip-info {
    background: rgba(6, 182, 212, 0.15);
    color: #0891b2;
}

.chip-warning {
    background: rgba(245, 158, 11, 0.16);
    color: #d97706;
}

.chip-secondary {
    background: rgba(100, 116, 139, 0.15);
    color: #475569;
}

[data-bs-theme="dark"] .chip-success {
    color: #34d399;
}

[data-bs-theme="dark"] .chip-info {
    color: #22d3ee;
}

[data-bs-theme="dark"] .chip-warning {
    color: #fbbf24;
}

[data-bs-theme="dark"] .chip-secondary {
    color: #cbd5e1;
}

.item-card-meta {
    display: flex;
    gap: 12px;
    font-size: 0.74rem;
    color: var(--text-muted);
    font-weight: 500;
}

    .item-card-meta i {
        font-size: 0.8rem;
        margin-right: 2px;
    }

/* Flecha */
.item-card-arrow {
    flex-shrink: 0;
    color: var(--text-muted-2);
    font-size: 1.05rem;
    transition: transform 0.22s ease, color 0.22s ease;
}

.item-card:hover .item-card-arrow {
    color: var(--accent);
    transform: translateX(3px);
}

/* Estado vacío */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 28px 16px;
    border-radius: 14px;
    border: 1.5px dashed var(--border-strong);
    color: var(--text-muted);
    background: var(--bg-soft);
    font-size: 0.85rem;
}

    .empty-state i {
        font-size: 1.8rem;
        opacity: 0.6;
    }

@media (max-width: 575.98px) {
    .card-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .item-card {
        padding: 12px;
        gap: 10px;
    }

    .item-card-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .item-card-title {
        font-size: 0.88rem;
    }

    .section-title {
        font-size: 0.98rem;
    }
}

/* =========================================================
   FOOTER
   ========================================================= */
.app-footer {
    background: var(--bg-elev);
    border-top: 1px solid var(--border);
    padding: 28px 0;
    color: var(--text-muted);
    transition: background-color 0.25s ease, border-color 0.25s ease;
    margin-top: auto;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--bg-soft);
    color: var(--text-muted);
    margin-left: 6px;
    transition: all 0.2s ease;
    font-size: 1rem;
}

    .social-btn:hover {
        background: var(--accent);
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
    }

/* =========================================================
   AD BANNER (3 tamaños responsivos - solo 1 visible a la vez)
   ========================================================= */
.ad-banner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 100%;
    margin: 24px auto;
    padding: 0;
    overflow-x: hidden;
}

.ad-banner {
    justify-content: center;
    align-items: center;
    max-width: 100%;
    overflow: hidden;
    background: var(--bg-soft);
    border-radius: 12px;
    border: 1px dashed var(--border);
    padding: 8px;
    transition: all 0.2s ease;
}

/* Desktop grande: 728x90 */
.ad-banner-desktop {
    min-height: 106px;
    min-width: 728px;
    max-width: 728px;
}

/* Tablet: 468x60 */
.ad-banner-tablet {
    min-height: 76px;
    min-width: 468px;
    max-width: 468px;
}

/* Móvil: 320x50 */
.ad-banner-mobile {
    min-height: 66px;
    min-width: 320px;
    max-width: 320px;
}

@media (min-width: 992px) {
    .ad-banner-container {
        min-height: 106px;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .ad-banner-container {
        min-height: 76px;
    }
}

@media (max-width: 767.98px) {
    .ad-banner-container {
        min-height: 66px;
        margin: 16px auto;
    }

    .ad-banner {
        border-radius: 10px;
    }
}

/* Fallback para pantallas muy estrechas */
@media (max-width: 340px) {
    .ad-banner-mobile {
        min-width: 100%;
        max-width: 100%;
    }
}

/* =========================================================
   SOCIAL BAR (flotante)
   ========================================================= */
#social-bar-container {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 6px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 12px 12px 0;
    box-shadow: var(--card-shadow-hover);
    transition: all 0.25s ease;
}

    #social-bar-container:hover {
        transform: translateY(-50%) translateX(2px);
        border-color: var(--accent);
        box-shadow: 0 12px 40px rgba(59, 130, 246, 0.25);
    }

    #social-bar-container a,
    #social-bar-container .social-bar-item {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        color: var(--text-muted);
        background: transparent;
        text-decoration: none;
        font-size: 1.15rem;
        transition: all 0.2s ease;
    }

        #social-bar-container a:hover,
        #social-bar-container .social-bar-item:hover {
            color: white;
            background: var(--accent);
            transform: translateX(2px);
            box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
        }

/* =========================================================
   OVERLAY GATE
   ========================================================= */
.gate-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 20, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: gateFadeIn 0.35s ease;
    pointer-events: auto;
    overflow-y: auto;
}

.gate-card {
    background: var(--bg-elev);
    color: var(--text);
    padding: 40px 32px;
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    animation: gateScaleIn 0.4s ease;
    pointer-events: auto;
}

    .gate-card .icon {
        font-size: 3.5rem;
        margin-bottom: 12px;
        display: inline-block;
        animation: gatePulse 2s ease-in-out infinite;
    }

    .gate-card h2 {
        font-size: 1.5rem;
        font-weight: 700;
        margin-bottom: 10px;
        color: var(--text);
    }

    .gate-card p {
        color: var(--text-muted);
        font-size: 0.95rem;
        margin-bottom: 24px;
    }

.gate-btn {
    display: inline-block;
    padding: 14px 34px;
    background: var(--gradient-accent);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: all 0.25s ease;
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.4);
}

    .gate-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 16px 40px rgba(59, 130, 246, 0.55);
        color: white;
    }

    .gate-btn:active {
        transform: translateY(0);
    }

    .gate-btn:disabled {
        opacity: 0.7;
        cursor: not-allowed;
        transform: none;
    }

    .gate-btn .sub-text {
        display: block;
        font-size: 0.7rem;
        font-weight: 400;
        opacity: 0.85;
        margin-top: 4px;
    }

@media (max-width: 768px) {
    .gate-card {
        padding: 32px 24px;
        border-radius: 16px;
    }

        .gate-card h2 {
            font-size: 1.3rem;
        }

        .gate-card p {
            font-size: 0.9rem;
        }
}

@media (max-width: 480px) {
    .gate-overlay {
        padding: 12px;
        align-items: flex-start;
        padding-top: 40px;
    }

    .gate-card {
        padding: 24px 18px;
        border-radius: 14px;
        max-width: 100%;
    }

        .gate-card .icon {
            font-size: 2.8rem;
        }

        .gate-card h2 {
            font-size: 1.15rem;
        }

        .gate-card p {
            font-size: 0.85rem;
            margin-bottom: 18px;
        }

    .gate-btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

/* =========================================================
   ANIMACIONES
   ========================================================= */
.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.7s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gateFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes gateScaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes gatePulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

/* =========================================================
   RESPONSIVE GENERAL
   ========================================================= */
@media (max-width: 991.98px) {
    .hero-section {
        padding: 60px 0 40px;
        border-radius: 20px;
    }

        .hero-section .display-3 {
            font-size: 2.2rem;
        }
}

@media (max-width: 576px) {
    .stat-card .number {
        font-size: 1.5rem;
    }

    .stat-card .label {
        font-size: 0.65rem;
    }

    .gate-card {
        padding: 28px 20px;
    }
}

/* =========================================================
   DROPDOWN MENU - Corregir stacking por encima del hero
   ========================================================= */
.app-navbar .nav-item.dropdown {
    position: relative;
    z-index: 1031;
}

.app-navbar .dropdown-menu {
    z-index: 1050;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 6px;
    margin-top: 8px;
    background: var(--bg-elev);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    animation: dropdownFadeIn 0.18s ease;
}

    .app-navbar .dropdown-menu .dropdown-item {
        border-radius: 8px;
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        color: var(--text);
        transition: all 0.15s ease;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

        .app-navbar .dropdown-menu .dropdown-item:hover,
        .app-navbar .dropdown-menu .dropdown-item:focus {
            background: var(--accent-soft);
            color: var(--accent);
        }

        .app-navbar .dropdown-menu .dropdown-item.text-danger:hover {
            background: rgba(239, 68, 68, 0.1);
            color: var(--danger) !important;
        }

    .app-navbar .dropdown-menu .dropdown-divider {
        margin: 4px 0;
        border-color: var(--border);
        opacity: 1;
    }

    .app-navbar .dropdown-menu form .dropdown-item {
        width: 100%;
        text-align: left;
        background: none;
        border: none;
    }

/* =========================================================
   DROPDOWN MÓVIL
   ========================================================= */
@media (max-width: 991.98px) {
    .navbar-collapse {
        position: static !important;
    }

    .navbar-nav.nav-actions .nav-item.dropdown {
        position: static !important;
        margin-left: 0 !important;
    }

        .navbar-nav.nav-actions .nav-item.dropdown > .nav-link {
            padding: 0.4rem 0.85rem !important;
            background: var(--bg-elev);
            border: 1px solid var(--border);
            border-radius: 10px;
            height: 40px;
            display: inline-flex !important;
            align-items: center;
            gap: 0.4rem;
        }

        .navbar-nav.nav-actions .nav-item.dropdown .dropdown-menu {
            position: absolute !important;
            top: 100% !important;
            left: 5px !important;
            right: 5px !important;
            width: auto !important;
            max-width: none !important;
            margin-top: 0 !important;
            border-radius: 14px !important;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18) !important;
            z-index: 1055;
        }

            .navbar-nav.nav-actions .nav-item.dropdown .dropdown-menu .dropdown-item {
                padding: 0.65rem 1rem;
                font-size: 0.95rem;
            }
}

/* =========================================================
   UTILIDADES EXTRA
   ========================================================= */
#appContent {
    position: relative;
    z-index: 1;
}

.gate-overlay {
    z-index: 99999;
}

/* Barra de progreso del countdown del gate */
.gate-progress {
    width: 100%;
    height: 8px;
    background: var(--bg-soft);
    border-radius: 4px;
    margin: 20px 0;
    overflow: hidden;
    border: 1px solid var(--border);
}

.gate-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--gradient-accent);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    will-change: width;
}

@media (max-width: 480px) {
    .gate-progress {
        height: 6px;
        margin: 14px 0;
    }
}

/* =========================================================
   NAVBAR - Evitar desborde en el rango 992-1200px
   ========================================================= */
@media (min-width: 992px) and (max-width: 1258.98px) {
    .app-navbar .navbar-brand {
        font-size: 1rem;
    }

    .app-navbar .brand-text {
        display: none; /* Solo el icono del logo */
    }

    .app-nav-link {
        padding: 0.4rem 0.6rem !important; /* Reducir de 0.5rem 1rem */
        font-size: 0.85rem;
        gap: 0.25rem;
    }

        .app-nav-link i {
            font-size: 0.95rem;
        }

    .app-navbar .nav-actions {
        gap: 4px !important;
    }

    .app-navbar .icon-btn {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }

        .app-navbar .icon-btn i {
            font-size: 0.9rem;
        }

    .app-navbar .avatar-circle {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .app-navbar .btn-auth-login,
    .app-navbar .btn-auth-register {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

        .app-navbar .btn-auth-login i,
        .app-navbar .btn-auth-register i {
            display: none; /* Ocultar icono, dejar solo texto */
        }
}

/* =========================================================
   Evitar overflow horizontal del navbar
   ========================================================= */
.app-navbar .container {
    max-width: 100%;
    padding-left: 12px;
    padding-right: 12px;
}

.app-navbar .navbar-collapse {
    min-width: 0; /* Permite que flexbox encoja los hijos */
    overflow: visible;
}

.app-navbar .main-nav {
    flex-wrap: nowrap;
    overflow: hidden;
    min-width: 0;
}

    .app-navbar .main-nav .nav-item {
        flex-shrink: 0; /* Los items no se encogen, así no se rompen a mitad de palabra */
    }
