/* ============ Gaffa UI ============ */
:root {
  --bg: #0b1220;
  --bg-soft: #101a2e;
  --panel: #16233b;
  --panel-2: #1c2c49;
  --panel-3: #24365a;
  --border: #24334f;
  --border-light: #31456b;
  --text: #e7eefb;
  --text-dim: #9fb0cc;
  --text-faint: #64748f;
  --green: #29cc6a;
  --green-dark: #16a34a;
  --pitch: #1a7a40;
  --red: #ef4453;
  --amber: #f5b40e;
  --blue: #3d8bfd;
  --purple: #a855f7;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  --font: 'Inter', system-ui, sans-serif;
  --font-display: 'Rajdhani', 'Inter', sans-serif;
}

* {
  margin: 0; padding: 0; box-sizing: border-box;
  scrollbar-width: none;
}
*::-webkit-scrollbar { display: none; width: 0; height: 0; }
html { font-size: 15px; }
body {
  font-family: var(--font);
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(41, 204, 106, 0.07), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(61, 139, 253, 0.06), transparent 60%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: var(--font); }

/* ---------- boot splash ---------- */
.boot-splash { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; gap: 10px; }
.boot-logo { font-family: var(--font-display); font-size: 52px; font-weight: 700; letter-spacing: 10px; color: var(--green); }
.boot-sub { color: var(--text-faint); }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, #0d1526 0%, #0b1220 100%);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 4px;
  overflow-y: auto;
}
.brand {
  font-family: var(--font-display);
  font-size: 30px; font-weight: 700; letter-spacing: 6px;
  color: var(--green); text-align: center; margin-bottom: 6px;
  cursor: pointer; user-select: none;
}
.brand small { display: block; font-family: var(--font); font-size: 10px; font-weight: 500; letter-spacing: 2px; color: var(--text-faint); }

.club-chip {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 14px;
}
.club-chip .kit { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; border: 2px solid rgba(255,255,255,0.18); }
.club-chip .club-logo { width: 30px !important; height: 30px !important; flex-shrink: 0; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 2px rgba(255,255,255,0.12); }
.club-chip .meta { min-width: 0; }
.club-chip .name { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.club-chip .sub { font-size: 11px; color: var(--text-dim); }
.sidebar-finances {
  display: block; text-decoration: none; color: inherit;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 14px;
  transition: border-color 0.15s, background 0.15s;
}
.sidebar-finances:hover { border-color: var(--green); background: rgba(41, 204, 106, 0.04); }
.sf-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 5px; }
.sf-row:last-child { margin-bottom: 0; }
.sf-row.hidden { display: none; }
.sf-label { font-size: 11px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.sf-val { font-family: var(--font-display); font-size: 15px; font-weight: 700; }
.sf-val.pos { color: var(--green); }
.sf-val.neg { color: var(--red); }
.sf-muted { font-size: 12px; color: var(--text-faint); }
.sf-muted .sf-label { font-size: 10px; text-transform: none; letter-spacing: 0; font-weight: 500; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text-dim); cursor: pointer; font-weight: 500; font-size: 14px;
  border: 1px solid transparent;
  transition: background 0.12s, color 0.12s;
}
.nav-item:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.nav-item.active { background: linear-gradient(90deg, rgba(41,204,106,0.16), rgba(41,204,106,0.05)); color: var(--green); border-color: rgba(41,204,106,0.25); }
.nav-item .ico { width: 20px; text-align: center; }
.nav-item .badge { margin-left: auto; }
.nav-sep { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-faint); padding: 14px 12px 4px; }

.sidebar-footer { margin-top: auto; padding-top: 14px; font-size: 12px; color: var(--text-faint); }
.game-clock { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px; }
.game-clock .day { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--text); }
.game-clock .season { font-size: 11px; color: var(--text-dim); }

.main { padding: 26px 32px 60px; max-width: 1200px; width: 100%; margin: 0 auto; min-width: 0; overflow-x: clip; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: 1px; }
.page-head h1.page-title-with-logo { display: flex; align-items: center; gap: 12px; letter-spacing: 0; }
.page-head .sub { color: var(--text-dim); font-size: 14px; margin-top: 2px; }

/* ---------- components ---------- */
.card {
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  min-width: 0;
  max-width: 100%;
}
.card h2 { font-family: var(--font-display); font-size: 17px; letter-spacing: 0.5px; margin-bottom: 12px; color: var(--text); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card h2 .more { font-family: var(--font); font-size: 12px; font-weight: 500; }

.grid { display: grid; gap: 18px; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-main-side { grid-template-columns: 2fr 1fr; }
@media (max-width: 980px) {
  .grid-2, .grid-3, .grid-main-side { grid-template-columns: 1fr; }
}

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-box { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat-box .label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-faint); margin-bottom: 4px; }
.stat-box .value { font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.stat-box .value.pos { color: var(--green); }
.stat-box .value.neg { color: var(--red); }
.stat-box .hint { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

table.data { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
table.data th {
  text-align: left; padding: 7px 6px; font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--text-faint); border-bottom: 1px solid var(--border);
  white-space: normal; line-height: 1.25; vertical-align: bottom;
}
table.data td {
  padding: 8px 6px; border-bottom: 1px solid rgba(36, 51, 79, 0.55);
  white-space: normal; vertical-align: middle; line-height: 1.35;
}
table.data tr:last-child td { border-bottom: none; }
table.data tr.clickable { cursor: pointer; }
table.data tr.clickable:hover td { background: rgba(61, 139, 253, 0.06); }
table.data tr.highlight td { background: rgba(41, 204, 106, 0.08); }
table.data td.num, table.data th.num { text-align: right; white-space: nowrap; }
table.data td.num { font-variant-numeric: tabular-nums; }
table.data th.sortable { cursor: pointer; user-select: none; }
table.data th.sortable:hover { color: var(--text); }
table.data th.sortable.sorted.desc::after { content: ' ▾'; color: var(--blue); font-size: 10px; }
table.data th.sortable.sorted.asc::after { content: ' ▴'; color: var(--blue); font-size: 10px; }

/* Fluid tables — no horizontal scrollbars; content wraps or truncates instead. */
.table-scroll { max-width: 100%; overflow-x: clip; }
.table-scroll.v-scroll { overflow-y: auto; }

table.data .player-name-cell,
table.data .club-name-cell { max-width: 100%; }
table.data .player-name-text,
table.data .club-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
table.data td .badge {
  font-size: 10px;
  padding: 2px 5px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
table.data .rating { min-width: 28px; height: 22px; font-size: 12px; }
table.data .pos-badge { min-width: 28px; font-size: 10px; padding: 2px 4px; }
table.data .btn.sm { padding: 4px 7px; font-size: 11px; }

/* Wide squad roster — progressive column hiding on narrower layouts. */
table.data-squad th,
table.data-squad td { padding: 7px 5px; font-size: 12.5px; }
table.data-squad .col-name { width: 21%; }
table.data-squad .col-contract { width: 9%; }
@media (max-width: 1080px) {
  table.data-squad .hide-lg { display: none; }
}
@media (max-width: 920px) {
  table.data-squad .hide-md { display: none; }
}
@media (max-width: 760px) {
  table.data-squad .hide-sm { display: none; }
}

/* League standings — keep club names on one line, stats compact. */
table.data-league .col-club { width: 34%; }
table.data-league .col-form { width: 14%; }
@media (max-width: 700px) {
  table.data-league .hide-sm { display: none; }
}

.contract-expiring { color: var(--amber); font-weight: 700; }

/* rating pill: color-coded 1-99 */
.rating {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 24px; padding: 0 5px; border-radius: 7px;
  font-weight: 700; font-size: 13px; color: #08111f;
}
.rating.r-elite { background: #f1c40f; }
.rating.r-great { background: #2ecc71; }
.rating.r-good  { background: #7fd35c; }
.rating.r-avg   { background: #e0b352; }
.rating.r-poor  { background: #e67e22; }
.rating.r-bad   { background: #c0574f; color: #fff; }

.pos-badge {
  display: inline-block; min-width: 32px; text-align: center;
  padding: 2px 6px; border-radius: 6px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.5px;
}
.pos-GK { background: rgba(245, 180, 14, 0.18); color: var(--amber); }
.pos-DEF { background: rgba(61, 139, 253, 0.16); color: var(--blue); }
.pos-MID { background: rgba(41, 204, 106, 0.15); color: var(--green); }
.pos-ATT { background: rgba(239, 68, 83, 0.15); color: var(--red); }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
  background: var(--panel-3); color: var(--text-dim);
}
.badge.green { background: rgba(41, 204, 106, 0.16); color: var(--green); }
.badge.red { background: rgba(239, 68, 83, 0.16); color: var(--red); }
.badge.amber { background: rgba(245, 180, 14, 0.16); color: var(--amber); }
.badge.blue { background: rgba(61, 139, 253, 0.16); color: var(--blue); }
.badge.count { background: var(--red); color: #fff; min-width: 20px; text-align: center; }

.form-pips { display: inline-flex; gap: 3px; }
.pip { width: 18px; height: 18px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #08111f; }
.pip.W { background: var(--green); }
.pip.D { background: var(--amber); }
.pip.L { background: var(--red); color: #fff; }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--panel-3); color: var(--text);
  border: 1px solid var(--border-light); border-radius: var(--radius-sm);
  padding: 8px 16px; font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: filter 0.12s, transform 0.05s;
}
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.btn.danger { background: rgba(239, 68, 83, 0.14); border-color: rgba(239, 68, 83, 0.4); color: var(--red); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn.block { width: 100%; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-dim); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.7px; }
.field input, .field select {
  width: 100%; background: var(--bg-soft); color: var(--text);
  border: 1px solid var(--border-light); border-radius: var(--radius-sm);
  padding: 9px 12px; font-size: 14px; font-family: var(--font);
  outline: none;
}
.field input:focus, .field select:focus { border-color: var(--green); }
.tactic-hint { font-size: 12px; color: var(--text-dim); margin: 5px 0 0; line-height: 1.35; min-height: 1.35em; }
.tactic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.tactic-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border-light); }
.tactics-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tactics-card { background: var(--bg-soft); border-radius: var(--radius-sm); padding: 10px 12px; }
.tactics-card-head { font-size: 13px; font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.tactics-dl { display: grid; gap: 4px; margin: 0; font-size: 12px; }
.tactics-dl > div { display: flex; justify-content: space-between; gap: 8px; }
.tactics-dl dt { color: var(--text-dim); margin: 0; }
.tactics-dl dd { margin: 0; font-weight: 600; text-align: right; }
@media (max-width: 700px) {
  .tactic-grid, .tactics-compare { grid-template-columns: 1fr; }
}

/* ---------- kit designer ---------- */
.kit-tabs { display: flex; gap: 8px; }
.kit-tab {
  flex: 1; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-light); background: var(--bg-soft);
  color: var(--text-dim); font-weight: 600; cursor: pointer; font-family: var(--font);
}
.kit-tab.active { border-color: var(--green); color: var(--text); background: rgba(41, 204, 106, 0.08); }
.kit-pattern-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px;
}
.kit-pattern-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 6px; border-radius: var(--radius-sm);
  border: 2px solid var(--border-light); background: var(--bg-soft);
  cursor: pointer; font-family: var(--font); font-size: 11px; color: var(--text-dim);
}
.kit-pattern-btn.selected { border-color: var(--green); background: rgba(41, 204, 106, 0.06); color: var(--text); }
.kit-pattern-btn .lbl { text-align: center; line-height: 1.2; }
.kit-pattern-thumb { display: block; }
.kit-pattern-thumb svg { width: 100%; height: 100%; display: block; }
.kit-color-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.kit-color-row { display: flex; gap: 8px; align-items: center; }
.kit-color-row input[type="color"] { width: 44px; height: 38px; padding: 2px; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-soft); cursor: pointer; }
.kit-color-row input[type="text"] { flex: 1; min-width: 0; }
.kit-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.kit-swatch { width: 28px; height: 28px; border-radius: 6px; border: 2px solid rgba(255,255,255,0.2); cursor: pointer; padding: 0; }
.kit-swatch:hover { transform: scale(1.08); }
.kit-editor-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.kit-preview-stage {
  display: flex; justify-content: center; align-items: center;
  min-height: 200px; background:
    radial-gradient(ellipse at 50% 30%, rgba(41, 204, 106, 0.08), transparent 55%),
    var(--bg-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.kit-preview-shirt svg { width: 150px; height: 150px; display: block; filter: drop-shadow(0 8px 18px rgba(0,0,0,0.35)); }
.kit-pair-preview, .kit-trio-preview { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; }
.kit-shirt svg { width: 100%; height: 100%; display: block; }
.kit-pitch-demo { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.kit-pitch-disc {
  width: 42px; height: 42px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.5);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}
.kit-badge-preview { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* ---------- logo designer ---------- */
.logo-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.logo-tab {
  flex: 1; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-light); background: var(--bg-soft);
  color: var(--text-dim); font-weight: 600; cursor: pointer; font-family: var(--font);
}
.logo-tab.active { border-color: var(--green); color: var(--text); background: rgba(41, 204, 106, 0.08); }
.logo-option-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px;
}
.logo-symbol-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.logo-option-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 6px; border-radius: var(--radius-sm);
  border: 2px solid var(--border-light); background: var(--bg-soft);
  cursor: pointer; font-family: var(--font); font-size: 11px; color: var(--text-dim);
}
.logo-option-btn.selected { border-color: var(--green); background: rgba(41, 204, 106, 0.06); color: var(--text); }
.logo-option-btn .lbl { text-align: center; line-height: 1.2; }
.logo-option-thumb { display: block; width: 48px; height: 48px; }
.logo-option-thumb svg { width: 100%; height: 100%; display: block; }
.logo-mono-input {
  text-transform: uppercase; font-family: var(--font-display); font-size: 18px; letter-spacing: 3px;
}
.logo-dropzone {
  border: 2px dashed var(--border-light); border-radius: var(--radius-sm);
  padding: 28px 16px; text-align: center; background: var(--bg-soft);
  transition: border-color 0.15s, background 0.15s;
}
.logo-dropzone.dragover, .logo-dropzone:hover {
  border-color: var(--green); background: rgba(41, 204, 106, 0.06);
}
.logo-dropzone-title { font-weight: 600; margin-bottom: 4px; }
.logo-preview-stage {
  display: flex; justify-content: center; align-items: center;
  min-height: 200px; background:
    radial-gradient(ellipse at 50% 40%, rgba(255,255,255,0.06), transparent 55%),
    var(--bg-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.logo-preview-lg svg { width: 160px; height: 160px; display: block; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.4)); }
.logo-size-row { display: flex; justify-content: center; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.logo-size-sample { text-align: center; }
.logo-context-demo { display: flex; flex-direction: column; gap: 14px; }
.logo-context-table { padding: 10px 12px; background: var(--bg-soft); border-radius: var(--radius-sm); }
@media (max-width: 800px) {
  .kit-color-grid { grid-template-columns: 1fr; }
}
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filters .field { margin-bottom: 0; min-width: 130px; }
.transfer-window-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 16px; border-radius: 8px; font-size: 13px;
}
.transfer-window-banner.open { background: rgba(41, 204, 106, 0.1); border: 1px solid rgba(41, 204, 106, 0.35); }
.transfer-window-banner.closed { background: rgba(224, 179, 82, 0.1); border: 1px solid rgba(224, 179, 82, 0.35); }

.form-error { background: rgba(239, 68, 83, 0.12); border: 1px solid rgba(239, 68, 83, 0.4); color: #ff8b95; border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; margin-bottom: 14px; }

/* ---------- auth screens ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 30px 16px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-logo { text-align: center; margin-bottom: 26px; }
.auth-logo .word { font-family: var(--font-display); font-size: 46px; font-weight: 700; letter-spacing: 12px; color: var(--green); }
.auth-logo .tag { color: var(--text-dim); font-size: 14px; margin-top: 2px; }
.auth-switch { text-align: center; margin-top: 16px; font-size: 13.5px; color: var(--text-dim); }
.auth-features { display: flex; justify-content: center; gap: 22px; margin-top: 28px; color: var(--text-faint); font-size: 12px; flex-wrap: wrap; }

/* ---------- pitch / lineup ---------- */
.pitch {
  position: relative;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.028) 0 44px, transparent 44px 88px),
    linear-gradient(180deg, #17683a 0%, #135c33 100%);
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  aspect-ratio: 0.78;
  max-width: 460px; margin: 0 auto;
  overflow: hidden;
}
.pitch::before, .pitch::after {
  content: ''; position: absolute; left: 50%; transform: translateX(-50%);
  border: 2px solid rgba(255, 255, 255, 0.22);
}
.pitch::before { top: -2px; width: 46%; height: 13%; border-top: none; border-radius: 0 0 8px 8px; }
.pitch::after { bottom: -2px; width: 46%; height: 13%; border-bottom: none; border-radius: 8px 8px 0 0; }
.pitch .halfway { position: absolute; top: 50%; left: 0; right: 0; border-top: 2px solid rgba(255,255,255,0.22); }
.pitch .circle { position: absolute; top: 50%; left: 50%; width: 26%; aspect-ratio: 1; border: 2px solid rgba(255,255,255,0.22); border-radius: 50%; transform: translate(-50%, -50%); }

.pitch-slot {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  width: 84px; cursor: pointer; z-index: 2;
}
.pitch-slot .disc {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; color: #08111f;
  border: 2px solid rgba(255,255,255,0.75);
  box-shadow: 0 3px 10px rgba(0,0,0,0.4);
  transition: transform 0.1s;
}
.pitch-slot:hover .disc { transform: scale(1.1); }
.pitch-slot.selected .disc { outline: 3px solid #fff; }
.pitch-slot.drag-over .disc { outline: 3px dashed var(--green); transform: scale(1.12); }
.pitch-slot.empty.drag-over .disc { background: rgba(41, 204, 106, 0.25); border-color: var(--green); }
.pitch-slot .nm {
  font-size: 10.5px; font-weight: 600; color: #fff;
  background: rgba(0,0,0,0.55); padding: 1px 7px; border-radius: 999px;
  max-width: 100px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 2px #000;
}
.pitch-slot .ps { font-size: 9px; font-weight: 700; color: rgba(255,255,255,0.85); letter-spacing: 1px; }
.pitch-slot.empty .disc { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.7); border-style: dashed; }

.bench-strip { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; justify-content: center; }
.bench-chip {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 999px;
  font-size: 12.5px; cursor: pointer;
}
.bench-chip:hover { border-color: var(--border-light); }
.bench-chip.selected { border-color: var(--green); background: rgba(41, 204, 106, 0.1); }
.bench-chip.drag-over { border-color: var(--green); background: rgba(41, 204, 106, 0.15); box-shadow: 0 0 0 2px rgba(41, 204, 106, 0.25); }
.lineup-draggable[draggable="true"] { cursor: grab; }
.lineup-draggable.dragging { opacity: 0.45; cursor: grabbing; }
tr.lineup-draggable.dragging td { opacity: 0.55; }

.squad-row-unavail td { opacity: 0.5; }

/* ---------- stadium page ---------- */
.stadium-hero { padding: 0; overflow: hidden; }
.stadium-ground {
  background:
    radial-gradient(ellipse at 50% 20%, rgba(41, 204, 106, 0.08), transparent 50%),
    linear-gradient(180deg, #0d1a2d 0%, #132238 100%);
  padding: 20px 16px 12px;
}
.sg-grid {
  display: grid;
  grid-template-columns: 1fr 2.2fr 1fr;
  grid-template-rows: 1fr 2.1fr 1.15fr;
  gap: 6px;
  max-width: 460px;
  margin: 0 auto;
  aspect-ratio: 1.05;
}
.sg-stand, .sg-corner {
  border: 1px solid rgba(255,255,255,0.1);
  background: linear-gradient(160deg, #314864, #1c2d45);
  color: #dce6f5;
  cursor: pointer;
  font-family: var(--font);
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
  position: relative;
  min-height: 0;
}
.sg-stand:hover, .sg-corner.can-fill:hover, .sg-corner.filled:hover {
  transform: scale(1.02);
  border-color: rgba(41, 204, 106, 0.55);
  z-index: 2;
}
.sg-stand.selected, .sg-corner.selected {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(41, 204, 106, 0.35);
  z-index: 3;
}
.sg-stand.north { border-radius: 10px 10px 4px 4px; }
.sg-stand.south { border-radius: 4px 4px 10px 10px; }
.sg-stand.east { border-radius: 4px 10px 10px 4px; }
.sg-stand.west { border-radius: 10px 4px 4px 10px; }
.sg-stand.level-0 { background: linear-gradient(160deg, #3a4a3a, #243028); }
.sg-stand.level-1 { background: linear-gradient(160deg, #35506e, #1e334d); }
.sg-stand.level-2 { background: linear-gradient(160deg, #3d5f88, #223f63); }
.sg-stand.level-3 { background: linear-gradient(160deg, #4a72a0, #28507a); }
.sg-stand.level-4 {
  background: linear-gradient(160deg, #5b8abc, #2f6194);
  box-shadow: inset 0 0 18px rgba(255,255,255,0.08);
}
.sg-stand-name { font-size: 10px; font-weight: 800; letter-spacing: 1px; opacity: 0.85; }
.sg-stand-seats { font-family: var(--font-display); font-size: 15px; font-weight: 700; }
.sg-stand-tier { font-size: 10px; opacity: 0.7; }
.sg-stand-tiers { display: flex; gap: 3px; margin-top: 2px; }
.sg-stand-tiers i {
  width: 7px; height: 7px; border-radius: 2px;
  background: rgba(255,255,255,0.15); display: block;
}
.sg-stand-tiers i.on { background: var(--green); }
.sg-stand.east .sg-stand-name, .sg-stand.west .sg-stand-name { writing-mode: vertical-rl; transform: rotate(180deg); }
.sg-stand.east, .sg-stand.west { gap: 4px; }

.sg-corner {
  border-radius: 8px;
  background: rgba(20, 32, 50, 0.65);
  border-style: dashed;
}
.sg-corner.filled {
  border-style: solid;
  background: linear-gradient(145deg, #3a5678, #243852);
}
.sg-corner.can-fill {
  border-color: rgba(224, 179, 82, 0.55);
  color: #e0b352;
}
.sg-corner.blocked { opacity: 0.45; cursor: default; }
.sg-corner-seats { font-family: var(--font-display); font-size: 12px; font-weight: 700; }
.sg-corner-label { font-size: 18px; font-weight: 700; line-height: 1; }

.sg-pitch {
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,0.28);
  position: relative;
  overflow: hidden;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 10px;
}
.stadium-ground.grass .sg-pitch {
  background: repeating-linear-gradient(90deg, #1a7a45 0 12%, #1e8a4e 12% 24%);
}
.stadium-ground.astro .sg-pitch {
  background: repeating-linear-gradient(45deg, #2d8f57 0 8px, #26804d 8px 16px);
}
.sg-pitch-lines {
  position: absolute; inset: 10%;
  border: 2px solid rgba(255,255,255,0.35); border-radius: 2px;
  pointer-events: none;
}
.sg-pitch-lines::before {
  content: ''; position: absolute; top: 50%; left: 0; right: 0;
  border-top: 2px solid rgba(255,255,255,0.3);
}
.sg-pitch-lines::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 28%; aspect-ratio: 1; border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%; transform: translate(-50%, -50%);
}
.sg-cap {
  position: relative; z-index: 1;
  background: rgba(0,0,0,0.62); color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; letter-spacing: 0.4px;
}
.sg-legend {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center;
  margin-top: 12px; font-size: 11px; color: var(--text-dim);
}
.sg-legend i {
  display: inline-block; width: 10px; height: 10px; border-radius: 2px;
  margin-right: 5px; vertical-align: -1px;
}
.sg-legend .lg-stand { background: #3d5f88; }
.sg-legend .lg-corner { background: transparent; border: 1px dashed rgba(224, 179, 82, 0.8); }

.stadium-meta { padding: 16px 18px 18px; }
.stadium-meta h2 { margin-bottom: 8px; }
.stadium-meta .meta-row { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-dim); }

.stadium-select-panel .ssp-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px;
}
.stadium-select-panel .ssp-head h2 { margin: 0; }
.stadium-capacity-summary {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px;
}
.stadium-capacity-summary > div {
  background: var(--bg-soft); border-radius: var(--radius-sm); padding: 10px 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.stadium-capacity-summary b { font-family: var(--font-display); font-size: 18px; }
.ssp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.clickable-row { cursor: pointer; }
.clickable-row:hover td { background: rgba(41, 204, 106, 0.06); }

.capacity-bar-wrap { margin-bottom: 16px; }
.capacity-bar { height: 10px; background: var(--panel-3); border-radius: 999px; overflow: hidden; }
.capacity-bar .fill { height: 100%; background: linear-gradient(90deg, var(--green), #3ddc84); border-radius: 999px; }
.capacity-labels { display: flex; justify-content: space-between; font-size: 12px; margin-top: 6px; font-weight: 600; }

@media (max-width: 600px) {
  .sg-stand-seats { font-size: 12px; }
  .sg-stand.east .sg-stand-name, .sg-stand.west .sg-stand-name { writing-mode: horizontal-tb; transform: none; }
  .stadium-capacity-summary { grid-template-columns: 1fr; }
}

.upgrade-box {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 14px; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius);
}

.pitch-meter { margin-bottom: 14px; }
.pitch-meter-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pitch-meter-val { font-family: var(--font-display); font-size: 28px; font-weight: 700; }
.pitch-meter-val.good { color: var(--green); }
.pitch-meter-val.ok { color: #7fd35c; }
.pitch-meter-val.warn { color: var(--amber); }
.pitch-meter-val.bad { color: var(--red); }
.pitch-meter-bar { height: 12px; background: var(--panel-3); border-radius: 999px; overflow: hidden; }
.pitch-meter-bar .fill { height: 100%; border-radius: 999px; }
.pitch-meter-bar .fill.good { background: var(--green); }
.pitch-meter-bar .fill.ok { background: #7fd35c; }
.pitch-meter-bar .fill.warn { background: var(--amber); }
.pitch-meter-bar .fill.bad { background: var(--red); }

.stadium-warn {
  background: rgba(230, 126, 34, 0.12); border: 1px solid rgba(230, 126, 34, 0.35);
  color: #f0b27a; font-size: 13px; padding: 10px 12px; border-radius: var(--radius); margin-bottom: 14px;
}
.maint-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.maint-grid .btn { text-align: left; line-height: 1.35; padding: 12px 14px; }

.surface-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.surface-opt {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 14px; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: var(--radius); cursor: pointer; text-align: left; color: var(--text);
}
.surface-opt:hover { border-color: var(--border-light); }
.surface-opt.active { border-color: var(--green); background: rgba(41, 204, 106, 0.1); }
.surface-opt .ico { font-size: 22px; }
.surface-opt .lbl { font-weight: 600; font-size: 13.5px; }
.surface-opt .cost { font-size: 12px; color: var(--text-dim); }

.surface-locked {
  display: flex; align-items: center; gap: 14px; padding: 14px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius);
}
.surface-locked .ico { font-size: 28px; }

table.data.compact td { padding: 8px 10px; font-size: 13px; }

/* ---------- sponsorships ---------- */
.sponsor-offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.sponsor-offer { display: flex; flex-direction: column; gap: 12px; position: relative; }
.sponsor-offer.has-naming { border-color: rgba(224, 179, 82, 0.45); }
.sponsor-offer .offer-tag {
  position: absolute; top: 14px; right: 14px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  padding: 3px 8px; border-radius: 999px; background: var(--panel-3); color: var(--text-dim);
}
.sponsor-offer .offer-brand { font-family: var(--font-display); font-size: 20px; font-weight: 700; padding-right: 70px; }
.sponsor-offer .offer-upfront {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 12px; background: rgba(41, 204, 106, 0.08); border: 1px solid rgba(41, 204, 106, 0.25); border-radius: var(--radius);
}
.sponsor-offer .offer-upfront .lbl { font-size: 12px; color: var(--text-dim); }
.sponsor-offer .offer-upfront .val { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--green); }
.sponsor-offer .offer-naming {
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: rgba(224, 179, 82, 0.1); border: 1px solid rgba(224, 179, 82, 0.28);
  font-size: 13px; line-height: 1.4;
}
.sponsor-offer .offer-naming .naming-title { font-weight: 700; margin-bottom: 4px; }
.sponsor-offer .offer-naming .naming-bonus { color: var(--green); font-weight: 600; margin-top: 4px; }
.sponsor-naming-active {
  display: inline-block; padding: 6px 10px; border-radius: 6px; font-size: 13px;
  background: rgba(224, 179, 82, 0.12); border: 1px solid rgba(224, 179, 82, 0.3);
}
.sponsor-offer .offer-obj {
  display: flex; justify-content: space-between; gap: 10px; font-size: 13px;
  padding: 6px 0; border-bottom: 1px solid rgba(36, 51, 79, 0.45);
}
.sponsor-offer .offer-obj:last-child { border-bottom: none; }
.sponsor-offer .offer-obj .bonus { color: var(--green); font-weight: 600; white-space: nowrap; }
.sponsor-offer .offer-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 4px; }

.sponsor-active-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.sponsor-earned { text-align: right; }
.sponsor-earned .lbl { font-size: 12px; color: var(--text-dim); }
.sponsor-earned .val { font-family: var(--font-display); font-size: 28px; font-weight: 700; }
.sponsor-earned .hint { font-size: 12px; color: var(--text-faint); }

.sponsor-objectives { display: flex; flex-direction: column; gap: 12px; }
.sponsor-objective {
  padding: 12px 14px; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius);
}
.sponsor-objective.met { border-color: rgba(41, 204, 106, 0.4); background: rgba(41, 204, 106, 0.06); }
.sponsor-objective .obj-head { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; font-size: 13.5px; }
.sponsor-objective .obj-head .bonus { color: var(--green); font-size: 13px; }
.sponsor-objective .obj-progress { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12px; }
.sponsor-objective .obj-progress .track { flex: 1; height: 7px; background: var(--panel-3); border-radius: 999px; overflow: hidden; }
.sponsor-objective .obj-progress .fill { height: 100%; border-radius: 999px; }
.sponsor-objective .obj-progress .fill.good { background: var(--green); }
.sponsor-objective .obj-progress .fill.ok { background: #7fd35c; }
.sponsor-objective .obj-progress .fill.warn { background: var(--amber); }
.sponsor-objective .obj-progress .fill.bad { background: var(--red); }

/* ---------- match report ---------- */
.match-header { text-align: center; padding: 26px 20px; }
.match-header .comp { color: var(--text-dim); font-size: 12px; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 12px; }
.scoreline { display: flex; align-items: center; justify-content: center; gap: 26px; flex-wrap: wrap; }
.scoreline .team { flex: 1; max-width: 300px; font-family: var(--font-display); font-size: 23px; font-weight: 700; }
.scoreline .team.home { text-align: right; }
.scoreline .team.away { text-align: left; }
.scoreline .score {
  font-family: var(--font-display); font-size: 44px; font-weight: 700;
  background: var(--panel-2); border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 4px 24px; letter-spacing: 4px;
}
.match-meta { color: var(--text-faint); font-size: 12.5px; margin-top: 12px; }
.scorers-row { display: flex; justify-content: center; gap: 40px; margin-top: 12px; font-size: 13px; color: var(--text-dim); flex-wrap: wrap; }
.scorers-row div { max-width: 320px; }

.stat-compare { display: grid; grid-template-columns: 60px 1fr 60px; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 13.5px; }
.stat-compare .lbl { text-align: center; color: var(--text-dim); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; grid-column: 2; }
.stat-bars { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--panel-3); }
.stat-bars .l { background: var(--green); }
.stat-bars .r { background: var(--blue); }
.stat-compare .val { font-weight: 700; font-family: var(--font-display); font-size: 17px; }
.stat-compare .val.away { text-align: right; }

.timeline { position: relative; padding-left: 0; }
.tl-event { display: flex; gap: 14px; padding: 9px 0; border-bottom: 1px solid rgba(36,51,79,0.5); font-size: 13.5px; }
.tl-event:last-child { border-bottom: none; }
.tl-min {
  flex-shrink: 0; width: 40px; height: 26px; border-radius: 7px;
  background: var(--panel-3); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; font-family: var(--font-display);
}
.tl-event.goal .tl-min { background: var(--green); color: #08111f; }
.tl-event.red .tl-min, .tl-event.injury .tl-min { background: var(--red); color: #fff; }
.tl-event.yellow .tl-min { background: var(--amber); color: #08111f; }
.tl-event .txt { color: var(--text-dim); }
.tl-event.goal .txt { color: var(--text); font-weight: 600; }
.tl-ico { flex-shrink: 0; }

.lineup-table td.perf { font-family: var(--font-display); font-weight: 700; }

/* ---------- highlight viewer ---------- */
.hv-panel { padding: 0; overflow: hidden; }
.hv-panel > h2 {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px 0; margin: 0;
}
.hv-panel > h2 .hv-hint { font-size: 12px; font-weight: 500; color: var(--text-faint); font-family: var(--font); }
.hv-shell { display: flex; flex-direction: column; gap: 0; }
.hv-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px 8px; flex-wrap: wrap;
}
.hv-scoreboard {
  display: flex; align-items: center; gap: 14px; font-family: var(--font-display);
  font-weight: 700; font-size: 20px;
}
.hv-scoreboard .hv-score {
  background: var(--panel-2); border: 1px solid var(--border-light);
  border-radius: 8px; padding: 2px 14px; letter-spacing: 3px; font-size: 24px;
}
.hv-scoreboard .hv-team.home { color: var(--text); }
.hv-scoreboard .hv-team.away { color: var(--text-dim); }
.hv-minute {
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  background: var(--panel-3); padding: 4px 12px; border-radius: 8px; min-width: 48px; text-align: center;
}
.hv-stage {
  position: relative; width: 100%; background: #07101c;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hv-canvas { display: block; width: 100%; height: 100%; }
.hv-commentary {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  background: rgba(8, 14, 26, 0.78); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 10px;
  padding: 10px 14px; font-size: 13.5px; color: var(--text);
  line-height: 1.35; pointer-events: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.hv-badge {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: 3px;
  padding: 6px 16px; border-radius: 999px; background: rgba(8,14,26,0.82);
  border: 1px solid rgba(255,255,255,0.12); color: #fff; pointer-events: none;
  animation: hv-badge-in 0.35s ease-out;
}
.hv-badge.goal { background: rgba(22, 163, 74, 0.92); border-color: rgba(255,255,255,0.25); }
.hv-badge.red-card { background: rgba(239, 68, 83, 0.92); }
.hv-badge.yellow-card { background: rgba(245, 180, 14, 0.92); color: #08111f; }
.hv-badge.penalty { background: rgba(61, 139, 253, 0.92); }
@keyframes hv-badge-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(0.92); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
.hv-controls {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.hv-btn { padding: 6px 10px; min-width: 40px; }
.hv-btn.active { border-color: var(--green); color: var(--green); background: rgba(41, 204, 106, 0.1); }
.hv-speed { display: flex; gap: 4px; }
.hv-progress-wrap { flex: 1; min-width: 140px; display: flex; flex-direction: column; gap: 4px; }
.hv-progress-wrap input[type="range"] {
  width: 100%; accent-color: var(--green); cursor: pointer;
}
.hv-progress-label { font-size: 11px; color: var(--text-faint); }
.hv-playlist {
  display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px 14px;
}
.hv-pl-item {
  flex: 0 0 auto; max-width: 220px;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px;
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 12px; cursor: pointer; text-align: left;
  font-family: var(--font);
}
.hv-pl-item:hover { border-color: var(--border-light); color: var(--text); }
.hv-pl-item.active { border-color: var(--green); background: rgba(41, 204, 106, 0.1); color: var(--text); }
.hv-pl-item.goal.active { border-color: var(--green); }
.hv-pl-item .min {
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  background: var(--panel-3); padding: 2px 6px; border-radius: 5px; color: var(--text);
}
.hv-pl-item.goal .min { background: var(--green); color: #08111f; }
.hv-pl-item .txt {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px;
}
.hv-pl-item .ico { flex-shrink: 0; }

/* ---------- player profile ---------- */
.player-hero { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.player-avatar-hero {
  position: relative; width: 88px; height: 88px; flex-shrink: 0;
}
.player-avatar-hero .player-face {
  width: 88px !important; height: 88px !important; border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.player-avatar-hero .player-avatar-rating {
  position: absolute; right: -6px; bottom: -6px; min-width: 34px; height: 34px; padding: 0 6px;
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 17px; font-weight: 700; color: #08111f;
  border: 2px solid rgba(255,255,255,0.85); box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}
.club-logo, .player-face { display: inline-flex; flex-shrink: 0; vertical-align: middle; border-radius: 50%; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.35); }
.club-logo svg, .player-face svg { width: 100%; height: 100%; display: block; }
.club-name-cell, .player-name-cell {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0;
}
.club-name-text, .player-name-text { min-width: 0; }
.player-name-cell b, .club-name-cell b { font-weight: 600; }
.club-logo-lg { border-radius: 18px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.35); }
.club-logo-lg .club-logo { width: 86px !important; height: 86px !important; border-radius: 18px; }
.player-hero .big-rating {
  width: 86px; height: 86px; border-radius: 20px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 40px; font-weight: 700; color: #08111f;
}
.player-hero h1 { font-family: var(--font-display); font-size: 30px; }
.player-hero .meta { color: var(--text-dim); font-size: 14px; margin-top: 4px; display: flex; gap: 14px; flex-wrap: wrap; }

.skill-bar { display: grid; grid-template-columns: 105px 1fr 34px; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.skill-bar .track { height: 9px; background: var(--panel-3); border-radius: 999px; overflow: hidden; }
.skill-bar .fill { height: 100%; border-radius: 999px; }
.skill-bar .v { font-weight: 700; text-align: right; font-family: var(--font-display); font-size: 15px; }
.skill-bar .k { color: var(--text-dim); text-transform: capitalize; }
.skill-group-title { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-faint); margin: 14px 0 8px; }

/* ---------- inbox ---------- */
.msg { padding: 13px 16px; border-bottom: 1px solid var(--border); cursor: pointer; }
.msg:hover { background: rgba(61,139,253,0.05); }
.msg.unread { border-left: 3px solid var(--green); background: rgba(41,204,106,0.04); }
.msg .subj { font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; gap: 10px; }
.msg .when { font-size: 11.5px; color: var(--text-faint); font-weight: 400; flex-shrink: 0; }
.msg .body { color: var(--text-dim); font-size: 13px; margin-top: 4px; display: none; }
.msg.open .body { display: block; }

/* ---------- fixtures list ---------- */
.fx-row { display: grid; grid-template-columns: 52px 1fr 74px 1fr 90px; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid rgba(36,51,79,0.5); font-size: 13.5px; }
.fx-row:last-child { border-bottom: none; }
.fx-row .h { text-align: right; }
.fx-row .a { text-align: left; }
.fx-row .sc {
  text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 16px;
  background: var(--panel-3); border-radius: 7px; padding: 2px 0; cursor: pointer;
}
.fx-row .sc.upcoming { background: transparent; color: var(--text-faint); font-size: 12px; cursor: default; }
.fx-row .md { color: var(--text-faint); font-size: 11.5px; }
.fx-row .team-strong { font-weight: 700; }
.fx-row .when { color: var(--text-faint); font-size: 11.5px; text-align: right; }

/* ---------- toasts ---------- */
#toast-container { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 100; }
.toast {
  background: var(--panel-2); border: 1px solid var(--border-light);
  border-left: 4px solid var(--green); border-radius: var(--radius-sm);
  padding: 12px 18px; font-size: 13.5px; box-shadow: var(--shadow);
  animation: slide-in 0.25s ease; max-width: 380px;
}
.toast.error { border-left-color: var(--red); }

/* ---------- modals ---------- */
.modal-root {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-root.open { opacity: 1; pointer-events: auto; }
body.modal-open { overflow: hidden; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(4, 10, 20, 0.72); backdrop-filter: blur(4px);
}
.modal-card {
  position: relative; width: min(440px, 100%);
  background: var(--panel); border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 22px 22px 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.2s ease;
}
.modal-root.open .modal-card { transform: translateY(0) scale(1); }
.modal-title {
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
  margin-bottom: 10px; line-height: 1.2;
}
.modal-body { color: var(--text-dim); font-size: 14px; line-height: 1.55; margin-bottom: 18px; }
.modal-field { margin-bottom: 18px; }
.modal-label { display: block; font-size: 12px; color: var(--text-faint); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.8px; }
.modal-input {
  width: 100%; padding: 10px 12px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--panel-2); color: var(--text);
  font-size: 15px; font-family: inherit;
}
.modal-input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 2px rgba(41, 204, 106, 0.2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.btn.danger { background: rgba(192, 57, 43, 0.18); border-color: rgba(192, 57, 43, 0.5); color: #f5a89a; }
.btn.danger:hover { background: rgba(192, 57, 43, 0.28); border-color: var(--red); }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- misc ---------- */
.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.money-pos { color: var(--green); font-weight: 600; }
.money-neg { color: var(--red); font-weight: 600; }
.empty-state { text-align: center; color: var(--text-faint); padding: 34px 10px; font-size: 14px; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.row-flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.section-tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.section-tabs .tab {
  padding: 7px 16px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600;
  background: var(--panel); border: 1px solid var(--border); color: var(--text-dim);
}
.section-tabs .tab.active { background: rgba(41,204,106,0.14); border-color: rgba(41,204,106,0.4); color: var(--green); }

.mobile-topbar { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 50; width: 250px; transform: translateX(-100%); transition: transform 0.2s; }
  .sidebar.open { transform: none; }
  .mobile-topbar {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 16px; background: var(--bg-soft); border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 40;
  }
  .mobile-topbar .brand { font-size: 20px; margin: 0; letter-spacing: 4px; }
  .mobile-topbar .burger { background: none; border: none; color: var(--text); font-size: 22px; cursor: pointer; }
  .main { padding: 18px 14px 60px; }
  .fx-row { grid-template-columns: 1fr 64px 1fr; }
  .fx-row .md, .fx-row .when { display: none; }
}

/* ---------- FM-style stars (youth ability / potential) ---------- */
.stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  vertical-align: middle;
  line-height: 1;
}
.stars .star {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.12);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.stars .star.full { background: #e8c547; }
.stars .star.half {
  background: linear-gradient(90deg, #e8c547 50%, rgba(255, 255, 255, 0.12) 50%);
}
.stars .star.empty { background: rgba(255, 255, 255, 0.12); }
.player-avatar-stars {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 6px;
  white-space: nowrap;
}
.player-avatar-stars .stars .star { width: 10px; height: 10px; }

/* ---------- academy ---------- */
.ac-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 980px) {
  .ac-layout { grid-template-columns: 1fr; }
}
.ac-main, .ac-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.ac-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.ac-section-head h2 { margin-bottom: 4px; }
.ac-section-sub {
  margin: 0;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.4;
}
.ac-squad-meta { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ac-kicker {
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.ac-mini-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 2px;
}
.ac-facility-stack { display: flex; flex-direction: column; gap: 12px; }
.ac-facility {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
}
.ac-facility-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.ac-facility-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}
.ac-facility-level {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--green);
  line-height: 1;
}
.ac-facility-level span { font-size: 12px; color: var(--text-faint); font-weight: 500; }
.ac-pips {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}
.ac-pips i {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.08);
}
.ac-pips i.on { background: linear-gradient(90deg, #2a9d5c, #29cc6a); }
.ac-facility-actions { display: flex; align-items: center; gap: 8px; }

.ac-hoyd {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  transition: border-color 0.12s, background 0.12s;
}
.ac-hoyd:hover { border-color: rgba(41,204,106,0.4); background: rgba(41,204,106,0.06); text-decoration: none; }
.ac-hoyd.vacant { cursor: default; }
.ac-hoyd.vacant:hover { border-color: var(--border); background: rgba(255,255,255,0.03); }
.ac-hoyd-name { font-weight: 700; font-size: 16px; margin-bottom: 2px; }
.ac-hoyd-meta { font-size: 12px; color: var(--text-dim); margin-bottom: 10px; }
.ac-hoyd-stats, .ac-intake-forecast, .ac-youth-stats, .ac-trial-stars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.ac-hoyd-stats strong, .ac-intake-forecast strong, .ac-youth-stats strong {
  font-family: var(--font-display);
  font-size: 16px;
}
.ac-intake-forecast { margin-bottom: 10px; }
.ac-forecast-stat {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
}

.ac-intake { border-color: rgba(41,204,106,0.35); }
.ac-trial-grid, .ac-youth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}
.ac-trial {
  display: block;
  cursor: pointer;
  margin: 0;
}
.ac-trial input { position: absolute; opacity: 0; pointer-events: none; }
.ac-trial-body {
  height: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}
.ac-trial:hover .ac-trial-body { border-color: rgba(61,139,253,0.45); }
.ac-trial input:checked + .ac-trial-body {
  border-color: rgba(41,204,106,0.55);
  background: rgba(41,204,106,0.08);
  box-shadow: inset 0 0 0 1px rgba(41,204,106,0.25);
}
.ac-trial-top, .ac-youth-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.ac-trial-name {
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.ac-trial-name:hover { color: var(--green); }
.ac-trial-meta { font-size: 12px; color: var(--text-dim); margin-bottom: 10px; }
.ac-trial-stars { grid-template-columns: 1fr 1fr; }
.ac-intake-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.ac-youth-card {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  transition: border-color 0.12s, background 0.12s;
}
.ac-youth-card:hover {
  border-color: rgba(61,139,253,0.4);
  background: rgba(61,139,253,0.06);
}
.ac-youth-stats {
  grid-template-columns: repeat(2, 1fr);
  margin: 10px 0 12px;
}
.ac-youth-actions { display: flex; justify-content: flex-end; }
.ac-empty { padding: 28px 12px; }
.ac-youth-table .ac-col-pos { width: 44px; }
.ac-youth-table .col-name { width: 32%; }
.ac-youth-table .player-name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- staff & academy ---------- */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.staff-card .staff-role {
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.staff-name { font-weight: 700; font-size: 16px; margin-bottom: 2px; }
.staff-attrs { margin: 12px 0 10px; display: flex; flex-direction: column; gap: 6px; }
.staff-attr-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  text-transform: capitalize;
}
.staff-attr { display: flex; align-items: center; gap: 8px; }
.staff-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.staff-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2a9d5c, #29cc6a);
}
.staff-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.staff-cand {
  border-top: 1px solid var(--border);
  padding: 8px 0;
  font-size: 13px;
}
.btn.tiny { padding: 4px 10px; font-size: 12px; }
.btn.danger { color: #ff6b6b; border-color: rgba(255,107,107,0.35); }
.staff-attrs-full { margin-top: 8px; }
.staff-attr-row.key-attr span { color: var(--green); font-weight: 600; }
.staff-name.clickable { cursor: pointer; }
.staff-name.clickable:hover { color: var(--green); }
.former-player-block {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
}
.former-player-block .label {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-faint);
}
