/* Camada visual v4: portais separados, bandeiras e refinamentos de UX */
:root {
  --enh-green: #42e481;
  --enh-green-dark: #1ba85a;
  --enh-yellow: #ffd45f;
  --enh-panel: rgba(14, 43, 35, .94);
  --enh-line: rgba(255, 255, 255, .11);
}

.past-match-hidden,
.past-group-hidden,
.past-column-hidden,
.portal-hidden {
  display: none !important;
}

.portal-route-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--enh-line);
  border-radius: 15px;
  background: rgba(255, 255, 255, .035);
  backdrop-filter: blur(14px);
}

.portal-route-bar > div {
  display: grid;
  gap: 2px;
}

.portal-route-bar span {
  color: var(--enh-green);
  font-size: .65rem;
  font-weight: 900;
  letter-spacing: .1em;
}

.portal-route-bar strong {
  font-size: .9rem;
}

.portal-route-bar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--enh-line);
  border-radius: 11px;
  color: #e6efeb;
  background: rgba(255, 255, 255, .045);
  font-size: .76rem;
  font-weight: 800;
  text-decoration: none;
}

.route-participant .hero {
  min-height: 570px;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, .7fr);
  align-items: center;
  padding: clamp(32px, 5vw, 70px);
  border-radius: 32px;
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 212, 95, .10), transparent 28%),
    linear-gradient(140deg, rgba(18, 58, 46, .98), rgba(6, 27, 21, .97));
}

.route-participant .hero h2 {
  max-width: 860px;
  font-size: clamp(3rem, 6.5vw, 6rem);
  line-height: .93;
}

.route-participant .login-panel {
  padding: 26px;
  border-radius: 22px;
  background: rgba(3, 18, 13, .70);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .28);
}

.route-participant .input,
.route-participant .select,
.route-admin .select {
  min-height: 51px;
  border-color: rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .055);
}

.route-participant .btn:not(.danger),
.route-admin .btn:not(.danger) {
  border-radius: 13px;
}

.route-participant .stats-grid,
.route-admin .stats-grid {
  gap: 12px;
}

.route-participant .stat-card,
.route-admin .stat-card {
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(18, 52, 42, .95), rgba(9, 31, 25, .96));
  box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
}

.route-participant .toolbar {
  top: 12px;
  padding: 12px 14px;
  border-radius: 17px;
  border-color: rgba(255, 255, 255, .13);
  background: rgba(7, 27, 21, .92);
}

.route-participant .group-section {
  margin-top: 34px;
}

.route-participant .group-heading {
  padding: 0 2px;
}

.route-participant .group-badge {
  background: linear-gradient(145deg, var(--enh-yellow), #ffeba1);
  box-shadow: 0 10px 25px rgba(255, 212, 95, .12);
}

.route-participant .match-card,
.route-admin .result-card {
  padding: 18px;
  border-radius: 19px;
  border-color: rgba(255, 255, 255, .11);
  background:
    linear-gradient(145deg, rgba(18, 51, 41, .97), rgba(8, 29, 23, .98));
  box-shadow: 0 13px 32px rgba(0, 0, 0, .15);
}

.route-participant .match-card:hover,
.route-admin .result-card:hover {
  border-color: rgba(66, 228, 129, .32);
}

.route-participant .match-meta,
.route-admin .match-meta {
  align-items: center;
  min-height: 29px;
}

.today-chip,
.future-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  margin-right: 7px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: .63rem;
  font-weight: 900;
  letter-spacing: .06em;
}

.today-chip {
  color: #06130d;
  background: var(--enh-green);
}

.future-chip {
  color: var(--enh-yellow);
  border: 1px solid rgba(255, 212, 95, .18);
  background: rgba(255, 212, 95, .08);
}

.flag.flag-image-shell {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  width: 54px;
  height: 39px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 9px;
  background: rgba(255, 255, 255, .06);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .22);
  font-size: 1.35rem;
}

.flag.flag-image-shell img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.route-participant .teams,
.route-admin .teams {
  margin: 4px 0;
}

.route-participant .team,
.route-admin .team {
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.route-participant .team.away,
.route-admin .team.away {
  justify-content: center;
  text-align: center;
}

.route-participant .team-name,
.route-admin .team-name {
  width: 100%;
  font-size: .82rem;
}

.route-participant .score-entry {
  margin-top: 17px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 15px;
  background: rgba(0, 0, 0, .12);
}

.route-participant .score-input,
.route-admin .score-input {
  border-color: rgba(255, 255, 255, .16);
  background: rgba(1, 12, 8, .62);
  font-size: 1.35rem;
  font-weight: 900;
}

.route-participant .pick-status {
  min-height: 34px;
  margin-top: 12px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .035);
}

.route-participant .public-ranking {
  padding-top: 8px;
}

.route-participant .ranking-panel,
.route-admin .panel {
  border-color: rgba(255, 255, 255, .11);
  border-radius: 20px;
  background: rgba(13, 42, 34, .94);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .14);
}

.route-participant .podium-card,
.route-admin .podium-card {
  background: linear-gradient(145deg, rgba(23, 58, 47, .95), rgba(11, 35, 28, .96));
}

.route-participant .podium-card:first-child,
.route-admin .podium-card:first-child {
  border-color: rgba(255, 212, 95, .36);
}

.route-participant .scoring-panel,
.route-admin .scoring-panel {
  border-radius: 20px;
  background: rgba(255, 255, 255, .025);
}

/* Dashboard do Matheus */
.route-admin {
  background:
    radial-gradient(circle at 8% 0%, rgba(66, 228, 129, .10), transparent 30%),
    linear-gradient(150deg, #050e0b, #0a1a15 52%, #0d211a);
}

.route-admin .shell {
  width: min(1480px, calc(100% - 34px));
}

.route-admin .portal-route-bar {
  border-color: rgba(66, 228, 129, .18);
  background: rgba(66, 228, 129, .04);
}

.route-admin .topbar {
  margin-bottom: 18px;
}

.route-admin .page-header {
  align-items: center;
  padding: 22px;
  border: 1px solid var(--enh-line);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(20, 54, 44, .94), rgba(9, 31, 25, .96));
}

.route-admin .page-header h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.route-admin .tabs {
  position: sticky;
  top: 10px;
  z-index: 12;
  gap: 7px;
  padding: 7px;
  border: 1px solid var(--enh-line);
  border-radius: 16px;
  background: rgba(7, 27, 21, .94);
  backdrop-filter: blur(16px);
}

.route-admin .tab-btn {
  min-height: 42px;
  border-radius: 11px;
}

.route-admin .tab-btn.active {
  color: #06130d;
  background: var(--enh-green);
}

.route-admin .admin-results {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.route-admin .result-card {
  transition: transform .18s ease, border-color .18s ease;
}

.route-admin .result-card:hover {
  transform: translateY(-2px);
}

.route-admin table {
  border-collapse: separate;
  border-spacing: 0;
}

.route-admin th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #143429;
}

.route-admin td,
.route-admin th {
  border-color: rgba(255, 255, 255, .075);
}

.route-admin .settings-grid {
  gap: 14px;
}

.route-admin .setting-card {
  min-height: 170px;
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(19, 52, 42, .95), rgba(9, 31, 25, .96));
}

@media (max-width: 1050px) {
  .route-admin .admin-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .route-participant .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .route-participant .login-panel {
    max-width: 560px;
  }

  .route-participant .team,
  .route-admin .team {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
  }

  .route-participant .team.away,
  .route-admin .team.away {
    flex-direction: row-reverse;
    justify-content: flex-start;
    text-align: right;
  }

  .flag.flag-image-shell {
    width: 44px;
    height: 32px;
  }
}

@media (max-width: 660px) {
  .portal-route-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .portal-route-bar a {
    width: 100%;
  }

  .route-participant .hero {
    padding: 26px 18px;
    border-radius: 23px;
  }

  .route-participant .hero h2 {
    font-size: clamp(2.6rem, 14vw, 4rem);
  }

  .route-participant .matches-grid {
    gap: 11px;
  }

  .route-participant .match-card,
  .route-admin .result-card {
    padding: 14px;
  }

  .route-participant .teams,
  .route-admin .teams {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .route-participant .team,
  .route-admin .team {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }

  .route-participant .team.away,
  .route-admin .team.away {
    flex-direction: column-reverse;
    justify-content: center;
    text-align: center;
  }

  .route-admin .page-header {
    padding: 17px;
  }

  .route-admin .tabs {
    position: static;
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .route-admin .tabs::-webkit-scrollbar {
    display: none;
  }

  .route-admin .tab-btn {
    flex: 0 0 auto;
  }

  .route-admin .admin-results {
    grid-template-columns: 1fr;
  }
}
