/* ═══════════════════════════════════════════════════
   GRAND SLAM v2.0 — Design System
   Paleta: preto de quadra · verde elétrico · laranja
   Tipo: Barlow Condensed (títulos) + DM Sans (corpo)
═══════════════════════════════════════════════════ */

:root {
  /* Cores — Paleta azul premium (NextPoint/ATP) */
  --bg:         #0A1428;
  --bg2:        #0D1B32;
  --surface:    #12233F;
  --surface2:   #1A2E4F;
  /* "green" agora é o azul elétrico (cor de ação principal) */
  --green:      #4FA8FF;
  --green-dim:  rgba(79,168,255,.15);
  --green-line: rgba(79,168,255,.22);
  /* "orange" agora é o azul de destaque/CTA */
  --orange:     #2E7FE0;
  --orange2:    #4FA8FF;
  --orange-dim: rgba(79,168,255,.14);
  --ink:        #EAF2FB;
  --muted:      #6E86A8;
  --danger:     #FF5566;
  --danger-dim: rgba(255,85,102,.14);
  --gold:       #F0C05A;
  --lime:       #C8FF3D;
  --blue:       #4FA8FF;
  --blue-deep:  #2563AD;

  /* Tipografia */
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* Espaçamentos */
  --radius:  16px;
  --radius-s: 10px;
  --shadow:  0 8px 32px rgba(0,0,0,.5);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 15px; }
a { cursor: pointer; }
.hidden { display: none !important; }

/* ── APP SHELL ── */
#app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
}

/* ── TOPBAR ── */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10,15,10,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--green-line);
  padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}

.topbar-brand { display: flex; align-items: center; gap: 8px; }

.topbar-ball {
  width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #EAFF8F 0%, #C8FF3D 35%, #A8E000 70%, #7AA800 100%);
  box-shadow: 0 0 14px rgba(200,255,61,.5), inset -2px -3px 6px rgba(0,0,0,.25);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.topbar-ball::before, .topbar-ball::after {
  content: '';
  position: absolute;
  left: 2px; right: 2px;
  height: 1.5px;
  background: rgba(255,255,255,.85);
  border-radius: 50%;
}
.topbar-ball::before {
  top: 6px;
  transform: perspective(20px) rotateX(-30deg);
}
.topbar-ball::after {
  bottom: 6px;
  transform: perspective(20px) rotateX(30deg);
}

.topbar-name {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 900;
  letter-spacing: .04em;
  color: var(--ink);
}

.topbar-right { display: flex; align-items: center; gap: 6px; }

.ctx-chip {
  display: flex; align-items: center; gap: 5px;
  background: var(--surface2);
  border: 1px solid var(--green-line);
  border-radius: 20px;
  padding: 6px 11px;
  font-size: 13px; font-weight: 500;
  color: var(--ink);
  max-width: 140px;
}
.ctx-chip span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-arrow { font-size: 10px; opacity: .6; }

/* Saldo — placar de créditos */
.saldo-chip {
  display: flex; align-items: center; gap: 4px;
  background: var(--green-dim);
  border: 1px solid var(--green-line);
  border-radius: 20px;
  padding: 6px 11px;
  font-family: var(--font-display);
  font-size: 17px; font-weight: 700;
  color: var(--green);
  white-space: nowrap;
}
.saldo-ic { font-size: 13px; }

.icon-btn {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--surface2);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--muted); font-size: 16px;
  display: grid; place-items: center;
}
.icon-btn:active { background: var(--orange-dim); color: var(--orange); }

/* ── MAIN ── */
main {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 90px;
  scroll-behavior: smooth;
}

/* ── BOTTOM NAV ── */
.bottomnav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 560px;
  background: rgba(10,15,10,.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--green-line);
  display: flex; z-index: 40;
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
}

.nav-item {
  flex: 1; background: none; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 500; padding: 5px 2px; border-radius: 10px;
}
.nav-item .ni { font-size: 20px; }
.nav-item.active { color: var(--orange); }
.nav-item.active .ni { filter: drop-shadow(0 3px 6px rgba(255,107,0,.4)); }

/* ── VIEW ── */
.view { padding: 16px 16px 8px; animation: fadeUp .22s ease; }
@keyframes fadeUp { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }

.view-title {
  font-family: var(--font-display);
  font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 16px;
}

/* ── CARDS ── */
.card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.card-green {
  background: linear-gradient(135deg, var(--surface2), #0D1A0D);
  border-color: var(--green-line);
}

.card-orange {
  background: linear-gradient(135deg, rgba(255,107,0,.12), rgba(255,107,0,.04));
  border-color: rgba(255,107,0,.25);
}

.card-title {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 700;
  color: var(--ink); margin-bottom: 12px;
}

/* ── STAT GRID ── */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }

.stat-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius-s);
  padding: 14px;
  display: flex; align-items: center; gap: 10px;
}

.stat-ic {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 18px; flex-shrink: 0;
  background: var(--green-dim);
  border: 1px solid var(--green-line);
}

.stat-ic.orange { background: var(--orange-dim); border-color: rgba(255,107,0,.3); }

.stat-num {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 900; line-height: 1;
  color: var(--ink);
}
.stat-num.green  { color: var(--green); }
.stat-num.orange { color: var(--orange); }
.stat-lbl { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── RANKING ── */
.rank-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px; padding: 11px 13px;
  margin-bottom: 8px; position: relative; overflow: hidden;
}
.rank-row::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: rgba(255,255,255,.1);
}
.rank-row.p1 { border-color: rgba(255,107,0,.35); }
.rank-row.p1::before { background: linear-gradient(var(--orange2), var(--orange)); }
.rank-row.p2::before { background: #9FB0A6; }
.rank-row.p3::before { background: #B87333; }

.rank-pos {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 900; width: 28px; text-align: center;
  color: var(--muted); flex-shrink: 0;
}
.rank-row.p1 .rank-pos { color: var(--orange); }

.avatar {
  width: 46px; height: 46px; border-radius: 50%; object-fit: cover;
  background: var(--surface2); border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px rgba(255,255,255,.1);
  flex-shrink: 0; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--green);
}
.rank-row.p1 .avatar { box-shadow: 0 0 0 2px var(--orange); }
.avatar.lg { width: 80px; height: 80px; font-size: 28px; }

.rank-info { flex: 1; min-width: 0; }
.rank-nm { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.rank-score { text-align: right; }
.rank-pts { font-family: var(--font-display); font-size: 22px; font-weight: 900; color: var(--green); }
.rank-row.p1 .rank-pts { color: var(--orange); }
.rank-wl { font-size: 11px; color: var(--muted); }

/* ── SLOTS ── */
.slot-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius); padding: 14px; margin-bottom: 10px;
}

.slot-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.slot-info { flex: 1; min-width: 0; }
.slot-who { font-weight: 600; font-size: 14px; }
.slot-meta { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.6; }
.slot-tipo { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ── BUTTONS ── */
.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 14px 18px;
  background: linear-gradient(135deg, #5BAFFF, #2E7FE0);
  color: #fff; font-weight: 600; font-size: 15px;
  border-radius: var(--radius-s);
  box-shadow: 0 6px 20px rgba(46,127,224,.3);
  transition: filter .12s, transform .1s;
}
.btn-primary:active { transform: scale(.98); filter: brightness(.92); }
.btn-primary:hover  { filter: brightness(1.06); }

.btn-green {
  background: linear-gradient(135deg, #00E676, var(--green));
  box-shadow: 0 6px 20px rgba(0,200,83,.2);
  color: #000;
}

.btn-ghost {
  background: transparent;
  color: var(--ink); border: 1px solid rgba(255,255,255,.14);
  box-shadow: none;
}
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }

.btn-danger {
  background: linear-gradient(135deg, #FF6B6B, var(--danger));
  box-shadow: 0 6px 20px rgba(255,68,68,.2);
}

.btn-sm { width: auto; padding: 8px 14px; font-size: 13px; border-radius: 9px; }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row > * { flex: 1; min-width: 0; }

/* ── STATUS BADGE ── */
.badge {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 20px;
  white-space: nowrap;
}
.badge-green  { background: var(--green-dim);   color: var(--green); border: 1px solid var(--green-line); }
.badge-orange { background: var(--orange-dim);  color: var(--orange2); border: 1px solid rgba(255,107,0,.25); }
.badge-red    { background: var(--danger-dim);  color: var(--danger); border: 1px solid rgba(255,68,68,.2); }
.badge-muted  { background: rgba(107,140,111,.12); color: var(--muted); border: 1px solid rgba(107,140,111,.2); }
.badge-gold   { background: rgba(255,214,0,.12); color: var(--gold); border: 1px solid rgba(255,214,0,.25); }

/* ── ROW LIST ── */
.row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.05);
}
.row:last-child { border-bottom: none; }
.row .ri {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--green-dim); border: 1px solid var(--green-line);
  display: grid; place-items: center; font-size: 16px; flex-shrink: 0;
}
.row .ri.orange { background: var(--orange-dim); border-color: rgba(255,107,0,.25); }
.row .rg { flex: 1; min-width: 0; }
.row .rt { font-weight: 600; font-size: 14px; }
.row .rs { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── FORMS ── */
.field { margin-bottom: 12px; }
.field label {
  display: block; font-size: 12px; font-weight: 500;
  color: var(--muted); margin-bottom: 5px;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px;
  background: var(--surface2);
  border: 1.5px solid rgba(255,255,255,.1);
  border-radius: var(--radius-s);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(240,247,241,.25); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255,107,0,.12);
}
.field select {
  appearance: none;
  background-image: linear-gradient(45deg,transparent 50%,var(--muted) 50%),
                    linear-gradient(135deg,var(--muted) 50%,transparent 50%);
  background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.field textarea { min-height: 90px; resize: vertical; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* LGPD checkbox */
.lgpd-check {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 14px; cursor: pointer;
  font-size: 13px; color: var(--muted); line-height: 1.5;
}
.lgpd-check input { margin-top: 2px; accent-color: var(--orange); flex-shrink: 0; }
.lgpd-check a { color: var(--orange); text-decoration: none; }

/* ── SEÇÕES ── */
.sec-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 18px 0 10px;
}
.sec-head h3 { font-size: 15px; font-weight: 600; }
.sec-link { font-size: 13px; color: var(--orange); font-weight: 500; }

/* ── ABAS SEGMENTADAS ── */
.seg { display: flex; background: var(--surface2); border: 1px solid rgba(255,255,255,.07); border-radius: var(--radius-s); padding: 3px; margin-bottom: 12px; }
.seg-b { flex: 1; background: none; color: var(--muted); font-weight: 600; font-size: 13px; padding: 8px; border-radius: 8px; }
.seg-b.active { background: linear-gradient(135deg, var(--orange2), var(--orange)); color: #fff; box-shadow: 0 3px 10px rgba(255,107,0,.2); }

/* ── NEXT MATCH ── */
.next-match {
  background: linear-gradient(145deg, var(--surface2) 0%, #0D1A0D 100%);
  border: 1px solid var(--green-line);
  border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px;
  position: relative; overflow: hidden;
}
.next-match::before {
  content: ''; position: absolute; top: -30px; right: -20px;
  width: 100px; height: 100px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,107,0,.15), transparent 70%);
}
.next-match-lbl {
  font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--green); margin-bottom: 6px;
}
.next-match-vs {
  font-family: var(--font-display); font-size: 22px; font-weight: 900;
  color: var(--ink); margin-bottom: 6px;
}
.next-match-info { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 12px; }

/* ── CREDITOS TELA ── */
.saldo-hero {
  text-align: center; padding: 24px 16px 20px;
  background: linear-gradient(180deg, var(--surface2), var(--surface));
  border: 1px solid var(--green-line); border-radius: var(--radius);
  margin-bottom: 16px;
}
.saldo-hero-num {
  font-family: var(--font-display);
  font-size: 72px; font-weight: 900; line-height: 1;
  color: var(--green);
}
.saldo-hero-lbl { font-size: 13px; color: var(--muted); margin-top: 4px; }

.pacote-card {
  background: var(--surface);
  border: 1.5px solid rgba(255,255,255,.08);
  border-radius: var(--radius); padding: 16px;
  margin-bottom: 10px; cursor: pointer;
  transition: border-color .15s, transform .1s;
  position: relative; overflow: hidden;
}
.pacote-card:active { transform: scale(.99); }
.pacote-card.destaque { border-color: var(--orange); }
.pacote-destaque-tag {
  position: absolute; top: 10px; right: 12px;
  font-size: 10px; font-weight: 700;
  color: var(--orange); letter-spacing: .08em; text-transform: uppercase;
}
.pacote-cred { font-family: var(--font-display); font-size: 36px; font-weight: 900; color: var(--ink); }
.pacote-cred span { font-size: 16px; color: var(--muted); }
.pacote-nome { font-size: 13px; color: var(--muted); margin-top: 2px; }
.pacote-valor { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--green); margin-top: 8px; }

.tx-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.05);
}
.tx-row:last-child { border-bottom: none; }
.tx-desc { font-size: 13px; }
.tx-data { font-size: 11px; color: var(--muted); margin-top: 2px; }
.tx-val { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.tx-val.pos { color: var(--green); }
.tx-val.neg { color: var(--danger); }

/* ── PRO UPGRADE ── */
.pro-banner {
  background: linear-gradient(135deg, #1A0A2E, #0A0A1A);
  border: 1px solid rgba(130,80,255,.3);
  border-radius: var(--radius); padding: 18px; margin-bottom: 14px;
}
.pro-tag {
  display: inline-block;
  background: linear-gradient(135deg, #8250FF, #6030CC);
  color: #fff; font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 20px; margin-bottom: 8px;
}
.pro-title { font-family: var(--font-display); font-size: 22px; font-weight: 900; color: var(--ink); margin-bottom: 6px; }
.pro-features { font-size: 13px; color: var(--muted); line-height: 2; margin-bottom: 14px; }
.btn-pro {
  background: linear-gradient(135deg, #8250FF, #6030CC);
  box-shadow: 0 6px 20px rgba(130,80,255,.25);
}

/* ── LOGIN ── */
#loginScreen {
  min-height: 100dvh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px 20px;
  position: relative; overflow: hidden;
}

.login-bg {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(79,168,255,.20), transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 110%, rgba(37,99,173,.15), transparent 60%),
    var(--bg);
}

/* Linhas de quadra decorativas */
.login-bg::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,200,83,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,200,83,.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

.login-content {
  position: relative; z-index: 1;
  width: 100%; max-width: 420px;
}

.login-brand { text-align: center; margin-bottom: 28px; }

.login-ball {
  width: 78px; height: 78px; border-radius: 50%; margin: 0 auto 16px;
  background: radial-gradient(circle at 30% 25%, #EAFF8F 0%, #C8FF3D 30%, #A8E000 70%, #7AA800 100%);
  box-shadow:
    0 0 60px rgba(200,255,61,.30),
    0 20px 40px rgba(0,0,0,.5),
    inset -4px -6px 12px rgba(0,0,0,.2),
    inset 4px 6px 12px rgba(255,255,255,.2);
  position: relative;
  overflow: hidden;
}
/* Costuras clássicas de bola de tênis */
.login-ball::before {
  content: '';
  position: absolute;
  left: 12%; right: 12%;
  top: 30%;
  height: 5px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 3px rgba(0,0,0,.15);
  transform: perspective(60px) rotateX(-25deg);
}
.login-ball::after {
  content: '';
  position: absolute;
  left: 12%; right: 12%;
  bottom: 30%;
  height: 5px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 3px rgba(0,0,0,.15);
  transform: perspective(60px) rotateX(25deg);
}

.login-title {
  font-family: var(--font-display);
  font-size: 52px; font-weight: 900; line-height: .9;
  letter-spacing: -.01em; color: var(--ink);
}

.login-sub { font-size: 13px; color: var(--muted); margin-top: 8px; letter-spacing: .04em; }

.login-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px; padding: 22px 20px;
  box-shadow: var(--shadow);
}
.login-card .card-title { font-size: 20px; margin-bottom: 16px; font-family: var(--font-display); font-weight: 700; }
.card-desc { font-size: 13px; color: var(--muted); margin-bottom: 14px; line-height: 1.6; }

.login-links {
  text-align: center; margin-top: 14px;
  font-size: 13px; color: var(--muted);
  display: flex; justify-content: center; gap: 10px; flex-wrap: wrap;
}
.login-links a { color: var(--orange); font-weight: 500; text-decoration: none; }

/* ── MODAL / SHEET ── */
.overlay {
  position: fixed; inset: 0;
  background: rgba(5,8,5,.75);
  backdrop-filter: blur(5px);
  z-index: 60;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .18s ease;
}
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

.overlay.center { align-items: center; padding: 20px; }

.sheet {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.1);
  border-bottom: none;
  width: 100%; max-width: 560px;
  border-radius: 22px 22px 0 0;
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  max-height: 92dvh; overflow-y: auto;
  animation: slideUp .28s cubic-bezier(.2,.8,.2,1);
}
.overlay.center .sheet { border: 1px solid rgba(255,255,255,.1); border-radius: 20px; max-width: 400px; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }

.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.sheet-head h2 { font-size: 17px; font-weight: 600; }
.sheet-close {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--surface2); color: var(--muted);
  border: 1px solid rgba(255,255,255,.08);
  font-size: 15px; display: grid; place-items: center;
}

/* Aviso pop-up */
.notice { align-items: center; }
.notice .sheet {
  border: 1px solid rgba(255,107,0,.3);
  border-radius: 22px; max-width: 360px; margin: 0 16px;
  text-align: center;
  animation: pop .3s cubic-bezier(.2,.9,.3,1.2);
  box-shadow: 0 20px 60px rgba(255,107,0,.15);
}
@keyframes pop { from { transform: scale(.86); opacity:0; } to { transform: none; opacity:1; } }
.notice .notice-ic {
  width: 52px; height: 52px; border-radius: 50%;
  margin: 4px auto 14px;
  background: radial-gradient(circle at 35% 30%, var(--orange2), var(--orange));
  display: grid; place-items: center; font-size: 24px;
  box-shadow: 0 8px 24px rgba(255,107,0,.35);
}
.notice h2 { font-size: 18px; margin-bottom: 8px; }
.notice p { color: var(--muted); font-size: 14px; line-height: 1.7; margin-bottom: 18px; white-space: pre-wrap; }

/* ── TOAST ── */
#toast {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%);
  z-index: 80;
  background: var(--surface2); color: var(--ink);
  border: 1px solid rgba(255,255,255,.12);
  padding: 11px 18px; border-radius: 14px;
  font-size: 14px; box-shadow: var(--shadow);
  opacity: 0; transition: opacity .22s, transform .22s;
  pointer-events: none; max-width: 90%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
#toast.err  { border-color: var(--danger); color: #FFB3B3; }
#toast.ok   { border-color: var(--green);  color: #B3FFD1; }

/* ── LOADING ── */
.spin {
  width: 34px; height: 34px;
  border: 3px solid rgba(255,255,255,.1);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty {
  text-align: center; color: var(--muted);
  padding: 36px 16px; font-size: 14px; line-height: 1.7;
}
.empty .ee { font-size: 38px; display: block; margin-bottom: 10px; opacity: .5; }

/* ── CHAT ── */
.chat-msgs { flex: 1; overflow-y: auto; padding: 4px 0 10px; }
.chat-bubble-wrap { display: flex; margin-bottom: 8px; }
.chat-bubble-wrap.me { justify-content: flex-end; }
.chat-bubble {
  max-width: 78%; padding: 9px 13px;
  border-radius: 16px; font-size: 14px; line-height: 1.5;
}
.chat-bubble.me { background: linear-gradient(135deg, var(--orange2), var(--orange)); color: #fff; border-bottom-right-radius: 4px; }
.chat-bubble.you { background: var(--surface2); color: var(--ink); border-bottom-left-radius: 4px; }
.chat-sender { font-size: 11px; font-weight: 700; opacity: .7; margin-bottom: 3px; }
.chat-time { font-size: 10px; opacity: .55; margin-top: 3px; text-align: right; }
.chat-bar { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.07); flex-shrink: 0; }
.chat-input { flex: 1; background: var(--surface2); border: 1.5px solid rgba(255,255,255,.1); border-radius: 12px; padding: 10px 13px; color: var(--ink); font-size: 14px; }
.chat-send { width: 40px; height: 40px; background: linear-gradient(135deg, var(--orange2), var(--orange)); border-radius: 12px; display: grid; place-items: center; font-size: 16px; color: #fff; flex-shrink: 0; }

/* ── CONFIG TABLE ── */
.cfg-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.cfg-row:last-child { border-bottom: none; }
.cfg-label { flex: 1; font-size: 13px; color: var(--muted); }
.cfg-val { font-size: 13px; font-weight: 500; text-align: right; }

/* ── PLACAR INPUTS ── */
.placar-pair {
  display: grid; grid-template-columns: 1fr 40px 1fr;
  align-items: center; gap: 8px; margin-bottom: 10px;
}
.placar-pair input {
  text-align: center;
  font-family: var(--font-display); font-size: 26px; font-weight: 900;
  padding: 10px 4px; background: var(--surface2);
  border: 1.5px solid rgba(255,255,255,.1); border-radius: var(--radius-s);
  color: var(--ink);
}
.placar-pair input:focus { border-color: var(--orange); outline: none; box-shadow: 0 0 0 3px rgba(255,107,0,.12); }
.placar-vs { text-align: center; font-family: var(--font-display); font-size: 20px; font-weight: 900; color: var(--muted); }
.placar-label { font-size: 11px; text-align: center; color: var(--muted); margin-bottom: 4px; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

/* ── RESPONSIVE ── */
@media(min-width:561px) {
  #app, .bottomnav, .topbar { max-width: 560px; left: 50%; transform: translateX(-50%); position: fixed; }
  #app { right: auto; width: 560px; }
  .topbar { transform: none; left: 50%; margin-left: -280px; }
  main { margin-top: 58px; height: calc(100vh - 58px); }
}

/* ── REDUCED MOTION ── */
@media(prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ══════════════════════════════════════
   SCOREBOARD estilo profissional (NextPoint)
══════════════════════════════════════ */
.scoreboard {
  background: linear-gradient(135deg, #101d2e 0%, #0a1420 100%);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  overflow: hidden;
  margin: 10px 0;
}

.sb-row {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  gap: 10px;
}
.sb-row:first-child {
  border-bottom: 1px solid rgba(255,255,255,.07);
}

/* Linha do vencedor com leve destaque */
.sb-vencedor {
  background: linear-gradient(90deg, rgba(0,200,83,.08), transparent);
}

.sb-nome {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.sb-crown {
  color: var(--gold);
  font-size: 15px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(255,214,0,.4));
}
.sb-crown-space {
  width: 15px;
  flex-shrink: 0;
}
.sb-nome-txt {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sb-vencedor .sb-nome-txt {
  font-weight: 700;
}

.sb-sets {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.sb-cell {
  width: 34px;
  height: 40px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: rgba(240,247,241,.55);
  background: rgba(255,255,255,.03);
  border-radius: 8px;
}

/* Set vencido: número em destaque azul (como no card) */
.sb-cell.sb-win {
  color: #4FA8FF;
  background: rgba(79,168,255,.10);
}
/* No vencedor, os sets ganhos ficam ainda mais fortes */
.sb-vencedor .sb-cell.sb-win {
  color: #6FBAFF;
}

/* ══════════════════════════════════════
   AVATAR GERADO (fallback com iniciais)
══════════════════════════════════════ */
.avatar-gen {
  color: #fff;
  font-weight: 700;
  letter-spacing: .02em;
  text-shadow: 0 1px 3px rgba(0,0,0,.3);
}



/* ══════════════════════════════════════
   CARD DE CONFRONTO PREMIUM (NextPoint/ATP)
══════════════════════════════════════ */
.cf-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  margin: 12px 0;
  min-height: 220px;
  background: linear-gradient(180deg, #0f2444 0%, #0a1830 60%, #081222 100%);
  border: 1px solid rgba(79,168,255,.15);
  box-shadow: 0 12px 34px rgba(0,0,0,.5);
}

/* Fotos ocupando as duas metades */
.cf-fotos {
  position: absolute; inset: 0;
  display: flex;
}
.cf-foto {
  width: 50%;
  height: 100%;
  position: relative;
  overflow: hidden;
}
.cf-foto img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
.cf-left img  { object-position: 40% 20%; }
.cf-right img { object-position: 60% 20%; }

/* Máscara para escurecer a base e fundir com o painel */
.cf-foto::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(8,18,34,.4) 65%, rgba(8,18,34,.95) 100%);
}
/* Divisória diagonal de luz entre as fotos */
.cf-left::before {
  content: '';
  position: absolute; top: 0; right: -1px; bottom: 0; width: 2px;
  background: linear-gradient(180deg, transparent, rgba(79,168,255,.5), transparent);
  z-index: 2;
}

/* Avatar gerado (sem foto) ocupando a metade */
.cf-foto.cf-nofoto {
  background: linear-gradient(135deg, var(--g1, #2563AD), var(--g2, #12233F));
}
.cf-foto.cf-nofoto::before {
  content: attr(data-ini);
  position: absolute;
  top: 34%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 900;
  color: rgba(255,255,255,.92);
  text-shadow: 0 3px 12px rgba(0,0,0,.35);
  z-index: 1;
  letter-spacing: .02em;
}
/* Ícone de "sem foto" sutil abaixo das iniciais */
.cf-foto.cf-nofoto::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(8,18,34,.4) 65%, rgba(8,18,34,.95) 100%);
}

/* Badge VS central */
.cf-vs-badge {
  position: absolute;
  top: 38%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  font-family: var(--font-display);
  font-size: 20px; font-weight: 900;
  color: #fff;
  width: 48px; height: 48px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #5BAFFF, #2563AD);
  box-shadow: 0 4px 18px rgba(37,99,173,.6), 0 0 0 3px rgba(10,20,40,.8);
}

/* Tag do tipo de jogo (topo) */
.cf-tipo-tag {
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  font-size: 10px; font-weight: 700;
  letter-spacing: .12em;
  color: var(--blue);
  background: rgba(10,20,40,.8);
  border: 1px solid rgba(79,168,255,.3);
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Painel inferior (nomes + info) para jogo agendado */
.cf-panel {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 4;
  padding: 14px 14px 16px;
}
.cf-panel-names {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.cf-pn {
  flex: 1;
  font-family: var(--font-display);
  font-size: 17px; font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
}
.cf-pn-left  { text-align: left; }
.cf-pn-right { text-align: right; }
.cf-panel-meta {
  text-align: center;
  font-size: 12px;
  color: rgba(234,242,251,.8);
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
}

/* Painel de placar (jogo finalizado) */
.cf-card-fin { min-height: 240px; }
.cf-score-panel {
  position: absolute;
  left: 10px; right: 10px; bottom: 12px;
  z-index: 4;
  background: rgba(10,20,40,.82);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(79,168,255,.2);
  border-radius: 12px;
  overflow: hidden;
}
.cf-score-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
}
.cf-score-row:first-child {
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.cf-winner {
  background: linear-gradient(90deg, rgba(79,168,255,.14), transparent);
}
.cf-crown {
  width: 16px;
  color: var(--gold);
  font-size: 15px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(240,192,90,.5));
}
.cf-score-name {
  flex: 1;
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cf-winner .cf-score-name { font-weight: 700; }
.cf-score-sets {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.cf-set {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 700;
  color: rgba(234,242,251,.5);
  min-width: 20px;
  text-align: center;
}
.cf-set-win {
  color: var(--blue);
}
.cf-winner .cf-set-win {
  color: #7CC0FF;
}

/* Iniciais no card finalizado ficam mais acima (painel ocupa a base) */
.cf-card-fin .cf-foto.cf-nofoto::before {
  top: 26%;
  font-size: 46px;
}

/* Evita colisão das iniciais com o badge VS central */
.cf-left.cf-nofoto::before  { left: 42%; }
.cf-right.cf-nofoto::before { left: 58%; }
.cf-card-fin .cf-left.cf-nofoto::before  { left: 50%; }
.cf-card-fin .cf-right.cf-nofoto::before { left: 50%; }

/* ══════════════════════════════════════
   BADGE DE MENSAGENS NÃO LIDAS (chat)
══════════════════════════════════════ */
.chat-btn { position: relative; }
.chat-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-body);
  line-height: 1;
  vertical-align: middle;
  box-shadow: 0 0 0 2px rgba(255,255,255,.15);
  animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

/* ══════════════════════════════════════
   CHIPS DE FILTRO (tela Jogar)
══════════════════════════════════════ */
.filtro-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.filtro-chips::-webkit-scrollbar { height: 0; }
.filtro-chip {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 20px;
  background: var(--surface2);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all .15s;
}
.filtro-chip.ativo {
  background: linear-gradient(135deg, #5BAFFF, #2E7FE0);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

/* ══════════════════════════════════════
   TEMA CLARO (acessibilidade)
   Ativado por classe .tema-claro no body
══════════════════════════════════════ */
body.tema-claro {
  --bg:         #F0F4F9;
  --bg2:        #E6ECF3;
  --surface:    #FFFFFF;
  --surface2:   #EEF2F7;
  --ink:        #1A2A3A;
  --muted:      #5A6B7D;
  --green-dim:  rgba(46,127,224,.10);
  --green-line: rgba(46,127,224,.25);
  --orange-dim: rgba(46,127,224,.10);
}
body.tema-claro .card,
body.tema-claro .slot-card,
body.tema-claro .stat-card {
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  border-color: rgba(0,0,0,.08);
}
body.tema-claro .topbar,
body.tema-claro .bottomnav {
  background: rgba(255,255,255,.95);
  border-color: rgba(0,0,0,.08);
}
body.tema-claro .field input,
body.tema-claro .field select,
body.tema-claro .field textarea {
  border-color: rgba(0,0,0,.15);
}
body.tema-claro .login-card,
body.tema-claro .sheet {
  background: #FFFFFF;
  border-color: rgba(0,0,0,.1);
}

/* ══════════════════════════════════════
   FONTE GRANDE (acessibilidade)
   Ativada por classe .fonte-grande no body
══════════════════════════════════════ */
body.fonte-grande { font-size: 17px; }
body.fonte-grande .view-title { font-size: 13px; }
body.fonte-grande .card-title { font-size: 18px; }
body.fonte-grande .btn-primary { font-size: 17px; padding: 16px 18px; }
body.fonte-grande .nav-item { font-size: 11px; }
body.fonte-grande .field label { font-size: 14px; }
body.fonte-grande .field input,
body.fonte-grande .field select,
body.fonte-grande .field textarea { font-size: 17px; padding: 14px; }
body.fonte-grande .slot-meta,
body.fonte-grande .rs { font-size: 14px; }

/* ══════════════════════════════════════
   TOGGLE (interruptor de preferências)
══════════════════════════════════════ */
.toggle-btn {
  width: 48px; height: 28px;
  border-radius: 14px;
  background: var(--surface2);
  border: 1px solid rgba(255,255,255,.12);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s;
}
.toggle-btn.on {
  background: linear-gradient(135deg, #5BAFFF, #2E7FE0);
  border-color: transparent;
}
.toggle-dot {
  position: absolute;
  top: 2px; left: 2px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
  transition: transform .2s;
}
.toggle-btn.on .toggle-dot { transform: translateX(20px); }
body.tema-claro .toggle-btn { background: #D5DCE5; }

/* ══════════════════════════════════════
   SINO DE NOTIFICAÇÕES
══════════════════════════════════════ */
.sino-badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 2px var(--bg);
  animation: badgePulse 2s ease-in-out infinite;
}

/* ══════════════════════════════════════
   BOTÕES RÁPIDOS DO CHAT
══════════════════════════════════════ */
.chat-quick {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 0;
  -webkit-overflow-scrolling: touch;
}
.chat-quick::-webkit-scrollbar { height: 0; }
.chat-quick-btn {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 16px;
  background: var(--surface2);
  border: 1px solid var(--green-line);
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all .12s;
}
.chat-quick-btn:active { background: var(--green-dim); transform: scale(.96); }

/* ══════════════════════════════════════
   BRACKET (chaveamento em árvore)
══════════════════════════════════════ */
.bkt-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}
.bkt-scroll::-webkit-scrollbar { height: 6px; }
.bkt-scroll::-webkit-scrollbar-thumb { background: var(--green-line); border-radius: 3px; }
.bkt-grid {
  display: flex;
  gap: 20px;
  min-width: min-content;
  padding: 4px;
}
.bkt-col {
  display: flex;
  flex-direction: column;
  min-width: 150px;
}
.bkt-col-titulo {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue);
  text-align: center;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--green-line);
}
.bkt-col-matches {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 12px;
  flex: 1;
}
.bkt-match {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 8px;
  min-width: 140px;
  transition: border-color .15s;
}
.bkt-match.fin { border-color: var(--green-line); }
.bkt-match:active { border-color: var(--blue); }
.bkt-player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 6px;
  border-radius: 6px;
  font-size: 13px;
}
.bkt-player.win {
  background: var(--green-dim);
  font-weight: 700;
}
.bkt-player:first-child { margin-bottom: 3px; }
.bkt-nome {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 110px;
}
.bkt-crown { color: var(--gold); font-size: 12px; flex-shrink: 0; }
.bkt-placar {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  text-align: center;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.bkt-acao {
  font-size: 11px;
  color: var(--blue);
  text-align: center;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px dashed var(--green-line);
}

/* ══════════════════════════════════════
   PORTAL ACADEMIA — card de conflito
══════════════════════════════════════ */
.card-conflito {
  border-color: var(--danger) !important;
  background: linear-gradient(135deg, rgba(255,85,102,.08), transparent) !important;
}


/* ══════════════════════════════════════
   AVISO DE CONEXÃO (login) e CONTADOR NA NAVEGAÇÃO
══════════════════════════════════════ */
.login-aviso { background: rgba(255,85,102,.12); border: 1px solid rgba(255,85,102,.35); color: var(--ink); border-radius: 12px; padding: 12px 14px; font-size: 14px; margin: 0 0 12px; text-align: center; }
.nav-item { position: relative; }
.nav-badge { position: absolute; top: 4px; left: calc(50% + 8px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
