/* transfer_ledger.css — styles for transfer_ledger_tab.js's `.tl-*` markup.
   Every color/space/radius value below is a real GAF token (--color-*,
   --space-*, --text-*, --radius-*, --shadow-*) — body.night's own
   redeclaration of those same tokens (style.css ~2830) re-themes this page
   automatically, same as every other tab; no dark-mode-specific rules here. */

#tab-transferledger .page-header {
  text-align: center;
}

.tl-methodology {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 900px;
  margin: 0 auto var(--space-8);
}

/* ---- Overview ---- */
.tl-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--panel-gap);
  margin-bottom: var(--space-5);
}
.tl-stat {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.tl-stat-num {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
}
.tl-stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.tl-narrative {
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.6;
  /* No cap ran this as a single ~1680px line at wide viewports -- much
     harder to scan than the capped-width prose on the Gaffer/Briefing
     pages right next to this one in the same nav section. Centered too --
     a cap with no auto margin just swaps "too-wide flush-left" for
     "narrower flush-left with a gutter," same bug family. */
  max-width: 760px;
  margin: 0 auto var(--space-5);
}
.tl-subhead {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-3);
}
/* Reads as a continuation of .tl-narrative's prose right above it (a few
   short sentences, not a data grid) -- capped + centered to match it so
   the pair reads as one column instead of a centered paragraph over a
   full-width list. */
.tl-deal-list {
  margin: 0 auto;
  padding-left: 1.25em;
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.7;
  max-width: 760px;
}

/* ---- Search ---- */
.tl-search-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.tl-search-row input {
  flex: 1 1 320px;
  max-width: 420px;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.tl-search-row input:focus {
  outline: none;
  border-color: var(--color-primary, #00ff87);
}
.tl-search-count {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ---- Club cards ---- */
.tl-club-grid {
  /* Was flex-direction: column -- stacked all 20 collapsed club cards
     (each just a crest + name, short content) in a single column instead
     of letting them flow into a grid. team_news.css's near-identical
     .tn-club-grid already does this correctly. */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-3);
}
.tl-club-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.tl-club-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  flex-wrap: wrap;
}
.tl-club-summary::-webkit-details-marker { display: none; }
.tl-club-summary::marker { content: ""; }
.tl-club-summary:hover { background: var(--color-surface-2); }

.tl-club-crest { line-height: 0; width: 28px; height: 28px; flex: 0 0 auto; }
.tl-club-crest .gaf-crest { display: block; width: 100%; height: 100%; }
.tl-club-crest .gaf-crest--unknown { width: 100%; height: 100%; }

.tl-club-name {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  min-width: 160px;
}

.tl-club-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}
.tl-meta-in { color: var(--color-success, #157f3a); }
.tl-meta-out { color: var(--color-danger, #c62828); }

.tl-club-body {
  padding: 0 var(--space-4) var(--space-4);
  border-top: 1px solid var(--color-divider);
}
.tl-rationale {
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.6;
  margin: var(--space-4) 0;
}
.tl-club-note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  line-height: 1.5;
  margin-top: var(--space-4);
}
.tl-empty {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  padding: var(--space-3) 0;
}

/* ---- Verdict badge, 5 tiers on the same green/red scale as the rest of
   the app (fdr-bg-N, projection-high/low) — no new hues invented. ---- */
.tl-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.tl-tier-up2   { background: rgba(21,127,58,0.22);  color: var(--color-success, #157f3a); border: 1px solid rgba(21,127,58,0.4); }
.tl-tier-up1   { background: rgba(21,127,58,0.12);  color: var(--color-success, #157f3a); border: 1px solid rgba(21,127,58,0.25); }
.tl-tier-flat  { background: var(--color-surface-2); color: var(--color-text-muted); border: 1px solid var(--color-border); }
.tl-tier-down1 { background: rgba(198,40,40,0.12);  color: var(--color-danger, #c62828); border: 1px solid rgba(198,40,40,0.25); }
.tl-tier-down2 { background: rgba(198,40,40,0.22);  color: var(--color-danger, #c62828); border: 1px solid rgba(198,40,40,0.4); }
.tl-badge--none {
  background: transparent;
  color: var(--color-text-faint);
  border: 1px dashed var(--color-border);
}

/* ---- Arrivals / departures tables ---- */
.tl-xfer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}
@media (max-width: 860px) {
  .tl-xfer-cols { grid-template-columns: 1fr; }
}
.tl-xfer-heading {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
}
.tl-xfer-heading--in { color: var(--color-success, #157f3a); }
.tl-xfer-heading--out { color: var(--color-danger, #c62828); }
.tl-xfer-wrap { max-height: 420px; overflow-y: auto; }
.tl-xfer-table { min-width: 0; }
.tl-xfer-table .tl-player { font-weight: 600; }
.tl-xfer-table .tl-pos {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tl-xfer-table .tl-club {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.tl-xfer-table .tl-club .gaf-crest { width: 16px; height: 16px; flex: 0 0 auto; }
.tl-xfer-table .tl-fee-sub {
  display: block;
  font-size: 10px;
  color: var(--color-text-faint);
}
.tl-xfer-table .tl-notes {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  max-width: 220px;
}
