:root {
  --navy: #1a3a6b;
  --navy-dark: #122a52;
  --red: #e63329;
}

body {
  background: #f8f9fa;
  font-size: 0.9rem;
}

/* Achievement badge icons (MLB / MVP / Hall of Fame) */
.ach-icon {
  height: 0.85em;
  width: auto;
  margin-left: 0.3em;
  vertical-align: -0.05em;
  display: inline-block;
}
i.ach-icon { font-size: 0.85em; }        /* bootstrap-icon trophy */
.ach-mvp    { color: #d4a017; }   /* MVP: gold trophy */
.ach-poy    { color: #8e9bab; }   /* Pitcher of the Year: silver trophy */
.ach-meteor { color: #e8590c; width: 1em; }   /* Top Pro Prospect: shooting star */
.ach-nemap  { color: #2e7d32; width: 0.8em; } /* New England Top Prospect: NE map */
.ach-ring   { color: var(--navy); width: 1.1em; }

/* Navbar */
.bg-navy { background-color: var(--navy) !important; }

.navbar-brand { font-size: 1.1rem; letter-spacing: 0.02em; }

/* Buttons */
.btn-navy {
  background-color: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.btn-navy:hover {
  background-color: var(--navy-dark);
  border-color: var(--navy-dark);
  color: #fff;
}
.btn-outline-navy {
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline-navy:hover {
  background-color: var(--navy);
  color: #fff;
}
.btn-check:checked + .btn-outline-navy {
  background-color: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* Cards */
.card {
  border: 1px solid #dee2e6;
  border-radius: 6px;
}
.card-title { font-weight: 600; color: var(--navy); }

/* Tables */
.stats-table { font-size: 0.82rem; white-space: nowrap; }
.stats-table thead th {
  background-color: var(--navy);
  color: #fff;
  font-weight: 600;
  border-color: var(--navy-dark);
  position: sticky;
  top: 0;
}
.stats-table tbody tr:nth-child(even) { background-color: #eef2f9; }
.stats-table tbody tr:nth-child(odd)  { background-color: #ffffff; }
.stats-table tbody tr:hover { background-color: #d4e0f5 !important; }
.stats-table td, .stats-table th { padding: 0.3rem 0.5rem; }

/* Filter card */
.filter-card {
  background: #f0f4fb;
  border: 1px solid #ccd8ee;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.filter-card .filter-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

/* DataTables Buttons */
.dt-buttons { display: flex; gap: 0.4rem; }
.dt-buttons .btn { font-size: 0.78rem; padding: 0.2rem 0.6rem; }
div.dataTables_wrapper div.dataTables_filter input { margin-left: 0.4rem; }

/* Player links in tables */
.stats-table a { color: var(--navy); text-decoration: none; font-weight: 500; }
.stats-table a:hover { text-decoration: underline; color: var(--red); }

/* Nav tabs */
.nav-tabs .nav-link { color: var(--navy); font-weight: 500; }
.nav-tabs .nav-link.active {
  color: var(--navy);
  border-bottom: 3px solid var(--red);
  font-weight: 700;
}

/* Page headings */
h1 { color: var(--navy); font-size: 1.8rem; }
h4 { color: var(--navy); font-size: 1.1rem; border-bottom: 2px solid #dee2e6; padding-bottom: 0.3rem; }

/* DataTables overrides */
.dataTables_filter input { border: 1px solid #ced4da; border-radius: 4px; padding: 0.25rem 0.5rem; }
.dataTables_info, .dataTables_length { font-size: 0.8rem; color: #6c757d; }

/* Player bio card */
.bio-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.1rem;
}
.bio-value {
  font-size: 0.92rem;
  font-weight: 500;
  color: #212529;
}

/* Game log table wrapper. The actual fixed-header/scrollable-body behavior
   is handled by DataTables' own scrollY+scrollCollapse (see base.html) --
   this div is just a visual border around whatever DataTables renders. */
.gl-table-wrap {
  border: 1px solid #dee2e6;
  border-radius: 6px;
}
.gl-table-wrap .dataTables_scrollHead th {
  background-color: var(--navy);
  color: #fff;
}

/* Game log season rows */
.gl-toggle-icon { font-size: 0.75rem; opacity: 0.85; user-select: none; }
.gl-season-header td {
  background-color: var(--navy) !important;
  color: #fff;
  font-size: 0.82rem;
  padding: 0.25rem 0.5rem;
}
/* The season/toggle label lives in the same column as game dates ("6/17"),
   which are only ever a few characters -- without capping this cell's width
   the browser sizes the whole Date column to fit the much longer label text
   ("2026 -- Brewster Whitecaps/Orleans Firebirds ..."). DataTables' own
   columnDefs width (see base.html) pins the column itself; this just keeps
   the label from overflowing that pinned width instead of wrapping tall. */
/* The season/toggle label lives in the same column as game dates ("6/17"),
   which are only ever a few characters -- without capping this cell's width
   the browser sizes the whole Date column (shared by every row below it,
   colspan isn't usable here since it crashes DataTables' cell indexing) to
   fit the much longer label text ("2026 -- Brewster Whitecaps/Orleans
   Firebirds ..."). Truncated with an ellipsis, but the full text is still
   reachable via the cell's title attribute (see player.html) as a tooltip. */
.gl-season-label {
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gl-season-total td {
  background-color: #dde8f8 !important;
  border-top: 2px solid var(--navy);
}
