:root {
  color-scheme: light;
  --ink: #17211b;
  --muted: #607068;
  --line: #d8e0dc;
  --paper: #f6f8f7;
  --panel: #ffffff;
  --green: #147d52;
  --red: #b33b3b;
  --blue: #245f9d;
  --gold: #bd7b16;
  --shadow: 0 14px 35px rgba(31, 47, 39, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f3f7f5;
  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;
}

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

.shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 42px);
  border-bottom: 1px solid rgba(216, 224, 220, 0.9);
  background: rgba(251, 252, 251, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: #0d5b3b;
  color: #fff;
  font-weight: 900;
}

.brand h1 {
  margin: 0;
  font-size: 18px;
}

.brand p,
.subtle {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.top-actions,
.button-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.language-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.auth-language {
  margin-top: 18px;
  color: #d8ece1;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  border-radius: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.auth-language .lang-btn {
  border-color: rgba(255, 255, 255, 0.25);
}

.lang-btn.active {
  border-color: #0d5b3b;
  background: #0d5b3b;
  color: #fff;
}

.flag {
  position: relative;
  display: inline-block;
  width: 23px;
  height: 15px;
  flex: 0 0 23px;
  overflow: hidden;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.16);
}

.flag-ro {
  background: linear-gradient(90deg, #002b7f 0 33.333%, #fcd116 33.333% 66.666%, #ce1126 66.666% 100%);
}

.flag-en {
  background:
    linear-gradient(90deg, transparent 0 40%, #ce1126 40% 60%, transparent 60% 100%),
    linear-gradient(0deg, transparent 0 34%, #ce1126 34% 66%, transparent 66% 100%),
    #fff;
}

.flag-el {
  background:
    linear-gradient(90deg, transparent 0 29%, #fff 29% 42%, transparent 42% 100%),
    linear-gradient(0deg, transparent 0 29%, #fff 29% 42%, transparent 42% 100%),
    repeating-linear-gradient(0deg, #0d5eaf 0 11.11%, #0d5eaf 11.11% 22.22%, #fff 22.22% 33.33%);
}

.flag-el::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 42%;
  height: 55.5%;
  background:
    linear-gradient(90deg, transparent 0 38%, #fff 38% 62%, transparent 62% 100%),
    linear-gradient(0deg, transparent 0 38%, #fff 38% 62%, transparent 62% 100%),
    #0d5eaf;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 22px;
  padding: 24px clamp(16px, 4vw, 42px) 38px;
}

.rail,
.content {
  display: grid;
  align-content: start;
  gap: 16px;
}

.rail {
  position: sticky;
  top: 82px;
}

.panel,
.auth-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel {
  padding: 16px;
}

.panel h2,
.panel h3,
.auth-box h1 {
  margin: 0 0 12px;
}

.dashboard {
  display: grid;
  gap: 8px;
}

.side-link {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: flex-start;
  border-radius: 8px;
  padding: 9px 12px;
  border: 1px solid transparent;
  background: #f7faf8;
  color: var(--ink);
  font-weight: 800;
  text-align: left;
}

.side-link.active {
  border-color: #0d5b3b;
  background: #0d5b3b;
  color: #fff;
}

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

.metric {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
}

.metric strong {
  display: block;
  font-size: 21px;
}

.btn,
.choice {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.btn.primary,
.choice.active {
  border-color: #0d5b3b;
  background: #0d5b3b;
  color: #fff;
}

.btn.ghost {
  background: transparent;
}

.btn.danger {
  border-color: #f0caca;
  background: #fff4f4;
  color: var(--red);
}

.round-card {
  overflow: hidden;
  padding: 0;
}

.round-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: #f7faf8;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #edf4ef;
  color: #315144;
  font-size: 12px;
  font-weight: 800;
}

.pill.locked {
  background: #fff0d6;
  color: #795111;
}

.matches {
  display: grid;
}

.match-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(110px, 150px) minmax(180px, 1fr) minmax(160px, 210px);
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

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

.team-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 900;
}

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

.team-cell span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-logo {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.team-logo.fallback {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #edf4ef;
  color: #315144;
  font-size: 12px;
  font-weight: 900;
}

.score-block {
  display: grid;
  justify-items: center;
  gap: 2px;
}

.score {
  min-width: 76px;
  text-align: center;
  font-size: 20px;
  font-weight: 900;
}

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

.choice {
  min-width: 44px;
  padding: 8px;
}

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

.standing-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.standing-section h3 {
  margin-bottom: 10px;
}

.standing-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.standing-tab {
  min-height: 40px;
  border-radius: 8px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  background: #f7faf8;
  color: var(--ink);
  font-weight: 900;
}

.standing-tab.active {
  border-color: #0d5b3b;
  background: #0d5b3b;
  color: #fff;
}

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

th,
td {
  padding: 10px 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

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

.green {
  color: var(--green);
  font-weight: 900;
}

.red {
  color: var(--red);
  font-weight: 900;
}

.mini-list {
  display: grid;
  gap: 8px;
}

.mini-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

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

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

.auth-box {
  width: min(940px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.auth-intro {
  padding: 34px;
  background: #123f2d;
  color: #fff;
}

.auth-intro p {
  color: #cfe4d8;
}

.auth-note {
  font-size: 13px;
}

.auth-forms {
  display: grid;
  gap: 18px;
  padding: 26px;
}

.form {
  display: grid;
  gap: 10px;
}

.league-setup {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(15, 138, 95, 0.22);
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fbf9, #eef7f2);
}

.league-setup h3 {
  margin: 0;
  font-size: 16px;
}

.league-mode-row,
.auth-league-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.radio-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f5faf7);
  color: var(--ink);
  box-shadow: 0 10px 22px rgba(8, 22, 18, 0.05);
}

.radio-card input {
  width: auto;
  min-height: 0;
}

.league-mode-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(15, 138, 95, 0.12);
  font-size: 20px;
}

.radio-card:has(input:checked) {
  border-color: rgba(15, 138, 95, 0.55);
  background: linear-gradient(180deg, rgba(15, 138, 95, 0.14), rgba(245, 181, 63, 0.08));
}

.is-hidden {
  display: none !important;
}

.invite-card {
  display: grid;
  gap: 6px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgba(245, 181, 63, 0.35);
  border-radius: 8px;
  background: rgba(245, 181, 63, 0.12);
}

.invite-card span,
.invite-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.invite-card code {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  font-weight: 900;
}

.invite-card label {
  gap: 5px;
}

.invite-card input {
  min-height: 36px;
  font-size: 12px;
}

.small-btn {
  min-height: 36px;
  padding: 8px 10px;
}

.league-manager {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(15, 138, 95, 0.25);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.league-manager select,
.league-manager input {
  min-height: 36px;
}

.league-actions {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 8px;
}

.league-actions summary {
  cursor: pointer;
  font-weight: 900;
}

.league-actions form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

input[readonly] {
  background: #eef3f0;
  color: var(--muted);
  cursor: not-allowed;
}

.message {
  min-height: 22px;
  color: var(--red);
  font-weight: 800;
}

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

.admin-match {
  display: grid;
  grid-template-columns: 1fr 80px 80px 150px auto;
  align-items: end;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.admin-match:last-child {
  border-bottom: 0;
}

.locked-field {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
}

.locked-field span,
.locked-field small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.locked-field strong {
  font-size: 20px;
}

.admin-match-readonly {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 90px 110px 180px;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.admin-match-readonly:last-child {
  border-bottom: 0;
}

.bet-approval-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.bet-approval-card {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 2fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
}

.pick-strip {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pick {
  display: inline-grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 900;
}

.ticket-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
}

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

.ticket-picks {
  display: grid;
  gap: 8px;
}

.ticket-pick {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 44px 110px;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ticket-pick strong {
  display: inline-grid;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: #edf4ef;
}

.ticket-pick.correct small {
  color: var(--green);
  font-weight: 900;
}

.ticket-pick.wrong small {
  color: var(--red);
  font-weight: 900;
}

.ticket-pick.pending small {
  color: var(--muted);
  font-weight: 900;
}

.winner-banner {
  margin: 10px 0 0;
  padding: 10px;
  border-radius: 8px;
  background: #e9f8ef;
  color: var(--green);
  font-weight: 900;
}

@media (max-width: 1060px) {
  .layout,
  .auth-box {
    grid-template-columns: 1fr;
  }

  .rail {
    position: static;
    order: -1;
  }

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

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

  .admin-grid,
  .admin-match,
  .admin-match-readonly,
  .bet-approval-card,
  .ticket-pick {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar,
  .round-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .team-cell.right,
  .score-block {
    justify-content: flex-start;
    justify-items: start;
    text-align: left;
  }
}

/* Modern app layer */
:root {
  --ink: #101816;
  --muted: #62716d;
  --line: #dbe4df;
  --paper: #f6f8fb;
  --panel: #ffffff;
  --green: #0f6b46;
  --green-2: #13865a;
  --red: #ba3f4a;
  --blue: #235c99;
  --gold: #c78420;
  --navy: #10202b;
  --shadow: 0 18px 48px rgba(23, 38, 32, 0.11);
}

body {
  background:
    linear-gradient(180deg, #f8fafc 0%, #eef5f1 48%, #f7f8fb 100%);
}

.topbar {
  border-bottom: 1px solid rgba(16, 32, 43, 0.1);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 30px rgba(16, 32, 43, 0.06);
}

.brand {
  padding: 4px 0;
}

.mark {
  background: linear-gradient(135deg, #0b3f2d, #168459);
  box-shadow: 0 10px 24px rgba(15, 107, 70, 0.24);
  letter-spacing: 0;
}

.brand h1 {
  font-size: 19px;
  letter-spacing: 0;
}

.layout {
  grid-template-columns: minmax(0, 1fr) minmax(310px, 360px);
  gap: 24px;
}

.panel,
.auth-box {
  border-color: rgba(16, 32, 43, 0.1);
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

.panel h2 {
  font-size: 25px;
  letter-spacing: 0;
}

.panel h3 {
  font-size: 17px;
  letter-spacing: 0;
}

.dashboard {
  gap: 9px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbf9 100%);
}

.dashboard h2 {
  margin-bottom: 6px;
}

.side-link {
  position: relative;
  min-height: 46px;
  background: #f3f7f5;
  color: #1c2824;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.side-link:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 107, 70, 0.24);
  background: #eef6f1;
}

.side-link.active {
  border-color: transparent;
  background: #10202b;
  color: #fff;
  box-shadow: inset 4px 0 0 var(--green-2), 0 10px 20px rgba(16, 32, 43, 0.14);
}

.btn,
.choice,
.standing-tab,
.lang-btn {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.btn:hover:not(:disabled),
.choice:hover:not(:disabled),
.standing-tab:hover,
.lang-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(16, 32, 43, 0.08);
}

.btn.primary,
.choice.active,
.standing-tab.active,
.lang-btn.active {
  border-color: transparent;
  background: #0f6b46;
  color: #fff;
  box-shadow: 0 10px 20px rgba(15, 107, 70, 0.2);
}

.btn.danger {
  border-color: #f2c8cf;
  background: #fff5f6;
}

.metric {
  background: linear-gradient(180deg, #ffffff, #f5f8f7);
}

.metric strong {
  font-size: 23px;
  letter-spacing: 0;
}

.round-card {
  border-color: rgba(16, 32, 43, 0.11);
}

.round-head {
  background:
    linear-gradient(135deg, #10202b 0%, #17372d 64%, #1b442f 100%);
  color: #fff;
}

.round-head .subtle,
.round-head p {
  color: #d8ebe2;
}

.round-head .pill {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.round-head .pill.locked {
  background: rgba(199, 132, 32, 0.18);
  color: #ffe2a6;
}

.match-row {
  background: #fff;
  transition: background 0.18s ease;
}

.match-row:hover {
  background: #f8fbf9;
}

.score {
  color: #10202b;
  font-size: 22px;
}

.score-block .subtle {
  font-size: 12px;
}

.team-logo {
  box-shadow: 0 5px 12px rgba(16, 32, 43, 0.08);
}

.choice {
  background: #f8faf9;
  font-weight: 900;
}

.choice.active {
  background: #10202b;
}

.pill {
  background: #eef5f1;
  color: #244a3a;
}

.pill.locked {
  background: #fff3d8;
  color: #7b5316;
}

.standing-tabs {
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f7f6;
}

.standing-tab {
  background: transparent;
}

table {
  border-spacing: 0;
}

tbody tr {
  transition: background 0.16s ease;
}

tbody tr:hover {
  background: #f7faf8;
}

th {
  color: #52645f;
}

.auth-page {
  background:
    linear-gradient(135deg, rgba(16, 32, 43, 0.96), rgba(15, 107, 70, 0.92)),
    #10202b;
}

.auth-box {
  border-color: rgba(255, 255, 255, 0.14);
}

.auth-intro {
  background:
    linear-gradient(160deg, #10202b 0%, #0f6b46 100%);
}

.auth-intro h1 {
  font-size: 32px;
  line-height: 1.05;
}

.auth-forms {
  background: #fff;
}

.admin-match-readonly,
.bet-approval-card,
.ticket-card,
.locked-field {
  background: linear-gradient(180deg, #ffffff, #f7faf8);
}

.ticket-pick {
  background: #fff;
}

.ticket-pick.correct {
  border-color: rgba(15, 107, 70, 0.22);
  background: #f0faf4;
}

.ticket-pick.wrong {
  border-color: rgba(186, 63, 74, 0.22);
  background: #fff6f7;
}

.winner-banner {
  border: 1px solid rgba(15, 107, 70, 0.18);
  background: #e9f8ef;
}

.rules-panel {
  overflow: hidden;
  padding: 0;
}

.rules-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  background:
    linear-gradient(135deg, #10202b 0%, #14362d 58%, #0f6b46 100%);
  color: #fff;
}

.rules-hero h2 {
  margin: 4px 0 8px;
  font-size: 30px;
}

.rules-hero p {
  max-width: 650px;
  margin: 0;
  color: #dbeee5;
}

.eyebrow {
  color: #f0bf5b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.rules-badge {
  display: grid;
  min-width: 138px;
  align-content: center;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.rules-badge span {
  color: #dbeee5;
  font-size: 12px;
  font-weight: 900;
}

.rules-badge strong {
  font-size: 26px;
}

.rules-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.rules-summary div {
  display: grid;
  gap: 4px;
  padding: 14px 18px;
  background: #fff;
}

.rules-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.rules-summary strong {
  color: var(--ink);
}

.rules-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 18px 22px 22px;
  list-style: none;
  counter-reset: rules;
}

.rules-list li {
  position: relative;
  min-height: 48px;
  padding: 13px 14px 13px 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #24332e;
  font-weight: 750;
}

.rules-list li::before {
  counter-increment: rules;
  content: counter(rules);
  position: absolute;
  left: 13px;
  top: 50%;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: #10202b;
  color: #fff;
  font-weight: 900;
  transform: translateY(-50%);
}

@media (max-width: 1060px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .rail {
    top: auto;
  }

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

@media (max-width: 640px) {
  .layout {
    padding: 14px 12px 28px;
  }

  .topbar {
    padding: 12px;
  }

  .top-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .language-switcher {
    width: 100%;
  }

  .lang-btn {
    flex: 1 1 auto;
  }

  .rules-hero {
    flex-direction: column;
    padding: 18px;
  }

  .rules-hero h2 {
    font-size: 25px;
  }

  .rules-list {
    padding: 14px;
  }

  .rules-list li {
    padding-right: 12px;
  }
}

/* Neo sport visual pass */
:root {
  --ink: #0b1412;
  --muted: #6c7b76;
  --line: #d7e2dc;
  --paper: #eef4f1;
  --panel: #ffffff;
  --green: #0f8a5f;
  --green-2: #19b57d;
  --red: #d04755;
  --gold: #f0b84c;
  --navy: #0b171f;
  --shadow: 0 22px 60px rgba(6, 18, 15, 0.16);
}

body {
  background:
    linear-gradient(90deg, rgba(13, 105, 73, 0.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(13, 105, 73, 0.052) 1px, transparent 1px),
    linear-gradient(180deg, #f8fbf9 0%, #e9f2ee 46%, #f8faf9 100%);
  background-size: 36px 36px, 36px 36px, auto;
}

.shell {
  color: var(--ink);
}

.topbar {
  min-height: 76px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(135deg, rgba(10, 23, 31, 0.98), rgba(10, 55, 41, 0.96));
  color: #fff;
  box-shadow: 0 16px 42px rgba(8, 17, 23, 0.2);
}

.brand h1 {
  color: #fff;
}

.brand p {
  color: #b8cdc5;
}

.mark {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(135deg, #15a46f, #0b5d43);
  box-shadow: 0 0 0 5px rgba(25, 181, 125, 0.12), 0 16px 30px rgba(0, 0, 0, 0.24);
}

.topbar .btn,
.topbar .lang-btn {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.topbar .lang-btn.active {
  background: #f0b84c;
  color: #111a16;
}

.topbar .btn.danger {
  border-color: rgba(208, 71, 85, 0.36);
  background: rgba(208, 71, 85, 0.14);
  color: #ffd6da;
}

.layout {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 370px);
}

.content {
  gap: 18px;
}

.stage-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 18px;
  overflow: hidden;
  min-height: 190px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(11, 23, 31, 0.98) 0%, rgba(16, 73, 55, 0.96) 58%, rgba(18, 112, 78, 0.96) 100%);
  color: #fff;
  box-shadow: 0 26px 70px rgba(6, 18, 15, 0.2);
}

.stage-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  pointer-events: none;
}

.stage-copy,
.stage-metrics {
  position: relative;
  z-index: 1;
}

.stage-copy {
  display: grid;
  align-content: end;
  gap: 12px;
}

.stage-copy h2 {
  margin: 0;
  max-width: 760px;
  color: #fff;
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1;
}

.stage-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.stage-pills span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #e6f4ee;
  font-size: 13px;
  font-weight: 850;
}

.stage-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.stage-metrics div {
  display: grid;
  gap: 4px;
  min-height: 50px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
}

.stage-metrics span {
  color: #b8cdc5;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.stage-metrics strong {
  overflow-wrap: anywhere;
  color: #fff;
  font-size: clamp(18px, 2.8vw, 28px);
  line-height: 1;
}

.panel {
  border-color: rgba(8, 22, 18, 0.1);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.rail {
  gap: 14px;
}

.rail .panel {
  border-color: rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(15, 29, 36, 0.96), rgba(13, 44, 34, 0.96));
  color: #fff;
}

.rail .panel h2 {
  color: #fff;
}

.rail .subtle,
.rail label,
.rail .mini-row span {
  color: #b8cdc5;
}

.rail select {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.rail option {
  color: #0b1412;
}

.dashboard {
  gap: 10px;
}

.side-link {
  min-height: 48px;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.07);
  color: #eaf6f0;
}

.side-link:hover {
  border-color: rgba(240, 184, 76, 0.4);
  background: rgba(255, 255, 255, 0.12);
}

.side-link.active {
  background: #f0b84c;
  color: #101816;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.rail .metric {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.rail .metric strong {
  color: #fff;
}

.rail .winner-banner {
  border-color: rgba(25, 181, 125, 0.35);
  background: rgba(25, 181, 125, 0.14);
  color: #b8ffdc;
}

.mini-row {
  border-color: rgba(255, 255, 255, 0.1);
}

.round-card {
  background: transparent;
}

.round-head {
  min-height: 104px;
  background:
    linear-gradient(135deg, #f7fbf9 0%, #eef6f1 100%);
  color: var(--ink);
}

.round-head h2 {
  color: var(--ink);
}

.round-head .pill {
  border: 1px solid rgba(15, 138, 95, 0.18);
  background: #e9f7ef;
  color: #0c6244;
}

.round-head .pill.locked {
  border-color: rgba(240, 184, 76, 0.32);
  background: #fff4dc;
  color: #7b5316;
}

.matches {
  gap: 10px;
  padding: 12px;
  background: #edf4f0;
}

.match-row {
  min-height: 88px;
  border: 1px solid rgba(8, 22, 18, 0.08);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 25px rgba(8, 22, 18, 0.055);
}

.match-row:last-child {
  border-bottom: 1px solid rgba(8, 22, 18, 0.08);
}

.score {
  min-width: 84px;
  color: #0b171f;
  font-size: 25px;
}

.score-block {
  padding: 8px;
  border: 1px solid #dfe8e3;
  border-radius: 8px;
  background: #f8fbf9;
}

.team-logo {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
}

.choices {
  gap: 7px;
}

.choice {
  min-height: 42px;
  border-color: #dce7e1;
  background: #f6faf8;
}

.choice.active {
  background: #0b171f;
  color: #fff;
}

.btn.primary {
  background: linear-gradient(135deg, #0f8a5f, #19b57d);
  color: #fff;
}

.standing-tabs {
  border-color: #d8e4de;
  background: #edf4f0;
}

.standing-tab.active {
  background: #0b171f;
  color: #fff;
}

th {
  color: #6f807a;
  background: #f3f7f5;
}

td {
  background: rgba(255, 255, 255, 0.7);
}

.rules-hero {
  min-height: 170px;
  background:
    linear-gradient(120deg, #0b171f 0%, #174534 58%, #0f8a5f 100%);
}

.rules-badge {
  background: rgba(255, 255, 255, 0.12);
}

.rules-list {
  background: #edf4f0;
}

.rules-list li {
  box-shadow: 0 10px 22px rgba(8, 22, 18, 0.055);
}

.auth-page {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(135deg, #081218, #0b553d 72%, #0f8a5f);
  background-size: 38px 38px, 38px 38px, auto;
}

.auth-box {
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.36);
}

.auth-box-narrow {
  width: min(760px, 100%);
  grid-template-columns: 0.9fr 1.1fr;
}

.compact-form {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf9;
}

.compact-form h2 {
  font-size: 18px;
}

.auth-intro {
  background:
    linear-gradient(150deg, #071016 0%, #0a392b 56%, #0f8a5f 100%);
}

@media (max-width: 1060px) {
  .stage-hero {
    grid-template-columns: 1fr;
  }

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

  .rail .panel {
    background:
      linear-gradient(180deg, rgba(15, 29, 36, 0.98), rgba(13, 44, 34, 0.98));
  }
}

@media (max-width: 760px) {
  .stage-metrics {
    grid-template-columns: 1fr;
  }

  .league-mode-row,
  .auth-league-grid {
    grid-template-columns: 1fr;
  }

  .stage-hero {
    min-height: auto;
    padding: 18px;
  }

  .match-row {
    min-height: 0;
  }

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

.users-stack {
  display: grid;
  gap: 16px;
}

.competition-box {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(15, 138, 95, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fbf9, #eef7f2);
}

.competition-box h3 {
  margin: 0;
}

.no-rounds-panel {
  display: grid;
  gap: 12px;
  min-height: 180px;
  align-content: center;
  border-color: rgba(240, 184, 76, 0.28);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 231, 0.96));
}

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

.dashboard-tools {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tool-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 6px 2px;
  border: 0;
  background: transparent;
  color: #aebeb8;
  font-weight: 850;
  text-align: left;
}

.tool-row:hover {
  color: #fff;
}

.tool-icon {
  position: relative;
  display: inline-block;
  width: 21px;
  height: 21px;
  color: currentColor;
}

.tool-icon.bell::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 3px;
  width: 11px;
  height: 12px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 2px 2px;
}

.tool-icon.bell::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 15px;
  width: 13px;
  height: 2px;
  border-radius: 3px;
  background: currentColor;
  box-shadow: 5px 3px 0 -1px currentColor;
}

.tool-icon.sun {
  border: 2px solid currentColor;
  border-radius: 50%;
  transform: scale(0.58);
  box-shadow:
    0 -17px 0 -7px currentColor,
    0 17px 0 -7px currentColor,
    17px 0 0 -7px currentColor,
    -17px 0 0 -7px currentColor,
    12px 12px 0 -7px currentColor,
    -12px 12px 0 -7px currentColor,
    12px -12px 0 -7px currentColor,
    -12px -12px 0 -7px currentColor;
}

[data-theme="light"] body {
  background:
    linear-gradient(90deg, rgba(15, 138, 95, 0.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(15, 138, 95, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, #fbfdfc 0%, #eef5f1 100%);
  background-size: 38px 38px, 38px 38px, auto;
}

[data-theme="light"] .topbar {
  border-bottom-color: rgba(8, 22, 18, 0.1);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

[data-theme="light"] .brand h1 {
  color: var(--ink);
}

[data-theme="light"] .brand p,
[data-theme="light"] .topbar .language-switcher {
  color: var(--muted);
}

[data-theme="light"] .topbar .btn,
[data-theme="light"] .topbar .lang-btn {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

[data-theme="light"] .topbar .lang-btn.active {
  background: var(--green);
  color: #fff;
}

[data-theme="light"] .topbar .btn.danger {
  border-color: #f2c8cf;
  background: #fff5f6;
  color: var(--red);
}

[data-theme="light"] .rail .panel {
  border-color: rgba(8, 22, 18, 0.1);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
}

[data-theme="light"] .rail .panel h2 {
  color: var(--ink);
}

[data-theme="light"] .rail .subtle,
[data-theme="light"] .rail label,
[data-theme="light"] .rail .mini-row span {
  color: var(--muted);
}

[data-theme="light"] .rail select {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

[data-theme="light"] .side-link {
  border-color: transparent;
  background: #f3f7f5;
  color: var(--ink);
}

[data-theme="light"] .side-link.active {
  background: #0b171f;
  color: #fff;
}

[data-theme="light"] .rail .metric {
  border-color: var(--line);
  background: #f8fbf9;
}

[data-theme="light"] .rail .metric strong {
  color: var(--ink);
}

[data-theme="light"] .dashboard-tools,
[data-theme="light"] .mini-row {
  border-color: var(--line);
}

[data-theme="light"] .tool-row {
  color: #5d6c67;
}

[data-theme="light"] .tool-row:hover {
  color: var(--green);
}

.password-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 12px;
}

.reset-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto;
  gap: 8px;
  min-width: 310px;
}

.reset-row input,
.password-form input {
  background: #f8fbf9;
}

@media (max-width: 980px) {
  .password-form,
  .reset-row {
    grid-template-columns: 1fr;
  }

  .reset-row {
    min-width: 220px;
  }
}
