/* ============================================================
   Bolão da Copa 2026 — Design System (tema claro)
   Estádio de dia: verde-gramado, dourado-troféu, fundo claro.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&family=Outfit:wght@300..700&display=swap');

:root {
  --bg:        #f4f7f5;   /* fundo geral claro */
  --bg-2:      #ffffff;   /* fundo de inputs / áreas internas */
  --card:      #ffffff;   /* cartões */
  --card-2:    #eef3f0;   /* cartões secundários / realces suaves */
  --line:      #dde6e1;   /* bordas */
  --line-2:    #c8d6cf;   /* bordas mais marcadas */
  --grass:     #178a4c;   /* verde principal (mais forte p/ contraste claro) */
  --grass-2:   #1f9e5a;   /* verde vivo */
  --grass-dim: #b9e3cb;   /* verde suave p/ fundos */
  --gold:      #b9821a;   /* dourado p/ TEXTO em fundo claro (legível) */
  --gold-2:    #e0a92b;   /* dourado vivo p/ destaques/preenchimentos */
  --ink:       #11201a;   /* texto principal escuro */
  --muted:     #5d6f67;   /* texto secundário */
  --muted-2:   #8a9a92;   /* texto bem suave */
  --red:       #d23631;
  --blue:      #2f6fe0;
  --radius:    16px;
  --radius-sm: 10px;
  --shadow:    0 12px 32px -18px rgba(20,50,35,.35);
  --maxw:      1080px;
  --display:   'Bricolage Grotesque', system-ui, sans-serif;
  --body:      'Outfit', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--body);
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(31,158,90,.10), transparent 60%),
    radial-gradient(900px 600px at -10% 10%, rgba(224,169,43,.08), transparent 55%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
/* faixas sutis de gramado no fundo */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: repeating-linear-gradient(90deg,
    rgba(23,138,76,.018) 0 60px, transparent 60px 120px);
}

a { color: var(--grass); text-decoration: none; }
a:hover { color: var(--gold); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.80));
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--display);
  font-weight: 700; font-size: 19px; letter-spacing: -.3px; color: var(--ink); }
.brand .ball { font-size: 22px; }
.brand b { color: var(--gold); }
.nav { display: flex; gap: 6px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a, .nav button.linkbtn {
  font: inherit; font-size: 14px; color: var(--muted); background: none; border: 0;
  padding: 8px 13px; border-radius: 99px; cursor: pointer; transition: .15s;
}
.nav a:hover, .nav button.linkbtn:hover { color: var(--ink); background: var(--card); }
.nav a.active { color: #ffffff; background: var(--grass-2); font-weight: 600; }

/* ---------- Cards / layout ---------- */
.grid { display: grid; gap: 16px; }
.card {
  background: linear-gradient(180deg, var(--card), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.card h2 { font-family: var(--display); margin: 0 0 4px; font-size: 20px; letter-spacing: -.4px; }
.card .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }
.section-title {
  font-family: var(--display); font-size: 26px; letter-spacing: -.6px; margin: 28px 0 14px;
  display: flex; align-items: center; gap: 12px;
}
.section-title::after { content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--line-2), transparent); }

/* ---------- Buttons ---------- */
.btn {
  font: inherit; font-weight: 600; font-size: 15px; cursor: pointer;
  border: 0; border-radius: 12px; padding: 12px 20px; transition: .15s;
  background: var(--card-2); color: var(--ink); border: 1px solid var(--line-2);
}
.btn:hover { border-color: var(--grass); transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(180deg, var(--grass-2), var(--grass));
  color: #ffffff; border: 0;
  box-shadow: 0 10px 26px -12px var(--grass);
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.gold { background: linear-gradient(180deg, var(--gold-2), #c9921f); color:#3a2a06; border:0; }
.btn.ghost { background: transparent; }
.btn.danger { background: transparent; color: var(--red); border-color: rgba(226,67,63,.4); }
.btn.danger:hover { background: rgba(226,67,63,.12); border-color: var(--red); }
.btn.sm { padding: 7px 13px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ---------- Forms ---------- */
label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px; font-weight: 500; }
input, select {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 11px;
  padding: 11px 13px; transition: .15s;
}
input:focus, select:focus { outline: 0; border-color: var(--grass-2);
  box-shadow: 0 0 0 3px rgba(41,196,110,.16); }
.field { margin-bottom: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 0; }

/* ---------- Badges / chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 99px; background: var(--card-2); border: 1px solid var(--line-2); }
.badge.green { color: var(--grass-2); border-color: var(--grass-dim); background: rgba(31,158,90,.12); }
.badge.gold  { color: var(--gold); border-color: rgba(243,201,105,.3); background: rgba(243,201,105,.1); }
.badge.red   { color: var(--red); border-color: rgba(226,67,63,.3); background: rgba(226,67,63,.1); }
.badge.gray  { color: var(--muted); }
.pill-stage { font-size:11px; text-transform: uppercase; letter-spacing: .8px; color: var(--gold);
  font-weight: 700; }

/* ---------- Match row ---------- */
.match {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 13px;
  padding: 14px 16px; margin-bottom: 10px;
}
.match .team { display: flex; align-items: center; gap: 9px; min-width: 0; }
.match .team.away { flex-direction: row-reverse; text-align: right; }
.match .flag { font-size: 26px; line-height: 1; }
.flag-img { border-radius: 3px; box-shadow: 0 1px 3px rgba(0,0,0,.18); object-fit: cover;
  vertical-align: middle; display: inline-block; }
.flag-ph { font-size: 22px; opacity: .55; }
.match .flag-img { width: 42px; height: 28px; }
.match .tname { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match .center { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 130px; }
.match .score-inputs { display: flex; align-items: center; gap: 7px; }
.match .score-inputs input { width: 46px; text-align: center; font-weight: 700; font-size: 17px; padding: 8px 4px; }
.match .vs { color: var(--muted-2); font-weight: 700; }
.match .meta { font-size: 11.5px; color: var(--muted); text-align: center; }
.match .result-final { font-family: var(--display); font-weight: 700; font-size: 20px; }
.match .pts { font-size: 12px; font-weight: 700; }
.match.scored { border-color: var(--grass-dim); }
.match .lock-note { font-size: 11px; color: var(--muted-2); }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 600; }
tbody tr:hover { background: var(--card); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.rank-1 td { background: rgba(243,201,105,.07); }
.rank-1 .pos { color: var(--gold); }
.rank-2 .pos { color: #cfd8d3; }
.rank-3 .pos { color: #d8954e; }
.pos { font-family: var(--display); font-weight: 700; }

/* ---------- Prize cards ---------- */
.prizes { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.prize {
  text-align: center; padding: 20px 14px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line);
}
.prize .medal { font-size: 30px; }
.prize .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .8px; margin: 6px 0 4px; }
.prize .amt { font-family: var(--display); font-weight: 700; font-size: 24px; }
.prize.p1 { border-color: rgba(243,201,105,.35); background: linear-gradient(180deg, rgba(243,201,105,.08), var(--card)); }
.prize.p1 .amt { color: var(--gold); }

/* ---------- Misc ---------- */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--card-2); border: 1px solid var(--line-2); color: var(--ink);
  padding: 13px 20px; border-radius: 12px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: .25s; z-index: 200; font-weight: 500; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { border-color: var(--grass); }
.toast.err { border-color: var(--red); }
.muted { color: var(--muted); }
.center-screen { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 30px 18px; }
.auth-card { width: 100%; max-width: 410px; }
.divider { height:1px; background: var(--line); margin: 18px 0; }
.hidden { display: none !important; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 12px; }
.kpi { background: var(--card); border:1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.kpi .k { font-family: var(--display); font-weight:700; font-size: 26px; }
.kpi .l { color: var(--muted); font-size: 12px; }
.tabs { display:flex; gap:6px; flex-wrap: wrap; margin-bottom: 16px; }
.tab { padding: 9px 15px; border-radius: 99px; background: var(--card); border:1px solid var(--line);
  cursor:pointer; font-size:13.5px; color: var(--muted); font-weight: 600; transition:.15s; }
.tab.active { background: var(--grass-2); color: #ffffff; border-color: var(--grass-2); }
.tab:hover:not(.active){ color: var(--ink); }
.player-pick { display:flex; gap:10px; flex-wrap: wrap; }
.player-chip { padding: 8px 13px; border-radius: 99px; background: var(--card); border:1px solid var(--line-2);
  cursor:pointer; font-size: 13.5px; transition:.15s; }
.player-chip.selected { background: rgba(243,201,105,.14); border-color: var(--gold); color: var(--gold); font-weight:600; }
.empty { text-align:center; color: var(--muted); padding: 40px 20px; }
.deadline-bar { display:flex; align-items:center; gap:10px; padding: 11px 15px; border-radius: 12px;
  background: var(--card); border:1px solid var(--line); margin-bottom: 14px; font-size: 14px; }
.deadline-bar.open { border-color: var(--grass-dim); }
.deadline-bar.closed { border-color: rgba(226,67,63,.35); }

@media (max-width: 720px) {
  .prizes { grid-template-columns: 1fr; }
  .match { grid-template-columns: 1fr auto 1fr; padding: 12px; gap: 6px; }
  .match .tname { font-size: 13px; }
  .match .flag { font-size: 22px; }
  .topbar .wrap { height: auto; padding: 10px 18px; flex-wrap: wrap; }
  .nav { width:100%; }
}
