:root {
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --text: #1B1E23;
  --text-soft: #6B7280;
  --border: #E4E6EA;
  --accent: #0F6E6E;
  --accent-hover: #0B5757;
  --danger: #C4432B;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
}

/* The site navbar (loaded by nav-loader.js) sits above the page content. */
#site-nav { flex: none; }
.site-nav-fallback {
  padding: 14px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.site-nav-fallback a { color: var(--accent); text-decoration: none; font-weight: 500; }

/* The page content is centred in whatever space the navbar leaves. */
.page-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.wrap { width: 100%; max-width: 420px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.card.wide { max-width: 480px; }

.hidden { display: none !important; }

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 24px;
}

.logo .dot { color: var(--accent); }

form { display: flex; flex-direction: column; gap: 16px; }

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
}

input, textarea, select {
  font-family: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15,110,110,0.12);
}

textarea { resize: vertical; }

button { cursor: pointer; font-family: inherit; }

.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 11px 16px;
  font-size: 15px;
  font-weight: 600;
  margin-top: 4px;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-google {
  width: 100%;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.btn-google:hover { background: #FAFAFA; }

.btn-ghost {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--text-soft);
}
.btn-ghost:hover { background: var(--bg); }
a.btn-ghost {
  display: inline-block;
  text-decoration: none;
}

.btn-danger {
  background: none;
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 500;
  width: 100%;
}
.btn-danger:hover { background: rgba(196,67,43,0.06); }

.switch {
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-soft);
  text-align: center;
}
.switch.small { margin-top: 8px; font-size: 12px; }

.switch a { color: var(--accent); text-decoration: none; font-weight: 500; }
.switch a:hover { text-decoration: underline; }

.error, .success {
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
  display: none;
}
.error { background: #FDECEA; color: var(--danger); }
.success { background: #E8F3EF; color: var(--accent); }
.error:not(:empty), .success:not(:empty) { display: block; }

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.app-header .logo { margin: 0; }

.profile-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 18px;
  flex-shrink: 0;
}

.profile-name { font-weight: 600; font-size: 15px; }
.profile-email { font-size: 13px; color: var(--text-soft); }

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0 18px;
}

.hint {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.5;
  margin: -4px 0 4px;
}

.optional {
  font-weight: 400;
  color: var(--text-soft);
  text-transform: none;
}

.link-status {
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 18px;
  background: var(--bg);
  color: var(--text-soft);
}
.link-status.linked {
  background: #E8F3EF;
  color: var(--accent);
}
.link-status.unmatched {
  background: #FBF3E7;
  color: #92600B;
}

.checkbox-label {
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  font-size: 14px !important;
  color: var(--text) !important;
  font-weight: 400 !important;
}
.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

@media (max-width: 480px) {
  .card { padding: 24px 20px; }
}

/* ---------- Timezone picker ---------- */
.tz-picker {
  position: relative;
}

.tz-picker-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  text-align: left;
}
.tz-picker-trigger:hover { border-color: var(--accent); }
.tz-picker-trigger[aria-expanded="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15,110,110,0.12);
}

.tz-picker-chevron {
  flex-shrink: 0;
  color: var(--text-soft);
  transition: transform 0.15s ease;
}
.tz-picker-trigger[aria-expanded="true"] .tz-picker-chevron {
  transform: rotate(180deg);
}

.tz-picker-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  overflow: hidden;
}

.tz-picker-search {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  outline: none;
}
.tz-picker-search:focus { border-color: var(--accent); }

.tz-picker-list {
  max-height: 260px;
  overflow-y: auto;
  padding: 6px 0;
}

.tz-group-header {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding: 10px 14px 4px;
}

.tz-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: inherit;
  font-size: 14px;
  padding: 9px 14px;
  border: none;
  background: none;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.tz-option:hover { background: var(--bg); }
.tz-option.selected {
  background: var(--accent);
  color: white;
}
.tz-option.selected .tz-option-time { color: rgba(255,255,255,0.85); }

.tz-option-time {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-soft);
}

.tz-empty {
  padding: 14px;
  font-size: 13px;
  color: var(--text-soft);
  text-align: center;
}

/* ---------- Admin page ---------- */
.card.admin {
  max-width: 1200px;
  width: 100%;
}
.wrap.admin-wrap {
  max-width: 1200px;
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.stat-pill {
  background: var(--bg);
  border-radius: 10px;
  padding: 10px 16px;
  min-width: 100px;
}
.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.stat-label {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 2px;
}

.admin-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}
.admin-controls input[type="text"] {
  flex: 1;
  min-width: 220px;
  font-family: inherit;
  font-size: 14px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
}
.admin-controls select {
  font-family: inherit;
  font-size: 14px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  max-height: 70vh;
  overflow-y: auto;
}

.admin-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  white-space: nowrap;
}
.admin-table th {
  position: sticky;
  top: 0;
  background: var(--bg);
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  z-index: 1;
}
.admin-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.admin-table tbody tr:hover { background: var(--bg); }
.admin-table code {
  font-size: 11px;
  color: var(--text-soft);
}

.admin-subtext {
  font-size: 11px;
  color: var(--text-soft);
  white-space: normal;
  max-width: 160px;
  margin-top: 2px;
}

.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}
.badge-confirmed { background: #E8F3EF; color: var(--accent); }
.badge-out { background: #FDECEA; color: var(--danger); }
.badge-pending { background: var(--bg); color: var(--text-soft); }

/* ---------- Admin inline editing ---------- */
.admin-table input.admin-edit,
.admin-table select.admin-edit {
  font-family: inherit;
  font-size: 13px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  width: 100%;
  min-width: 90px;
}
.admin-table input.admin-edit:hover,
.admin-table select.admin-edit:hover {
  border-color: var(--border);
  background: var(--surface);
}
.admin-table input.admin-edit:focus,
.admin-table select.admin-edit:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 2px rgba(15,110,110,0.12);
}
.admin-table input.admin-edit-error {
  border-color: var(--danger) !important;
  background: #FDECEA !important;
}

.admin-timezone-select {
  min-width: 190px !important;
  width: 190px;
}

.admin-edit-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.admin-pause-pair {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-soft);
}
.admin-pause-pair input {
  min-width: unset !important;
  text-align: center;
}
.admin-pause-dash {
  flex-shrink: 0;
}
.admin-pause-end {
  min-width: 60px;
  text-align: center;
}

/* ---------- Draft status widget ---------- */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.draft-status-widget {
  display: flex;
  gap: 8px;
}

.draft-status-select {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}
.draft-status-select:hover { border-color: var(--accent); }
.draft-status-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15,110,110,0.12);
}

/* ---------- Control Center: tabs ---------- */
.cc-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.cc-tab {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  border: none;
  background: none;
  color: var(--text-soft);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.cc-tab:hover { color: var(--text); }
.cc-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.cc-tab-panel.hidden { display: none; }

/* ---------- Control Center: Sports tab ---------- */
.sports-edit {
  font-family: inherit;
  font-size: 13px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  width: 100%;
  min-width: 110px;
}
.sports-edit:hover { border-color: var(--border); background: var(--surface); }
.sports-edit:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 2px rgba(15,110,110,0.12);
}
.sports-edit-wide { min-width: 260px; }

.sports-edit-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

#sports-table-body .btn-danger {
  width: auto;
  padding: 6px 12px;
  font-size: 12px;
}

/* ---------- Settings page: autosave, sections, coming-back block ---------- */
#settings-form { gap: 32px; }

/* Wrapper/slot elements don't take part in layout themselves, so their
   children are spaced by the form's gap (and hidden ones add no gap). */
#manager-profile-fields,
#manager-return-status-top-slot,
#manager-return-status-bottom-slot { display: contents; }

.form-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}
.section-sub {
  font-size: 13px;
  color: var(--text-soft);
  margin: -10px 0 0;
}

#manager-unique-name-field .hint { margin: 8px 0 0; }

.save-status {
  min-height: 18px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-soft);
  text-align: right;
  transition: opacity 0.2s;
}
.save-status:empty { opacity: 0; }
.save-status[data-state="saved"] { color: var(--accent); }
.save-status[data-state="error"] { color: var(--danger); }

/* "Are you coming back for [year]?" -- a quiet panel once answered; the
   .urgent variant (set by app.js while unanswered) is loud on purpose. */
.return-status-question {
  font-weight: 600;
  color: var(--text);
  margin: 0 0 2px;
}
#manager-return-status-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
#manager-return-status-block.urgent {
  background: #FDECEA;
  border: 2px solid var(--danger);
}
#manager-return-status-block.urgent .return-status-question {
  color: var(--danger);
  font-size: 15px;
}

/* Delete account: still there, no longer competing for attention */
.account-footer {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.account-footer .btn-danger {
  width: auto;
  border: none;
  padding: 6px 10px;
  text-decoration: underline;
  opacity: 0.8;
}
.account-footer .btn-danger:hover { opacity: 1; background: none; }

/* ---------- Initial load ---------- */
/* Fades in only if the session check is slow, so a fast restore shows nothing. */
.loading {
  text-align: center;
  font-size: 14px;
  color: var(--text-soft);
  animation: loading-in 0.2s ease 0.4s both;
}
@keyframes loading-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .loading { animation-duration: 0s; } }

/* ---------- Signup page ---------- */
.signup-intro {
  margin: -8px 0 20px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-soft);
}

#signup-page-form { gap: 22px; }

/* A question with several answers (radios / checkboxes) */
.choice-group {
  border: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.choice-group legend {
  padding: 0;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-soft);
}
.checkbox-label input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.field-note {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-soft);
}

.signup-done-link {
  display: block;
  margin-top: 20px;
  text-align: center;
  text-decoration: none;
}

/* ---------- Control Center: manager flags ---------- */
.admin-flag { color: var(--danger); font-weight: 600; }

#manager-notify-hint:empty { display: none; }

.or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -6px 0;
  font-size: 12px;
  color: var(--text-soft);
}
.or-divider::before,
.or-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--border);
}
#signup-page-form .btn-google { margin-top: 0; }

/* ---------- Control Center on phones ---------- */
.mobile-sort { display: none; }

@media (max-width: 700px) {
  /* Page chrome: use the whole screen, start at the top */
  .page-main:has(.admin-wrap) { align-items: flex-start; padding: 10px; }
  .card.admin { padding: 16px; border-radius: 12px; }

  /* Header: logo + log out on one row, season controls on their own row.
     (More specific than the inline rules in control-center.html.) */
  .card.admin .app-header { flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
  .card.admin .header-right { display: contents; }
  .card.admin .app-header .logo { order: 1; font-size: 20px; }
  .card.admin #logout-btn { order: 2; margin-left: auto; }
  .card.admin .draft-status-widget {
    order: 3;
    flex: 1 1 100%;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius);
  }
  .card.admin .draft-status-table { width: 100%; flex: 1 1 100%; }
  .card.admin .draft-status-table td { padding: 4px 6px 4px 0; }
  .card.admin .draft-status-select { width: 100%; font-size: 16px; padding: 9px 10px; }
  .card.admin .draft-status-active-label {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-size: 13px;
  }
  .card.admin .draft-status-widget .btn-small {
    flex: 1 1 0;
    min-height: 40px;
    padding: 8px 10px;
    font-size: 14px;
  }
  .card.admin .activation-status { text-align: left; margin-bottom: 12px; }

  /* Tabs: one swipeable strip instead of clipping off the edge */
  .cc-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 -16px 16px;
    padding: 0 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .cc-tabs::-webkit-scrollbar { display: none; }
  .cc-tabs .cc-tab { flex: 0 0 auto; white-space: nowrap; padding: 10px 12px; }

  /* Stats: a tidy three-across grid */
  .stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat-pill { min-width: 0; padding: 10px 12px; }
  .stat-value { font-size: 18px; }
  .stat-label { overflow-wrap: anywhere; }

  /* Controls: full-width, big enough to tap, no iOS zoom-on-focus */
  .admin-controls { gap: 8px; }
  .admin-controls input[type="text"] { flex: 1 1 100%; min-width: 0; font-size: 16px; }
  .admin-controls select { flex: 1 1 140px; min-width: 0; font-size: 16px; }
  .admin-controls .teams-sport-picker-label { flex: 1 1 100%; }
  .admin-controls .teams-sport-picker-label select { width: 100%; }
  .admin-controls .btn-primary { min-height: 42px; }
  .cc-tab-panel .manual-odds-textarea { min-height: 55vh; font-size: 14px; }

  /* Sort dropdown (added by control-center.js) -- cards have no column headers */
  .mobile-sort {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    font-size: 16px;
  }

  /* ---- Tables become cards: one card per row ---- */
  .admin-table-wrap {
    border: none;
    border-radius: 0;
    max-height: none;
    overflow: visible;
  }
  .admin-table,
  .admin-table tbody { display: block; white-space: normal; }
  .admin-table thead { display: none; }

  .admin-table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 14px;
    margin-bottom: 12px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }
  .admin-table tbody tr:hover { background: var(--surface); }

  .admin-table td {
    display: block;
    min-width: 0;
    padding: 0;
    border: none;
    font-size: 14px;
    overflow-wrap: anywhere;
  }
  .admin-table td:empty { display: none; }
  .admin-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-soft);
  }

  /* Wide or important cells take the full card width */
  .admin-table td[colspan],
  .admin-table td[data-label="Email"],
  .admin-table td[data-label="Timezone"],
  .admin-table td[data-label="Odds page"],
  .admin-table td[data-label="Wikipedia page"],
  .admin-table td[data-label="Aliases"],
  .admin-table td[data-label="Name"],
  .admin-table td[data-label="Team"],
  .admin-table td[data-label="Status"] { grid-column: 1 / -1; }

  /* Cells with no column name are the row's buttons: full width, last */
  .admin-table td[data-label=""] {
    grid-column: 1 / -1;
    order: 99;
    display: flex;
    gap: 8px;
  }
  .admin-table td[data-label=""]::before { display: none; }
  .admin-table td[data-label=""] > button { flex: 1; min-height: 42px; }
  .admin-table td[colspan]::before { display: none; }

  /* Managers: name on top, then status and league, then the details */
  #admin-table-body td:nth-child(2) { order: -3; }
  #admin-table-body td:nth-child(4) { order: -2; }
  #admin-table-body td:nth-child(1) { order: -1; }

  /* Edits need to look editable without hover */
  .admin-table td :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    width: 100%;
    min-width: 0;
    padding: 9px 10px;
    font-size: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
  }
  .admin-table td .admin-timezone-select { width: 100% !important; min-width: 0 !important; }
  /* Number fields carry an inline width (e.g. "Born" at 72px) that's too tight at 16px text */
  .admin-table td input[type="number"] { width: 100% !important; }
  .admin-table td .admin-pause-pair input[type="number"] { width: 64px !important; }
  .admin-table td .admin-subtext { max-width: none; font-size: 12px; margin-top: 4px; }
  .admin-edit-checkbox,
  .sports-edit-checkbox { width: 22px; height: 22px; }
}

/* ---------- Control Center: manager status colours + phone cards ---------- */
.badge-new { background: #E6EEFB; color: #1F4FA3; }

/* The status dropdown doubles as the status badge, on every screen size. */
#admin-table-body select.status-select { font-weight: 600; border-radius: 999px; }
#admin-table-body select.status-confirmed { background: #E8F3EF; color: var(--accent); }
#admin-table-body select.status-out       { background: #FDECEA; color: var(--danger); }
#admin-table-body select.status-new       { background: #E6EEFB; color: #1F4FA3; }
#admin-table-body select.status-pending,
#admin-table-body select.status-unset     { background: var(--bg); color: var(--text-soft); }

@media (max-width: 700px) {
  /* Name is the card's title: big, bold, and only looks like a field once focused. */
  #admin-table-body td[data-label="Name"]::before,
  #admin-table-body td[data-label="Status"]::before { display: none; }
  #admin-table-body td[data-label="Name"] input {
    font-size: 18px;
    font-weight: 600;
    padding: 2px 0;
    border-color: transparent;
    background: transparent;
  }
  #admin-table-body td[data-label="Name"] input:focus {
    padding: 9px 10px;
    border-color: var(--accent);
    background: var(--surface);
  }
  #admin-table-body select.status-select { padding: 9px 14px; }

  /* Pause start is an hour dropdown now (was a number box): give it room for "12:00 AM". */
  #admin-table-body td .admin-pause-pair select { width: 130px; flex: 0 0 auto; }
  #admin-table-body td[data-label="Pause (local)"] { grid-column: 1 / -1; }

  /* A closed card shows only league, name and status (plus the status cell's
     flags, like "not chill"). Tapping the card opens the rest. */
  #admin-table-body tr:not(.expanded) td:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(4)) { display: none; }
  #admin-table-body tr::after {
    content: "Show details \25BE";
    grid-column: 1 / -1;
    order: 98;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
  }
  #admin-table-body tr.expanded::after { content: "Hide details \25B4"; }
}
