
:root {
  --fifa-bg: #f4f7fb;
  --fifa-card: #ffffff;
  --fifa-text: #0f172a;
  --fifa-muted: #64748b;
  --fifa-border: rgba(100, 116, 139, 0.25);
}

[data-bs-theme="dark"] {
  --fifa-bg: #0f172a;
  --fifa-card: #172033;
  --fifa-text: #e5e7eb;
  --fifa-muted: #94a3b8;
  --fifa-border: rgba(148, 163, 184, 0.25);
}

html,
body {
  min-height: 100%;
  background: var(--fifa-bg) !important;
  color: var(--fifa-text) !important;
}

body {
  transition: background-color 0.15s ease, color 0.15s ease;
}

.app-navbar {
  background: #ffffff !important;
  border-bottom: 1px solid var(--fifa-border);
}

.app-navbar .navbar-brand,
.app-navbar .nav-link,
.app-navbar .user-name {
  color: #0f172a !important;
}

.app-navbar .nav-link:hover {
  color: #155eef !important;
}

[data-bs-theme="dark"] .app-navbar {
  background: #111827 !important;
  border-bottom-color: var(--fifa-border);
}

[data-bs-theme="dark"] .app-navbar .navbar-brand,
[data-bs-theme="dark"] .app-navbar .nav-link,
[data-bs-theme="dark"] .app-navbar .user-name {
  color: #f8fafc !important;
}

[data-bs-theme="dark"] .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.35);
}

.card {
  background: var(--fifa-card) !important;
  color: var(--fifa-text) !important;
  border-radius: 1rem;
  border: 1px solid var(--fifa-border) !important;
  box-shadow: 0 0.5rem 1.5rem rgba(15, 23, 42, 0.08);
  margin-bottom: 1rem;
}

[data-bs-theme="dark"] .card {
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.35);
}

.login-box {
  max-width: 460px;
  margin: 7vh auto;
}

.error {
  color: var(--bs-danger);
  font-weight: 700;
}

.success {
  color: var(--bs-success);
  font-weight: 700;
}

.small {
  color: var(--fifa-muted) !important;
}

.match-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.team-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: clamp(1.15rem, 4vw, 1.65rem);
  font-weight: 800;
}

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

.flag {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 1.45em;
  line-height: 1;
  min-width: 1.5em;
  text-align: center;
}

.versus {
  color: var(--fifa-muted);
  font-size: 0.78em;
  font-weight: 800;
}

.score-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0.65rem 0;
}

.score-row label {
  font-weight: 700;
  min-width: 95px;
}

.score-pair {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.score-pair input {
  width: 5.5rem;
}

.table {
  --bs-table-bg: var(--fifa-card);
  --bs-table-color: var(--fifa-text);
  --bs-table-border-color: var(--fifa-border);
}

.table-responsive {
  border-radius: 0.75rem;
}

input,
select,
.form-control,
.form-select {
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
}

@media (max-width: 576px) {
  main.container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .card {
    padding: 1rem !important;
  }

  .score-row {
    display: block;
  }

  .score-row label {
    display: block;
    margin-bottom: 0.25rem;
  }

  .score-pair {
    width: 100%;
  }

  .score-pair input {
    width: 45%;
  }

  .actions button,
  .actions .btn {
    width: 100%;
  }

  th,
  td {
    white-space: nowrap;
  }
}


/* v14 flags */
.flag {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif !important;
  font-size: 1.45em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6em;
  min-width: 1.6em;
  font-weight: normal;
}


/* v15 real flag images */
.flag-img {
  width: 34px;
  height: 24px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(100, 116, 139, 0.25);
  background: #fff;
  flex: 0 0 auto;
}

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

.team-line {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

@media (max-width: 576px) {
  .flag-img {
    width: 30px;
    height: 21px;
  }
}


/* v16 all_predictions flags */
td .team-line,
td .team {
  display: inline-flex;
  align-items: center;
}

td .flag-img {
  width: 26px;
  height: 18px;
  margin-right: 4px;
}

td .versus {
  margin: 0 0.45rem;
}


/* v17 all_predictions table match alignment */
td .team-line {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  flex-wrap: nowrap !important;
  white-space: nowrap;
  font-size: 1rem !important;
  font-weight: 500 !important;
}

td .team {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  white-space: nowrap;
}

td .team .flag-img,
td .flag-img {
  width: 28px !important;
  height: 20px !important;
  object-fit: cover;
  border-radius: 3px;
  margin: 0 !important;
  vertical-align: middle;
}

td .versus {
  display: inline-flex !important;
  align-items: center !important;
  align-self: center !important;
  margin: 0 0.25rem !important;
  line-height: 1 !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  color: var(--fifa-muted) !important;
}

@media (max-width: 576px) {
  td .team-line {
    font-size: 0.92rem !important;
    gap: 0.3rem !important;
  }

  td .team .flag-img,
  td .flag-img {
    width: 24px !important;
    height: 17px !important;
  }
}


/* v19 mobile + locked + all_predictions alignment */
main.container-fluid {
  max-width: 1180px;
}

.actions .badge {
  font-size: 0.95rem;
  padding: 0.55rem 0.8rem;
}

.match-cell {
  display: inline-flex !important;
  align-items: center !important;
  vertical-align: middle !important;
  white-space: nowrap;
  line-height: 1 !important;
}

.match-cell .team-line {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  flex-wrap: nowrap !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
}

.match-cell .team {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  line-height: 1 !important;
  white-space: nowrap;
}

.match-cell .flag-img {
  width: 28px !important;
  height: 20px !important;
  object-fit: cover;
  border-radius: 3px;
  display: inline-block !important;
  vertical-align: middle !important;
  flex: 0 0 auto;
  margin: 0 !important;
}

.match-cell .versus {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 20px !important;
  line-height: 20px !important;
  margin: 0 0.35rem !important;
  padding: 0 !important;
  align-self: center !important;
  transform: translateY(0) !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
}

.table-mobile td,
.table-mobile th {
  vertical-align: middle !important;
}

@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1rem;
  }

  .card {
    border-radius: 0.85rem;
  }

  .team-line {
    font-size: 1.15rem !important;
  }

  .score-row {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .score-pair {
    width: 100%;
    display: grid !important;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }

  .score-pair input {
    width: 100% !important;
  }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-mobile {
    min-width: 720px;
  }

  .match-cell .flag-img {
    width: 24px !important;
    height: 17px !important;
  }

  .match-cell .versus {
    height: 17px !important;
    line-height: 17px !important;
  }
}

@media (max-width: 576px) {
  main.container-fluid {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  .card {
    padding: 1rem !important;
  }

  .btn,
  button[type="submit"] {
    width: 100%;
  }

  .navbar .btn {
    width: auto;
  }
}


/* v20 admin users */
.admin-users-actions,
td .d-flex {
  align-items: center;
}

@media (max-width: 768px) {
  .table-mobile input,
  .table-mobile select {
    min-width: 120px;
  }
}


/* v22 All Predictions mobile cards - no horizontal scroll */
.allpred-cards {
  display: grid;
  gap: 0.85rem;
}

.prediction-mobile-card {
  background: var(--fifa-card, var(--bs-body-bg));
  color: var(--fifa-text, var(--bs-body-color));
  border: 1px solid var(--fifa-border, rgba(100, 116, 139, 0.25));
  border-radius: 1rem;
  padding: 0.9rem;
  box-shadow: 0 0.35rem 1rem rgba(15, 23, 42, 0.08);
}

[data-bs-theme="dark"] .prediction-mobile-card {
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.35);
}

.prediction-mobile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.prediction-user {
  font-weight: 800;
  font-size: 1rem;
}

.prediction-match {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 0.8rem;
  overflow: hidden;
}

.prediction-match .team-line,
.prediction-match .team {
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
  gap: 0.35rem !important;
  flex-wrap: nowrap !important;
  min-width: 0;
}

.prediction-match .team span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prediction-match .flag-img {
  width: 28px !important;
  height: 20px !important;
  object-fit: cover;
  flex: 0 0 auto;
}

.prediction-match .versus {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 20px !important;
  line-height: 20px !important;
  margin: 0 0.35rem !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  color: var(--fifa-muted, var(--bs-secondary-color)) !important;
  flex: 0 0 auto;
}

.prediction-score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.score-label {
  font-size: 0.75rem;
  color: var(--fifa-muted, var(--bs-secondary-color));
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.score-value {
  font-size: 1.25rem;
  font-weight: 900;
}

.prediction-updated {
  margin-top: 0.65rem;
  font-size: 0.8rem;
  color: var(--fifa-muted, var(--bs-secondary-color));
}

@media (max-width: 576px) {
  .allpred-table {
    display: none !important;
  }

  .prediction-match {
    font-size: 0.92rem;
  }

  .prediction-score-grid {
    gap: 0.5rem;
  }
}


/* v23 All Predictions redesigned layout */
.allpred-page {
  width: 100%;
}

.allpred-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  background: var(--fifa-card, var(--bs-body-bg));
  border: 1px solid var(--fifa-border, rgba(100, 116, 139, 0.25));
  border-radius: 1rem;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 0.35rem 1rem rgba(15, 23, 42, 0.06);
}

.allpred-header h1 {
  margin: 0 0 0.25rem;
}

.allpred-count {
  white-space: nowrap;
  padding: 0.55rem 0.75rem;
}

.allpred-table-wrap {
  width: 100%;
  background: var(--fifa-card, var(--bs-body-bg));
  border: 1px solid var(--fifa-border, rgba(100, 116, 139, 0.25));
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 0.35rem 1rem rgba(15, 23, 42, 0.06);
}

.allpred-table {
  width: 100% !important;
  margin-bottom: 0 !important;
  table-layout: auto;
}

.allpred-table th {
  background: rgba(21, 94, 239, 0.08) !important;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--fifa-muted, var(--bs-secondary-color));
}

.allpred-table th,
.allpred-table td {
  padding: 0.95rem 1rem !important;
  vertical-align: middle !important;
}

.allpred-user {
  font-weight: 800;
  min-width: 150px;
}

.allpred-date {
  white-space: nowrap;
  color: var(--fifa-muted, var(--bs-secondary-color));
  font-size: 0.92rem;
}

.score-cell {
  font-weight: 900;
  font-size: 1.05rem;
  white-space: nowrap;
}

/* Desktop match cell: centered and aligned */
.match-cell {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  line-height: 1 !important;
  white-space: nowrap;
}

.match-cell .team {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  line-height: 1 !important;
}

.match-cell .flag-img {
  width: 30px !important;
  height: 21px !important;
  object-fit: cover;
  border-radius: 3px;
  flex: 0 0 auto;
  display: inline-block;
}

.match-cell .versus {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 21px !important;
  line-height: 21px !important;
  margin: 0 0.2rem !important;
  padding: 0 !important;
  transform: none !important;
  color: var(--fifa-muted, var(--bs-secondary-color)) !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
}

/* Mobile cards */
.allpred-mobile {
  display: grid;
  gap: 0.85rem;
}

.prediction-card-mobile {
  background: var(--fifa-card, var(--bs-body-bg));
  border: 1px solid var(--fifa-border, rgba(100, 116, 139, 0.25));
  border-radius: 1.1rem;
  padding: 1rem;
  box-shadow: 0 0.35rem 1rem rgba(15, 23, 42, 0.08);
}

[data-bs-theme="dark"] .prediction-card-mobile,
[data-bs-theme="dark"] .allpred-header,
[data-bs-theme="dark"] .allpred-table-wrap {
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.35);
}

.prediction-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--fifa-border, rgba(100, 116, 139, 0.25));
}

.prediction-person {
  font-weight: 900;
  font-size: 1.02rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prediction-points {
  background: var(--bs-primary);
  color: white;
  font-weight: 900;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  white-space: nowrap;
  font-size: 0.85rem;
}

.prediction-card-match {
  padding: 0.85rem 0;
}

.prediction-card-match .team-line,
.prediction-card-match .team {
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
  gap: 0.35rem !important;
  flex-wrap: nowrap !important;
}

.prediction-card-match .team-line {
  width: 100%;
  justify-content: flex-start;
  gap: 0.45rem !important;
}

.prediction-card-match .team {
  min-width: 0;
  max-width: 42%;
}

.prediction-card-match .team span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prediction-card-match .flag-img {
  width: 30px !important;
  height: 21px !important;
  object-fit: cover;
  border-radius: 3px;
  flex: 0 0 auto;
}

.prediction-card-match .versus {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 21px !important;
  line-height: 21px !important;
  margin: 0 0.15rem !important;
  color: var(--fifa-muted, var(--bs-secondary-color)) !important;
  font-size: 0.72rem !important;
  font-weight: 900 !important;
  flex: 0 0 auto;
}

.prediction-card-scores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.prediction-score-box {
  background: rgba(100, 116, 139, 0.08);
  border: 1px solid var(--fifa-border, rgba(100, 116, 139, 0.25));
  border-radius: 0.85rem;
  padding: 0.75rem;
  text-align: center;
}

.prediction-score-label {
  display: block;
  color: var(--fifa-muted, var(--bs-secondary-color));
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.prediction-score-box strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1;
}

.prediction-card-footer {
  margin-top: 0.75rem;
  color: var(--fifa-muted, var(--bs-secondary-color));
  font-size: 0.82rem;
  text-align: right;
}

@media (min-width: 992px) {
  main.container-fluid,
  main.container-lg {
    max-width: 1320px !important;
  }
}

@media (max-width: 576px) {
  .allpred-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 1rem;
  }

  .allpred-count {
    align-self: flex-start;
  }

  .prediction-card-mobile {
    padding: 0.9rem;
  }

  .prediction-card-match .flag-img {
    width: 28px !important;
    height: 20px !important;
  }

  .prediction-card-scores {
    gap: 0.55rem;
  }

  .prediction-score-box {
    padding: 0.65rem 0.5rem;
  }

  .prediction-score-box strong {
    font-size: 1.25rem;
  }
}


/* v24 Leaderboard responsive redesign */
.leaderboard-page {
  width: 100%;
}

.leaderboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  background: var(--fifa-card, var(--bs-body-bg));
  border: 1px solid var(--fifa-border, rgba(100, 116, 139, 0.25));
  border-radius: 1rem;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 0.35rem 1rem rgba(15, 23, 42, 0.06);
}

[data-bs-theme="dark"] .leaderboard-header,
[data-bs-theme="dark"] .leaderboard-table-wrap,
[data-bs-theme="dark"] .leaderboard-card-mobile {
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.35);
}

.leaderboard-header h1 {
  margin: 0 0 0.25rem;
}

.leaderboard-count {
  white-space: nowrap;
  padding: 0.55rem 0.75rem;
}

.leaderboard-table-wrap {
  width: 100%;
  background: var(--fifa-card, var(--bs-body-bg));
  border: 1px solid var(--fifa-border, rgba(100, 116, 139, 0.25));
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 0.35rem 1rem rgba(15, 23, 42, 0.06);
}

.leaderboard-table {
  width: 100% !important;
  margin-bottom: 0 !important;
}

.leaderboard-table th {
  background: rgba(21, 94, 239, 0.08) !important;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--fifa-muted, var(--bs-secondary-color));
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 0.95rem 1rem !important;
  vertical-align: middle !important;
}

.leaderboard-rank {
  font-weight: 900;
  color: var(--bs-primary);
  width: 90px;
}

.leaderboard-user {
  font-weight: 850;
}

.leaderboard-points {
  font-weight: 950;
  font-size: 1.15rem;
}

/* Mobile ranking cards */
.leaderboard-mobile {
  display: grid;
  gap: 0.75rem;
}

.leaderboard-card-mobile {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  background: var(--fifa-card, var(--bs-body-bg));
  border: 1px solid var(--fifa-border, rgba(100, 116, 139, 0.25));
  border-radius: 1.1rem;
  padding: 0.9rem;
  box-shadow: 0 0.35rem 1rem rgba(15, 23, 42, 0.08);
}

.leaderboard-winner {
  border-color: rgba(255, 193, 7, 0.65);
  background:
    linear-gradient(135deg, rgba(255, 193, 7, 0.14), transparent 45%),
    var(--fifa-card, var(--bs-body-bg));
}

.leaderboard-card-rank {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(21, 94, 239, 0.12);
  color: var(--bs-primary);
  font-weight: 950;
}

.leaderboard-winner .leaderboard-card-rank {
  background: rgba(255, 193, 7, 0.25);
  color: #b45309;
}

.leaderboard-card-body {
  min-width: 0;
}

.leaderboard-card-name {
  font-weight: 900;
  font-size: 1.02rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-card-meta {
  color: var(--fifa-muted, var(--bs-secondary-color));
  font-size: 0.82rem;
  margin-top: 0.15rem;
}

.leaderboard-card-points {
  text-align: right;
  min-width: 4.2rem;
}

.leaderboard-card-points strong {
  display: block;
  font-size: 1.45rem;
  line-height: 1;
  font-weight: 950;
}

.leaderboard-card-points span {
  color: var(--fifa-muted, var(--bs-secondary-color));
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

@media (min-width: 992px) {
  main.container-fluid,
  main.container-lg {
    max-width: 1320px !important;
  }
}

@media (max-width: 576px) {
  .leaderboard-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 1rem;
  }

  .leaderboard-count {
    align-self: flex-start;
  }

  .leaderboard-card-mobile {
    grid-template-columns: auto 1fr auto;
    padding: 0.85rem;
    gap: 0.7rem;
  }

  .leaderboard-card-rank {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.92rem;
  }

  .leaderboard-card-points strong {
    font-size: 1.3rem;
  }
}


/* v25 All Predictions grouped by match */
.match-prediction-groups {
  display: grid;
  gap: 1rem;
}

.match-prediction-group {
  background: var(--fifa-card, var(--bs-body-bg));
  border: 1px solid var(--fifa-border, rgba(100, 116, 139, 0.25));
  border-radius: 1.1rem;
  overflow: hidden;
  box-shadow: 0 0.35rem 1rem rgba(15, 23, 42, 0.06);
}

[data-bs-theme="dark"] .match-prediction-group {
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.35);
}

.match-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--fifa-border, rgba(100, 116, 139, 0.25));
  background: rgba(21, 94, 239, 0.055);
}

.match-group-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 900;
  font-size: 1.1rem;
}

.match-group-title .team-line,
.match-group-title .team {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  line-height: 1 !important;
  flex-wrap: nowrap !important;
}

.match-group-title .flag-img {
  width: 32px !important;
  height: 22px !important;
  object-fit: cover;
  border-radius: 3px;
  flex: 0 0 auto;
}

.match-group-title .versus {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 22px !important;
  line-height: 22px !important;
  margin: 0 0.3rem !important;
  font-size: 0.75rem !important;
  font-weight: 900 !important;
  color: var(--fifa-muted, var(--bs-secondary-color)) !important;
}

.match-group-meta {
  margin-top: 0.35rem;
  color: var(--fifa-muted, var(--bs-secondary-color));
  font-size: 0.88rem;
}

.group-predictions-table .table {
  margin-bottom: 0 !important;
}

.group-predictions-table th {
  background: transparent !important;
  color: var(--fifa-muted, var(--bs-secondary-color));
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.group-predictions-table th,
.group-predictions-table td {
  padding: 0.85rem 1.15rem !important;
  vertical-align: middle !important;
}

.group-predictions-mobile {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
}

.compact-prediction-card {
  margin: 0;
  box-shadow: none;
  border-radius: 0.95rem;
}

@media (max-width: 576px) {
  .match-group-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 0.95rem;
  }

  .match-group-title {
    font-size: 1rem;
    width: 100%;
  }

  .match-group-title .team-line {
    width: 100%;
  }

  .match-group-title .team {
    min-width: 0;
    max-width: 42%;
  }

  .match-group-title .team span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .match-group-title .flag-img {
    width: 28px !important;
    height: 20px !important;
  }

  .match-group-title .versus {
    height: 20px !important;
    line-height: 20px !important;
    flex: 0 0 auto;
  }

  .match-group-meta {
    font-size: 0.8rem;
  }
}


/* v26 Matches filter */
.matches-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.matches-filter {
  flex: 0 0 auto;
}

.matches-filter .btn {
  min-width: 82px;
}

@media (max-width: 576px) {
  .matches-header {
    align-items: stretch;
    flex-direction: column;
  }

  .matches-filter {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr;
    width: 100%;
  }

  .matches-filter .btn {
    min-width: 0;
    width: 100%;
  }
}


/* v49 consistent match metadata lines */
.match-meta-lines {
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

.match-meta-line {
  color: var(--fifa-muted, var(--bs-secondary-color)) !important;
  line-height: 1.35;
  margin: 0.12rem 0;
}

.match-group-meta .match-meta-line {
  margin: 0.16rem 0;
}
