:root {
  --blue: #3152a6;
  --blue-dark: #234493;
  --blue-light: #6e83bc;
  --orange: #f58220;
  --orange-dark: #d96400;
  --grass: #2f8f46;
  --white: #ffffff;
  --off-white: #f7f8fc;
  --grey: #f3f3f3;
  --text: #172033;
  --muted: #667085;
  --line: #dbe1ee;
  --shadow: 0 20px 60px rgba(24, 40, 82, 0.16);
  --radius-lg: 28px;
  --radius: 18px;
  --radius-sm: 12px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--off-white);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 16%, rgba(245, 130, 32, 0.18), transparent 28rem),
    radial-gradient(circle at 88% 8%, rgba(49, 82, 166, 0.24), transparent 30rem),
    linear-gradient(180deg, #ffffff 0%, #f4f6fb 54%, #eef2f8 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(90deg, rgba(49, 82, 166, 0.07) 1px, transparent 1px),
    linear-gradient(0deg, rgba(49, 82, 166, 0.07) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
}

.hidden {
  display: none !important;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.auth-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.auth-card {
  width: min(520px, 100%);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 38px;
  position: relative;
  overflow: hidden;
}

.auth-card::after {
  content: "";
  position: absolute;
  inset: auto -80px -110px auto;
  width: 240px;
  height: 240px;
  background: repeating-conic-gradient(from 0deg, rgba(245, 130, 32, 0.28) 0 12deg, rgba(49, 82, 166, 0.20) 12deg 24deg);
  border-radius: 50%;
  opacity: 0.55;
}

.auth-card > * {
  position: relative;
  z-index: 1;
}

.auth-logo {
  width: 78px;
  height: auto;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--orange-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-card h1,
.hero h1 {
  margin: 0;
  color: var(--blue-dark);
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.auth-card h1 {
  font-size: clamp(2.0rem, 7vw, 3.4rem);
}

.auth-copy,
.auth-note {
  color: var(--muted);
  line-height: 1.6;
}

.auth-form {
  margin-top: 26px;
}

.auth-form label,
.field-label {
  display: block;
  margin-bottom: 8px;
  color: #344054;
  font-weight: 700;
  font-size: 0.9rem;
}

.password-row {
  display: flex;
  gap: 10px;
}

.password-row input,
.filter-row input,
.filter-row select,
.select-row select,
.search-input {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  background: var(--white);
  color: var(--text);
  outline: none;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.password-row input:focus,
.filter-row input:focus,
.filter-row select:focus,
.select-row select:focus,
.search-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(49, 82, 166, 0.12);
}

.password-row input {
  flex: 1;
  min-width: 0;
}

button,
.primary-button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: var(--white);
  font-weight: 800;
  cursor: pointer;
  min-height: 46px;
  padding: 0 20px;
  box-shadow: 0 10px 22px rgba(245, 130, 32, 0.25);
}

button:hover,
.primary-button:hover {
  transform: translateY(-1px);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow: none;
}

.form-error {
  min-height: 22px;
  margin: 10px 0 0;
  color: #b42318;
  font-weight: 700;
}

.app-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(35, 68, 147, 0.92);
  backdrop-filter: blur(14px);
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 13px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 42px;
  height: 42px;
  background: var(--white);
  border-radius: 50%;
  padding: 4px;
}

.brand span {
  display: grid;
  gap: 2px;
}

.brand small {
  color: rgba(255, 255, 255, 0.76);
}

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 42px 22px 22px;
}

.hero-content {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  color: var(--white);
  padding: clamp(30px, 5vw, 58px);
  background:
    radial-gradient(circle at 78% 15%, rgba(255, 255, 255, 0.22), transparent 13rem),
    radial-gradient(circle at 88% 86%, rgba(245, 130, 32, 0.76), transparent 18rem),
    linear-gradient(135deg, var(--blue-dark), var(--blue));
  box-shadow: var(--shadow);
}

.hero-content::after {
  content: "";
  position: absolute;
  inset: auto -70px -70px auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 24px solid rgba(255, 255, 255, 0.15);
}

.hero-content > * {
  position: relative;
  z-index: 1;
}

.hero .eyebrow {
  color: #ffd5b0;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.45rem, 7vw, 5.5rem);
  max-width: 850px;
}

.hero-subtitle {
  max-width: 720px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.1rem;
  line-height: 1.6;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.hero-stat {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-stat span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-stat strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.35rem, 2.4vw, 2.0rem);
  letter-spacing: -0.04em;
}

.tabs {
  max-width: var(--max-width);
  margin: 0 auto 22px;
  padding: 0 22px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.tabs a {
  white-space: nowrap;
  text-decoration: none;
  color: var(--blue-dark);
  font-weight: 800;
  padding: 13px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(219, 225, 238, 0.75);
}

.tabs a.active {
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  box-shadow: 0 10px 24px rgba(49, 82, 166, 0.18);
}

.main-view {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 22px 58px;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0;
}

.section-title h2 {
  margin: 0;
  color: var(--blue-dark);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: -0.04em;
}

.section-title p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card,
.panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(219, 225, 238, 0.86);
  border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(24, 40, 82, 0.08);
}

.card {
  padding: 22px;
}

.card h3,
.panel h3 {
  margin: 0 0 12px;
  color: var(--blue-dark);
  letter-spacing: -0.02em;
}

.kpi-card {
  position: relative;
  overflow: hidden;
}

.kpi-card::after {
  content: "";
  position: absolute;
  top: -44px;
  right: -44px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(245, 130, 32, 0.12);
}

.kpi-card span {
  display: block;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kpi-card strong {
  display: block;
  margin-top: 12px;
  color: var(--blue-dark);
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.kpi-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.table.compact-table {
  min-width: 520px;
}

.table.wide-table {
  min-width: 860px;
}

.table th,
.table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.table th {
  background: #f5f7fb;
  color: #344054;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table .number,
.number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.rank-badge,
.status-pill,
.phase-pill,
.score-pill,
.trend-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.83rem;
  font-weight: 800;
}

.rank-badge {
  min-width: 36px;
  color: var(--white);
  background: var(--blue);
}

.status-pill {
  background: #eaf7ee;
  color: #126a2e;
}

.status-pill.played {
  background: #edf2ff;
  color: var(--blue-dark);
}

.phase-pill {
  background: #fff4e8;
  color: #b74f00;
}

.score-pill {
  background: #eff3fa;
  color: var(--blue-dark);
}

.trend-pill {
  min-width: 38px;
  background: #f4f6fb;
  color: #344054;
}

.trend-pill.up {
  background: #eaf7ee;
  color: #087443;
}

.trend-pill.down {
  background: #fff0ee;
  color: #b42318;
}

.match-list,
.country-grid,
.prediction-grid {
  display: grid;
  gap: 14px;
}

.match-card {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) auto minmax(0, 1.45fr);
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.match-team {
  min-width: 0;
}

.match-team strong {
  display: block;
  font-size: 1.05rem;
  color: var(--text);
}

.match-team span,
.match-meta,
.muted {
  color: var(--muted);
}

.match-score {
  display: grid;
  place-items: center;
  min-width: 92px;
  border-radius: 16px;
  padding: 12px;
  background: linear-gradient(180deg, #f7f9fd, #edf2fb);
  color: var(--blue-dark);
  font-weight: 900;
  font-size: 1.4rem;
  font-variant-numeric: tabular-nums;
}

.match-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.92rem;
}

.filter-row,
.select-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 0 0 18px;
}

.filter-row > *,
.select-row > * {
  min-width: 190px;
}

.search-input {
  flex: 1;
  min-width: min(320px, 100%);
}

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

.country-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 260px;
}

.country-card p {
  margin: 0;
  color: #344054;
  line-height: 1.65;
}

.country-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.country-card-header h3 {
  margin: 0;
}

.country-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.prediction-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.participant-card {
  scroll-margin-top: 96px;
}

.detail-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.detail-card {
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f7f9fd, #ffffff);
  border: 1px solid var(--line);
}

.detail-card span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-card strong {
  display: block;
  margin-top: 8px;
  color: var(--blue-dark);
  font-size: 1.05rem;
  line-height: 1.25;
}

.participant-section {
  margin-top: 24px;
}

.participant-section h4 {
  margin: 0 0 12px;
  color: var(--blue-dark);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.group-standings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.group-standing-card {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--white);
}

.group-standing-card h5 {
  margin: 0 0 10px;
  color: var(--blue-dark);
  font-size: 0.98rem;
}

.group-standing-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 0;
  border-top: 1px solid #edf2fb;
}

.group-standing-row span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.group-standing-row strong {
  min-width: 0;
  color: var(--text);
}

.group-standing-row em {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.distribution-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.distribution-row:last-child {
  border-bottom: 0;
}

.bar {
  flex: 1;
  height: 10px;
  background: #edf2fb;
  border-radius: 999px;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--orange));
  border-radius: inherit;
}

.small-list {
  display: grid;
  gap: 10px;
}

.small-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: #f7f9fd;
}

.rule-list {
  margin: 0;
  padding-left: 1.1rem;
  color: #344054;
  line-height: 1.7;
}

.prize-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.prize-card {
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff8f1, #ffffff);
  border: 1px solid #ffe1c3;
}

.prize-card span {
  display: block;
  color: #9a4a00;
  font-weight: 900;
}

.prize-card strong {
  display: block;
  margin-top: 6px;
  color: var(--blue-dark);
  font-size: 1.6rem;
}

.empty-state {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.74);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.update-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 920px) {
  .hero-stats,
  .grid.four,
  .grid.three,
  .country-grid,
  .detail-card-grid,
  .group-standings-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .auth-card {
    padding: 28px;
  }

  .password-row {
    flex-direction: column;
  }

  .header-inner {
    align-items: flex-start;
  }

  .brand small {
    display: none;
  }

  .hero {
    padding-top: 26px;
  }

  .hero-content {
    border-radius: 26px;
  }

  .hero-stats,
  .grid.two,
  .grid.three,
  .grid.four,
  .country-grid,
  .prize-strip,
  .detail-card-grid,
  .group-standings-grid {
    grid-template-columns: 1fr;
  }

  .section-title {
    align-items: start;
    flex-direction: column;
  }

  .match-card {
    grid-template-columns: 1fr;
  }

  .match-score {
    width: 100%;
  }

  .filter-row > *,
  .select-row > * {
    width: 100%;
  }

  .ghost-button {
    padding-inline: 14px;
  }
}

/* Voorspellingen: forceer een verticale flow, zodat de per-deelnemer sectie altijd onderaan staat. */
.prediction-match-section,
.prediction-participant-section {
  width: 100%;
}

.prediction-participant-section {
  margin-top: 18px;
}

.participant-intro {
  margin: 10px 0 0;
}

.participant-subsection {
  margin-top: 16px;
}

.participant-subsection h5 {
  margin: 0 0 10px;
  color: var(--blue-dark);
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.bonus-table td:first-child {
  min-width: 360px;
}

.knockout-table td:nth-child(4) {
  min-width: 260px;
}

@media (max-width: 720px) {
  .participant-subsection {
    margin-top: 14px;
  }

  .bonus-table td:first-child,
  .knockout-table td:nth-child(4) {
    min-width: 240px;
  }
}
