:root {
  color-scheme: dark;
  --bg: #070b0f;
  --panel: #0d141c;
  --panel-2: #121b25;
  --line: rgba(222, 233, 246, 0.18);
  --line-strong: rgba(222, 233, 246, 0.28);
  --text: #f0f5fa;
  --muted: #97a5b5;
  --quiet: #687586;
  --team-primary: #75808f;
  --team-secondary: #d6dde6;
  --bad: #b23b3b;
  --warn: #d68b31;
  --good: #64a548;
  --great: #1f9a63;
  --skill-gradient: linear-gradient(90deg, #a93535 0%, #c86a2e 34%, #c6b93f 55%, #72a947 74%, #1f9a63 100%);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  font-family: "Bahnschrift", "Arial Narrow", "Roboto Condensed", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 84% 8%, color-mix(in srgb, var(--team-primary) 28%, transparent), transparent 32rem),
    linear-gradient(135deg, #06090d 0%, #121923 52%, #070b10 100%);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

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

.team-rail {
  min-height: 100vh;
  border-right: 1px solid var(--line);
  background: rgba(7, 11, 16, 0.92);
  overflow: hidden;
}

.brand-block {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--line);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.brand-block strong {
  font-size: 1.15rem;
}

.brand-block span {
  color: var(--muted);
  font-size: 0.78rem;
}

.team-list {
  height: calc(100vh - 58px);
  overflow: auto;
  padding: 8px;
}

.team-button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  gap: 10px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 6px;
  background: transparent;
  padding: 9px 8px;
  text-align: left;
  cursor: pointer;
}

.team-button:hover,
.team-button.active {
  background: rgba(255, 255, 255, 0.055);
  border-left-color: var(--team-secondary);
}

.team-button img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.team-button strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.98rem;
}

.team-button span,
.team-button small {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.workspace {
  min-width: 0;
  padding: 18px;
}

.team-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  min-height: 166px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 24px;
  background:
    linear-gradient(115deg, color-mix(in srgb, var(--team-primary) 28%, transparent), transparent 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent),
    #0b1219;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.team-title {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  min-width: 0;
}

.team-logo {
  width: 104px;
  height: 104px;
  object-fit: contain;
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.45));
}

.eyebrow,
.stadium-text,
.panel-kicker,
.metric-label,
.table-label {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.eyebrow {
  font-size: 0.9rem;
}

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

h1 {
  margin-top: 6px;
  font-size: 4rem;
  line-height: 0.92;
  letter-spacing: 0;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.stadium-text {
  margin-top: 10px;
  font-size: 0.86rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 440px;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid color-mix(in srgb, var(--team-secondary) 42%, var(--line));
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.04);
}

.view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.view-tabs button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 9px 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 900;
  cursor: pointer;
}

.view-tabs button:hover,
.view-tabs button.active {
  border-color: color-mix(in srgb, var(--team-secondary) 62%, white);
  color: var(--text);
  background: color-mix(in srgb, var(--team-primary) 22%, rgba(255, 255, 255, 0.06));
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  align-items: start;
}

.main-view,
.player-panel {
  min-width: 0;
}

.panel,
.player-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.045), transparent 36%),
    rgba(9, 15, 22, 0.92);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.panel {
  padding: 18px;
}

.panel + .panel {
  margin-top: 14px;
}

.panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.panel-header h2,
.panel-header h3 {
  font-size: 1.08rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.panel-kicker {
  font-size: 0.76rem;
}

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

.metric {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.035);
}

.metric-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.72rem;
}

.metric strong {
  display: block;
  font-size: 1.65rem;
  line-height: 1;
}

.metric small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
}

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

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

.shortcut-card {
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.shortcut-card:hover {
  border-color: color-mix(in srgb, var(--team-secondary) 62%, white);
  background: color-mix(in srgb, var(--team-primary) 16%, rgba(255, 255, 255, 0.045));
}

.shortcut-card strong,
.shortcut-card span {
  display: block;
}

.shortcut-card strong {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.shortcut-card span {
  margin-top: 9px;
  color: var(--muted);
  line-height: 1.32;
}

.list-stack {
  display: grid;
  gap: 9px;
}

.list-row,
.depth-player,
.game-row,
.coach-row {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.list-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.list-row button,
.name-button {
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  text-align: left;
  font-weight: 900;
  cursor: pointer;
}

.name-button:hover {
  color: color-mix(in srgb, var(--team-secondary) 76%, white);
}

.player-link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.player-link:hover {
  color: color-mix(in srgb, var(--team-secondary) 76%, white);
  border-bottom-color: color-mix(in srgb, var(--team-secondary) 76%, white);
}

.strong-link {
  font-weight: 900;
}

.subtle {
  color: var(--muted);
  font-size: 0.86rem;
}

.grade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  font-weight: 900;
}

.skill-bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.skill-bar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--rating, 50%);
  background: var(--skill-gradient);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px;
  gap: 10px;
  margin-bottom: 12px;
}

.toolbar input,
.toolbar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0c141d;
  color: var(--text);
  padding: 10px 11px;
  outline: none;
}

.toolbar input:focus,
.toolbar select:focus {
  border-color: color-mix(in srgb, var(--team-secondary) 60%, white);
}

.roster-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

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

.roster-table th {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.76rem;
}

.roster-table tr {
  cursor: pointer;
}

.roster-table tbody tr:hover,
.roster-table tbody tr.selected {
  background: rgba(255, 255, 255, 0.055);
}

.player-cell {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 220px;
}

.avatar,
.panel-photo,
.initial-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.035)),
    color-mix(in srgb, var(--team-primary) 72%, black);
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-weight: 900;
}

.avatar img,
.panel-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.scroll-table {
  overflow: auto;
}

.depth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.depth-card h3 {
  margin-bottom: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.88rem;
}

.depth-player {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
}

.depth-rank {
  color: var(--muted);
  font-weight: 900;
}

.game-row {
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
}

.game-week {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 900;
}

.coach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.pick-grid,
.division-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.pick-card {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.pick-card h3 {
  margin-bottom: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
}

.mini-table th,
.mini-table td {
  border-bottom: 1px solid var(--line);
  padding: 7px 6px;
  text-align: left;
}

.mini-table th {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.7rem;
}

.transaction-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.transaction-row > div:last-child {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.coach-row h3 {
  font-size: 1.2rem;
}

.coach-ratings {
  display: grid;
  gap: 7px;
}

.coach-rating {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 64px;
  gap: 9px;
  align-items: center;
}

.player-panel {
  position: sticky;
  top: 18px;
  padding: 16px;
}

.panel-photo {
  width: 100%;
  aspect-ratio: 1.12;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 4rem;
  font-weight: 900;
}

.initial-avatar {
  width: 100%;
  height: 100%;
  font-size: 4rem;
  font-weight: 900;
}

.player-panel h2 {
  font-size: 2.05rem;
  line-height: 0.96;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.panel-meta {
  margin-top: 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 900;
}

.player-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.fact {
  border-top: 1px solid var(--line);
  padding-top: 9px;
}

.fact span {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.7rem;
  font-weight: 900;
}

.fact strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.panel-role {
  display: grid;
  gap: 9px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.empty-state {
  padding: 16px;
  color: var(--muted);
}

.negative {
  color: #ff8585;
}

.positive {
  color: #83d68e;
}

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

  .team-rail {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .team-list {
    display: flex;
    height: auto;
    overflow-x: auto;
  }

  .team-button {
    min-width: 210px;
  }

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

  .player-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .workspace {
    padding: 10px;
  }

  .team-hero {
    display: grid;
    padding: 18px;
  }

  .team-title {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .team-logo {
    width: 76px;
    height: 76px;
  }

  h1 {
    font-size: 2.55rem;
  }

  .metric-grid,
  .split-grid,
  .shortcut-grid,
  .pick-grid,
  .division-grid {
    grid-template-columns: 1fr;
  }

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

  .roster-table th:nth-child(4),
  .roster-table td:nth-child(4),
  .roster-table th:nth-child(5),
  .roster-table td:nth-child(5) {
    display: none;
  }

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