/* ═══════════════════════════════════════════════════════════════════════════
   Pasanaku — hoja de estilos (dark-first, con carácter)
   Verde lima Quimera sobre negro verdoso, tipografía display Space Grotesk.
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  --bg: #090b09;
  --bg-2: #0f120e;
  --bg-3: #161a14;
  --bg-4: #1d2219;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --txt: #e9eee4;
  --muted: #969e8e;
  --lime: #8fe000;
  --lime-2: #b6ff3a;
  --gold: #e7c873;
  --danger: #ff6b6b;
  --ok: #8fe000;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .7);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --display: 'Space Grotesk', 'Inter', sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--txt);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(1100px 600px at 85% -10%, rgba(143, 224, 0, .10), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(231, 200, 115, .05), transparent 55%);
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.08; letter-spacing: -.02em; }
.container { width: min(1140px, 92vw); margin: 0 auto; }
.muted { color: var(--muted); }
.lime { color: var(--lime); }
.gold { color: var(--gold); }
.mono { font-variant-numeric: tabular-nums; }
.center { text-align: center; }

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; backdrop-filter: blur(12px);
  background: linear-gradient(to bottom, rgba(9, 11, 9, .9), rgba(9, 11, 9, .55));
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.brand .dot { width: 12px; height: 12px; border-radius: 4px; background: var(--lime); box-shadow: 0 0 18px var(--lime); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* ── Botones ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-weight: 600; font-size: 14px;
  padding: 11px 18px; border-radius: 999px; border: 1px solid var(--line-2);
  background: transparent; color: var(--txt); cursor: pointer; transition: .15s ease;
  white-space: nowrap;
}
.btn:hover { border-color: var(--txt); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--lime); color: #0a0c07; border-color: var(--lime); box-shadow: 0 8px 30px -8px rgba(143, 224, 0, .6); }
.btn-primary:hover { background: var(--lime-2); border-color: var(--lime-2); }
.btn-ghost { background: var(--bg-3); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-danger { color: var(--danger); border-color: rgba(255, 107, 107, .3); }
.btn-danger:hover { border-color: var(--danger); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ── Landing ─────────────────────────────────────────────────────────────── */
.hero { padding: 72px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600;
  color: var(--lime); text-transform: uppercase; letter-spacing: .14em;
  padding: 6px 12px; border: 1px solid rgba(143, 224, 0, .25); border-radius: 999px; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(38px, 6vw, 62px); }
.hero h1 em { color: var(--lime); font-style: normal; }
.hero p.lead { font-size: 18px; color: var(--muted); margin: 20px 0 28px; max-width: 30em; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 13px; color: var(--muted); }

/* mockup planilla */
.mock {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px; padding: 18px;
  box-shadow: var(--shadow); transform: rotate(.4deg);
}
.mock-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mock-title { font-family: var(--display); font-weight: 600; }
.mock-pozo { font-size: 12px; color: var(--gold); border: 1px solid rgba(231, 200, 115, .25); padding: 4px 10px; border-radius: 999px; }
.mock-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.mock-row:first-of-type { border-top: none; }
.mdot { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; }
.mdot.ok { background: rgba(143, 224, 0, .16); color: var(--lime); }
.mdot.no { background: rgba(255, 255, 255, .05); color: var(--muted); }
.mdot.win { background: rgba(231, 200, 115, .16); color: var(--gold); }

/* secciones */
.section { padding: 64px 0; }
.section h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 12px; }
.section .sub { color: var(--muted); max-width: 40em; margin-bottom: 40px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step .n { font-family: var(--display); font-size: 13px; color: var(--lime); font-weight: 700; margin-bottom: 12px; }
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--muted); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feat .ic { font-size: 22px; margin-bottom: 12px; }
.feat h3 { font-size: 17px; margin-bottom: 6px; }
.feat p { font-size: 14px; color: var(--muted); }

/* precio */
.price-card { background: linear-gradient(160deg, var(--bg-3), var(--bg-2)); border: 1px solid var(--line-2); border-radius: 22px; padding: 40px; max-width: 560px; margin: 0 auto; text-align: center; }
.price-card .big { font-family: var(--display); font-size: 46px; }
.price-card .big small { font-size: 16px; color: var(--muted); font-family: var(--font); }
.price-list { list-style: none; text-align: left; max-width: 340px; margin: 24px auto; display: grid; gap: 10px; }
.price-list li { display: flex; gap: 10px; font-size: 15px; }
.price-list li::before { content: '✓'; color: var(--lime); font-weight: 700; }

.footer { border-top: 1px solid var(--line); padding: 36px 0; color: var(--muted); font-size: 14px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .66); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; z-index: 60; padding: 20px; }
.modal-bg.show { display: flex; }
.modal { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 20px; width: min(460px, 96vw); padding: 28px; box-shadow: var(--shadow); max-height: 92vh; overflow: auto; }
.modal.wide { width: min(680px, 96vw); }
.modal h3 { font-size: 22px; margin-bottom: 4px; }
.modal .msub { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.modal-x { float: right; background: none; border: none; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; }

/* ── Formularios ─────────────────────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.input, select.input, textarea.input {
  width: 100%; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  color: var(--txt); padding: 11px 13px; font-family: var(--font); font-size: 15px; transition: .15s;
}
.input:focus { outline: none; border-color: var(--lime); box-shadow: 0 0 0 3px rgba(143, 224, 0, .15); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-err { color: var(--danger); font-size: 13.5px; margin: 6px 0; min-height: 18px; }
.toggle-link { font-size: 14px; color: var(--muted); margin-top: 16px; text-align: center; }
.toggle-link a { color: var(--lime); cursor: pointer; }

/* ── App (panel) ─────────────────────────────────────────────────────────── */
.app-main { padding: 28px 0 80px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-size: 30px; }
.back-link { color: var(--muted); font-size: 14px; display: inline-flex; gap: 6px; align-items: center; margin-bottom: 10px; cursor: pointer; }
.back-link:hover { color: var(--txt); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; transition: .15s; }
.card.link { cursor: pointer; }
.card.link:hover { border-color: var(--line-2); transform: translateY(-2px); }
.card h3 { font-size: 19px; margin-bottom: 6px; }
.card .meta { color: var(--muted); font-size: 13.5px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }

.stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.stat { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 18px; min-width: 130px; }
.stat .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.stat .v { font-family: var(--display); font-size: 24px; margin-top: 2px; }
.stat .v.gold { color: var(--gold); }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty .big { font-size: 40px; margin-bottom: 12px; }

/* toolbar de acciones del pasanaku */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; }

/* chips de estado */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.chip-ok { background: rgba(143, 224, 0, .15); color: var(--lime); }
.chip-pend { background: rgba(255, 255, 255, .06); color: var(--muted); }
.chip-win { background: rgba(231, 200, 115, .15); color: var(--gold); }

/* planilla (matriz jugadores × rondas) */
.planilla-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
table.planilla { border-collapse: collapse; width: 100%; font-size: 14px; }
table.planilla th, table.planilla td { padding: 11px 12px; text-align: center; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); white-space: nowrap; }
table.planilla th { background: var(--bg-3); font-family: var(--display); font-weight: 600; font-size: 13px; position: sticky; top: 0; }
table.planilla td.jugador, table.planilla th.jugador { text-align: left; position: sticky; left: 0; background: var(--bg-3); z-index: 2; min-width: 160px; }
table.planilla tr th.jugador { z-index: 3; }
.ronda-h { display: flex; flex-direction: column; gap: 2px; }
.ronda-h .fecha { font-size: 11px; color: var(--muted); font-weight: 400; }
.ronda-h .benef { font-size: 11px; color: var(--gold); font-weight: 400; }
.cell {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; transition: .12s; position: relative;
}
.cell:hover { border-color: var(--lime); }
.cell.pagado { background: rgba(143, 224, 0, .18); border-color: rgba(143, 224, 0, .4); color: var(--lime); }
.cell.tiene-comp::after { content: ''; position: absolute; top: -3px; right: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); border: 1px solid var(--bg-2); }
.cell-actions { display: flex; gap: 4px; justify-content: center; margin-top: 4px; }
.mini { font-size: 11px; color: var(--muted); cursor: pointer; background: none; border: none; text-decoration: underline; }
.mini:hover { color: var(--lime); }

/* orden sorteado / jugadores list */
.jug-list { display: grid; gap: 8px; margin: 12px 0; }
.jug-item { display: flex; align-items: center; gap: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; }
.jug-num { width: 28px; height: 28px; border-radius: 8px; background: var(--bg-4); display: grid; place-items: center; font-family: var(--display); font-size: 14px; font-weight: 600; }
.jug-num.sorted { background: rgba(143, 224, 0, .16); color: var(--lime); }
.jug-name { flex: 1; font-weight: 500; }
.jug-tel { color: var(--muted); font-size: 13px; }
.jug-actions { display: flex; gap: 6px; }
.icon-btn { background: none; border: 1px solid var(--line-2); border-radius: 8px; width: 30px; height: 30px; cursor: pointer; color: var(--muted); display: grid; place-items: center; font-size: 14px; }
.icon-btn:hover { color: var(--txt); border-color: var(--txt); }

/* suscripción */
.sub-card { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 26px; max-width: 520px; }
.sub-badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px; margin-bottom: 14px; }
.sub-badge.demo { background: rgba(231, 200, 115, .15); color: var(--gold); }
.sub-badge.pendiente { background: rgba(143, 224, 0, .15); color: var(--lime); }
.sub-badge.activa { background: rgba(143, 224, 0, .2); color: var(--lime); }

/* toasts */
.toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--bg-4); border: 1px solid var(--line-2); border-radius: 999px; padding: 10px 20px; font-size: 14px; box-shadow: var(--shadow); animation: pop .2s ease; }
.toast.err { border-color: rgba(255, 107, 107, .4); color: #ffb3b3; }
.toast.ok { border-color: rgba(143, 224, 0, .4); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* loader */
.spin { width: 22px; height: 22px; border: 2.5px solid var(--line-2); border-top-color: var(--lime); border-radius: 50%; animation: rot .7s linear infinite; margin: 40px auto; }
@keyframes rot { to { transform: rotate(360deg); } }

/* responsive */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .features { grid-template-columns: 1fr; }
  .mock { transform: none; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 24px; }
}

/* impresión de la planilla */
@media print {
  .nav, .toolbar, .no-print, .footer { display: none !important; }
  body { background: #fff; color: #000; }
  .planilla-wrap { border: 1px solid #ccc; }
  table.planilla th { background: #f2f2f2; }
  .cell.pagado { background: #d8f5b0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
