/* ============================================================
   BTT Season Scout — season.css
   Same design language as BTT (style.css) with Season Scout
   identity: darker header, green accent, scout-season palette.
   ============================================================ */

/* Toast animation (shared) */
@keyframes btt-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes spin { to { transform: rotate(360deg); } }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design tokens ── */
:root {
  /* Brand (same as BTT) */
  --blue:    #2563eb;
  --blue2:   #1d4ed8;
  --blue-lt: #eff6ff;
  --blue-md: #bfdbfe;
  --purple:  #7c3aed;
  --purp-lt: #f5f3ff;
  --purp-md: #ddd6fe;
  --navy:    #0f172a;
  --navy2:   #1e293b;
  --chalk:   #0f172a;
  --chalk2:  #334155;
  --chalk3:  #64748b;
  --chalk4:  #94a3b8;
  --bg:      #f8fafc;
  --bg2:     #f1f5f9;
  --bg3:     #e2e8f0;
  --border:  #e2e8f0;
  --border2: #cbd5e1;
  --green:   #16a34a;
  --green-lt:#dcfce7;
  --red:     #dc2626;
  --gold:    #d97706;
  --white:   #ffffff;
  --shadow:  0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow2: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);

  /* Season Scout accent — field green */
  --season:    #15803d;
  --season2:   #166534;
  --season-lt: #f0fdf4;
  --season-md: #bbf7d0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--chalk);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

#app { max-width: 1100px; margin: 0 auto; padding: 0 24px 120px; }

/* ── Header / Banner ── */
.ss-header {
  position: relative;
  margin-bottom: 16px;
}
.ss-banner {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0 0 12px 12px;
}

/* Return to Think Tank button */
.ss-back-link {
  position: absolute;
  right: 16px;
  bottom: 16px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #2563eb;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 8px rgba(37,99,235,0.5);
  transition: background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.ss-back-link:hover {
  background: #1d4ed8;
  box-shadow: 0 3px 12px rgba(37,99,235,0.6);
}
.ss-back-link svg {
  flex-shrink: 0;
}

/* ── Status bar ── */
.scoreboard {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.score-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--chalk4);
  flex-shrink: 0;
}
.scoreboard.ready .score-dot { background: var(--season); }
.score-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--chalk2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Nav tabs ── */
.nav-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
  background: var(--bg);
  scrollbar-width: none;
}
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--chalk3);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.15s, border-color 0.15s;
}
.nav-tab:hover { color: var(--season); }
.nav-tab.active { color: var(--season); border-bottom-color: var(--season); }
.tab-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--bg2);
  font-size: 10px;
  font-weight: 700;
  color: var(--chalk3);
}
.nav-tab.active .tab-num { background: var(--season); color: white; }

/* ── Tab panels ── */
.tab-panel { display: none !important; }
.tab-panel.active { display: block !important; width: 100%; }

/* ── Panel header ── */
.panel-header { margin-bottom: 20px; }
.panel-eyebrow {
  font-size: 10px;
  font-weight: 600;
  color: var(--season);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.panel-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 6px;
}
.panel-sub { font-size: 14px; color: var(--chalk3); line-height: 1.6; }

/* ── Feature card grid (landing page) ── */
.ss-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.ss-feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 4px solid var(--season);
  border-radius: 0 0 10px 10px;
  padding: 18px 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.12s;
  text-decoration: none;
  display: block;
}
.ss-feature-card:hover {
  box-shadow: var(--shadow2);
  transform: translateY(-2px);
}
.ss-feature-card.locked {
  opacity: 0.55;
  cursor: default;
  border-top-color: var(--chalk4);
}
.ss-feature-card.locked:hover { transform: none; box-shadow: var(--shadow); }
.ss-feature-icon {
  font-size: 28px;
  margin-bottom: 10px;
  line-height: 1;
}
.ss-feature-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 5px;
}
.ss-feature-desc {
  font-size: 12px;
  color: var(--chalk3);
  line-height: 1.5;
}
.ss-feature-badge {
  display: inline-block;
  margin-top: 10px;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.ss-badge-live { background: var(--green-lt); color: var(--season); }
.ss-badge-soon { background: var(--bg2); color: var(--chalk4); }

/* ── Field card ── */
.field-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.field-card-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--season);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* ── Inputs (same as BTT) ── */
.input-group { margin-bottom: 14px; position: relative; }
.input-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--chalk3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
input[type=text], input[type=number], input[type=date], select, textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  background: var(--white);
  font-size: 13px;
  color: var(--chalk);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--season);
  box-shadow: 0 0 0 3px rgba(21,128,61,0.1);
}

/* ── Buttons ── */
.btn {
  display: block;
  width: 100%;
  padding: 11px 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--season); color: white; }
.btn-primary:hover { background: var(--season2); }
.btn-secondary { background: var(--bg2); color: var(--chalk2); border: 1px solid var(--border2); }
.btn-secondary:hover { background: var(--bg3); }
.btn-blue { background: var(--blue); color: white; }
.btn-blue:hover { background: var(--blue2); }

/* ── Spinner ── */
.ct-spinner { text-align: center; padding: 40px 0; }
.spinner {
  width: 48px; height: 48px;
  background: url('season_icon.png') center/contain no-repeat;
  animation: spin 1.2s linear infinite;
  margin: 0 auto 12px;
}
.load-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--chalk3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Roster results ── */
.rt-summary {
  background: var(--navy);
  color: var(--white);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}
.rt-summary-team {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.rt-summary-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}
.rt-summary-stats strong { color: #fff; }

.rt-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.rt-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}
.rt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.rt-table thead tr { background: var(--bg); }
.rt-table th {
  padding: 8px 10px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--chalk3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.rt-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.rt-table tbody tr:last-child td { border-bottom: none; }
.rt-table tbody tr:hover td { background: var(--season-lt); }
.rt-table tbody tr.rt-notfound { opacity: 0.6; }
.rt-name { min-width: 140px; font-size: 12px; }
.rt-stat { text-align: right; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rt-commit { min-width: 110px; font-size: 11px; }

/* ── Badges ── */
.r-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  background: var(--season);
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: 0.05em;
}
.r-card-title { font-size: 13px; font-weight: 600; color: var(--navy); }

/* ── Error / warn / nodata ── */
.err {
  padding: 12px 16px;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  font-size: 13px;
  color: #991b1b;
  margin-bottom: 12px;
}
.warn-box {
  padding: 12px 16px;
  background: #fef9c3;
  border: 1px solid #fde68a;
  border-radius: 8px;
  font-size: 13px;
  color: #92400e;
  margin-bottom: 12px;
}
.nodata { font-size: 12px; color: var(--chalk4); padding: 16px 0; text-align: center; }

/* ── tbl-wrap (shared table scroll) ── */
.tbl-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
thead tr { border-bottom: 2px solid var(--border2); }
th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  color: var(--chalk3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 8px;
  white-space: nowrap;
  background: var(--bg2);
}
td {
  padding: 8px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--chalk);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--season-lt); }
td.nm { color: var(--navy); font-weight: 600; }
td.mt { text-align: right; font-size: 12px; font-family: monospace; }
td.hi { color: var(--season); font-weight: 700; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Sub-tabs (for future tools) ── */
.ct-sub-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.ct-sub-tabs::-webkit-scrollbar { display: none; }
.ct-sub-tab {
  padding: 9px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--chalk3);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.15s, border-color 0.15s;
}
.ct-sub-tab:hover { color: var(--season); }
.ct-sub-tab.active { color: var(--season); border-bottom-color: var(--season); }

/* ── Coming soon card ── */
.ss-coming-soon {
  background: var(--white);
  border: 2px dashed var(--border2);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  margin-bottom: 16px;
}
.ss-cs-icon { font-size: 40px; margin-bottom: 12px; }
.ss-cs-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.ss-cs-desc { font-size: 13px; color: var(--chalk3); max-width: 420px; margin: 0 auto; line-height: 1.6; }

/* ── Mobile ── */
@media (max-width: 700px) {
  #app { padding: 0 12px 100px; }

  .ss-banner { width: 100%; height: auto; }

  .nav-tab { padding: 9px 9px; font-size: 10px; }
  .tab-num { width: 17px; height: 17px; font-size: 9px; }

  .panel-title { font-size: 19px; }
  .field-card { padding: 14px 12px; }

  input[type=text], input[type=number], input[type=date], select, textarea {
    font-size: 16px;
    padding: 10px 12px;
  }

  .ss-feature-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ss-feature-card { padding: 14px 12px; }
  .ss-feature-icon { font-size: 22px; }
  .ss-feature-title { font-size: 13px; }

  .tbl-wrap { margin: 0 -12px; padding: 0 12px; }
  .rt-table { font-size: 11px; }
  .rt-table th, .rt-table td { padding: 7px 6px; }
  .rt-summary { flex-direction: column; align-items: flex-start; }
}

/* ── Saved tournament rows ── */
.tourn-saved-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.tourn-saved-row:last-child { border-bottom: none; }

/* ── Standings expand rows ── */
.standings-team-row:hover { background: rgba(0,0,0,0.02); }
.standings-team-row:hover td:first-child { color: var(--blue); }
