
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1100px; margin: 24px auto; padding: 0 16px; }

/* ── Masquerade banner ── */
.masquerade-banner {
  background: #d97706;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 16px;
}

/* ── Top bar ── */
.topbar {
  background: var(--surface);
  color: var(--surface-text);
  border-bottom: 3px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.topbar__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  height: 64px; /* slightly taller */
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: .6px;
  color: var(--surface-text);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand__logo {
  height: 32px;
  width: auto;
  display: block;
}

.topnav { display: flex; align-items: center; gap: 20px; }
.topnav__toggle { display: none; }
.topnav__link {
  color: var(--surface-muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color .15s;
}
.topnav__link:hover { color: var(--surface-text); text-decoration: none; }
.topnav__link--cta {
  background: var(--accent);
  color: #fff;
  padding: 7px 14px;
  border-radius: 6px;
  font-weight: 700;
}
.topnav__link--cta:hover { background: var(--accent-dark); color: #fff; }
.topnav__link--user {
  color: var(--surface-text);
  font-size: 13px;
  font-weight: 600;
  opacity: 0.85;
  background: var(--surface-chip-bg);
  border: 1px solid var(--surface-chip-border);
  border-radius: 6px;
  padding: 5px 10px;
}
.topnav__link--user:hover { opacity: 1; text-decoration: underline; }

/* ── Typography ── */
h1 { margin: 8px 0 10px; font-size: 26px; font-weight: 800; }
h2 { margin: 20px 0 10px; font-size: 18px; font-weight: 700; color: #333; }

.subtle { color: var(--muted); font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; color: var(--text); }
.breadcrumb__sep {
  font-size: 11px;
  color: #bbb;
  user-select: none;
}
.breadcrumb__current {
  color: var(--text);
  font-weight: 600;
}

/* ── Page head ── */
.pagehead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.pagehead__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Buttons ── */
.btn {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: background .15s;
}
.btn:hover { background: var(--panel2); text-decoration: none; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn--primary {
  background: var(--accent);
  border-color: var(--accent-dark);
  color: #fff;
}
.btn--primary:hover { background: var(--accent-dark); }
.btn--danger {
  background: #fff0f0;
  border-color: #f8b4b4;
  color: #cc0000;
}
.btn--danger:hover { background: #fde8e8; }
.btn--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 9999px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}
.btn--icon:hover { background: var(--panel2); }
.btn--icon[disabled] { opacity: .45; cursor: not-allowed; }

/* Small inline spinner used on async actions (appears inside buttons). */
.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.08);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
  vertical-align: -2px;
  margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Input ── */
.input {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 12px;
  color: var(--text);
  margin: 8px 0;
  font-size: 14px;
}
.input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }

/* ── Table ── */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.table th, .table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table th {
  background: #f8f8f8;
  text-align: left;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .3px;
  font-weight: 700;
  text-transform: uppercase;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #fafafa; }

/* reduce vertical gaps inside table action cell */
.table td .btn { margin-right: 6px; }

/* ── Team grid ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.teamcard {
  display: block;
  padding: 16px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel) 0%, #fffaf9 100%);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: box-shadow .15s, transform .1s;
}
.teamcard:hover { box-shadow: 0 4px 12px rgba(0,0,0,.12); transform: translateY(-1px); text-decoration: none; }

/* Editable team cards — border and tint match the level badge palette.
   Per-level rules (.teamcard--editable.teamcard--level-<code>) are emitted
   from the active club's teams.json manifest via base.html. See tryout.club_levels. */
.teamcard--editable { border-width: 2px; }

.teamcard__name {
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.1;
}
.teamcard__meta { margin-top: 10px; }

/* ── Roster progress bar (teams index) ──
   Segmented horizontal bar showing the makeup of a team's roster
   relative to its total slot count. Segments use flex-grow proportional
   to their count so the overall bar always spans 100% of the card. */
.rprog {
  display: flex;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #ececec;
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.06);
}
.rprog__seg { display: block; height: 100%; min-width: 2px; }
.rprog__seg + .rprog__seg { border-left: 1px solid rgba(255,255,255,.55); }
.rprog__seg--accepted { background: #1b7f3a; }              /* dark green  */
.rprog__seg--offered  { background: #7ed29a; }              /* light green */
.rprog__seg--assigned { background: #6b6b6b; }              /* dark gray   */
.rprog__seg--open     { background: transparent; }          /* empty       */
.rprog--empty         { background: #ececec; }

.rprog__caption {
  margin-top: 4px;
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  color: var(--muted, #666);
  line-height: 1.2;
}
.rprog__caption strong { color: var(--text); font-weight: 700; }
.rprog__caption-sep { opacity: .5; }

/* ── Team code badge (in headings) ── */
.teamcode-badge {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  font-family: ui-monospace, monospace;
  background: #f0f0f0;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 4px;
  vertical-align: middle;
}

/* ── Pills ── */
.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #fff;
  border: 1px solid #eee;
  color: var(--muted);
}
.pill--ok {
  color: #166534;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

/* Admin access pill (shown when an admin can edit a team but is not affiliated) */
.pill--admin-access {
  color: #5b21b6;
  border-color: #c4b5fd;
  background: #f5f3ff;
}

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .2px;
  margin-right: 6px;
  margin-bottom: 6px;
  border: 1px solid transparent;
}
/* Per-level badge palette (.badge--<code>) is emitted by base.html from the active
   club's teams.json manifest. See tryout.club_levels. */
.badge--alternate {
  border-style: dotted;
  border-width: 2px;
  opacity: 0.72;
}

/* Position select styling */
select.input {
  padding: 6px 8px;
  font-size: 13px;
  border-radius: 6px;
}

/* keep selects narrow inside table cells */
.table select.input { min-width: 80px; }

/* ── Card ── */.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

/* ── Athlete avatar bubble ── */
.athlete-row { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  background: #e6e6e6;
  color: #333;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  flex: 0 0 56px;
}
.avatar img { width: 56px; height: 56px; border-radius: 9999px; object-fit: cover; }
.avatar--sm  { width: 48px; height: 48px; font-size: 14px; flex: 0 0 48px; }

/* ── Filterable / sortable table ── */

/* Sortable header cells */
.th-sort {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.th-sort:hover { background: #ececec; }

.sort-icon {
  display: inline-block;
  font-size: 10px;
  color: #bbb;
  margin-left: 3px;
  vertical-align: middle;
  transition: color .12s;
}
.sort-icon--asc,
.sort-icon--desc { color: var(--accent); }

/* Filter input row (sits inside <thead>) */
.thead-filters th {
  background: #ebebeb;
  padding: 5px 8px;
}
.filter-input {
  display: block;
  width: 100%;
  padding: 4px 7px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #fff;
  color: var(--text);
  box-sizing: border-box;
}
.filter-input:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}

/* Details (☰) button — reuses btn--icon but slightly muted */
.btn--details { color: var(--muted); font-size: 15px; }
.btn--details:hover { color: var(--text); background: var(--panel2); }

/* ── Season chip (in top bar brand) ── */
.season-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  background: var(--surface-chip-bg);
  border: 1px solid var(--surface-chip-border);
  border-radius: 4px;
  padding: 2px 8px;
  margin-left: 10px;
  vertical-align: middle;
  color: var(--surface-muted);
  letter-spacing: .3px;
}

/* ── Small button variant ── */
.btn--sm {
  padding: 5px 10px;
  font-size: 12px;
}

/* ── Assign panel (full-width inline search) ── */
.assign-panel-inner { padding: 10px 14px 12px; }
.assign-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.assign-panel-header .assign-search-input {
  flex: 1;
  max-width: 400px;
  margin: 0;
  padding: 7px 10px;
}
.assign-list {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.assign-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
}
.assign-item:hover { background: #f9f9f9; }
.assign-item__info { flex: 1; }

/* ── Note cards ── */
.note-card { margin-bottom: 10px; }
.note-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.note-card__author {
  font-weight: 700;
  font-size: 13px;
}
.note-card__body {
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* Trash button on notes */
.btn--trash {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1;
  margin-left: auto;
}
.btn--trash:hover { color: #cc0000; background: #fff0f0; }

/* Trash icon on roster/alternate rows (leftmost column) */
.slot-num-cell {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.btn--trash-row {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 1px 3px;
  border-radius: 3px;
  font-size: 12px;
  color: #ccc;
  line-height: 1;
  opacity: 0;
  transition: opacity .15s, color .12s, background .12s;
  flex-shrink: 0;
}
.table tr:hover .btn--trash-row { opacity: 1; }
.btn--trash-row:hover { color: #cc0000; background: #fff0f0; opacity: 1; }

/* Inline delete confirmation (replaces browser popup) */
.delete-ctrl { display: inline-flex; align-items: center; }
.delete-confirm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.delete-confirm__label {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.btn--confirm-yes {
  background: #cc0000;
  color: #fff;
  border: none;
  padding: 2px 8px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
}
.btn--confirm-yes:hover { background: #a00000; }
.btn--confirm-no {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  line-height: 1.6;
}
.btn--confirm-no:hover { background: var(--panel2); color: var(--text); }

/* Badges as links — preserve badge look, add pointer */
a.badge {
  cursor: pointer;
  text-decoration: none;
  transition: filter .12s;
}
a.badge:hover { filter: brightness(0.88); text-decoration: none; }

/* ── Combine Statistics tab ─────────────────────────────────────────────────── */

/* Filter row: three dropdowns side-by-side, wrapping on small screens */
.stats-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 12px;
}
.stats-filter-group {
  flex: 1;
  min-width: 130px;
  max-width: 200px;
}
.stats-filter-group .input { width: 100%; }

/* Stats summary strip (n, μ, σ) */
.stats-summary {
  display: inline-block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 13px;
  min-height: 34px;
  margin-bottom: 4px;
}
.stats-summary:empty { display: none; }

/* Plot wrapper — gives the Plotly div a border + rounded corners */
.stats-plot-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  margin: 10px 0 16px;
}
#stats-plot { height: 400px; }

/* Compare section */
.stats-compare-section { margin-top: 4px; }

/* Selected-athlete chips (shown above the plot when athletes are compared) */
.stats-compare-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.stats-compare-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px 3px 12px;
  font-size: 12px;
  font-weight: 600;
}
.stats-compare-chip button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 0 2px;
  color: var(--muted);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.stats-compare-chip button:hover { color: #cc0000; background: #fff0f0; }

/* Compare panel (athlete search — reuses .assign-panel-* look) */
.stats-compare-panel-inner {
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  padding: 10px 14px 12px;
  margin-top: 4px;
}

/* Keep small screens comfortable */
@media (max-width: 640px) {
  .topbar__inner { padding: 0 12px; }
  .container { padding: 0 12px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .avatar { width: 44px; height: 44px; font-size: 14px; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; position: static; }
  .admin-sidenav { flex-direction: row; overflow-x: auto; }
  .sidenav-link { border-left: none; border-bottom: 3px solid transparent; border-top: none; white-space: nowrap; }
  .sidenav-link--active { border-bottom-color: var(--accent); }
  .admin-content { padding-left: 0; padding-top: 16px; }

  /* Top navigation: hamburger behaviour on small screens */
  .topnav__toggle { display: inline-flex; align-items: center; justify-content: center; width:40px; height:40px; background:transparent; border:none; color:#fff; font-size:20px; cursor:pointer; }
  /* hide the normal horizontal nav by default on phones; shown when .topnav--open is present */
  .topnav { display: none; }
  .topnav.topnav--open {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: absolute;
    left: 12px;
    right: 12px;
    top: 64px; /* sits below the topbar */
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,.2);
    z-index: 200;
  }
  .topnav__link { white-space: nowrap; color: var(--muted); padding: 8px 6px; border-radius:6px; }
  .topnav__link:hover { color: var(--text); background: var(--panel2); }
  .brand { max-width: 55vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }

  /* Page head stacks vertically on phones */
  .pagehead { flex-direction: column; align-items: stretch; }
  .pagehead__actions { justify-content: flex-start; }

  /* Table wrapper: allow horizontal scroll on small screens */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  .table th, .table td { padding: 8px 10px; }
  .table th { font-size: 11px; }

  /* Safety rails */
  .card, .table td, .table th { overflow-wrap: anywhere; word-break: break-word; }
  img { max-width: 100%; height: auto; }

  /* Slightly smaller topbar to save vertical space on very small phones */
  @media (max-width: 420px) {
    .topbar__inner { height: 56px; }
    .topnav.topnav--open { top: 56px; }
    .topnav__toggle { width:36px; height:36px; font-size:18px; }
    .table th, .table td { padding: 6px 8px; font-size: 12px; }
  }
}

/* ── Footer ── */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--surface-border);
  margin-top: 48px;
  padding: 14px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--surface-muted);
}
.footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--surface-muted);
  background: var(--surface-chip-bg);
  padding: 1px 5px;
  border-radius: 3px;
}
.footer__bug-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--surface-text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  opacity: 0.95;
  border: 1px solid var(--surface-chip-border);
  border-radius: 6px;
  padding: 6px 10px;
  background: var(--surface-chip-bg);
  transition: opacity 0.12s, color 0.12s, border-color 0.12s, background 0.12s, transform 0.12s;
}
.footer__bug-link:hover {
  color: var(--surface-text);
  opacity: 1;
  border-color: var(--surface-chip-border);
  background: var(--surface-chip-bg-hover);
  transform: translateY(-1px);
  text-decoration: none;
}
.footer__bug-icon {
  flex-shrink: 0;
  vertical-align: middle;
}

/* ── Footer env pill ──
   Light backgrounds with colored text + border so the pill is legible on
   both light (default skin) and dark (mvvc skin) footer surfaces without
   the hardcoded dark slab looking jarring against a white footer. */
.env-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 4px;
  vertical-align: middle;
}
.env-pill--dev  { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.env-pill--prod { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ── Admin nav link (top bar) ── */
.topnav__link--admin { color: #e88080; }
.topnav__link--admin:hover { color: var(--surface-text); }

/* ── Admin page layout ── */
.admin-layout {
  display: flex;
  gap: 0;
  align-items: flex-start;
}

.admin-sidebar {
  width: 170px;
  flex-shrink: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  position: sticky;
  top: 80px;
  box-shadow: 0 1px 6px rgba(0,0,0,.07);
}

.admin-sidenav {
  display: flex;
  flex-direction: column;
}

.sidenav-link {
  display: block;
  padding: 13px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  border-left: 3px solid transparent;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: color .12s, background .12s, border-color .12s;
  white-space: nowrap;
}
.sidenav-link:last-child { border-bottom: none; }
.sidenav-link:hover { color: var(--text); background: var(--panel2); text-decoration: none; }
.sidenav-link--active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-light);
  font-weight: 700;
}

.admin-content {
  flex: 1;
  min-width: 0;
  padding-left: 24px;
}

/* ── Active tryout banner (Tryout tab) ── */
.active-tryout-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 20px;
}

/* ── Season block (Tryout tab) ── */
.season-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.season-block__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f8f8f8;
  border-bottom: 1px solid var(--line);
}
.season-block__title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}
.season-block__actions { margin-left: auto; display: flex; gap: 6px; }
.season-block__add-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: #fcfcfc;
}

/* ── Role pills ── */
.role-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  border: 1px solid transparent;
}
.role-pill--admin  { background: var(--accent-light); color: var(--accent); border-color: #f8b4b4; }
.role-pill--coach  { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.role-pill--viewer { background: var(--panel2); color: var(--muted); border-color: var(--line); }

/* ── Dim badge (unaffiliated team, used as a toggle button) ── */
.badge--dim { background: #f0f0f0; color: #aaa; border-color: #e0e0e0; }

/* Badge as <button> — reset browser defaults and add pointer */
button.badge {
  cursor: pointer;
  font-family: inherit;
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
  transition: filter .12s;
}
button.badge:hover { filter: brightness(0.85); }

/* ── Role circle for admin team badges ── */
.role-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  margin-left: 4px;
  color: white;
  vertical-align: text-top;
}
.role-circle--H { background-color: #1f2937; } /* Head: dark */
.role-circle--A { background-color: #9ca3af; } /* Assistant: gray */

/* ── Editing row highlight ── */
.row--editing td { background: #fff8f8 !important; }

/* ── Inline affiliation panel row ── */
.row--editing-panel > td {
  padding: 0 !important;
  background: #fff8f8 !important;
}
.affiliation-panel {
  padding: 12px 16px 14px;
  border-top: 1px dashed var(--line);
}

/* ── Audit action badge (<code> element) ── */
.audit-action-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #f0f0f0;
  color: #333;
  border: 1px solid var(--line);
}

/* ── Flash messages (Django messages framework) ── */
.flash-messages { margin-bottom: 16px; }
.flash {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid;
  margin-bottom: 8px;
  line-height: 1.4;
}
.flash--error   { background: #fff0f0; color: #cc0000;  border-color: #f8b4b4; }
.flash--success { background: #f0fdf4; color: #166534;  border-color: #bbf7d0; }
.flash--warning { background: #fffbeb; color: #92400e;  border-color: #fde68a; }
.flash--info    { background: #eff6ff; color: #1d4ed8;  border-color: #bfdbfe; }

/* ── Locked-notice banner (team_detail when tryout is locked) ── */
.locked-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  color: #92400e;
  font-size: 13px;
  font-weight: 600;
  margin-top: 6px;
}

/* ── Locked pill (admin Tryout tab lock button) ── */
.pill--locked {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
  border-style: solid;
  border-width: 1px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
}

/* ── Coach bubbles (team detail page, under team name) ── */
.coach-bubbles {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
  margin-bottom: 4px;
}
.coach-bubble {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(155, 17, 30, 0.08); /* faint red */
  border: 1px solid rgba(155, 17, 30, 0.2);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.coach-bubble.coach-assistant {
  background: var(--panel2);
  border: 1px solid var(--line);
  color: var(--muted);
}

/* ── Bug report page ── */
.bug-report-form {
  max-width: 640px;
  margin: 0 auto;
}
.bug-report-form textarea {
  min-height: 120px;
  resize: vertical;
}
.bug-thanks {
  max-width: 520px;
  margin: 48px auto;
  text-align: center;
}
.bug-thanks__ref {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent);
  background: var(--accent-light);
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 10px 24px;
  margin: 16px 0;
}
.bug-thanks__status {
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
}
/* Status pill variants: bug-report tab (new/pending/sent/fixed) and
   LeagueApps status (queued/failed). */
.pill--new     { background: #e8f4fd; color: #1a6fa0; border: 1px solid #9ecfe8; }
.pill--pending { background: #fef9e7; color: #8a6a00; border: 1px solid #f5cc5a; }
.pill--queued  { background: #fef9e7; color: #8a6a00; border: 1px solid #f5cc5a; }
.pill--sent    { background: #f5f3ff; color: #5b21b6; border: 1px solid #c4b5fd; }
.pill--failed  { background: #fdecea; color: #9b111e; border: 1px solid #e8a0a5; }
.pill--fixed   { background: #eafaf1; color: #1a7a45; border: 1px solid #82d5a5; }

/* ── Combine ── */
.combine-card {
  display: block;
  padding: 16px 14px;
  border-radius: 8px;
  border: 2px solid var(--line);
  background: var(--panel);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: box-shadow .15s, transform .1s;
  text-decoration: none;
  color: var(--text);
}
.combine-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.12); transform: translateY(-1px); text-decoration: none; }
.combine-card--editable {
  border-color: #d8b4b4;
  background: linear-gradient(160deg, #fff 0%, #fff7f7 100%);
}
.combine-card__name { font-size: 15px; font-weight: 800; color: var(--text); line-height: 1.2; }
.combine-card__unit { font-size: 12px; color: var(--muted); margin-top: 2px; }
.combine-card__meta { margin-top: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }

/* Attempt value — large mono display in leaderboard */
.attempt-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
}

/* Rank badge — gold/silver/bronze for top 3 */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  background: var(--panel2);
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0 4px;
}
.rank-badge--1 { background: #fef9c3; color: #854d0e; border-color: #fde047; }
.rank-badge--2 { background: #f1f5f9; color: #334155; border-color: #cbd5e1; }
.rank-badge--3 { background: #fff7ed; color: #9a3412; border-color: #fdba74; }

.combine-attempt-details-row > td,
.athlete-combine-details-row > td {
  border-top: none;
}

/* ── Landing hero (full-bleed surface band between topbar and footer) ─────── */
.landing-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;

  /* Full-bleed: escape the centered .container */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);

  background: var(--surface);
  color: var(--surface-text);
  border: none;
  box-shadow: none;

  /* Negative margins cancel .container's top/bottom margins; padding compensates */
  margin-top: -24px;
  margin-bottom: -24px;
  padding: 64px 16px 40px;
}
.landing-hero__logo { max-width: 280px; width: 100%; }
.landing-hero__title {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: .4px;
  margin: 0;
  color: var(--surface-text);
}

/* ── Masquerade banner ────────────────────────────────────────────────────── */


/* ════════════════════════════════════════════════════════════════════════════
   SEND MESSAGE / COMPOSE
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Page wrapper ── */
.compose-wrap {
  max-width: 780px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Field row (label + input) ── */
.compose-field {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.compose-label {
  flex: 0 0 56px;
  padding-top: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .4px;
}
.compose-subject-input,
.compose-body-input {
  flex: 1;
  margin: 0;
}
.compose-body-input { resize: vertical; }

/* ── Pill input container ── */
.pill-input {
  flex: 1;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: text;
  transition: border-color .15s;
  /* overflow must stay visible so the absolute-positioned dropdown is not clipped */
  overflow: visible;
}
.pill-input:focus-within { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: -1px; }

.pill-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 8px;
  min-height: 36px;
}

/* Search input row — shown below the chips as its own clearly-typed-in box */
.pill-search-row {
  border-top: 1px solid var(--line);
  padding: 6px 8px;
  position: relative;
}
/* Hide the divider line when there are no chips yet */
.pill-container:empty + .pill-search-row { border-top: none; }

/* ── Email pill ── */
.email-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent-light);
  border: 1px solid #f5c0c0;
  border-radius: 20px;
  padding: 2px 4px 2px 9px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-dark);
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.email-pill--no-email {
  background: #f5f5f5;
  border-color: #ccc;
  color: var(--muted);
  opacity: .75;
}
.email-pill__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.email-pill__remove {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--accent);
  font-size: 14px;
  line-height: 1;
  padding: 0 3px;
  border-radius: 50%;
  opacity: .6;
  transition: opacity .1s, background .1s;
}
.email-pill__remove:hover { opacity: 1; background: rgba(155,17,30,.15); }
.email-pill--no-email .email-pill__remove { color: var(--muted); }

/* ── Pill text input ── */
.pill-text-input {
  display: block;
  width: 100%;
  border: none;
  outline: none;
  font-size: 13px;
  background: transparent;
  padding: 2px 0;
  color: var(--text);
}
.pill-text-input::placeholder { color: #bbb; }

/* ── Search dropdown ── */
.pill-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  z-index: 500;
  max-height: 260px;
  overflow-y: auto;
}
.pill-dropdown-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
}
.pill-dropdown-item:last-child { border-bottom: none; }
.pill-dropdown-item:hover { background: var(--accent-light); }
.pill-dd-name  { font-weight: 600; }
.pill-dd-email { color: var(--muted); font-size: 12px; }
.pill-dd-noemail { color: #bbb; font-size: 11px; font-style: italic; }
.pill-dd-extra { color: var(--muted); font-size: 11px; margin-left: auto; }

/* ── Compose actions ── */
.compose-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 0 8px;
}

/* ── Template variable help ── */
.compose-help {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.compose-help__summary {
  padding: 10px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  user-select: none;
  list-style: none;
}
.compose-help__summary::-webkit-details-marker { display: none; }
.compose-help__summary:hover { color: var(--text); }
.compose-help__body { padding: 0 16px 14px; }

/* ── Preview overlay ── */
.preview-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.preview-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 48px rgba(0,0,0,.25);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px 24px;
}
.preview-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 15px;
}
.preview-close {
  background: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .1s, color .1s;
}
.preview-close:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Preview email rendering ── */
.preview-email {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9f9f9;
  overflow: hidden;
  margin-top: 8px;
}
.preview-email__subject {
  background: #f0f0f0;
  border-bottom: 1px solid var(--line);
  padding: 8px 14px;
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}
.preview-email__body {
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  min-height: 60px;
}

/* ════════════════════════════════════════════════════════════════════════════
   ROSTER ROW SELECTION (team detail page)
   ════════════════════════════════════════════════════════════════════════════ */

.slot-row--selectable { cursor: pointer; }
.slot-row--selectable:hover td { background: #f5f0ff !important; }
.slot-row--selected td { background: #ede9fe !important; }

/* ─── Player lifecycle row modifiers ───────────────────────────────────────
   - --grayed: athlete has an active OFFER on a *different* team.
   - --strike: athlete has CONFIRMED on a different team, or has DECLINED
               this team's offer.
   - --confirmed / --declined: this team's own confirmed/declined rows. */
.slot-row--grayed td { opacity: 0.45; }
.slot-row--grayed:not(.slot-row--strike) { background: #fafafa; }
/* Strike-through everything in the row (name link, position cell, subtle
   meta line, current-team badges). Targeting `td` directly ensures the
   line is drawn across the whole row instead of just the anchor. */
.slot-row--strike td,
.slot-row--strike td a,
.slot-row--strike td .subtle,
.slot-row--strike td strong { text-decoration: line-through; }
.slot-row--confirmed td { background: #f0fdf4; }
/* Declined: stronger red tint + dashed red left border so the row is
   unmistakable next to neutral/confirmed rows. Drop the global opacity
   so the strikethrough line stays crisp. */
.slot-row--declined td  {
  background: #fee2e2;
  color: #991b1b;
}
.slot-row--declined td:first-child {
  box-shadow: inset 3px 0 0 #dc2626;
}
.slot-row--declined td a { color: #991b1b; }

/* Confirm / Decline split buttons for the Offer-response affordance. */
.btn--confirm {
  background: #16a34a;
  color: #fff;
  border-color: #15803d;
}
.btn--confirm:hover { background: #15803d; }
.btn--decline {
  background: #dc2626;
  color: #fff;
  border-color: #b91c1c;
}
.btn--decline:hover { background: #b91c1c; }

/* Subtle "select all" hint inside the Athlete column header */
.th-select-hint {
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 5px;
  opacity: 0.75;
  vertical-align: middle;
  letter-spacing: 0;
  text-transform: none;
}

/* ── Team send action bar ── */
.send-action-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ede9fe;
  border: 1px solid #c4b5fd;
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.send-action-bar__count {
  font-size: 13px;
  font-weight: 600;
  color: #5b21b6;
  flex: 1;
}

/* ════════════════════════════════════════════════════════════════════════════
   ADMIN USERS CHECKBOXES
   ════════════════════════════════════════════════════════════════════════════ */

.select-check-col {
  width: 36px;
  text-align: center !important;
  padding: 8px 4px !important;
  vertical-align: middle !important;
}
.select-check-col input[type="checkbox"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: var(--accent);
}

/* ── Admin send message bar ── */
.admin-send-bar {
  display: none;
  align-items: center;
  gap: 10px;
  background: #ede9fe;
  border: 1px solid #c4b5fd;
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.admin-send-bar.is-visible { display: flex; }
.admin-send-bar__count {
  font-size: 13px;
  font-weight: 600;
  color: #5b21b6;
  flex: 1;
}

/* ════════════════════════════════════════════════════════════════════════════
   COACH IMPRESSIONS — form layout, skill matrix, read-only display
   ════════════════════════════════════════════════════════════════════════════ */

/*
 * Three-column CSS Grid: [Notes textarea] [Skill matrix] [Rubric]
 * Grid width fills the card; matrix column is sized to its exact pixel content;
 * rubric takes all remaining space.
 *
 * Grid cell calculation:
 *   skill-col (62px) + 5 cells×26px + 4 gaps×3px = 62+130+12 = 204px
 */
.imp-form-layout {
  display: grid;
  /* notes (~50%) | matrix (fixed) | rubric (rest) */
  grid-template-columns: 1fr 204px 1fr;
  grid-template-rows: auto auto;
  column-gap: 16px;
  row-gap: 4px;
  width: 100%;
}

/* Label row: each pane has its own heading */
.imp-col-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--muted);
}

/* Content cells — second row */
.imp-text-pane  { grid-column: 1; }
.imp-matrix-pane { grid-column: 2; }
.imp-rubric-panel { grid-column: 3; }

/* ── Skill matrix (input form) ── */
.skill-matrix { display: flex; flex-direction: column; gap: 3px; }

.skill-matrix__header,
.skill-matrix__row {
  display: flex;
  align-items: center;
  gap: 3px;
}

.skill-matrix__skill-col {
  flex: 0 0 62px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skill-matrix__level-header {
  flex: 0 0 26px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: #bbb;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.skill-matrix__cell {
  flex: 0 0 26px;
  height: 26px;
  border-radius: 4px;
  border: 1px solid #ddd;
  background: #f5f5f5;
  cursor: pointer;
  transition: background .1s, border-color .1s, transform .05s;
  padding: 0;
}
.skill-matrix__cell:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  transform: scale(1.12);
}
.skill-matrix__cell--selected {
  background: var(--accent) !important;
  border-color: var(--accent-dark) !important;
  box-shadow: 0 1px 4px rgba(155,17,30,.35);
}

.skill-matrix__rubric {      /* kept for reference; .imp-rubric-panel IS the rubric */
  min-height: 52px;
  padding: 7px 10px;
  background: #f8f8f8;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.45;
}
.imp-rubric-panel {
  min-height: 52px;
  padding: 7px 10px;
  background: #f8f8f8;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.45;
}

/* Pencil edit button — matches .btn--trash style; SVG inherits currentColor */
.btn--pencil {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--muted);
  line-height: 1;
  display: inline-flex;
  align-items: center;
}
.btn--pencil:hover { color: #cc0000; background: #fff0f0; }

/* ── Read-only impression card body: text left, ratings right ── */
.imp-card-body {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 8px;
}
.imp-card-text { flex: 1; font-size: 13px; line-height: 1.5; }
.imp-card-ratings { flex: 0 0 auto; }

/* ── Read-only ratings display (inside existing impression cards) ── */
.imp-ratings-display {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 8px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.imp-rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.imp-rating-skill {
  flex: 0 0 58px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.imp-rating-cells { display: flex; gap: 3px; }
.imp-cell-sm {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid #ddd;
  background: #eee;
}
.imp-cell-sm--selected { background: var(--accent); border-color: var(--accent-dark); }
.imp-rating-label { font-size: 11px; min-width: 58px; }

@media (max-width: 640px) {
  .imp-form-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .imp-text-pane, .imp-matrix-pane, .imp-rubric-panel { grid-column: 1; }
  .imp-col-label { display: none; }  /* hide labels on mobile; context is clear */
  .imp-card-body { flex-direction: column; }
}

/* 3-state role pills (admin team member management) */
.role-pill-toggle {
  position: relative;
  overflow: visible;
}
.role-pill-toggle[data-role="head"]::after {
  content: 'H';
  position: absolute;
  top: -6px;
  right: -6px;
  background: #000;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #000;
}
.role-pill-toggle[data-role="assistant"]::after {
  content: 'A';
  position: absolute;
  top: -6px;
  right: -6px;
  background: #000;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #000;
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
}

/* ── Evaluation mode ────────────────────────────────────────────────────────── */

/* Break out of the centered .container to use the full viewport */
.eval-layout {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: -24px;
  display: grid;
  grid-template-columns: 300px 1fr;
  height: calc(100vh - 56px); /* topbar is ~56px */
  overflow: hidden;
}

/* Left column */
.eval-player-col {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--panel2);
  overflow: hidden;
}

.eval-player-col__header {
  padding: 12px 12px 8px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.eval-back-link {
  display: block;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 8px;
}
.eval-back-link:hover { color: var(--accent); }

.eval-search-wrap { width: 100%; }
.eval-search {
  width: 100%;
  box-sizing: border-box;
  font-size: 13px;
  padding: 6px 10px;
}

/* Group tabs */
.eval-group-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.eval-group-tabs::-webkit-scrollbar { display: none; }

.eval-group-tab {
  flex-shrink: 0;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.1s, border-color 0.1s;
}
.eval-group-tab:hover { color: var(--fg); }
.eval-group-tab--active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Player list */
.eval-player-list {
  flex: 1;
  overflow-y: auto;
}

.eval-player-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  font-size: 13px;
  transition: background 0.1s;
}
.eval-player-item:hover { background: var(--surface); }
.eval-player-item--selected { background: var(--surface) !important; box-shadow: inset 3px 0 0 var(--accent); }

.eval-player-num {
  color: var(--muted);
  font-size: 11px;
  min-width: 32px;
  flex-shrink: 0;
}
.eval-player-name { flex: 1; font-weight: 500; }
.eval-player-check {
  color: #22863a;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.eval-player-item--done .eval-player-name { color: var(--muted); }

/* Right column */
.eval-form-col {
  overflow-y: auto;
  padding: 20px 24px;
  background: var(--bg);
}

/* Empty state */
.eval-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
  color: var(--muted);
}
.eval-empty-state__icon { font-size: 40px; }
.eval-empty-state__text { font-size: 15px; }

/* Athlete header */
.eval-athlete-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.eval-athlete-name { font-size: 20px; font-weight: 700; display: block; }
.eval-athlete-meta { font-size: 13px; color: var(--muted); display: block; margin-top: 2px; }

/* Save status */
.eval-save-status {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 4px;
}
.eval-save-status--error { color: #e53e3e; }

/* Section */
.eval-section__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 10px;
}

/* Skills + rubric side by side */
.eval-skills-wrap {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.eval-rubric-panel {
  flex: 0 0 200px;
  min-height: 60px;
}

/* Notes */
.eval-notes {
  width: 100%;
  box-sizing: border-box;
  font-size: 13px;
}

/* Combine */
.eval-combine-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.eval-combine-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.eval-combine-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg);
}
.eval-combine-unit {
  font-size: 11px;
}
.eval-combine-input {
  font-size: 13px;
  padding: 6px 8px;
  width: 100%;
  box-sizing: border-box;
}

/* Responsive: collapse to single column on narrow screens */
@media (max-width: 700px) {
  .eval-layout {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }
  .eval-player-col {
    height: 260px;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .eval-form-col { padding: 16px; }
  .eval-skills-wrap { flex-direction: column; }
  .eval-rubric-panel { flex: none; width: 100%; }
}

/* ── Evaluation criteria (event detail page) ────────────────────────────────── */

.criteria-skill-btn {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.criteria-skill-btn--on {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.criteria-skill-btn:hover:not(.criteria-skill-btn--on) {
  border-color: var(--accent);
  color: var(--accent);
}

.criteria-station-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
}
.criteria-station-name { font-weight: 600; flex: 0 0 auto; }
.criteria-station-meta { font-size: 12px; flex: 1; }
.criteria-station-count { font-size: 12px; }
.criteria-station-remove { margin-left: auto; flex-shrink: 0; }

/* ── Evaluation mode: saved notes list ─────────────────────────────────────── */
.eval-note-card {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
}
.eval-note-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.eval-note-author { font-weight: 600; font-size: 12px; }
.eval-note-date   { font-size: 11px; }
.eval-note-text   { line-height: 1.5; white-space: pre-wrap; }
.eval-note-delete {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--subtle);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
  border-radius: 3px;
  opacity: 0.5;
  transition: opacity 0.15s, color 0.15s;
}
.eval-note-delete:hover { opacity: 1; color: var(--danger, #c0392b); }

