:root {
  /* cores da marca MINE FC — definidas só aqui */
  --mine-verde: #00B140;  /* Pantone 354 C */
  --mine-preto: #101820;  /* Pantone Black 6 C */
  --mine-branco: #FFFFFF;

  --bg: #f4f6f8; --surface: var(--mine-branco); --surface-2: #eef1f4; --text: var(--mine-preto); --muted: #5d6673;
  --border: #d9dee5; --good: #1a7f37; --bad: #cf222e; --warn: #9a6700;
  --pitch: #2f7d3b; --pitch-line: rgba(255,255,255,.55);
  /* verde é área de fundo com texto preto; em fundo claro, texto e links ficam em preto */
  --accent: var(--mine-verde); --accent-text: var(--mine-preto); --link: var(--mine-preto);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--mine-preto); --surface: #182330; --surface-2: #213040; --text: #e6edf3; --muted: #8b96a3;
    --border: #2d3b4a; --good: #3fb950; --bad: #f85149; --warn: #d29922; --pitch: #22582b;
    --link: var(--mine-verde);
  }
}
:root[data-theme="dark"] {
  --bg: var(--mine-preto); --surface: #182330; --surface-2: #213040; --text: #e6edf3; --muted: #8b96a3;
  --border: #2d3b4a; --good: #3fb950; --bad: #f85149; --warn: #d29922; --pitch: #22582b;
  --link: var(--mine-verde);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--link); text-decoration: none; }
main a:not(.click):hover { text-decoration: underline; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 10px 16px;
  background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; }
.brand-logo { width: 124px; height: auto; display: block; }  /* mínimo da marca: 120 px de largura */
.auth-logo { display: flex; justify-content: center; margin: 8px 0 20px; }
.auth-logo img { width: 240px; height: auto; }
.auth-logo.boot { margin-top: 15vh; }
.loading { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 40px; }

nav { display: flex; flex-wrap: wrap; gap: 4px; }
nav a { padding: 6px 10px; border-radius: 6px; color: var(--muted); }
nav a.active, nav a:hover { background: var(--surface-2); color: var(--text); }
.status { margin-left: auto; color: var(--muted); font-size: 13px; }
main { max-width: 1100px; margin: 0 auto; padding: 20px 16px 60px; }
h1 { font-size: 22px; margin: 0 0 16px; } h2 { font-size: 17px; margin: 0 0 12px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.spread { justify-content: space-between; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.good { color: var(--good); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.kpi { background: var(--surface-2); border-radius: 8px; padding: 10px; }
.kpi b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
button, .btn { font: inherit; padding: 7px 12px; border-radius: 7px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); cursor: pointer; }
button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
button.danger { color: var(--bad); }
button:disabled { opacity: .5; cursor: default; }
button.mini { padding: 2px 8px; font-size: 13px; }
input, select { font: inherit; padding: 7px 9px; border-radius: 7px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); max-width: 100%; }
input[type=color] { padding: 2px; width: 44px; height: 34px; }
label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
form.stack { display: grid; gap: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--surface-2); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; background: var(--surface-2); }
.pill.V { background: var(--good); color: #fff; } .pill.E { background: var(--warn); color: #fff; }
.pill.D { background: var(--bad); color: #fff; }
.div-platina { color: #0e7490; } .div-ouro { color: #a16207; } .div-prata { color: #475569; } .div-bronze { color: #9a3412; }
@media (prefers-color-scheme: dark) {
  .div-platina { color: #7dd3fc; } .div-ouro { color: #eab308; } .div-prata { color: #94a3b8; } .div-bronze { color: #fb923c; }
}
.bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.attr { display: grid; grid-template-columns: 110px 1fr 36px auto; align-items: center; gap: 8px; margin: 6px 0; }
.score { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; }
.crest-row { display: flex; align-items: center; gap: 14px; }
.pitch { position: relative; background: var(--pitch); border-radius: 10px; aspect-ratio: 3 / 4;
  max-width: 420px; width: 100%; margin: 0 auto; overflow: hidden; }
.pitch::before { content: ""; position: absolute; inset: 8px; border: 2px solid var(--pitch-line); border-radius: 4px; }
.pitch::after { content: ""; position: absolute; left: 8px; right: 8px; top: 50%; border-top: 2px solid var(--pitch-line); }
.spot { position: absolute; transform: translate(-50%, -50%); text-align: center; color: #fff; font-size: 11px;
  width: 84px; z-index: 1; text-shadow: 0 1px 2px #000; }
.spot .shirt { width: 30px; height: 30px; margin: 0 auto 2px; }
.events { list-style: none; padding: 0; margin: 0; }
.events li { padding: 4px 0; border-bottom: 1px dashed var(--border); }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: grid; place-items: center; z-index: 20; padding: 16px; }
.modal-box { background: var(--surface); border-radius: 12px; padding: 20px; width: min(720px, 100%);
  max-height: 90vh; overflow: auto; border: 1px solid var(--border); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text);
  color: var(--bg); padding: 10px 16px; border-radius: 8px; z-index: 30; max-width: calc(100% - 32px); }
.toast.err { background: var(--bad); color: #fff; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs button.active { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.center-narrow { max-width: 420px; margin: 40px auto; }
@media (max-width: 600px) {
  .attr { grid-template-columns: 90px 1fr 30px auto; }
  .status { width: 100%; margin-left: 0; }
}

/* camisa 10: a estrela do time */
.warn-pill { background: var(--warn); color: #fff; }
.ten { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 99px; font-size: 11px; font-weight: 700;
  background: linear-gradient(135deg, #f5d36b, #c8961e); color: #3b2a00; vertical-align: middle; }
tr.row-ten td { background: color-mix(in srgb, #f5d36b 12%, transparent); }
.shirt-ten svg { filter: drop-shadow(0 0 3px #f5c542) drop-shadow(0 0 1px #f5c542); }

/* amigos */
.tag { font-family: ui-monospace, Menlo, Consolas, monospace; }
.warn-card { border-color: var(--warn); }
.friend { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 6px;
  border-bottom: 1px solid var(--border); cursor: pointer; flex-wrap: wrap; }
.friend:last-child { border-bottom: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.on { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 25%, transparent); }
.dot.off { background: var(--muted); opacity: .5; }
.fcard { display: none; position: absolute; left: 30px; top: 100%; z-index: 4; margin-top: -4px; min-width: 260px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.friend:hover .fcard, .friend:focus-within .fcard, .friend.open .fcard { display: block; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--border);
  vertical-align: middle; margin-left: 3px; }
@media (max-width: 600px) { .fcard { position: static; width: 100%; margin-top: 8px; box-shadow: none; } }

/* bandeiras (imagens SVG: funcionam também no Windows) */
.flag { width: 20px; height: 15px; border-radius: 2px; vertical-align: -2px; object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0,0,0,.15); display: inline-block; }
.flag-big { width: 28px; height: 21px; }
.fp-dice { box-shadow: none; text-align: center; line-height: 21px; width: 28px; }
.flagpick { position: relative; display: inline-block; }
.fp-btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.fp-menu { position: absolute; z-index: 25; top: calc(100% + 4px); left: 0; width: min(420px, 86vw); max-height: 320px;
  overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 6px;
  box-shadow: 0 10px 28px rgba(0,0,0,.2); display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 4px; }
.fp-menu[hidden] { display: none; }
.fp-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid transparent; background: none;
  text-align: left; font-size: 13px; }
.fp-item:hover { background: var(--surface-2); }
.fp-item.active { border-color: var(--accent); background: var(--surface-2); }

/* tabelas ordenáveis */
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--text); }
th.sortable .arrow { margin-left: 4px; font-size: 10px; opacity: .45; }
th.sorted { color: var(--text); }
th.sorted .arrow { color: var(--good); }
th.sorted .arrow { opacity: 1; }

/* condição física, escalações e relatório de partida */
.bar.fit { display: inline-block; width: 60px; vertical-align: middle; }
.bar.fit i { background: #2ea043; }
.bar.fit.mid i { background: #d29922; }
.bar.fit.low i { background: #cf222e; }
.spot-out { opacity: .75; }
.spot-out .shirt { filter: grayscale(.8); }
.slot-row { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 6px; font-size: 13px; }
.slot-row select { width: 100%; min-width: 0; }
.choice { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); }
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: start; text-align: center; margin: 10px 0; }
.stats { display: grid; gap: 6px; }
.stat { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; text-align: center; font-size: 13px; }
.statbar { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; margin-top: 2px; }
.statbar i { display: block; height: 100%; background: var(--accent); }
.timeline { max-height: 360px; overflow-y: auto; }
.timeline li.side-away { padding-left: 18px; }
.timeline li.ev-gol { font-weight: 600; }
.timeline li.ev-fim_tempo, .timeline li.ev-inicio, .timeline li.ev-reinicio { color: var(--muted, #666); }
ol.lineup { margin: 6px 0; padding-left: 20px; }

/* amistosos */
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #cf222e; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; vertical-align: middle; }
.friendly-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px dashed var(--border); }

/* tendência dos indicadores e overall da escalação */
.trend { display: block; font-size: 11px; margin-top: 2px; }
.trend.up { color: #1a7f37; }
.trend.down { color: #cf222e; }
.trend.flat { color: var(--muted); }
.rating-box { margin: 6px 0 10px; }
.rating-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 6px; }
.rating-grid > div { background: var(--surface-2); border-radius: 8px; padding: 6px 8px; text-align: center; }
.rating-grid span { display: block; font-size: 11px; color: var(--muted); }
.rating-grid b { font-size: 18px; }
.rating-grid > div:first-child b { font-size: 22px; }
.trend i { font-style: normal; }

/* jogo ao vivo */
.live-tag { display: inline-block; padding: 2px 8px; border-radius: 10px; background: #cf222e; color: #fff;
  font-size: 12px; font-weight: 700; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .65; } }
.live .clock { text-align: center; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.live-progress { margin: 6px 0 4px; }
.live-feed { max-height: 260px; }
.live-feed li:first-child { background: var(--surface-2); }
.live-card { border-color: #cf222e; }
.pens { margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--surface-2); text-align: center; }
.pens h3 { margin: 0 0 6px; }
.countdown { display: inline-block; min-width: 42px; padding: 1px 6px; border-radius: 6px; background: #cf222e; color: #fff;
  font-weight: 700; font-variant-numeric: tabular-nums; }
.goal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; width: min(300px, 100%); margin: 8px auto;
  padding: 6px; border: 6px solid #fff; border-bottom: none; background: repeating-linear-gradient(45deg, #2f7d3b33 0 6px, transparent 6px 12px); }
.goal .cell { aspect-ratio: 3 / 2; border: 1px dashed #ffffff88; background: #ffffff22; border-radius: 4px; font-size: 22px; cursor: pointer; }
.goal .cell:disabled { cursor: default; }
.goal .cell:not(:disabled):hover { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.goal .cell.mine { background: color-mix(in srgb, var(--accent) 70%, transparent); }
.goal .cell.dive { background: #d2992299; }
.goal .cell.ball-in { outline: 3px solid #1a7f37; }
.goal .cell.ball-out { outline: 3px solid #cf222e; }

/* página Jogar */
nav a.nav-play { background: var(--accent); color: var(--accent-text); font-weight: 600; }
nav a.nav-play.active, nav a.nav-play:hover { background: var(--accent); color: var(--accent-text); filter: brightness(1.08); }
a.button { display: inline-block; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); }
a.button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
button.big { font-size: 17px; padding: 12px 22px; }
.play-card.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.searching { display: flex; align-items: center; gap: 12px; }
.pulse { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); animation: pulse-ring 1.4s ease-out infinite; }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
  100% { box-shadow: 0 0 0 14px transparent; } }

/* painel "Meu time" no jogo ao vivo */
.myteam { margin: 10px 0; padding: 12px; border: 2px solid var(--accent); border-radius: 10px; background: var(--surface); }
.myteam .switch { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.team-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; }
.team-cols > div { display: flex; flex-direction: column; gap: 4px; }
.team-cols > div::before { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.team-cols > div:first-child::before { content: "Em campo — toque em quem sai"; }
.team-cols > div:last-child::before { content: "Banco — toque em quem entra"; }
.pl { display: grid; grid-template-columns: 38px 1fr 54px; align-items: center; gap: 6px; text-align: left;
  padding: 7px 8px; min-height: 40px; font-size: 13px; }
.pl.in { grid-template-columns: 38px 1fr; }
.pl .slot { font-size: 11px; font-weight: 700; color: var(--muted); }
.pl .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 22%, transparent); font-weight: 600; }
.pl.in:not(:disabled) { border-color: var(--accent); }
.mini-bar { display: block; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: #2ea043; }
.mini-bar.mid i { background: #d29922; }
.mini-bar.low i { background: #cf222e; }
.pending-sub { padding: 4px 0; font-size: 13px; }
.interval-banner { margin: 6px 0; padding: 8px 10px; border-radius: 8px; background: var(--accent); color: var(--accent-text); }
@media (max-width: 560px) { .team-cols { grid-template-columns: 1fr; } }

/* instalar na tela inicial */
.install-btn { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent);
  color: var(--accent-text); font-weight: 600; font-size: 14px; cursor: pointer; }
.install-steps { display: grid; gap: 8px; padding-left: 20px; margin: 12px 0; }
.ios-share { display: inline-block; padding: 0 4px; border: 1px solid var(--border); border-radius: 4px; }
.install-btn { margin-left: auto; }
.install-btn:not([hidden]) + .status { margin-left: 12px; }
