/* ==========================================================================
   RELOADXPRESS 2.0 — THEME PRO SOFT (capa visual del panel administrativo)
   Se carga DESPUÉS de style.css. No modifica lógica ni el catálogo.
   Para revertir: quitar el <link> de theme-pro.css en index.html.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* Superficies (todo claro y suave) */
    --bg-dark: #f6f7fb;
    --bg-sidebar: #ffffff;
    --bg-header: rgba(255, 255, 255, 0.85);
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --bg-input: #ffffff;
    --surface-soft: #fafbfd;

    /* Marca (naranja suave) */
    --brand: #f97316;
    --brand-600: #ea580c;
    --brand-700: #c2410c;
    --brand-50: #fff7ed;
    --brand-100: #ffedd5;
    --brand-200: #fed7aa;
    --brand-ring: rgba(249, 115, 22, 0.22);
    --primary: var(--brand);
    --neon-orange: var(--brand);
    --secondary: var(--brand-600);

    /* Texto */
    --text-main: #1e293b;
    --text-muted: #475569;
    --text-dim: #64748b;
    --icon: #64748b;

    /* Estados */
    --success: #16a34a;
    --success-50: #effcf4;
    --danger: #e11d48;
    --danger-50: #fff1f3;
    --warning: #d97706;
    --info: #0284c7;
    --neon-green: #16a34a;

    /* Bordes / radios / sombras suaves */
    --line: #e8ebf2;
    --line-soft: #f0f2f7;
    --card-border: 1px solid var(--line);
    --border-subtle: 1px solid var(--line-soft);
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --shadow-xs: 0 1px 2px rgba(30, 41, 59, 0.04);
    --shadow-card: 0 1px 2px rgba(30, 41, 59, 0.03), 0 6px 20px -10px rgba(30, 41, 59, 0.10);
    --shadow-card-hover: 0 2px 6px rgba(30, 41, 59, 0.04), 0 18px 36px -16px rgba(30, 41, 59, 0.18);
    --shadow-pop: 0 24px 60px -20px rgba(30, 41, 59, 0.25);

    /* Motion */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --dur-fast: 150ms;
    --dur: 220ms;

    --sidebar-width: 288px;
    --header-height: 72px;
}

/* ---------- Base ---------- */
* {
    font-family: 'Plus Jakarta Sans', 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

i.bx, .bx, [class^="bx-"], [class*=" bx-"] {
    font-family: 'boxicons' !important;
}

body {
    background:
        radial-gradient(900px 420px at 100% -5%, rgba(249, 115, 22, 0.07), transparent 65%),
        radial-gradient(800px 420px at 0% 105%, rgba(251, 191, 36, 0.06), transparent 65%),
        var(--bg-dark);
    background-attachment: fixed;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--brand-100); color: var(--brand-700); }

.balance-amount, .stat-value, .wallet-balance, .tx-amount,
.order-card-price, .order-fin-amount, .module-badge {
    font-variant-numeric: tabular-nums;
}

:where(a, button, input, select, textarea, .sidebar-link, .module-card, [onclick]):focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

* { scrollbar-width: thin; scrollbar-color: #d5dbe5 transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #d5dbe5; border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* ==========================================================================
   SIDEBAR (panel claro flotante)
   ========================================================================== */
.sidebar {
    background: var(--bg-sidebar);
    border-right: 1px solid var(--line);
    padding: 20px 14px 14px;
}

@media (min-width: 769px) {
    .sidebar {
        top: 14px;
        left: 14px;
        width: calc(var(--sidebar-width) - 28px);
        height: calc(100vh - 28px);
        border: 1px solid var(--line);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-card);
    }
}

.sidebar-header {
    border-bottom: 1px solid var(--line-soft);
    padding: 0 6px 16px;
    margin-bottom: 6px;
}

.sidebar-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: none;
    box-shadow: 0 0 0 1px var(--line), 0 6px 14px -6px rgba(249, 115, 22, 0.45);
}

.sidebar-title {
    font-family: 'Orbitron', sans-serif !important;
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: 1.1px;
}

.sidebar-tag {
    display: inline-block;
    margin-top: 3px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: var(--brand-700);
    background: var(--brand-50);
    border: 1px solid var(--brand-200);
    padding: 2px 8px;
    border-radius: 99px;
}

.sidebar-menu { gap: 6px; padding: 0 2px 4px 0; }
.sidebar-menu::-webkit-scrollbar-thumb { background: #e2e7ef; border: 0; }

.menu-category {
    color: #8a96a8;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.6px;
    margin: 16px 10px 6px;
}

.sidebar .sidebar-link {
    position: relative;
    color: var(--text-main) !important;
    background: #ffffff;
    border: 1px solid var(--line);
    font-weight: 600;
    font-size: 0.87rem;
    padding: 9px 34px 9px 10px;
    min-height: 44px;
    border-radius: 13px;
    box-shadow: none;
    transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease, color var(--dur-fast) ease;
}

/* Chevron a la derecha */
.sidebar .sidebar-link::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 1.8px solid #a0aabb;
    border-bottom: 1.8px solid #a0aabb;
    transform: translateY(-50%) rotate(-45deg);
    transition: transform var(--dur) var(--ease-out), border-color var(--dur-fast) ease;
}

/* Íconos uniformes y suaves (ignora colores neón inline) */
.sidebar .sidebar-link i {
    font-size: 1.2rem !important;
    color: var(--icon) !important;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: transparent;
    transform: none !important;
    transition: color var(--dur-fast) ease;
}

.sidebar .sidebar-link:hover {
    background: var(--surface-soft);
    border-color: #d9dee8;
    color: var(--text-main) !important;
}
.sidebar .sidebar-link:hover::after { transform: translate(2px, -50%) rotate(-45deg); }

.sidebar .sidebar-link.active {
    background: linear-gradient(180deg, #fff8f1 0%, var(--brand-50) 100%) !important;
    border-color: var(--brand-200);
    color: var(--brand-700) !important;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.08) !important;
}
.sidebar .sidebar-link.active i { color: var(--brand-600) !important; }
.sidebar .sidebar-link.active::after { border-color: var(--brand); }

.sidebar-user {
    border-top: 1px solid var(--line-soft);
    margin-top: 10px;
    padding: 12px 6px 0;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border: none;
    background: linear-gradient(135deg, #fdba74, #f97316);
    box-shadow: 0 0 0 3px var(--brand-50);
}

.user-name { color: var(--text-main); font-weight: 700; }
.user-role { color: var(--brand-600); font-weight: 600; }

.sidebar-user .icon-btn {
    background: var(--danger-50);
    border: 1px solid #fecdd3;
    box-shadow: none;
}
.sidebar-user .icon-btn i { color: var(--danger) !important; }
.sidebar-user .icon-btn:hover { background: #ffe4e8; border-color: #fda4af; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.desktop-header {
    background: var(--bg-header);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 0 30px;
}

.header-title-box h1 {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 1.32rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.header-title-box p {
    font-size: 0.82rem;
    color: var(--text-dim);
    font-weight: 500;
}

@media (min-width: 769px) {
    .header-actions { gap: 8px; }

    .header-actions .badge-pill {
        background: var(--surface-soft);
        border: 1px solid var(--line);
        color: var(--text-main);
        font-weight: 700;
        font-size: 0.8rem;
        padding: 8px 14px;
        box-shadow: none;
        transition: border-color var(--dur-fast) ease, background var(--dur-fast) ease;
    }
    .header-actions .badge-pill i { font-size: 1.05rem; color: var(--icon); }
    .header-actions .badge-pill[onclick]:hover {
        background: #ffffff;
        border-color: var(--brand-200);
    }
}

.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: #ffffff;
    border: 1px solid var(--line);
    color: var(--text-muted);
    box-shadow: none;
    transition: background var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}

.icon-btn:hover {
    background: var(--brand-50);
    color: var(--brand-600);
    border-color: var(--brand-200);
}

/* ==========================================================================
   CONTENIDO / TÍTULOS
   ========================================================================== */
#app-content { padding: 26px 30px 40px; }

@keyframes fadeInPage {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.page { animation: fadeInPage 260ms var(--ease-out) both; }

/* Título de sección como "hero" suave */
.section-title {
    margin: 0 0 18px;
    padding: 18px 22px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background:
        radial-gradient(500px 160px at 100% 0%, rgba(249, 115, 22, 0.08), transparent 70%),
        linear-gradient(180deg, #ffffff 0%, #fdf9f6 100%);
}

.section-title h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.section-title h2 i {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.1rem;
    color: var(--brand-600);
    background: var(--brand-50);
    border: 1px solid var(--brand-200);
}

/* ==========================================================================
   TARJETAS
   ========================================================================== */
.glass {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--dur) ease, border-color var(--dur) ease, transform var(--dur) var(--ease-out);
}
.glass:hover { border-color: var(--line); }

.modules-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.module-card {
    padding: 18px;
    min-height: 168px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: #ffffff;
    box-shadow: var(--shadow-xs);
}

.module-card::before { display: none; }

.module-card:hover {
    transform: translateY(-2px);
    border-color: var(--brand-200);
    box-shadow: var(--shadow-card-hover);
}
.module-card:active { transform: translateY(0) scale(0.99); }

.module-icon-box {
    width: 52px;
    height: 52px;
    padding: 0;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    color: var(--brand-600);
    box-shadow: none;
}
.module-icon-box img { border-radius: 13px; }

.module-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 4px 10px 4px 8px;
    background: var(--success-50);
    color: #15803d;
    border: 1px solid #c9f0d6;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.module-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
}

.module-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.module-subtitle { color: var(--text-dim); font-weight: 500; }

/* Pie con botón circular de flecha */
.module-footer {
    border-top: 1px solid var(--line-soft);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.8rem;
}
.module-footer i {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    font-size: 1rem;
    color: var(--icon);
    transition: transform var(--dur) var(--ease-out), background var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.module-card:hover .module-footer { color: var(--brand-700); }
.module-card:hover .module-footer i {
    background: var(--brand-50);
    border-color: var(--brand-200);
    color: var(--brand-600);
    transform: translateX(2px);
}

.game-title-banner img {
    border: none;
    border-radius: 14px;
    box-shadow: 0 0 0 1px var(--line), 0 6px 14px -8px rgba(30, 41, 59, 0.25);
}

/* Balance */
.net-worth-card {
    background:
        radial-gradient(500px 220px at 100% 0%, rgba(249, 115, 22, 0.07), transparent 70%),
        #ffffff;
}
.balance-amount { letter-spacing: -0.03em; }

.currency-select {
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.profit-pill {
    background: var(--success-50);
    color: #15803d;
    border: 1px solid #c9f0d6;
    box-shadow: none;
}

/* Stat boxes estilo "at a glance" */
.stat-box {
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
}
.stat-icon {
    border-radius: 14px;
    background: var(--brand-50);
    color: var(--brand-600);
    border: 1px solid var(--brand-200);
}
.stat-info h4 { color: var(--text-dim); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.08em; }
.stat-value { letter-spacing: -0.02em; }

/* Billeteras y transacciones */
.wallet-card { transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) ease, border-color var(--dur) ease; }
.wallet-card:hover { border-color: var(--brand-200); box-shadow: var(--shadow-card-hover); }

.tx-item { border: 1px solid var(--line); box-shadow: var(--shadow-xs); }
.tx-item:hover { border-color: #d9dee8; }
.tx-icon-box { border-radius: 12px; }
.tx-icon-box.in  { background: var(--success-50); color: var(--success); border: 1px solid #c9f0d6; }
.tx-icon-box.out { background: var(--danger-50); color: var(--danger); border: 1px solid #fecdd3; }
.tx-icon-box.robux { background: var(--brand-50); color: var(--brand-600); border: 1px solid var(--brand-200); }
.tx-amount.pos { color: var(--success); }
.tx-profit { color: var(--text-dim); }

/* ==========================================================================
   FORMULARIOS
   ========================================================================== */
.input-group label {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.glass-input, .glass-select {
    min-height: 44px;
    background: #ffffff;
    border: 1px solid #dfe4ec;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    color: var(--text-main);
    box-shadow: none;
    transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.glass-input::placeholder { color: #94a3b8; }
.glass-input:hover, .glass-select:hover { border-color: #cbd3df; }

.glass-input:focus, .glass-select:focus,
.input-modern:focus {
    border-color: var(--brand) !important;
    box-shadow: 0 0 0 4px var(--brand-ring) !important;
    outline: none;
}

/* Botón principal sólido y limpio */
.btn-neon {
    min-height: 46px;
    border-radius: 13px;
    border: 1px solid var(--brand);
    background: var(--brand);
    color: #ffffff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 18px -10px rgba(249, 115, 22, 0.75);
    transition: transform var(--dur-fast) ease, box-shadow var(--dur) ease, background var(--dur-fast) ease;
}
.btn-neon:hover {
    opacity: 1;
    transform: translateY(-1px);
    background: var(--brand-600);
    border-color: var(--brand-600);
    box-shadow: 0 12px 22px -12px rgba(234, 88, 12, 0.8);
}
.btn-neon:active { transform: translateY(0) scale(0.99); }
.btn-neon:disabled, .btn-neon[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn { transition: filter var(--dur-fast) ease, transform var(--dur-fast) ease, box-shadow var(--dur-fast) ease; }
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: scale(0.98); }

/* ==========================================================================
   LOGIN (claro y suave)
   ========================================================================== */
.lock-screen {
    background:
        radial-gradient(620px 380px at 12% 8%, rgba(249, 115, 22, 0.14), transparent 65%),
        radial-gradient(560px 380px at 92% 92%, rgba(251, 191, 36, 0.14), transparent 65%),
        #f6f7fb;
}

.lock-container {
    max-width: 420px;
    padding: 40px 32px 32px;
    border-radius: 26px;
    border: 1px solid var(--line);
    background: #ffffff;
    box-shadow: var(--shadow-pop);
}

.lock-logo {
    width: 76px;
    height: 76px;
    border: none;
    border-radius: 20px;
    box-shadow: 0 0 0 1px var(--line), 0 12px 24px -12px rgba(249, 115, 22, 0.55);
}

.lock-title {
    font-family: 'Orbitron', sans-serif !important;
    font-size: 1.3rem;
    letter-spacing: 1.4px;
    color: var(--text-main);
}
.lock-subtitle { color: var(--text-dim); font-weight: 500; }
.lock-container .input-group { text-align: left; }

/* ==========================================================================
   MODALES / TOAST
   ========================================================================== */
.modal {
    background: rgba(30, 41, 59, 0.28);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.modal-content {
    border-radius: 22px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-pop);
    transform: translateY(8px) scale(0.98);
    transition: transform 260ms var(--ease-out);
}
.modal.active .modal-content { transform: none; }

.modal-header {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line-soft);
}

.close-modal {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    border: 1px solid var(--line);
    transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}
.close-modal:hover { background: var(--danger-50); color: var(--danger); border-color: #fecdd3; }

.toast {
    border-radius: 14px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--brand);
    box-shadow: var(--shadow-pop);
    font-weight: 600;
}

.swal2-container.swal2-backdrop-show { background: rgba(30, 41, 59, 0.28) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.swal2-popup { border-radius: 22px !important; font-family: 'Plus Jakarta Sans', sans-serif !important; }
.swal2-styled.swal2-confirm { border-radius: 12px !important; font-weight: 700 !important; }
.swal2-styled.swal2-cancel  { border-radius: 12px !important; font-weight: 700 !important; }

/* ==========================================================================
   TABLAS / ÓRDENES
   ========================================================================== */
.inventory-table { border-collapse: separate; border-spacing: 0; }
.inventory-table th {
    background: var(--surface-soft);
    color: var(--text-dim);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--line);
}
.inventory-table td {
    background: #ffffff;
    color: var(--text-main);
    border-bottom: 1px solid var(--line-soft);
}
.inventory-table tbody tr:hover td { background: var(--surface-soft); }

.order-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) ease, border-color var(--dur) ease;
}
.order-card:hover { border-color: #d9dee8; box-shadow: var(--shadow-card-hover); }

/* ==========================================================================
   MÓVIL
   ========================================================================== */
@media (max-width: 768px) {
    .desktop-header {
        background: rgba(255, 255, 255, 0.92) !important;
        backdrop-filter: saturate(180%) blur(14px);
        -webkit-backdrop-filter: saturate(180%) blur(14px);
        border-bottom: 1px solid var(--line) !important;
    }
    .sidebar { box-shadow: none; width: 280px; }
    .sidebar.active { box-shadow: 12px 0 40px rgba(30, 41, 59, 0.18); }
    .mobile-overlay {
        background: rgba(30, 41, 59, 0.28);
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    .section-title { padding: 14px 16px; flex-wrap: wrap; gap: 4px; }
    .modules-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .module-card { min-height: 150px; padding: 14px !important; }
    .module-icon-box { width: 46px; height: 46px; }
    .lock-container { padding: 32px 22px 24px; }
}

/* ==========================================================================
   ACCESIBILIDAD: movimiento reducido
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
