/* ============ COMPONENTES: shell, nav, cards de jogo, placar ============ */

/* Shell */
.shell { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--sp-4) calc(var(--tabbar-h) + 24px); }
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h);
  margin: 0 calc(-1 * var(--sp-4)); padding: 0 var(--sp-4);
  background: var(--topbar-bg);
  backdrop-filter: blur(var(--blur));
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800;
  font-size: var(--fs-lg); letter-spacing: 0.02em; }
.brand svg { width: 28px; height: 28px; }
.brand .year { color: var(--text-2); font-weight: 600; font-size: var(--fs-sm); }

.topnav { display: none; gap: 4px; }
.topnav a {
  padding: 8px 14px; border-radius: var(--r-full);
  color: var(--text-1); font-weight: 600; font-size: var(--fs-sm);
  transition: background 0.2s, color 0.2s;
}
.topnav a:hover { background: var(--surface-2); color: var(--text-0); }
.topnav a.active { background: var(--grad-brand); color: var(--text-on-accent); }

.userchip { display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 4px 10px 4px 4px; border-radius: var(--r-full);
  border: 1px solid var(--border); background: var(--surface); }
.userchip:hover { border-color: var(--border-strong); }
.userchip .name { font-size: var(--fs-sm); font-weight: 600; max-width: 110px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Avatar */
.avatar {
  border-radius: 50%; overflow: hidden; flex: none;
  background: var(--grad-brand); color: var(--text-on-accent);
  display: grid; place-items: center; font-weight: 800;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Tab bar mobile */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-auto-flow: column;
  background: var(--tabbar-bg);
  backdrop-filter: blur(var(--blur));
  border-top: 1px solid var(--border);
}
.tabbar a {
  display: grid; justify-items: center; align-content: center; gap: 3px;
  color: var(--text-2); font-size: 0.62rem; font-weight: 700;
}
.tabbar a svg { width: 21px; height: 21px; }
.tabbar a.active { color: var(--green); }
.tabbar a.active svg { filter: drop-shadow(0 0 6px var(--tab-active-glow)); }

/* Página */
.page { padding-top: var(--sp-5); animation: fadeUp 0.3s var(--ease); }
.page-head { display: flex; align-items: end; justify-content: space-between;
  gap: var(--sp-3); margin-bottom: var(--sp-5); flex-wrap: wrap; }
.page-head h1 { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.01em; }
.page-head .sub { color: var(--text-2); font-size: var(--fs-sm); margin-top: 2px; }

/* Filtros (chips roláveis) */
.filterbar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px;
  margin-bottom: var(--sp-4); scrollbar-width: none; }
.filterbar::-webkit-scrollbar { display: none; }
.filterbar .chip { cursor: pointer; padding: 7px 14px; flex: none; }
.filterbar .chip.active { background: var(--grad-brand); color: var(--text-on-accent);
  border-color: transparent; }

/* Separador de dia */
.day-sep { display: flex; align-items: center; gap: var(--sp-3);
  margin: var(--sp-5) 0 var(--sp-3); color: var(--text-1);
  font-weight: 700; font-size: var(--fs-sm); text-transform: capitalize; }
.day-sep::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Card de jogo */
.match-card { padding: var(--sp-4); display: grid; gap: var(--sp-3); }
.match-meta { display: flex; justify-content: space-between; align-items: center;
  gap: 8px; flex-wrap: wrap; }
.match-meta .venue { color: var(--text-2); font-size: var(--fs-xs); }
.match-grid {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: var(--sp-3);
}
.team-side { display: flex; align-items: center; gap: 10px; min-width: 0; }
.team-side.right { flex-direction: row-reverse; text-align: right; }
.team-flag { font-size: 1.7rem; line-height: 1; flex: none; }
.flag-abbr { display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.8em; font-weight: 700; letter-spacing: 0.02em; flex: none; }
.team-name { font-weight: 700; font-size: var(--fs-md); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.team-tbd { color: var(--text-2); font-weight: 600; font-size: var(--fs-sm);
  border: 1px dashed var(--border-strong); border-radius: var(--r-sm);
  padding: 4px 8px; }
.score-box { display: grid; justify-items: center; gap: 2px; min-width: 86px; }
.score-line { display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: var(--fs-xl); font-weight: 800; }
.score-line .updated { animation: scorePop 0.6s var(--ease); }
.score-x { color: var(--text-2); font-size: var(--fs-md); }
.kick-time { font-family: var(--mono); font-weight: 700; font-size: var(--fs-lg); }

/* Área de aposta */
.bet-area { border-top: 1px dashed var(--border); padding-top: var(--sp-3);
  display: flex; align-items: center; justify-content: center; gap: var(--sp-3);
  flex-wrap: wrap; }
.bet-stepper { display: flex; align-items: center; gap: 6px; }
.bet-stepper button {
  width: 34px; height: 34px; border-radius: var(--r-sm);
  border: 1px solid var(--border-strong); background: var(--surface-2);
  color: var(--text-0); font-weight: 800; cursor: pointer; font-size: 1rem;
  transition: background 0.15s, transform 0.1s;
}
.bet-stepper button:hover { background: var(--hover); }
.bet-stepper button:active { transform: scale(0.92); }
.bet-value {
  width: 44px; height: 38px; text-align: center;
  font-family: var(--mono); font-size: var(--fs-lg); font-weight: 800;
  background: var(--input-bg); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text-0);
}
.bet-value:focus { outline: none; border-color: var(--green); }
.bet-locked { display: flex; align-items: center; gap: 8px; color: var(--text-2);
  font-size: var(--fs-sm); }
.points-pill { font-family: var(--mono); font-weight: 800; }

/* Countdown */
.countdown { font-family: var(--mono); color: var(--gold); font-size: var(--fs-xs);
  font-weight: 700; }
