:root {
  --bg-main: #0b131e;
  --bg-card: #152233;
  --bg-card-hover: #1c2e44;
  --border-color: #273b53;
  --primary: #10b981;
  --primary-hover: #059669;
  --accent: #3b82f6;
  --accent-gold: #f59e0b;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --danger: #ef4444;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --field-bg: #14532d;
  --field-lines: rgba(255, 255, 255, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
}

header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  font-size: 2rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--primary);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.logo-text h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.logo-text span {
  font-size: 0.8rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.tabs-nav {
  display: flex;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.25rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.tab-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Painel de Controles */
.control-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.control-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.label-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.team-stepper {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.team-stepper button {
  background: transparent;
  border: none;
  color: var(--text-main);
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background 0.2s;
}

.team-stepper button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.team-stepper span {
  padding: 0.25rem 0.85rem;
  font-weight: 700;
  color: var(--accent);
  font-size: 1.1rem;
  min-width: 32px;
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: #2563eb;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-muted);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

/* Stat badges */
.stats-summary {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.stat-pill {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.85rem;
}

.stat-pill strong {
  color: var(--primary);
}

/* Layout de Duas Colunas para o Check-in */
.checkin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .checkin-grid {
    grid-template-columns: 1fr;
  }
}

.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.panel-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.9rem;
  margin-bottom: 0.85rem;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
}

.player-list-scroll {
  max-height: 520px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-right: 0.25rem;
}

/* Custom scrollbar */
.player-list-scroll::-webkit-scrollbar {
  width: 6px;
}
.player-list-scroll::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.player-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  transition: all 0.15s;
}

.player-item-row:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color);
}

.player-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pos-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.pos-tag.gk {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

.pos-tag.att {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.socio-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.socio-tag.socio {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.socio-tag.nao-socio {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.rating-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.rating-badge.craque {
  background: rgba(236, 72, 153, 0.2);
  color: #f472b6;
  border-color: rgba(236, 72, 153, 0.4);
}

.rating-badge.competitivo {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.4);
}

.rating-badge.comum {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.3);
}

.rating-slider-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.rating-slider {
  flex: 1;
  accent-color: var(--primary);
  cursor: pointer;
}

.rating-slider-val {
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 90px;
  text-align: right;
}

/* Resultado do Sorteio */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.team-card-header {
  background: linear-gradient(90deg, #1e293b 0%, #334155 100%);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.team-card-header h4 {
  font-size: 1.15rem;
  color: #fff;
  font-weight: 700;
}

.team-card.team-amarelo {
  border-color: #f59e0b;
}

.team-card.team-amarelo .team-card-header {
  background: linear-gradient(90deg, #78350f 0%, #b45309 100%);
  border-bottom: 2px solid #f59e0b;
}

.team-card.team-amarelo .team-badge {
  background: #f59e0b;
  color: #111827;
}

.team-card.team-azul {
  border-color: #3b82f6;
}

.team-card.team-azul .team-card-header {
  background: linear-gradient(90deg, #1e3a8a 0%, #1d4ed8 100%);
  border-bottom: 2px solid #3b82f6;
}

.team-card.team-azul .team-badge {
  background: #3b82f6;
  color: #fff;
}

/* Estado de Seleção para Troca Manual */
.field-player-node.selected-for-swap .player-avatar {
  border-color: #ef4444;
  box-shadow: 0 0 14px #ef4444;
  animation: pulse-swap 1s infinite alternate;
}

@keyframes pulse-swap {
  from { transform: scale(1); }
  to { transform: scale(1.25); }
}

.swap-instruction-box {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid #3b82f6;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
}

/* Tag Não Sócio */
.socio-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.socio-tag.socio {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.socio-tag.nao-socio {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Campinho Tático */
.soccer-field {
  background: #15803d;
  background-image: repeating-linear-gradient(
    0deg,
    #15803d,
    #15803d 30px,
    #16a34a 30px,
    #16a34a 60px
  );
  position: relative;
  height: 380px;
  margin: 1rem;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.field-center-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  border: 2px solid var(--field-lines);
  border-radius: 50%;
}

.field-center-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--field-lines);
}

.field-penalty-top {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 50px;
  border: 2px solid var(--field-lines);
  border-top: none;
}

.field-penalty-bottom {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 50px;
  border: 2px solid var(--field-lines);
  border-bottom: none;
}

/* Jogador no Campinho */
.field-player-node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s;
  z-index: 10;
}

.field-player-node:hover {
  transform: translate(-50%, -50%) scale(1.15);
}

.player-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1e293b;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.field-player-node.improviso .player-avatar {
  border-color: #fbbf24;
  background: #b45309;
}

.player-name-label {
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.68rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  margin-top: 2px;
  white-space: nowrap;
  max-width: 85px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

/* Lista de Reservas no Card */
.reserves-box {
  background: rgba(0, 0, 0, 0.25);
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
}

.reserves-box h5 {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

/* Lista de Espera */
.waiting-list-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.waiting-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.waiting-item {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
}

.waiting-item .queue-num {
  font-weight: 700;
  color: var(--accent-gold);
}

/* WhatsApp Box */
.whatsapp-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.whatsapp-modal.show {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  width: 90%;
  max-width: 600px;
  padding: 1.5rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.whatsapp-textarea {
  width: 100%;
  height: 280px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: #a7f3d0;
  font-family: monospace;
  font-size: 0.85rem;
  padding: 0.85rem;
  resize: vertical;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
  z-index: 200;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════
   ESTILOS EXCLUSIVOS DO TORNEIO (CLASSIFICAÇÃO, RODADAS, ARTILHARIA)
   ═══════════════════════════════════════════════════════════════ */
.tournament-hero {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(59, 130, 246, 0.15) 100%);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.tournament-hero h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
}

.tournament-hero p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* Tabela de Classificação */
.standings-table-container {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 0.9rem;
}

.standings-table th {
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-muted);
  padding: 0.85rem 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.standings-table td {
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.standings-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.standings-table .team-name-col {
  text-align: left;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.standings-pos {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
}

.standings-pos.g4 {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid #10b981;
}

.standings-pos.elim {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-muted);
}

/* Cards de Rodadas */
.round-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.round-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.round-header h4 {
  font-size: 1.1rem;
  color: var(--accent-gold);
  font-weight: 700;
}

.round-badge {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.3);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
}

.match-row {
  display: grid;
  grid-template-columns: 80px 1fr 100px 1fr 140px;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.match-time {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.match-team {
  font-weight: 600;
  font-size: 0.95rem;
}

.match-team.home {
  text-align: right;
}

.match-team.away {
  text-align: left;
}

.match-score-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  border: 1px solid var(--border-color);
}

.score-input {
  width: 44px;
  text-align: center;
  font-size: 1rem;
  font-weight: 800;
  padding: 0.25rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: #fff;
}

.bye-tag {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Match Event Details & Collapsible Match Box */
.match-card-wrapper {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: all 0.2s ease;
}

.match-card-wrapper:hover {
  border-color: rgba(56, 189, 248, 0.3);
}

.match-main-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  gap: 0.75rem;
  flex-wrap: wrap;
}

.match-main-bar:hover {
  background: rgba(255, 255, 255, 0.04);
}

.match-expand-btn {
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  cursor: pointer;
}

.match-events-drawer {
  padding: 1rem;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .match-events-drawer {
    grid-template-columns: 1fr;
  }
}

.match-team-events-col {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.75rem;
}

.match-team-events-header {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.4rem;
  margin-bottom: 0.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.player-event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  margin-bottom: 0.25rem;
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.85rem;
  gap: 0.5rem;
}

.player-event-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.event-stepper-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.event-counter-btn {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  line-height: 1;
}

.event-counter-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.event-badge-count {
  font-weight: 800;
  font-size: 0.85rem;
  min-width: 20px;
  text-align: center;
}

.event-badge-count.goal {
  color: #34d399;
}

.event-badge-count.yellow {
  color: #facc15;
}

.event-badge-count.red {
  color: #f87171;
}

/* Team Crest Badge - Dimensionado rigorosamente proporcional à altura da linha de texto */
.team-crest-img {
  width: 1.15em !important;
  height: 1.15em !important;
  max-width: 20px !important;
  max-height: 20px !important;
  object-fit: contain;
  vertical-align: middle;
  margin: 0 0.35rem;
  display: inline-block;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.team-crest-lg {
  width: 1.3em !important;
  height: 1.3em !important;
  max-width: 24px !important;
  max-height: 24px !important;
  object-fit: contain;
  vertical-align: middle;
  margin: 0 0.4rem;
  display: inline-block;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}

.match-team {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.match-team.home {
  justify-content: flex-end;
}

.match-team.away {
  justify-content: flex-start;
}

/* Tabela de Goleiro Menos Vazado */
.gk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.gk-table th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-weight: 600;
  text-align: center;
  padding: 0.6rem 0.75rem;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--border-color);
}

.gk-table td {
  padding: 0.65rem 0.75rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.gk-table tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.score-locked-badge {
  font-size: 0.75rem;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  display: inline-block;
  margin-top: 0.25rem;
}

.match-reset-btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.match-reset-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #f87171;
  color: #fff;
}

/* Atleta Inativo / Desabilitado */
.player-item-row.inactive {
  opacity: 0.5;
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.2);
}

.inactive-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* Scroll interno e controle de layout para inserção de gols e cartões */
.match-events-drawer {
  max-height: 520px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.match-team-events-col {
  min-height: auto;
}

/* Header e Navegação Responsiva (Mobile e Tablets) */
@media (max-width: 768px) {
  header.app-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.85rem !important;
    padding: 1rem !important;
  }

  .logo-container {
    justify-content: center !important;
    text-align: center !important;
  }

  .tabs-nav {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    width: 100% !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 0.35rem !important;
    gap: 0.35rem !important;
  }

  .tabs-nav::-webkit-scrollbar {
    display: none !important;
  }

  .tab-btn {
    flex: 1 0 auto !important;
    font-size: 0.8rem !important;
    padding: 0.45rem 0.75rem !important;
    white-space: nowrap !important;
    text-align: center !important;
  }

  /* Tabela de classificação em mobile: scroll suave e escudo em destaque */
  .standings-table-container {
    -webkit-overflow-scrolling: touch;
  }

  .standings-table th, .standings-table td {
    padding: 0.45rem 0.25rem;
    font-size: 0.78rem;
  }

  /* Diminui o número da posição para não ocupar espaço desnecessário no celular */
  .standings-pos {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    font-size: 0.7rem !important;
    border-radius: 4px !important;
  }

  /* Com a remoção da coluna Pos e o encurtamento de "Equipe" para "Time", o nome e o escudo cabem harmoniosamente */
  @media (max-width: 600px) {
    .team-name-text {
      display: inline-block !important;
      font-size: 0.76rem !important;
      max-width: 75px !important;
      overflow: hidden !important;
      text-overflow: ellipsis !important;
      white-space: nowrap !important;
    }
    .standings-table .team-name-col {
      padding: 0.35rem 0.2rem !important;
      gap: 0.3rem !important;
    }
    .standings-table .team-name-col .team-crest-img {
      width: 1.25em !important;
      height: 1.25em !important;
      max-width: 20px !important;
      max-height: 20px !important;
      margin: 0 !important;
    }
  }

  /* Confrontos no mobile: nomes dos times nítidos, flexível e sem estourar */
  .match-main-bar {
    padding: 0.55rem 0.65rem !important;
    gap: 0.4rem !important;
    flex-wrap: nowrap !important;
  }

  .match-team {
    font-size: 0.85rem !important;
    gap: 0.25rem !important;
  }

  .match-team-name {
    display: inline-block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 90px !important;
    font-weight: 600 !important;
  }

  .match-score-display {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.95rem !important;
    border-radius: 6px !important;
  }

  .match-expand-btn {
    padding: 0.2rem 0.45rem !important;
    font-size: 0.72rem !important;
  }

  /* No mobile, o drawer de eventos expande naturalmente com a página, eliminando o bug de scroll preso */
  .match-events-drawer {
    max-height: none !important;
    overflow: visible !important;
    padding: 0.6rem 0.25rem !important;
    gap: 0.75rem !important;
  }

  .match-team-events-col {
    max-height: none !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 0.5rem 0.25rem !important;
  }

  /* Layout compacto dos atletas no admin com scroll horizontal garantido */
  .player-event-row {
    flex-wrap: nowrap !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.35rem 0.3rem !important;
    gap: 0.35rem !important;
    min-width: 320px !important;
    box-sizing: border-box !important;
  }

  .player-event-name {
    flex: 1 1 auto !important;
    min-width: 90px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 0.78rem !important;
  }

  .event-controls-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    flex-shrink: 0 !important;
  }

  .event-stepper-group {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.15rem !important;
    background: rgba(0, 0, 0, 0.25);
    padding: 2px 4px;
    border-radius: 4px;
  }

  .event-counter-btn {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.85rem !important;
    padding: 0 !important;
  }

  .event-badge-count {
    font-size: 0.78rem !important;
    min-width: 18px !important;
  }
}
