:root {
  --bg: #0b0f16;
  --panel: #121925;
  --panel-2: #172131;
  --line: #263348;
  --text: #f4f7fb;
  --muted: #97a6ba;
  --green: #3ddc97;
  --red: #ff647c;
  --gold: #f5c451;
  --blue: #65a7ff;
}

* {
  box-sizing: border-box;
}

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

.topbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 18px 24px;
}

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

h1 {
  font-size: 32px;
  line-height: 1;
}

h2 {
  font-size: 30px;
  margin-top: 8px;
}

h3 {
  font-size: 18px;
}

main {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 1480px;
  padding: 20px;
}

.eyebrow {
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.version,
.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 8px 12px;
}

.pill.gold {
  border-color: rgba(245, 196, 81, 0.55);
  color: var(--gold);
}

.hero {
  align-items: center;
  background: linear-gradient(135deg, #142033, #101722);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 22px;
}

.subtle {
  color: var(--muted);
  line-height: 1.5;
  margin-top: 10px;
  max-width: 760px;
}

.hero-actions,
.table-tools {
  align-items: center;
  display: flex;
  gap: 10px;
}

button,
select {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  padding: 10px 12px;
}

button {
  cursor: pointer;
}

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

.metrics.embedded {
  border-bottom: 1px solid var(--line);
  padding: 14px;
}

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

.metric .label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.metric .value {
  font-size: 24px;
  font-weight: 900;
  margin-top: 8px;
}

.metric.good .value {
  color: var(--green);
}

.metric.bad .value {
  color: var(--red);
}

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

.section-grid.narrow {
  grid-template-columns: 1.25fr 0.75fr;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  overflow: hidden;
}

.winner-panel {
  border-color: rgba(245, 196, 81, 0.45);
}

.panel-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
}

.panel-head.compact {
  background: rgba(255, 255, 255, 0.025);
  padding: 12px 14px;
}

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

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

th,
td {
  border-bottom: 1px solid rgba(38, 51, 72, 0.72);
  font-size: 13px;
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
}

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

td.num,
th.num {
  text-align: right;
}

.player-main {
  font-weight: 850;
}

.player-sub {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

.gap-list,
.health-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.gap-item,
.health-item {
  align-items: center;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 70px 1fr auto;
  padding: 10px;
}

.gap-score {
  font-weight: 900;
}

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

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

.health-item {
  grid-template-columns: 1fr auto;
}

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

.upload-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  padding: 16px;
}

.week-strip {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 14px 16px;
}

.week-strip strong {
  display: block;
  margin-top: 4px;
}

.dropzone {
  align-items: center;
  background: rgba(101, 167, 255, 0.08);
  border: 1px dashed rgba(101, 167, 255, 0.72);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  justify-items: center;
  min-height: 210px;
  padding: 22px;
  text-align: center;
}

.dropzone.dragging {
  background: rgba(61, 220, 151, 0.1);
  border-color: var(--green);
}

.dropzone input {
  display: none;
}

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

.upload-checklist {
  display: grid;
  gap: 10px;
}

.check-item {
  align-items: center;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 28px 1fr auto;
  padding: 11px;
}

.check-dot {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.check-item.done .check-dot {
  border-color: rgba(61, 220, 151, 0.7);
  color: var(--green);
}

.check-label {
  font-weight: 850;
}

.check-help {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.check-file {
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.upload-results {
  border-top: 1px solid var(--line);
}

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

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

.status-optional {
  color: var(--gold);
  font-weight: 900;
}

.status-scheduled {
  color: var(--blue);
  font-weight: 900;
}

@media (max-width: 1050px) {
  .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .section-grid,
  .section-grid.narrow,
  .upload-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar,
  .hero,
  .panel-head,
  .week-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .week-strip {
    display: flex;
  }

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

  main {
    padding: 12px;
  }

  h2 {
    font-size: 24px;
  }
}
