:root {
  --bg: #0d1310;
  --bg-2: #111915;
  --surface: #151f1a;
  --surface-2: #1b2721;
  --surface-3: #22302a;
  --line: #26342d;
  --line-2: #33443b;
  --text: #e7f0ea;
  --text-2: #b5c5bb;
  --muted: #7f948a;
  --accent: #3ddc84;
  --accent-2: #2bb36a;
  --accent-ink: #062414;
  --amber: #f5b841;
  --red: #ef5b5b;
  --blue: #5aa9ff;
  --violet: #b18cff;
  --grass-1: #1f5a36;
  --grass-2: #22633b;
  --chalk: rgba(255, 255, 255, 0.72);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Barlow Condensed', 'Inter', system-ui, sans-serif;
  --sidebar: 232px;
  --topbar: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
.num, .display { font-family: var(--font-display); letter-spacing: 0.01em; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
.good { color: var(--accent); }
.bad { color: var(--red); }
.warn { color: var(--amber); }
.info { color: var(--blue); }

/* ---------------------------------------------------------------- layout */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--bg-2); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 14px 10px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 16px; }
.brand-mark { width: 30px; height: 30px; }
.brand-name { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: 0.02em; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text-2); font-weight: 500;
}
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a.active { background: var(--surface-2); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.nav svg { width: 18px; height: 18px; flex: none; opacity: 0.9; }
.nav .badge { margin-left: auto; }
.sidebar-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar);
  display: flex; align-items: center; gap: 14px; padding: 0 22px;
  background: rgba(13, 19, 16, 0.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.topbar .club-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar .club-name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.topbar .spacer { flex: 1; }
.topbar .cash { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.content { padding: 22px; max-width: 1280px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: 0.01em; }
.page-head .sub { color: var(--muted); margin-top: 2px; }

.bottom-nav { display: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 0 14px; gap: 10px; }
  .topbar .meta { display: none; }
  .content { padding: 16px 16px 96px; }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: rgba(17, 25, 21, 0.97); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); overflow-x: auto;
  }
  .bottom-nav a {
    flex: 1 0 64px; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 6px 2px; color: var(--muted); font-size: 10.5px; border-radius: 8px; position: relative;
  }
  .bottom-nav a.active { color: var(--accent); }
  .bottom-nav svg { width: 20px; height: 20px; }
  .bottom-nav .badge { position: absolute; top: 2px; right: 12px; }
  .page-head h1 { font-size: 26px; }
}

/* ---------------------------------------------------------------- componentes */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; min-width: 0;
}
.card.tight { padding: 12px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.card-head h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.card.flush .card-head { padding: 14px 16px 0; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.main-side { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .grid.two, .grid.three, .grid.main-side { grid-template-columns: 1fr; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--text); cursor: pointer; font-weight: 600; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #56e597; }
.btn.danger { border-color: rgba(239, 91, 91, 0.5); color: #ffb3b3; }
.btn.danger:hover { background: rgba(239, 91, 91, 0.12); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.sm { padding: 6px 10px; font-size: 13px; }
.btn.lg { padding: 12px 18px; font-size: 15px; }
.btn svg { width: 16px; height: 16px; }

.badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 6px;
  border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; color: var(--text-2); white-space: nowrap;
}
.chip.good { color: var(--accent); border-color: rgba(61, 220, 132, 0.35); background: rgba(61, 220, 132, 0.08); }
.chip.bad { color: var(--red); border-color: rgba(239, 91, 91, 0.35); background: rgba(239, 91, 91, 0.08); }
.chip.warn { color: var(--amber); border-color: rgba(245, 184, 65, 0.35); background: rgba(245, 184, 65, 0.08); }
.chip.info { color: var(--blue); border-color: rgba(90, 169, 255, 0.35); background: rgba(90, 169, 255, 0.08); }

/* posição */
.pos {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 22px; border-radius: 5px;
  font: 700 12px/1 var(--font-display); letter-spacing: 0.04em; flex: none;
}
.pos.GOL { background: #3a2f10; color: #f7c948; }
.pos.DEF, .pos.ZAG, .pos.LD, .pos.LE { background: #0f2c46; color: #7cc0ff; }
.pos.MEC, .pos.VOL, .pos.MC, .pos.MEI { background: #0f3a24; color: #62e39b; }
.pos.ATQ, .pos.PD, .pos.PE, .pos.ATA { background: #43161a; color: #ff8a8a; }
.keyattrs { font-size: 11px; color: var(--text-2); white-space: nowrap; }
.keyattrs b { font-weight: 700; margin-left: 2px; }

.ovr {
  display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 24px; padding: 0 6px;
  border-radius: 6px; font: 700 15px/1 var(--font-display); background: var(--surface-3);
}
.ovr.t1 { color: #ff8a8a; } .ovr.t2 { color: #f5b841; } .ovr.t3 { color: #e7f0ea; } .ovr.t4 { color: #62e39b; } .ovr.t5 { color: #5aa9ff; }
.rating { font: 700 14px/1 var(--font-display); padding: 3px 6px; border-radius: 5px; background: var(--surface-3); }
.rating.hi { color: #62e39b; } .rating.mid { color: var(--text); } .rating.lo { color: #ff8a8a; }

.bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.bar.amber > i { background: var(--amber); } .bar.red > i { background: var(--red); } .bar.blue > i { background: var(--blue); }

.stars { color: var(--amber); letter-spacing: 1px; font-size: 13px; white-space: nowrap; }
.stars .off { color: var(--line-2); }

.shield { width: 28px; height: 32px; flex: none; }
.shield.lg { width: 44px; height: 50px; }
.shield.xl { width: 64px; height: 72px; }

/* tabelas */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
  padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--surface);
}
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--text); }
.tbl th.sorted { color: var(--accent); }
.tbl td { padding: 8px 10px; border-bottom: 1px solid rgba(38, 52, 45, 0.6); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover td { background: rgba(255, 255, 255, 0.025); }
.tbl tr.me td { background: rgba(61, 220, 132, 0.07); }
.tbl td.num, .tbl th.num { text-align: right; font-family: var(--font-display); font-size: 15px; }
.tbl .name { font-weight: 600; }
.zone { width: 3px; padding: 0 !important; }
.zone.champion, .zone.up { background: var(--accent); }
.zone.upPlayoff { background: #7fd9a8; opacity: 0.6; }
.zone.downPlayoff { background: var(--amber); opacity: 0.7; }
.zone.down { background: var(--red); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); padding: 10px 16px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

.form { display: inline-flex; gap: 3px; }
.form b { width: 18px; height: 18px; border-radius: 4px; display: inline-grid; place-items: center; font: 700 11px/1 var(--font-display); }
.form b.V { background: rgba(61, 220, 132, 0.2); color: var(--accent); }
.form b.E { background: rgba(255, 255, 255, 0.08); color: var(--text-2); }
.form b.D { background: rgba(239, 91, 91, 0.18); color: var(--red); }

/* formulários */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 600; }
.input, select.input {
  padding: 9px 11px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--bg-2); outline: none; min-width: 0;
}
.input:focus { border-color: var(--accent); }
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 11px; border-radius: 6px; cursor: pointer; color: var(--text-2); font-weight: 600; font-size: 13px; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button {
  border: 0; background: transparent; padding: 10px 14px; cursor: pointer; color: var(--muted); font-weight: 600;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.tabs button .badge { margin-left: 6px; }

/* listas */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item.click { cursor: pointer; }
.list-item.click:hover { background: rgba(255, 255, 255, 0.02); }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); }

.insight { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border-left: 3px solid var(--line-2); }
.insight.good { border-left-color: var(--accent); }
.insight.bad { border-left-color: var(--red); }
.insight.info { border-left-color: var(--blue); }
.insight p { margin: 0; color: var(--text); }

.empty { color: var(--muted); padding: 24px; text-align: center; }

/* ---------------------------------------------------------------- modal e toast */
.modal-back {
  position: fixed; inset: 0; z-index: 100; background: rgba(4, 8, 6, 0.72); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 20px; animation: fade 0.15s;
}
.modal {
  width: min(760px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; background: var(--surface);
  border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow); animation: pop 0.18s;
}
.modal.wide { width: min(1000px, 100%); }
.modal.narrow { width: min(480px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.modal-body { padding: 18px 20px 22px; }
.modal-close { border: 0; background: var(--surface-2); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; color: var(--text-2); flex: none; }
@media (max-width: 640px) {
  .modal-back { padding: 0; align-items: end; }
  .modal { max-height: 92vh; border-radius: 16px 16px 0 0; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(8px) scale(0.99); opacity: 0; } }
#toast-root { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--surface-3); border: 1px solid var(--line-2); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); animation: pop 0.2s; max-width: 90vw; }
.toast.good { border-color: rgba(61, 220, 132, 0.5); }
.toast.bad { border-color: rgba(239, 91, 91, 0.5); }
@media (max-width: 900px) { #toast-root { bottom: 86px; } }

.busy {
  position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; background: rgba(4, 8, 6, 0.55);
}
.busy-box { background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; padding: 20px 26px; display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- campo */
.pitch-wrap { position: relative; width: 100%; }
.pitch { width: 100%; height: auto; display: block; border-radius: 10px; }
.pitch .grass-a { fill: var(--grass-1); }
.pitch .grass-b { fill: var(--grass-2); }
.pitch .chalk { fill: none; stroke: var(--chalk); stroke-width: 0.35; }
.pitch .slot { cursor: pointer; }
.pitch .slot circle.ring { fill: rgba(8, 20, 13, 0.85); stroke: rgba(255, 255, 255, 0.85); stroke-width: 0.45; transition: stroke 0.15s; }
.pitch .slot.sel circle.ring { stroke: var(--amber); stroke-width: 0.9; }
.pitch .slot.empty circle.ring { stroke-dasharray: 1 1; fill: rgba(8, 20, 13, 0.5); }
.pitch .slot text { font-family: var(--font); pointer-events: none; }
.pitch .slot .nm { fill: #fff; font-size: 2.6px; font-weight: 700; paint-order: stroke; stroke: rgba(0, 0, 0, 0.7); stroke-width: 0.6px; }
.pitch .slot .rl { fill: rgba(255, 255, 255, 0.72); font-size: 2px; font-weight: 600; paint-order: stroke; stroke: rgba(0, 0, 0, 0.6); stroke-width: 0.5px; }
.pitch .slot .ov { font-family: var(--font-display); font-size: 3.3px; font-weight: 700; }

.dot { transition: transform 0.9s ease-in-out; }
.ball { transition: transform 0.7s ease-in-out; }

/* ---------------------------------------------------------------- telas específicas */
.hero-match {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; text-align: center; padding: 8px 0 4px;
}
.hero-match .team { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.hero-match .team .nm { font-weight: 700; font-size: 15px; }
.hero-match .vs { font-family: var(--font-display); font-size: 22px; color: var(--muted); }
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; }
.scoreboard .team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.scoreboard .team.away { justify-content: flex-end; text-align: right; }
.scoreboard .team .nm { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scoreboard .score { font-family: var(--font-display); font-size: 46px; font-weight: 700; line-height: 1; text-align: center; }
.scoreboard .clock { text-align: center; color: var(--accent); font-family: var(--font-display); font-size: 17px; }
/* Gol: o placar pisca e o nome de quem marcou aparece embaixo por um instante. */
.scoreboard .score.flash { animation: scoreflash 1.2s ease-out; }
@keyframes scoreflash { 0%, 30%, 60% { color: var(--accent); transform: scale(1.12); } 15%, 45%, 100% { color: inherit; transform: scale(1); } }
.scoreboard .scorer { height: 18px; text-align: center; font-size: 13px; font-weight: 600; white-space: nowrap; opacity: 0; transition: opacity .3s; }
.scoreboard .scorer.on { opacity: 1; }
@media (max-width: 640px) { .scoreboard .team .nm { font-size: 13px; } .scoreboard .score { font-size: 36px; } }

.feed { display: flex; flex-direction: column; gap: 2px; max-height: 420px; overflow-y: auto; }
.feed .ev { display: flex; gap: 10px; padding: 7px 8px; border-radius: 8px; }
.feed .ev .t { font-family: var(--font-display); color: var(--muted); width: 38px; flex: none; text-align: right; }
.feed .ev.minor { color: var(--text-2); font-size: 13px; }
.feed .ev.goal { background: rgba(61, 220, 132, 0.12); font-weight: 700; }
.feed .ev.red { background: rgba(239, 91, 91, 0.12); }
.feed .ev.yellow .t::after { content: ''; display: inline-block; width: 7px; height: 10px; background: var(--amber); border-radius: 1px; margin-left: 5px; }
.feed .ev.whistle { color: var(--accent); font-weight: 600; }
.feed .ev .side-dot { width: 4px; border-radius: 2px; flex: none; }

.stat-row { display: grid; grid-template-columns: 48px 1fr 48px; gap: 10px; align-items: center; font-size: 13px; margin: 8px 0; }
.stat-row .v { font-family: var(--font-display); font-size: 16px; text-align: center; }
.stat-row .lbl { text-align: center; color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.split-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--surface-3); }
.split-bar i:first-child { background: var(--accent); }
.split-bar i:last-child { background: var(--blue); }

.attr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 640px) { .attr-grid { grid-template-columns: 1fr 1fr; } }
.attr-group h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 6px; }
.attr { display: grid; grid-template-columns: 1fr 34px; gap: 8px; align-items: center; padding: 3px 0; font-size: 13px; }
.attr .v { font-family: var(--font-display); font-weight: 700; font-size: 15px; text-align: right; }
.attr .v.a1 { color: #ff8a8a; } .attr .v.a2 { color: #f5b841; } .attr .v.a3 { color: var(--text); } .attr .v.a4 { color: #62e39b; } .attr .v.a5 { color: #5aa9ff; }

.explain { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.instr { padding: 12px 0; border-bottom: 1px solid var(--line); }
.instr:last-child { border-bottom: 0; }
.instr-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.instr-head .lbl { font-weight: 600; }

.club-card {
  display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; text-align: left; width: 100%;
}
.club-card:hover { border-color: var(--line-2); background: var(--surface-2); }
.club-card.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

.start {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 48px 18px;
  background: radial-gradient(1200px 600px at 50% -10%, rgba(61, 220, 132, 0.12), transparent 60%), var(--bg);
}
.start-inner { width: min(1100px, 100%); }
.start h1 { font-family: var(--font-display); font-size: 56px; letter-spacing: 0.01em; line-height: 1; }
.start .tag { color: var(--text-2); font-size: 17px; margin-top: 8px; max-width: 620px; }

.bracket { display: grid; grid-template-columns: repeat(3, minmax(200px, 1fr)); gap: 14px; }
.bracket .tie { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 13px; }
.bracket .tie .w { font-weight: 700; color: var(--accent); }
@media (max-width: 900px) { .bracket { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- arte */
.shield.sm { width: 18px; height: 21px; }
.shield.xxl { width: 96px; height: 110px; }
.avatar { width: 48px; height: 48px; flex: none; display: block; }
.avatar.sm { width: 28px; height: 28px; }
.avatar.xl { width: 84px; height: 84px; }
.avatar.xxl { width: 150px; height: 150px; }
.kit { width: 44px; height: 44px; }
.kit-full { width: 64px; height: auto; flex: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); }
.kit-full.lg { width: 110px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-2); cursor: pointer; padding: 0; }
.swatch.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
input[type=color].color { width: 44px; height: 34px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-2); padding: 3px; cursor: pointer; }
.club-link { color: var(--text); }
.club-link:hover span { color: var(--accent); }
a[data-player], a[data-club] { color: var(--text); cursor: pointer; }
a[data-player]:hover, a[data-club]:hover { color: var(--accent); }
.modal-head h3 { font-size: 18px; }
.list-item.me { background: rgba(245, 184, 65, .08); }
.pitch .dot text { pointer-events: none; }
.bottom-nav { scrollbar-width: none; }
.bottom-nav::-webkit-scrollbar { display: none; }
.stadium-art { width: 100%; height: auto; display: block; border-radius: 12px; }
.sector-card { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sector-card:last-child { border-bottom: 0; }
.big-number { font-family: var(--font-display); font-size: 34px; font-weight: 700; line-height: 1; }
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 2px; background: var(--line-2); }
.timeline .tl { position: relative; padding: 6px 0; }
.timeline .tl::before { content: ''; position: absolute; left: -17px; top: 11px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
.tabs { scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.seg { max-width: 100%; }
.tactic-pitch { max-width: min(520px, calc((100vh - 170px) * 0.66)); margin: 0 auto; }
.flag { width: 18px; height: 12px; border-radius: 2px; vertical-align: -1px; flex: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }

/* ---------------------------------------------------------------- partida ao vivo */
.live-head { position: sticky; top: calc(var(--topbar) + 6px); z-index: 5; margin-bottom: 14px; }
.pitch-wrap { position: relative; }
.goal-flash { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.goal-flash div { opacity: 0; transform: scale(.7); font-family: var(--font-display); font-size: 44px; font-weight: 700; padding: 10px 26px; border-radius: 14px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); letter-spacing: .02em; }
.goal-flash div span { font-size: 26px; margin-left: 8px; }
.goal-flash.on div { animation: goalpop 2.2s ease forwards; }
@keyframes goalpop { 0% { opacity: 0; transform: scale(.6); } 12% { opacity: 1; transform: scale(1.06); } 20% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(1); } }
.card-y { display: inline-block; width: 7px; height: 10px; background: var(--amber); border-radius: 1px; vertical-align: -1px; }

/* ---------------------------------------------------------------- editor de identidade */
.id-editor { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 16px; align-items: start; }
.id-left { position: sticky; top: calc(var(--topbar) + 16px); }
.id-preview { display: flex; flex-direction: column; align-items: center; }
.id-badge { padding: 10px 0 4px; }
.shield.huge { width: 190px; height: 220px; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .45)); }
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 8px; }
.pick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; color: var(--text-2); font-size: 11px; }
.pick:hover { border-color: var(--line-2); background: var(--surface-2); }
.pick.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); color: var(--text); }
.pick span { line-height: 1.15; text-align: center; }
.thumb-badge { width: 44px; height: 51px; }
.thumb-kit { width: 46px; height: 46px; }
.acc { border-top: 1px solid var(--line); }
.acc:first-of-type { border-top: 0; }
.acc-head { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 12px 2px; border: 0; background: none; cursor: pointer; font-weight: 600; color: var(--text); }
.acc-arrow { transition: transform .15s; color: var(--muted); }
.acc.open .acc-arrow { transform: rotate(180deg); }
.acc-body { display: none; padding: 0 2px 14px; }
.acc.open .acc-body { display: block; }
.color-field { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.color-field input { width: 38px; height: 30px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-2); padding: 2px; cursor: pointer; }
.range-field { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.range-field input { accent-color: var(--accent); }
@media (max-width: 1100px) { .id-editor { grid-template-columns: 1fr; } .id-left { position: static; } }
.pitch2d { width: 100%; aspect-ratio: 1.6; background: #1d5a2e; border-radius: 10px; overflow: hidden; }
/* tática: arrastar e soltar */
#tpitch { touch-action: none; user-select: none; }
.pitch .slot { cursor: grab; }
.pitch .slot .hit { fill: transparent; }
.pitch .slot.lifted { pointer-events: none; opacity: .92; }
.pitch .slot.lifted circle.ring { stroke: var(--amber); stroke-width: 0.9; }
.pitch .slot.drop-target circle.ring { stroke: #62e39b; stroke-width: 1.1; }
.pitch .zones line { stroke: rgba(255, 255, 255, 0); stroke-width: .25; stroke-dasharray: 1 1; transition: stroke .15s; }
.dragging .pitch .zones line { stroke: rgba(255, 255, 255, .35); }
.trow { cursor: default; }
.trow .grip { cursor: grab; color: var(--text-3, #6b7a72); padding: 0 4px; touch-action: none; user-select: none; }
.trow.drop-target { outline: 2px solid #62e39b; outline-offset: -2px; border-radius: 8px; }
.trow .name { cursor: pointer; }
.drag-ghost { position: fixed; z-index: 9999; pointer-events: none; background: var(--surface-2); border: 1px solid var(--amber); color: var(--text); font-weight: 700; font-size: 13px; padding: 6px 10px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
/* tática: instruções individuais */
.ind-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ind-row .name { font-weight: 700; min-width: 120px; cursor: pointer; }
.ind-opts { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.input.sm { padding: 4px 8px; font-size: 12px; height: auto; }

/* ---------------------------------------------------------------- acabamento visual */
.card { box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 6px 20px rgba(0, 0, 0, .18); transition: border-color .15s; }
.card:hover { border-color: var(--line-2); }
.card-head h3 { letter-spacing: .06em; }
.btn { transition: transform .08s, background .15s, border-color .15s, box-shadow .15s; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary:hover:not(:disabled) { box-shadow: 0 4px 14px rgba(98, 227, 155, .25); }
.btn:focus-visible, .input:focus-visible, .tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tabs button { transition: color .15s, border-color .15s; }
.list-item { transition: background .12s; border-radius: 8px; }
.list-item.click:hover, .trow:hover { background: rgba(255, 255, 255, .035); }
.tbl tbody tr:nth-child(even) { background: rgba(255, 255, 255, .015); }
.tbl tbody tr.click:hover { background: rgba(98, 227, 155, .06); }
.chip { transition: background .15s; }
.insight { transition: border-color .15s, background .15s; }
.insight.click:hover { background: rgba(255, 255, 255, .04); }
.pitch .slot:hover circle.ring { stroke: var(--accent); stroke-width: .8; }
.pitch .slot circle.ring { filter: drop-shadow(0 .6px .8px rgba(0, 0, 0, .55)); }
.ind-row:last-child { border-bottom: 0; }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.page-head h1 { letter-spacing: .01em; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.page-head .sub { opacity: .9; }
.topbar { backdrop-filter: blur(8px); box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(0, 0, 0, .2); }
.sidebar .nav a { transition: background .15s, color .15s, padding-left .15s; border-radius: 10px; }
.sidebar .nav a:hover { padding-left: 16px; }
.sidebar .nav a.active { box-shadow: inset 3px 0 0 var(--accent); }
.bar i { transition: width .4s ease; }
.ovr { box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.modal { box-shadow: 0 24px 64px rgba(0, 0, 0, .55); }
.tactic-pitch .pitch, .pitch2d { box-shadow: 0 10px 30px rgba(0, 0, 0, .35); border-radius: 10px; }
.insight { border-radius: 10px; }
.hero-match .team .nm { text-shadow: 0 2px 10px rgba(0, 0, 0, .4); }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.num, .tbl td.num, .big-number, .ovr { font-variant-numeric: tabular-nums; }
.tbl th { letter-spacing: .05em; }
.chip { letter-spacing: .01em; }
.input { transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(98, 227, 155, .12); }
.seg button { transition: background .15s, color .15s; }
a { transition: color .15s; }
.toast { box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
::selection { background: rgba(98, 227, 155, .3); }
.card-head { padding-bottom: 2px; }
.list-item + .list-item { border-top-color: rgba(255, 255, 255, .05); }
.kv span:first-child { opacity: .85; }
.empty { opacity: .85; }
.explain { line-height: 1.5; }
.badge { box-shadow: 0 0 0 2px rgba(0, 0, 0, .25); }
/* salão amador: relíquias de antes da profissionalização */
.amateur-hall { background: linear-gradient(180deg, rgba(196, 160, 98, .07), transparent 60%), var(--surface); border-color: rgba(196, 160, 98, .28); }
.amateur-hall .card-head h3 { color: #d9bb82; }
.amateur-hall .relic { font-family: var(--font-display); font-weight: 700; color: #d9bb82; min-width: 34px; }

/* ---------------------------------------------------------------- tema do clube e lobby
   As cores do clube (--club-1, --club-2, --club-accent) são definidas em app.js. */
:root { --club-1: #1f5a36; --club-2: #e7f0ea; --club-accent: var(--accent); --club-ink: var(--accent-ink); }
.topbar::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--club-1), var(--club-2), var(--club-1)); }
.topbar .club-id .shield { filter: drop-shadow(0 0 10px color-mix(in srgb, var(--club-accent) 45%, transparent)); }
.sidebar { background: linear-gradient(180deg, color-mix(in srgb, var(--club-1) 16%, var(--bg-2)) 0, var(--bg-2) 260px); }
.nav a.active { box-shadow: inset 3px 0 0 var(--club-accent); background: color-mix(in srgb, var(--club-accent) 10%, var(--surface-2)); }
.tabs button.on { border-bottom-color: var(--club-accent); }
.tbl tr.me td { background: color-mix(in srgb, var(--club-accent) 13%, transparent); }
.tbl tr.me td:nth-child(3) { font-weight: 700; }
.card { background: linear-gradient(180deg, rgba(255, 255, 255, .018), transparent 120px), var(--surface); box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 8px 22px rgba(0, 0, 0, .18); }

.lobby {
  position: relative; overflow: hidden; isolation: isolate; border-radius: 20px; margin-bottom: 18px;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(250px, .95fr) minmax(250px, .8fr); align-items: stretch;
  background:
    linear-gradient(90deg, rgba(4, 7, 6, .72) 0%, rgba(4, 7, 6, .28) 55%, rgba(4, 7, 6, .55) 100%),
    radial-gradient(90% 120% at 60% 110%, color-mix(in srgb, var(--club-2) 30%, transparent) 0%, transparent 60%),
    linear-gradient(135deg, color-mix(in srgb, var(--club-1) 62%, #05080a) 0%, color-mix(in srgb, var(--club-1) 30%, #05080a) 100%);
  border: 1px solid color-mix(in srgb, var(--club-accent) 35%, transparent);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.lobby::before { content: ''; position: absolute; inset: 0; z-index: -1; background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .035) 0 22px, transparent 22px 44px); }
.lobby::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--club-1), var(--club-2)); }
.lobby-mark { position: absolute; z-index: -1; left: -40px; bottom: -70px; opacity: .09; pointer-events: none; }
.lobby-mark .shield { width: 360px; height: 414px; }
.lobby-id { padding: 26px 26px 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.lobby-kicker { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .72); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lobby-id .shield.xxl { filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .55)); }
.lobby-name { font-family: var(--font-display); font-size: 46px; line-height: .95; letter-spacing: .01em; text-transform: uppercase; text-shadow: 0 3px 18px rgba(0, 0, 0, .55); overflow-wrap: anywhere; }
.lobby-meta { color: rgba(255, 255, 255, .78); font-size: 13px; }
.lobby-stats { display: flex; gap: 22px; flex-wrap: wrap; }
.lobby-stats > * { color: inherit; border-radius: 8px; padding: 2px 4px; margin: -2px -4px; transition: background .15s; display: flex; flex-direction: column; gap: 3px; }
.lobby-stats b { font-family: var(--font-display); font-size: 30px; line-height: 1; }
.lobby-stats span { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: rgba(255, 255, 255, .62); }
.lobby-squad { display: flex; align-items: flex-end; justify-content: center; padding: 18px 6px 14px; min-width: 0; }
.lobby-player { display: flex; flex-direction: column; align-items: center; width: 132px; margin: 0 -14px; opacity: .88; transform: translateY(-8px) scale(.9); transform-origin: bottom center; transition: transform .2s, opacity .2s; color: var(--text); }
.lobby-player.main { width: 168px; opacity: 1; transform: none; z-index: 2; }
.lobby-player:hover { opacity: 1; transform: translateY(-12px) scale(.94); color: var(--text); }
.lobby-player.main:hover { transform: translateY(-4px); }
.lobby-player .athlete { width: 100%; height: auto; filter: drop-shadow(0 14px 16px rgba(0, 0, 0, .5)); }
.lobby-player .plate { margin-top: -4px; text-align: center; background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .1); border-radius: 8px; padding: 4px 9px; max-width: 100%; }
.lobby-player .plate b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lobby-player .plate em { display: block; font-style: normal; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--club-accent); }
.lobby-next { margin: 18px 18px 18px 0; padding: 16px; border-radius: 14px; background: rgba(5, 8, 7, .52); border: 1px solid rgba(255, 255, 255, .09); backdrop-filter: blur(6px); display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.lobby-next-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .8); }
.lobby-vs { display: flex; align-items: center; justify-content: space-around; gap: 8px; }
.lobby-vs .team { display: flex; flex-direction: column; align-items: center; gap: 6px; font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text); }
.lobby-vs .vs { font-family: var(--font-display); font-size: 26px; color: rgba(255, 255, 255, .45); }
.lobby-next-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 1180px) {
  .lobby { grid-template-columns: minmax(0, 1fr) minmax(240px, .9fr); }
  .lobby-next { grid-column: 1 / -1; margin: 0 18px 18px; }
}
@media (max-width: 720px) {
  .lobby { grid-template-columns: 1fr; }
  .lobby-name { font-size: 34px; }
  .lobby-id .shield.xxl { width: 64px; height: 74px; }
  .lobby-player { width: 104px; }
  .lobby-player.main { width: 132px; }
}
.topbar .club-id { color: var(--text); }
.topbar .club-id:hover .club-name { color: var(--club-accent); }
.lobby-player .plate { position: relative; z-index: 1; }
.lobby-player.main .plate { z-index: 3; }
.lobby-player:not(.main) .plate { padding: 3px 7px; }
.lobby-player:not(.main) .plate b { font-size: 11px; }
/* cartão do jogador no perfil: figurinha nas cores do clube dele */
.pl-card { width: 104px; flex: none; border-radius: 14px; padding: 6px 4px 0; position: relative; overflow: hidden;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .05) 0 10px, transparent 10px 20px), linear-gradient(160deg, color-mix(in srgb, var(--pc1) 70%, #05080a), color-mix(in srgb, var(--pc1) 30%, #05080a));
  border: 1px solid color-mix(in srgb, var(--pc2) 30%, transparent); box-shadow: 0 10px 24px rgba(0, 0, 0, .4); }
.pl-card .athlete { width: 100%; height: auto; display: block; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .45)); }
@media (max-width: 720px) { .pl-card { width: 78px; } }
.athlete.preview { width: 190px; height: auto; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .45)); }
/* vitrine do clube na escolha de clube */
.pick-hero { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px;
  margin: -4px -4px 14px; padding: 16px 12px 12px 16px; border-radius: 14px; min-height: 190px;
  background: linear-gradient(90deg, rgba(4, 7, 6, .6), rgba(4, 7, 6, .2)), linear-gradient(135deg, color-mix(in srgb, var(--club-1) 62%, #05080a), color-mix(in srgb, var(--club-1) 28%, #05080a));
  border: 1px solid color-mix(in srgb, var(--club-2) 25%, transparent); }
.pick-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .04) 0 18px, transparent 18px 36px); }
.pick-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--club-1), var(--club-2)); }
.pick-hero-id { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pick-hero-id .lobby-name { font-size: 28px; }
.pick-hero-id .small { color: rgba(255, 255, 255, .75); }
.pick-hero-star { width: 104px; flex: none; text-align: center; }
.pick-hero-star .athlete { width: 100%; height: auto; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .5)); }
.pick-hero-star .tiny { background: rgba(0, 0, 0, .45); border-radius: 6px; padding: 2px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* identidade do clube em todas as telas */
body { background: radial-gradient(1100px 520px at 72% -12%, color-mix(in srgb, var(--club-1) 16%, transparent), transparent 70%) fixed, var(--bg); }
.page-head h1 { display: flex; align-items: center; gap: 12px; }
.page-head h1::before { content: ''; width: 6px; height: .82em; border-radius: 3px; background: linear-gradient(180deg, var(--club-1), var(--club-2)); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); flex: none; }
.card-head h3 { display: flex; align-items: center; gap: 8px; }
.card-head h3::before { content: ''; width: 3px; height: 12px; border-radius: 2px; background: var(--club-accent); opacity: .85; flex: none; }
.start .card-head h3::before { background: var(--accent); }
.bottom-nav a.active { color: var(--club-accent); }
/* ---------------------------------------------------------------- perfis do elenco (fichas) */
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(560px, 1fr)); gap: 14px; }
.pcard { background: linear-gradient(180deg, rgba(255, 255, 255, .02), transparent 140px), var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; box-shadow: 0 8px 22px rgba(0, 0, 0, .2); }
.pcard:hover { border-color: color-mix(in srgb, var(--club-accent) 55%, var(--line)); transform: translateY(-2px); box-shadow: 0 14px 28px rgba(0, 0, 0, .3); }
.pcard-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; color: #fff;
  background: linear-gradient(90deg, color-mix(in srgb, var(--club-1) 78%, #05080a), color-mix(in srgb, var(--club-1) 40%, #05080a)); border-bottom: 2px solid var(--club-2); }
.pcard-num { font: 700 20px/1 var(--font-display); min-width: 26px; text-align: center; opacity: .95; }
.pcard-name { font: 700 19px/1.1 var(--font-display); letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 6px rgba(0, 0, 0, .45); }
.pcard-body { display: grid; grid-template-columns: minmax(0, 1fr) 112px minmax(0, 1.25fr); gap: 12px; padding: 12px; align-items: start; }
.pcard-info { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pcard-info .kv { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; padding: 0; border: 0; }
.pcard-info .kv span { color: var(--muted); }
.pcard-info .kv b { font-weight: 600; white-space: nowrap; }
.pcard-season { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); padding: 6px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 3px 0; }
.pcard-season b { color: var(--text); font-family: var(--font-display); font-size: 14px; }
.pcard-figure { align-self: center; }
.pcard-figure .athlete { width: 100%; height: auto; display: block; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .45)); }
.pcard-attrs { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pa { display: grid; grid-template-columns: minmax(0, 1fr) auto 20px 22px; align-items: center; gap: 6px; font-size: 12px; line-height: 1.35; }
.pa-l { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-d { display: inline-flex; gap: 2px; }
.pa-d i { width: 7px; height: 7px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .22); background: transparent; }
.pa-d i.f { background: currentColor; border-color: currentColor; }
.pa-d i.h { background: linear-gradient(90deg, currentColor 50%, transparent 50%); border-color: currentColor; }
.pa-d.a1 { color: #ff8a8a; } .pa-d.a2 { color: #f5b841; } .pa-d.a3 { color: #cfdcd4; } .pa-d.a4 { color: #62e39b; } .pa-d.a5 { color: #5aa9ff; }
.pa b { font: 700 13px/1 var(--font-display); text-align: right; }
.pa b.a1 { color: #ff8a8a; } .pa b.a2 { color: #f5b841; } .pa b.a4 { color: #62e39b; } .pa b.a5 { color: #5aa9ff; }
.pa-p { height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.pa-p i { display: block; height: 100%; background: color-mix(in srgb, var(--club-accent) 70%, #62e39b); border-radius: 3px; }
@media (max-width: 720px) {
  .pcards { grid-template-columns: 1fr; }
  .pcard-body { grid-template-columns: minmax(0, 1fr) 96px; }
  .pcard-attrs { grid-column: 1 / -1; }
}
/* prancheta: camisa do clube no lugar da bolinha; o anel só aparece ao selecionar/arrastar */
.pitch .slot circle.ring.base { fill: transparent; stroke: transparent; filter: none; }
.pitch .slot.sel circle.ring.base, .pitch .slot.lifted circle.ring.base { stroke: var(--amber); stroke-width: .8; }
.pitch .slot:hover circle.ring.base { stroke: var(--club-accent); stroke-width: .6; }
.pitch .slot.drop-target circle.ring.base { stroke: #62e39b; stroke-width: 1; }
.pitch .slot g { filter: drop-shadow(0 .6px .7px rgba(0, 0, 0, .55)); }
/* leilão */
.auction-box { border: 1px solid rgba(245, 184, 65, .3); background: linear-gradient(180deg, rgba(245, 184, 65, .07), transparent); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.auction-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.auction-price b { font: 700 26px/1 var(--font-display); }
/* personagens novos (figure.js): proporção mais alta */
.lobby-player { width: 116px; }
.lobby-player.main { width: 146px; }
.pcard-body { grid-template-columns: minmax(0, 1fr) 98px minmax(0, 1.25fr); }
.pl-card { width: 92px; }
.pick-hero-star { width: 90px; }
.athlete.preview { width: 150px; }
@media (max-width: 720px) {
  .lobby-player { width: 92px; }
  .lobby-player.main { width: 116px; }
  .pcard-body { grid-template-columns: minmax(0, 1fr) 88px; }
  .pl-card { width: 72px; }
}
/* numeração do elenco */
.numgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; }
.numcard { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.numcard.xi { border-color: color-mix(in srgb, var(--club-accent) 45%, var(--line)); }
.numshirt .kit { width: 52px; height: 52px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); }
.numcard select { width: auto; max-width: 140px; }
/* editor de estilo */
.subhead { margin: 14px 0 2px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.swatch.none { display: inline-grid; place-items: center; color: var(--muted); font-size: 13px; }
.swatch { font: 700 11px/1 var(--font-display); color: #fff; }
/* teto do atributo: bolinha vazada contornada / "teto N" no perfil */
.pa-d i.c { background: transparent; border-color: currentColor; border-style: dashed; opacity: .75; }
/* talento: pontos fortes e fracos em estrelas de teto */
.talent { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.tal-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12px; }
.tal-row > b { font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; min-width: 92px; }
.tal { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
.tal .stars { font-size: 11px; letter-spacing: 0; }
.pcard .tal-row > b { min-width: 0; width: 100%; }
/* acabamento: foco visível, rolagem discreta, transições suaves */
:focus-visible { outline: 2px solid var(--club-accent); outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.card, .btn, .chip, .tabs button, .seg button { transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.tabs button:hover { color: var(--text); }
.pcard-figure { width: 100%; }
.lobby-player .athlete, .pcard-figure .athlete { transition: transform .2s; }
.pcard:hover .pcard-figure .athlete { transform: translateY(-3px); }
/* camisa do jogador no perfil (costas, nome e número) */
.pl-shirt { order: 3; flex: none; }
.pl-shirt .kit { width: 84px; height: 84px; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .45)); }
@media (max-width: 720px) { .pl-shirt { display: none; } }

/* Primeiros passos (lobby) */
.guide { margin-bottom: 16px; border-color: color-mix(in srgb, var(--club-accent) 35%, var(--line)); }
.guide-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.guide-step { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); transition: border-color .12s, transform .12s; }
.guide-step:hover { border-color: var(--club-accent); transform: translateY(-1px); color: var(--text); }
.guide-step i { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 12px; background: var(--club-accent); color: var(--club-ink); }
.guide-step b { display: block; font-size: 13px; }
.guide-step em { display: block; font-style: normal; font-size: 12px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.guide-step.done { opacity: .6; }
.guide-step.done i { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
@media (max-width: 1100px) { .guide-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .guide-steps { grid-template-columns: 1fr; } }

/* Balanço da temporada */
.rv-hero { position: relative; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 18px 20px; border-radius: 14px; overflow: hidden; background: linear-gradient(120deg, color-mix(in srgb, var(--club-1) 72%, #000), color-mix(in srgb, var(--club-1) 22%, #0d1310)); border: 1px solid rgba(255, 255, 255, .08); }
.rv-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--club-1), var(--club-2)); }
.rv-hero .shield { filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .5)); }
.rv-pos b { display: block; font-family: var(--font-display); font-size: 68px; line-height: .9; text-shadow: 0 3px 18px rgba(0, 0, 0, .5); }
.rv-pos span { display: block; margin-top: 6px; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: rgba(255, 255, 255, .75); }
.rv-tags { margin-left: auto; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.rv-tags .chip { font-size: 13px; padding: 5px 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; background: rgba(0, 0, 0, .4); }
.rv-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.rv-stats > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.rv-stats b { display: block; font-family: var(--font-display); font-size: 22px; line-height: 1.1; white-space: nowrap; }
.rv-stats span { display: block; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.rv-stars { display: flex; gap: 10px; margin: 14px 0; }
.rv-star { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 12px 0; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); cursor: pointer; }
.rv-star:hover { border-color: var(--club-accent); color: var(--text); }
.rv-star .athlete { width: 62px; height: auto; flex: none; }
.rv-star em { display: block; font-style: normal; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--club-accent); }
.rv-star b { display: block; }
@media (max-width: 640px) { .rv-stats { grid-template-columns: 1fr 1fr; } .rv-stars { flex-direction: column; } .rv-pos b { font-size: 50px; } .rv-tags { margin-left: 0; align-items: flex-start; } }

/* Ordens condicionais (Tática) */
.rule-form { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; }
.rule-form .field { margin: 0; min-width: 0; }
.rule-form .input { max-width: 100%; }

/* Estádio em perspectiva */
.stadium-hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 0; padding: 0; overflow: hidden; }
.stadium-stage { position: relative; background: radial-gradient(120% 90% at 50% 45%, #1a2620 0%, #0d1310 70%); border-right: 1px solid var(--line); min-width: 0; }
.stadium-art { width: 100%; height: auto; display: block; }
.stadium-plate { padding: 22px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.stadium-tag { position: absolute; left: 14px; top: 12px; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: rgba(255, 255, 255, .78); background: rgba(5, 8, 7, .55); border: 1px solid rgba(255, 255, 255, .1); border-radius: 999px; padding: 4px 11px; backdrop-filter: blur(4px); }
.stadium-tag b { color: var(--club-accent); }
.stadium-hint { position: absolute; right: 14px; bottom: 10px; font-size: 11px; color: rgba(255, 255, 255, .5); }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .18); cursor: pointer; padding: 0; transition: transform .12s; }
.swatch:hover { transform: scale(1.12); }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 2px var(--club-accent); }
@media (max-width: 900px) { .stadium-hero { grid-template-columns: 1fr; } .stadium-stage { border-right: 0; border-bottom: 1px solid var(--line); } }

.st-editor { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.st-left { position: sticky; top: calc(var(--topbar) + 16px); min-width: 0; }
.stadium-solo { padding: 0; overflow: hidden; }
.stadium-solo .stadium-stage { border-right: 0; }
.stadium-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stadium-facts > div { padding: 12px 14px; min-width: 0; }
.stadium-facts > div + div { border-left: 1px solid var(--line); }
.stadium-facts b { display: block; font-family: var(--font-display); font-size: 22px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stadium-facts span { display: block; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.st-tabs { align-self: flex-start; }
@media (max-width: 1100px) {
  .st-editor { grid-template-columns: minmax(0, 1fr); }
  .st-left { top: var(--topbar); z-index: 6; }
  .st-left .stadium-art { height: 40vh; }
  .stadium-facts > div { padding: 8px 10px; }
  .stadium-facts b { font-size: 17px; }
}

/* Estádio por módulos */
.stadium-art [data-slot] { cursor: pointer; transition: filter .15s; }
.stadium-art [data-slot]:hover { filter: brightness(1.2) drop-shadow(0 0 5px rgba(255, 255, 255, .4)); }
.stadium-art .st-mod.sel { filter: brightness(1.22) drop-shadow(0 0 3px #fff) drop-shadow(0 0 9px var(--club-accent)); }
.unlocks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.swatch.auto { background: repeating-linear-gradient(45deg, #2c3531 0 5px, #3a4540 5px 10px); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }

.st-editor > * { min-width: 0; }
.st-editor .instr-head { flex-wrap: wrap; gap: 8px; }

/* Escolha da planta do estádio */
.shape-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.shape-card { display: flex; flex-direction: column; gap: 4px; padding: 0 0 12px; text-align: left; background: var(--surface-2); border: 2px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; color: var(--text); transition: border-color .15s, transform .15s; }
.shape-card:hover { border-color: color-mix(in srgb, var(--club-accent) 60%, var(--line)); transform: translateY(-2px); }
.shape-card.on { border-color: var(--club-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--club-accent) 25%, transparent); }
.shape-card .stadium-art { background: radial-gradient(120% 90% at 50% 45%, #1a2620 0%, #0d1310 70%); pointer-events: none; }
.shape-name { font-family: var(--font-display); font-size: 20px; font-weight: 700; padding: 8px 12px 0; }
.shape-desc { font-size: 12px; color: var(--muted); line-height: 1.4; padding: 0 12px; }
@media (max-width: 1100px) { .shape-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .shape-grid { grid-template-columns: 1fr; } }

/* Acabamento geral: texto mais nítido, números alinhados em colunas, seleção na cor do jogo. */
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
table, .score, .clock, .list-item, .stat, .num { font-variant-numeric: tabular-nums; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
.scoreboard .score { letter-spacing: .02em; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }

/* Lobby: o estádio do clube em miniatura (leva à tela do estádio) e campeonatos clicáveis. */
.lobby-stadium { display: flex; align-items: center; gap: 12px; max-width: 360px; padding: 6px; border-radius: 12px; background: rgba(0, 0, 0, .32); border: 1px solid rgba(255, 255, 255, .09); color: var(--text); transition: background .15s, border-color .15s; }
.lobby-stadium:hover { background: rgba(0, 0, 0, .45); border-color: rgba(255, 255, 255, .2); color: var(--text); }
.lobby-stadium .stadium-art { width: 150px; height: 84px; flex: none; border-radius: 8px; background: radial-gradient(120% 90% at 50% 45%, #1a2620 0%, #0d1310 70%); pointer-events: none; }
.lobby-stadium b { display: block; font-size: 14px; }
.lobby-stadium em { display: block; font-style: normal; font-size: 12px; color: rgba(255, 255, 255, .65); }
.lobby-id a.chip { cursor: pointer; transition: filter .15s; }
.lobby-id a.chip:hover { filter: brightness(1.25); }

/* Tudo que é clicável mostra que é: cursor, sublinhado nos nomes, seta nos atalhos dos cartões. */
[data-player], [data-club], [data-fx], [data-report], [data-review] { cursor: pointer; }
a[data-player]:hover, a[data-club]:hover:not(.team):not(.row), a.name:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-head a.small::after { content: ' →'; }
.lobby-stats > a:hover { background: rgba(255, 255, 255, .08); }
.sidebar-foot a { display: block; color: inherit; }
.sidebar-foot a:hover { color: var(--text); }
.sidebar-foot a.good { color: var(--accent); }
.topbar a.cash { color: inherit; border-radius: 8px; padding: 4px 8px; transition: background .15s; }
.topbar a.cash:hover { background: var(--surface-3); }
.topbar a.cash.bad { color: var(--bad); }
a.kv:hover span:first-child { text-decoration: underline; text-underline-offset: 3px; }
.kv > a:first-child { color: inherit; }
.kv > a:first-child:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* Celular: coluna única que não cresce além da tela. "1fr" sozinho deixa a coluna esticar
   até caber a tabela mais larga (a página ganhava rolagem lateral); com minmax(0, 1fr)
   a tabela rola dentro do cartão. */
.shell { grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.main, .grid > *, .col { min-width: 0; }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .grid.two, .grid.three, .grid.main-side, .stadium-hero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) { .lobby { grid-template-columns: minmax(0, 1fr); } }
/* Toque: botões, abas e seletores com altura confortável para o dedo. */
@media (pointer: coarse) {
  .btn, .seg button, .tabs button { min-height: 40px; }
  .btn.sm { min-height: 34px; }
}
/* Abas que não cabem na tela rolam de lado: a borda direita esmaece para mostrar que tem mais. */
@media (max-width: 720px) {
  .tabs { mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); }
  .tabs button { flex: none; }
}
/* Partida ao vivo */
.live-controls { justify-content: center; margin-top: 10px; gap: 8px; }
@media (max-width: 720px) {
  /* No celular o cabeçalho fixo (placar + controles) não pode engolir a tela: os controles
     ficam numa linha só, que rola de lado. */
  .live-controls { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin: 8px -4px 0; padding: 0 4px 2px; }
  .live-controls::-webkit-scrollbar { display: none; }
  .live-controls > * { flex: none; }
  .live-head .scoreboard { gap: 8px; }
  .live-head .scoreboard .shield.lg { width: 34px; height: 39px; }
  .goal-flash div { font-size: 30px; padding: 8px 18px; }
  .goal-flash div span { font-size: 18px; }
}
/* Login */
.start.login { justify-content: center; }
.login-box { width: min(440px, 100%); }
.login-box h1 { text-align: center; }
.login-box .tag { text-align: center; margin: 8px auto 0; font-size: 15px; }
.login-google { gap: 10px; background: #fff; color: #1f1f1f; border-color: #dadce0; }
.login-google:hover { background: #f1f3f4; }
.login-or { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--muted); font-size: 12px; }
.login-or::before, .login-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* Barra de status do topo: seu jogo, busca, data e hora, dia do mundo, online. */
.topstatus { flex: 1 1 560px; max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ts-row { display: flex; gap: 8px; align-items: center; }
.ts-match { flex: none; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
.ts-match:hover { color: var(--text); border-color: var(--line-2); }
.ts-match.today { color: var(--club-accent); }
.ts-match.live { color: #ff8a8a; border-color: rgba(239, 91, 91, .5); background: rgba(239, 91, 91, .1); }
.ts-match.live b { animation: tslive 1.2s ease-in-out infinite; }
@keyframes tslive { 50% { opacity: .25; } }
.ts-search { position: relative; flex: 1; min-width: 0; }
.ts-search .input { height: 30px; padding: 4px 10px; font-size: 13px; width: 100%; }
.ts-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50; max-height: 70vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 18px 40px rgba(0, 0, 0, .5); padding: 6px; }
.ts-group { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px 8px 4px; }
.ts-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; color: var(--text); }
.ts-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none !important; }
.ts-item span { display: flex; flex-direction: column; min-width: 0; }
.ts-item b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-item em { font-style: normal; font-size: 11px; color: var(--muted); }
.ts-item .ts-pos { flex: none; width: 34px; text-align: center; font: 700 11px/1 var(--font-display); color: var(--club-accent); }
.ts-empty { padding: 10px; color: var(--muted); font-size: 13px; }
.ts-line { display: flex; gap: 8px; justify-content: center; font-size: 11px; color: var(--text-2); white-space: nowrap; overflow: hidden; }
.ts-line i { font-style: normal; color: var(--muted); }
.ts-line .accent { color: var(--club-accent); font-weight: 600; }
@media (max-width: 1100px) { .topbar .meta { display: none; } }
@media (max-width: 900px) {
  .topstatus { order: 5; flex-basis: 100%; max-width: none; }
  .topbar { height: auto; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .ts-line { justify-content: flex-start; }
}

/* Mensagens: no celular, ou a lista ou a mensagem aberta (com "voltar"). */
.inbox .inbox-back { display: none; margin-bottom: 10px; }
.inbox .inbox-list .list { max-height: 70vh; overflow: auto; }
@media (max-width: 899px) {
  .inbox.reading .inbox-list { display: none; }
  .inbox:not(.reading) .inbox-msg { display: none; }
  .inbox .inbox-back { display: inline-flex; }
  .inbox .inbox-list .list { max-height: none; }
}
.club-card.taken { opacity: .55; cursor: not-allowed; }
.club-card.taken:hover { border-color: var(--line); background: inherit; }

/* Finanças: relatório por semana (linha que abre com os detalhes). */
.week-head, .week-row > summary { display: grid; grid-template-columns: minmax(110px, 1.2fr) 1fr 1fr minmax(130px, 1.6fr) 1fr; gap: 10px; align-items: center; }
.week-head { padding: 0 6px 6px; border-bottom: 1px solid var(--line); }
.week-row > summary { padding: 8px 6px; cursor: pointer; list-style: none; border-bottom: 1px solid var(--line); font-size: 13px; }
.week-row > summary::-webkit-details-marker { display: none; }
.week-row > summary:hover { background: var(--surface-2); }
.week-row[open] > summary { background: var(--surface-2); }
.week-cats { padding: 6px 12px 10px; background: var(--surface-2); }
@media (max-width: 640px) {
  .week-head, .week-row > summary { grid-template-columns: 1fr 1fr 1fr; }
  .week-head span:nth-child(4), .week-head span:nth-child(5), .week-row > summary > span:nth-child(4), .week-row > summary > span:nth-child(5) { display: none; }
}

/* Gente online: bolinha de presença, faixa do técnico no perfil do clube, "ao vivo". */
.presence { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--line-2, #3a4a40); flex: none; vertical-align: middle; }
.presence.on { background: #3ddc84; box-shadow: 0 0 0 3px rgba(61, 220, 132, .18); }
.mgr-hero { margin: -4px 0 16px; padding: 16px 18px; border-radius: 14px; color: #fff; background: linear-gradient(120deg, color-mix(in srgb, var(--pc1) 82%, #000) 0%, color-mix(in srgb, var(--pc2) 55%, #000) 100%); }
.mgr-hero .btn { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .28); color: #fff; }
.mgr-hero .btn.primary { background: #fff; color: #0d1310; border-color: #fff; }
.mgr-avatar { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font: 700 22px/1 "Barlow Condensed", sans-serif; background: rgba(255, 255, 255, .16); border: 2px solid rgba(255, 255, 255, .45); flex: none; }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #ff4d4f; margin-right: 6px; animation: livepulse 1.4s ease-in-out infinite; vertical-align: middle; }
@keyframes livepulse { 50% { opacity: .35; } }
.update-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 90; display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--surface-2, #1b2620); border: 1px solid var(--accent); box-shadow: 0 8px 30px rgba(0, 0, 0, .45); font-size: 14px; max-width: calc(100vw - 32px); }
@media (max-width: 900px) { .update-bar { bottom: 84px; } }

/* Treino: campinhos por atributo. */
.tr-layout { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 16px; align-items: start; }
.tr-squad { position: sticky; top: 12px; max-height: calc(100vh - 40px); overflow: auto; }
.tr-row { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; cursor: grab; touch-action: none; user-select: none; }
.tr-row:hover { background: var(--surface-2); }
.tr-row.sel { background: color-mix(in srgb, var(--accent) 18%, transparent); box-shadow: inset 0 0 0 1px var(--accent); }
.tr-row .nm, .tr-chip .nm { font-weight: 600; font-size: 13px; }
.tr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tr-field { position: relative; border-radius: 12px; padding: 10px; min-height: 120px;
  background: repeating-linear-gradient(90deg, #1d5a35 0 18px, #1a5230 18px 36px); border: 2px solid rgba(255,255,255,.18); box-shadow: inset 0 0 0 4px rgba(255,255,255,.06); }
.tr-field::after { content: ''; position: absolute; left: 50%; top: 8px; bottom: 8px; border-left: 1px solid rgba(255,255,255,.18); pointer-events: none; }
.tr-field.rest { background: repeating-linear-gradient(90deg, #22465a 0 18px, #1e4052 18px 36px); }
.tr-field.over, .tr-field.can { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.tr-dragging .tr-field { border-style: dashed; }
.tr-head { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: baseline; gap: 6px; color: #fff; margin-bottom: 8px; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.tr-slots { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 6px; }
.tr-chip { position: relative; overflow: hidden; display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 8px; background: rgba(10, 18, 14, .82); cursor: grab; touch-action: none; user-select: none; }
.tr-val { font: 700 16px/1 "Barlow Condensed", sans-serif; min-width: 18px; text-align: center; color: var(--accent); }
.tr-val.top { color: var(--amber); }
.tr-prog { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); }
.tr-x { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0 2px; font-size: 12px; }
.tr-x:hover { color: var(--red); }
.tr-empty { border: 1px dashed rgba(255,255,255,.3); border-radius: 8px; padding: 6px; font-size: 11px; color: rgba(255,255,255,.55); text-align: center; }
.tr-put { position: relative; z-index: 1; width: 100%; margin-top: 8px; border-radius: 8px; border: 0; padding: 6px; background: var(--accent); color: var(--club-ink, #0d1310); font-weight: 600; font-size: 12px; cursor: pointer; }
@media (max-width: 900px) {
  .tr-layout { grid-template-columns: 1fr; }
  .tr-squad { position: static; max-height: 300px; }
  .tr-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
.staff-fx { margin: 4px 0 0; padding-left: 16px; font-size: 12px; color: var(--muted); } .staff-fx li { margin: 1px 0; }

/* Base: resumo da estrutura no topo. */
.ac-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; margin-bottom: 14px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--club-1) 22%, var(--surface)) 0%, var(--surface) 70%); }
.ac-level { text-align: center; }
.ac-num { font: 700 54px/1 "Barlow Condensed", sans-serif; }
.ac-num span { font-size: 22px; color: var(--muted); }
.ac-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.ac-facts > div { display: flex; flex-direction: column; gap: 2px; }
.ac-facts b { font: 700 22px/1.1 "Barlow Condensed", sans-serif; }
.ac-facts span { font-size: 12px; color: var(--muted); }
.ac-up { text-align: right; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
@media (max-width: 900px) { .ac-hero { grid-template-columns: 1fr; text-align: left; } .ac-level { text-align: left; } .ac-up { align-items: flex-start; text-align: left; } }

/* Mercado: filtros. */
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mk-grid .input { width: 100%; min-width: 0; }
.mk-filters .seg { flex-wrap: wrap; }
.mk-attrs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 18px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.mk-attr { opacity: .75; }
.mk-attr.on { opacity: 1; }
.mk-attr.on .mk-val { color: var(--accent); }
/* Controle de duas pontas: dois sliders sobrepostos, só as bolinhas recebem o toque. */
.dual { position: relative; height: 26px; }
.dual::before { content: ''; position: absolute; left: 0; right: 0; top: 11px; height: 4px; border-radius: 2px; background: var(--line-2, #2c3a31); }
.dual-fill { position: absolute; top: 11px; height: 4px; border-radius: 2px; background: var(--accent); }
.dual input[type=range] { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 26px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.dual input[type=range]::-webkit-slider-thumb { pointer-events: auto; -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); cursor: grab; }
.dual input[type=range]::-moz-range-thumb { pointer-events: auto; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); cursor: grab; }
.dual input[type=range]::-webkit-slider-runnable-track { background: none; }
.dual input[type=range]::-moz-range-track { background: none; }

/* Tática: prancheta compacta (campo · banco · elenco, tudo à vista) */
.tb-card { padding: 12px; }
.tboard { --bh: clamp(440px, calc(100vh - 235px), 740px); display: grid; grid-template-columns: auto 150px minmax(0, 1fr); gap: 12px; align-items: start; }
.tboard .tb-pitch { max-width: none; margin: 0; height: var(--bh); aspect-ratio: 68 / 105; }
.tboard .tb-pitch svg { height: 100%; width: auto; display: block; }
.tb-bench { display: flex; flex-direction: column; gap: 5px; height: var(--bh); background: rgba(0, 0, 0, .18); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 6px; }
.tb-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); padding: 0 4px 2px; display: flex; justify-content: space-between; }
.bn-slot { flex: 1; min-height: 0; display: flex; align-items: center; gap: 6px; padding: 0 6px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line-2); cursor: grab; font-size: 12px; user-select: none; touch-action: none; overflow: hidden; }
.bn-slot.empty { background: transparent; border-style: dashed; color: var(--text-3, #6b7a72); justify-content: center; cursor: default; font-size: 11px; }
.bn-slot .bn-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.bn-slot .pos { font-size: 9px; padding: 1px 4px; }
.bn-slot.drop-target, .tb-bench.drop-target, .tb-list.drop-target { outline: 2px solid #62e39b; outline-offset: -2px; }
.tb-squad { display: flex; flex-direction: column; height: var(--bh); min-width: 0; }
.tb-tools { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 8px; }
.tb-tools .seg button { padding: 4px 8px; font-size: 11px; }
.tb-tools .check { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; color: var(--text-2); }
.tb-tools select { margin-left: auto; max-width: 170px; }
.tb-list { flex: 1; overflow-y: auto; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(0, 0, 0, .18); padding: 3px; }
.sq-row { display: flex; align-items: center; gap: 7px; padding: 4px 6px; border-radius: 6px; font-size: 13px; cursor: grab; user-select: none; touch-action: none; }
.sq-row:hover { background: rgba(255, 255, 255, .05); }
.sq-row.xi { opacity: .45; }
.sq-row.xi:hover { opacity: .8; }
.sq-row.bench .sq-tag { color: var(--accent); }
.sq-row.out .sq-name { color: var(--amber); }
.sq-row .pos { font-size: 9px; padding: 1px 4px; min-width: 28px; text-align: center; }
.sq-row .ovr { font-size: 11px; min-width: 24px; padding: 1px 4px; }
.sq-num { width: 20px; height: 20px; flex: none; display: inline-grid; place-items: center; border-radius: 50%; background: var(--surface-3); font-size: 10px; font-weight: 700; color: var(--text-2); }
.sq-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.sq-attrs { font-size: 10px; color: var(--text-2); white-space: nowrap; }
.sq-attrs b { margin: 0 3px 0 1px; }
.sq-tag { font-size: 10px; font-weight: 700; color: var(--text-3, #6b7a72); width: 26px; text-align: right; }
.sq-fit { width: 34px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .1); overflow: hidden; flex: none; }
.sq-fit i { display: block; height: 100%; background: var(--good, #62e39b); }
.sq-fit i.amber { background: var(--amber); }
.sq-fit i.red { background: #ef5b5b; }
.stt { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-left: 5px; vertical-align: middle; }
.stt.bad { background: #ef5b5b; }
.stt.warn { background: #f5b841; }
.tb-help { margin-top: 8px; text-align: center; }
.sq-row.drop-target { outline: 2px solid #62e39b; outline-offset: -2px; }
@media (max-width: 1100px) {
  .tboard { grid-template-columns: auto minmax(0, 1fr); }
  .tb-bench { grid-column: 1 / -1; order: 3; height: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .tb-bench .tb-h { grid-column: 1 / -1; }
  .bn-slot { height: 32px; flex: none; }
}
@media (max-width: 700px) {
  .tboard { grid-template-columns: 1fr; --bh: auto; }
  .tboard .tb-pitch { height: auto; width: 100%; max-width: 420px; margin: 0 auto; }
  .tboard .tb-pitch svg { width: 100%; height: auto; }
  .tb-squad { height: 420px; }
}
.pitch .slot .rolepick rect { fill: rgba(8, 14, 11, .72); stroke: rgba(255, 255, 255, .18); stroke-width: .2; }
.pitch .slot .rolepick[data-rolepick] { cursor: pointer; }
.pitch .slot .rolepick[data-rolepick]:hover rect { fill: rgba(8, 14, 11, .95); stroke: var(--club-accent, #62e39b); stroke-width: .35; }
.pitch .slot .rolepick .rl { font-size: 1.75px; fill: rgba(255, 255, 255, .85); stroke: none; }
.role-menu { position: fixed; z-index: 9000; width: 280px; max-height: 60vh; overflow-y: auto; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, .5); padding: 6px; }
.role-menu .rm-h { font-size: 11px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; padding: 4px 6px 6px; }
.role-menu button { display: block; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 7px; padding: 7px 8px; cursor: pointer; color: var(--text); }
.role-menu button:hover { background: rgba(255, 255, 255, .06); }
.role-menu button.on { background: var(--surface-3); box-shadow: inset 3px 0 0 var(--accent); }
.role-menu button b { display: block; font-size: 13px; }
.role-menu button span { display: block; font-size: 11px; color: var(--text-2); margin-top: 2px; line-height: 1.35; }

/* Treino compacto: campos pequenos, vagas vazias numa linha só */
.tr-layout { grid-template-columns: minmax(230px, 270px) minmax(0, 1fr); gap: 12px; }
.tr-squad { max-height: calc(100vh - 24px); padding: 12px; }
.tr-squad .seg button { padding: 4px 8px; font-size: 11px; }
.tr-row { padding: 4px 6px; gap: 6px; }
.tr-row .pos { font-size: 9px; padding: 1px 4px; }
.tr-row .ovr { font-size: 11px; padding: 1px 4px; }
.tr-row .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tr-where { font-size: 10px; color: var(--muted); white-space: nowrap; max-width: 78px; overflow: hidden; text-overflow: ellipsis; }
.tr-where.on { color: var(--accent); font-weight: 600; }
.tr-fields .subhead { margin: 8px 0 4px; font-size: 11px; }
.tr-fields .subhead:first-child { margin-top: 0; }
.tr-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 8px; }
.tr-field { min-height: 0; padding: 7px 8px; border-radius: 10px; box-shadow: inset 0 0 0 3px rgba(255,255,255,.05); }
.tr-head { margin-bottom: 5px; font-size: 13px; }
.tr-slots { gap: 4px; }
.tr-chip { padding: 3px 5px; }
.tr-chip .pos { font-size: 9px; padding: 1px 4px; }
.tr-val { font-size: 14px; }
.tr-empty { padding: 3px; font-size: 10px; }
.tr-put { margin-top: 5px; padding: 4px; font-size: 11px; }
.tr-head b { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-head > span { white-space: nowrap; flex: none; }
