:root {
  --bg-top: #edf4ff;
  --bg-bottom: #f7f8f2;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --ink: #14233d;
  --muted: #596a89;
  --line: rgba(20, 35, 61, 0.12);
  --accent: #0c4da2;
  --accent-soft: rgba(12, 77, 162, 0.1);
  --accent-strong: #08366f;
  --shadow: 0 24px 60px rgba(20, 35, 61, 0.12);
  --shadow-soft: 0 16px 30px rgba(20, 35, 61, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(95, 163, 255, 0.18), transparent 38%),
    radial-gradient(circle at top right, rgba(255, 203, 114, 0.16), transparent 28%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
}

.auth-body {
  display: grid;
  place-items: center;
  padding: 1rem;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.45) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 88%);
}

.page-shell {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 2rem;
}

.stats-page-shell {
  width: min(1480px, calc(100% - 1.25rem));
  padding-top: 0.9rem;
  padding-bottom: 1.5rem;
}

.account-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.account-summary {
  display: grid;
  gap: 0.22rem;
}

.account-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.account-link {
  display: inline-flex;
  width: fit-content;
  color: inherit;
  text-decoration: none;
  transition: color 140ms ease;
}

.account-link:hover,
.account-link:focus-visible {
  color: var(--accent-strong);
  outline: none;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
}

.account-actions,
.page-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.eyebrow,
.section-kicker,
.table-title {
  margin: 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
}

.hero h1,
.page-title,
.panel-header h2 {
  margin: 0.4rem 0 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  line-height: 1.05;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  max-width: 11ch;
}

.hero-copy,
.section-copy,
.table-subtitle {
  margin: 0.85rem 0 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 68ch;
}

.layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.panel {
  position: relative;
  padding: 1rem;
  background: var(--surface);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.panel-header {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.panel-header-wide {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.team-groups {
  display: grid;
  gap: 1rem;
}

.team-select-field {
  display: grid;
  gap: 0.75rem;
}

.team-select-grid {
  display: grid;
  gap: 1rem;
}

.stats-page-layout {
  display: grid;
  gap: 0.9rem;
}

.team-picker-bar {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
  gap: 1rem;
  align-items: end;
  padding: 0.85rem 1rem;
}

.team-picker-copy {
  display: grid;
  gap: 0.18rem;
}

.team-picker-copy .section-copy {
  margin-top: 0.55rem;
  max-width: 42ch;
}

.team-select-grid-horizontal {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 0.85rem;
}

.team-select-label {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.team-select-wrap {
  position: relative;
}

.team-select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 1rem;
  width: 0.65rem;
  height: 0.65rem;
  border-right: 2px solid var(--accent-strong);
  border-bottom: 2px solid var(--accent-strong);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.team-select {
  width: 100%;
  appearance: none;
  padding: 0.95rem 3rem 0.95rem 1rem;
  border: 1px solid rgba(12, 77, 162, 0.18);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  font: inherit;
  font-weight: 600;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.team-select:hover,
.team-select:focus-visible {
  border-color: rgba(12, 77, 162, 0.35);
  box-shadow: 0 10px 22px rgba(12, 77, 162, 0.1);
  outline: none;
}

.team-select:disabled {
  cursor: wait;
  opacity: 0.7;
}

.division-card {
  padding: 1rem;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.division-card h3 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-weight: 700;
}

.team-list {
  display: grid;
  gap: 0.55rem;
}

.team-button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background-color 140ms ease,
    box-shadow 140ms ease;
}

.team-button:hover,
.team-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(12, 77, 162, 0.22);
  background: rgba(12, 77, 162, 0.05);
  box-shadow: 0 10px 22px rgba(12, 77, 162, 0.1);
  outline: none;
}

.team-button.is-selected {
  border-color: rgba(12, 77, 162, 0.35);
  background: linear-gradient(135deg, rgba(12, 77, 162, 0.12), rgba(12, 77, 162, 0.04));
  box-shadow: 0 12px 24px rgba(12, 77, 162, 0.12);
}

.team-button img,
.selected-team-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: 0 0 28px;
}

.team-button span {
  font-size: 0.98rem;
  font-weight: 600;
}

.selected-team-summary {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 58px;
}

.stats-compare-panel {
  display: grid;
  gap: 0.85rem;
  padding: 0.9rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: start;
}

.stats-team-card,
.compare-empty-card {
  display: grid;
  gap: 0.85rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
}

.stats-team-card .panel-header {
  margin-bottom: 0;
}

.stats-team-card table {
  min-width: 680px;
}

.stats-team-card .table-card {
  border-radius: 18px;
}

.stats-team-card .table-toolbar {
  gap: 0.75rem;
  padding: 0.68rem 0.75rem 0.58rem;
}

.stats-team-card thead th {
  padding: 0.62rem 0.68rem;
  font-size: 0.78rem;
}

.stats-team-card tbody td {
  padding: 0.58rem 0.68rem;
}

.stats-team-card .live-game-card {
  gap: 0.85rem;
  margin-bottom: 0;
  padding: 0.85rem 0.95rem;
}

.compare-empty-card {
  align-content: start;
  min-height: 100%;
}

.compare-empty-card h2 {
  margin: 0.4rem 0 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  line-height: 1.05;
}

.selected-team-logo {
  width: 58px;
  height: 58px;
}

.team-badge-skeleton {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(12, 77, 162, 0.08), rgba(12, 77, 162, 0.18), rgba(12, 77, 162, 0.08));
  background-size: 220% 100%;
  animation: shimmer 1.4s linear infinite;
}

.status-pill {
  padding: 0.7rem 0.95rem;
  background: var(--accent-soft);
  border: 1px solid rgba(12, 77, 162, 0.15);
  border-radius: 999px;
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 700;
}

.status-pill.is-error {
  background: rgba(173, 44, 44, 0.12);
  border-color: rgba(173, 44, 44, 0.2);
  color: #8b1f1f;
}

.live-game-card {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(12, 77, 162, 0.14);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(12, 77, 162, 0.1), rgba(255, 255, 255, 0.84)),
    rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.live-game-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.live-game-status {
  margin: 0.35rem 0 0;
  color: var(--accent-strong);
  font-size: 1rem;
  font-weight: 700;
}

.live-game-scoreboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.9rem;
  align-items: stretch;
}

.live-game-divider {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 700;
}

.live-team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(12, 77, 162, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
}

.live-team.is-selected {
  border-color: rgba(12, 77, 162, 0.3);
  background: linear-gradient(135deg, rgba(12, 77, 162, 0.12), rgba(12, 77, 162, 0.04));
}

.live-team-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.live-team-brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex: 0 0 38px;
}

.live-team-copy {
  min-width: 0;
}

.live-team-name,
.live-team-abbrev {
  margin: 0;
}

.live-team-name {
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 700;
}

.live-team-abbrev {
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-team-score {
  color: var(--accent-strong);
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.daily-boxscores-panel {
  display: grid;
  gap: 1rem;
}

.standings-panel {
  display: grid;
  gap: 1rem;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 1.25rem;
  align-items: start;
}

.settings-panel {
  display: grid;
  gap: 1rem;
}

.settings-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.settings-detail-card,
.settings-note,
.settings-form-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
}

.settings-detail-card.is-wide {
  grid-column: 1 / -1;
}

.settings-detail-label {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-detail-value {
  margin: 0.38rem 0 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
  word-break: break-word;
}

.settings-detail-value.is-muted {
  color: var(--muted);
  font-weight: 600;
}

.settings-note {
  color: var(--muted);
  line-height: 1.6;
}

.settings-note p {
  margin: 0;
}

.settings-form-copy {
  margin-bottom: 1rem;
}

.settings-notice {
  padding: 0.95rem 1rem;
  border: 1px solid rgba(184, 120, 0, 0.22);
  border-radius: var(--radius-md);
  background: rgba(255, 205, 97, 0.16);
  color: #7a5200;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.5;
}

.date-filter {
  display: grid;
  gap: 0.3rem;
}

.date-filter-label {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.date-filter-input {
  min-width: 10.5rem;
  padding: 0.68rem 0.8rem;
  border: 1px solid rgba(12, 77, 162, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  font: inherit;
}

.date-filter-input:focus-visible {
  border-color: rgba(12, 77, 162, 0.34);
  outline: none;
  box-shadow: 0 10px 22px rgba(12, 77, 162, 0.1);
}

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

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

.boxscore-card,
.boxscore-empty,
.standings-card,
.standings-empty {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
}

.boxscore-empty,
.standings-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding-block: 2rem;
}

.boxscore-card {
  display: grid;
  gap: 0.85rem;
}

.standings-card {
  display: grid;
  gap: 0.9rem;
}

.boxscore-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.standings-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.boxscore-card-time,
.boxscore-card-status,
.boxscore-note {
  margin: 0;
}

.standings-card-title {
  margin: 0.3rem 0 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-size: 1.4rem;
  line-height: 1.1;
}

.boxscore-card-time {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.boxscore-card-status {
  margin-top: 0.28rem;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
}

.boxscore-link {
  white-space: nowrap;
}

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

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

.boxscore-table {
  width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
}

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

.boxscore-table thead th {
  position: static;
  padding: 0 0 0.7rem;
  background: transparent;
  border-bottom: 1px solid var(--line);
  color: var(--accent-strong);
  font-size: 0.88rem;
}

.standings-table thead th {
  position: static;
  padding: 0 0 0.75rem;
  background: transparent;
  border-bottom: 1px solid var(--line);
  color: var(--accent-strong);
  font-size: 0.82rem;
}

.boxscore-table tbody td,
.boxscore-table tbody th {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.standings-table tbody td,
.standings-table tbody th {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.boxscore-table tbody tr:last-child td,
.boxscore-table tbody tr:last-child th {
  border-bottom: 0;
}

.standings-table tbody tr:last-child td,
.standings-table tbody tr:last-child th {
  border-bottom: 0;
}

.boxscore-team-heading {
  width: 1%;
}

.standings-rank-heading {
  width: 2.1rem;
  text-align: center;
}

.boxscore-period-heading,
.boxscore-total-heading,
.boxscore-period-value,
.boxscore-total-value {
  width: 2.7rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.boxscore-total-heading,
.boxscore-total-value {
  font-weight: 800;
}

.boxscore-team-cell {
  padding-right: 0.75rem;
  text-align: left;
}

.standings-rank-cell,
.standings-number-cell,
.standings-points-cell {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.standings-number-heading {
  width: 2.8rem;
  text-align: center;
}

.standings-points-cell {
  font-weight: 800;
}

.standings-team-cell {
  text-align: left;
}

.boxscore-team-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.standings-team-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.boxscore-team-link {
  color: inherit;
  text-decoration: none;
}

.standings-team-link {
  color: inherit;
  text-decoration: none;
}

.boxscore-team-link:hover .boxscore-team-abbrev,
.boxscore-team-link:focus-visible .boxscore-team-abbrev {
  text-decoration: underline;
}

.standings-team-link:hover .standings-team-name,
.standings-team-link:focus-visible .standings-team-name {
  text-decoration: underline;
}

.boxscore-team-link:focus-visible {
  outline: none;
}

.standings-team-link:focus-visible {
  outline: none;
}

.boxscore-team-brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: 0 0 28px;
}

.standings-team-brand img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex: 0 0 26px;
}

.boxscore-team-abbrev {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.standings-team-name {
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 700;
}

.boxscore-note {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.table-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.table-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.9rem 0.7rem;
  border-bottom: 1px solid var(--line);
}

.table-toolbar-copy {
  display: grid;
  gap: 0.2rem;
}

.table-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.table-toolbar .table-subtitle {
  margin: 0;
  max-width: none;
  text-align: left;
}

.icon-button,
.export-button {
  padding: 0.68rem 1rem;
  border: 1px solid rgba(12, 77, 162, 0.18);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(12, 77, 162, 0.12), rgba(12, 77, 162, 0.05));
  color: var(--accent-strong);
  box-shadow: var(--shadow-soft);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    opacity 140ms ease;
}

.icon-button {
  min-width: 2.6rem;
  padding: 0.68rem 0.8rem;
  font-size: 1.05rem;
  line-height: 1;
}

.icon-button:hover,
.icon-button:focus-visible,
.export-button:hover,
.export-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(12, 77, 162, 0.34);
  box-shadow: 0 10px 22px rgba(12, 77, 162, 0.1);
  outline: none;
}

.icon-button:disabled,
.export-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: var(--shadow-soft);
}

.ghost-button,
.primary-button,
.google-button,
.text-link {
  font: inherit;
}

.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 0.95rem;
  border: 1px solid rgba(12, 77, 162, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    opacity 140ms ease;
}

.ghost-button:hover,
.ghost-button:focus-visible,
.text-link:hover,
.text-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(12, 77, 162, 0.3);
  box-shadow: 0 10px 22px rgba(12, 77, 162, 0.1);
  outline: none;
}

.auth-shell {
  width: min(480px, 100%);
}

.auth-card {
  position: relative;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.auth-title {
  margin: 0.45rem 0 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-size: clamp(2rem, 5vw, 2.6rem);
  line-height: 1.05;
}

.auth-copy {
  margin-bottom: 1rem;
}

.auth-helper,
.auth-meta {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.auth-form {
  display: grid;
  gap: 0.8rem;
}

.auth-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.auth-input {
  width: 100%;
  padding: 0.88rem 1rem;
  border: 1px solid rgba(12, 77, 162, 0.18);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  font: inherit;
}

.auth-input:focus-visible {
  border-color: rgba(12, 77, 162, 0.34);
  outline: none;
  box-shadow: 0 10px 22px rgba(12, 77, 162, 0.1);
}

.primary-button,
.google-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.88rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    opacity 140ms ease;
}

.primary-button {
  border: 1px solid rgba(12, 77, 162, 0.22);
  background: linear-gradient(135deg, #0c4da2, #1e6fe0);
  color: #ffffff;
  box-shadow: 0 14px 26px rgba(12, 77, 162, 0.2);
}

.google-button {
  border: 1px solid rgba(20, 35, 61, 0.12);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

.primary-button:hover,
.primary-button:focus-visible,
.google-button:hover,
.google-button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.primary-button:disabled,
.google-button:disabled,
.ghost-button:disabled,
.text-link:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-alert {
  margin-bottom: 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
}

.auth-alert.is-error {
  background: rgba(173, 44, 44, 0.12);
  color: #8b1f1f;
  border: 1px solid rgba(173, 44, 44, 0.18);
}

.auth-alert.is-success {
  background: rgba(19, 132, 73, 0.12);
  color: #11633a;
  border: 1px solid rgba(19, 132, 73, 0.16);
}

.auth-footnote {
  margin-top: 1rem;
}

.auth-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-panel {
  display: grid;
  gap: 1rem;
}

.admin-table {
  min-width: 1260px;
}

.user-input,
.user-select {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(12, 77, 162, 0.18);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  font: inherit;
}

.user-input.is-username {
  width: auto;
  min-width: 0;
}

.user-input:focus-visible,
.user-select:focus-visible {
  border-color: rgba(12, 77, 162, 0.34);
  outline: none;
  box-shadow: 0 10px 22px rgba(12, 77, 162, 0.1);
}

.user-input:disabled,
.user-select:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.user-note-input {
  width: min(26rem, 100%);
  min-height: 4.6rem;
  resize: vertical;
  line-height: 1.45;
}

.user-actions,
.row-stack {
  display: grid;
  gap: 0.45rem;
}

.compact-button {
  width: auto;
  min-width: 7rem;
}

.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 0.95rem;
  border: 1px solid rgba(173, 44, 44, 0.18);
  border-radius: 999px;
  background: rgba(173, 44, 44, 0.08);
  color: #8b1f1f;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    opacity 140ms ease;
}

.danger-button:hover,
.danger-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(173, 44, 44, 0.32);
  box-shadow: 0 10px 22px rgba(173, 44, 44, 0.12);
  outline: none;
}

.danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.provider-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  background: rgba(12, 77, 162, 0.08);
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 700;
}

.provider-pill.is-google {
  background: rgba(14, 117, 57, 0.1);
  color: #11633a;
}

.row-note {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

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

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

thead th {
  position: sticky;
  top: 0;
  padding: 0.72rem 0.8rem;
  background: rgba(240, 245, 255, 0.98);
  color: var(--accent-strong);
  text-align: left;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--line);
}

tbody td {
  padding: 0.72rem 0.8rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

tbody tr:nth-child(even) {
  background: rgba(12, 77, 162, 0.025);
}

tbody tr:hover {
  background: rgba(12, 77, 162, 0.055);
}

.player-cell {
  width: 1%;
  white-space: nowrap;
}

.player-name {
  display: inline-block;
  font-weight: 700;
}

.numeric {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.centered {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.player-note-cell {
  width: 1%;
  white-space: nowrap;
}

.player-note-input {
  width: 15ch;
  min-width: 15ch;
  max-width: 40ch;
  min-height: calc(1.25em + 0.56rem + 2px);
  padding: 0.28rem 0.5rem;
  border: 1px solid rgba(12, 77, 162, 0.16);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  font: inherit;
  line-height: 1.25;
  overflow: hidden;
  resize: none;
}

.player-note-input:focus-visible {
  border-color: rgba(12, 77, 162, 0.34);
  outline: none;
  box-shadow: 0 10px 22px rgba(12, 77, 162, 0.1);
}

.player-note-input:disabled {
  cursor: wait;
  opacity: 0.72;
}

.empty-row {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted);
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -20% 0;
  }
}

@media (max-width: 980px) {
  .account-bar {
    flex-direction: column;
    align-items: stretch;
  }

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

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

  .team-picker-bar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .team-select-grid-horizontal {
    grid-template-columns: 1fr 1fr;
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

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

  .team-panel {
    order: 2;
  }

  .stats-panel {
    order: 1;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 1rem, 1280px);
    padding-top: 1rem;
  }

  .stats-page-shell {
    width: min(100% - 0.75rem, 1480px);
    padding-top: 0.75rem;
  }

  .panel,
  .division-card {
    padding: 1rem;
  }

  .panel-header-wide,
  .table-toolbar {
    align-items: flex-start;
  }

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

  .team-select-grid-horizontal {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .table-toolbar {
    flex-direction: column;
  }

  .table-toolbar .table-subtitle {
    text-align: left;
  }

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

  .boxscore-card-header {
    flex-direction: column;
  }

  .standings-card-header {
    flex-direction: column;
  }

  .settings-detail-grid {
    grid-template-columns: 1fr;
  }

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

  .live-game-divider {
    display: none;
  }
}
