/* §1 VARIABLES */
:root {
    --bg: #080808;
    --bg-alt: #0c0c0c;
    --accent: #14f195;
    --accent-dim: rgba(20,241,149,0.1);
    --accent-border: rgba(20,241,149,0.2);
    --accent-bg: rgba(20,241,149,0.08);
    --danger: rgba(248,113,113,0.8);
    --border: rgba(255,255,255,0.06);
    --border-mid: rgba(255,255,255,0.07);
    --text: #fff;
    --text-sec: rgba(255,255,255,0.5);
    --text-muted: rgba(255,255,255,0.25);
    --text-faint: rgba(255,255,255,0.35);
    --text-light: rgba(255,255,255,0.6);
    --text-strong: rgba(255,255,255,0.7);
    --text-body: rgba(255,255,255,0.82);
    --bg-card: rgba(255,255,255,0.025);
    --bg-card-alt: rgba(255,255,255,0.04);
    --font-xs: 10px;
    --font-base: 13px;
    --font-lg: 18px;
    --r: 10px;
    --r-sm: 7px;
}

/* §2 RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, 'Inter', 'Segoe UI', sans-serif; font-weight: 400; line-height: 1.5; min-height: 100vh; }
a, span, label, p { font-size: var(--font-base); color: var(--text-sec); }
h1 { font-size: var(--font-lg); font-weight: 500; }
h2 { font-size: var(--font-base); font-weight: 500; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* §3 LAYOUT */
.container { max-width: 900px; margin: 0 auto; padding: 32px 16px 64px; }
.nav-public { height: 54px; background: var(--bg-card); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 24px; gap: 8px; position: sticky; top: 0; z-index: 50; backdrop-filter: blur(8px); }
.nav-logo-wrap { margin-right: 16px; display: flex; align-items: center; }
.nav-logo-img { height: 22px; filter: brightness(0) invert(1); }
.nav-logo-fallback { display: none; font-size: 15px; font-weight: 500; }
.nav-logo-text { display: none; }
.nav-spacer { flex: 1; }
.aviso-item { display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aviso-dot { width: 6px; height: 6px; border-radius: 50%; }
.aviso-text { color: rgba(255,255,255,0.7); }
.nav-link { padding: 5px 10px; border-radius: 6px; color: var(--text-sec); transition: color .15s; }
.nav-link:hover { color: rgba(255,255,255,0.8); }
.nav-link.active { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.08); color: var(--text); }
.nav-link-btn { padding: 6px 14px; border-radius: var(--r-sm); font-weight: 500; color: var(--accent); background: var(--accent-dim); border: 1px solid rgba(20,241,149,0.25); transition: background .15s; }
.nav-link-btn:hover { background: rgba(20,241,149,0.18); }
.nav-link-accent { background: rgba(20,241,149,0.12); border: 1px solid rgba(20,241,149,0.25); color: var(--accent); padding: 6px 14px; border-radius: var(--r-sm); font-weight: 600; white-space: nowrap; }
.nav-link-reg { padding: 6px 12px; border-radius: var(--r-sm); color: rgba(255,255,255,0.5); border: 1px solid rgba(255,255,255,0.1); font-size: 13px; white-space: nowrap; transition: color .15s, border-color .15s; }
.nav-link-reg:hover { color: rgba(255,255,255,0.8); border-color: rgba(255,255,255,0.2); }

/* §4 AVISOS */
.avisos-bar { height: 42px; background: rgba(255,255,255,0.04); border-bottom: 1px solid rgba(255,255,255,0.08); display: flex; align-items: center; overflow: hidden; }
.avisos-label-wrap { padding: 0 16px; border-right: 1px solid rgba(255,255,255,0.08); height: 100%; display: flex; align-items: center; flex-shrink: 0; }
.avisos-label { font-size: var(--font-xs); font-weight: 500; color: var(--accent); letter-spacing: 0.05em; }
.avisos-content { flex: 1; padding: 0 16px; overflow: hidden; position: relative; }
.aviso-anim { display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aviso-dot-anim { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; display: inline-block; }
.aviso-text-anim { color: rgba(255,255,255,0.7); }

/* §5 PROXIMOS */
.proximos-section { max-width: 900px; margin: 0 auto; padding: 24px 16px 0; }
.proximos-title { margin: 0 0 14px; letter-spacing: 0.02em; }
.proximos-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.prox-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r); padding: 12px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.prox-team { flex: 1; min-width: 160px; }
.prox-team-name { color: var(--text); margin: 0; }
.prox-team-players { font-size: var(--font-xs); color: var(--text-muted); margin: 2px 0 0; }
.prox-vs { font-size: var(--font-xs); font-weight: 500; color: rgba(255,255,255,0.2); flex-shrink: 0; }
.prox-date { text-align: right; flex-shrink: 0; }
.prox-date-main { font-size: var(--font-xs); color: rgba(255,255,255,0.6); margin: 0; font-variant-numeric: tabular-nums; }
.prox-date-sub { font-size: var(--font-xs); color: var(--text-muted); margin: 2px 0 0; }
.prox-badge { font-size: var(--font-xs); font-weight: 500; padding: 3px 8px; border-radius: 20px; flex-shrink: 0; }
.prox-empty { padding: 16px; background: rgba(255,255,255,0.015); border: 1px solid rgba(255,255,255,0.04); border-radius: var(--r); color: var(--text-muted); text-align: center; margin-bottom: 10px; }

/* §6 SPONSORS */
.sponsors-section { max-width: 1200px; margin: 0 auto; padding: 28px 16px 8px; }
.sponsors-section-label { font-size: 10px; letter-spacing: .12em; color: rgba(255,255,255,0.2); text-transform: uppercase; margin: 0 0 12px; }
.sponsors-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sponsor-banner-wrap { display: block; border-radius: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,0.06); background: rgba(255,255,255,0.02); transition: border-color .2s; text-decoration: none; }
.sponsor-banner-wrap:hover { border-color: rgba(255,255,255,0.14); }
.sponsor-banner-img { width: 100%; height: 200px; object-fit: cover; display: block; }
/* Mobile: horizontal scroll snap, 1 banner a la vez */
@media (max-width: 700px) {
    .sponsors-section { padding: 20px 0 4px; }
    .sponsors-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding: 0 16px 10px; scrollbar-width: none; -ms-overflow-style: none; }
    .sponsors-grid::-webkit-scrollbar { display: none; }
    .sponsor-banner-wrap { flex: 0 0 calc(100vw - 32px); scroll-snap-align: start; min-width: calc(100vw - 32px); }
    .sponsor-banner-img { height: 160px; }
}

/* §7 TITULOS */
.page-main-title { margin: 0 0 24px; }
.page-subtitle { font-size: var(--font-xs); color: var(--text-muted); font-weight: 400; margin-left: 8px; }

/* §8 TABLAS */
.nivel-full { margin-bottom: 20px; border-radius: var(--r); overflow: hidden; }
.nivel-head-row { padding: 10px 16px; display: flex; align-items: center; gap: 10px; }
.nivel-bar-din { width: 3px; height: 20px; border-radius: 2px; flex-shrink: 0; }
.nivel-name-din { font-size: var(--font-base); font-weight: 500; }
.nivel-meta { font-size: var(--font-xs); color: var(--text-muted); }
.nivel-table-wrap { overflow-x: auto; }
.nivel-table { width: 100%; border-collapse: collapse; }
.th-row, .nivel-row-din { border-bottom: 1px solid rgba(255,255,255,0.04); }
.nivel-row-din { transition: background .15s; }
.nivel-row-din:hover { background: rgba(255,255,255,0.025); }
.nivel-th { padding: 8px 16px; text-align: left; font-size: var(--font-xs); color: rgba(255,255,255,0.2); font-weight: 400; letter-spacing: 0.06em; }
.nivel-td { padding: 10px 16px; color: rgba(255,255,255,0.6); vertical-align: middle; }
.nivel-td.pos, .espera-pos { font-size: var(--font-xs); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.nivel-td.apodo { position: relative; }
.nivel-td.pts { text-align: center; font-weight: 500; font-variant-numeric: tabular-nums; }
.nivel-td.stat, .nivel-td.stat-muted { text-align: center; font-size: var(--font-xs); font-variant-numeric: tabular-nums; }
.nivel-td.stat-muted { color: rgba(255,255,255,0.22); }
.apodo-link { font-weight: 500; color: var(--text); cursor: default; border-bottom: 1px dashed rgba(255,255,255,0.15); }
.nivel-empty-state { padding: 16px; background: rgba(255,255,255,0.015); border: 1px solid rgba(255,255,255,0.04); border-radius: var(--r); color: var(--text-muted); text-align: center; }

/* §9 SALA DE ESPERA */
.espera-section { margin-top: 32px; border-radius: var(--r); overflow: hidden; }
.espera-header { padding: 10px 16px; display: flex; align-items: center; gap: 10px; }
.espera-bar { width: 3px; height: 20px; background: #4b5563; border-radius: 2px; flex-shrink: 0; }
.espera-nombre { font-size: var(--font-base); font-weight: 500; color: #9ca3af; }
.espera-count { font-size: var(--font-xs); color: var(--text-muted); }
.espera-apodo { padding: 10px 16px; font-weight: 500; color: rgba(255,255,255,0.6); }
.espera-date { padding: 10px 16px; text-align: right; font-size: var(--font-xs); color: var(--text-muted); }

/* §10 TOOLTIP */
.tooltip-trigger { cursor: default; border-bottom: 1px dashed rgba(255,255,255,0.15); }
.tooltip-box { position: fixed; display: none; background: #111; border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; padding: 6px 10px; font-size: var(--font-xs); color: rgba(255,255,255,0.8); pointer-events: none; z-index: 100; white-space: nowrap; }

/* §11 ALPINE.JS */
.transition { transition: all .15s; }
.ease-out { transition-timing-function: cubic-bezier(0, 0, 0.2, 1); }
.ease-in { transition-timing-function: cubic-bezier(0.4, 0, 1, 1); }
.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }
.opacity-0 { opacity: 0; }
.opacity-100 { opacity: 1; }

/* §12 DOCS - NAV & LAYOUT */
.nav-mini { height: 54px; background: var(--bg-card); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 32px; gap: 10px; position: sticky; top: 0; z-index: 50; backdrop-filter: blur(8px); }
.nav-brand { font-size: 15px; font-weight: 600; color: var(--accent); letter-spacing: -0.01em; }
.nav-sep { color: rgba(255,255,255,0.15); font-size: 18px; }
.nav-label { font-size: var(--font-base); color: var(--text-faint); }
.container-doc { max-width: 760px; margin: 0 auto; padding: 56px 24px 96px; }

/* §13 DOCS - HEADER & TITLES */
.doc-header { margin-bottom: 48px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
.doc-tag { display: inline-block; font-size: var(--font-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); background: var(--accent-bg); border: 1px solid var(--accent-border); border-radius: 4px; padding: 3px 10px; margin-bottom: 16px; }
.doc-title { font-size: 30px; font-weight: 600; color: var(--text); letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 6px; }
.doc-sub { font-size: 15px; color: var(--text-faint); margin-bottom: 20px; }
.doc-meta { font-size: 12px; color: var(--text-muted); }

/* §14 DOCS - CONTENT */
.section-doc { margin-bottom: 44px; }
.h2-doc { font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 14px; padding-left: 12px; border-left: 2px solid var(--accent); }
.h3-doc { font-size: var(--font-base); font-weight: 600; color: var(--text-strong); margin: 18px 0 8px; text-transform: uppercase; letter-spacing: .04em; }
.p-doc { color: var(--text-light); margin-bottom: 12px; }
.ul-doc { list-style: none; margin: 8px 0 16px; display: flex; flex-direction: column; gap: 6px; }
.li-doc { color: rgba(255,255,255,0.55); padding-left: 18px; position: relative; }
.li-doc::before { content: '·'; position: absolute; left: 4px; color: var(--accent); font-size: 18px; line-height: 1.4; }
.link { color: var(--accent); text-decoration: none; }
.link:hover { text-decoration: underline; }
.strong-hi { color: rgba(255,255,255,0.75); }

/* §15 DOCS - BOXES */
.highlight-box { background: rgba(20,241,149,0.04); border: 1px solid rgba(20,241,149,0.15); border-radius: var(--r); padding: 18px 22px; margin: 14px 0; }
.highlight-box .p-doc { margin-bottom: 0; font-size: 14px; }
.contact-box { background: var(--bg-card); border: 1px solid var(--border-mid); border-radius: var(--r); padding: 20px 24px; margin-top: 12px; }
.contact-box .p-doc { margin-bottom: 4px; font-size: var(--font-base); }
.contact-box .link { color: var(--accent); }
.warning-box { background: rgba(248,113,113,0.05); border: 1px solid rgba(248,113,113,0.15); border-radius: var(--r); padding: 16px 20px; margin: 14px 0; }
.warning-box .p-doc { color: var(--danger); margin-bottom: 0; font-size: var(--font-base); }

/* §16 DOCS - FOOTER */
.footer-doc { border-top: 1px solid var(--border); text-align: center; padding: 32px 24px; font-size: 12px; color: rgba(255,255,255,0.2); }
.footer-doc .link { color: rgba(255,255,255,0.3); }
.footer-doc .link:hover { color: rgba(255,255,255,0.6); }
.footer-doc-links { margin-top: 6px; }

/* §17 RESPONSIVE */
@media (max-width: 520px) { .container-doc { padding: 36px 16px 72px; } .doc-title { font-size: 22px; } }
@media (max-width: 768px) { .nav-public { padding: 0 12px; gap: 3px; } .nav-link { padding: 5px 7px; font-size: 13px; } .nav-link-btn { padding: 5px 10px; font-size: 12px; } .nav-link-reg { padding: 5px 9px; font-size: 12px; } .nav-link-accent { padding: 5px 10px; font-size: 12px; } .container { padding: 20px 12px 48px; } }
@media (max-width: 480px) { .nav-link { display: none; } }

/* §18 RESULTADOS */
.container-resultados { max-width: 680px; margin: 0 auto; padding: 32px 16px 64px; }
.resultados-title { font-size: var(--font-lg); font-weight: 500; margin: 0 0 24px; }
.fecha-sep { font-size: var(--font-xs); color: rgba(255,255,255,0.2); margin: 20px 0 10px; letter-spacing: .06em; text-transform: uppercase; }
.fecha-sep:first-child { margin-top: 0; }
.resultado-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r); margin-bottom: 10px; overflow: hidden; }
.resultado-row { display: flex; align-items: stretch; }
.resultado-barra { width: 3px; flex-shrink: 0; }
.resultado-content { flex: 1; padding: 14px 16px; }
.resultado-parejas { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.resultado-nombre { font-size: 14px; font-weight: 500; }
.resultado-nombre.ganador { color: var(--text); }
.resultado-nombre.perdedor { color: var(--text-muted); }
.resultado-score { text-align: center; font-variant-numeric: tabular-nums; }
.resultado-score-sets { font-size: var(--font-base); color: var(--text-light); margin: 0; }
.resultado-score-meta { font-size: var(--font-xs); color: rgba(255,255,255,0.2); margin: 3px 0 0; }
.resultado-footer { display: flex; justify-content: space-between; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.04); }
.resultado-pts { font-size: var(--font-xs); }
.resultado-pts.ganador { color: var(--accent); }
.resultado-pts.perdedor { color: var(--text-muted); }
.resultados-empty { font-size: 14px; color: var(--text-muted); }
.resultados-pagination { margin-top: 20px; }

/* §19 REGLAS */
.container-reglas { max-width: 700px; margin: 0 auto; padding: 32px 16px 80px; display: flex; flex-direction: column; gap: 28px; }
.reglas-header { margin-bottom: 4px; }
.reglas-title { font-size: var(--font-lg); font-weight: 500; margin: 0 0 4px; }
.reglas-subtitle { font-size: 12px; color: var(--text-muted); margin: 0; }
.reglas-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; }
.reglas-h2 { font-size: 14px; font-weight: 500; color: var(--accent); margin: 0 0 10px; letter-spacing: .03em; text-transform: uppercase; }
.reglas-table { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.reglas-th { padding: 7px 12px; text-align: left; font-size: var(--font-xs); color: rgba(255,255,255,0.3); font-weight: 400; letter-spacing: .06em; border-bottom: 1px solid var(--border); }
.reglas-td { padding: 8px 12px; font-size: var(--font-base); color: var(--text-light); border-bottom: 1px solid rgba(255,255,255,0.04); }
.reglas-td:first-child { color: var(--text); }
.reglas-ul { padding-left: 18px; margin: 0 0 8px; }
.reglas-li { font-size: var(--font-base); color: var(--text-light); line-height: 1.6; margin-bottom: 4px; }
.reglas-p { font-size: var(--font-base); color: var(--text-light); line-height: 1.6; }
.reglas-p strong { color: var(--text); }
.reglas-p strong.danger { color: #f87171; }
.reglas-btn { display: inline-block; padding: 8px 16px; border-radius: var(--r-sm); font-size: var(--font-base); font-weight: 500; color: var(--accent); background: var(--accent-dim); border: 1px solid rgba(20,241,149,0.25); text-decoration: none; margin-top: 12px; }
.reglas-btn:hover { background: rgba(20,241,149,0.18); }

/* §20 PRIVACIDAD */
.arco-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.arco-item { background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; }
.arco-item strong { display: block; margin-bottom: 4px; }
.arco-item p { margin: 0; font-size: var(--font-base); }
.table-full { width: 100%; border-collapse: collapse; }
.table-full td { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: var(--font-base); color: var(--text-light); }
.table-full td:first-child { color: var(--text); width: 40%; }

/* §21 ELIMINACIÓN */
.doc-subtitle { font-size: 15px; color: var(--text-faint); margin-bottom: 36px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
.form-card { background: var(--bg-card); border: 1px solid var(--border-mid); border-radius: 12px; padding: 28px; margin-top: 28px; }
.form-card h2 { margin-top: 0; margin-bottom: 20px; }
.form-row { display: flex; gap: 10px; }
.form-row .field { flex: 1; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: var(--font-xs); letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 6px; }
.field input, .field textarea { width: 100%; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); color: var(--text); border-radius: var(--r-sm); padding: 10px 13px; font-size: 14px; font-family: inherit; outline: none; transition: border-color .15s; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field input::placeholder, .field textarea::placeholder { color: var(--text-muted); }
.btn-submit { background: var(--accent); color: #000; border: none; padding: 12px 24px; border-radius: var(--r-sm); font-size: var(--font-base); font-weight: 600; cursor: pointer; }
.btn-submit:hover { background: #0ad87e; }
.form-note { font-size: 12px; color: rgba(251,191,36,0.7); margin-top: 12px; }
@media (max-width: 520px) { .form-row { flex-direction: column; gap: 0; } .form-card { padding: 20px; } }
/* === Nav variants === */
.nav-brand-accent { font-size: 15px; font-weight: 500; color: var(--accent); text-decoration: none; letter-spacing: -0.01em; }
.nav-legal { height: 54px; background: var(--bg-card); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 32px; gap: 10px; position: sticky; top: 0; z-index: 50; backdrop-filter: blur(8px); }
.nav-pagos { height: 54px; background: var(--bg-card); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 24px; gap: 12px; }
.nav-pagos-link { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-pagos-img { height: 22px; filter: brightness(0) invert(1); opacity: .85; }
.nav-pareja { background: #111827; border-bottom: 1px solid rgba(255,255,255,0.06); padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 56px; }
.nav-brand-pareja { font-size: 16px; font-weight: 500; color: #fff; text-decoration: none; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-apodo { font-size: 13px; color: rgba(255,255,255,0.5); }
.btn-logout { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.6); border-radius: 6px; padding: 6px 12px; font-size: 12px; cursor: pointer; text-decoration: none; }
.nav-historial { background: #111827; border-bottom: 1px solid rgba(255,255,255,0.06); padding: 0 24px; display: flex; align-items: center; gap: 12px; height: 56px; }

/* === Layout containers === */
.body-legal { font-size: 15px; line-height: 1.7; }
.container-md { max-width: 760px; margin: 0 auto; padding: 56px 24px 96px; }
.container-pareja { max-width: 900px; margin: 0 auto; padding: 28px 20px; }

/* === Sidebar Admin === */
.admin-sidebar { width: 200px; flex-shrink: 0; background: #0c0c0c; border-right: 1px solid rgba(255,255,255,0.05); display: flex; flex-direction: column; padding: 16px 10px; position: fixed; height: 100vh; overflow-y: auto; z-index: 40; }
.admin-sidebar-logo { display: block; margin-bottom: 20px; padding: 0 4px; }
.admin-sidebar-logo img { height: 20px; filter: brightness(0) invert(1); }
.sidebar-section-label { font-size: 9px; letter-spacing: 0.1em; color: rgba(20,241,149,0.7); text-transform: uppercase; padding: 0 4px; margin: 14px 0 6px; font-weight: 500; }
.sidebar-item { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 6px; font-size: 13px; color: rgba(255,255,255,0.45); text-decoration: none; border-left: 2px solid transparent; transition: all .15s; margin-bottom: 1px; }
.sidebar-item:hover { color: rgba(255,255,255,0.75); background: rgba(255,255,255,0.035); }
.sidebar-item.active { color: #fff; background: rgba(255,255,255,0.05); border-left-color: #14f195; }
.badge-red { background: rgba(239,68,68,0.2); color: #f87171; font-size: 10px; padding: 1px 6px; border-radius: 10px; margin-left: auto; }
.badge-amber { background: rgba(245,158,11,0.15); color: #fbbf24; font-size: 10px; padding: 1px 6px; border-radius: 10px; margin-left: auto; }
.sidebar-spacer { flex: 1; }
.sidebar-footer { border-top: 1px solid rgba(255,255,255,0.06); padding-top: 12px; margin-top: 12px; }
.sidebar-user-name { font-size: 11px; color: rgba(255,255,255,0.3); padding: 0 4px; margin: 0 0 6px; }
.btn-sidebar-logout { width: 100%; text-align: left; background: none; border: none; cursor: pointer; padding: 6px 12px; border-radius: 6px; font-size: 12px; color: rgba(255,255,255,0.3); }
.btn-sidebar-logout:hover { color: rgba(248,113,113,0.8); }

/* === Admin Main === */
.admin-main { margin-left: 200px; flex: 1; padding: 28px 28px 64px; overflow-x: hidden; min-width: 0; }
.admin-alert-success { margin-bottom: 16px; padding: 9px 14px; border-radius: 7px; background: rgba(20,241,149,0.08); border: 1px solid rgba(20,241,149,0.2); font-size: 13px; color: #14f195; }
.admin-alert-error { margin-bottom: 16px; padding: 9px 14px; border-radius: 7px; background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.2); font-size: 13px; color: #f87171; }

/* === Admin Components === */
.btn-green { padding: 7px 14px; border-radius: 7px; background: #14f195; color: #080808; font-size: 13px; font-weight: 500; border: none; cursor: pointer; text-decoration: none; display: inline-block; }
.btn-green:hover { opacity: 0.9; }
.btn-ghost { padding: 6px 12px; border-radius: 6px; background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.6); font-size: 12px; border: 1px solid rgba(255,255,255,0.08); cursor: pointer; text-decoration: none; display: inline-block; }
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.input { width: 100%; padding: 8px 11px; border-radius: 7px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); color: #fff; font-size: 13px; outline: none; }
.input:focus { border-color: rgba(20,241,149,0.35); }
.card { background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; }
.table-row:hover { background: rgba(255,255,255,0.025); }
select.input option { background: #111; }
.admin-page-title { font-size: 18px; font-weight: 500; margin: 0 0 20px; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-thead-row { border-bottom: 1px solid rgba(255,255,255,0.06); }
.admin-th { padding: 9px 14px; text-align: left; font-size: 10px; color: rgba(255,255,255,0.3); font-weight: 400; letter-spacing: .06em; }
.admin-th.center { text-align: center; }
.admin-th.right { text-align: right; }
.admin-td { padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 13px; color: #fff; }
.admin-td.center { text-align: center; }
.admin-td.right { text-align: right; }
.admin-td.muted { color: rgba(255,255,255,0.7); font-variant-numeric: tabular-nums; }
.admin-td.dim { color: rgba(255,255,255,0.3); }
.admin-td.accent { color: #14f195; font-variant-numeric: tabular-nums; font-weight: 500; }
.admin-td.actions { padding: 10px 14px; }
.admin-actions { display: flex; gap: 6px; justify-content: flex-end; }
.badge-active { font-size: 10px; padding: 2px 8px; border-radius: 10px; background: rgba(20,241,149,0.1); color: #14f195; border: 1px solid rgba(20,241,149,0.2); }
.badge-inactive { font-size: 10px; padding: 2px 8px; border-radius: 10px; background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.3); border: 1px solid rgba(255,255,255,0.06); }
.btn-ghost-danger { padding: 6px 12px; border-radius: 6px; background: rgba(255,255,255,0.06); color: #f87171; font-size: 12px; border: 1px solid rgba(248,113,113,0.2); cursor: pointer; display: inline-block; }
.btn-ghost-danger:hover { background: rgba(248,113,113,0.08); }
.admin-form-label { font-size: 10px; color: rgba(255,255,255,0.3); display: block; margin-bottom: 4px; letter-spacing: .05em; text-transform: uppercase; }
.admin-form-col { display: flex; flex-direction: column; gap: 10px; }
.admin-empty-msg { padding: 24px; text-align: center; font-size: 13px; color: rgba(255,255,255,0.2); }
.admin-section-label { font-size: 11px; color: rgba(255,255,255,0.3); margin: 0 0 14px; letter-spacing: .06em; text-transform: uppercase; }

/* === Admin Login === */
.admin-login-wrap { display: flex; min-height: 100vh; }
.admin-login-left { width: 440px; flex-shrink: 0; display: flex; flex-direction: column; justify-content: center; padding: 48px; border-right: 1px solid rgba(255,255,255,0.06); }
.admin-login-header { margin-bottom: 36px; }
.admin-login-logo { height: 26px; filter: brightness(0) invert(1); margin-bottom: 20px; display: block; }
.admin-login-title { font-size: 20px; font-weight: 500; color: #fff; margin: 0 0 4px; }
.admin-login-sub { font-size: 13px; color: rgba(255,255,255,0.4); margin: 0; }
.admin-login-form { display: flex; flex-direction: column; gap: 14px; }
.admin-login-label { display: block; font-size: 11px; color: rgba(255,255,255,0.4); margin-bottom: 6px; letter-spacing: 0.04em; }
.admin-login-input { width: 100%; padding: 10px 12px; border-radius: 7px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); color: #fff; font-size: 14px; outline: none; transition: border-color .2s; }
.admin-login-input:focus { border-color: rgba(20,241,149,0.35); }
.admin-login-btn { margin-top: 4px; padding: 11px; border-radius: 7px; background: #14f195; color: #080808; font-size: 14px; font-weight: 500; border: none; cursor: pointer; width: 100%; }
.admin-login-btn:hover { opacity: 0.9; }
.admin-login-footer { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.06); }
.admin-login-footer a { font-size: 12px; color: rgba(255,255,255,0.3); text-decoration: none; }
.admin-login-right { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 48px; background: #0c0c0c; }
.admin-login-torneo-label { font-size: 10px; letter-spacing: 0.12em; color: rgba(255,255,255,0.2); text-transform: uppercase; margin: 0 0 24px; }
.admin-login-status-row { display: flex; align-items: center; gap: 8px; margin-bottom: 32px; }
.admin-login-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.admin-login-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 360px; }
.admin-login-stat-card { background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; padding: 16px; }
.admin-login-stat-label { font-size: 10px; color: rgba(255,255,255,0.3); margin: 0 0 6px; letter-spacing: 0.04em; }
.admin-login-stat-value { font-size: 26px; font-weight: 500; color: #fff; margin: 0; }
.admin-login-dates { margin-top: 24px; font-size: 12px; color: rgba(255,255,255,0.25); }

/* === Login Pareja === */
.body-pareja-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: #111827; border: 1px solid rgba(255,255,255,0.07); border-radius: 14px; padding: 36px 32px; width: 100%; max-width: 400px; }
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo h1 { font-size: 22px; font-weight: 500; color: #fff; margin: 0 0 4px; }
.login-logo p { font-size: 12px; color: rgba(255,255,255,0.3); margin: 0; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 11px; color: rgba(255,255,255,0.4); margin-bottom: 6px; letter-spacing: .05em; text-transform: uppercase; }
.error-msg { color: #f87171; font-size: 12px; margin-top: 4px; }
.btn-login { width: 100%; background: #14f195; color: #0c0c0c; border: none; border-radius: 8px; padding: 12px; font-size: 14px; font-weight: 500; cursor: pointer; margin-top: 8px; }
.btn-login:hover { background: #0fd584; }
.back-link { text-align: center; margin-top: 20px; font-size: 12px; color: rgba(255,255,255,0.3); }
.back-link a { color: rgba(255,255,255,0.5); text-decoration: none; }
.back-link a:hover { color: #fff; }
.alert-error-block { background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.2); border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; }
.alert-error-block p { color: #f87171; font-size: 12px; margin: 0; }
.alert-success { background: rgba(20,241,149,0.08); border: 1px solid rgba(20,241,149,0.2); color: #14f195; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 16px; }

/* === Pareja Panel === */
.section { background: #111827; border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 22px 24px; margin-bottom: 20px; }
.section-title { font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.3); letter-spacing: .07em; text-transform: uppercase; margin: 0 0 18px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.stat-row { display: flex; flex-wrap: wrap; gap: 20px; }
.stat { flex: 1; min-width: 120px; }
.stat-label { font-size: 10px; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.stat-value { font-size: 22px; font-weight: 500; color: #fff; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 11px; color: rgba(255,255,255,0.3); margin-top: 2px; }
.badge-nivel { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; padding: 4px 10px; border-radius: 6px; }
.nivel-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.chatbot-banner { background: rgba(20,241,149,0.06); border: 1px solid rgba(20,241,149,0.15); border-radius: 8px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.chatbot-inactive { background: rgba(255,193,7,0.06); border: 1px solid rgba(255,193,7,0.15); }
.chatbot-link { display: inline-flex; align-items: center; gap: 6px; background: #25d366; color: #fff; text-decoration: none; border-radius: 6px; padding: 6px 12px; font-size: 12px; font-weight: 500; }
.enc-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; padding: 14px 16px; }
.historial-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 13px; }
.historial-row:last-child { border-bottom: none; }
.gano { color: #14f195; }
.perdio { color: #f87171; }
.tok-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 12px; }
.tok-row:last-child { border-bottom: none; }
.tok-compra { color: #14f195; }
.tok-consumo { color: #f87171; }
.tok-boni { color: #60a5fa; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-label { display: block; font-size: 11px; color: rgba(255,255,255,0.4); margin-bottom: 5px; letter-spacing: .04em; text-transform: uppercase; }
.tel-display { font-size: 14px; color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 7px; padding: 9px 12px; display: block; }
.saldo-box { display: flex; align-items: center; gap: 20px; padding: 20px; background: rgba(255,255,255,0.025); border-radius: 8px; }
.saldo-box-right { margin-left: auto; }
.saldo-num { font-size: 48px; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1; }
.saldo-label { font-size: 13px; color: rgba(255,255,255,0.4); margin-top: 4px; }
.tok-buy-btn { display: inline-block; padding: 10px 20px; background: rgba(20,241,149,0.1); border: 1px solid rgba(20,241,149,0.25); color: #14f195; border-radius: 8px; font-size: 13px; font-weight: 500; text-decoration: none; }
.log-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 13px; }
.log-row:last-child { border-bottom: none; }
.log-tipo { font-size: 10px; padding: 2px 7px; border-radius: 4px; font-weight: 600; }
.tipo-compra { background: rgba(20,241,149,0.12); color: #14f195; }
.tipo-consumo { background: rgba(239,68,68,0.12); color: #f87171; }
.tipo-bonificacion { background: rgba(99,179,237,0.12); color: #63b3ed; }
.tipo-ajuste { background: rgba(251,191,36,0.12); color: #fbbf24; }
.log-cantidad { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; }
.log-motivo { flex: 1; color: rgba(255,255,255,0.5); font-size: 12px; }
.log-fecha { font-size: 11px; color: rgba(255,255,255,0.2); white-space: nowrap; }
.historial-back { color: rgba(255,255,255,0.4); text-decoration: none; font-size: 13px; }
.historial-heading { color: rgba(255,255,255,0.6); font-size: 15px; font-weight: 500; }
.historial-result-badge { font-size: 11px; font-weight: 700; min-width: 38px; }
.historial-rival { flex: 1; color: rgba(255,255,255,0.7); }
.historial-marcador { font-weight: 500; color: #fff; font-variant-numeric: tabular-nums; }
.historial-fecha-col { color: rgba(255,255,255,0.2); font-size: 11px; min-width: 70px; text-align: right; }
.historial-empty { font-size: 13px; color: rgba(255,255,255,0.3); margin: 0; }
.historial-pagination { margin-top: 16px; }
.tok-log-label { font-size: 11px; color: rgba(255,255,255,0.3); margin: 0 0 10px; text-transform: uppercase; letter-spacing: .05em; }
.tok-log-empty { font-size: 13px; color: rgba(255,255,255,0.2); margin: 0; text-align: center; padding: 20px 0; }
.tok-pagination { margin-top: 16px; }
.tok-back-link { font-size: 13px; color: rgba(255,255,255,0.3); text-decoration: none; }
.tok-tokens-big { font-size: 32px; font-weight: 500; font-variant-numeric: tabular-nums; }
.tok-saldo-label { font-size: 10px; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.tok-saldo-sub { font-size: 11px; color: rgba(255,255,255,0.3); }

/* === Pagos === */
.pago-wrap { min-height: 100vh; display: flex; flex-direction: column; }
.pago-nav { height: 54px; background: rgba(255,255,255,0.025); border-bottom: 1px solid rgba(255,255,255,0.06); display: flex; align-items: center; padding: 0 24px; gap: 12px; }
.pago-nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.pago-nav-logo img { height: 22px; filter: brightness(0) invert(1); opacity: .85; }
.pago-nav-slash { color: rgba(255,255,255,0.2); font-size: 12px; }
.pago-main { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; }
.pago-inner { width: 100%; max-width: 420px; }
.pago-title { font-size: 20px; font-weight: 500; margin: 0 0 6px; }
.pago-sub { font-size: 13px; color: rgba(255,255,255,0.35); margin: 0 0 28px; }
.pago-pareja-bar { padding: 12px 16px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; }
.pago-id-label { font-size: 12px; color: rgba(255,255,255,0.4); }
.pago-input-label { font-size: 10px; color: rgba(255,255,255,0.3); display: block; margin-bottom: 5px; letter-spacing: .05em; }
.pago-field { margin-bottom: 16px; }
.pago-hint { font-size: 10px; color: rgba(255,255,255,0.2); margin: 4px 0 0; }
.pago-note { font-size: 11px; color: rgba(255,255,255,0.2); text-align: center; margin-top: 16px; }
.pago-error-msg { font-size: 12px; color: #f87171; text-align: center; margin-top: 8px; }
.pago-result-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; }
.pago-result-card { background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 36px 32px; max-width: 400px; width: 100%; text-align: center; }
.pago-icon { font-size: 48px; margin-bottom: 16px; }
.pago-result-text { font-size: 13px; color: rgba(255,255,255,0.45); margin: 0 0 4px; }
.pago-result-hint { font-size: 12px; color: rgba(255,255,255,0.25); }
.pago-ref { font-size: 11px; color: rgba(255,255,255,0.15); margin-top: 12px; }
.btn-pago-green { display: inline-block; padding: 10px 24px; border-radius: 7px; text-decoration: none; font-size: 13px; margin-top: 20px; background: rgba(20,241,149,0.1); border: 1px solid rgba(20,241,149,0.25); color: #14f195; }
.btn-pago-ghost { display: inline-block; padding: 10px 24px; border-radius: 7px; text-decoration: none; font-size: 13px; margin-top: 20px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); color: rgba(255,255,255,0.6); }

/* === Esquema BD === */
#erd-canvas { width: 100%; overflow: auto; background: #0c0c0c; border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; padding: 32px 24px; cursor: grab; user-select: none; }
#erd-canvas:active { cursor: grabbing; }
#erd-svg { display: block; margin: 0 auto; }
.vista-btn.activo { background: rgba(20,241,149,0.12); color: #14f195; border-color: rgba(20,241,149,0.3); }
.tabla-schema { width: 100%; border-collapse: collapse; font-size: 12px; }
.tabla-schema th { background: rgba(255,255,255,0.05); color: #888; font-weight: 500; text-align: left; padding: 7px 12px; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.tabla-schema td { padding: 6px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); color: #ccc; }
.tabla-schema tr:last-child td { border-bottom: none; }
.badge-pk { background: rgba(20,241,149,0.15); color: #14f195; font-size: 10px; padding: 1px 7px; border-radius: 3px; font-weight: 700; }
.badge-fk { background: rgba(99,102,241,0.2); color: #a5b4fc; font-size: 10px; padding: 1px 7px; border-radius: 3px; font-weight: 700; }
.badge-uni { background: rgba(251,191,36,0.15); color: #fbbf24; font-size: 10px; padding: 1px 7px; border-radius: 3px; font-weight: 700; }
.table-card { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; padding: 16px 20px; margin-bottom: 16px; }
.table-card-title { font-size: 13px; font-weight: 500; color: #fff; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.07); }

/* === Doc page scoped styles (privacidad, eliminacion) === */
.doc-page-content p { color: rgba(255,255,255,0.6); margin-bottom: 12px; }
.doc-page-content section { margin-bottom: 44px; }
.doc-page-content h2 { font-size: 17px; font-weight: 500; color: #fff; margin-bottom: 14px; padding-left: 12px; border-left: 2px solid #14f195; }
.doc-page-content h3 { font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.7); margin: 18px 0 8px; text-transform: uppercase; letter-spacing: .04em; }
.doc-page-content ul { list-style: none; margin: 8px 0 16px; display: flex; flex-direction: column; gap: 6px; }
.doc-page-content ul li { color: rgba(255,255,255,0.55); padding-left: 18px; position: relative; }
.doc-page-content ul li::before { content: '·'; position: absolute; left: 4px; color: #14f195; font-size: 18px; line-height: 1.4; }
.doc-page-content strong { color: rgba(255,255,255,0.75); }
.doc-page-content a { color: #14f195; text-decoration: none; }
.doc-page-content a:hover { text-decoration: underline; }
.doc-page-content footer { border-top: 1px solid rgba(255,255,255,0.06); text-align: center; padding: 32px 24px; font-size: 12px; color: rgba(255,255,255,0.2); }
.doc-page-content footer a { color: rgba(255,255,255,0.3); }
.doc-page-content footer a:hover { color: rgba(255,255,255,0.6); }
.arco-item strong { display: block; color: #14f195; margin-bottom: 4px; }
.arco-item span { font-size: 12px; color: rgba(255,255,255,0.4); }
/* Eliminacion extras */
.eli-h1 { font-size: 28px; font-weight: 500; color: #fff; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 10px; }
.eli-subtitle { font-size: 15px; color: rgba(255,255,255,0.35); margin-bottom: 36px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.success-box { display: none; background: rgba(20,241,149,0.06); border: 1px solid rgba(20,241,149,0.2); border-radius: 10px; padding: 24px; text-align: center; margin-top: 20px; }
.success-box .icon { font-size: 36px; margin-bottom: 10px; }
.success-box h3 { color: #14f195; font-size: 16px; margin-bottom: 8px; }
.success-box p { font-size: 13px; color: rgba(255,255,255,0.45); margin: 0; }
.warning-note { background: rgba(251,191,36,0.05); border: 1px solid rgba(251,191,36,0.15); border-radius: 8px; padding: 14px 18px; margin-top: 20px; font-size: 13px; color: rgba(251,191,36,0.7); }
.info-row { display: flex; gap: 10px; }
.info-row .field { flex: 1; }
.btn-eliminar { width: 100%; padding: 12px; background: rgba(20,241,149,0.1); border: 1px solid rgba(20,241,149,0.3); color: #14f195; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; transition: background .15s; margin-top: 8px; }
.btn-eliminar:hover { background: rgba(20,241,149,0.18); }
.btn-eliminar:disabled { opacity: .5; cursor: not-allowed; }
.doc-page-content h2.eli-h2 { font-size: 16px; font-weight: 500; color: #fff; margin: 32px 0 12px; padding-left: 12px; border-left: 2px solid #14f195; }

/* === Responsive additions === */
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } .stat-row { gap: 12px; } }
@media (max-width: 520px) { .container-md { padding: 36px 16px 72px; } .arco-grid { grid-template-columns: 1fr; } .info-row { flex-direction: column; gap: 0; } }
