/* IAMScouting — Stadium direction only, with Light (grass-green/white) + Dark (pitch-black/volt). */

:root, [data-mode="light"] {
  /* Grass-green + white dominant */
  --bg:             #fafaf7;
  --panel:          #ffffff;
  --panel-2:        #f3f5ee;
  --ink:            #0a1a0d;
  --ink-dim:        #2d4a33;
  --ink-muted:      #6a7d6e;
  --rule:           rgba(10,26,13,0.10);
  --rule-strong:    rgba(10,26,13,0.26);
  --accent:         #1a7a36;              /* grass green */
  --accent-2:       #0d5a25;              /* deeper grass */
  --accent-soft:    rgba(26,122,54,0.12);
  --accent-ink:     #ffffff;
  --good:           #1a7a36;
  --mid:            #d19712;
  --bad:            #c3321f;
  --map-ocean:      #eef1e9;
  --map-land:       #dfe5d2;
  --map-border:     rgba(10,26,13,0.35);
  --map-hover:      #cbdab4;
  --chip-bg:        rgba(10,26,13,0.06);
  --kbd-bg:         #e6ece0;
  --display:        "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body:           "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono:           "JetBrains Mono", ui-monospace, Menlo, monospace;
  --radius:         0px;
  --radius-lg:      0px;
  --shadow-card:    0 1px 0 rgba(10,26,13,0.06), 0 1px 2px rgba(10,26,13,0.04);
}

[data-mode="dark"] {
  --bg:             #0a0d0a;
  --panel:          #111510;
  --panel-2:        #181d16;
  --ink:            #f3f7ee;
  --ink-dim:        #b9c4b1;
  --ink-muted:      #7a857a;
  --rule:           rgba(243,247,238,0.10);
  --rule-strong:    rgba(243,247,238,0.28);
  --accent:         #c8ff3a;              /* volt lime */
  --accent-2:       #8dcc20;
  --accent-soft:    rgba(200,255,58,0.14);
  --accent-ink:     #0a0d0a;
  --good:           #c8ff3a;
  --mid:            #ffb300;
  --bad:            #ff5a5a;
  --map-ocean:      #0a0d0a;
  --map-land:       #232a1e;
  --map-border:     rgba(243,247,238,0.30);
  --map-hover:      #3a4528;
  --chip-bg:        rgba(243,247,238,0.07);
  --kbd-bg:         #1a1f17;
  --shadow-card:    none;
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01" 1;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

.mono { font-family: var(--mono); font-feature-settings: "tnum" 1, "zero" 1; }
.display { font-family: var(--display); letter-spacing: -0.02em; }
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.muted { color: var(--ink-muted); }
.dim { color: var(--ink-dim); }

.app-shell { display: grid; grid-template-rows: auto 1fr; min-height: 100vh; }

/* Top mode-switcher bar */
.mode-switcher {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 0;
  padding: 10px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.mode-switcher .label { color: var(--ink-muted); margin-right: 12px; }
.mode-switcher .tab {
  padding: 6px 12px;
  color: var(--ink-dim);
  border: 1px solid transparent;
  cursor: pointer;
}
.mode-switcher .tab:hover { color: var(--ink); }
.mode-switcher .tab.active {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}
.mode-switcher .spacer { flex: 1; }
.mode-switcher .screens .tab.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Toggle switch */
.mode-toggle {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 4px 10px 4px 12px;
  border: 1px solid var(--rule-strong);
  cursor: pointer;
}
.mode-toggle .sun, .mode-toggle .moon { font-size: 12px; }
.mode-toggle .dot {
  position: relative;
  width: 34px; height: 16px;
  background: var(--panel-2);
  border: 1px solid var(--rule-strong);
}
.mode-toggle .dot::after {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 16px; height: 16px;
  background: var(--accent);
  transition: transform .18s ease;
}
[data-mode="dark"] .mode-toggle .dot::after { transform: translateX(18px); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: var(--ink); color: var(--bg);
  font-weight: 600; letter-spacing: -0.005em;
  text-transform: none;
  transition: transform .08s ease, opacity .12s ease, background .12s ease;
}
.btn:hover { opacity: .94; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--rule-strong); }
.btn.ghost:hover { background: var(--chip-bg); }
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn.accent:hover { background: var(--accent-2); }
.btn.sm { padding: 6px 12px; font-size: 12px; }
.btn.lg { padding: 14px 24px; font-size: 15px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px;
  background: var(--chip-bg);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--ink-dim);
}
.kbd {
  display: inline-block;
  padding: 1px 6px;
  background: var(--kbd-bg);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-dim);
  border: 1px solid var(--rule);
}

.field { display: grid; gap: 6px; }
.field label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.field .hint { font-size: 12px; color: var(--ink-muted); }
.field input[type="text"],
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  outline: none;
}
.field input[type="text"]:focus,
.field select:focus,
.field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  padding: 8px 14px;
  border: 1px solid var(--rule-strong);
  background: var(--panel);
  color: var(--ink-dim);
  font-size: 13px;
  font-weight: 500;
}
.seg button:hover { color: var(--ink); border-color: var(--ink); }
.seg button.on {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
}

.card {
  background: var(--panel);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-card);
}

.tag {
  display: inline-block;
  padding: 2px 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  background: var(--chip-bg);
  color: var(--ink-dim);
}

.slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 2px; background: var(--rule-strong); outline: none;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; background: var(--accent); cursor: pointer;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--rule-strong); }
::-webkit-scrollbar-track { background: transparent; }

/* Real map path styling */
.geo-path {
  stroke: var(--map-border);
  stroke-width: 0.4;
  fill: var(--map-land);
  transition: fill .12s ease, stroke .12s ease;
  cursor: pointer;
}
.geo-path:hover { stroke: var(--ink); stroke-width: 0.8; }
.geo-path.selected { stroke: var(--accent); stroke-width: 1.3; }
.geo-path.no-fit { fill: var(--map-land); opacity: 0.55; cursor: default; }
.geo-path.no-fit:hover { stroke: var(--map-border); stroke-width: 0.4; }

/* Band colors — 5-tier squad audit */
.band-1 { --band: #1a7a36; --band-soft: rgba(26,122,54,0.12); }          /* indispensable — deep green */
.band-2 { --band: #5aa83a; --band-soft: rgba(90,168,58,0.14); }          /* regular-dev — light green */
.band-3 { --band: #d19712; --band-soft: rgba(209,151,18,0.14); }         /* rotation — amber */
.band-4 { --band: #c3321f; --band-soft: rgba(195,50,31,0.14); }          /* transfer-out — red */
.band-5 { --band: #2a6ab5; --band-soft: rgba(42,106,181,0.14); }         /* prospects — blue */
[data-mode="dark"] .band-1 { --band: #c8ff3a; --band-soft: rgba(200,255,58,0.16); }
[data-mode="dark"] .band-2 { --band: #9cd453; --band-soft: rgba(156,212,83,0.16); }
[data-mode="dark"] .band-3 { --band: #ffb300; --band-soft: rgba(255,179,0,0.16); }
[data-mode="dark"] .band-4 { --band: #ff5a5a; --band-soft: rgba(255,90,90,0.16); }
[data-mode="dark"] .band-5 { --band: #6ec4ff; --band-soft: rgba(110,196,255,0.16); }

.band-strip {
  display: inline-block;
  width: 4px;
  align-self: stretch;
  background: var(--band);
  flex-shrink: 0;
}
.band-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--band);
  background: var(--band-soft);
  padding: 3px 8px;
  display: inline-block;
}

/* Injury badges */
.inj-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.inj-badge .dot-s { width: 8px; height: 8px; display: inline-block; }
.inj-green  { background: rgba(26,122,54,0.14);  color: var(--good); }
.inj-green  .dot-s { background: var(--good); }
.inj-yellow { background: rgba(209,151,18,0.16); color: var(--mid); }
.inj-yellow .dot-s { background: var(--mid); }
.inj-red    { background: rgba(195,50,31,0.14);  color: var(--bad); }
.inj-red    .dot-s { background: var(--bad); }
[data-mode="dark"] .inj-green  { background: rgba(200,255,58,0.12); color: var(--good); }
[data-mode="dark"] .inj-yellow { background: rgba(255,179,0,0.14); color: var(--mid); }
[data-mode="dark"] .inj-red    { background: rgba(255,90,90,0.14); color: var(--bad); }

/* Severity (construction sites) */
.sev-high   { color: var(--bad);  border-color: var(--bad); }
.sev-medium { color: var(--mid);  border-color: var(--mid); }
.sev-low    { color: var(--ink-dim); border-color: var(--rule-strong); }

/* Dark Horse marker */
.dark-horse {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 7px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--bg);
}
.dark-horse::before { content: "♟"; font-size: 12px; }

/* Source tag — tiny superscript-ish origin label */
.src-tag {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 1px 5px;
  background: var(--chip-bg);
  vertical-align: middle;
}

/* IAMGPT side panel */
.iamgpt-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 380px;
  background: var(--panel);
  border-left: 1px solid var(--rule-strong);
  z-index: 70;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .22s cubic-bezier(.3,.7,.2,1);
}
.iamgpt-panel.open { transform: translateX(0); box-shadow: -20px 0 40px rgba(0,0,0,0.12); }
.iamgpt-fab {
  position: fixed; right: 20px; bottom: 20px;
  height: 48px;
  padding: 0 18px;
  background: var(--accent); color: var(--accent-ink);
  display: inline-flex; align-items: center;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.04em;
  z-index: 65;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
  border: none;
}
.iamgpt-fab:hover { background: var(--accent-2); }

/* Pitch-line underlines on display headings */
.underline-accent {
  display: inline-block;
  position: relative;
  padding-bottom: 4px;
}
.underline-accent::after {
  content: "";
  position: absolute; left: 0; bottom: -2px;
  width: 64px; height: 4px;
  background: var(--accent);
}
