:root {
  --ink: #f4f7fb;
  --muted: #95a4b8;
  --navy-950: #07111f;
  --navy-900: #0b1628;
  --navy-800: #111f35;
  --navy-700: #172941;
  --line: rgba(148, 163, 184, 0.2);
  --gold: #f4c84a;
  --green: #38d987;
  --blue: #5ab6ff;
  --red: #f97066;
  --purple: #b78cff;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Aptos", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 0%, rgba(244, 200, 74, 0.12), transparent 28rem),
    linear-gradient(160deg, var(--navy-950), #050a13 60%, #091522);
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(100%, 1160px);
  margin: 0 auto;
  padding: 18px;
}

.hero-card,
.card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(17, 31, 53, 0.96), rgba(9, 21, 34, 0.96));
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 26px;
  overflow: hidden;
  position: relative;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -30px -90px auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: rgba(56, 217, 135, 0.08);
}

.hero-card h1 {
  max-width: 12ch;
  margin: 8px 0 12px;
  font-size: clamp(2rem, 10vw, 4.4rem);
  line-height: 0.9;
  letter-spacing: -0.07em;
}

.hero-card p,
.muted,
.card p {
  color: var(--muted);
  line-height: 1.55;
}

.eyebrow,
.section-heading {
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-metrics,
.button-row,
.score-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.stat-pill {
  border: 1px solid rgba(56, 217, 135, 0.3);
  border-radius: 999px;
  padding: 8px 11px;
  color: #dffcec;
  background: rgba(56, 217, 135, 0.12);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.stat-pill-blue {
  border-color: rgba(90, 182, 255, 0.34);
  color: #dcf0ff;
  background: rgba(90, 182, 255, 0.12);
}

.stat-pill-gold {
  border-color: rgba(244, 200, 74, 0.36);
  color: #fff1b5;
  background: rgba(244, 200, 74, 0.13);
}

.card {
  padding: 18px;
}

.auth-card,
.content-grid,
.report-detail {
  margin-top: 16px;
}

.auth-only {
  display: none !important;
}

body.is-authenticated .auth-only {
  display: grid !important;
}

body.is-authenticated .private-notice {
  display: none;
}

.private-notice {
  margin-top: 16px;
  border-color: rgba(244, 200, 74, 0.34);
  background:
    radial-gradient(circle at 100% 0%, rgba(244, 200, 74, 0.11), transparent 16rem),
    linear-gradient(145deg, rgba(17, 31, 53, 0.96), rgba(9, 21, 34, 0.96));
}

.content-grid {
  display: grid;
  gap: 16px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-heading strong {
  color: var(--muted);
}

.stacked-form,
.list-stack,
.report-detail {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.inline-check {
  display: flex;
  gap: 9px;
  align-items: center;
  align-self: end;
  min-height: 44px;
}

.inline-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--gold);
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  color: var(--ink);
  background: rgba(7, 17, 31, 0.9);
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(244, 200, 74, 0.72);
  box-shadow: 0 0 0 3px rgba(244, 200, 74, 0.12);
}

.primary-button,
.ghost-button {
  border: 0;
  border-radius: 14px;
  padding: 12px 15px;
  color: #07111f;
  background: var(--gold);
  font-weight: 900;
  cursor: pointer;
}

.ghost-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(148, 163, 184, 0.08);
}

.status-line,
.empty-state {
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  padding: 12px;
  color: var(--muted);
  background: rgba(7, 17, 31, 0.45);
}

.team-card,
.report-card {
  display: flex;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  color: var(--ink);
  background: rgba(7, 17, 31, 0.55);
  text-align: left;
  text-decoration: none;
}

.team-card {
  align-items: center;
  justify-content: space-between;
}

.team-card.is-selected {
  border-color: rgba(244, 200, 74, 0.72);
  box-shadow: 0 0 0 3px rgba(244, 200, 74, 0.12);
}

.team-card strong,
.team-card small,
.report-card strong,
.report-card small {
  display: block;
}

.team-card small,
.report-card small {
  margin-top: 3px;
  color: var(--muted);
}

.report-card {
  flex-direction: column;
  gap: 4px;
}

.cloud-studio-card {
  position: relative;
  overflow: hidden;
}

.cloud-studio-card::before {
  content: "";
  position: absolute;
  inset: -60px -90px auto auto;
  width: 190px;
  height: 190px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(90, 182, 255, 0.16), transparent 68%);
  pointer-events: none;
}

.cloud-studio-card > * {
  position: relative;
}

.hidden {
  display: none !important;
}

.cloud-game-box,
.cloud-entry-box,
.cloud-package-box,
.cloud-summary-box,
.cloud-admin-box,
.cloud-review-box,
.cloud-vision-box,
.cloud-render-box {
  border: 1px solid rgba(90, 182, 255, 0.22);
  border-radius: 18px;
  padding: 14px;
  margin: 14px 0;
  background: rgba(7, 17, 31, 0.36);
}

.cloud-game-box {
  border-color: rgba(56, 217, 135, 0.24);
  background: rgba(56, 217, 135, 0.05);
}

.cloud-package-box {
  border-color: rgba(244, 200, 74, 0.24);
  background: rgba(244, 200, 74, 0.05);
}

.cloud-entry-box {
  border-color: rgba(183, 140, 255, 0.24);
  background: rgba(183, 140, 255, 0.05);
}

.cloud-summary-box {
  border-color: rgba(90, 182, 255, 0.28);
  background: rgba(90, 182, 255, 0.05);
}

.cloud-admin-box {
  border-color: rgba(244, 200, 74, 0.3);
  background:
    radial-gradient(circle at 100% 0%, rgba(244, 200, 74, 0.12), transparent 16rem),
    rgba(244, 200, 74, 0.05);
}

.cloud-review-box {
  border-color: rgba(56, 217, 135, 0.25);
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 217, 135, 0.1), transparent 15rem),
    rgba(56, 217, 135, 0.04);
}

.cloud-vision-box {
  border-color: rgba(90, 182, 255, 0.3);
  background:
    radial-gradient(circle at 100% 0%, rgba(90, 182, 255, 0.12), transparent 16rem),
    rgba(90, 182, 255, 0.05);
}

.admin-subhead {
  margin-top: 18px;
}

.cloud-game-form {
  display: grid;
  gap: 12px;
}

.cloud-player-form,
.cloud-event-form,
.team-member-form,
.event-correction-form {
  display: grid;
  gap: 12px;
}

.compact-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.compact-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(7, 17, 31, 0.48);
}

.event-row-button {
  width: 100%;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.event-row-button.is-selected {
  border-color: rgba(244, 200, 74, 0.72);
  box-shadow: 0 0 0 3px rgba(244, 200, 74, 0.1);
}

.compact-row small {
  color: var(--muted);
}

.summary-metrics {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.summary-score-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: rgba(7, 17, 31, 0.55);
}

.summary-score-card small,
.mini-box-score small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.summary-score-card strong {
  display: block;
  margin-top: 4px;
  font-size: 2rem;
  line-height: 1;
}

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

.mini-box-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) repeat(4, 44px);
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(7, 17, 31, 0.48);
}

.mini-box-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.telemetry-grid {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.telemetry-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: rgba(7, 17, 31, 0.52);
}

.telemetry-card small,
.telemetry-event-row small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.telemetry-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.6rem;
  line-height: 1;
}

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

.telemetry-event-row {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(7, 17, 31, 0.48);
}

.telemetry-event-row span {
  color: var(--muted);
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.render-grid {
  display: grid;
  gap: 12px;
}

.render-history-heading {
  margin-top: 16px;
}

.render-job-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(7, 17, 31, 0.48);
}

.render-job-row span {
  min-width: 0;
}

.render-job-row strong,
.render-job-row small {
  display: block;
}

.render-job-row small {
  margin-top: 3px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.render-preview {
  display: block;
  width: 100%;
  max-height: 360px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #020617;
}

.progress-shell {
  width: 100%;
  min-height: 22px;
  border: 1px solid rgba(90, 182, 255, 0.24);
  border-radius: 999px;
  padding: 3px;
  margin: 12px 0;
  background: rgba(7, 17, 31, 0.7);
  overflow: hidden;
}

.progress-shell span {
  display: block;
  width: 0;
  min-height: 14px;
  border-radius: 999px;
  color: #07111f;
  background: linear-gradient(90deg, var(--blue), var(--green));
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 14px;
  text-align: center;
  transition: width 0.18s ease;
}

.game-cloud-card {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px;
  color: var(--ink);
  background: rgba(7, 17, 31, 0.48);
  text-align: left;
  cursor: pointer;
}

.game-cloud-card.is-selected {
  border-color: rgba(244, 200, 74, 0.72);
  box-shadow: 0 0 0 3px rgba(244, 200, 74, 0.12);
}

.video-cloud-card {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
  color: var(--ink);
  background: rgba(7, 17, 31, 0.48);
  text-align: left;
  cursor: pointer;
}

.video-cloud-card.is-selected {
  border-color: rgba(56, 217, 135, 0.62);
  box-shadow: 0 0 0 3px rgba(56, 217, 135, 0.1);
}

.video-cloud-card strong,
.video-cloud-card small {
  display: block;
}

.video-cloud-card small {
  margin-top: 4px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.review-actions {
  margin-top: 12px;
}

.event-correction-form {
  border: 1px solid rgba(56, 217, 135, 0.18);
  border-radius: 16px;
  padding: 12px;
  margin-top: 12px;
  background: rgba(7, 17, 31, 0.36);
}

.event-correction-actions {
  align-self: end;
}

.game-cloud-card strong,
.game-cloud-card small {
  display: block;
}

.game-cloud-card small {
  margin-top: 4px;
  color: var(--muted);
}

.placeholder-card {
  opacity: 0.78;
}

.chevron,
.report-type {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.back-link {
  display: inline-flex;
  margin: 4px 0 14px;
  color: var(--muted);
  text-decoration: none;
}

.report-shell {
  max-width: 840px;
}

.report-hero h1 {
  max-width: 13ch;
}

.score-strip {
  margin-top: 18px;
}

.score-strip span {
  min-width: 98px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: rgba(7, 17, 31, 0.55);
}

.score-strip small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.score-strip strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.score-divider {
  min-width: auto !important;
  color: var(--gold);
  font-weight: 900;
}

.takeaway-list {
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
}

.takeaway-list li + li {
  margin-top: 10px;
}

.locked-ai-card {
  border-color: rgba(244, 200, 74, 0.32);
  background:
    linear-gradient(145deg, rgba(55, 41, 14, 0.58), rgba(9, 21, 34, 0.96)),
    var(--navy-800);
}

.ai-card {
  border-color: rgba(183, 140, 255, 0.32);
}

.box-score-table {
  display: grid;
  gap: 6px;
}

.table-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) repeat(3, 44px);
  gap: 8px;
  align-items: center;
  border-radius: 13px;
  padding: 10px;
  background: rgba(7, 17, 31, 0.55);
}

.table-head {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: transparent;
}

.lineup-card,
.pdf-link {
  display: block;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: rgba(7, 17, 31, 0.55);
}

.pdf-link {
  color: var(--gold);
  text-decoration: none;
  font-weight: 900;
}

.footer-note {
  margin: 18px 0 8px;
  color: var(--muted);
  text-align: center;
  font-size: 0.82rem;
}

@media (min-width: 720px) {
  .shell {
    padding: 28px;
  }

  .content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-card {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 20px;
    align-items: start;
  }

  .render-grid {
    grid-template-columns: minmax(120px, 1fr) 90px 90px auto;
    align-items: end;
  }

  .cloud-game-form {
    grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) 150px 120px auto;
    align-items: end;
  }

  .cloud-player-form {
    grid-template-columns: 84px minmax(150px, 1fr) 90px auto;
    align-items: end;
  }

  .cloud-event-form {
    grid-template-columns: minmax(150px, 1fr) 110px 90px 100px auto;
    align-items: end;
  }

  .event-correction-form {
    grid-template-columns: minmax(130px, 0.8fr) minmax(150px, 1fr) 92px 82px 95px 115px minmax(190px, auto);
    align-items: end;
  }

  .team-member-form {
    grid-template-columns: minmax(170px, 1fr) minmax(130px, 0.8fr) 120px auto;
    align-items: end;
  }

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

  .telemetry-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1040px) {
  .shell {
    padding-block: 36px;
  }

  .hero-card {
    padding: 34px;
  }

  .cloud-studio-card {
    grid-column: span 2;
  }
}

@media (min-width: 1240px) {
  .shell {
    width: min(100%, 1320px);
  }

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

  .cloud-studio-card {
    grid-column: auto;
  }
}
