:root {
  --page: #f5f7fb;
  --panel: #ffffff;
  --panel-soft: #edf2f7;
  --ink: #142033;
  --muted: #68758a;
  --line: #dce3ec;
  --blue: #0f5fd0;
  --blue-dark: #0a3f91;
  --green: #10845f;
  --red: #bf3030;
  --gold: #d9a222;
  --shadow: 0 16px 38px rgba(28, 40, 62, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
}

.login-visual {
  min-height: 100vh;
  padding: 46px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  background:
    linear-gradient(rgba(6, 17, 38, 0.64), rgba(6, 17, 38, 0.52)),
    url("assets/football-bg.jpg") center/cover,
    url("https://images.unsplash.com/photo-1431324155629-1a6deb1dec8d?auto=format&fit=crop&w=1400&q=80") center/cover;
}

.hero-logo {
  width: 86px;
  height: 86px;
  object-fit: contain;
  margin-bottom: 22px;
}

.login-visual h1 {
  max-width: 640px;
  margin: 0 0 14px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.95;
}

.login-visual p {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 28px;
}

.auth-card {
  width: min(460px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.segmented button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
}

.segmented button.active {
  color: var(--ink);
  background: var(--panel);
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.field input,
.field select {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}

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

.hint {
  margin: -4px 0 14px;
  font-size: 13px;
}

.notice {
  padding: 10px 12px;
  margin: 0 0 16px;
  border: 1px solid #efd68d;
  border-radius: 8px;
  background: #fff8dc;
  color: #684b00;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 278px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: #fff;
  background: #101827;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 850;
}

.brand span:first-child,
.brand img {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  color: #101827;
  object-fit: contain;
}

.sidebar select {
  width: 100%;
  min-height: 40px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar option {
  color: var(--ink);
}

.nav {
  display: grid;
  gap: 6px;
}

.nav button {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  text-align: left;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav button img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.nav button.active,
.nav button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.account {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.content {
  padding: 26px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.topbar h2 {
  margin: 0 0 4px;
  font-size: clamp(28px, 4vw, 44px);
}

.topbar p {
  margin: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  font-weight: 750;
  color: #fff;
  background: var(--blue);
}

.btn:hover {
  background: var(--blue-dark);
}

.btn.secondary {
  color: var(--ink);
  background: var(--panel-soft);
}

.btn.danger {
  background: var(--red);
}

.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));
}

.card,
.match {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 2px 10px rgba(28, 40, 62, 0.04);
}

.card {
  padding: 16px;
}

.metric {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.metric.first {
  border-color: #e7bd3d;
  background: #fff7d7;
}

.metric.second {
  border-color: #b9c1cc;
  background: #f3f6fa;
}

.metric.third {
  border-color: #c99468;
  background: #fff0e4;
}

.metric b {
  display: block;
  margin-top: 4px;
  font-size: 32px;
}

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

.section-title h3 {
  margin: 0;
  font-size: 18px;
}

.match {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.match-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 62px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.team {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 760;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.team.away {
  justify-content: flex-end;
  text-align: right;
}

.team span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logo {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: contain;
  background: var(--panel-soft);
}

.score {
  text-align: center;
  font-size: 20px;
  font-weight: 850;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: var(--panel-soft);
}

.tag.live {
  color: #fff;
  background: var(--red);
}

.tag.done {
  color: #fff;
  background: var(--green);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

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

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

th {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
  background: #f9fbfd;
}

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

.rank-1 td {
  background: #fff5c5;
}

.rank-2 td {
  background: #eef2f7;
}

.rank-3 td {
  background: #fff0e4;
}

.empty {
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 14, 24, 0.55);
}

.modal {
  width: min(760px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 20px;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

.full {
  grid-column: 1 / -1;
}

.award-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.award {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.team-card {
  min-height: 92px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 2px 10px rgba(28, 40, 62, 0.04);
}

.team-card img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.team-card span {
  font-weight: 800;
  text-align: left;
}

.award b {
  display: block;
}

@media (max-width: 980px) {
  .login-page,
  .app,
  .grid.two,
  .grid.three,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 360px;
  }

  .sidebar {
    position: static;
    height: auto;
  }
}

@media (max-width: 560px) {
  .content,
  .login-panel,
  .login-visual {
    padding: 20px;
  }

  .topbar {
    display: grid;
  }

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

  .team.away {
    justify-content: flex-start;
    text-align: left;
  }

  .score {
    text-align: left;
  }
}
