/* ==========================================================================
   BINNDER TCG MARKETPLACE — DESIGN SYSTEM & ANIMATIONS
   ========================================================================== */

:root {
    --bg-dark:        #030611;
    --bg-deep:        #070e20;
    --primary:        #0066ff;
    --primary-glow:   rgba(0,102,255,0.45);
    --secondary:      #00d4ff;
    --white:          #ffffff;
    --glass-bg:       rgba(10,18,40,0.55);
    --glass-border:   rgba(255,255,255,0.08);
    --text-light:     #f1f5f9;
    --text-muted:     #7a90b8;
    --font-h:         'Outfit', sans-serif;
    --font-b:         'Inter', sans-serif;
    --ease-spring:    cubic-bezier(0.34,1.56,0.64,1);
    --ease-smooth:    cubic-bezier(0.25,0.8,0.25,1);

    /* TCG Colors */
    --mtg-gold:    #c9a84c;
    --mtg-bg:      #1a0f05;
    --poke-yellow: #f5c518;
    --poke-bg:     #0e1a2b;
    --op-red:      #e63946;
    --op-bg:       #1a0810;
    --binnder-bg:  #f0f5ff;
}

/* ──────────── RESET ──────────── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg-dark);
    color: var(--text-light);
    font-family: var(--font-b);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ──────────── SELECTS (dropdowns nativos) ──────────── */
select {
    color-scheme: dark;
}
select option {
    background: var(--bg-dark);
    color: var(--text-light);
}

/* ==========================================================================
   SPLASH SCREEN — STORYBOARD (igual que antes)
   ========================================================================== */
.splash-screen {
    position: fixed; inset: 0;
    background: #02040b;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s cubic-bezier(0.77,0,0.175,1),
                visibility 1s cubic-bezier(0.77,0,0.175,1),
                transform 1.2s cubic-bezier(0.77,0,0.175,1);
}
.splash-screen.fade-out { opacity:0; visibility:hidden; transform:scale(1.03); }

.btn-skip-splash {
    position: absolute; top:30px; right:40px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    padding: .5rem 1.2rem; border-radius:30px;
    color: var(--text-muted); font-family: var(--font-h);
    font-size:.85rem; font-weight:600; letter-spacing:1px;
    cursor:pointer; backdrop-filter:blur(10px);
    transition: all .3s var(--ease-smooth); z-index:10000;
}
.btn-skip-splash:hover {
    background:rgba(255,255,255,0.12); color:var(--white);
    border-color:rgba(255,255,255,0.2); transform:translateY(-2px);
}

.splash-beam {
    position:absolute; width:0; height:2px;
    background: linear-gradient(90deg, transparent, var(--secondary) 20%, var(--white) 50%, var(--secondary) 80%, transparent);
    box-shadow: 0 0 15px var(--secondary), 0 0 35px var(--primary);
    opacity:0; z-index:5;
}
.animate-beam { animation: beamEntrance 1.4s cubic-bezier(0.25,1,0.5,1) forwards; }

.splash-bg-glow {
    position:absolute; width:450px; height:450px;
    background: radial-gradient(circle, rgba(0,102,255,.25) 0%, rgba(0,212,255,.04) 50%, transparent 70%);
    border-radius:50%; filter:blur(25px); opacity:0; transform:scale(.5); z-index:1;
}
.animate-glow { animation: glowEntrance 2.2s cubic-bezier(0.25,1,0.5,1) forwards; }

.logo-storyboard-wrapper {
    position:relative; width:280px; height:280px;
    margin-bottom:2rem; perspective:1200px;
    display:flex; justify-content:center; align-items:center; z-index:3;
    animation: gentleFloat 4s ease-in-out infinite 2.6s;
}

.splash-card {
    position:absolute; width:140px; height:205px;
    border-radius:18px; opacity:0; transform-style:preserve-3d; overflow:hidden;
    box-shadow: 0 12px 35px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08) inset;
}
.splash-card-1 { background:linear-gradient(135deg,#091a3c,#030815); z-index:10; animation:slideUpBlur1 1.2s cubic-bezier(0.25,1,0.5,1) forwards .4s; }
.splash-card-2 { background:linear-gradient(135deg,#0b2f7a,#03112c); z-index:20; animation:slideUpBlur2 1.2s cubic-bezier(0.25,1,0.5,1) forwards .6s; }
.splash-card-3 { background:linear-gradient(135deg,#0059ff,#002277); z-index:30; box-shadow:0 15px 35px rgba(0,89,255,.25); animation:slideUpBlur3 1.2s cubic-bezier(0.25,1,0.5,1) forwards .8s; }
.splash-card-4 { background:linear-gradient(135deg,#ffffff,#dbeafe); z-index:40; border:1px solid rgba(255,255,255,.9); box-shadow:0 20px 45px rgba(0,0,0,.5),0 0 30px rgba(0,102,255,.15); animation:frontCardEntrance 1.4s var(--ease-spring) forwards 1.0s; }

.splash-card-corner { position:absolute; bottom:-1px; right:-1px; width:40px; height:40px; background:#0059ff; clip-path:circle(100% at 100% 100%); border-bottom-right-radius:18px; }

.splash-diamond {
    position:absolute; top:50%; left:50%;
    transform:translate(-50%,-50%) rotate(45deg);
    width:38px; height:38px;
    background:linear-gradient(135deg,#005bf2,#0036a3);
    border-radius:7px; box-shadow:0 4px 10px rgba(0,93,242,.3); z-index:2;
    animation:diamondPulse 1.0s cubic-bezier(0.25,0.8,0.25,1) forwards 1.6s;
}

.shimmer-sweep {
    position:absolute; top:0; left:-150%; width:100%; height:100%;
    background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.7) 50%,transparent 100%);
    transform:skewX(-25deg); z-index:5;
    animation:shimmerSweep 1.2s cubic-bezier(0.25,1,0.5,1) forwards 2.1s;
}

.splash-content {
    position:relative; z-index:2; display:flex; flex-direction:column;
    align-items:center; text-align:center; width:90%; max-width:480px;
}
.splash-title {
    font-family:var(--font-h); font-size:3rem; font-weight:800;
    letter-spacing:6px; color:var(--white);
    text-shadow: 0 0 20px rgba(0,102,255,.4), 0 0 40px rgba(0,212,255,.2);
    opacity:0; transform:translateY(20px);
    animation:fadeInUp .8s ease-out forwards 1.8s;
}
.splash-subtitle {
    font-size:1rem; color:var(--text-muted); letter-spacing:2px;
    margin-bottom:3rem; text-transform:uppercase; font-weight:500;
    opacity:0; transform:translateY(20px);
    animation:fadeInUp .8s ease-out forwards 2.0s;
}
.loader-container { width:50%; opacity:0; animation:fadeIn .8s ease-out forwards 2.2s; }
.loader-bar { width:100%; height:3px; background:rgba(255,255,255,.05); border-radius:10px; overflow:hidden; }
.loader-progress { height:100%; width:0%; background:linear-gradient(90deg,var(--primary),var(--secondary)); border-radius:10px; box-shadow:0 0 8px var(--primary); transition:width .1s linear; }

/* ──────────── SPLASH KEYFRAMES ──────────── */
@keyframes beamEntrance { 0%{width:0;opacity:0} 25%{width:250px;opacity:.8} 60%{width:250px;opacity:.8} 100%{width:320px;opacity:0} }
@keyframes glowEntrance { 0%{opacity:0;transform:scale(.4)} 40%{opacity:1;transform:scale(1)} 100%{opacity:.7;transform:scale(.9)} }
@keyframes slideUpBlur1 { 0%{opacity:0;transform:translate3d(-35px,250px,-120px) rotate(-35deg);filter:blur(20px)} 100%{opacity:.75;transform:translate3d(-35px,15px,-30px) rotate(-15deg);filter:blur(0)} }
@keyframes slideUpBlur2 { 0%{opacity:0;transform:translate3d(-20px,250px,-90px) rotate(-28deg);filter:blur(20px)} 100%{opacity:.88;transform:translate3d(-20px,7px,-20px) rotate(-9deg);filter:blur(0)} }
@keyframes slideUpBlur3 { 0%{opacity:0;transform:translate3d(-5px,250px,-60px) rotate(-20deg);filter:blur(20px)} 100%{opacity:.95;transform:translate3d(-5px,0,-10px) rotate(-3deg);filter:blur(0)} }
@keyframes frontCardEntrance { 0%{opacity:0;transform:translate3d(15px,-10px,280px) rotate(22deg) scale(2.2);filter:blur(15px)} 100%{opacity:1;transform:translate3d(15px,-10px,0) rotate(5deg) scale(1);filter:blur(0)} }
@keyframes diamondPulse { 0%{transform:translate(-50%,-50%) rotate(45deg) scale(1)} 40%{transform:translate(-50%,-50%) rotate(45deg) scale(1.35);background:linear-gradient(135deg,#00d4ff,#0066ff);box-shadow:0 0 25px #00d4ff,0 0 50px #0066ff} 100%{transform:translate(-50%,-50%) rotate(45deg) scale(1)} }
@keyframes shimmerSweep { 0%{left:-150%} 100%{left:150%} }
@keyframes gentleFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
@keyframes fadeInUp { 0%{opacity:0;transform:translateY(30px)} 100%{opacity:1;transform:translateY(0)} }
@keyframes fadeIn { 0%{opacity:0} 100%{opacity:1} }
@keyframes slideIn { to{opacity:1;transform:translateX(0)} }
@keyframes drawLine { to{stroke-dashoffset:0} }
@keyframes drawArea { to{scale:1 1} }
@keyframes pulseGlow { 0%,100%{opacity:.5;transform:scale(.95)} 50%{opacity:.9;transform:scale(1.1)} }
@keyframes tickerMove { 0%{background-position:0 50%} 100%{background-position:100% 50%} }
@keyframes livePulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.8)} }

/* ==========================================================================
   APP CONTAINER & NAV
   ========================================================================== */
.app-container { min-height:100vh; display:flex; flex-direction:column; background:radial-gradient(circle at 15% 10%,#07112a 0%,#030611 85%); }
.hidden { display:none !important; }

/* NAV */
.navbar {
    display:flex; justify-content:space-between; align-items:center;
    padding:1.1rem 5%;
    background:rgba(5,10,25,0.7);
    backdrop-filter:blur(30px) saturate(180%);
    border-bottom:1px solid var(--glass-border);
    position:sticky; top:0; z-index:100;
}
.animate-fade-in-down { opacity:0; transform:translateY(-20px); animation:fadeInUp .8s cubic-bezier(0.25,1,0.5,1) forwards; }
.animate-fade-in-up { opacity:0; transform:translateY(30px); animation:fadeInUp .9s cubic-bezier(0.25,1,0.5,1) forwards .15s; }

.nav-logo { display:flex; align-items:center; gap:.75rem; }
.nav-logo-vector { position:relative; width:32px; height:32px; display:flex; justify-content:center; align-items:center; }
.nav-card-mini { position:absolute; width:17px; height:24px; border-radius:4px; box-shadow:0 2px 6px rgba(0,0,0,.45); }
.nav-card-1 { background:#091a3c; transform:translate3d(-5px,2px,0) rotate(-15deg); z-index:1; }
.nav-card-2 { background:#0b2f7a; transform:translate3d(-3px,1px,0) rotate(-9deg); z-index:2; }
.nav-card-3 { background:#0059ff; transform:translate3d(-1px,0,0) rotate(-3deg); z-index:3; }
.nav-card-4 { background:#fff; transform:translate3d(2px,-1px,0) rotate(5deg); z-index:4; border:.5px solid rgba(255,255,255,.8); display:flex; align-items:center; justify-content:center; }
.nav-diamond-mini { width:4.5px; height:4.5px; background:#0059ff; transform:rotate(45deg); border-radius:1px; }
.nav-logo-text { font-family:var(--font-h); font-weight:800; font-size:1.45rem; letter-spacing:2px; background:linear-gradient(90deg,#fff,#8fa0c2); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }

.beta-badge { display:inline-flex; align-items:center; padding:.15rem .5rem; margin-left:.15rem; border-radius:20px; font-family:var(--font-b); font-size:.62rem; font-weight:700; letter-spacing:1px; line-height:1; color:#00d4ff; background:rgba(0,212,255,.1); border:1px solid rgba(0,212,255,.35); text-transform:uppercase; vertical-align:middle; }
.splash-title .beta-badge { font-size:.7rem; padding:.2rem .6rem; margin-left:.4rem; vertical-align:.5rem; }

.nav-links { display:flex; list-style:none; gap:2.2rem; }
.nav-links a { color:var(--text-muted); text-decoration:none; font-size:.95rem; font-weight:500; transition:all .25s var(--ease-smooth); position:relative; padding:.25rem 0; }
.nav-links li.active a, .nav-links a:hover { color:var(--white); }
.nav-links li.active a::after { content:''; position:absolute; bottom:-4px; left:0; width:100%; height:2px; background:linear-gradient(90deg,var(--primary),var(--secondary)); border-radius:10px; box-shadow:0 0 8px var(--primary); }

.nav-actions { display:flex; align-items:center; gap:1rem; }
.btn-nav-sell { padding:.6rem 1.25rem; border-radius:30px; border:1px solid rgba(0,102,255,.4); background:rgba(0,102,255,.1); color:var(--primary); font-family:var(--font-h); font-weight:600; font-size:.9rem; cursor:pointer; transition:all .3s var(--ease-smooth); }
.btn-nav-sell:hover { background:rgba(0,102,255,.25); border-color:var(--primary); transform:translateY(-2px); }
.avatar { width:38px; height:38px; border-radius:50%; background:linear-gradient(135deg,var(--primary),var(--secondary)); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:.85rem; color:var(--white); border:2px solid rgba(255,255,255,.12); box-shadow:0 4px 10px rgba(0,102,255,.3); }

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    display:grid; grid-template-columns:1fr 1fr;
    align-items:center; gap:4rem;
    padding:4.5rem 5% 3rem;
    max-width:1380px; margin:0 auto; width:100%;
}

.hero-badge {
    display:inline-flex; align-items:center; gap:.6rem;
    background:rgba(0,212,255,.08); border:1px solid rgba(0,212,255,.2);
    color:var(--secondary); padding:.45rem 1.1rem; border-radius:30px;
    font-size:.82rem; font-weight:600; letter-spacing:.5px;
    margin-bottom:1.75rem;
}
.badge-dot { width:7px; height:7px; border-radius:50%; background:var(--secondary); animation:livePulse 1.8s infinite ease-in-out; }

.hero-title {
    font-family:var(--font-h); font-size:3.4rem; font-weight:900;
    line-height:1.12; color:var(--white); margin-bottom:1.5rem;
    letter-spacing:-.5px;
}
.hero-highlight {
    background:linear-gradient(90deg,var(--primary) 0%,var(--secondary) 100%);
    -webkit-background-clip:text; -webkit-text-fill-color:transparent;
}
.hero-desc { color:var(--text-muted); font-size:1.1rem; line-height:1.7; max-width:520px; margin-bottom:2.5rem; }

.hero-cta { display:flex; gap:1rem; flex-wrap:wrap; margin-bottom:2.5rem; }
.btn { padding:.85rem 1.75rem; border-radius:14px; border:none; font-family:var(--font-h); font-weight:700; font-size:1rem; cursor:pointer; display:inline-flex; align-items:center; gap:.6rem; transition:all .4s var(--ease-spring); }
.btn-primary { background:linear-gradient(135deg,var(--primary),#004ecc); color:var(--white); box-shadow:0 8px 24px rgba(0,102,255,.35); }
.btn-primary:hover { transform:translateY(-3px) scale(1.02); box-shadow:0 14px 30px rgba(0,102,255,.5),0 0 15px rgba(0,212,255,.25); }
.btn-ghost { background:rgba(255,255,255,.04); color:var(--white); border:1px solid rgba(255,255,255,.12); }
.btn-ghost:hover { background:rgba(255,255,255,.1); transform:translateY(-3px); }
.btn-lg { font-size:1.05rem; padding:1rem 2rem; }
.btn-arrow { transition:transform .3s; }
.btn-primary:hover .btn-arrow { transform:translateX(5px); }

/* Hero Stats */
.hero-stats { display:flex; align-items:center; gap:1.5rem; }
.hero-stat { display:flex; flex-direction:column; gap:.15rem; }
.stat-num { font-family:var(--font-h); font-size:1.5rem; font-weight:800; color:var(--white); }
.stat-label { font-size:.78rem; color:var(--text-muted); font-weight:500; text-transform:uppercase; letter-spacing:.5px; }
.hero-stat-divider { width:1px; height:35px; background:rgba(255,255,255,.1); }

/* ──────────── DECK SECTION (Cards 3D) ──────────── */
.hero-cards-side { display:flex; flex-direction:column; align-items:center; gap:1.25rem; }

.deck-container {
    position:relative; height:480px; width:360px;
    perspective:1500px; display:flex; justify-content:center; align-items:center;
}

.interactive-card {
    position:absolute; width:200px; height:290px;
    cursor:pointer;
    transition:transform .8s cubic-bezier(0.25,1,0.5,1), box-shadow .5s ease, opacity .6s ease;
    border-radius:18px;
}
.card-inner { position:relative; width:100%; height:100%; border-radius:18px; }

.card-front {
    position:absolute; inset:0; border-radius:18px;
    padding:1.25rem; display:flex; flex-direction:column;
    box-shadow:0 15px 35px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.08) inset;
    overflow:hidden;
}
.card-back { display:none; }

/* CARRUSEL — ESTADOS POR POSICIÓN RELATIVA */
.card-state-active {
    z-index: 30;
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 1;
    box-shadow: 0 25px 60px rgba(0,0,0,.6), 0 0 35px rgba(0,102,255,.2);
}
.card-state-prev {
    z-index: 20;
    transform: translate3d(-165px, 18px, -30px) rotate(-14deg) scale(0.88);
    opacity: 0.7;
}
.card-state-next {
    z-index: 20;
    transform: translate3d(165px, 18px, -30px) rotate(14deg) scale(0.88);
    opacity: 0.7;
}
.card-state-far-left {
    z-index: 10;
    transform: translate3d(-280px, 35px, -60px) rotate(-24deg) scale(0.75);
    opacity: 0;
    pointer-events: none;
}
.card-state-far-right {
    z-index: 10;
    transform: translate3d(280px, 35px, -60px) rotate(24deg) scale(0.75);
    opacity: 0;
    pointer-events: none;
}

/* BOTONES DE NAVEGACIÓN */
.deck-nav {
    display: flex; align-items: center; gap: 1.25rem;
    margin-top: .85rem;
}
.deck-btn {
    width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.05);
    color: var(--white); font-size: 1.5rem; line-height: 1;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all .3s var(--ease-smooth);
    backdrop-filter: blur(10px); flex-shrink: 0; user-select: none;
}
.deck-btn:hover {
    background: rgba(0,102,255,.2); border-color: rgba(0,102,255,.5);
    box-shadow: 0 0 15px rgba(0,102,255,.25); transform: scale(1.08);
}
.deck-btn:active { transform: scale(0.94); }
.deck-dots { display: flex; gap: .45rem; align-items: center; }
.deck-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: rgba(255,255,255,.2);
    transition: all .35s var(--ease-smooth);
}
.deck-dot.active {
    width: 20px; border-radius: 3px;
    background: var(--primary);
    box-shadow: 0 0 8px rgba(0,102,255,.5);
}

/* ── CF CARD FRONT (shared game card design) ─────────────────────── */
.cf-top { display:flex; justify-content:space-between; align-items:center; margin-bottom:.6rem; flex-shrink:0; }
.cf-tag { font-family:var(--font-h); font-size:.58rem; font-weight:700; letter-spacing:1px; padding:.22rem .6rem; border-radius:5px; }
.cf-count { font-size:.68rem; font-weight:500; opacity:.8; }
.cf-icon-wrap { width:58px; height:58px; border-radius:50%; border:2px solid rgba(255,255,255,.4); align-self:center; display:flex; align-items:center; justify-content:center; margin:.5rem 0; flex-shrink:0; }
.cf-icon-ring { display:none; }
.cf-icon-glyph { font-size:1.85rem; line-height:1; }
.cf-name { font-family:var(--font-h); font-size:1.2rem; font-weight:800; text-align:center; letter-spacing:.3px; }
.cf-subname { font-size:.7rem; text-align:center; opacity:.75; letter-spacing:.5px; margin-bottom:.25rem; }
.cf-divider { width:100%; height:1px; background:rgba(255,255,255,.3); margin:.5rem 0; flex-shrink:0; }
.cf-footer { display:flex; justify-content:space-around; align-items:center; margin-top:auto; }
.cf-footer-item { display:flex; align-items:center; gap:.3rem; font-size:.68rem; font-weight:600; }
.cf-dot { width:5px; height:5px; border-radius:50%; flex-shrink:0; background:rgba(255,255,255,.7); }

/* Tag badge colors per game */
.mtg-tag-front  { background:rgba(255,255,255,.22); color:#fff; }
.poke-tag-front { background:rgba(0,0,0,.15); color:#1a1a1a; }
.op-tag-front   { background:rgba(255,255,255,.22); color:#fff; }
.rift-tag-front { background:rgba(255,255,255,.22); color:#fff; }

/* Pokemon (yellow bg) dark-text overrides */
.card-pokemon .card-front { color:#1a1a1a; }
.card-pokemon .card-front .cf-icon-wrap { border-color:rgba(0,0,0,.25); }
.card-pokemon .card-front .cf-divider { background:rgba(0,0,0,.18); }
.card-pokemon .card-front .cf-dot { background:rgba(0,0,0,.45); }
.card-pokemon .card-front .cf-icon-glyph { filter:drop-shadow(0 0 8px rgba(0,0,0,.2)); }

/* FRONTALES TCG */

/* MTG — Solid Red */
.card-mtg .card-front { background:linear-gradient(135deg,#e63946 0%,#b5121e 100%); border:2px solid rgba(255,255,255,.2); color:#fff; }

/* Pokémon — Solid Yellow */
.card-pokemon .card-front { background:linear-gradient(135deg,#ffd60a 0%,#f0a000 100%); border:2px solid rgba(255,255,255,.3); }

/* One Piece — Solid Purple */
.card-onepiece .card-front { background:linear-gradient(135deg,#7c3aed 0%,#5218b5 100%); border:2px solid rgba(255,255,255,.2); color:#fff; }

/* Riftbound — Solid Orange */
.card-riftbound .card-front { background:linear-gradient(135deg,#f97316 0%,#c2410c 100%); border:2px solid rgba(255,255,255,.2); color:#fff; }

/* Binnder */
.card-binnder .card-front { background:linear-gradient(135deg,#f0f5ff,#dce8ff); border:1.5px solid rgba(0,102,255,.3); }
.front-shimmer { position:absolute; inset:0; background:linear-gradient(135deg,transparent 40%,rgba(0,102,255,.06) 60%,transparent 80%); border-radius:18px; animation:shimmerBinnder 4s ease-in-out infinite; }
@keyframes shimmerBinnder { 0%,100%{opacity:.4} 50%{opacity:1} }
.binnder-card-logo { display:flex; justify-content:center; margin:1rem 0 .75rem; }
.binnder-diamond { width:42px; height:42px; background:linear-gradient(135deg,#005bf2,#0036a3); transform:rotate(45deg); border-radius:9px; box-shadow:0 8px 20px rgba(0,93,242,.35); }
.binnder-card-title { font-family:var(--font-h); font-weight:800; font-size:1.3rem; color:#030814; letter-spacing:1px; text-align:center; }
.binnder-card-sub { font-size:.75rem; color:#4a6a9c; text-align:center; text-transform:uppercase; letter-spacing:1.5px; margin-bottom:.75rem; }
.binnder-card-stats { display:flex; align-items:center; justify-content:space-around; padding:.75rem .5rem; background:rgba(0,102,255,.06); border-radius:10px; border:1px solid rgba(0,102,255,.1); }
.bc-stat { display:flex; flex-direction:column; align-items:center; gap:.18rem; flex:1; }
.bc-stat-div { width:1px; height:28px; background:rgba(0,102,255,.2); flex-shrink:0; }
.bc-stat-n { font-family:var(--font-h); font-weight:800; font-size:.95rem; color:#030814; }
.bc-stat-l { font-size:.58rem; color:#4a6a9c; text-transform:uppercase; letter-spacing:.3px; }
.binnder-card-corner { position:absolute; bottom:-1px; right:-1px; width:38px; height:38px; background:var(--primary); clip-path:circle(100% at 100% 100%); border-bottom-right-radius:18px; }

/* ELEMENTOS COMPARTIDOS FRENTE */
.card-game-badge { display:inline-block; padding:.25rem .65rem; border-radius:6px; font-family:var(--font-h); font-size:.65rem; font-weight:700; letter-spacing:1px; margin-bottom:.5rem; }
.mtg-badge { background:rgba(201,168,76,.2); color:var(--mtg-gold); border:1px solid rgba(201,168,76,.3); }
.poke-badge { background:rgba(245,197,24,.15); color:var(--poke-yellow); border:1px solid rgba(245,197,24,.3); }
.op-badge { background:rgba(230,57,70,.15); color:var(--op-red); border:1px solid rgba(230,57,70,.3); }
.card-art { position:relative; }
.card-art-glow { position:absolute; inset:0; border-radius:10px; }
.card-name { font-family:var(--font-h); font-weight:700; font-size:.95rem; color:var(--white); }
.card-type-line { font-size:.7rem; color:var(--text-muted); margin-bottom:.5rem; }
.card-bottom-row { display:flex; justify-content:space-between; align-items:center; }
.card-rarity { font-size:.65rem; font-weight:700; padding:.2rem .5rem; border-radius:5px; }
.rarity-mythic { background:rgba(255,140,0,.15); color:#ff8c00; }
.rarity-secret { background:rgba(245,197,24,.15); color:var(--poke-yellow); }
.rarity-rare   { background:rgba(230,57,70,.15); color:var(--op-red); }
.card-price { font-family:var(--font-h); font-weight:800; font-size:1rem; color:var(--white); }

/* REVERSO DE CARTAS */
.back-header { display:flex; justify-content:space-between; align-items:center; }
.back-game-tag { font-size:.65rem; font-weight:700; text-transform:uppercase; letter-spacing:1px; color:var(--text-muted); }
.back-condition { font-size:.65rem; font-weight:700; padding:.2rem .6rem; border-radius:5px; }
.condition-nm { background:rgba(16,185,129,.15); color:#10b981; }
.condition-lp { background:rgba(234,179,8,.15); color:#eab308; }
.back-card-name { font-family:var(--font-h); font-weight:800; font-size:1.05rem; color:var(--white); }
.back-price-history { display:flex; flex-direction:column; gap:.15rem; padding:.65rem; background:rgba(0,102,255,.08); border-radius:10px; border:1px solid rgba(0,102,255,.12); }
.back-price-label { font-size:.65rem; color:var(--text-muted); text-transform:uppercase; letter-spacing:.5px; }
.back-price-val { font-family:var(--font-h); font-weight:800; font-size:1.2rem; color:var(--white); }
.back-price-trend { font-size:.7rem; font-weight:600; }
.back-price-trend.up { color:#10b981; }
.back-stats { display:flex; flex-direction:column; gap:.4rem; }
.back-stat { display:flex; justify-content:space-between; font-size:.75rem; color:var(--text-muted); border-bottom:1px solid rgba(255,255,255,.05); padding-bottom:.3rem; }
.back-stat strong { color:var(--text-light); font-weight:600; }
.back-actions { display:flex; gap:.5rem; margin-top:.25rem; }
.back-btn { flex:1; padding:.6rem; border-radius:10px; border:none; font-family:var(--font-h); font-weight:700; font-size:.8rem; cursor:pointer; transition:all .3s var(--ease-spring); }
.back-btn-buy { background:linear-gradient(135deg,var(--primary),#004ecc); color:var(--white); box-shadow:0 4px 12px rgba(0,102,255,.3); }
.back-btn-buy:hover { transform:translateY(-2px); box-shadow:0 8px 20px rgba(0,102,255,.45); }
.back-btn-offer { background:rgba(255,255,255,.06); color:var(--white); border:1px solid rgba(255,255,255,.1); }
.back-btn-offer:hover { background:rgba(255,255,255,.12); transform:translateY(-2px); }
.back-btn-trade { background:rgba(0,212,255,.1); color:var(--secondary); border:1px solid rgba(0,212,255,.2); }
.back-btn-trade:hover { background:rgba(0,212,255,.2); transform:translateY(-2px); }

/* Binnder back */
.back-qr-title { font-family:var(--font-h); font-weight:700; font-size:.95rem; color:var(--secondary); text-align:center; }
.back-qr-sub { font-size:.72rem; color:var(--text-muted); text-align:center; }
.binnder-qr { width:90px; height:90px; align-self:center; background-image:radial-gradient(rgba(0,102,255,.8) 40%,transparent 40%), radial-gradient(rgba(0,102,255,.8) 40%,transparent 40%); background-size:8px 8px; background-position:0 0,4px 4px; border-radius:10px; border:2px solid rgba(0,102,255,.2); }
.back-profile-stats { display:flex; justify-content:space-around; width:100%; }
.bp-stat { display:flex; flex-direction:column; align-items:center; font-size:.72rem; color:var(--text-muted); gap:.15rem; }
.bp-stat strong { color:var(--text-light); font-weight:600; }
.back-btn-profile { width:100%; padding:.65rem; border-radius:10px; border:none; background:linear-gradient(135deg,var(--primary),#004ecc); color:var(--white); font-family:var(--font-h); font-weight:700; font-size:.85rem; cursor:pointer; box-shadow:0 4px 12px rgba(0,102,255,.3); transition:all .3s var(--ease-spring); }
.back-btn-profile:hover { transform:translateY(-2px); box-shadow:0 8px 20px rgba(0,102,255,.5); }

.tap-text { text-align:center; font-size:.65rem; color:var(--text-muted); text-transform:uppercase; letter-spacing:1px; animation:textPulse 2s infinite ease-in-out; }
@keyframes textPulse { 0%,100%{opacity:.5} 50%{opacity:1} }

.deck-hint { font-size:.78rem; color:var(--text-muted); letter-spacing:.5px; }

/* ==========================================================================
   PILLAR SECTION
   ========================================================================== */
.pillars-section { padding:3rem 5%; max-width:1380px; margin:0 auto; width:100%; }
.pillars-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:1.5rem; }

.pillar-card {
    background:var(--glass-bg); border:1px solid var(--glass-border);
    border-radius:24px; padding:2rem; transition:all .35s var(--ease-smooth);
    backdrop-filter:blur(20px);
}
.pillar-card:hover { transform:translateY(-6px); border-color:rgba(0,102,255,.25); box-shadow:0 20px 40px rgba(0,0,0,.35),0 0 0 1px rgba(0,102,255,.1) inset; }

.pillar-icon { font-size:2.2rem; margin-bottom:1rem; }
.pillar-card h3 { font-family:var(--font-h); font-size:1.4rem; font-weight:800; color:var(--white); margin-bottom:.6rem; }
.pillar-card p { color:var(--text-muted); font-size:.95rem; line-height:1.65; margin-bottom:1.25rem; }
.pillar-tags { display:flex; flex-wrap:wrap; gap:.5rem; }
.pillar-tags span { padding:.3rem .75rem; border-radius:20px; font-size:.72rem; font-weight:600; letter-spacing:.3px; }

.pillar-trade { border-color:rgba(0,102,255,.2); }
.pillar-trade .pillar-tags span { background:rgba(0,102,255,.1); color:var(--primary); border:1px solid rgba(0,102,255,.2); }

.pillar-collect { border-color:rgba(0,212,255,.2); }
.pillar-collect h3 { background:linear-gradient(90deg,var(--secondary),#00a8cc); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.pillar-collect .pillar-tags span { background:rgba(0,212,255,.1); color:var(--secondary); border:1px solid rgba(0,212,255,.2); }

.pillar-connect { border-color:rgba(16,185,129,.2); }
.pillar-connect h3 { background:linear-gradient(90deg,#10b981,#06d6a0); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.pillar-connect .pillar-tags span { background:rgba(16,185,129,.1); color:#10b981; border:1px solid rgba(16,185,129,.2); }

/* ==========================================================================
   GAMES SECTION
   ========================================================================== */
.games-section { padding:2rem 5% 3rem; max-width:1380px; margin:0 auto; width:100%; }
.games-header { text-align:center; margin-bottom:2rem; }
.games-header h2 { font-family:var(--font-h); font-size:1.8rem; font-weight:800; color:var(--white); margin-bottom:.4rem; }
.games-header p { color:var(--text-muted); font-size:1rem; }

.games-grid { display:flex; flex-wrap:wrap; gap:1rem; justify-content:center; }
.game-chip {
    display:flex; align-items:center; gap:.75rem;
    padding:.85rem 1.5rem; border-radius:16px;
    background:var(--glass-bg); border:1px solid var(--glass-border);
    backdrop-filter:blur(15px); cursor:pointer;
    transition:all .3s var(--ease-smooth);
}
.game-chip:hover { transform:translateY(-4px); box-shadow:0 12px 25px rgba(0,0,0,.3); }
.game-chip-icon { font-size:1.3rem; }
.game-chip span:nth-child(2) { font-family:var(--font-h); font-weight:600; font-size:.95rem; color:var(--white); }
.game-count { font-size:.75rem; color:var(--text-muted); font-weight:500; }

.game-mtg:hover { border-color:rgba(201,168,76,.4); box-shadow:0 12px 25px rgba(201,168,76,.1); }
.game-poke:hover { border-color:rgba(245,197,24,.4); box-shadow:0 12px 25px rgba(245,197,24,.1); }
.game-op:hover { border-color:rgba(230,57,70,.4); box-shadow:0 12px 25px rgba(230,57,70,.1); }
.game-yugi:hover { border-color:rgba(138,43,226,.4); box-shadow:0 12px 25px rgba(138,43,226,.1); }
.game-lorcana:hover { border-color:rgba(0,212,255,.4); box-shadow:0 12px 25px rgba(0,212,255,.1); }
.game-riftbound:hover { border-color:rgba(249,115,22,.4); box-shadow:0 12px 25px rgba(249,115,22,.1); }
.game-more { opacity:.5; }

/* ==========================================================================
   MARKET SECTION
   ========================================================================== */
.market-section {
    display:grid; grid-template-columns:1fr 1.1fr; gap:1.5rem;
    padding:0 5% 4rem; max-width:1380px; margin:0 auto; width:100%;
}
.glass-panel {
    background:var(--glass-bg); border:1px solid var(--glass-border);
    border-radius:24px; padding:2rem;
    box-shadow:0 8px 32px rgba(0,0,0,.4);
    backdrop-filter:blur(20px); transition:all .3s var(--ease-smooth);
}
.glass-panel:hover { border-color:rgba(255,255,255,.14); }

.panel-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:1.25rem; }
.panel-header h3 { font-family:var(--font-h); font-size:1.15rem; font-weight:700; }
.badge { padding:.3rem .75rem; font-size:.75rem; border-radius:20px; font-weight:600; }
.live-badge { background:rgba(16,185,129,.12); color:#10b981; border:1px solid rgba(16,185,129,.25); display:flex; align-items:center; gap:.4rem; }
.live-dot { width:6px; height:6px; border-radius:50%; background:#10b981; animation:livePulse 1.5s infinite; }

.stats-number { display:flex; align-items:baseline; gap:1rem; margin-bottom:.4rem; }
.count { font-family:var(--font-h); font-size:2.5rem; font-weight:800; color:var(--white); }
.trend { font-size:.9rem; font-weight:600; }
.trend.up { color:#10b981; }
.trend.down { color:#ef4444; }
.market-sub { font-size:.8rem; color:var(--text-muted); margin-bottom:1.25rem; }

.chart-container { width:100%; margin-top:.5rem; }
.stats-chart { width:100%; height:auto; }
.chart-line { stroke-dasharray:600; stroke-dashoffset:600; }
.chart-area { transform-origin:bottom; scale:1 0; }
.animate-draw-line { animation:drawLine 2s cubic-bezier(0.4,0,0.2,1) forwards .5s; }
.animate-draw-area { animation:drawArea 1.8s cubic-bezier(0.4,0,0.2,1) forwards .7s; }

/* Market tickers */
.market-tickers { display:flex; flex-direction:column; gap:.75rem; margin-top:1.25rem; }
.ticker-item { display:flex; align-items:center; gap:.75rem; }
.ticker-game { font-size:.78rem; font-weight:600; color:var(--text-muted); width:65px; flex-shrink:0; }
.ticker-bar { flex:1; height:4px; border-radius:4px; background:rgba(255,255,255,.06); position:relative; overflow:hidden; }
.ticker-bar::after { content:''; position:absolute; inset:0; border-radius:4px; animation:tickerFill 1.5s ease-out forwards; }
.mtg-bar::after  { background:linear-gradient(90deg,var(--mtg-gold),rgba(201,168,76,.4)); width:72%; animation:none; width:72%; }
.poke-bar::after { background:linear-gradient(90deg,var(--poke-yellow),rgba(245,197,24,.4)); width:88%; }
.op-bar::after   { background:linear-gradient(90deg,var(--op-red),rgba(230,57,70,.4)); width:95%; }
.yugi-bar::after { background:linear-gradient(90deg,#8b2cf5,rgba(139,44,245,.4)); width:30%; }
.ticker-pct { font-size:.78rem; font-weight:700; width:50px; text-align:right; flex-shrink:0; }
.ticker-pct.up { color:#10b981; }
.ticker-pct.down { color:#ef4444; }

/* TRADES PANEL */
.trades-list { display:flex; flex-direction:column; gap:1rem; }
.trade-item { display:flex; align-items:center; gap:1rem; padding:.9rem; border-radius:14px; background:rgba(255,255,255,.025); border:1px solid rgba(255,255,255,.05); transition:all .3s var(--ease-smooth); cursor:pointer; }
.trade-item:hover { background:rgba(0,102,255,.06); border-color:rgba(0,102,255,.15); transform:translateX(4px); }
.trade-avatar { width:42px; height:42px; border-radius:11px; display:flex; align-items:center; justify-content:center; font-weight:700; font-family:var(--font-h); color:var(--white); font-size:.85rem; flex-shrink:0; }
.av-1 { background:linear-gradient(135deg,#ff416c,#ff4b2b); }
.av-2 { background:linear-gradient(135deg,#0059ff,#003fa3); }
.av-3 { background:linear-gradient(135deg,#8b2cf5,#5b1db5); }
.av-4 { background:linear-gradient(135deg,#11998e,#38ef7d); }
.trade-info { flex:1; }
.trade-info h4 { font-size:.88rem; font-weight:600; color:var(--white); margin-bottom:.2rem; }
.trade-info p { font-size:.78rem; color:var(--text-muted); }
.trade-info strong { color:var(--text-light); }
.price-tag { color:var(--secondary) !important; }
.trade-meta { display:flex; flex-direction:column; align-items:flex-end; gap:.35rem; }
.trade-game-tag { font-size:.62rem; font-weight:700; padding:.2rem .55rem; border-radius:5px; }
.mtg-tag   { background:rgba(201,168,76,.15); color:var(--mtg-gold); }
.poke-tag  { background:rgba(245,197,24,.15); color:var(--poke-yellow); }
.op-tag    { background:rgba(230,57,70,.15); color:var(--op-red); }
.yugi-tag  { background:rgba(139,44,245,.15); color:#8b2cf5; }
.lorcana-tag { background:rgba(0,212,255,.12); color:var(--secondary); }
.trade-time { font-size:.7rem; color:var(--text-muted); }
.view-all { font-size:.85rem; color:var(--primary); text-decoration:none; font-weight:600; transition:all .25s; }
.view-all:hover { color:var(--secondary); }

.trades-cta { margin-top:1.5rem; padding:1.25rem; background:linear-gradient(135deg,rgba(0,102,255,.12),rgba(0,212,255,.05)); border:1px solid rgba(0,102,255,.2); border-radius:16px; display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; }
.trades-cta p { font-size:.95rem; font-weight:600; color:var(--text-light); }
.trades-cta .btn { padding:.75rem 1.5rem; font-size:.9rem; }

/* RESPONSIVE */
@media (max-width:1100px) {
    .hero-section { grid-template-columns:1fr; gap:3rem; padding:3rem 5%; }
    .hero-cards-side { order:-1; }
    .deck-container { height:320px; width:100%; }
    .interactive-card { width:160px; height:230px; }
    .market-section { grid-template-columns:1fr; }
    .pillars-grid { grid-template-columns:1fr; }
}
@media (max-width:768px) {
    .hero-title { font-size:2.3rem; }
    .nav-links { display:none; }
    .btn-skip-splash { top:20px; right:20px; }
    .games-grid { gap:.75rem; }
    .game-chip { padding:.7rem 1.1rem; }
    .trades-cta { flex-direction:column; text-align:center; }
}

/* ==========================================================================
   MODALES Y SESIÓN DE USUARIO (PREMIUM GLASSMORPHISM)
   ========================================================================== */

/* Widget de Sesión en el Navbar */
.user-session-widget {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-login-nav {
    padding: .55rem 1.3rem;
    border-radius: 30px;
    border: 1px solid rgba(0, 102, 255, 0.4);
    background: rgba(0, 102, 255, 0.1);
    color: var(--white);
    font-family: var(--font-h);
    font-weight: 600;
    font-size: .88rem;
    cursor: pointer;
    transition: all .3s var(--ease-smooth);
}

.btn-login-nav:hover {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 102, 255, 0.4);
    transform: translateY(-1px);
}

.user-nav-profile {
    display: flex;
    align-items: center;
    gap: .6rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: .3rem .75rem .3rem .3rem;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
}

.user-nav-profile:hover {
    background: rgba(0, 102, 255, 0.08);
    border-color: rgba(0, 102, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.15);
    transform: translateY(-1px);
}

.user-nav-name {
    font-family: var(--font-h);
    font-weight: 600;
    font-size: .88rem;
    color: var(--text-light);
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Modales - Superposición */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 4, 11, 0.82);
    backdrop-filter: blur(20px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: rgba(10, 18, 40, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: 2.5rem;
    width: 92%;
    max-width: 440px;
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.65), 0 0 40px rgba(0, 102, 255, 0.15);
    position: relative;
    backdrop-filter: blur(25px);
    transform: scale(0.9);
    transition: transform 0.45s var(--ease-spring);
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: .9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .25s var(--ease-smooth);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transform: rotate(90deg);
}

/* Pestañas del Modal */
.modal-tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 2rem;
    padding-bottom: .25rem;
}

.modal-tab {
    background: none;
    border: none;
    font-family: var(--font-h);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    padding: .5rem 0;
    position: relative;
    transition: color .3s;
}

.modal-tab:hover {
    color: var(--white);
}

.modal-tab.active {
    color: var(--white);
}

.modal-tab.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2.5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 10px;
    box-shadow: 0 0 10px var(--primary);
}

/* Formularios */
.modal-title {
    font-family: var(--font-h);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: .3rem;
}

.modal-subtitle {
    font-size: .88rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    position: relative;
}

.form-group label {
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-muted);
}

.form-group input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: .85rem 1.1rem;
    border-radius: 12px;
    color: var(--white);
    font-family: var(--font-b);
    font-size: .95rem;
    transition: all .3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 102, 255, 0.03);
    box-shadow: 0 0 12px rgba(0, 102, 255, 0.15), 0 0 0 1px var(--primary) inset;
}

.foil-toggle-group {
    display: flex;
    gap: .5rem;
}

.foil-toggle-btn {
    flex: 1;
    padding: .85rem 1.1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-family: var(--font-b);
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s;
    letter-spacing: .3px;
}

.foil-toggle-btn.active {
    background: rgba(0, 102, 255, 0.15);
    border-color: var(--primary);
    color: var(--white);
    box-shadow: 0 0 12px rgba(0, 102, 255, 0.2);
}

.foil-toggle-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--white);
}

.tcg-game-toggle-group {
    display: flex;
    flex-wrap: nowrap;
    gap: .5rem;
    overflow-x: auto;
    padding-bottom: .35rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.tcg-game-toggle-group::-webkit-scrollbar { height: 3px; }
.tcg-game-toggle-group::-webkit-scrollbar-track { background: transparent; }
.tcg-game-toggle-group::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.tcg-game-toggle-btn {
    flex: 0 0 auto;
    padding: .7rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-family: var(--font-b);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s;
    letter-spacing: .2px;
    text-align: center;
    white-space: nowrap;
}

.tcg-game-toggle-btn.active {
    background: rgba(0, 102, 255, 0.15);
    border-color: var(--primary);
    color: var(--white);
    box-shadow: 0 0 12px rgba(0, 102, 255, 0.2);
}

.tcg-game-toggle-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--white);
}

.tcg-game-toggle-btn.tcg-game-mtg:hover:not(.active) { border-color: rgba(201,168,76,0.45); color: var(--mtg-gold); }
.tcg-game-toggle-btn.tcg-game-mtg.active {
    background: rgba(201,168,76,0.18);
    border-color: var(--mtg-gold);
    color: var(--mtg-gold);
    box-shadow: 0 0 12px rgba(201,168,76,0.25);
}

.tcg-game-toggle-btn.tcg-game-poke:hover:not(.active) { border-color: rgba(245,197,24,0.45); color: var(--poke-yellow); }
.tcg-game-toggle-btn.tcg-game-poke.active {
    background: rgba(245,197,24,0.18);
    border-color: var(--poke-yellow);
    color: var(--poke-yellow);
    box-shadow: 0 0 12px rgba(245,197,24,0.25);
}

.tcg-game-toggle-btn.tcg-game-onepiece:hover:not(.active) { border-color: rgba(230,57,70,0.45); color: var(--op-red); }
.tcg-game-toggle-btn.tcg-game-onepiece.active {
    background: rgba(230,57,70,0.18);
    border-color: var(--op-red);
    color: var(--op-red);
    box-shadow: 0 0 12px rgba(230,57,70,0.25);
}

.tcg-game-toggle-btn.tcg-game-riftbound:hover:not(.active) { border-color: rgba(249,115,22,0.45); color: #fb923c; }
.tcg-game-toggle-btn.tcg-game-riftbound.active {
    background: rgba(249,115,22,0.18);
    border-color: #f97316;
    color: #fb923c;
    box-shadow: 0 0 12px rgba(249,115,22,0.25);
}

.input-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.01) !important;
    border-color: rgba(255, 255, 255, 0.04) !important;
}

/* Badges de Validación en Inputs */
.input-with-badge {
    position: relative;
    display: flex;
    flex-direction: column;
}

.input-with-badge input,
.input-with-badge select {
    padding-right: 7.5rem;
}

.validation-badge {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: .7rem;
    font-weight: 700;
    padding: .3rem .65rem;
    border-radius: 8px;
    pointer-events: none;
    transition: all 0.3s;
}

.validation-badge.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.15);
}

.validation-badge.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.15);
}

.validation-badge.badge-warning {
    background: rgba(245, 197, 24, 0.12);
    color: var(--poke-yellow);
    border: 1px solid rgba(245, 197, 24, 0.25);
}

/* Errores */
.form-error {
    font-size: .8rem;
    color: #ef4444;
    font-weight: 600;
    min-height: 1.2rem;
    opacity: 0;
    transition: opacity .3s;
}

.form-error.active {
    opacity: 1;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.4rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 4px;
}

.auth-tab {
    flex: 1;
    padding: 0.6rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-h);
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.2px;
}

.auth-tab:hover {
    color: var(--text-light);
}

.auth-tab.active {
    background: rgba(0,102,255,0.15);
    color: var(--primary);
    border: 1px solid rgba(0,102,255,0.25);
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin: 1.2rem 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.07);
}

/* Botón Google */
.btn-google-signin {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    color: var(--text-light);
    font-family: var(--font-b);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.1px;
}

.btn-google-signin:hover {
    background: rgba(255,255,255,0.09);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.btn-google-signin:active {
    transform: translateY(0);
}

.btn-block {
    width: 100%;
    justify-content: center;
    padding: .95rem;
    font-size: 1.05rem;
}

/* Perfil - Carga de Avatar */
.profile-avatar-upload-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    margin-bottom: .5rem;
}

.avatar-upload-preview-container {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    cursor: pointer;
    overflow: visible;
}

.avatar-glow-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px dashed rgba(0, 102, 255, 0.4);
    animation: rotateDashed 25s linear infinite;
    z-index: 1;
}

@keyframes rotateDashed {
    100% { transform: rotate(360deg); }
}

.profile-avatar-large {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    background-size: cover;
    background-position: center;
    border: 4px solid var(--bg-deep);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 102, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-h);
    font-weight: 800;
    font-size: 2rem;
    color: var(--white);
    z-index: 2;
    position: relative;
    overflow: hidden;
}

.avatar-edit-overlay {
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: rgba(3, 6, 17, 0.75);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    z-index: 3;
    transition: opacity 0.3s;
    cursor: pointer;
    font-family: var(--font-h);
    font-weight: 700;
    font-size: .72rem;
    color: var(--white);
    letter-spacing: .5px;
}

.avatar-upload-preview-container:hover .avatar-edit-overlay {
    opacity: 1;
}

.edit-icon {
    font-size: 1rem;
    margin-bottom: 2px;
}

.hidden-file-input {
    display: none;
}

.upload-hint {
    font-size: .75rem;
    color: var(--text-muted);
}

.profile-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: .75rem;
}

.profile-actions-row .btn {
    flex: 1;
    justify-content: center;
}

.profile-actions-row .btn-ghost {
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.profile-actions-row .btn-ghost:hover {
    background: rgba(239, 68, 68, 0.1);
}

.user-nav-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.card-avatar-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* ==========================================================================
   MARKETPLACE Y CARPETAS DE COLECCIÓN (ESTILOS PREMIUM)
   ========================================================================== */

/* Filtros por Chip en el Marketplace */
.filter-chip {
    transition: all 0.3s var(--ease-smooth);
}

.filter-chip:hover {
    background: rgba(0, 102, 255, 0.15) !important;
    border-color: rgba(0, 102, 255, 0.4) !important;
    transform: translateY(-2px);
}

.filter-chip.active {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--white) !important;
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Grillas de Cartas */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

/* Cartas de TCG en el Grid */
.tcg-card-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    backdrop-filter: blur(15px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    transition: all 0.35s var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

.tcg-card-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55);
}

.tcg-card-img-container {
    width: 100%;
    height: 215px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.01);
}

.tcg-card-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.tcg-card-item:hover .tcg-card-img {
    transform: scale(1.05);
}

.tcg-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: var(--font-h);
    font-weight: 800;
    font-size: 2.2rem;
    color: rgba(255, 255, 255, 0.12);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
    background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(255,255,255,0.06));
}

.tcg-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    letter-spacing: 0.5px;
    z-index: 5;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.qty-btn {
    width: 42px;
    height: 42px;
    font-size: 1.3rem;
    font-weight: 700;
    border-radius: 10px;
    padding: 0;
    justify-content: center;
    flex-shrink: 0;
    border-color: rgba(255,255,255,0.12);
    color: var(--white);
}

.qty-btn:hover {
    border-color: rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.07);
}

#qty-display, .qty-display {
    font-size: 1.4rem;
    font-weight: 800;
    min-width: 3.5rem;
    text-align: center;
    color: var(--white);
    letter-spacing: 0.5px;
}

.tcg-card-quantity-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(8px);
    letter-spacing: 0.5px;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.tcg-card-lang-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(8px);
    letter-spacing: 0.3px;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.tcg-card-lang-badge.stacked {
    top: 34px;
}

.tcg-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.tcg-card-info h4 {
    font-family: var(--font-h);
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tcg-card-expansion {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ============ MARCA DE BRILLO (FOIL) ============ */
.tcg-card-item.is-foil {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 22px rgba(139, 44, 245, 0.22);
}

.tcg-card-item.is-foil:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.16), 0 0 32px rgba(139, 44, 245, 0.35);
}

.tcg-foil-sweep {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    background: linear-gradient(
        115deg,
        transparent 20%,
        rgba(255, 255, 255, 0.04) 35%,
        rgba(120, 220, 255, 0.38) 45%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 120, 220, 0.38) 55%,
        rgba(255, 255, 255, 0.04) 65%,
        transparent 80%
    );
    background-size: 250% 250%;
    mix-blend-mode: overlay;
    animation: foilSweep 3.2s ease-in-out infinite;
}

.tcg-foil-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(120deg, #ff4b6b, #ffd23f, #38ef7d, #00d4ff, #8b2cf5, #ff4b6b);
    background-size: 300% 300%;
    animation: foilShift 4s ease infinite;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), 0 0 12px rgba(139, 44, 245, 0.45);
    z-index: 6;
}

@keyframes foilSweep {
    0%   { background-position: 0% 0%; }
    50%  { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

@keyframes foilShift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .tcg-foil-sweep,
    .tcg-foil-badge {
        animation: none;
    }
}

.tcg-card-other-city-alert {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--poke-yellow);
    background: rgba(245, 197, 24, 0.1);
    border: 1px solid rgba(245, 197, 24, 0.25);
    border-radius: 6px;
    padding: 0.3rem 0.5rem;
    margin-bottom: 0.35rem;
    line-height: 1.25;
}

.tcg-card-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 0.75rem;
}

.tcg-market-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 6px;
    padding: 0.18rem 0.5rem;
    letter-spacing: 0.01em;
}

.tcg-market-badge.tcg-price-pending {
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.tcg-qty-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #818cf8;
    background: rgba(129, 140, 248, 0.1);
    border: 1px solid rgba(129, 140, 248, 0.25);
    border-radius: 6px;
    padding: 0.18rem 0.5rem;
    letter-spacing: 0.01em;
}

.tcg-price-age {
    font-size: 0.6rem;
    font-weight: 500;
    color: rgba(16, 185, 129, 0.65);
    margin-left: 0.15rem;
}

.tcg-card-price {
    font-family: var(--font-h);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--secondary);
}

.tcg-card-owner {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.tcg-card-owner-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background-size: cover;
    background-position: center;
}

/* Colores de Bordes de Carta por Tipo de TCG */
.card-border-mtg { border-color: rgba(201, 168, 76, 0.22) !important; }
.card-border-mtg:hover { border-color: var(--mtg-gold) !important; box-shadow: 0 20px 40px rgba(0,0,0,0.55), 0 0 15px rgba(201, 168, 76, 0.15) !important; }
.card-border-mtg .tcg-card-badge { background: rgba(201, 168, 76, 0.18); color: var(--mtg-gold); border: 1px solid rgba(201, 168, 76, 0.3); backdrop-filter: blur(8px); }

.card-border-pokemon { border-color: rgba(245, 197, 24, 0.22) !important; }
.card-border-pokemon:hover { border-color: var(--poke-yellow) !important; box-shadow: 0 20px 40px rgba(0,0,0,0.55), 0 0 15px rgba(245, 197, 24, 0.15) !important; }
.card-border-pokemon .tcg-card-badge { background: rgba(245, 197, 24, 0.15); color: var(--poke-yellow); border: 1px solid rgba(245, 197, 24, 0.3); backdrop-filter: blur(8px); }

.card-border-onepiece { border-color: rgba(230, 57, 70, 0.22) !important; }
.card-border-onepiece:hover { border-color: var(--op-red) !important; box-shadow: 0 20px 40px rgba(0,0,0,0.55), 0 0 15px rgba(230, 57, 70, 0.15) !important; }
.card-border-onepiece .tcg-card-badge { background: rgba(230, 57, 70, 0.15); color: var(--op-red); border: 1px solid rgba(230, 57, 70, 0.3); backdrop-filter: blur(8px); }

.card-border-yugioh { border-color: rgba(139, 44, 245, 0.22) !important; }
.card-border-yugioh:hover { border-color: #8b2cf5 !important; box-shadow: 0 20px 40px rgba(0,0,0,0.55), 0 0 15px rgba(139, 44, 245, 0.15) !important; }
.card-border-yugioh .tcg-card-badge { background: rgba(139, 44, 245, 0.15); color: #b87cff; border: 1px solid rgba(139, 44, 245, 0.3); backdrop-filter: blur(8px); }

.card-border-lorcana { border-color: rgba(0, 212, 255, 0.22) !important; }
.card-border-lorcana:hover { border-color: var(--secondary) !important; box-shadow: 0 20px 40px rgba(0,0,0,0.55), 0 0 15px rgba(0, 212, 255, 0.15) !important; }
.card-border-lorcana .tcg-card-badge { background: rgba(0, 212, 255, 0.12); color: var(--secondary); border: 1px solid rgba(0, 212, 255, 0.25); backdrop-filter: blur(8px); }

.card-border-riftbound { border-color: rgba(249, 115, 22, 0.22) !important; }
.card-border-riftbound:hover { border-color: #f97316 !important; box-shadow: 0 20px 40px rgba(0,0,0,0.55), 0 0 15px rgba(249, 115, 22, 0.15) !important; }
.card-border-riftbound .tcg-card-badge { background: rgba(249, 115, 22, 0.15); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.3); backdrop-filter: blur(8px); }

/* Diseño de Carpetas (Vista Colección) */
.folders-container {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .folders-container {
        flex-direction: column;
        gap: 1rem;
    }
}

.folder-card {
    flex: 1;
    background: rgba(10, 18, 40, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 1.4rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    cursor: pointer;
    transition: all 0.35s var(--ease-smooth);
    position: relative;
}

.folder-card:hover {
    background: rgba(10, 18, 40, 0.5);
    border-color: rgba(0, 102, 255, 0.25);
    transform: translateY(-4px);
}

.folder-card.active {
    background: rgba(10, 18, 40, 0.7);
    border-color: rgba(0, 102, 255, 0.4);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.35), 0 0 25px rgba(0, 102, 255, 0.08) inset;
}

.folder-tab {
    font-size: 2.5rem;
    transition: transform 0.35s var(--ease-spring);
    user-select: none;
}

.folder-card:hover .folder-tab {
    transform: scale(1.15) rotate(6deg);
}

.folder-content {
    display: flex;
    flex-direction: column;
    align-self: center;
}

.folder-content h3 {
    font-family: var(--font-h);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.15rem;
}

.folder-stats {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.folder-stats span {
    font-weight: 700;
    color: var(--text-light);
}

.folder-value {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.folder-value span {
    font-weight: 700;
    color: #10b981;
}

.collection-total-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: 14px;
    padding: 0.45rem 1rem;
    gap: 0.05rem;
    transition: background 0.3s ease;
}
.collection-total-chip .total-chip-label {
    font-size: 0.65rem;
    color: #10b981;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.collection-total-chip .total-chip-amount {
    font-family: var(--font-h);
    font-size: 1.05rem;
    font-weight: 800;
    color: #10b981;
    letter-spacing: -0.01em;
}

.folder-hint {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-top: 0.4rem;
    opacity: 0.7;
    transition: opacity 0.3s, color 0.3s;
}

.folder-card:hover .folder-hint {
    opacity: 1;
}

.folder-card.active .folder-hint {
    color: var(--secondary);
}

.btn-share-folder {
    position: absolute;
    bottom: 0.9rem;
    right: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.35rem 0.65rem;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
}

.btn-share-folder:hover {
    color: var(--white);
    background: rgba(0, 102, 255, 0.18);
    border-color: rgba(0, 102, 255, 0.4);
}

.active-folder-view {
    padding: 2.2rem;
    border-radius: 24px;
    min-height: 250px;
}

/* ── COLECCIÓN PÚBLICA ───────────────────────────────────── */
#public-collection-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    #view-public-collection > div {
        padding: 0 1.25rem 4rem;
        margin: 1rem auto;
    }
    #public-collection-header {
        gap: 0.75rem;
        margin-bottom: 1.25rem;
        flex-wrap: nowrap;
        align-items: center;
    }
    #public-collection-username {
        font-size: 1.3rem !important;
    }
    #public-collection-header .btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .active-folder-view {
        padding: 1.25rem;
    }
}

/* ── TCG FILTER ROW ─────────────────────────────────────── */
.tcg-filter-row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    margin-bottom: 1.75rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.tcg-filter-row::-webkit-scrollbar { height: 3px; }
.tcg-filter-row::-webkit-scrollbar-track { background: transparent; }
.tcg-filter-row::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.tcg-filter-card {
    flex-shrink: 0;
    width: 138px;
    height: 210px;
    border-radius: 16px;
    padding: 0.9rem 0.85rem 0.6rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.2rem;
    transition: all 0.32s var(--ease-smooth);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    user-select: none;
}
.tcg-filter-card:hover { transform: translateY(-6px); box-shadow: 0 18px 36px rgba(0,0,0,0.45); }
.tcg-filter-card.active { transform: translateY(-6px) scale(1.04); }

.tfc-top { display: flex; justify-content: flex-end; width: 100%; }
.tfc-count { font-size: 0.62rem; font-weight: 500; opacity: 0.82; }
.tfc-icon { font-size: 2rem; line-height: 1; margin: 0.35rem 0; }
.tfc-name { font-family: var(--font-h); font-size: 1rem; font-weight: 800; letter-spacing: 0.3px; }
.tfc-subname { font-size: 0.62rem; opacity: 0.75; letter-spacing: 0.5px; }
.tfc-divider { width: 100%; height: 1px; background: rgba(255,255,255,0.28); margin: 0.5rem 0; flex-shrink: 0; }
.tfc-value { font-size: 0.62rem; font-weight: 700; opacity: 0.9; margin-top: 0.15rem; letter-spacing: 0.3px; }
.tfc-footer { display: flex; justify-content: center; gap: 0.45rem; margin-top: auto; }
.tfc-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.6); }
.tfc-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    margin-top: 0.45rem;
    padding: 0.28rem 0.6rem;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.12);
    color: inherit;
    font-family: var(--font-h);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
}
.tfc-share-btn:hover { background: rgba(255,255,255,0.25); transform: scale(1.05); }

/* Per-game colors */
.tcg-filter-all  { background: linear-gradient(135deg, var(--primary) 0%, #004ecc 100%); border-color: rgba(255,255,255,0.18); color: #fff; }
.tcg-filter-all.active  { border-color: rgba(255,255,255,0.55); box-shadow: 0 20px 42px rgba(0,102,255,0.5); }

.tcg-filter-mtg  { background: linear-gradient(135deg, #e63946 0%, #b5121e 100%); border-color: rgba(255,255,255,0.18); color: #fff; }
.tcg-filter-mtg.active  { border-color: rgba(255,255,255,0.55); box-shadow: 0 20px 42px rgba(230,57,70,0.5); }

.tcg-filter-poke { background: linear-gradient(135deg, #ffd60a 0%, #f0a000 100%); border-color: rgba(255,255,255,0.28); color: #1a1a1a; }
.tcg-filter-poke .tfc-divider { background: rgba(0,0,0,0.18); }
.tcg-filter-poke .tfc-dot    { background: rgba(0,0,0,0.4); }
.tcg-filter-poke .tfc-count  { color: rgba(0,0,0,0.65); }
.tcg-filter-poke .tfc-value  { color: rgba(0,0,0,0.75); }
.tcg-filter-poke .tfc-share-btn { border-color: rgba(0,0,0,0.25); background: rgba(0,0,0,0.1); color: #1a1a1a; }
.tcg-filter-poke .tfc-share-btn:hover { background: rgba(0,0,0,0.2); }
.tcg-filter-poke.active { border-color: rgba(0,0,0,0.28); box-shadow: 0 20px 42px rgba(245,197,24,0.5); }

.tcg-filter-op   { background: linear-gradient(135deg, #7c3aed 0%, #5218b5 100%); border-color: rgba(255,255,255,0.18); color: #fff; }
.tcg-filter-op.active   { border-color: rgba(255,255,255,0.55); box-shadow: 0 20px 42px rgba(124,58,237,0.5); }

.tcg-filter-yugi { background: linear-gradient(135deg, #8b2cf5 0%, #5a0eb5 100%); border-color: rgba(255,255,255,0.18); color: #fff; }
.tcg-filter-yugi.active { border-color: rgba(255,255,255,0.55); box-shadow: 0 20px 42px rgba(139,44,245,0.5); }

.tcg-filter-lorcana { background: linear-gradient(135deg, #00d4ff 0%, #0066ff 100%); border-color: rgba(255,255,255,0.18); color: #fff; }
.tcg-filter-lorcana.active  { border-color: rgba(255,255,255,0.55); box-shadow: 0 20px 42px rgba(0,212,255,0.5); }

.tcg-filter-riftbound { background: linear-gradient(135deg, #f97316 0%, #c2410c 100%); border-color: rgba(255,255,255,0.18); color: #fff; }
.tcg-filter-riftbound.active { border-color: rgba(255,255,255,0.55); box-shadow: 0 20px 42px rgba(249,115,22,0.5); }

/* Candado y Estado Cerrado */
.collection-locked {
    box-shadow: 0 20px 50px rgba(0,0,0,0.55), 0 0 30px rgba(0,102,255,0.08);
}

.lock-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
    animation: floatIcon 3.5s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.05); }
}

.marketplace-title {
    font-family: var(--font-h);
    background: linear-gradient(90deg, #fff, #9ab7ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   BUSCADOR DE CARTAS TCGPLAYER — UPLOAD MODAL (PANTALLA COMPLETA)
   ========================================================================== */

/* Modales normales: scrollable */
.modal-card {
    overflow-y: auto;
    max-height: 92vh;
}

/* Upload modal: pantalla completa con layout de dos columnas */
#upload-modal .modal-card {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 1.8rem 2.5rem 1.5rem;
    background: rgba(10, 18, 40, 0.97);
    transform: translateY(30px);
}

#upload-modal.active .modal-card {
    transform: translateY(0);
}

#upload-modal .modal-title {
    font-size: 1.35rem;
    margin-bottom: 0.1rem;
}

#upload-modal .modal-subtitle {
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

#upload-modal #form-upload-card {
    flex: 1;
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 2rem;
    overflow: hidden;
    min-height: 0;
}

/* Modo "solo buscador": al subir una carta nueva se oculta el formulario manual
   (columna izquierda) — se sigue usando para editar cartas existentes */
#upload-modal.search-only .upload-left-col {
    display: none;
}
#upload-modal.search-only #form-upload-card {
    grid-template-columns: 1fr;
}
#upload-modal.search-only .tcg-search-section {
    grid-column: 1;
}
#upload-modal.search-only .tcg-search-divider {
    display: none !important;
}

/* Columna izquierda: formulario manual */
#upload-modal .upload-left-col {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    padding-right: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

/* Columna derecha: buscador */
#upload-modal .tcg-search-section {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 0;
}

/* Divider oculto en pantalla completa */
#upload-modal .tcg-search-divider {
    display: none;
}

/* Resultados: flex:1 para llenar el espacio disponible y scrollear en vertical
   sin que las filas se encimen entre sí */
#upload-modal .tcg-search-results {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    grid-auto-rows: min-content;
    align-content: start;
    align-items: start;
    gap: 1.25rem;
    padding: 0.25rem 0.35rem 1.5rem;
}

#upload-modal .tcg-result-name {
    font-size: 0.72rem;
}

#upload-modal .tcg-result-set {
    font-size: 0.62rem;
}

/* Mobile: volver a modal normal */
@media (max-width: 768px) {
    #upload-modal .modal-card {
        width: 92%;
        max-width: 440px;
        height: auto;
        max-height: 92vh;
        border-radius: 28px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        overflow-y: auto;
        transform: scale(0.9);
    }
    #upload-modal.active .modal-card {
        transform: scale(1);
    }
    #upload-modal #form-upload-card {
        display: block;
    }
    #upload-modal .tcg-search-section {
        grid-column: auto;
        grid-row: auto;
    }
    #upload-modal .tcg-search-divider {
        display: flex;
    }
    #upload-modal .tcg-search-results {
        max-height: 255px;
        grid-template-columns: repeat(3, 1fr);
        flex: none;
    }
}

.tcg-search-section {
    background: rgba(0, 102, 255, 0.05);
    border: 1px solid rgba(0, 102, 255, 0.18);
    border-radius: 16px;
    padding: 1.15rem 1.1rem 1rem;
    margin-bottom: 0.5rem;
}

.tcg-search-header {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.9rem;
    font-family: var(--font-h);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tcg-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
}

.tcg-search-icon {
    position: absolute;
    left: 0.9rem;
    color: var(--text-muted);
    pointer-events: none;
    flex-shrink: 0;
}

.tcg-search-input-wrapper input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.75rem 2.8rem 0.75rem 2.4rem;
    color: var(--white);
    font-family: var(--font-b);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.tcg-search-input-wrapper input:focus {
    border-color: rgba(0, 212, 255, 0.45);
}

.tcg-search-input-wrapper input::placeholder {
    color: var(--text-muted);
}

#tcg-search-spinner {
    position: absolute;
    right: 0.85rem;
    display: flex;
    align-items: center;
}

.tcg-spinner-ring {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 212, 255, 0.25);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: tcg-spin 0.65s linear infinite;
}

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

.tcg-advanced-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.6rem;
    background: none;
    border: none;
    padding: 0;
    color: var(--secondary);
    font-family: var(--font-b);
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.tcg-advanced-toggle:hover {
    opacity: 1;
}

.tcg-advanced-chevron {
    transition: transform 0.2s;
    flex-shrink: 0;
}

.tcg-advanced-toggle.open .tcg-advanced-chevron {
    transform: rotate(90deg);
}

.tcg-advanced-fields {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.55rem;
}

.tcg-advanced-field {
    flex: 1;
    min-width: 0;
}

.tcg-advanced-field label {
    display: block;
    font-size: 0.66rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tcg-advanced-field input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.55rem 0.7rem;
    color: var(--white);
    font-family: var(--font-b);
    font-size: 0.82rem;
    outline: none;
    transition: border-color 0.2s;
}

.tcg-advanced-field input:focus {
    border-color: rgba(0, 212, 255, 0.45);
}

.tcg-search-count {
    margin-top: 0.7rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    padding: 0 0.1rem;
}

.tcg-search-load-more {
    display: block;
    width: 100%;
    margin-top: 0.6rem;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 10px;
    padding: 0.6rem;
    color: var(--secondary);
    font-family: var(--font-b);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.tcg-search-load-more:hover {
    background: rgba(0, 212, 255, 0.15);
}

.tcg-search-load-more:disabled {
    opacity: 0.6;
    cursor: default;
}

.tcg-search-results {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: min-content;
    gap: 0.55rem;
    padding: 0.7rem 0.1rem 0.3rem;
    max-height: 255px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 212, 255, 0.2) transparent;
}

.tcg-search-results.has-results {
    display: grid;
}

.tcg-result-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.18s var(--ease-smooth), border-color 0.18s, box-shadow 0.18s;
}

.tcg-result-card:hover {
    border-color: rgba(0, 212, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 212, 255, 0.12);
}

.tcg-result-card.selected {
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.25);
}

/* La imagen usa flex:0 0 auto para reservar su alto según su propio ancho
   (relación 63:88); el bloque de info de abajo nunca se comprime ni se
   esconde, sin importar cómo calcule el navegador el alto de la imagen */
.tcg-result-img {
    width: 100%;
    flex: 0 0 auto;
    position: relative;
    aspect-ratio: 63 / 88; /* ratio estándar de carta TCG */
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
    font-size: 1.4rem;
}

.tcg-result-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.tcg-result-info {
    flex: 0 0 auto;
    padding: 0.35rem 0.45rem 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
}

.tcg-result-name {
    font-size: 0.64rem;
    font-weight: 700;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.tcg-result-set {
    font-size: 0.57rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tcg-result-price {
    font-size: 0.64rem;
    font-weight: 700;
    color: var(--secondary);
    margin-top: 0.1rem;
}

.tcg-no-api {
    grid-column: 1 / -1;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
    padding: 0.6rem 0.5rem;
    font-style: italic;
}

.tcg-fuzzy-hint {
    grid-column: 1 / -1;
    font-size: 0.74rem;
    color: var(--secondary);
    text-align: center;
    padding: 0.4rem 0.5rem;
}

.tcg-search-divider {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 1.1rem 0 1.2rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tcg-search-divider::before,
.tcg-search-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
}

/* ============================================================
   MODAL: DETALLE DE CARTA
   ============================================================ */
#card-detail-modal .modal-card {
    max-width: 1020px;
    padding: 3rem 3rem 3.375rem;
}

.card-detail-body {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    margin-top: 0.75rem;
}

.card-detail-image-wrap {
    width: 300px;
    min-width: 300px;
    aspect-ratio: 63 / 88;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    position: relative;
    flex-shrink: 0;
}

.card-detail-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.card-detail-img-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
}

.card-detail-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.65rem;
    min-height: 420px;
}

.card-detail-name {
    font-family: var(--font-h);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
    margin: 0;
}

.card-detail-rows {
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
}

.card-detail-row {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.card-detail-label {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.card-detail-value {
    font-size: 1.4rem;
    color: var(--text-light);
}

.card-detail-price-val {
    color: var(--secondary);
    font-weight: 700;
    font-size: 1.65rem;
}

.card-detail-number-input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.825rem 1.275rem;
    color: var(--white);
    font-family: var(--font-b);
    font-size: 1.35rem;
    width: 100%;
    transition: border-color 0.2s;
}

.card-detail-number-input:focus {
    outline: none;
    border-color: rgba(0, 102, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

.card-detail-number-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 820px) {
    #card-detail-modal .modal-card {
        padding: 2rem;
    }
    .card-detail-body {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    .card-detail-image-wrap {
        width: 200px;
        min-width: 200px;
    }
    .card-detail-info {
        min-height: unset;
        width: 100%;
    }
}

/* ==========================================================================
   NOTIFICATION BELL & PANEL
   ========================================================================== */
.notif-wrapper {
    position: relative;
}

.btn-notif-bell {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-smooth);
    flex-shrink: 0;
}

.btn-notif-bell:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.btn-notif-bell.has-unread {
    border-color: rgba(0,102,255,0.45);
    background: rgba(0,102,255,0.1);
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    font-family: var(--font-h);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 8px rgba(255,65,108,0.55);
    pointer-events: none;
}

.notif-panel {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    width: 360px;
    max-height: 420px;
    background: rgba(8,14,32,0.98);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 20px;
    backdrop-filter: blur(30px) saturate(160%);
    box-shadow: 0 24px 60px rgba(0,0,0,0.65), 0 0 30px rgba(0,102,255,0.07);
    z-index: 200;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
    transition: opacity 0.22s ease, transform 0.22s var(--ease-spring);
    pointer-events: none;
}

.notif-panel.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.notif-panel-title {
    font-family: var(--font-h);
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
}

.notif-mark-read {
    font-size: 0.75rem;
    color: var(--primary);
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-b);
    font-weight: 600;
    padding: 0;
    transition: opacity 0.2s;
}
.notif-mark-read:hover { opacity: 0.65; }

.notif-panel-list {
    overflow-y: auto;
    max-height: 360px;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.2s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(255,255,255,0.03); }
.notif-item.unread { background: rgba(0,102,255,0.05); }

.notif-unread-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
    margin-top: 5px;
}
.notif-read-spacer { width: 7px; flex-shrink: 0; }

.notif-item-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 1px; }

.notif-item-body { flex: 1; min-width: 0; }

.notif-item-title {
    font-size: 0.855rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.notif-item-desc {
    font-size: 0.775rem;
    color: var(--text-muted);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-item-time {
    font-size: 0.68rem;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-top: 2px;
}

.notif-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}
.notif-empty-icon { font-size: 2rem; margin-bottom: 0.5rem; }

/* ==========================================================================
   PURCHASE MODAL
   ========================================================================== */
#purchase-modal .modal-card {
    max-width: 500px;
    width: 92%;
}

.purchase-card-summary {
    display: flex;
    gap: 1rem;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1.35rem;
}

.purchase-card-img {
    width: 78px;
    height: 110px;
    border-radius: 9px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    overflow: hidden;
}
.purchase-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 9px;
}

/* Card zoom overlay */
.card-zoom-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.18s ease;
}
.card-zoom-overlay.hidden { display: none; }
.card-zoom-overlay img {
    max-height: 90vh;
    max-width: 92vw;
    width: auto;
    border-radius: 16px;
    box-shadow: 0 8px 60px rgba(0,0,0,0.7);
    object-fit: contain;
}
.card-zoom-close {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.13);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    backdrop-filter: blur(6px);
}
.card-zoom-close:hover { background: rgba(255,255,255,0.25); }

.purchase-card-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.purchase-card-name {
    font-family: var(--font-h);
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    margin: 0;
    line-height: 1.25;
}

.purchase-card-expansion {
    font-size: 0.775rem;
    color: var(--text-muted);
    font-weight: 500;
}

.purchase-seller-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.15rem;
}

.purchase-seller-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.55rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.purchase-seller-name {
    font-size: 0.775rem;
    color: var(--text-muted);
}

.purchase-unit-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.55rem;
    flex-wrap: wrap;
}

.purchase-price-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.purchase-price-val {
    font-family: var(--font-h);
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--secondary);
}

.purchase-section { margin-bottom: 1.2rem; }

.purchase-section-label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.65rem;
}

.purchase-qty-available {
    font-size: 0.7rem;
    font-weight: 600;
    color: #818cf8;
    background: rgba(129, 140, 248, 0.1);
    border: 1px solid rgba(129, 140, 248, 0.22);
    border-radius: 5px;
    padding: 0.1rem 0.4rem;
    text-transform: none;
    letter-spacing: 0;
    margin-left: 0.3rem;
    vertical-align: middle;
}

.store-selector {
    display: flex;
    gap: 0.65rem;
}

.store-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.85rem 0.5rem;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.025);
    cursor: pointer;
    transition: all 0.22s var(--ease-smooth);
    font-family: var(--font-b);
}
.store-btn:hover {
    border-color: rgba(0,102,255,0.3);
    background: rgba(0,102,255,0.06);
}
.store-btn.active {
    border-color: var(--primary);
    background: rgba(0,102,255,0.12);
    box-shadow: 0 0 0 1px rgba(0,102,255,0.2);
}
.store-btn-static {
    cursor: default;
}
.store-btn-static:hover {
    border-color: var(--primary);
    background: rgba(0,102,255,0.12);
}

.store-btn-icon { font-size: 1.45rem; }
.store-btn-name {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-light);
}
.store-btn-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
}
.store-btn.active .store-btn-sub { color: rgba(0,212,255,0.75); }

.purchase-textarea {
    width: 100%;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    color: var(--text-light);
    font-family: var(--font-b);
    font-size: 0.9rem;
    padding: 0.8rem 1rem;
    resize: none;
    transition: border-color 0.2s;
    line-height: 1.5;
}
.purchase-textarea:focus { outline: none; border-color: rgba(0,102,255,0.4); }
.purchase-textarea::placeholder { color: var(--text-muted); }

.purchase-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0,102,255,0.07);
    border: 1px solid rgba(0,102,255,0.18);
    border-radius: 14px;
    padding: 0.9rem 1.25rem;
    margin-bottom: 1.1rem;
}
.purchase-total-label {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 600;
}
.purchase-total-value {
    font-family: var(--font-h);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--white);
}

.purchase-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
}
.purchase-actions .btn { flex: 1; justify-content: center; }

.btn-contact-seller {
    width: 100%;
    padding: 0.65rem;
    background: none;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    color: var(--text-muted);
    font-family: var(--font-b);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.22s;
}
.btn-contact-seller:hover {
    border-color: rgba(0,212,255,0.3);
    color: var(--secondary);
    background: rgba(0,212,255,0.04);
}

/* ==========================================================================
   ORDERS MODAL (MIS COMPRAS) & PROFILE BUTTON
   ========================================================================== */
#orders-modal .modal-card { max-width: 600px; width: 94%; }

.btn-my-orders {
    width: 100%;
    padding: 0.7rem 1.1rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    color: var(--text-light);
    font-family: var(--font-b);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    transition: all 0.22s;
}
.btn-my-orders:hover {
    background: rgba(0,102,255,0.08);
    border-color: rgba(0,102,255,0.3);
    color: var(--white);
}
.btn-my-orders .btn-arrow { color: var(--text-muted); transition: transform 0.2s; }
.btn-my-orders:hover .btn-arrow { transform: translateX(4px); color: var(--white); }

.order-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    background: rgba(255,255,255,0.02);
    margin-bottom: 0.75rem;
    transition: border-color 0.2s;
}
.order-item:hover { border-color: rgba(255,255,255,0.1); }

.order-item-img {
    width: 58px;
    height: 82px;
    border-radius: 7px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    overflow: hidden;
}
.order-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 7px;
}

.order-item-img.is-foil {
    position: relative;
    box-shadow: 0 0 0 2px rgba(139, 44, 245, 0.5), 0 0 12px rgba(0, 212, 255, 0.35);
}

.order-item-img.is-foil::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.55) 50%, transparent 70%);
    background-size: 250% 250%;
    mix-blend-mode: overlay;
    animation: foilSweep 3.2s ease-in-out infinite;
    pointer-events: none;
}

.order-item-info { flex: 1; min-width: 0; }

.order-item-name {
    font-family: var(--font-h);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.15rem;
}

.order-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    line-height: 1.45;
}

.order-item-footer {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.order-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.18rem 0.6rem;
    border-radius: 30px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-family: var(--font-h);
}
.order-status-badge.status-pending  { background: rgba(245,197,24,0.1); color: #f5c518; border: 1px solid rgba(245,197,24,0.2); }
.order-status-badge.status-confirmed{ background: rgba(0,102,255,0.1);  color: #6b9fff; border: 1px solid rgba(0,102,255,0.2);  }
.order-status-badge.status-delivered{ background: rgba(16,185,129,0.1); color: #10b981; border: 1px solid rgba(16,185,129,0.2); }
.order-status-badge.status-cancelled{ background: rgba(239,68,68,0.1);  color: #ef4444; border: 1px solid rgba(239,68,68,0.2);  }

.order-store-chip {
    font-size: 0.68rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
}

.order-item-price {
    font-family: var(--font-h);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--secondary);
    margin-left: auto;
}

/* ==========================================================================
   SISTEMA DE MENSAJERÍA — CHAT
   ========================================================================== */

.chat-nav-wrapper { position: relative; }

/* Modal de chat: ancho messenger */
.chat-modal-card {
    max-width: 520px;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

/* ─── INBOX ─── */
#chat-inbox-view {
    display: flex;
    flex-direction: column;
    padding: 2rem 2rem 1.5rem;
    max-height: 82vh;
    overflow: hidden;
}
#chat-inbox-view .modal-title { margin-bottom: 0.25rem; }

.chat-seller-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding: 0.75rem 0 0.25rem;
    border-top: 1px solid rgba(255,255,255,0.07);
}
.chat-seller-action-btn {
    flex: 1 1 auto;
    padding: 0.55rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 10px;
    justify-content: center;
    white-space: nowrap;
}

/* ==========================================================================
   STRIPE PAYMENTS — Cuenta bancaria + desglose de ventas
   ========================================================================== */

/* ─── Sección bancaria en perfil ─── */
.bank-account-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.07);
}

.bank-section-header {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.bank-section-icon {
    font-size: 1.6rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.bank-section-title {
    font-family: var(--font-h);
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.2rem;
}

.bank-section-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.bank-section-subtitle strong {
    color: #10b981;
}

.bank-input {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 0.8rem 1rem;
    border-radius: 12px;
    color: var(--white);
    font-family: var(--font-b);
    font-size: 0.92rem;
    width: 100%;
    transition: border-color 0.25s;
}

.bank-input:focus {
    outline: none;
    border-color: rgba(0,102,255,0.45);
    background: rgba(0,102,255,0.04);
}

.bank-saved-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #10b981;
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 8px;
    padding: 0.45rem 0.85rem;
    margin-bottom: 0.75rem;
}

.bank-save-btn {
    width: 100%;
    justify-content: center;
    margin-top: 0.25rem;
    border-color: rgba(0,102,255,0.3);
    color: #6b9fff;
    font-size: 0.88rem;
}

.bank-save-btn:hover {
    background: rgba(0,102,255,0.08);
    border-color: rgba(0,102,255,0.5);
    color: var(--white);
}

/* ─── Desglose de pago en Mis Ventas ─── */
.sale-payout-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 0.4rem;
    padding: 0.45rem 0.7rem;
    background: rgba(16,185,129,0.07);
    border: 1px solid rgba(16,185,129,0.15);
    border-radius: 8px;
}

.sale-payout-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.sale-payout-amount {
    font-size: 0.88rem;
    font-weight: 700;
    color: #10b981;
    font-family: var(--font-h);
}

.sale-fee-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-left: auto;
}
#chat-inbox-view .modal-subtitle { margin-bottom: 1.25rem; }

.chat-inbox-list {
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-right: 2px;
}
.chat-inbox-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.chat-inbox-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.02);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.chat-inbox-item:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(0,102,255,0.3);
    transform: translateY(-1px);
}
.chat-inbox-item.has-unread {
    border-color: rgba(0,102,255,0.4);
    background: rgba(0,102,255,0.06);
}
.chat-inbox-item.is-closed { opacity: 0.6; }

.chat-inbox-avatar {
    width: 46px;
    height: 62px;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    overflow: hidden;
    flex-shrink: 0;
}
.chat-inbox-avatar img { width: 100%; height: 100%; object-fit: cover; }

.chat-inbox-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}
.chat-inbox-row1 {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}
.chat-inbox-card {
    font-family: var(--font-h);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 210px;
}
.chat-inbox-time { font-size: 0.7rem; color: var(--text-muted); flex-shrink: 0; }
.chat-inbox-party { font-size: 0.74rem; color: var(--text-muted); }
.chat-inbox-party strong { color: var(--text-light); }
.chat-inbox-preview {
    font-size: 0.77rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-inbox-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.12rem;
}
.chat-status-chip {
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    background: rgba(16,185,129,0.15);
    color: #10b981;
    border: 1px solid rgba(16,185,129,0.25);
}
.chat-status-chip.closed {
    background: rgba(120,120,140,0.12);
    color: var(--text-muted);
    border-color: rgba(120,120,140,0.2);
}
.chat-inbox-delete-btn {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    border: 1px solid rgba(239,68,68,0.25);
    background: rgba(239,68,68,0.08);
    color: #ef4444;
    font-size: 0.78rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
}
.chat-inbox-delete-btn:hover { background: rgba(239,68,68,0.18); transform: translateY(-1px); }
.chat-unread-dot {
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 0.67rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ─── CONVERSATION ─── */
#chat-conversation-view {
    display: flex;
    flex-direction: column;
    height: 82vh;
    max-height: 82vh;
}
.chat-conv-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}
.btn-chat-back {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-b);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    white-space: nowrap;
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
}
.btn-chat-back:hover { color: var(--white); background: rgba(255,255,255,0.06); }

.chat-conv-header-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
}
.chat-conv-card-name {
    font-family: var(--font-h);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-conv-party {
    font-size: 0.72rem;
    color: var(--text-muted);
}
.chat-conv-status {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    flex-shrink: 0;
}
.chat-conv-status.active {
    background: rgba(16,185,129,0.14);
    color: #10b981;
    border: 1px solid rgba(16,185,129,0.25);
}
.chat-conv-status.closed {
    background: rgba(120,120,140,0.12);
    color: var(--text-muted);
    border: 1px solid rgba(120,120,140,0.2);
}

/* Mensajes */
.chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
}
.chat-messages-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    flex: 1;
    justify-content: flex-end;
}
.chat-no-messages {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.84rem;
    padding: 2.5rem 1rem;
    line-height: 1.6;
}

/* Burbujas */
.chat-bubble {
    display: flex;
    flex-direction: column;
    max-width: 76%;
    gap: 0.12rem;
}
.chat-bubble.mine   { align-self: flex-end;   align-items: flex-end; }
.chat-bubble.theirs { align-self: flex-start;  align-items: flex-start; }

.chat-bubble-sender {
    font-size: 0.67rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-left: 2px;
}
.chat-bubble-text {
    padding: 0.6rem 0.9rem;
    border-radius: 16px;
    font-size: 0.87rem;
    line-height: 1.45;
    word-break: break-word;
}
.chat-bubble.mine .chat-bubble-text {
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.chat-bubble.theirs .chat-bubble-text {
    background: rgba(255,255,255,0.07);
    color: var(--text-light);
    border: 1px solid var(--glass-border);
    border-bottom-left-radius: 4px;
}
.chat-bubble-time {
    font-size: 0.62rem;
    color: var(--text-muted);
    margin: 0 2px;
}

/* Banner de chat cerrado */
.chat-closed-banner {
    margin: 0 1.25rem 0.75rem;
    padding: 0.65rem 1rem;
    border-radius: 12px;
    background: rgba(120,120,140,0.1);
    border: 1px solid rgba(120,120,140,0.2);
    color: var(--text-muted);
    font-size: 0.79rem;
    text-align: center;
    font-weight: 600;
    flex-shrink: 0;
}

/* Input de mensaje */
.chat-input-area {
    display: flex;
    align-items: flex-end;
    gap: 0.6rem;
    padding: 0.8rem 1.1rem 1.1rem;
    border-top: 1px solid var(--glass-border);
    flex-shrink: 0;
}
.chat-message-input {
    flex: 1;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 0.6rem 0.95rem;
    color: var(--white);
    font-family: var(--font-b);
    font-size: 0.88rem;
    resize: none;
    line-height: 1.4;
    transition: border-color 0.2s, background 0.2s;
    overflow-y: auto;
}
.chat-message-input:focus {
    outline: none;
    border-color: rgba(0,102,255,0.45);
    background: rgba(255,255,255,0.06);
}
.chat-message-input::placeholder { color: var(--text-muted); }

.chat-send-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ==========================================================================
   CARRITO DE COMPRAS — Drawer lateral
   ========================================================================== */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1050;
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

/* ==========================================================================
   ADMIN PANEL — PAGOS A VENDEDORES
   ========================================================================== */

.btn-admin-trigger {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    flex-shrink: 0;
    margin-left: 0.5rem;
}
.btn-admin-trigger:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.6);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
    transform: translateY(-1px);
}

.admin-modal-card {
    max-width: 680px !important;
    width: 94%;
}

.admin-bank-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    margin-top: 0.45rem;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 102, 255, 0.05);
    border: 1px solid rgba(0, 102, 255, 0.14);
    border-radius: 9px;
}

.admin-bank-field {
    font-size: 0.74rem;
    color: var(--text-light);
}

.admin-bank-field strong {
    color: var(--secondary);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}
.cart-overlay.active { opacity: 1; }

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 95vw;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid rgba(255,255,255,0.07);
    z-index: 1051;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 40px rgba(0,0,0,0.4);
}
.cart-drawer.active { transform: translateX(0); }

.cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
}

.cart-drawer-title {
    font-family: var(--font-h);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--white);
    margin: 0;
}

.cart-drawer-close {
    background: rgba(255,255,255,0.07);
    border: none;
    color: var(--text-muted);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}
.cart-drawer-close:hover {
    background: rgba(255,255,255,0.13);
    color: var(--white);
}

.cart-items-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.cart-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.cart-empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.cart-empty p { font-size: 0.93rem; font-weight: 600; color: var(--text-secondary); margin: 0 0 0.2rem; }
.cart-empty span { font-size: 0.78rem; }

.cart-item {
    display: flex;
    gap: 0.7rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 0.7rem;
    align-items: flex-start;
}

.cart-item-img {
    width: 50px;
    height: 70px;
    border-radius: 6px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    overflow: hidden;
}
.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}
.cart-item-name {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cart-item-meta  { font-size: 0.7rem; color: var(--text-muted); }
.cart-item-seller { font-size: 0.7rem; color: var(--text-muted); }
.cart-item-store { font-size: 0.7rem; color: var(--text-secondary); }
.cart-item-msg   { font-size: 0.7rem; color: var(--text-muted); font-style: italic; }

.cart-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    flex-shrink: 0;
}
.cart-item-price {
    font-family: var(--font-h);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary);
}
.cart-item-qty {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.cart-item-remove {
    background: rgba(255, 70, 70, 0.08);
    border: none;
    color: rgba(255, 100, 100, 0.7);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    margin-top: auto;
}
.cart-item-remove:hover {
    background: rgba(255, 70, 70, 0.18);
    color: #ff5555;
}

.cart-footer {
    padding: 1rem 1.5rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.07);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cart-total-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.cart-total-value {
    font-family: var(--font-h);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--white);
}

.cart-min-warning {
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.22);
    border-radius: 8px;
    padding: 0.55rem 0.85rem;
    font-size: 0.77rem;
    color: #fbbf24;
    text-align: center;
}

@media (max-width: 480px) {
    .cart-drawer { width: 100vw; max-width: 100vw; }
}

/* ============================================================
   SISTEMA DE OFERTAS
   ============================================================ */

/* Modal de oferta */
.offer-modal-card { max-width: 440px; }

.offer-card-preview {
    display: flex;
    gap: 0.9rem;
    align-items: center;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 0.85rem 1rem;
}

.offer-card-img {
    width: 56px;
    height: 78px;
    border-radius: 7px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    overflow: hidden;
}
.offer-card-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 7px; }

.offer-card-details { flex: 1; min-width: 0; }
.offer-card-name {
    font-family: var(--font-h);
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.offer-card-meta { font-size: 0.75rem; color: var(--text-muted); margin: 0.15rem 0 0.35rem; }
.offer-card-listed-price { font-size: 0.8rem; color: var(--text-muted); }
.offer-card-listed-price strong { color: var(--white); }

/* Input de monto */
.offer-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 0 1rem;
    transition: border-color 0.2s;
}
.offer-input-wrapper:focus-within { border-color: rgba(0,102,255,0.45); }

.offer-currency-prefix {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--secondary);
    margin-right: 0.3rem;
    flex-shrink: 0;
}
.offer-currency-suffix {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 0.4rem;
    flex-shrink: 0;
}
.offer-amount-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--white);
    font-size: 1.35rem;
    font-weight: 700;
    font-family: var(--font-h);
    padding: 0.8rem 0;
    min-width: 0;
    -moz-appearance: textfield;
    appearance: textfield;
}
.offer-amount-input::-webkit-inner-spin-button,
.offer-amount-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.offer-amount-input::placeholder { color: rgba(255,255,255,0.18); }

/* Tabs de modales */
.modal-tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 1.1rem;
}
.modal-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    margin-bottom: -1px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.modal-tab:hover { color: var(--white); }
.modal-tab.active {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
}

/* Badge de ofertas pendientes en tab */
.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--white);
    font-size: 0.68rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    padding: 0 0.3rem;
}
.tab-badge.hidden { display: none; }

/* Estado rechazada en oferta */
.order-status-badge.offer-rejected {
    background: rgba(239,68,68,0.12);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.25);
}

/* Precio de oferta destacado */
.offer-amount-display {
    font-weight: 700;
    color: var(--secondary);
}

/* ==========================================================================
   PANEL TIENDA
   ========================================================================== */
.store-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.9rem;
}
.store-stat-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.store-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 600;
}
.store-stat-value {
    font-family: var(--font-h);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--white);
}

.store-panel-tab-content { animation: fadeIn 0.25s ease; }

/* ==========================================================================
   PANEL TIENDA — PUNTO DE VENTA
   ========================================================================== */
.pos-accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.pos-account-card {
    position: relative;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 1.1rem 1.15rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.pos-account-card:hover {
    border-color: rgba(0,212,255,0.3);
    background: rgba(255,255,255,0.035);
}

.pos-account-card-delete {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(255,70,70,0.08);
    color: rgba(255,100,100,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.pos-account-card-delete:hover { background: rgba(255,70,70,0.18); color: #ff5555; }

.pos-account-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.85rem;
}
.pos-account-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,212,255,0.12);
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-h);
    font-weight: 800;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.pos-account-name {
    font-family: var(--font-h);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pos-account-phone { font-size: 0.72rem; color: var(--text-muted); }

.pos-account-card-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.pos-account-items-count { font-size: 0.8rem; color: var(--text-muted); }
.pos-account-total { font-family: var(--font-h); font-size: 1.1rem; font-weight: 800; color: var(--secondary); }
.pos-account-date { font-size: 0.7rem; color: var(--text-muted); opacity: 0.7; margin-top: 0.35rem; }

/* ── Detalle de cuenta: catálogo + carrito ── */
.pos-detail-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
    align-items: start;
}

.pos-product-col, .pos-cart-col { min-width: 0; }

.pos-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.pos-product-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 0.6rem;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s, background 0.2s;
}
.pos-product-card:hover { border-color: rgba(0,212,255,0.3); background: rgba(255,255,255,0.035); }
.pos-product-card:disabled { opacity: 0.4; cursor: default; }
.pos-product-card-img {
    width: 100%;
    aspect-ratio: 5/7;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    overflow: hidden;
    margin-bottom: 0.5rem;
}
.pos-product-card-img img { width: 100%; height: 100%; object-fit: cover; }
.pos-product-card-img.is-foil {
    position: relative;
    box-shadow: 0 0 0 2px rgba(139, 44, 245, 0.5), 0 0 12px rgba(0, 212, 255, 0.35);
}
.pos-product-card-img.is-foil::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.55) 50%, transparent 70%);
    background-size: 250% 250%;
    mix-blend-mode: overlay;
    animation: foilSweep 3.2s ease-in-out infinite;
    pointer-events: none;
}
.pos-product-card-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.25;
    margin-bottom: 0.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pos-product-card-meta { font-size: 0.68rem; color: var(--text-muted); margin-bottom: 0.3rem; }
.pos-product-card-footer { display: flex; align-items: center; justify-content: space-between; }
.pos-product-card-price { font-family: var(--font-h); font-size: 0.82rem; font-weight: 700; color: var(--secondary); }
.pos-product-card-stock { font-size: 0.66rem; color: var(--text-muted); }

.pos-cart-items {
    max-height: 40vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding-right: 0.15rem;
    margin-bottom: 0.85rem;
}
.pos-cart-item-qty-control {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.3rem;
}
.pos-cart-item-qty-btn {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}
.pos-cart-item-qty-btn:hover { background: rgba(255,255,255,0.09); }
.pos-cart-item-qty-value { font-size: 0.78rem; font-weight: 700; color: var(--white); min-width: 1.4rem; text-align: center; }

.pos-cart-adjustments { margin-bottom: 0.85rem; }
.pos-cart-adjustments textarea {
    width: 100%;
    resize: vertical;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    color: var(--white);
    font-family: var(--font-b);
    font-size: 0.85rem;
    padding: 0.6rem 0.8rem;
}

.pos-cart-totals {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 0.7rem;
    margin-bottom: 0.85rem;
}
.pos-total-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 0.2rem 0;
}
.pos-total-row {
    font-family: var(--font-h);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--white);
    padding-top: 0.5rem;
    margin-top: 0.3rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.pos-total-row span:last-child { color: var(--secondary); }

/* ── Modal de cobro ── */
.pos-checkout-summary {
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    color: var(--text-light);
}
.pos-checkout-summary .pos-total-row { border-top: none; margin-top: 0.4rem; padding-top: 0.4rem; }

.pos-payment-lines { display: flex; flex-direction: column; gap: 0.6rem; }
.pos-payment-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.pos-payment-line select {
    flex: 1;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    color: var(--white);
    font-family: var(--font-b);
    font-size: 0.85rem;
    padding: 0.55rem 0.7rem;
}
.pos-payment-line input[type="number"] {
    width: 110px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    color: var(--white);
    font-family: var(--font-b);
    font-size: 0.85rem;
    padding: 0.55rem 0.7rem;
}
.pos-payment-line-exact {
    background: none;
    border: none;
    color: var(--secondary);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    padding: 0.3rem;
}
.pos-payment-line-remove {
    background: rgba(255,70,70,0.08);
    border: none;
    color: rgba(255,100,100,0.7);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
}
.pos-payment-line-remove:hover { background: rgba(255,70,70,0.18); color: #ff5555; }

.pos-checkout-balance {
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.85rem;
}
.pos-checkout-balance .balance-remaining { color: #ff5555; font-weight: 700; }
.pos-checkout-balance .balance-change { color: #10b981; font-weight: 700; }

@media (max-width: 900px) {
    .pos-detail-layout { grid-template-columns: 1fr; }
    .pos-product-grid { max-height: 45vh; }
}

.employee-permission-check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0;
    font-size: 0.85rem;
    color: var(--text-light);
    cursor: pointer;
}
.employee-permission-check input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--secondary);
    cursor: pointer;
    flex-shrink: 0;
}

.employee-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    background: rgba(255,255,255,0.02);
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.employee-item-name {
    font-family: var(--font-h);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.15rem;
}
.employee-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.employee-permission-chip {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.18rem 0.6rem;
    border-radius: 30px;
    background: rgba(0,102,255,0.1);
    color: #6b9fff;
    border: 1px solid rgba(0,102,255,0.2);
    margin-right: 0.35rem;
}
.employee-status-chip {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.18rem 0.6rem;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.employee-status-chip.active   { background: rgba(16,185,129,0.1); color: #10b981; border: 1px solid rgba(16,185,129,0.2); }
.employee-status-chip.inactive { background: rgba(239,68,68,0.1); color: #ef4444; border: 1px solid rgba(239,68,68,0.2); }

/* Etiquetas y observaciones de catálogo (Panel Tienda) */
.card-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-family: var(--font-h);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 30px;
    border: 1px solid transparent;
    white-space: nowrap;
}
.card-tag-chip::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}
.card-tags-row {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin: 0.35rem 0;
}
.card-note-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-muted);
    font-family: var(--font-b);
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    max-width: 100%;
    text-align: left;
    transition: all 0.2s;
}
.card-note-btn:hover { background: rgba(255,255,255,0.09); color: var(--white); }
.card-note-btn .note-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--secondary);
    box-shadow: 0 0 6px var(--secondary);
    flex-shrink: 0;
}
.card-note-btn .note-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 260px;
}

/* Selección múltiple de cartas */
.order-item.selectable { padding-left: 2.9rem; cursor: pointer; position: relative; }
.order-item.selectable:hover { border-color: rgba(0,212,255,0.25); }
.order-item.row-selected { border-color: rgba(0,212,255,0.4); background: rgba(0,212,255,0.06); }
.order-item-check {
    position: absolute;
    left: 1rem;
    top: 1.15rem;
    width: 19px;
    height: 19px;
    border-radius: 6px;
    border: 1.5px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.03);
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 900;
    color: #04121c;
}
.order-item.selectable .order-item-check { display: flex; }
.order-item.row-selected .order-item-check { background: var(--secondary); border-color: var(--secondary); }

.catalog-bulk-bar {
    position: sticky;
    bottom: 1rem;
    margin-top: 1rem;
    background: rgba(6,12,28,0.94);
    border: 1px solid rgba(0,212,255,0.3);
    border-radius: 16px;
    padding: 0.8rem 1.05rem;
    backdrop-filter: blur(20px);
    display: none;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
    box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}
.catalog-bulk-bar.show { display: flex; }
.catalog-bulk-bar .bulk-count {
    font-family: var(--font-h);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--secondary);
    white-space: nowrap;
}

/* Selector de etiquetas dentro del modal de etiquetas/observación */
.tag-picker { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.5rem; }
.tag-picker-option {
    font-family: var(--font-h);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.7rem;
    border-radius: 30px;
    cursor: pointer;
    border: 1.5px solid;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    opacity: 0.55;
    transition: all 0.15s;
}
.tag-picker-option::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tag-picker-option.on { opacity: 1; box-shadow: 0 0 0 1px currentColor inset; }
.tag-picker-empty { color: var(--text-muted); font-size: 0.82rem; }

/* Gestor de etiquetas de la tienda */
.tag-manager-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    background: rgba(255,255,255,0.02);
    margin-bottom: 0.5rem;
}
.tag-manager-row .tag-swatch { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.tag-manager-row .tag-name { font-family: var(--font-h); font-weight: 700; font-size: 0.86rem; flex: 1; }
.tag-manager-row .tag-count { color: var(--text-muted); font-size: 0.74rem; white-space: nowrap; }
.tag-manager-row input[type="text"] {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--white);
    font-family: var(--font-h);
    font-size: 0.85rem;
    padding: 0.3rem 0.55rem;
    flex: 1;
}
.tag-icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: all 0.15s;
    flex-shrink: 0;
}
.tag-icon-btn:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.tag-icon-btn.danger:hover { color: #ef4444; background: rgba(239,68,68,0.1); }

.new-tag-form {
    border: 1px dashed rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 0.5rem;
}
.new-tag-form input[type="text"] {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    color: var(--white);
    font-family: var(--font-b);
    font-size: 0.86rem;
    padding: 0.6rem 0.75rem;
}
.tag-swatch-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tag-swatch-pick {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s;
}
.tag-swatch-pick.on { border-color: #fff; transform: scale(1.12); }

/* Carpetas del catálogo de tienda (anidadas, con logo/emoji propio) */
.catalog-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.9rem;
    font-size: 0.85rem;
}
.catalog-breadcrumb .crumb {
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: var(--font-h);
    font-weight: 600;
}
.catalog-breadcrumb .crumb:hover { color: var(--white); background: rgba(255,255,255,0.06); }
.catalog-breadcrumb .crumb.current { color: var(--white); cursor: default; }
.catalog-breadcrumb .crumb.current:hover { background: none; }
.catalog-breadcrumb .crumb-sep { color: var(--text-muted); opacity: 0.4; }

.catalog-folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}
.catalog-folder-tile {
    position: relative;
    background: rgba(10, 18, 40, 0.3);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 1rem 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.25s var(--ease-smooth);
}
.catalog-folder-tile:hover {
    background: rgba(10, 18, 40, 0.5);
    border-color: rgba(0, 102, 255, 0.3);
    transform: translateY(-3px);
}
.folder-tile-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    background: rgba(255,255,255,0.05);
    overflow: hidden;
}
.folder-tile-logo img { width: 100%; height: 100%; object-fit: cover; }
.folder-tile-name {
    font-family: var(--font-h);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--white);
    word-break: break-word;
}
.folder-tile-count { font-size: 0.72rem; color: var(--text-muted); }
.folder-tile-actions {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s;
}
.catalog-folder-tile:hover .folder-tile-actions { opacity: 1; }
.folder-tile-action-btn {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
}
.folder-tile-action-btn:hover { color: var(--white); background: rgba(0,102,255,0.3); }
.folder-tile-action-btn.danger:hover { color: #ef4444; background: rgba(239,68,68,0.15); }

.folder-emoji-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.folder-emoji-pick {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: rgba(255,255,255,0.04);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}
.folder-emoji-pick.on { border-color: var(--secondary); background: rgba(0,212,255,0.12); }
.folder-logo-preview {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(255,255,255,0.05);
    overflow: hidden;
    flex-shrink: 0;
}
.folder-logo-preview img { width: 100%; height: 100%; object-fit: cover; }

.folder-move-list {
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0.5rem 0 1rem;
}
.folder-move-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.folder-move-item:hover { background: rgba(0,102,255,0.1); border-color: rgba(0,102,255,0.3); }
.folder-move-item .fmi-logo { font-size: 1.1rem; width: 22px; text-align: center; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.folder-move-item .fmi-logo img { width: 20px; height: 20px; border-radius: 5px; object-fit: cover; }

/* Gráfica de ventas mensuales (Panel Tienda) */
.store-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.6rem;
    height: 170px;
    padding: 0.5rem 0.25rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.store-chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    gap: 0.35rem;
    min-width: 0;
}
.store-chart-bar-wrap {
    flex: 1;
    display: flex;
    align-items: flex-end;
    width: 100%;
    justify-content: center;
}
.store-chart-bar {
    width: 60%;
    max-width: 34px;
    background: linear-gradient(180deg, var(--secondary), rgba(0,212,255,0.2));
    border-radius: 6px 6px 0 0;
    min-height: 3px;
    transition: height 0.5s cubic-bezier(0.25,1,0.5,1);
}
.store-chart-value { font-size: 0.68rem; color: var(--text-muted); font-weight: 700; white-space: nowrap; }
.store-chart-label { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; padding-bottom: 0.3rem; }

/* Actividad de la tienda */
.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    background: rgba(255,255,255,0.02);
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
    flex-wrap: wrap;
}
.activity-item-text { color: var(--text-light); }
.activity-item-actor { color: var(--white); font-weight: 700; }
.activity-item-time { color: var(--text-muted); font-size: 0.72rem; white-space: nowrap; }

/* Logos de juegos (imágenes PNG) */
.game-logo { object-fit: contain; display: block; }
.cf-icon-glyph.game-logo { width: 100%; height: 100%; border-radius: 50%; }
.cf-icon-wrap:has(.game-logo) { border: none; width: 72px; height: 72px; }
.back-game-icon.game-logo { width: 1.6rem; height: 1.6rem; }
.game-chip-icon.game-logo { width: 2rem; height: 2rem; }
.filter-chip-logo.game-logo { display: inline-block; width: 1.2rem; height: 1.2rem; vertical-align: middle; }
.tfc-icon .game-logo { width: 2rem; height: 2rem; margin: 0 auto; }

/* Filtros adicionales del Marketplace (debajo de los chips de juegos) */
.marketplace-advanced-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}
.mkt-filter {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 130px;
    text-align: left;
}
.mkt-filter > span {
    font-family: var(--font-h);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding-left: 0.4rem;
}
.mkt-filter select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    max-width: 220px;
    padding: 0.5rem 2rem 0.5rem 0.9rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 0.8rem center;
    color: var(--text-light);
    font-family: var(--font-b);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    text-overflow: ellipsis;
}
.mkt-filter select:hover,
.mkt-filter select:focus {
    outline: none;
    border-color: rgba(0, 102, 255, 0.4);
    background-color: rgba(0, 102, 255, 0.08);
}
.mkt-filter select option { background: var(--bg-dark); color: var(--white); }
.mkt-filter-reset {
    padding: 0.5rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: none;
    color: var(--primary);
    font-family: var(--font-h);
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
}
.mkt-filter-reset:hover { background: rgba(0, 102, 255, 0.1); }
