/* AASM stats — estilos. Paleta AASM: preto e branco com acento dourado (1946). */
:root {
  color-scheme: light;
  --bg: #f3f2ee; --surface: #ffffff; --surface-2: #eceae4; --surface-3: #e2e0d8;
  --ink: #0d0d0f; --ink-2: #4b4a46; --muted: #7c7b75; --line: #d9d7cf;
  --accent: #a87b1f; --accent-soft: #f3e7c9; --on-accent: #ffffff;
  --brand: #0d0d0f; --on-brand: #ffffff;
  --ok: #1c7c4a; --warn: #b26a00; --bad: #c0322f;
  --court-free: #d8d5cb; --court-floor: #efebe1; --court-front: #e7e2d5; --court-line: #1b1b1d; --court-zone: rgba(0,0,0,.14); --court-net: #0d0d0f;
  /* qualidade por valência (ponto → erro) */
  --q3: #a87b1f; --q2: #256abf; --q1: #6da7ec; --q0: #9a988f; --qm1: #eba06f; --qm2: #d95926; --qm3: #c0322f;
  /* séries categóricas (ordem fixa: S R E A B D) */
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300;
  /* rampa sequencial (heatzones) */
  --seq-1: #cde2fb; --seq-2: #9ec5f4; --seq-3: #6da7ec; --seq-4: #3987e5; --seq-5: #256abf; --seq-6: #184f95; --seq-7: #0d366b;
  --radius: 14px; --shadow: 0 1px 2px rgba(0,0,0,.06), 0 6px 20px rgba(0,0,0,.06);
  --font: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-c: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;
  --nav-h: 64px; --top-h: 58px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0b0d; --surface: #151518; --surface-2: #1d1d21; --surface-3: #26262b;
    --ink: #f2f1ec; --ink-2: #bdbcb5; --muted: #85847e; --line: #2b2b30;
    --accent: #d9ab45; --accent-soft: #3a2f16; --on-accent: #0d0d0f;
    --brand: #000000; --on-brand: #ffffff;
    --ok: #3fb47a; --warn: #e2a33b; --bad: #e66767;
    --court-free: #1f2024; --court-floor: #2f3036; --court-front: #36373e; --court-line: #f2f1ec; --court-zone: rgba(255,255,255,.13); --court-net: #ffffff;
    --q3: #d9ab45; --q2: #3987e5; --q1: #86b6ef; --q0: #8a8983; --qm1: #e9a27a; --qm2: #d95926; --qm3: #e05a5a;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #2f9a2f;
    --seq-1: #1a2c45; --seq-2: #184f95; --seq-3: #256abf; --seq-4: #3987e5; --seq-5: #6da7ec; --seq-6: #9ec5f4; --seq-7: #cde2fb;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0b0d; --surface: #151518; --surface-2: #1d1d21; --surface-3: #26262b;
  --ink: #f2f1ec; --ink-2: #bdbcb5; --muted: #85847e; --line: #2b2b30;
  --accent: #d9ab45; --accent-soft: #3a2f16; --on-accent: #0d0d0f;
  --brand: #000000; --on-brand: #ffffff;
  --ok: #3fb47a; --warn: #e2a33b; --bad: #e66767;
  --court-free: #1f2024; --court-floor: #2f3036; --court-front: #36373e; --court-line: #f2f1ec; --court-zone: rgba(255,255,255,.13); --court-net: #ffffff;
  --q3: #d9ab45; --q2: #3987e5; --q1: #86b6ef; --q0: #8a8983; --qm1: #e9a27a; --qm2: #d95926; --qm3: #e05a5a;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #2f9a2f;
  --seq-1: #1a2c45; --seq-2: #184f95; --seq-3: #256abf; --seq-4: #3987e5; --seq-5: #6da7ec; --seq-6: #9ec5f4; --seq-7: #cde2fb;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-c); font-weight: 700; letter-spacing: .01em; margin: 0; line-height: 1.1; }
h1 { font-size: 28px; } h2 { font-size: 22px; } h3 { font-size: 18px; text-transform: uppercase; letter-spacing: .06em; }
a { color: inherit; }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 11.5px; }
.num { font-family: var(--font-c); font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* ---------- shell ---------- */
#app { min-height: 100%; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: calc(var(--top-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 16px 0; display: flex; align-items: center; gap: 12px; background: var(--brand); color: var(--on-brand); }
.topbar .logo { width: 38px; height: 38px; }
.topbar .brand { font-family: var(--font-c); font-weight: 800; font-size: 21px; letter-spacing: .04em; white-space: nowrap; }
.topbar .brand b { color: #d9ab45; font-weight: 800; }
.topbar .spacer { flex: 1; }
.topbar select { min-width: 0; flex: 0 1 auto; background: #1d1d21; border: 1px solid #333; color: #fff; border-radius: 10px; padding: 7px 10px; max-width: 46vw; }
.icon-btn { background: transparent; border: 0; color: inherit; width: 40px; height: 40px; border-radius: 10px; display: inline-grid; place-items: center; }
.icon-btn:hover { background: rgba(255,255,255,.08); }
.sync { width: 10px; height: 10px; border-radius: 50%; background: #3fb47a; flex: none; }
.sync.pending, .sync.syncing { background: #e2a33b; } .sync.error, .sync.offline { background: #e05a5a; }
main { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 18px 16px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); }
.nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: flex; background: var(--surface); border-top: 1px solid var(--line); }
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.nav a svg { width: 23px; height: 23px; }
.nav a.on { color: var(--ink); }
.nav a.on svg { color: var(--accent); }
@media (min-width: 980px) {
  body { padding-left: 92px; }
  .nav { top: calc(var(--top-h) + env(safe-area-inset-top)); bottom: 0; right: auto; width: 92px; height: auto; flex-direction: column; justify-content: flex-start; padding-top: 14px; border-top: 0; border-right: 1px solid var(--line); }
  .nav a { flex: none; height: 76px; }
  .topbar { margin-left: -92px; padding-left: 26px; }
  main { padding-bottom: 32px; }
}

/* ---------- componentes ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.stack > * + * { margin-top: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-weight: 600; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.accent { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }
.btn.sm { min-height: 34px; padding: 0 11px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .45; cursor: default; }
label.f { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; letter-spacing: .02em; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%; min-height: 44px; padding: 9px 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); min-height: 36px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); }
.chip.jogo { background: var(--accent-soft); border-color: transparent; }
.tag { font-family: var(--font-c); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.empty { text-align: center; padding: 38px 16px; color: var(--muted); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }
.toast { position: fixed; z-index: 90; left: 50%; bottom: calc(var(--nav-h) + 22px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 600; box-shadow: var(--shadow); max-width: 92vw; animation: tin .2s ease; }
@keyframes tin { from { opacity: 0; transform: translate(-50%, 8px); } }
dialog { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); padding: 0; width: min(560px, 94vw); max-height: 90vh; box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0,0,0,.55); }
dialog .dh { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
dialog .db { padding: 16px 18px; overflow: auto; max-height: calc(90vh - 140px); }
dialog .df { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 9px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t th.grp { text-align: center; color: var(--ink-2); border-bottom: 2px solid var(--c); }
table.t td.n, table.t th.n { text-align: right; font-family: var(--font-c); font-size: 15.5px; font-variant-numeric: tabular-nums; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: var(--surface-2); }
.scroll-x { overflow-x: auto; }

/* ---------- atletas ---------- */
.ava { width: 42px; height: 42px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; overflow: hidden; flex: none; font-family: var(--font-c); font-weight: 800; color: var(--ink-2); }
.ava img { width: 100%; height: 100%; object-fit: cover; }
.ath-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.ath-row:last-child { border-bottom: 0; }
.ath-row .nm { flex: 1; min-width: 0; }
.ath-row .nm b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jersey { font-family: var(--font-c); font-weight: 800; font-size: 22px; width: 42px; text-align: center; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 50% -10%, #2a2a30 0%, #0b0b0d 60%); color: #f2f1ec; }
.login .box { width: min(400px, 100%); text-align: center; }
.login .box img { width: 128px; height: 128px; margin-bottom: 12px; filter: drop-shadow(0 8px 30px rgba(0,0,0,.6)); }
.login h1 { font-size: 40px; letter-spacing: .05em; } .login h1 b { color: #d9ab45; }
.login form { margin-top: 22px; text-align: left; background: #151518; border: 1px solid #2b2b30; border-radius: 18px; padding: 18px; color: #f2f1ec; }
.login input { background: #1d1d21; border-color: #2b2b30; color: #f2f1ec; }
.login label.f { color: #bdbcb5; }
.login .btn.accent { width: 100%; margin-top: 8px; background: #d9ab45; border-color: #d9ab45; color: #0d0d0f; }
.login .alt { margin-top: 12px; display: flex; justify-content: space-between; font-size: 13px; }
.login .alt a { color: #bdbcb5; }
.demo-banner { background: var(--accent-soft); color: var(--ink); border: 1px solid var(--accent); border-radius: 12px; padding: 10px 14px; font-size: 13.5px; margin-bottom: 14px; }

/* ---------- campo ---------- */
svg.court { display: block; width: 100%; height: auto; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.c-free { fill: var(--court-free); }
.c-floor { fill: var(--court-floor); } .c-floor-front { fill: var(--court-front); }
.c-zone line { stroke: var(--court-zone); stroke-width: .5; stroke-dasharray: 2 2; }
.c-line rect, .c-line line { stroke: var(--court-line); stroke-width: .9; fill: none; }
.c-net { stroke: var(--court-net); stroke-width: 1.8; stroke-linecap: round; }
.c-post { fill: var(--court-net); }
.c-zlab { font-family: var(--font-c); font-size: 9px; font-weight: 700; fill: var(--court-zone); text-anchor: middle; }
.c-side { font-family: var(--font-c); font-size: 7.5px; font-weight: 700; letter-spacing: .12em; fill: var(--muted); text-anchor: middle; text-transform: uppercase; }
.c-heat { stroke: none; }
.c-heat-lab { font-family: var(--font-c); font-size: 9px; font-weight: 800; text-anchor: middle; fill: #0d0d0f; }
.c-heat-lab.inv { fill: #ffffff; }
.c-arrow { stroke-linecap: round; opacity: .75; }
.c-dot { stroke: var(--court-floor); stroke-width: .6; }
.c-tap { fill: var(--accent); stroke: var(--surface); stroke-width: .8; }
.c-tap-line { stroke: var(--accent); stroke-width: 1.4; stroke-dasharray: 3 2; marker-end: url(#ah); }
.c-hint { fill: var(--accent); opacity: .12; }
.c-hint-stroke { fill: none; stroke: var(--accent); stroke-width: .8; stroke-dasharray: 2 2; opacity: .8; }

/* ---------- registo (scout) ---------- */
body.scouting { padding-left: 0; }
body.scouting .nav, body.scouting .topbar { display: none; }
body.scouting main { max-width: none; padding: 0; }
.scout { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100vh; height: 100dvh; }
.sc-top { display: flex; align-items: center; gap: 10px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; background: var(--brand); color: #fff; }
.sc-top .ttl { flex: 1; min-width: 0; }
.sc-top .ttl b { display: block; font-family: var(--font-c); font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-top .ttl span { font-size: 12px; color: #bdbcb5; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score { display: flex; align-items: center; gap: 6px; font-family: var(--font-c); }
.score .pts { font-size: 30px; font-weight: 800; min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; }
.score .pts.a { color: #d9ab45; }
.score .set { font-size: 12px; color: #bdbcb5; text-align: center; line-height: 1.1; }
.score .sets { font-size: 15px; color: #fff; font-weight: 700; }
.sc-body { display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; min-height: 0; }
.sc-panel { min-height: 0; min-width: 0; }
.scout > * { min-width: 0; }
body.scouting { overflow: hidden; }
.skills button { min-width: 54px; }
.sc-court { position: relative; display: flex; align-items: center; justify-content: center; padding: 6px; min-height: 0; background: var(--court-free); }
.sc-court svg.court { max-height: 100%; width: auto; height: 100%; max-width: 100%; }
.sc-panel { background: var(--surface); border-top: 1px solid var(--line); overflow-y: auto; padding: 10px 12px calc(14px + env(safe-area-inset-bottom)); }
.prompt { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); background: var(--ink); color: var(--bg); font-weight: 700; font-size: 13.5px; padding: 6px 12px; border-radius: 999px; pointer-events: none; white-space: nowrap; box-shadow: var(--shadow); }
.prompt.hidden { display: none; }
.skills { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.skills button { flex: 1; min-width: 64px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 8px 4px; font-family: var(--font-c); font-weight: 800; font-size: 16px; letter-spacing: .03em; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.skills button small { font-family: var(--font); font-weight: 600; font-size: 10.5px; color: var(--muted); }
.skills button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.skills button.on small { color: var(--bg); opacity: .7; }
.skills button.sug:not(.on) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.sidetog { display: flex; gap: 6px; margin: 8px 0; }
.sidetog button { flex: 1; min-height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 700; font-size: 13px; }
.sidetog button.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; margin: 8px 0; }
.roster button { position: relative; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 5px 2px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 64px; }
.picked { display: flex; align-items: center; gap: 10px; margin: 8px 0; padding: 6px 8px; border-radius: 12px; background: var(--ink); color: var(--bg); }
.picked .no { font-family: var(--font-c); font-weight: 800; font-size: 22px; }
.picked b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picked .ava { width: 34px; height: 34px; }
.picked .btn { background: transparent; color: var(--bg); border-color: rgba(127,127,127,.5); }
.roster button { min-height: 52px; justify-content: center; }
.roster button .ava { width: 34px; height: 34px; font-size: 15px; }
.roster button .no { font-family: var(--font-c); font-weight: 800; font-size: 17px; line-height: 1; }
.roster button .nm { font-size: 10px; color: var(--muted); max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 3px; }
.roster button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.roster button.on .nm { color: var(--bg); opacity: .75; }
.roster button.sug:not(.on) { border-color: var(--accent); }
.roster button.adv { border-style: dashed; }
.step-h { font-family: var(--font-c); font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 10px 0 6px; display: flex; justify-content: space-between; align-items: center; }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.opts button { min-height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 600; font-size: 13px; padding: 4px 8px; }
.opts button.on { background: var(--ink); color: var(--bg); }
.qbtns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.qbtns button { min-height: 58px; border-radius: 12px; border: 0; color: #fff; font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 4px; line-height: 1.1; }
.qbtns button .sym { font-family: var(--font-c); font-size: 22px; font-weight: 800; }
.qbtns button .lb { font-size: 11.5px; }
.rally { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; min-height: 30px; margin: 10px 0 6px; }
.ev { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 4px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 700; }
.ev .q { width: 18px; height: 18px; border-radius: 6px; display: grid; place-items: center; color: #fff; font-family: var(--font-c); font-size: 13px; }
.ev.b { border-style: dashed; }
.endrow { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.endrow .btn { min-height: 46px; }
.log { margin-top: 12px; font-size: 12.5px; }
.log .lr { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.log .lr .win { font-family: var(--font-c); font-weight: 800; font-size: 14px; width: 58px; }
@media (min-width: 760px) and (orientation: landscape), (min-width: 1000px) {
  .sc-body { grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); }
  .sc-panel { border-top: 0; border-left: 1px solid var(--line); }
}
@media (max-width: 759px), (orientation: portrait) and (max-width: 999px) {
  .sc-body { grid-template-rows: minmax(0, 42dvh) minmax(0, 1fr); }
}

/* ---------- painel / estatística ---------- */
.filters { position: sticky; top: calc(var(--top-h) + env(safe-area-inset-top)); z-index: 20; background: var(--bg); padding: 10px 0; margin: -10px 0 8px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters select { width: auto; min-width: 140px; min-height: 40px; padding: 6px 10px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 10px; position: relative; overflow: hidden; cursor: pointer; }
.kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.kpi.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.kpi .k-l { font-family: var(--font-c); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.kpi .k-v { font-family: var(--font-c); font-weight: 800; font-size: 38px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi .k-s { font-size: 12px; color: var(--muted); }
.kpi .k-v { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi svg.spark { width: 54px; height: 22px; flex: 0 1 54px; min-width: 30px; overflow: visible; }
.qbar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; margin-top: 8px; background: var(--surface); }
.qbar span { display: block; height: 100%; min-width: 2px; }
.qbar span:first-child { border-radius: 4px 0 0 4px; } .qbar span:last-child { border-radius: 0 4px 4px 0; }
.legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.maps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.map h4 { font-family: var(--font-c); font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 6px; }
.map svg.court { max-width: 320px; margin: 0 auto; border-radius: 10px; }
.hbars .hb { display: grid; grid-template-columns: 120px 1fr 42px; gap: 8px; align-items: center; font-size: 13px; margin: 6px 0; }
.hbars .tr { height: 12px; background: var(--surface-2); border-radius: 4px; overflow: hidden; display: flex; }
.hbars .tr span { display: block; height: 100%; }
.hbars .v { text-align: right; font-family: var(--font-c); font-weight: 700; font-size: 15px; }
.linechart { position: relative; }
.linechart svg { width: 100%; height: 240px; display: block; overflow: visible; }
.linechart .grid line { stroke: var(--line); stroke-width: 1; }
.linechart .zero { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.linechart .ax { font-size: 11px; fill: var(--muted); font-family: var(--font); }
.linechart path.ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.linechart circle.pt { stroke: var(--surface); stroke-width: 2; }
.linechart .xh { stroke: var(--muted); stroke-width: 1; }
.linechart .lab { font-size: 12px; font-weight: 700; font-family: var(--font-c); fill: var(--ink-2); }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; box-shadow: var(--shadow); z-index: 5; min-width: 140px; white-space: nowrap; }
.tip b { font-family: var(--font-c); font-size: 14px; }
.tip i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }

/* cartão da atleta */
.player { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; background: linear-gradient(135deg, #0d0d0f 0%, #26262b 100%); color: #fff; border-radius: 20px; padding: 18px; position: relative; overflow: hidden; }
.player::after { content: ''; position: absolute; right: -40px; top: -40px; width: 220px; height: 220px; background: url(../img/logo.png) center/contain no-repeat; opacity: .08; transform: rotate(0deg); }
.player .ph { width: 120px; height: 120px; border-radius: 18px; overflow: hidden; background: #26262b; display: grid; place-items: center; font-family: var(--font-c); font-size: 54px; font-weight: 800; color: #555; border: 2px solid #d9ab45; }
.player .ph img { width: 100%; height: 100%; object-fit: cover; }
.player .bign { font-family: var(--font-c); font-weight: 800; font-size: 64px; line-height: .85; color: #d9ab45; }
.player .pn { font-family: var(--font-c); font-weight: 700; font-size: 28px; line-height: 1.05; }
.player .pp { color: #bdbcb5; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.player .hl { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; position: relative; z-index: 1; }
.player .hl > span { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; }
.player .hl > span b { color: #d9ab45; font-family: var(--font-c); font-size: 14px; }
@media (max-width: 520px) { .player { grid-template-columns: 1fr; text-align: center; } .player .ph { margin: 0 auto; } .player .hl { justify-content: center; } }
.ath-pick { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; }
.ath-pick button { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 6px 10px 6px 6px; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.ath-pick button .ava { width: 32px; height: 32px; font-size: 14px; }
.ath-pick button.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 22px 0 10px; }
.sec-h h2 { display: flex; align-items: center; gap: 10px; }
.sec-h h2 i { width: 12px; height: 12px; border-radius: 4px; background: var(--c); display: inline-block; }

/* modo apresentação */
body.present .topbar, body.present .nav, body.present .filters .no-present { display: none; }
body.present { padding-left: 0; }
body.present main { max-width: 1600px; padding-top: 16px; }
@media print { .nav, .topbar, .filters { display: none !important; } body { padding: 0; } }

@media (max-width: 520px) {
  .topbar { gap: 8px; padding-left: 10px; padding-right: 6px; }
  .topbar .brand { display: none; }
  .topbar .spacer { display: none; }
  .topbar select { flex: 1 1 auto; max-width: none; }
  .kpi .k-v { font-size: 32px; }
  .kpi svg.spark { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  h1 { font-size: 26px; }
}

/* mapa de direções com filtros */
.dirbox { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 340px); gap: 18px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); align-items: start; }
.dir-f { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.dir-g { display: flex; flex-direction: column; gap: 6px; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchips button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); font-weight: 600; font-size: 13px; }
.fchips button b { color: var(--muted); font-weight: 700; }
.fchips button i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.fchips button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.fchips button.on b { color: var(--bg); opacity: .7; }
.dir-sum { font-size: 13.5px; color: var(--ink-2); }
.dir-sum b { color: var(--ink); font-size: 16px; }
.dir-map svg.court { max-width: 340px; }
@media (max-width: 700px) { .dirbox { grid-template-columns: 1fr; } }

.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 800; }
.login .row .f { margin-top: 0; }

.acc-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.acc-row select { width: auto; min-height: 38px; padding: 5px 10px; }
.acc-row select[data-ath] { flex: 1 1 100%; }
