:root {
  --bg: #0a0d0b;
  --surface: #111512;
  --surface-2: #171d18;
  --surface-3: #1f261f;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --volt: #c9f73a;
  --volt-dim: rgba(201, 247, 58, 0.12);
  --text: #eef3ea;
  --muted: #9aa79b;
  --muted-2: #6d786e;
  --danger: #ff6b6b;
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.font-display {
  font-family: "Archivo", sans-serif;
  font-stretch: 110%;
  letter-spacing: -0.01em;
}

.hidden { display: none !important; }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2); color: var(--text);
  padding: 10px 16px; border-radius: 10px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(0.98); }
.btn-volt {
  background: var(--volt); border-color: var(--volt); color: #101408;
}
.btn-volt:hover { background: #d8ff5c; }
.btn-danger {
  background: transparent; border-color: rgba(255,107,107,.4); color: var(--danger);
}
.btn-danger:hover { background: rgba(255,107,107,.08); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-ghost.active { background: var(--volt-dim); color: var(--volt); }
.slot-free { border-color: var(--volt); color: var(--volt); }
.slot-free:hover { background: var(--volt-dim); border-color: var(--volt); color: var(--volt); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid transparent; background: transparent;
  color: var(--muted); cursor: pointer; transition: all .12s ease;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn.danger:hover { color: var(--danger); background: rgba(255,107,107,.08); }

/* ---------- inputs ---------- */
.input, select.input, textarea.input {
  width: 100%; background: var(--surface); border: 1px solid var(--line-strong);
  color: var(--text); border-radius: 10px; padding: 10px 12px;
  font-size: 14px; font-family: inherit; outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.input:focus { border-color: var(--volt); box-shadow: 0 0 0 3px var(--volt-dim); }
.input::placeholder { color: var(--muted-2); }
label.lbl { display: block; font-size: 12px; font-weight: 600; color: var(--muted);
  margin: 0 0 6px; text-transform: uppercase; letter-spacing: .06em; }
select.input option { background: var(--surface-2); }

/* ---------- tarjetas ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
}
.stat-card { position: relative; overflow: hidden; }
.stat-card .num {
  font-family: "Archivo", sans-serif; font-stretch: 115%;
  font-size: 34px; font-weight: 800; line-height: 1; margin: 6px 0 2px;
}
.stat-card .lbl2 { font-size: 12px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .08em; font-weight: 600; }
.stat-card .ic {
  position: absolute; top: 14px; right: 14px; width: 38px; height: 38px;
  border-radius: 11px; display: flex; align-items: center; justify-content: center;
  background: var(--volt-dim); color: var(--volt);
}

/* ---------- tabla ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 860px; }
.tbl th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted-2); font-weight: 700; padding: 12px 14px;
  border-bottom: 1px solid var(--line); background: var(--surface-2);
  position: sticky; top: 0;
}
.tbl td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { cursor: pointer; transition: background .1s ease; }
.tbl tbody tr:hover { background: rgba(255,255,255,.025); }
.tbl tbody tr:last-child td { border-bottom: none; }
.club-name { font-weight: 700; }
.club-sub { font-size: 12px; color: var(--muted-2); }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line-strong); white-space: nowrap;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-prospecto { color: #b9c2b9; background: rgba(255,255,255,.04); }
.st-contactado { color: #7cc7ff; background: rgba(124,199,255,.08); }
.st-interesado { color: #ffcf6b; background: rgba(255,207,107,.08); }
.st-cliente { color: var(--volt); background: var(--volt-dim); }
.st-descartado { color: #ff9c9c; background: rgba(255,107,107,.08); }
.plat { color: var(--muted); background: rgba(255,255,255,.04); font-weight: 600; }

/* ---------- filtros ---------- */
.chip {
  border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--muted); font-size: 13px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  transition: all .12s ease; white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: var(--text); }
.chip.active { background: var(--volt); border-color: var(--volt); color: #101408; }

/* ---------- layout app ---------- */
#app-view { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px; flex-shrink: 0; background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  border-radius: 10px; color: var(--muted); font-size: 14px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent; margin-bottom: 4px;
  transition: all .12s ease; width: 100%; background: none; text-align: left;
  font-family: inherit;
}
.nav-item:hover { color: var(--text); background: var(--surface-2); }
.nav-item.active { color: var(--volt); background: var(--volt-dim); }
.nav-item.soon { opacity: .4; cursor: not-allowed; }
.nav-item .tag {
  margin-left: auto; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; background: var(--surface-3); padding: 3px 8px; border-radius: 6px;
}
.main { flex: 1; min-width: 0; padding: 28px 32px 60px; max-width: 1280px; }

/* ---------- drawer ---------- */
.drawer-back {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 40;
}
.drawer-back.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 94vw);
  background: var(--surface); border-left: 1px solid var(--line-strong);
  transform: translateX(100%); transition: transform .25s cubic-bezier(.2,.8,.2,1);
  z-index: 41; display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-body { overflow-y: auto; padding: 24px; flex: 1; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0;
  border-bottom: 1px dashed var(--line); font-size: 14px; }
.kv .k { color: var(--muted-2); font-weight: 600; font-size: 12px; text-transform: uppercase;
  letter-spacing: .05em; padding-top: 2px; }
.kv .v { text-align: right; font-weight: 600; }
.kv .v a { color: var(--volt); text-decoration: none; }

/* ---------- modal ---------- */
.modal-back {
  position: fixed; inset: 0; background: rgba(0,0,0,.65); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .18s ease; z-index: 50;
}
.modal-back.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 18px; width: min(560px, 100%); max-height: 90vh; overflow-y: auto;
  padding: 26px; transform: translateY(12px) scale(.98); transition: transform .18s ease;
}
.modal-back.open .modal { transform: none; }

/* ---------- toast ---------- */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--surface-3); border: 1px solid var(--line-strong); color: var(--text);
  padding: 12px 20px; border-radius: 12px; font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 60;
  display: flex; align-items: center; gap: 10px; max-width: 90vw;
}
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.ok { border-color: var(--volt); }
#toast.ok .t-ic { color: var(--volt); }
#toast.err { border-color: var(--danger); }
#toast.err .t-ic { color: var(--danger); }

/* ---------- login ---------- */
.login-brand {
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(201,247,58,.08), transparent 60%),
    linear-gradient(160deg, #0d120e 0%, #0a0d0b 70%);
  position: relative; overflow: hidden;
}
.court-lines {
  position: absolute; inset: 0; opacity: .5; pointer-events: none;
}

/* scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #2b342b; }

@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { padding: 18px 16px 60px; }
}

/* ---------------- vista pública ---------------- */
.pub-nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; background: rgba(10,13,11,.88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pub-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-size: 17px; }
.pub-logo { width: 36px; height: 36px; border-radius: 10px; background: var(--volt); color: #0a0d0b; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pub-links { display: flex; gap: 4px; }
.pub-links a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 10px; }
.pub-links a:hover { color: var(--text); background: var(--surface-2); }
.pub-links a.active { color: var(--volt); background: var(--volt-dim); }
.pub-wrap { max-width: 1120px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.pub-hero { padding: 72px 0 48px; background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(201,247,58,.08), transparent); }
.pub-kicker { font-size: 12px; letter-spacing: .18em; font-weight: 800; color: var(--volt); }
.pub-hero-title { font-size: clamp(40px, 7vw, 72px); font-weight: 800; line-height: 1.02; margin: 14px 0 16px; letter-spacing: -0.02em; }
.pub-hero-sub { font-size: 17px; color: var(--muted); max-width: 560px; margin: 0 0 28px; line-height: 1.6; }
.btn-lg { padding: 13px 26px !important; font-size: 15px !important; border-radius: 12px !important; }
.pub-stats { display: flex; gap: 36px; margin-top: 44px; flex-wrap: wrap; }
.pub-stats strong { display: block; font-size: 30px; font-weight: 800; color: var(--text); font-family: "Archivo", sans-serif; }
.pub-stats span { font-size: 13px; color: var(--muted); }
.pub-section { padding-top: 56px; padding-bottom: 56px; }
.pub-h2 { font-size: 28px; font-weight: 800; margin: 0 0 20px; letter-spacing: -0.01em; }
.pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.pub-benefit-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--volt-dim); color: var(--volt); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.pub-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.pub-cta { padding: 72px 24px; background: radial-gradient(ellipse 70% 80% at 50% 100%, rgba(201,247,58,.07), transparent); }
.pub-footer { border-top: 1px solid var(--line); padding-top: 24px; padding-bottom: 24px; margin-top: 24px; }
.pub-club-card { display: flex; gap: 14px; align-items: center; text-decoration: none; color: inherit; transition: transform .15s ease, border-color .15s ease; }
.pub-club-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.pub-club-logo { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; flex-shrink: 0; }
.pub-club-logo-ph { background: var(--surface-2); color: var(--muted-2); display: flex; align-items: center; justify-content: center; }
.pub-price { font-size: 13px; font-weight: 700; color: var(--volt); margin-top: 4px; }
.pub-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 20px; }
.pub-kpis .lbl2 { font-size: 11px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.pub-cta-card { border-radius: var(--radius); padding: 32px; text-align: center; background: linear-gradient(135deg, var(--volt-dim), transparent); border: 1px solid var(--line); }
@media (max-width: 640px) {
  .pub-links { display: none; }
  .pub-hero { padding: 48px 0 32px; }
  .pub-section { padding-top: 36px; padding-bottom: 36px; }
}

/* ---------- banner instalación PWA ---------- */
.pwa-banner { background: var(--volt); color: #101408; }
.pwa-banner-inner { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.pwa-banner-icon { width: 34px; height: 34px; border-radius: 10px; background: #101408; color: var(--volt); display: flex; align-items: center; justify-content: center; flex: none; }
.pwa-banner-text { flex: 1; margin: 0; font-size: 14px; line-height: 1.35; }
.pwa-install-btn { flex: none; background: #101408; color: var(--volt); border: none; border-radius: 10px; padding: 9px 16px; font-weight: 800; font-size: 14px; cursor: pointer; font-family: inherit; }
.pwa-install-btn:hover { opacity: .88; }
.pwa-banner-close { flex: none; background: none; border: none; color: #101408; font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 6px; opacity: .55; }
.pwa-banner-close:hover { opacity: 1; }
@media (max-width: 600px) {
  .pwa-banner-text { font-size: 13px; }
  .pwa-install-btn { padding: 8px 12px; font-size: 13px; }
}
