/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ── */
body {
  background: #0d1117;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Container ── */
.container { max-width: 480px; margin: 0 auto; padding: 20px 14px 90px; }

/* ── Login ── */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-card { background: #161b22; border-radius: 16px; padding: 32px 24px; width: 100%; max-width: 360px; }
.login-logo { font-size: 24px; font-weight: 800; text-align: center; color: #f5c518; margin-bottom: 4px; letter-spacing: -.3px; }
.login-sub { font-size: 12px; text-align: center; color: #8b949e; margin-bottom: 28px; letter-spacing: .5px; text-transform: uppercase; }
.login-card label { display: block; font-size: 12px; color: #8b949e; margin-bottom: 4px; margin-top: 16px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.login-card input { width: 100%; background: #0d1117; border: 1px solid #30363d; border-radius: 8px; padding: 12px 14px; color: #fff; font-size: 15px; outline: none; transition: border-color 0.15s; }
.login-card input:focus { border-color: #00a550; }
.login-card button { width: 100%; background: #00a550; color: #fff; border: none; border-radius: 8px; padding: 13px; font-size: 15px; font-weight: 700; margin-top: 24px; cursor: pointer; letter-spacing: 0.3px; }
.login-card button:active { opacity: 0.85; }
.alert-error { background: #2d1b1b; border: 1px solid #f85149; color: #f85149; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 4px; }

/* ── Page title ── */
.page-title { font-size: 20px; font-weight: 700; color: #f5c518; margin-bottom: 20px; }
.bolao-brand { text-align: center; margin-bottom: 8px; }
.bolao-brand-name { font-size: 26px; font-weight: 800; color: #f5c518; letter-spacing: -.4px; line-height: 1.1; }
.bolao-brand-sub { font-size: 11px; color: #8b949e; text-transform: uppercase; letter-spacing: .8px; margin-top: 2px; }

/* ── Today section ── */
.today-section { margin-bottom: 28px; }
.today-label { font-size: 11px; color: #8b949e; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; font-weight: 700; }

/* ── Game card ── */
.jogo-card {
  background: #161b22;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border-left: 3px solid transparent;
  transition: border-color 0.2s;
}
.jogo-card.palpite-feito { border-left-color: #00a550; }
.jogo-card.bloqueado { opacity: 0.65; }

.jogo-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 11px; }
.status-badge { font-weight: 700; font-size: 11px; }
.status-aberto  { color: #00a550; }
.status-alerta  { color: #f5c518; }
.status-bloqueado { color: #f85149; }
.status-encerrado { color: #8b949e; }
.palpite-badge { background: #00a550; color: #fff; border-radius: 4px; padding: 1px 6px; font-weight: 700; font-size: 10px; }

.jogo-teams { display: flex; align-items: center; justify-content: space-between; }
.team { text-align: center; flex: 1; }
.team-flag { font-size: 32px; line-height: 1.2; }
.team-name { font-size: 13px; font-weight: 700; margin-top: 4px; }
.team-divider { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 0 0 28px; }
.team-divider .divider-line { width: 1px; height: 18px; background: #30363d; }
.team-divider .vs-text { font-size: 9px; color: #8b949e; font-weight: 700; }

/* ── Bet counter area ── */
.bet-area { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 14px; background: #0d1117; border-radius: 10px; padding: 10px 16px; }
.counter { display: flex; align-items: center; gap: 10px; }
.btn-counter { background: transparent; color: #00a550; border: 2px solid #00a550; border-radius: 6px; width: 32px; height: 32px; font-size: 20px; cursor: pointer; font-weight: 700; display: flex; align-items: center; justify-content: center; line-height: 1; user-select: none; -webkit-tap-highlight-color: transparent; }
.btn-counter:active { background: #00a550; color: #fff; }
.counter-num { font-size: 24px; font-weight: 700; min-width: 30px; text-align: center; }
.bet-sep { color: #8b949e; font-size: 18px; font-weight: 700; }
.btn-save { display: block; width: 100%; background: #00a550; color: #fff; border: none; border-radius: 8px; padding: 10px; font-size: 14px; font-weight: 700; margin-top: 10px; cursor: pointer; letter-spacing: 0.3px; }
.btn-save:active { opacity: 0.85; }

/* ── Palpite feito (editable) ── */
.palpite-display { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.palpite-score { display: flex; align-items: center; gap: 6px; }
.score-num { font-size: 28px; font-weight: 700; color: #f5c518; }
.score-dash { color: #8b949e; font-size: 18px; }
.palpite-label { font-size: 11px; color: #8b949e; margin-top: 2px; }
.btn-edit { background: transparent; color: #8b949e; border: 1px solid #30363d; border-radius: 6px; padding: 6px 14px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.btn-edit:hover { border-color: #8b949e; color: #fff; }

/* ── Resultado encerrado ── */
.resultado-display { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.resultado-score { display: flex; align-items: center; gap: 8px; font-size: 26px; font-weight: 700; }
.pts-badge { border-radius: 6px; padding: 5px 12px; font-size: 13px; font-weight: 700; }
.pts-2 { background: #f5c518; color: #0d1117; }
.pts-1 { background: #00a550; color: #fff; }
.pts-0 { background: #21262d; color: #8b949e; }
.encerrado-my-palpite { font-size: 11px; color: #8b949e; margin-top: 6px; }

/* ── Group accordion ── */
.group-accordion { margin-bottom: 4px; }
.group-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 4px; cursor: pointer; user-select: none; }
.group-header h3 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #f5c518; }
.group-header .chevron { color: #8b949e; font-size: 10px; transition: transform 0.2s; display: inline-block; }
.group-header.open .chevron { transform: rotate(180deg); }
.group-body { display: none; padding-bottom: 8px; }
.group-body.open { display: block; }

/* ── Bottom navbar ── */
.nav-bottom { position: fixed; bottom: 0; left: 0; right: 0; background: #161b22; border-top: 1px solid #21262d; display: flex; z-index: 100; }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 8px 4px 10px; font-size: 10px; color: #8b949e; text-decoration: none; gap: 3px; font-weight: 600; -webkit-tap-highlight-color: transparent; }
.nav-item.active { color: #00a550; }
.nav-item .icon { font-size: 20px; line-height: 1; }

/* ── Toast ── */
.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background: #00a550; color: #fff; border-radius: 8px; padding: 10px 22px; font-size: 14px; font-weight: 700; z-index: 400; opacity: 0; transition: opacity 0.2s; pointer-events: none; white-space: nowrap; box-shadow: 0 4px 16px rgba(0,165,80,0.4); }
.toast.show { opacity: 1; }

/* ── Modal ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.75); display: none; align-items: flex-end; justify-content: center; z-index: 300; }
.modal-overlay.open { display: flex; }
.modal { background: #161b22; border-radius: 20px 20px 0 0; padding: 28px 24px 32px; width: 100%; max-width: 480px; }
.modal h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.modal .modal-sub { font-size: 13px; color: #8b949e; margin-bottom: 20px; }
.modal .btn-save { margin-top: 18px; }
.btn-cancel { display: block; width: 100%; background: transparent; color: #8b949e; border: none; padding: 12px; font-size: 14px; margin-top: 6px; cursor: pointer; }

/* ── Ranking ── */
.rank-card { background: #161b22; border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; display: flex; align-items: center; gap: 12px; border-left: 3px solid transparent; }
.rank-card.rank-1 { border-left-color: #ffd700; }
.rank-card.rank-2 { border-left-color: #c0c0c0; }
.rank-card.rank-3 { border-left-color: #cd7f32; }
.rank-pos { font-size: 22px; width: 32px; text-align: center; flex-shrink: 0; }
.rank-pos-num { font-size: 14px; font-weight: 700; color: #8b949e; }
.rank-info { flex: 1; min-width: 0; }
.rank-name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-stats { font-size: 11px; color: #8b949e; margin-top: 3px; }
.rank-pts-num { font-size: 24px; font-weight: 700; color: #f5c518; text-align: right; }
.rank-pts-label { font-size: 10px; color: #8b949e; text-align: right; }

/* ── Audit filter bar ── */
.audit-filter-bar {
  display: flex; gap: 6px; overflow-x: auto; padding: 0 0 12px;
  scrollbar-width: none; position: sticky; top: 0; background: #0d1117;
  z-index: 10; margin: 0 -16px; padding: 10px 16px 10px;
  border-bottom: 1px solid #21262d;
}
.audit-filter-bar::-webkit-scrollbar { display: none; }
.audit-chip {
  flex-shrink: 0; background: #161b22; color: #8b949e;
  border: 1px solid #30363d; border-radius: 20px;
  padding: 5px 12px; font-size: 11px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: all .15s;
  position: relative;
}
.audit-chip:hover { border-color: #8b949e; color: #c9d1d9; }
.audit-chip.active { background: #00a550; color: #fff; border-color: #00a550; }
.audit-chip-hoje { border-color: rgba(0,165,80,0.4); color: #00a550; }
.audit-chip-hoje.active { background: #00a550; color: #fff; }
.chip-hoje-dot {
  display: inline-block; width: 5px; height: 5px;
  background: #00a550; border-radius: 50%;
  vertical-align: middle; margin-left: 4px;
}
.audit-chip.active .chip-hoje-dot { background: #fff; }

/* ── Audit table ── */
.audit-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 4px; }
.audit-table { border-collapse: collapse; font-size: 12px; min-width: 100%; }
.audit-table th { color: #8b949e; font-weight: 600; padding: 6px 10px; text-align: center; border-bottom: 1px solid #21262d; white-space: nowrap; position: sticky; top: 0; background: #0d1117; }
.audit-table th.col-jogo { text-align: left; min-width: 140px; }
.audit-table td { padding: 7px 10px; text-align: center; border-bottom: 1px solid #161b22; white-space: nowrap; }
.audit-table td.col-jogo { text-align: left; color: #8b949e; font-size: 11px; }
.audit-group-row td { background: #0d1117; color: #f5c518; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; padding: 8px 10px 4px; }
.audit-date-row td { background: #161b22; color: #c9d1d9; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; padding: 9px 10px 7px; border-top: 2px solid #21262d; border-bottom: 1px solid #21262d; }
.audit-date-hoje td { background: rgba(0,165,80,0.08); color: #00a550; border-top: 2px solid rgba(0,165,80,0.35); }
.audit-hoje-badge { display: inline-block; background: #00a550; color: #fff; font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 20px; margin-left: 7px; vertical-align: middle; text-transform: none; letter-spacing: 0; }
.audit-hora { font-size: 10px; color: #f5c518; font-weight: 700; margin-right: 4px; }
.audit-fase-tag { display: inline-block; font-size: 9px; color: #8b949e; background: #21262d; border-radius: 3px; padding: 1px 5px; vertical-align: middle; }
.audit-resultado { color: #f5c518; font-weight: 700; }
.cell-exato { background: rgba(245,197,24,0.15); color: #f5c518; font-weight: 700; border-radius: 4px; padding: 2px 6px; }
.cell-certo { background: rgba(0,165,80,0.12); color: #00a550; font-weight: 600; border-radius: 4px; padding: 2px 6px; }
.cell-errou { background: rgba(248,81,73,0.08); color: #f85149; border-radius: 4px; padding: 2px 6px; }
.cell-sem { color: #30363d; }

/* ── Admin ── */
.admin-section { margin-bottom: 28px; }
.admin-section-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 4px; cursor: pointer; border-bottom: 1px solid #21262d; margin-bottom: 12px; }
.admin-section-title { font-size: 15px; font-weight: 700; color: #f5c518; }
.admin-body { display: none; }
.admin-body.open { display: block; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { color: #8b949e; font-weight: 600; padding: 6px 8px; text-align: left; border-bottom: 1px solid #21262d; white-space: nowrap; }
.admin-table td { padding: 8px; border-bottom: 1px solid #161b22; vertical-align: middle; }
.result-inputs { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; }
.result-input { width: 46px; background: #0d1117; border: 1px solid #30363d; border-radius: 6px; padding: 7px; color: #fff; text-align: center; font-size: 15px; font-weight: 700; outline: none; }
.result-input:focus { border-color: #00a550; }
.btn-sm { background: #00a550; color: #fff; border: none; border-radius: 6px; padding: 7px 12px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.btn-sm-danger { background: #f85149; }
.btn-sm-secondary { background: #21262d; }
.admin-form { background: #161b22; border-radius: 10px; padding: 16px; margin-top: 12px; }
.admin-form h4 { font-size: 13px; font-weight: 700; color: #8b949e; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-field { margin-bottom: 12px; }
.form-field label { display: block; font-size: 11px; color: #8b949e; margin-bottom: 4px; font-weight: 600; text-transform: uppercase; }
.form-field input[type="text"],
.form-field input[type="password"] { width: 100%; background: #0d1117; border: 1px solid #30363d; border-radius: 8px; padding: 10px 12px; color: #fff; font-size: 14px; outline: none; }
.form-field input:focus { border-color: #00a550; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.admin-form .btn-save { width: auto; padding: 10px 24px; margin-top: 4px; }
.alert-success { background: rgba(0,165,80,0.15); border: 1px solid #00a550; color: #00a550; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 12px; }
