:root { --bs-success: #1a7f3c; }
body { background: #f4f6f9; }
.theme-inverted body {
	filter: invert(1) hue-rotate(180deg);
	background: #0b0906;
}
.theme-inverted img,
.theme-inverted video,
.theme-inverted iframe,
.theme-inverted svg {
	filter: invert(1) hue-rotate(180deg);
}
.theme-toggle {
	width: 2.1rem;
	height: 2.1rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}
.card-stat { border-left: 5px solid #198754; }
.card-stat .card-title { font-size: .85rem; text-transform: uppercase; color: #6c757d; }
.card-stat .display-6 { font-size: 2rem; font-weight: 700; }

/* Seletor de idiomas */
.language-button {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	border-color: rgba(255,255,255,.75);
	box-shadow: 0 .15rem .35rem rgba(0,0,0,.12);
}
.language-badge,
.language-option-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.1rem;
	height: 1.55rem;
	border-radius: .35rem;
	background: #e8f5ee;
	color: #0b6b34;
	font-size: .72rem;
	font-weight: 800;
	letter-spacing: 0;
}
.language-menu {
	min-width: 18rem;
	padding: .45rem;
}
.language-option {
	display: flex;
	align-items: center;
	gap: .65rem;
	border-radius: .45rem;
	padding: .5rem .6rem;
}
.language-option.active {
	background: #198754;
	color: #fff;
}
.language-option.active .language-option-badge {
	background: #fff;
	color: #198754;
}
.language-option-label {
	font-weight: 600;
}

/* Status badges */
.badge-aberto { background-color: #198754; }
.badge-enviado { background-color: #0d6efd; }
.badge-sem-palpite { background-color: #ffc107; color: #212529; }
.badge-bloqueado { background-color: #6c757d; }
.badge-resultado { background-color: #6f42c1; }
.badge-pontuado { background-color: #0f5132; }
.badge-andamento { background-color: #fd7e14; }

/* Tabelas */
.table-jogos td, .table-jogos th { vertical-align: middle; font-size: .875rem; }

.group-predictions {
  border: 1px solid #d8e2dc;
  border-radius: 6px;
  background: #f8fbf9;
  padding: .45rem .6rem;
}

.group-predictions summary {
  cursor: pointer;
  color: #166534;
  font-weight: 700;
  list-style-position: inside;
}

.group-predictions-row > td {
  background: #f5f8f6;
  padding: .55rem .75rem;
}
.nav-tabs .nav-link.tab-destaque {
	border-color: #198754 #198754 #fff;
	color: #0b6b34;
	font-weight: 800;
	background: #f2fbf5;
}
.nav-tabs .nav-link.tab-destaque.active {
	background: #198754;
	border-color: #198754;
	color: #fff;
}
.nav-tabs .nav-link.tab-discreto {
	opacity: .68;
	font-size: .92rem;
}
.nav-tabs .nav-link.tab-discreto.active {
	opacity: 1;
}

/* Chaveamento */
.bracket-board {
	position: relative;
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(330px, 380px);
	column-gap: 3.1rem;
	row-gap: 0;
	overflow-x: auto;
	overflow-y: visible;
	padding: 1.35rem 1rem 1.6rem;
	background: #eef0f3;
	border: 1px solid #dde1e6;
	border-radius: .55rem;
	color: #111;
}
.bracket-connectors {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	overflow: visible;
}
.bracket-round-title {
	position: relative;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.15rem;
	margin: 0 auto 1.25rem;
	padding: .45rem 1.1rem;
	border-radius: 999px;
	background: #d4d7db;
	box-shadow: 0 .25rem .55rem rgba(20, 28, 38, .2);
	color: #111827;
	font-size: .82rem;
	font-weight: 800;
	text-align: center;
	white-space: nowrap;
}
.bracket-matches {
	display: grid;
	align-content: start;
	gap: 1rem;
	min-height: auto;
	padding-top: .2rem;
	position: relative;
}
.bracket-round.is-visible-2 .bracket-matches {
	gap: 3.05rem;
	padding-top: 3.25rem;
}
.bracket-round.is-visible-3 .bracket-matches {
	gap: 6.9rem;
	padding-top: 6.9rem;
}
.bracket-match {
	position: relative;
	z-index: 2;
	min-height: 96px;
	padding: .7rem .85rem .55rem;
	background: #fff;
	border: 1px solid #d9dde3;
	border-radius: .35rem;
	box-shadow: 0 .18rem .45rem rgba(15, 23, 42, .12);
}
.prediction-bracket.is-dynamic .bracket-matches {
	display: block;
}
.prediction-bracket.is-dynamic .bracket-match {
	position: absolute;
	left: 0;
	right: 0;
	transition: top .18s ease;
}
.bracket-match::after {
	display: none;
}
.bracket-match::before {
	display: none;
}
.bracket-round:last-child .bracket-match::after {
	display: none;
}
.bracket-round:last-child .bracket-match::before {
	display: none;
}
.bracket-round.is-visible-3 .bracket-match::after,
.bracket-round.is-visible-3 .bracket-match::before {
	display: none;
}
.bracket-match-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: .5rem;
	min-height: 18px;
	margin-bottom: .45rem;
	color: #6b7280;
	font-size: .72rem;
	font-weight: 700;
	white-space: nowrap;
}
.bracket-match-meta strong {
	order: 2;
	margin-left: auto;
	color: #6b7280;
	font-size: .72rem;
	font-weight: 600;
}
.bracket-team {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .5rem;
	min-height: 28px;
	padding: .15rem 0;
	background: transparent;
	border-radius: 0;
	border-bottom: 0;
	color: #111827;
	font-size: .95rem;
	font-weight: 800;
	line-height: 1.05;
	min-width: 0;
}
.bracket-team::before {
	content: "";
	flex: 0 0 .9rem;
	width: .9rem;
	height: .9rem;
	border: 1px solid #9aa3af;
	border-radius: .22rem;
	background: linear-gradient(135deg, #fff 0%, #e5e7eb 100%);
	box-shadow: inset 0 0 0 2px #f8fafc;
}
.bracket-team + .bracket-team {
	margin-top: .1rem;
}
.bracket-team small {
	margin-left: auto;
	color: #6b7280;
	font-size: .66rem;
	font-weight: 700;
}
.bracket-result {
	position: absolute;
	right: .85rem;
	bottom: .45rem;
	background: transparent;
	color: #111827;
	font-size: .72rem;
	font-weight: 700;
	padding: 0;
}
.bracket-winner {
	margin-top: .45rem;
	padding-top: .45rem;
	border-top: 1px solid #edf0f4;
	color: #374151;
	font-size: .78rem;
	font-weight: 700;
	line-height: 1.2;
}
.bracket-round:last-child .bracket-winner {
	color: #111;
	font-size: .84rem;
	font-weight: 800;
	text-align: left;
}
@media (max-width: 767.98px) {
	.bracket-board {
		grid-auto-columns: minmax(330px, 86vw);
		column-gap: 2rem;
		padding: 1rem .75rem 1.25rem;
	}
}

.prediction-bracket {
	margin-bottom: 1rem;
	max-height: none;
	overflow-x: auto;
	overflow-y: visible;
	-webkit-overflow-scrolling: touch;
}
.prediction-bracket .bracket-round-title {
	display: none;
}
.prediction-bracket .bracket-round.has-open-group-predictions {
	position: relative;
	z-index: 1000;
}
.playoff-phase-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: .6rem;
	margin-bottom: .85rem;
}
.playoff-phase-tab {
	border: 0;
	border-radius: 999px;
	background: #d4d7db;
	box-shadow: 0 .2rem .45rem rgba(20, 28, 38, .18);
	color: #111827;
	font-size: .84rem;
	font-weight: 800;
	padding: .55rem 1rem;
	white-space: nowrap;
}
.playoff-phase-tab.active {
	background: #fff;
	box-shadow: 0 .2rem .45rem rgba(20, 28, 38, .12), inset 0 0 0 1px #d9dde3;
}
.prediction-match {
	min-height: 162px;
	width: 100%;
}
.prediction-match:has(.group-predictions[open]),
.prediction-match.has-open-group-predictions {
	z-index: 1000;
}
.prediction-match::before {
	display: none;
}
.prediction-match-empty {
	border-left: 4px solid #ffc107;
}
.prediction-match-locked {
	background: #f8f9fa;
	color: #6c757d;
}
.prediction-teams {
	display: grid;
	grid-template-columns: 1fr;
	align-items: stretch;
	gap: .2rem;
}
.prediction-team-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 4.4rem;
	align-items: center;
	gap: .65rem;
	min-width: 0;
}
.prediction-team-row .bracket-team {
	min-width: 0;
}
.prediction-team-row .bracket-team span {
	overflow: visible;
	text-overflow: clip;
	white-space: normal;
	word-break: normal;
}
.prediction-score-divider {
	width: 4.4rem;
	justify-self: end;
	text-align: center;
	font-weight: 800;
	line-height: 1;
}
.prediction-goal {
	text-align: center;
	font-weight: 800;
}
.prediction-goal-readonly {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2rem;
	font-weight: 800;
}
.prediction-qualified {
	margin-top: .65rem;
}
.prediction-qualified .form-label {
	color: #6b7280;
	font-weight: 700;
}
.prediction-result-official {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: .2rem .6rem;
	margin-top: .55rem;
	padding: .45rem .55rem;
	border: 1px solid #d8e2dc;
	border-radius: .45rem;
	background: #f3f8f5;
	color: #374151;
	font-size: .78rem;
	line-height: 1.15;
}
.prediction-result-official span {
	color: #6b7280;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .02em;
}
.prediction-result-official strong {
	color: #111827;
	font-size: .9rem;
	white-space: nowrap;
}
.prediction-result-official small {
	grid-column: 1 / -1;
	color: #4b5563;
	font-weight: 700;
}
.prediction-match-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .5rem;
	margin-top: .65rem;
	padding-top: .55rem;
	border-top: 1px solid #edf0f4;
}
.prediction-match-footer .text-muted {
	min-width: 0;
	line-height: 1.25;
}
.prediction-match-footer .badge {
	flex: 0 0 auto;
	white-space: nowrap;
}
.prediction-match .group-predictions {
	position: absolute;
	left: .85rem;
	right: .85rem;
	top: calc(100% - .25rem);
	z-index: 40;
	margin-top: 0 !important;
	max-width: 100%;
	box-shadow: 0 .45rem 1rem rgba(15, 23, 42, .18);
}
.prediction-match .group-predictions:not([open]) {
	top: auto;
	bottom: .5rem;
	left: .85rem;
	right: auto;
	max-width: calc(100% - 1.7rem);
	box-shadow: none;
	background: rgba(248, 251, 249, .96);
}
.prediction-match .group-predictions summary {
	white-space: nowrap;
}
.prediction-match .group-predictions[open] summary {
	padding-bottom: .35rem;
	border-bottom: 1px solid #d8e2dc;
}
.prediction-match .group-predictions .table-responsive {
	max-height: 220px;
	overflow: auto;
}
@media (max-width: 767.98px) {
	.prediction-match {
		min-height: 170px;
	}
	.prediction-team-row {
		grid-template-columns: minmax(0, 1fr) 3.9rem;
	}
	.prediction-score-divider {
		width: 3.9rem;
	}
	.prediction-match .group-predictions[open] {
		left: .65rem;
		right: .65rem;
	}
}

/* Ranking top 3 */
.rank-1 td:first-child { color: #d4af37; font-weight: 700; font-size: 1.2rem; }
.rank-2 td:first-child { color: #a8a9ad; font-weight: 700; }
.rank-3 td:first-child { color: #cd7f32; font-weight: 700; }

/* Row sem palpite highlight */
.row-sem-palpite { background-color: #fff9e6 !important; }
.row-jogo-encerrado { background-color: #eceff1 !important; }
.row-jogo-encerrado td { color: #5f6b76; }
.row-jogo-encerrado input,
.row-jogo-encerrado select {
	background-color: #dee2e6 !important;
	border-color: #ced4da !important;
}

/* Pontuação positiva */
.pts-alto { color: #198754; font-weight: 700; }
.pts-medio { color: #0d6efd; }
.pts-baixo { color: #dc3545; }

/* Destaque de selecao */
.team-destaque,
.team-brasil {
	background: linear-gradient(90deg, #fff3b0 0%, #d8f3dc 100%) !important;
	border-left: 4px solid #198754 !important;
	color: #0b3d22;
}
.team-destaque strong,
.team-brasil strong {
	color: #0b6b34;
}

/* Podio */
.podium-tabs {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: .35rem;
}
.podium-tabs .btn {
	min-width: 5.25rem;
	white-space: nowrap;
}
.podium-wrap {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	align-items: end;
	gap: .75rem;
	min-height: 170px;
}
.podium-place {
	border: 1px solid #dee2e6;
	border-radius: .5rem .5rem 0 0;
	background: #fff;
	text-align: center;
	padding: .75rem .5rem;
	box-shadow: 0 .125rem .35rem rgba(0,0,0,.08);
}
.podium-place-1 {
	min-height: 150px;
	background: linear-gradient(180deg, #fff8d6 0%, #ffe083 100%);
	border-color: #d4af37;
	order: 2;
}
.podium-place-2 {
	min-height: 118px;
	background: linear-gradient(180deg, #f8f9fa 0%, #d7dce2 100%);
	border-color: #a8a9ad;
	order: 1;
}
.podium-place-3 {
	min-height: 95px;
	background: linear-gradient(180deg, #fff1e6 0%, #d69a62 100%);
	border-color: #cd7f32;
	order: 3;
}
.podium-rank {
	font-size: 1.75rem;
	font-weight: 800;
	line-height: 1;
}
.podium-name {
	font-weight: 700;
	word-break: break-word;
}
