/* ============================================================
   SIQ Design System — single source of visual truth
   Themes: dark (default) / light via html[data-theme="light"]
   ============================================================ */

:root {
  /* surfaces */
  --bg:           #0a0c10;
  --bg-orb-1:     rgba(34, 211, 238, 0.10);
  --bg-orb-2:     rgba(139, 92, 246, 0.10);
  --panel-bg:     rgba(22, 26, 34, 0.78);
  --panel-border: rgba(255, 255, 255, 0.07);
  --panel-inner:  rgba(255, 255, 255, 0.04);
  --elev-bg:      #1b212b;

  /* text */
  --text:         #e8ecf3;
  --text-dim:     #8b94a7;
  --text-faint:   #5b6374;

  /* accents */
  --accent:       #22d3ee;
  --accent-2:     #8b5cf6;
  --accent-grad:  linear-gradient(135deg, #22d3ee 0%, #3b82f6 55%, #8b5cf6 100%);
  --green:        #34d399;
  --red:          #f87171;
  --amber:        #fbbf24;
  --blue:         #60a5fa;

  /* fx */
  --glow-accent:  0 0 22px rgba(34, 211, 238, 0.35);
  --glow-green:   0 0 18px rgba(52, 211, 153, 0.35);
  --glow-blue:    0 0 18px rgba(96, 165, 250, 0.35);
  --glow-red:     0 0 18px rgba(248, 113, 113, 0.35);
  --glow-purple:  0 0 18px rgba(139, 92, 246, 0.35);
  --shadow-1:     0 8px 30px rgba(0, 0, 0, 0.45);

  /* shape & type */
  --radius:       14px;
  --radius-sm:    9px;
  --font:         "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
                  Roboto, Helvetica, Arial, sans-serif;
}

html[data-theme="light"] {
  --bg:           #f7f5f2;
  --bg-orb-1:     rgba(8, 145, 178, 0.07);
  --bg-orb-2:     rgba(124, 58, 237, 0.06);
  --panel-bg:     rgba(255, 253, 250, 0.96);
  --panel-border: rgba(17, 24, 39, 0.1);
  --panel-inner:  rgba(243, 240, 235, 0.6);
  --elev-bg:      #ffffff;
  --text:         #111827;
  --text-dim:     #4b5563;
  --text-faint:   #9ca3af;
  --accent:       #0891b2;
  --accent-2:     #7c3aed;
  --accent-grad:  linear-gradient(135deg, #0891b2 0%, #2563eb 55%, #7c3aed 100%);
  --green:        #059669;
  --red:          #dc2626;
  --amber:        #d97706;
  --blue:         #2563eb;
  --glow-accent:  0 0 14px rgba(8, 145, 178, 0.22);
  --glow-green:   0 0 10px rgba(5, 150, 105, 0.20);
  --glow-blue:    0 0 10px rgba(37, 99, 235, 0.20);
  --glow-red:     0 0 10px rgba(220, 38, 38, 0.20);
  --glow-purple:  0 0 10px rgba(124, 58, 237, 0.20);
  --shadow-1:     0 4px 20px rgba(17, 24, 39, 0.08);
}

/* ---------- combo skin: "club frame" ----------
   Ported from PlayerProfiles' mixed theme: deep accent-tinted topbar +
   sidebar frame, warm beige background, cream panels. Applied as a skin
   ON TOP of the light theme (data-theme="light" + data-skin="combo") so
   every chart/export that branches on data-theme keeps its light path.
   Accent = the per-instance branding accent injected in base.html.
   Frame tokens are precomputed here at html level (where --accent is the
   page accent) so the scoped overrides below can't self-reference. */
html[data-theme="light"][data-skin="combo"] {
  --tone:         #e9dcc6;
  --bg:           var(--tone);
  --bg-orb-1:     color-mix(in srgb, var(--accent) 9%, transparent);
  --bg-orb-2:     color-mix(in srgb, #8d7752 12%, transparent);
  --panel-bg:     color-mix(in srgb, var(--tone) 28%, #fffdf8);
  --panel-border: color-mix(in srgb, var(--tone) 55%, #8d7752);
  --panel-inner:  rgba(255, 255, 255, 0.55);
  --elev-bg:      color-mix(in srgb, var(--tone) 42%, #fffdf8);
  --text:         color-mix(in srgb, var(--tone) 10%, #241c11);
  --text-dim:     color-mix(in srgb, var(--tone) 20%, #5b4b36);
  --text-faint:   color-mix(in srgb, var(--tone) 32%, #6e5c44);
  --shadow-1:     0 4px 20px rgba(90, 80, 55, 0.16);
  --frame-bg:         color-mix(in srgb, var(--accent) 30%, #131512);
  --frame-bg-hi:      color-mix(in srgb, var(--accent) 37%, #131512);
  --frame-border:     color-mix(in srgb, var(--accent) 45%, #131512);
  --frame-panel:      color-mix(in srgb, var(--accent) 42%, #191c17);
  --frame-text:       color-mix(in srgb, var(--accent) 10%, #f0f1ec);
  --frame-text-dim:   color-mix(in srgb, var(--accent) 16%, #aab1a6);
  --frame-text-faint: color-mix(in srgb, var(--accent) 16%, #8f968b);
  --frame-accent:     color-mix(in srgb, var(--accent) 45%, #f2f6f0);
}
html[data-theme="light"][data-skin="combo"] .topbar {
  background: var(--frame-bg);
  border-bottom: 1px solid var(--frame-border);
}
html[data-theme="light"][data-skin="combo"] .sidebar {
  background: linear-gradient(180deg, var(--frame-bg-hi) 0%, var(--frame-bg) 220px);
  border-right: 1px solid var(--frame-border);
}
html[data-theme="light"][data-skin="combo"] .topbar,
html[data-theme="light"][data-skin="combo"] .sidebar {
  --text:         var(--frame-text);
  --text-dim:     var(--frame-text-dim);
  --text-faint:   var(--frame-text-faint);
  --accent:       var(--frame-accent);
  --panel-bg:     var(--frame-panel);
  --panel-inner:  rgba(255, 255, 255, 0.05);
  --panel-border: rgba(255, 255, 255, 0.14);
  --elev-bg:      var(--frame-panel);
  color: var(--text);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
html[data-theme="light"][data-skin="combo"] .sidebar-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}
html[data-theme="light"][data-skin="combo"] .sidebar-link.active {
  background: color-mix(in srgb, var(--frame-accent) 18%, transparent);
  color: var(--accent);
  box-shadow: inset 2px 0 0 var(--accent);
}

/* ---------- typography ---------- */
.nc-h1 { font-size: 1.5rem;  font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.nc-h2 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.nc-h3 { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.nc-dim   { color: var(--text-dim); }
.nc-faint { color: var(--text-faint); }
.nc-danger-text { color: var(--red); }
.nc-ok-text { color: var(--green); }
.nc-warn-text { color: var(--amber); }
.nc-accent-text { color: var(--accent); }
.nc-err-text { color: var(--red); }
.nc-grad-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- panel ---------- */
.nc-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1), inset 0 1px 0 var(--panel-inner);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 20px;
}
.nc-panel-hover { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.nc-panel-hover:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: var(--shadow-1), var(--glow-accent);
}

/* ---------- buttons ---------- */
.nc-btn {
  font: 600 0.9rem/1 var(--font);
  color: var(--text);
  background: var(--elev-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.nc-btn:hover  { transform: translateY(-1px); filter: brightness(1.1); }
.nc-btn:active { transform: translateY(0); }
.nc-btn-primary {
  background: var(--accent-grad);
  border: none;
  color: #fff;
}
.nc-btn-primary:hover { box-shadow: var(--glow-accent); }
.nc-btn-danger { background: var(--red); border: none; color: #fff; }
.nc-btn-danger:hover { box-shadow: var(--glow-red); }
.nc-btn-ghost-danger { background: transparent; border: 1px solid var(--red); color: var(--red); font-size: 0.78rem; padding: 3px 10px; }
.nc-btn-ghost-danger:hover { background: color-mix(in srgb, var(--red) 10%, transparent); }
.nc-btn-sm { padding: 4px 10px; font-size: 0.8rem; }
.nc-back { display: inline-block; margin-bottom: 14px; }

/* nc-chip: compact pill button for grouped pickers / secondary admin nav.
   Reusable wherever a dense set of toggle-like choices is needed. */
.nc-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 0.82rem var(--font);
  color: var(--text-dim);
  background: var(--elev-bg);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 5px 13px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.nc-chip:hover { color: var(--text); border-color: var(--border); }
.nc-chip.active {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.nc-chip.active:hover { color: #fff; }

/* vertical tab / side-menu button */
.nc-vtab {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  font: 600 0.85rem var(--font);
  color: var(--text-dim);
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  cursor: pointer;
  text-align: left;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.nc-vtab:hover { color: var(--text); background: var(--elev-bg); }
.nc-vtab.active {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}
.nc-vtab .nc-badge { margin-left: auto; }

/* ---------- inputs ---------- */
.nc-input, .nc-select, .nc-textarea {
  font: 400 0.95rem var(--font);
  color: var(--text);
  background: var(--elev-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  outline: none;
  width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.nc-input-sm { width: auto; padding: 5px 8px; font-size: 0.85rem; }
.nc-input::placeholder { color: var(--text-faint); }
.nc-input:focus, .nc-select:focus, .nc-textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent);
}

/* ---------- badges ---------- */
.nc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 0.75rem/1 var(--font);
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.nc-badge-accent { color: var(--accent); background: rgba(34,211,238,.12);  border-color: rgba(34,211,238,.3); }
.nc-badge-green  { color: var(--green);  background: rgba(52,211,153,.12);  border-color: rgba(52,211,153,.3); }
.nc-badge-danger { color: var(--red);    background: rgba(248,113,113,.12); border-color: rgba(248,113,113,.3); }
.nc-badge-blue   { color: var(--blue);   background: rgba(96,165,250,.12);  border-color: rgba(96,165,250,.3); }
.nc-badge-amber  { color: var(--amber);  background: rgba(251,191,36,.12);  border-color: rgba(251,191,36,.3); }
.nc-badge-purple { color: var(--accent-2); background: rgba(139,92,246,.12); border-color: rgba(139,92,246,.3); }
/* combo skin: pale amber tints sink into the beige base - stronger frame + fill */
html[data-theme="light"][data-skin="combo"] .nc-badge-amber,
html[data-theme="light"][data-skin="combo"] .nc-badge-near,
html[data-theme="light"][data-skin="combo"] .nc-badge-src-wyscout,
html[data-theme="light"][data-skin="combo"] .nc-badge-cat-signon_loyalty {
  border-color: color-mix(in srgb, var(--amber) 65%, transparent);
  background: color-mix(in srgb, #fbbf24 24%, transparent);
}
.nc-badge-error  { color: var(--red);    background: rgba(248,113,113,.12); border-color: rgba(248,113,113,.3); }
/* per-position color from inline --pc (set to Position.color), so position
   badges keep their own colors independent of the brand accent */
.nc-badge-pos    { color: var(--pc); background: color-mix(in srgb, var(--pc) 14%, transparent); border-color: color-mix(in srgb, var(--pc) 35%, transparent); }
/* light + combo: raw position colors are picked for dark bg - deepen text toward
   the theme ink and harden frame/fill so bright hues stay readable on light bases
   (combo re-scopes --text to its warm ink, so one rule serves both) */
html[data-theme="light"] .nc-badge-pos,
html[data-theme="light"] .nc-badge-dyn {
  color: color-mix(in srgb, var(--pc, var(--text-dim)) 55%, var(--text));
  background: color-mix(in srgb, var(--pc, #888) 22%, transparent);
  border-color: color-mix(in srgb, var(--pc, #888) 72%, var(--text));
}
.nc-badge-sold   { color: #cbd5e1; background: rgba(148,163,184,.14); border-color: rgba(148,163,184,.34); }

/* Bonus clause status */
.nc-badge-pending   { color: #64748b;        background: rgba(148,163,184,.08);  border-color: rgba(148,163,184,.2);  }
.nc-badge-accruing  { color: var(--blue);    background: rgba(96,165,250,.12);   border-color: rgba(96,165,250,.3);   }
.nc-badge-near      { color: var(--amber);   background: rgba(251,191,36,.15);   border-color: rgba(251,191,36,.45);  animation: badge-near-pulse 2s ease-in-out infinite; }
.nc-badge-triggered { color: var(--green);   background: rgba(52,211,153,.15);   border-color: rgba(52,211,153,.45);  }
.nc-badge-acknowledged { color: #22d3ee;     background: rgba(34,211,238,.12);   border-color: rgba(34,211,238,.4);   }
.nc-badge-paid      { color: #94a3b8;        background: rgba(148,163,184,.10);  border-color: rgba(148,163,184,.25); }
.nc-badge-void      { color: #475569;        background: transparent;            border-color: rgba(148,163,184,.2);  text-decoration: line-through; }

/* Blinking attention badge (e.g. expired contract) */
.pc-blink { animation: pc-blink 1.1s steps(1, end) infinite; }

/* Contract date emphasis in the player card footrow */
.pc-contract-expired { color: var(--red);   font-weight: 600; }
.pc-contract-ending  { color: var(--amber); font-weight: 600; }

/* Appearance source */
.nc-badge-src-manual  { color: var(--green); background: rgba(52,211,153,.12);  border-color: rgba(52,211,153,.3);  }
.nc-badge-src-wyscout { color: var(--amber); background: rgba(251,191,36,.12);  border-color: rgba(251,191,36,.3);  }
.nc-badge-src-spiideo { color: #64748b;      background: rgba(148,163,184,.08); border-color: rgba(148,163,184,.2); }
.nc-badge-src-fotmob  { color: #60a5fa;      background: rgba(96,165,250,.10);  border-color: rgba(96,165,250,.28); }

/* Bonus category badges */
.nc-badge-cat-individual    { color: #bef264;          background: rgba(190,242,100,.12); border-color: rgba(190,242,100,.35); }
.nc-badge-cat-team          { color: var(--blue);     background: rgba(96,165,250,.12);  border-color: rgba(96,165,250,.3);  }
.nc-badge-cat-european      { color: #fb923c;         background: rgba(251,146,60,.12);  border-color: rgba(251,146,60,.3);  }
.nc-badge-cat-signon_loyalty { color: var(--amber);   background: rgba(251,191,36,.12); border-color: rgba(251,191,36,.3);  }
.nc-badge-cat-transfer      { color: var(--accent);   background: rgba(34,211,238,.12); border-color: rgba(34,211,238,.3);  }

/* Appearance cell icons */
.nc-check { color: var(--green); font-weight: 700; }
.nc-cross  { color: #475569; }

/* data-tip tooltips are rendered via JS in base.html (avoids table overflow clipping) */
[data-tip] { cursor: default; }

/* ---------- stat card ---------- */
.nc-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nc-stat-value { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.03em; }
.nc-stat-label { font-size: 0.8rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; }
.nc-stat-sub { font-size: 0.78rem; color: var(--text-dim); }

/* ---------- glow utilities ---------- */
.nc-glow-accent { box-shadow: var(--glow-accent); }
.nc-glow-green  { box-shadow: var(--glow-green); }
.nc-glow-blue   { box-shadow: var(--glow-blue); }
.nc-glow-red    { box-shadow: var(--glow-red); }
.nc-glow-purple { box-shadow: var(--glow-purple); }
.nc-cost { color: var(--red); }
.nc-gain { color: var(--green); }
.nc-loan-out { color: var(--red); }
.nc-loan-in { color: var(--blue); }

/* ---------- animations ---------- */
@keyframes badge-near-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(251,191,36,0); }
  50%       { opacity: .7; box-shadow: 0 0 6px 2px rgba(251,191,36,.35); }
}
@keyframes pc-blink {
  0%, 49%   { opacity: 1; box-shadow: 0 0 8px 1px rgba(248,113,113,.5); }
  50%, 100% { opacity: .35; box-shadow: 0 0 0 0 rgba(248,113,113,0); }
}
@keyframes nc-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nc-fade-up { animation: nc-fade-up .5s cubic-bezier(.22,.9,.34,1) both; }

@keyframes nc-orb-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(30px, -25px) scale(1.08); }
}

/* ---------- table ---------- */
.nc-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.nc-table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 10px 14px;
  border-bottom: 1px solid var(--panel-border);
}
.nc-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--panel-border);
  vertical-align: middle;
}
.nc-table tbody tr { transition: background .12s ease; }
.nc-table tbody tr:hover { background: var(--panel-inner); }
html[data-theme="light"] .nc-table tbody tr:hover { background: rgba(8,145,178,0.07); }
html[data-theme="light"][data-skin="combo"] .nc-table tbody tr:hover { background: color-mix(in srgb, #8d7752 10%, transparent); }
.nc-table tbody tr:last-child td { border-bottom: none; }
.nc-table tr.nc-row-active { background: rgba(34,211,238,.10); }
html[data-theme="light"] .nc-table tr.nc-row-active { background: rgba(8,145,178,0.10); }
html[data-theme="light"][data-skin="combo"] .nc-table tr.nc-row-active { background: color-mix(in srgb, #8d7752 14%, transparent); }

/* ---------- sortable table (NCSortable) ---------- */
table.nc-sortable thead th:not([data-nosort]) { cursor: pointer; user-select: none; white-space: nowrap; }
table.nc-sortable thead th:not([data-nosort]):hover { color: var(--text); }
table.nc-sortable thead th[data-dir]::after { color: var(--accent); font-size: 0.85em; }
table.nc-sortable thead th[data-dir="asc"]::after { content: " ▲"; }
table.nc-sortable thead th[data-dir="desc"]::after { content: " ▼"; }

/* ---------- avatar ---------- */
.nc-avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--panel-border);
  display: block;
}
.nc-avatar-fallback {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 0.8rem var(--font);
  color: #fff;
  background: var(--accent-grad);
}

/* dynamic-colored badge: color value carried via --pc data variable */
.nc-badge-dyn {
  color: var(--pc, var(--text-dim));
  background: color-mix(in srgb, var(--pc, #888) 14%, transparent);
  border-color: color-mix(in srgb, var(--pc, #888) 35%, transparent);
}

/* ---------- tabs ---------- */
.nc-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--panel-border);
  margin-bottom: 18px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nc-tabs::-webkit-scrollbar { display: none; }
.nc-tab {
  font: 600 0.9rem var(--font);
  color: var(--text-dim);
  background: none;
  border: none;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
  white-space: nowrap;
  flex: 0 0 auto;
}
.nc-tab:hover { color: var(--text); }
html[data-theme="light"] .nc-tab:hover { color: var(--accent); background: rgba(8,145,178,0.08); }
html[data-theme="light"][data-skin="combo"] .nc-tab:hover { background: color-mix(in srgb, #8d7752 12%, transparent); }
.nc-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- clickable rows / key-value ---------- */
.nc-row-link { cursor: pointer; }
.nc-kv { display: flex; flex-direction: column; gap: 3px; }
.nc-kv-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}
.nc-kv-value { font-size: 0.95rem; }

/* ---------- color swatch & picker ---------- */
.nc-swatch {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--pc, #888);
  border: 1px solid var(--panel-border);
  vertical-align: middle;
}
.nc-color {
  width: 52px;
  height: 40px;
  padding: 3px;
  background: var(--elev-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nc-card-link { color: inherit; text-decoration: none; display: block; }

.nc-thumb {
  height: 30px;
  max-width: 60px;
  object-fit: contain;
  border-radius: 4px;
  vertical-align: middle;
}

.nc-flag {
  height: 15px;
  width: 22px;
  object-fit: cover;
  border-radius: 3px;
  vertical-align: -2px;
  border: 1px solid var(--panel-border);
}
.nc-club-logo {
  height: 20px;
  width: 20px;
  min-width: 20px;
  object-fit: contain;
  vertical-align: -5px;
}

.nc-check {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ---------- dropzone ---------- */
.nc-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 120px;
  padding: 22px;
  border: 2px dashed var(--panel-border);
  border-radius: var(--radius);
  background: var(--panel-inner);
  color: var(--text-dim);
  cursor: pointer;
  text-align: center;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.nc-dropzone:hover { border-color: rgba(34,211,238,.4); color: var(--text); }
.nc-dropzone.dragover {
  border-color: var(--accent);
  background: rgba(34,211,238,.10);
  color: var(--accent);
  box-shadow: var(--glow-accent);
}
.nc-dropzone.has-file {
  border-style: solid;
  border-color: rgba(52,211,153,.5);
  color: var(--green);
}
.nc-dropzone-icon { font-size: 1.6rem; }
.nc-dropzone-text { font-size: 0.9rem; font-weight: 500; }

/* ---------- modal ---------- */
.nc-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.nc-modal-backdrop.open { display: flex; }
.nc-modal {
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  animation: nc-fade-up .25s cubic-bezier(.22,.9,.34,1) both;
}
.nc-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.nc-modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}
.nc-modal-close:hover { color: var(--text); }
.nc-modal-body { display: flex; flex-direction: column; gap: 12px; }

/* ---------- topbar online counter (admin) ---------- */
.topbar-online { display: inline-flex; align-items: center; gap: 6px; margin-right: 10px;
  font: 700 0.72rem/1 var(--font); color: var(--text-dim);
  background: var(--panel-bg); border: 1px solid var(--panel-border);
  border-radius: 999px; padding: 5px 10px; cursor: pointer;
  transition: border-color .15s ease, color .15s ease; }
.topbar-online:hover { border-color: var(--accent); color: var(--text); }
.topbar-online b { color: var(--text); font-weight: 800; }
.topbar-online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  animation: online-pulse 2.4s ease-out infinite; }
@keyframes online-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 55%, transparent); }
  70%  { box-shadow: 0 0 0 6px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) { .topbar-online-dot { animation: none; } }
@media (max-width: 620px) { .topbar-online-lbl { display: none; } }
.online-modal-body { gap: 0; }
.online-modal-body .online-row { display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--panel-border); }
.online-modal-body .online-row:last-child { border-bottom: none; }
.online-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.nc-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* ---------- icon badge (compact action) ---------- */
.nc-ibadge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 600 0.72rem/1 var(--font);
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  background: var(--elev-bg);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: color .12s ease, border-color .12s ease, background .12s ease;
}
.nc-ibadge:hover { color: #fff; border-color: rgba(255,255,255,.18); }
.nc-ibadge-danger:hover { color: var(--red); border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.08); }
.nc-ibadge-accent:hover { color: var(--accent); border-color: rgba(34,211,238,.4); background: rgba(34,211,238,.08); }

.nc-modal-wide { max-width: 900px; }
.pdf-frame {
  width: 100%;
  height: 75vh;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  background: #fff;
}
.report-card-meta { margin: 6px 0 0; font-size: 0.78rem; }

/* hidden attribute must win over display rules */
[hidden] { display: none !important; }

/* ios-style toggle switch */
.nc-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font: 600 0.82rem var(--font);
  color: var(--text-dim);
}
.nc-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.nc-switch-track {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--elev-bg);
  border: 1px solid var(--panel-border);
  position: relative;
  transition: background .18s ease, border-color .18s ease;
  flex: 0 0 auto;
}
.nc-switch-track::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: transform .18s ease, background .18s ease;
}
.nc-switch input:checked + .nc-switch-track {
  background: rgba(34,211,238,.18);
  border-color: var(--accent);
}
.nc-switch input:checked + .nc-switch-track::after {
  transform: translateX(18px);
  background: var(--accent);
}

/* lime date badge */
.nc-badge-lime {
  color: #bef264;
  background: rgba(190,242,100,.12);
  border-color: rgba(190,242,100,.35);
}

/* badge icons */
.nc-badge-ic {
  opacity: 0.82;
  margin-right: 5px;
  font-size: 0.92em;
}

/* "Cat:" text prefix in squad badge */
.nc-badge-cat {
  font-size: 0.78em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.65;
}

/* readable link color (browser blue is too dark on dark bg) */
:root { --link: #7dd3fc; }
[data-theme="light"] { --link: #2563eb; }
.nc-kv-value a,
a.report-doc-link {
  color: var(--link);
  text-decoration: none;
}
.nc-kv-value a:hover,
a.report-doc-link:hover { text-decoration: underline; }

/* "auto" marker on derived age category badge */
.nc-badge-auto {
  font-size: 0.7em;
  opacity: 0.6;
  font-weight: 600;
  font-style: italic;
}

/* inline link-styled button (opens modals from text) */
.nc-linkbtn {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--link); font: inherit; text-decoration: none;
}
.nc-linkbtn:hover { text-decoration: underline; }
.nc-kv-value-link { color: var(--link); text-decoration: none; }
.nc-kv-value-link:hover { text-decoration: underline; }

/* agent modal rows */
.agent-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.agent-lbl { flex: 0 0 90px; color: var(--text-dim); font-size: 0.82rem; }
.agent-val { flex: 1; word-break: break-word; }
.agent-sep { border: none; border-top: 1px solid var(--panel-border); margin: 12px 0 8px; }
.agent-sub { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }

/* distribution bar (actual fill + target marker) */
.nc-distbar { position: relative; height: 10px; border-radius: 999px; background: rgba(255,255,255,0.08); }
.nc-distbar-fill { height: 100%; border-radius: 999px; background: var(--accent-grad); width: var(--fill, 0%); max-width: 100%; transition: width .3s ease; }
.nc-distbar-target { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text, #fff); left: var(--target, 0%); border-radius: 1px; }
.nc-distbar-fill.is-solid { background: var(--bar-color, var(--accent)); }

.nc-link-plain { color: var(--text); }
.nc-link-plain:hover { color: var(--accent); }

a { color: inherit; }

/* ---------- value tones (light) ---------- */
.nc-tone-hot  { color: var(--amber); }
.nc-tone-cool { color: var(--accent); }


/* ---------- range input ---------- */
.gr-range { accent-color: var(--accent); }

.nc-btn.gr-danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, var(--panel-border)); }





/* transfer section title */
.tf-section-head{color:var(--green);}
.tf-section-title{color:var(--green);}


/* Reusable comparison / versus table (provider-agnostic) */
.nc-vs { width: 100%; max-width: 860px; margin: 0 auto; table-layout: fixed; }
.nc-vs th, .nc-vs td { padding: 5px 14px; }
.nc-vs-home { width: 26%; text-align: right; white-space: nowrap; }
.nc-vs-metric { width: 48%; text-align: center; }
.nc-vs-away { width: 26%; text-align: left; white-space: nowrap; }
.nc-vs-own { color: var(--accent); font-weight: 600; }
.nc-vs-win { color: color-mix(in srgb, var(--green) 85%, transparent); font-weight: 700; }
.nc-vs-loss { color: color-mix(in srgb, var(--red) 85%, transparent); font-weight: 700; }
@media (max-width: 480px) {
  .nc-panel { padding: 14px; }
}

@media (max-width: 560px) {
  .nc-vs th, .nc-vs td { padding: 4px 8px; font-size: .85rem; }
  .nc-vs-home, .nc-vs-away { white-space: normal; }
}

/* Player card Game Metrics: provider headings */
.pc-prov-wy { color: var(--accent); }

/* Compact density modifier — keep UI tight (rule: compact everywhere) */
.nc-compact { font-size: .9rem; }
.nc-compact th, .nc-compact td { padding: 3px 12px; line-height: 1.3; }
.nc-compact .nc-h2 { margin: 0 0 4px; }
.pc-prov-sp { color: var(--accent-2); }
.nc-range { accent-color: var(--accent); }

/* Game Metrics: clickable metric rows */
.pc-metric-table tbody tr { cursor: pointer; }
.pc-metric-table tbody tr:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }

/* Large modal variant (desktop-wide, responsive on mobile) */
.nc-modal.nc-modal-lg { max-width: min(800px, 94vw); width: 100%; }
.nc-modal-lg td:first-child, .nc-modal-lg td:last-child { white-space: nowrap; }

/* Game Metrics: blue match score + provider badges */
.pc-score { color: var(--accent); font-weight: 600; }
.nc-badge.pc-badge-wy { background: color-mix(in srgb, #fb923c 20%, transparent); color: #fdba74; }
.nc-badge.pc-badge-sp { background: color-mix(in srgb, #38bdf8 20%, transparent); color: #7dd3fc; }

/* Game Metrics: sparkline colour per provider */
.pc-metric-table[data-provider="wy"] .pc-spark { color: var(--accent); }
.pc-metric-table[data-provider="sp"] .pc-spark { color: var(--accent-2); }

/* Tooltip */
.nc-tip {
  position: fixed; z-index: 9999; pointer-events: none;
  opacity: 0; transition: opacity .15s ease;
  background: #1e2530; color: #e8ecf3;
  font-size: 0.78rem; line-height: 1.4;
  padding: 6px 10px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
  max-width: 260px; white-space: normal;
}
html[data-theme="light"] .nc-tip {
  background: #111827; color: #f9fafb;
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 8px 24px rgba(17,24,39,0.35);
}

/* ── SIQPie donut interactivity (hover lift + dim, tooltip, sweep-in, center KPI) ── */
.siqpie-slice { transition: opacity .15s ease, transform .15s ease; }
svg.siq-pie:hover .siqpie-slice { opacity: .42; }
svg.siq-pie:hover .siqpie-slice:hover { opacity: 1; }
.siqpie-slice:hover { transform: translate(var(--dx, 0px), var(--dy, 0px)); }
svg.siqpie-clickable .siqpie-slice { cursor: pointer; }
.siqpie-hole { fill: var(--elev-bg); }
.siqpie-cval { fill: var(--text); font: 700 13px var(--font); }
.siqpie-clbl { fill: var(--text-dim); font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }
@keyframes siqpie-pop { from { opacity: 0; transform: scale(.72); } to { opacity: 1; transform: scale(1); } }
.siqpie-anim { animation: siqpie-pop .45s cubic-bezier(.2,.7,.3,1) both; transform-box: view-box; transform-origin: 100px 60px; }
.siqpie-tip {
  position: fixed; z-index: 9999; pointer-events: none;
  background: var(--elev-bg); color: var(--text);
  border: 1px solid var(--panel-border); border-radius: 8px;
  padding: 5px 9px; font: 600 12px var(--font); white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0,0,0,.4); opacity: 0; transition: opacity .12s ease;
}
.siqpie-tip.on { opacity: 1; }

/* SIQLine hover tooltip + crosshair dots */
.siql-tip {
  position: absolute; z-index: 30; pointer-events: none;
  background: var(--elev-bg); color: var(--text);
  border: 1px solid var(--panel-border); border-radius: 8px;
  padding: 6px 9px; font: 600 11px var(--font); white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0,0,0,.4);
}
.siql-tip-head { font-size: 10px; color: var(--text-faint); margin-bottom: 3px; }
.siql-tip-row { display: flex; align-items: center; gap: 6px; }
.siql-tip-row b { margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; }
.siql-tip-date { color: var(--text-faint); font-weight: 500; margin-left: 6px; font-variant-numeric: tabular-nums; }
.siql-tip-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.siqsc-tip {
  position: absolute; z-index: 30; pointer-events: none;
  background: var(--elev-bg); color: var(--text);
  border: 1px solid var(--panel-border); border-radius: 8px;
  padding: 6px 9px; font: 500 11px var(--font); line-height: 1.5; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0,0,0,.4);
}
.siqsc-tip b { font-weight: 700; }


/* ── nc-wbar: horizontal weight bar (SVG, 0-1 scale) ───────────────────── */
.nc-wbar-bg { fill: var(--border); opacity: .45; }
.nc-wbar-fill { fill: var(--accent); }

/* ── nc-ttpm-radar: small category-share radar (position profiles) ─────── */
.nc-ttpm-axis { stroke: var(--border); stroke-width: 1; }
.nc-ttpm-poly {
  fill: color-mix(in srgb, var(--accent) 25%, transparent);
  stroke: var(--accent); stroke-width: 1.5;
  stroke-linejoin: round;
}

/* ── dc-*: depth chart status modifiers (tint st-chip via --pc) ────────── */
.dc-ok { --pc: var(--green); }
.dc-warn { --pc: var(--amber); }
.dc-danger { --pc: var(--red); }
.dc-none { --pc: #6b7280; }
.dc-expired { --pc: var(--red); opacity: 0.4; filter: saturate(0.5); }
.dc-secondary { opacity: 0.62; }
.dc-slot-thin { color: var(--red); }
.dc-slot-count {
  display: inline-block;
  min-width: 1.4em;
  text-align: center;
  border-radius: 0.7em;
  font-size: 0.82em;
  background: color-mix(in srgb, currentColor 18%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 45%, transparent);
}
.dc-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--pc) 55%, transparent);
  border: 1px solid var(--pc);
}
.dc-fade { opacity: 0.12; }
.st-slot.dc-drop-hover {
  outline: 2px dashed var(--accent);
  outline-offset: 4px;
  border-radius: 8px;
}
.dc-filter-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  font: inherit;
  font-size: inherit;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
}
.dc-filter-btn:hover { color: var(--text); }
.dc-filter-active {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}
.dc-target {
  --pc: var(--accent);
  border-style: dashed;
  border-width: 1.5px;
  animation: dc-target-pulse 1.8s ease-in-out infinite;
}
@keyframes dc-target-pulse {
  0%, 100% { box-shadow: 0 6px 14px rgba(0,0,0,.55), 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
  50%      { box-shadow: 0 6px 14px rgba(0,0,0,.55), 0 0 12px 3px color-mix(in srgb, var(--accent) 60%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  .dc-target {
    animation: none;
    box-shadow: 0 6px 14px rgba(0,0,0,.55), 0 0 10px 2px color-mix(in srgb, var(--accent) 50%, transparent);
  }
}
.dc-target-dot {
  --pc: var(--accent);
  border-style: dashed;
}
.dc-add-target {
  display: block;
  text-align: center;
  font-size: 0.72rem;
  color: var(--accent);
  text-decoration: none;
  padding: 2px 0;
}
.dc-add-target:hover { text-decoration: underline; }

/* --- Training load GPS heatmap (SVG pitch) --- */
.tl-hm-turf { fill: color-mix(in srgb, var(--text) 5%, transparent); }
.tl-hm-cell { fill: var(--accent); }
.tl-hm-line rect, .tl-hm-line line, .tl-hm-line circle {
  fill: none;
  stroke: var(--text-dim);
  stroke-opacity: 0.55;
  stroke-width: 0.35;
}
.tl-hm-line .tl-hm-spot { fill: var(--text-dim); fill-opacity: 0.55; stroke: none; }
.tl-hm-tip {
  position: absolute; z-index: 30; pointer-events: none;
  background: var(--elev-bg); color: var(--text);
  border: 1px solid var(--panel-border); border-radius: 8px;
  padding: 5px 8px; font: 500 11px var(--font); line-height: 1.5; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0,0,0,.4);
}
.tl-hm-tip b { font-weight: 700; }
.tl-match-dot { color: #f43f5e; }
