:root {
  --bg: #ffffff;
  --surface: #f7f8fb;
  --surface-strong: #eef2f7;
  --text: #112033;
  --muted: #6b7280;
  --border: #d9e2ec;
  --accent: #153e75;
  --accent-soft: #dce9fb;
  --green: #1f9d55;
  --yellow: #b8860b;
  --red: #c0392b;
  --shadow: 0 14px 40px rgba(17, 32, 51, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.topbar,
.nav,
.page-shell,
.alerts {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 28px 0 18px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand-logo {
  width: 148px;
  height: auto;
}

.fifa-logo {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 20px;
}

.nav a {
  color: var(--accent);
  text-decoration: none;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
}

.alerts {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.alert {
  padding: 14px 18px;
  border-radius: 14px;
  font-weight: 600;
}

.alert.success {
  background: #e9f8ef;
  color: #13663a;
}

.alert.error {
  background: #fdeceb;
  color: #9e2f25;
}

.page-shell {
  padding-bottom: 40px;
}

.hero,
.panel-grid,
.stack {
  display: grid;
  gap: 20px;
}

.hero {
  grid-template-columns: 1.2fr 1fr;
  align-items: stretch;
  margin-bottom: 20px;
}

.hero-copy,
.card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 30px;
  display: grid;
  gap: 14px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stat-card {
  padding: 26px;
  display: grid;
  gap: 14px;
  align-content: center;
}

.stat-card span {
  color: var(--muted);
}

.stat-card strong {
  font-size: 2rem;
}

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

.card {
  padding: 24px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.card-head a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
}

.date-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin-bottom: 20px;
}

.date-filter label {
  width: 100%;
  color: var(--muted);
  font-weight: 700;
}

.date-filter input,
.button-link {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  min-height: 42px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
}

.button-link.secondary {
  color: var(--accent);
  background: var(--accent-soft);
}

.results-stack {
  display: grid;
  gap: 22px;
}

.day-results {
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.day-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.day-title span {
  color: var(--muted);
  font-weight: 700;
}

.empty-state {
  display: grid;
  gap: 8px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

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

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--surface);
  font-size: 0.92rem;
}

.score-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.score-form input,
.score-form select,
button {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

.score-form input {
  width: 70px;
}

button {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.versus {
  color: var(--muted);
  margin: 0 8px;
}

.ranking-list {
  display: grid;
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.ranking-list li,
.calendar-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px 18px;
}

.ranking-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calendar-list {
  display: grid;
  gap: 14px;
}

.muted,
.prob-line {
  color: var(--muted);
}

.result-pill {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.success {
  color: var(--green);
}

.warning {
  color: var(--yellow);
}

.danger {
  color: var(--red);
}

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

  .summary-grid {
    grid-template-columns: 1fr;
  }

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

  .fifa-logo {
    width: 56px;
    height: 56px;
  }
}

@media (max-width: 640px) {
  .brand-wrap {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-logo {
    width: 120px;
  }

  .card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .date-filter input,
  .date-filter button,
  .date-filter .button-link {
    width: 100%;
    justify-content: center;
  }

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