/* =============================================================
   PALPITÃO — Design System
   Estética: casa de apostas moderna, escura, acento verde-lima.
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg:        #0d0f0e;
  --surface:   #161a18;
  --surface-2: #1e2421;
  --line:      #2a322d;
  --txt:       #eef2ee;
  --txt-dim:   #8b958d;
  --lime:      #c6ff3a;
  --lime-dk:   #a9e021;
  --red:       #ff5a5a;
  --amber:     #ffb84d;
  --radius:    14px;
  --radius-sm: 9px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--txt);
  line-height: 1.5;
  min-height: 100vh;
  background-image:
    radial-gradient(900px 400px at 100% -10%, rgba(198,255,58,.06), transparent),
    radial-gradient(700px 350px at -10% 110%, rgba(198,255,58,.04), transparent);
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: 920px; margin: 0 auto; padding: 0 18px; }

/* ---------- Tipografia utilitária ---------- */
.cond {
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: .01em;
  line-height: 1;
}

/* ---------- Topo ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(13,15,14,.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 62px;
}
.brand {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800; font-size: 26px; letter-spacing: .02em;
  display: flex; align-items: center; gap: 9px;
}
.brand .dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 14px var(--lime);
}
.nav-link {
  font-size: 14px; color: var(--txt-dim); font-weight: 500;
  padding: 8px 12px; border-radius: 8px; transition: .15s;
}
.nav-link:hover { color: var(--txt); background: var(--surface-2); }

/* ---------- Hero ---------- */
.hero { padding: 46px 0 26px; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--lime);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 13px; margin-bottom: 18px;
}
.hero h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800; font-size: clamp(40px, 9vw, 74px);
  line-height: .94; text-transform: uppercase; letter-spacing: .005em;
}
.hero h1 .hl { color: var(--lime); }
.hero p {
  color: var(--txt-dim); font-size: 17px; max-width: 460px; margin-top: 16px;
}

/* ---------- Section heading ---------- */
.sec-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 38px 0 16px;
}
.sec-head h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700; font-size: 30px; text-transform: uppercase;
}
.sec-head .count { color: var(--txt-dim); font-size: 14px; }

/* ---------- Cards de jogo ---------- */
.games { display: grid; gap: 14px; }

.game {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .18s, transform .18s;
}
.game:hover { border-color: #394640; transform: translateY(-2px); }

.game-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px; border-bottom: 1px solid var(--line);
  font-size: 12.5px; color: var(--txt-dim);
}
.badge {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: 4px 9px; border-radius: 6px;
}
.badge.aberto    { background: rgba(198,255,58,.12); color: var(--lime); }
.badge.fechado   { background: rgba(255,184,77,.12);  color: var(--amber); }
.badge.finalizado{ background: rgba(139,149,141,.16); color: var(--txt-dim); }

.match {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 10px; padding: 20px 16px;
}
.team { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.team .escudo {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--line);
  display: grid; place-items: center;
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 20px;
  color: var(--lime);
  object-fit: cover;
}
.team .nome { font-weight: 600; font-size: 14.5px; }
.vs {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700;
  font-size: 22px; color: var(--txt-dim);
}
.score {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800;
  font-size: 30px; color: var(--lime);
}

.game-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.price { display: flex; flex-direction: column; }
.price .lbl { font-size: 11px; color: var(--txt-dim); text-transform: uppercase; letter-spacing: .08em; }
.price .val { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 24px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 14.5px; cursor: pointer;
  padding: 11px 18px; border-radius: 10px; border: 1px solid transparent;
  transition: .15s; white-space: nowrap;
}
.btn-primary { background: var(--lime); color: #11140f; }
.btn-primary:hover { background: var(--lime-dk); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--txt); }
.btn-ghost:hover { border-color: #3a463f; background: var(--surface-2); }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Painéis / formulários ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.panel h3 {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700;
  font-size: 22px; text-transform: uppercase; margin-bottom: 4px;
}
.panel .sub { color: var(--txt-dim); font-size: 14px; margin-bottom: 18px; }

.field { margin-bottom: 15px; }
.field label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--txt-dim); margin-bottom: 7px;
}
.input, select.input {
  width: 100%; background: var(--bg); color: var(--txt);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 13px; font-size: 15px; font-family: inherit;
  transition: border-color .15s;
}
.input:focus { outline: none; border-color: var(--lime); }
.input::placeholder { color: #5a635c; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Placar input (par de números grandes) */
.scoreboard {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px;
  align-items: center; margin: 4px 0 6px;
}
.score-input {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800;
  font-size: 46px; text-align: center; color: var(--lime);
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 8px 0; width: 100%;
}
.score-input:focus { outline: none; border-color: var(--lime); }
.score-x { font-family: 'Barlow Condensed', sans-serif; font-size: 30px; color: var(--txt-dim); }
.score-team { text-align: center; font-size: 13px; color: var(--txt-dim); font-weight: 600; margin-top: 6px; }

/* ---------- Tabela ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--txt-dim); font-weight: 700; padding: 13px 14px;
  background: var(--surface-2); border-bottom: 1px solid var(--line);
}
td { padding: 13px 14px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.015); }

.pill {
  font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .04em;
}
.pill.pago      { background: rgba(198,255,58,.14); color: var(--lime); }
.pill.pendente  { background: rgba(255,90,90,.14);  color: var(--red); }

/* ---------- Stat cards ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 16px;
}
.stat .lbl { font-size: 11.5px; color: var(--txt-dim); text-transform: uppercase; letter-spacing: .07em; }
.stat .num {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800;
  font-size: 32px; margin-top: 5px;
}
.stat .num.lime { color: var(--lime); }
.stat .num.amber { color: var(--amber); }

/* ---------- Pix box ---------- */
.pix-box {
  background: var(--surface-2); border: 1px dashed var(--line);
  border-radius: 12px; padding: 16px; margin-top: 14px;
}
.pix-box .key {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 9px;
  padding: 11px 13px; margin-top: 8px;
}
.pix-box .key code { font-size: 14px; word-break: break-all; color: var(--lime); }

/* ---------- Share row ---------- */
.share { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.share a {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; padding: 9px 14px;
  border: 1px solid var(--line); border-radius: 999px; color: var(--txt-dim);
  transition: .15s;
}
.share a:hover { color: var(--txt); border-color: #3a463f; background: var(--surface-2); }

/* ---------- Alerts ---------- */
.alert { padding: 13px 15px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }
.alert.ok  { background: rgba(198,255,58,.10); border: 1px solid rgba(198,255,58,.3); color: var(--lime); }
.alert.err { background: rgba(255,90,90,.10);  border: 1px solid rgba(255,90,90,.3);  color: var(--red); }

/* ---------- Empty ---------- */
.empty {
  text-align: center; padding: 50px 20px; color: var(--txt-dim);
  border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty .big { font-family: 'Barlow Condensed', sans-serif; font-size: 28px; color: var(--txt); margin-bottom: 6px; }

/* ---------- Footer ---------- */
.foot { text-align: center; color: var(--txt-dim); font-size: 13px; padding: 40px 0 30px; }
.foot a { color: var(--txt-dim); border-bottom: 1px solid var(--line); }

/* ---------- Card de jogo com vencedor ---------- */
.game-winner {
  border-color: rgba(198,255,58,.35);
  box-shadow: 0 0 0 1px rgba(198,255,58,.12) inset;
}
.game-winner .game-top { border-bottom-color: rgba(198,255,58,.18); }

/* ---------- Painel de vencedores (jogo.php) ---------- */
.winners-panel {
  border-color: rgba(198,255,58,.35);
  background: linear-gradient(135deg, rgba(198,255,58,.06) 0%, var(--surface) 60%);
}
.winners-panel h3 { color: var(--lime); }

.winners-list { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }

.winner-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 14px;
}
.winner-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(198,255,58,.14); border: 1px solid rgba(198,255,58,.3);
  display: grid; place-items: center;
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 17px;
  color: var(--lime); flex-shrink: 0;
}
.winner-info { display: flex; flex-direction: column; gap: 3px; }
.winner-nome { font-weight: 600; font-size: 15px; }
.winner-meta { font-size: 12px; color: var(--txt-dim); display: flex; align-items: center; gap: 6px; }

.winner-prize {
  margin-top: 4px; padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.winner-prize strong {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px; font-weight: 800; color: var(--lime); margin: 0 4px;
}

/* ---------- Linha vencedora na tabela ---------- */
.row-winner { background: rgba(198,255,58,.05); }
.row-winner td { border-bottom-color: rgba(198,255,58,.15); }
.badge-winner { font-size: 14px; }

/* ---------- Carrinho de palpites ---------- */
.cart {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-top: 14px;
}
.cart-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px;
  background: var(--surface-2); border-bottom: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--txt-dim);
}
.cart-total {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800; font-size: 18px; color: var(--lime);
}
.cart-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
}
.cart-item:last-child { border-bottom: none; }
.cart-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--line);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: var(--txt-dim); flex-shrink: 0;
}
.cart-placar {
  flex: 1; font-size: 22px; font-weight: 700; color: var(--lime); line-height: 1;
}
.cart-valor { color: var(--txt-dim); font-size: 13px; white-space: nowrap; }
.cart-remove {
  background: transparent; border: 1px solid var(--line);
  color: var(--txt-dim); padding: 4px 9px; border-radius: 6px;
  cursor: pointer; font-size: 12px; flex-shrink: 0; transition: .15s;
}
.cart-remove:hover { border-color: var(--red); color: var(--red); }

/* ---------- Date filter ---------- */
.datefilter { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.datefilter input {
  background: var(--bg); color: var(--txt); border: 1px solid var(--line);
  border-radius: 9px; padding: 9px 11px; font-family: inherit; font-size: 14px;
  color-scheme: dark;
}

/* ---------- Responsivo ---------- */

/* Tablet (≤ 768px) */
@media (max-width: 768px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .row2 { grid-template-columns: 1fr 1fr; }
}

/* Mobile (≤ 620px) */
@media (max-width: 620px) {

  /* --- Layout base --- */
  .wrap { padding: 0 14px; }

  /* --- Topbar: cresce para acomodar nav longa (admin) --- */
  .topbar .wrap {
    height: auto;
    min-height: 54px;
    flex-wrap: wrap;
    padding: 10px 0;
    row-gap: 4px;
  }
  .brand { font-size: 22px; }
  .nav-link { padding: 6px 8px; font-size: 13px; }

  /* --- Hero --- */
  .hero { padding: 28px 0 14px; }
  .hero p { font-size: 15px; }

  /* --- Section heading: empilha título e filtro de data --- */
  .sec-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin: 24px 0 14px;
  }
  .sec-head h2 { font-size: 24px; }

  /* --- Formulários: 2 colunas → 1 coluna --- */
  .row2 { grid-template-columns: 1fr; gap: 0; }

  /* --- Cards de jogo --- */
  .match { padding: 14px 12px; gap: 6px; }
  .team .escudo { width: 42px; height: 42px; font-size: 16px; }
  .team .nome { font-size: 13px; }

  /* Rodapé do card: empilha preço e botão */
  .game-foot { flex-direction: column; align-items: stretch; gap: 10px; }

  /* --- Botões: área de toque mínima de 44px --- */
  .btn { min-height: 44px; }

  /* --- Painéis --- */
  .panel { padding: 16px; }

  /* --- Placar (scoreboard) --- */
  .score-input { font-size: 38px; }

  /* --- Stat cards: 2×2 --- */
  .stats { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat { padding: 12px; }
  .stat .num { font-size: 26px; }

  /* --- Pix: empilha chave e botão copiar --- */
  .pix-box .key { flex-direction: column; align-items: flex-start; gap: 8px; }
  .pix-box .key .btn { align-self: stretch; }

  /* --- Links de compartilhamento --- */
  .share a { font-size: 12px; padding: 8px 11px; }

  /* --- Tabelas admin: scroll horizontal já tratado por .table-wrap --- */
  .table-wrap { border-radius: var(--radius-sm); }
  td, th { padding: 11px 10px; font-size: 13px; }
}

/* Telas muito pequenas (≤ 400px) */
@media (max-width: 400px) {
  .brand { font-size: 20px; }
  .nav-link { padding: 5px 6px; font-size: 12px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .score-input { font-size: 34px; }
  .match { gap: 4px; }
  .team .escudo { width: 38px; height: 38px; font-size: 14px; }
}
