:root {
  --bg: #f2f2f2;
  --surface: #ffffff;
  --surface-muted: #eeeeee;
  --ink: #111111;
  --muted: #686868;
  --line: #d1d1d1;
  --black: #050505;
  --black-2: #202020;
  --gray: #777777;
  --gray-2: #4a4a4a;
  --gray-3: #c8c8c8;
  --chalk: #ffffff;
  --green: var(--black);
  --green-2: var(--black-2);
  --red: var(--gray-2);
  --gold: var(--gray);
  --blue: var(--gray-2);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.13);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.022) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.016) 0 1px, transparent 1px 11px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(242, 242, 242, 0.96)),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.86)),
    url("assets/strategy-table.png") center / cover;
}

.login-panel {
  display: grid;
  width: min(430px, 100%);
  gap: 18px;
  border: 1px solid #bdbdbd;
  border-radius: 8px;
  background: #ffffff;
  padding: 28px;
  box-shadow: var(--shadow);
}

.login-panel h1 {
  margin: 5px 0 0;
  font-size: 30px;
  line-height: 1.08;
}

.login-panel .primary-button {
  min-height: 46px;
}

.form-status {
  min-height: 20px;
  margin: 0;
  color: #4a4a4a;
  font-size: 13px;
  font-weight: 700;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-right: 1px solid var(--line);
  background: #f7f7f7;
  padding: 24px;
}

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

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  background: var(--black);
  color: var(--chalk);
  box-shadow: 0 0 0 2px var(--black);
  font-weight: 800;
  letter-spacing: 0;
}

.brand h1,
.brand p,
.section-heading h3,
.section-heading p,
.hero h2,
.hero p {
  margin: 0;
}

.brand h1 {
  font-size: 20px;
  line-height: 1.1;
}

.brand p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.main {
  min-width: 0;
  padding: 24px;
}

.panel,
.game-card,
.results-column,
.import-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.panel {
  padding: 16px;
}

.panel.compact {
  padding-bottom: 14px;
}

.section-title,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-title {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
}

input {
  height: 38px;
  padding: 0 10px;
}

textarea {
  resize: vertical;
  padding: 10px;
  line-height: 1.45;
}

input:focus,
textarea:focus {
  border-color: rgba(0, 0, 0, 0.82);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.icon-button,
.tab,
.player-button,
.pick-option {
  border: 1px solid transparent;
  border-radius: 7px;
  min-height: 38px;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.primary-button {
  background: var(--green);
  color: #fff;
  padding: 0 14px;
  font-weight: 800;
}

.primary-button:hover {
  background: var(--green-2);
}

.secondary-button {
  border-color: rgba(0, 0, 0, 0.28);
  background: var(--surface);
  color: var(--black);
  padding: 0 14px;
  font-weight: 800;
}

.secondary-button:hover {
  border-color: var(--green);
}

.ghost-button {
  min-height: 30px;
  background: transparent;
  color: var(--green);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
}

.ghost-button:hover {
  background: rgba(0, 0, 0, 0.07);
}

.danger-button {
  border-color: #111111;
  background: #ffffff;
  color: #111111;
  padding: 0 14px;
  font-weight: 850;
}

.danger-button:hover {
  background: #111111;
  color: #ffffff;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-color: var(--line);
  background: var(--surface);
  color: var(--muted);
  font-weight: 900;
}

.icon-button:hover {
  border-color: rgba(0, 0, 0, 0.46);
  color: var(--red);
}

.hero {
  position: relative;
  display: flex;
  min-height: 238px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--black);
  box-shadow: var(--shadow);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.04) brightness(0.78);
}

.hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.96), rgba(0, 0, 0, 0.74) 44%, rgba(0, 0, 0, 0.18)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.36), rgba(0, 0, 0, 0));
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(620px, 100%);
  padding: 34px;
  color: var(--chalk);
}

.eyebrow {
  color: #bdbdbd;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h2 {
  margin-top: 8px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-actions .primary-button,
.hero-actions .secondary-button {
  min-height: 46px;
  border: 2px solid #ffffff;
  padding: 0 20px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.38);
}

.hero-actions .primary-button {
  background: #ffffff;
  color: #050505;
}

.hero-actions .primary-button:hover {
  background: #dedede;
}

.hero-actions .secondary-button {
  background: rgba(5, 5, 5, 0.86);
  color: #ffffff;
}

.hero-actions .secondary-button:hover {
  background: #ffffff;
  color: #050505;
}

.hero-actions button:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 22px 0;
  border-bottom: 1px solid var(--line);
}

.tab {
  position: relative;
  height: 42px;
  background: transparent;
  color: var(--muted);
  padding: 0 14px;
  font-weight: 850;
}

.tab.is-active {
  color: var(--black);
}

.tab.is-active::after {
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: var(--black);
  content: "";
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.section-heading {
  margin-bottom: 16px;
}

.section-heading h3 {
  margin-top: 4px;
  font-size: 24px;
  line-height: 1.1;
}

.games-list,
.pick-board,
.parlay-list,
.trend-list {
  display: grid;
  gap: 12px;
}

.game-card {
  padding: 16px;
}

.game-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.league-input {
  width: 120px;
  height: 28px;
  margin-bottom: 8px;
  border: 0;
  background: var(--black);
  color: var(--chalk);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.matchup-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
  align-items: center;
  gap: 8px;
  max-width: 560px;
}

.matchup-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.matchup-row input {
  height: 44px;
  font-size: 18px;
  font-weight: 850;
}

.team-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--team-primary, var(--ink));
  font-weight: 950;
}

.team-name::before {
  display: inline-block;
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border: 2px solid var(--team-secondary, var(--gray-3));
  border-radius: 50%;
  background: var(--team-primary, var(--black));
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.14);
  content: "";
}

.matchup-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.matchup-title .at {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.team-field {
  color: var(--team-primary, var(--ink));
  font-weight: 850;
}

.leg-meta .matchup-title,
.trend-meta .matchup-title {
  display: inline-flex;
  vertical-align: middle;
}

.leg-meta .team-name,
.trend-meta .team-name {
  gap: 5px;
  font-weight: 850;
}

.leg-meta .team-name::before,
.trend-meta .team-name::before {
  width: 7px;
  height: 7px;
  flex-basis: 7px;
  border-width: 1px;
}

.odds-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 12px;
}

.import-panel {
  margin-top: 16px;
}

.import-panel summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 850;
}

.import-body {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 0 16px 16px;
}

.helper {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-gate,
.admin-content {
  display: grid;
  gap: 16px;
}

.admin-lock {
  display: grid;
  gap: 16px;
  max-width: 680px;
}

.admin-lock h4 {
  margin: 4px 0 0;
  font-size: 22px;
}

.admin-unlock-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.admin-board {
  display: grid;
  gap: 12px;
}

.sidebar-logout {
  width: 100%;
  margin-top: 12px;
}

.add-player-form {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(190px, 1.4fr) minmax(170px, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.account-row {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(130px, 1fr) minmax(200px, 1.4fr) minmax(170px, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.account-role {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-muted);
  padding: 9px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.account-role input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.week-reset-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 4px;
  border-color: #9a9a9a;
}

.export-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
  align-items: start;
  gap: 24px;
}

.export-panel h4 {
  margin: 4px 0 0;
  font-size: 18px;
}

.export-panel .helper {
  max-width: 720px;
  margin-top: 6px;
}

.export-actions,
.prompt-body {
  display: grid;
  gap: 10px;
}

.prompt-panel {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-muted);
}

.prompt-panel summary {
  cursor: pointer;
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 850;
}

.prompt-body {
  border-top: 1px solid var(--line);
  padding: 12px;
}

.prompt-body textarea {
  min-height: 280px;
  background: #ffffff;
  font-size: 12px;
}

.prompt-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.prompt-actions .form-status {
  min-height: auto;
}

.week-reset-panel h4 {
  margin: 4px 0 0;
  font-size: 18px;
}

.week-reset-panel .helper {
  max-width: 650px;
  margin-top: 6px;
}

.week-reset-panel .danger-button {
  flex: 0 0 auto;
}

.player-editor {
  display: grid;
  gap: 8px;
}

.player-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.player-dot {
  width: 12px;
  height: 12px;
  justify-self: center;
  border-radius: 50%;
}

.player-switch {
  display: grid;
  gap: 8px;
}

.player-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0 10px;
  text-align: left;
}

.player-button.is-active {
  border-color: rgba(0, 0, 0, 0.62);
  background: rgba(0, 0, 0, 0.07);
}

.status-chip {
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 850;
}

.status-chip.ready {
  background: rgba(0, 0, 0, 0.12);
  color: var(--black);
}

.pick-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.pick-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.pick-card h4 {
  margin: 0;
  font-size: 18px;
}

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

.market {
  display: grid;
  gap: 8px;
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 10px;
}

.market-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pick-options {
  display: grid;
  gap: 7px;
}

.pick-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-color: #d8d8d8;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
}

.pick-option .team-name {
  min-width: 0;
}

.pick-option.is-selected {
  border-color: rgba(0, 0, 0, 0.72);
  background: rgba(0, 0, 0, 0.08);
  color: var(--black);
}

.pick-option small {
  color: var(--muted);
  font-weight: 850;
}

.confidence-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.confidence-row input {
  accent-color: var(--black);
}

.progress-pill,
.stake-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.stake-control input {
  width: 76px;
  height: 30px;
  border-radius: 999px;
  text-align: right;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

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

.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
  line-height: 1;
}

.results-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 16px;
}

.results-column {
  padding: 16px;
}

.parlay-card,
.trend-card,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.parlay-card {
  display: grid;
  gap: 12px;
}

.parlay-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.parlay-head h4 {
  margin: 0;
  font-size: 18px;
}

.payout {
  color: var(--black);
  font-weight: 950;
  text-align: right;
}

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

.leg-list li,
.trend-card {
  display: grid;
  gap: 4px;
}

.leg-title {
  font-weight: 850;
}

.leg-meta,
.trend-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 900;
}

.badge.unanimous {
  background: rgba(0, 0, 0, 0.12);
  color: var(--black);
}

.badge.trend {
  background: rgba(80, 80, 80, 0.15);
  color: var(--gray-2);
}

.badge.payout-badge {
  background: rgba(0, 0, 0, 0.08);
  color: var(--black-2);
}

.empty-state {
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 1050px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .results-grid,
  .market-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .main,
  .sidebar {
    padding: 16px;
  }

  .hero {
    min-height: 270px;
  }

  .hero::after {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.54));
  }

  .hero-content {
    padding: 22px;
  }

  .tabs {
    overflow-x: auto;
  }

  .section-heading,
  .game-card-head,
  .pick-card-head,
  .parlay-head,
  .export-panel,
  .week-reset-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .export-panel {
    grid-template-columns: 1fr;
  }

  .matchup-row,
  .odds-grid,
  .metrics,
  .admin-unlock-row,
  .add-player-form,
  .account-row,
  .player-switch,
  .player-editor {
    grid-template-columns: 1fr;
  }

  .matchup-row span {
    display: none;
  }
}
