/* ===================== tema "lima" =====================
   claro: quase branco com brilho lima, pílulas pretas, números enormes
   escuro: quase preto com verde-lima néon
   (segue o sistema; data-theme="light|dark" força um dos dois) */
:root {
  --bg: #f2f3ee; --surface: #ffffff; --surface-2: #eef0e8; --text: #111511; --muted: #6a7066; --line: #e2e5dc;
  --accent: #111511; --accent-ink: #ffffff; --hl: #b8f03b; --hl-ink: #142000;
  --brand: #111511; --brand-2: #2b322c;
  --hot: linear-gradient(135deg, #ff9a3c, #ff4d3d);
  --dc: #1d5fbf; --pos-gr: #e0a100; --pos-def: #2f6fe0; --pos-med: #1fa65a; --pos-av: #ff4d3d;
  --win: #1fa65a; --draw: #a0a69c; --loss: #ff4d3d; --radius: 22px;
  --shadow: 0 1px 2px rgba(17,21,17,.04), 0 12px 32px -18px rgba(17,21,17,.22);
  --glow: radial-gradient(60% 50% at 85% 0%, rgba(184,240,59,.35), transparent 70%);
  --hero-bg: radial-gradient(70% 90% at 90% 0%, rgba(184,240,59,.65), transparent 60%), linear-gradient(165deg, #fbfdf5, #edf3dd);
  --hero-ink: #111511; --hero-muted: #4f574d; --panel: rgba(255,255,255,.72); --panel-line: rgba(17,21,17,.06);
  --pill-bg: #111511; --pill-ink: #ffffff; --nav-bg: #111511; --nav-ink: #9aa196;
  --font-display: "Bahnschrift", "DIN Alternate", "DIN Condensed", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0c0b; --surface: #141816; --surface-2: #1c211e; --text: #f1f4ee; --muted: #8d968e; --line: #252b27;
    --accent: #b8f03b; --accent-ink: #142000; --brand: #050605; --brand-2: #1c211e;
    --shadow: 0 1px 0 rgba(255,255,255,.03), 0 14px 34px -20px rgba(0,0,0,.8);
    --glow: radial-gradient(60% 50% at 85% 0%, rgba(184,240,59,.12), transparent 70%);
    --hero-bg: radial-gradient(70% 90% at 90% 0%, rgba(184,240,59,.22), transparent 60%), linear-gradient(165deg, #171c18, #0c0f0d);
    --hero-ink: #f1f4ee; --hero-muted: #a3ab9f; --panel: rgba(255,255,255,.045); --panel-line: rgba(255,255,255,.07);
    --pill-bg: #b8f03b; --pill-ink: #142000; --nav-bg: #161a17; --nav-ink: #8d968e;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0c0b; --surface: #141816; --surface-2: #1c211e; --text: #f1f4ee; --muted: #8d968e; --line: #252b27;
  --accent: #b8f03b; --accent-ink: #142000; --brand: #050605; --brand-2: #1c211e;
  --shadow: 0 1px 0 rgba(255,255,255,.03), 0 14px 34px -20px rgba(0,0,0,.8);
  --glow: radial-gradient(60% 50% at 85% 0%, rgba(184,240,59,.12), transparent 70%);
  --hero-bg: radial-gradient(70% 90% at 90% 0%, rgba(184,240,59,.22), transparent 60%), linear-gradient(165deg, #171c18, #0c0f0d);
  --hero-ink: #f1f4ee; --hero-muted: #a3ab9f; --panel: rgba(255,255,255,.045); --panel-line: rgba(255,255,255,.07);
  --pill-bg: #b8f03b; --pill-ink: #142000; --nav-bg: #161a17; --nav-ink: #8d968e;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font-body); }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; }
h2 { font-size: 1.15rem; margin-top: 1.4rem; }
h2 small, h3 small { font-weight: 400; color: var(--muted); font-size: .8em; margin-left: .3rem; }
a { color: var(--accent); }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 700; color: var(--muted); margin: 0 0 .25rem; }

/* topo */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1120px; margin: 0 auto; display: flex; gap: .6rem; align-items: center; padding: .6rem 16px; flex-wrap: wrap; }
.logo { font-weight: 600; color: var(--text); text-decoration: none; font-size: 1.05rem; margin-right: auto; white-space: nowrap; }
.logo b { color: var(--accent); }
.tabs { max-width: 1120px; margin: 0 auto; display: flex; gap: .25rem; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabs button { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 600; padding: .55rem .75rem; border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
main { max-width: 1120px; margin: 0 auto; padding: 1rem 16px 3rem; }
.rodape { text-align: center; color: var(--muted); font-size: .8rem; padding: 1.5rem 16px 2.5rem; }

/* controlos */
.input { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .5rem .65rem; min-width: 0; }
.btn { font: inherit; font-weight: 600; border: 1px solid transparent; background: var(--accent); color: var(--accent-ink); border-radius: 10px; padding: .55rem .95rem; cursor: pointer; }
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.danger { color: var(--loss); }
.btn.sm { padding: .35rem .6rem; font-size: .82rem; }
.btn.full { width: 100%; margin-top: .75rem; }
.btn.sim { background: var(--surface-2); color: var(--text); border-color: var(--line); }

/* layout */
.grid-2 { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1.3fr 1fr; } .grid-2.wide-left { grid-template-columns: 1.5fr 1fr; } }
.narrow { max-width: 640px; margin: 0 auto; }

/* hero */
.hero { display: grid; gap: 1rem; grid-template-columns: 1fr; background: linear-gradient(135deg, var(--dc), color-mix(in srgb, var(--dc) 55%, #000)); color: #fff; border-radius: var(--radius); padding: 1.25rem; }
.hero .eyebrow { color: rgba(255,255,255,.75); }
.hero h1 { font-size: 1.7rem; }
.hero p { margin: .2rem 0; }
.hero-card { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 12px; padding: 1rem; }
.hero-card .btn { background: #fff; color: #111; margin-top: .6rem; }
.hero-card .big { font-size: 2rem; font-weight: 700; margin: 0; }
.hero-card .big small { font-size: .9rem; font-weight: 400; }
@media (min-width: 760px) { .hero { grid-template-columns: 1.5fr 1fr; align-items: center; padding: 1.75rem; } }

/* notícias */
.news { display: grid; gap: .75rem; }
.news-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; box-shadow: var(--shadow); }
.news-item[data-action] { cursor: pointer; }
.news-item[data-action]:hover { border-color: var(--accent); }
.news-item h3 { font-size: 1.02rem; margin: .25rem 0; }
.news-item p { margin: 0; color: var(--muted); font-size: .9rem; }
.news-item .meta { font-size: .78rem; }
.tag { display: inline-block; font-size: .7rem; font-weight: 700; padding: .1rem .45rem; border-radius: 99px; background: var(--surface-2); color: var(--text); text-transform: uppercase; letter-spacing: .04em; }
.tag-resultado { background: color-mix(in srgb, var(--loss) 18%, transparent); }
.tag-destaque { background: color-mix(in srgb, var(--pos-gr) 25%, transparent); }
.tag-fantasy { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.tag-classificação { background: color-mix(in srgb, var(--pos-def) 20%, transparent); }

/* jogos */
.matches { display: grid; gap: .5rem; }
.match { display: grid; grid-template-columns: 1fr auto 1fr; gap: .5rem; align-items: center; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .65rem .75rem; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.match:hover:not(:disabled) { border-color: var(--accent); }
.match:disabled { cursor: default; opacity: 1; }
.match .t { display: flex; align-items: center; gap: .45rem; font-weight: 600; font-size: .9rem; min-width: 0; }
.match .home { justify-content: flex-end; text-align: right; }
.score { display: flex; gap: .35rem; align-items: center; background: var(--surface-2); padding: .25rem .6rem; border-radius: 8px; font-size: 1.05rem; min-width: 64px; justify-content: center; font-variant-numeric: tabular-nums; }
.score.por-jogar { font-size: .85rem; color: var(--muted); }
.crest { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50% 50% 45% 45%; background: linear-gradient(135deg, var(--c1) 50%, var(--c2) 50%); color: #fff; font-size: .58rem; font-weight: 800; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.jornada-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; text-align: center; }
.jornada-nav h2 { margin: 0; }
.jornada-nav p { margin: 0; }
.chips { display: flex; gap: .3rem; overflow-x: auto; padding: .75rem 0; scrollbar-width: thin; }
.chip { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-size: .8rem; cursor: pointer; }
.chip.done { color: var(--text); }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* tabelas */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.tabela { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
.tabela th, .tabela td { padding: .5rem .4rem; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tabela th { font-size: .72rem; color: var(--muted); text-transform: uppercase; }
.tabela .l { text-align: left; }
.tabela tr:last-child td { border-bottom: 0; }
.tabela .clube { display: flex; align-items: center; gap: .45rem; }
.tabela tr.sobe td:first-child { box-shadow: inset 3px 0 var(--win); }
.tabela tr.desce td:first-child { box-shadow: inset 3px 0 var(--loss); }
.tabela tr.eu { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.forma i { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; color: #fff; font-style: normal; font-size: .65rem; font-weight: 700; margin-right: 2px; }
.f-V { background: var(--win); } .f-E { background: var(--draw); } .f-D { background: var(--loss); }
.legenda { font-size: .8rem; color: var(--muted); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; }
.dot.sobe { background: var(--win); } .dot.desce { background: var(--loss); }
@media (max-width: 560px) { .hide-sm { display: none; } }

.ranking { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.ranking li, .picker li { display: flex; align-items: center; gap: .7rem; padding: .55rem .8rem; border-bottom: 1px solid var(--line); }
.ranking li:last-child, .picker li:last-child { border-bottom: 0; }
.ranking li div, .picker li div { flex: 1; min-width: 0; }
.ranking small, .picker small { display: block; color: var(--muted); font-size: .78rem; }
.ranking .num { font-size: 1.2rem; font-weight: 700; text-align: right; }
.ranking .num small { font-size: .65rem; font-weight: 400; }

/* camisola */
.shirt { flex: none; position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; color: #fff; font-weight: 800; font-size: .75rem; text-shadow: 0 1px 2px rgba(0,0,0,.7);
  background: linear-gradient(90deg, var(--c1) 0 33%, var(--c2) 33% 66%, var(--c1) 66%);
  clip-path: polygon(30% 0, 70% 0, 100% 18%, 88% 40%, 80% 34%, 80% 100%, 20% 100%, 20% 34%, 12% 40%, 0 18%); }

/* fantasy */
.fantasy-top { display: flex; gap: .5rem; margin-top: 1rem; }
.fantasy-top #nomeEquipa { flex: 1; }
.stats-bar, .score-card { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .75rem 0; }
.stats-bar div, .score-card div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .5rem .7rem; }
.stats-bar small, .score-card small { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; }
.stats-bar b, .score-card b { font-size: 1.1rem; }
.score-card b { font-size: 1.5rem; }
.neg { color: var(--loss); }
.pitch { position: relative; display: flex; flex-direction: column; justify-content: space-around; gap: .6rem; padding: 1.2rem .4rem; border-radius: var(--radius); min-height: 440px;
  background: repeating-linear-gradient(180deg, #2f8f4e 0 44px, #2a8447 44px 88px); border: 3px solid #e9f3ec33; overflow: hidden; }
.pitch::before { content: ""; position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; border: 2px solid #ffffff40; border-radius: 50%; transform: translate(-50%, -50%); }
.pitch::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px solid #ffffff40; }
.linha { position: relative; z-index: 1; display: flex; justify-content: space-evenly; gap: .25rem; }
.slot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 74px; background: none; border: 0; color: #fff; font: inherit; cursor: pointer; padding: 0; }
.slot .shirt { width: 42px; height: 42px; font-size: .85rem; }
.slot .nome { background: #0b1f14e0; font-size: .72rem; font-weight: 700; padding: 1px 6px; border-radius: 4px 4px 0 0; max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot .info { background: #ffffffe8; color: #14201a; font-size: .65rem; padding: 1px 5px; border-radius: 0 0 4px 4px; white-space: nowrap; }
.slot .cap { position: absolute; top: -4px; right: 12px; background: #ffd23f; color: #111; width: 18px; height: 18px; border-radius: 50%; font-size: .65rem; font-weight: 800; display: grid; place-items: center; }
.slot.vazio .plus { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 2px dashed #ffffffb0; font-size: 1.4rem; }
.slot.vazio small { font-size: .7rem; font-weight: 700; opacity: .9; }
.slot:hover .shirt, .slot.vazio:hover .plus { transform: scale(1.07); }
.acoes { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.erros { color: var(--loss); font-size: .85rem; margin: .6rem 0 0; padding-left: 1.1rem; }
.aviso { background: color-mix(in srgb, var(--pos-gr) 18%, var(--surface)); border-radius: 10px; padding: .6rem .8rem; font-size: .88rem; }
.breakdown { list-style: none; padding: 0; margin: 0 0 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.breakdown li { display: flex; align-items: center; gap: .6rem; padding: .4rem .7rem; border-bottom: 1px solid var(--line); font-size: .88rem; }
.breakdown li:last-child { border-bottom: 0; }
.breakdown li span:nth-child(2) { flex: 1; }
.breakdown small { display: block; color: var(--muted); font-size: .75rem; }
.pos { flex: none; display: inline-block; width: 34px; text-align: center; font-size: .65rem; font-weight: 800; color: #fff; border-radius: 4px; padding: 1px 0; margin-right: .35rem; }
.pos-GR { background: var(--pos-gr); } .pos-DEF { background: var(--pos-def); } .pos-MED { background: var(--pos-med); } .pos-AV { background: var(--pos-av); }
.regras { width: 100%; border-collapse: collapse; font-size: .85rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.regras td { padding: .38rem .7rem; border-bottom: 1px solid var(--line); }
.regras td:last-child { text-align: right; font-weight: 700; white-space: nowrap; }

/* modal */
dialog { border: 0; border-radius: 16px; padding: 1.25rem; width: min(560px, calc(100vw - 32px)); max-height: 86vh; background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(0,0,0,.5); }
.fechar { position: absolute; top: .5rem; right: .6rem; background: none; border: 0; font-size: 1.6rem; color: var(--muted); cursor: pointer; line-height: 1; }
.placar-grande { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; text-align: center; gap: .5rem; margin: .75rem 0 1rem; }
.placar-grande div { display: flex; flex-direction: column; align-items: center; gap: .35rem; font-size: .9rem; }
.placar-grande .crest { width: 48px; height: 48px; font-size: .85rem; }
.placar-grande > span { font-size: 2.2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.eventos { list-style: none; padding: 0; margin: 0 0 1rem; }
.eventos li { display: flex; gap: .6rem; padding: .35rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.eventos li.ev-a { flex-direction: row-reverse; text-align: right; }
.eventos .min { font-weight: 700; color: var(--muted); width: 32px; flex: none; }
.onzes { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.onzes ul { list-style: none; padding: 0; margin: 0; font-size: .82rem; }
.onzes li { padding: .2rem 0; }
.filtros { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin-bottom: .6rem; }
.filtros #pf-q { grid-column: 1 / -1; }
.picker { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 12px; }
.picker .preco { font-weight: 700; font-variant-numeric: tabular-nums; }
.jogador-head { display: flex; gap: .8rem; align-items: center; margin-bottom: .8rem; }
.jogador-head .shirt { width: 52px; height: 52px; font-size: 1rem; }
.jogador-head h3 { margin: 0; }
.jogador-head p { margin: 0; font-size: .85rem; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 64px; padding: 2px; background: var(--surface-2); border-radius: 8px; }
.spark span { flex: 1; background: var(--accent); border-radius: 2px 2px 0 0; min-width: 4px; }
.spark span.nj { background: var(--line); }

#toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 120px); background: var(--text); color: var(--bg); padding: .65rem 1rem; border-radius: 10px; font-size: .9rem; transition: transform .25s; z-index: 50; max-width: calc(100vw - 32px); }
#toast.show { transform: translate(-50%, 0); }

@media (max-width: 560px) {
  .topbar-in { gap: .45rem; }
  #distrito { order: 3; flex: 1; }
  .btn.sim { order: 4; font-size: .8rem; padding: .5rem .6rem; }
  .match .t { font-size: .8rem; }
  .match .crest { display: none; }
  .pitch { min-height: 400px; }
  .slot { width: 62px; } .slot .nome { max-width: 62px; }
}

/* ===================== painel de administração ===================== */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .6rem; }
.card hr { border: 0; border-top: 1px solid var(--line); margin: 1.2rem 0; }
.campo { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .7rem; font-size: .85rem; font-weight: 600; }
.campo .input { font-weight: 400; }
textarea.input { resize: vertical; }
.login { max-width: 420px; margin: 2rem auto; }
.login h1 { font-size: 1.4rem; }
.ok { color: var(--win); font-weight: 600; margin: 0; }
.avisos { margin: 0; padding-left: 1.1rem; color: color-mix(in srgb, var(--pos-gr) 70%, var(--text)); font-size: .88rem; }
.avisos li { margin: .15rem 0; }
.chip.parcial { border-color: var(--pos-gr); color: var(--text); box-shadow: inset 0 -3px 0 var(--pos-gr); }
.admin .chip.done:not(.on) { box-shadow: inset 0 -3px 0 var(--win); }
.dot.completa { background: var(--win); } .dot.parcial { background: var(--pos-gr); }

.admin-lista { display: grid; gap: .5rem; margin-top: .5rem; }
.admin-jogo { display: grid; grid-template-columns: 1fr auto; gap: .35rem .75rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .8rem; }
.aj-equipas { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; font-weight: 600; font-size: .92rem; }
.aj-equipas > span:not(.aj-score) { display: inline-flex; align-items: center; gap: .4rem; }
.aj-score { background: var(--surface-2); border-radius: 8px; padding: .15rem .55rem; font-variant-numeric: tabular-nums; }
.aj-score.vazio { color: var(--muted); }
.aj-meta { grid-column: 1; font-size: .78rem; color: var(--muted); display: flex; gap: .5rem; align-items: center; }
.admin-jogo .btn { grid-column: 2; grid-row: 1 / span 2; }

.ed-topo { margin-top: .75rem; }
.ed-topo .placar-grande { margin: .25rem 0 .75rem; }
.ed-data { display: flex; gap: .5rem; align-items: flex-end; flex-wrap: wrap; }
.ed-data .campo { margin: 0; }
.ed-grid { align-items: start; }
.ed-row { display: grid; grid-template-columns: 64px auto 1fr 1fr auto; gap: .4rem; align-items: center; margin-bottom: .45rem; }
.ed-row .input { width: 100%; }
.ed-row .ed-team .crest { width: 26px; height: 26px; }
.card .ed-row:has(.tipo) { grid-template-columns: 64px 1fr 130px auto; }
.input.min { width: 64px; text-align: center; }
@media (max-width: 640px) {
  .ed-row { grid-template-columns: 64px auto 1fr auto; }
  .ed-row > select:nth-of-type(2) { grid-column: 2 / 4; }
  .card .ed-row:has(.tipo) { grid-template-columns: 64px 1fr auto; }
  .card .ed-row:has(.tipo) .tipo { grid-column: 1 / 3; }
}
.part-grid { display: grid; gap: 1rem; }
.part-head { display: flex; align-items: center; gap: .45rem; margin-bottom: .35rem; }
.part-acoes { margin-bottom: .4rem; }
.part-row { display: grid; grid-template-columns: auto 1fr 112px 64px; gap: .35rem; align-items: center; padding: .2rem 0; border-bottom: 1px solid var(--line); font-size: .86rem; }
.part-row .input { padding: .35rem .4rem; font-size: .85rem; }
.part-row .pos { margin: 0; }
.part-row .pn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inativo { opacity: .55; }

.clubes-layout { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .clubes-layout { grid-template-columns: 240px 1fr; } }
.clubes-lista { display: flex; gap: .35rem; overflow-x: auto; padding-bottom: .25rem; }
@media (min-width: 900px) { .clubes-lista { flex-direction: column; overflow: visible; } }
.clube-btn { display: flex; align-items: center; gap: .5rem; flex: none; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .45rem .6rem; font: inherit; font-size: .88rem; color: var(--text); cursor: pointer; text-align: left; }
.clube-btn.on { border-color: var(--accent); box-shadow: inset 3px 0 var(--accent); font-weight: 600; }
.form-grid { display: grid; gap: 0 .75rem; grid-template-columns: repeat(2, 1fr); }
.form-grid .larga { grid-column: 1 / -1; }
@media (min-width: 700px) { .form-grid { grid-template-columns: 2fr 1fr 1fr; } }
.input.cor { padding: .15rem; height: 40px; width: 100%; }
.plantel td { padding: .3rem .25rem; }
.plantel .input { width: 100%; padding: .35rem .45rem; font-size: .85rem; }
.plantel .input.num { width: 70px; text-align: center; }
.plantel tfoot td { border-top: 2px solid var(--line); }
.nowrap { white-space: nowrap; }
.inativos { margin-top: .75rem; font-size: .88rem; }
.inativos summary { cursor: pointer; color: var(--muted); margin-bottom: .5rem; }
code { background: var(--surface-2); padding: .05rem .35rem; border-radius: 4px; font-size: .9em; }

/* ===================== contas e ligas ===================== */
.conta { position: relative; }
.conta-btn { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .7rem .35rem .35rem; }
.avatar { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: .8rem; font-weight: 800; }
.conta-nome { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-conta { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 210px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .7rem; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.menu-conta p { margin: 0 0 .5rem; overflow-wrap: anywhere; }
.auth-tabs { display: flex; gap: .25rem; margin: 0 2rem 1rem 0; border-bottom: 1px solid var(--line); }
.auth-tabs button { background: none; border: 0; font: inherit; font-weight: 600; color: var(--muted); padding: .5rem .8rem; border-bottom: 3px solid transparent; cursor: pointer; }
.auth-tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.centro { text-align: center; justify-content: center; }
.ligas-chips { gap: .4rem; padding-top: 1rem; }
.liga-chip { flex: none; font: inherit; font-size: .85rem; font-weight: 600; padding: .4rem .8rem; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; white-space: nowrap; }
.liga-chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.convite { display: flex; align-items: center; justify-content: space-between; gap: .75rem; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border: 1px dashed var(--accent); border-radius: 12px; padding: .6rem .8rem; margin-bottom: .75rem; }
.convite small { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; }
.convite b { font-size: 1.3rem; letter-spacing: .15em; font-family: ui-monospace, Consolas, monospace; }
.codigo-input { text-transform: uppercase; letter-spacing: .12em; font-family: ui-monospace, Consolas, monospace; }
.treinador { display: block; color: var(--muted); font-size: .75rem; }
a.danger { color: var(--loss); }
@media (max-width: 560px) { .conta-nome { display: none; } .conta-btn { padding: .35rem; } .conta { order: 2; } }

/* ===================== banco de suplentes ===================== */
.banco { margin-top: .6rem; padding: .7rem .4rem .8rem; border-radius: var(--radius); background: color-mix(in srgb, #2f8f4e 22%, var(--surface)); border: 1px dashed color-mix(in srgb, #2f8f4e 60%, var(--line)); }
.banco .eyebrow { padding: 0 .5rem; }
.banco .slot { color: var(--text); }
.banco .slot.vazio .plus { border-color: var(--muted); }
.slot .ordem { font-size: .62rem; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.pitch .slot .ordem { color: #fff; }
.slot .cap.vice { background: #cfd8dc; }
.trocas { display: flex; flex-wrap: wrap; gap: .4rem; }
.trocas .btn { display: inline-flex; align-items: center; gap: .2rem; }
.breakdown li.fora { opacity: .55; }
.breakdown li.sep { background: var(--surface-2); font-size: .72rem; font-weight: 700; text-transform: uppercase; color: var(--muted); padding: .25rem .7rem; }
.breakdown em { font-style: normal; font-weight: 600; }
.sub-in { color: var(--win); } .sub-out { color: var(--loss); }
.transf { margin: 0 0 .6rem; padding: .5rem .75rem; border-radius: 10px; font-size: .86rem; background: var(--surface); border: 1px solid var(--line); }
.transf.ok { border-color: color-mix(in srgb, var(--win) 50%, var(--line)); }
.transf.custo { border-color: var(--loss); background: color-mix(in srgb, var(--loss) 10%, var(--surface)); }

/* ===================== importação ===================== */
.mono { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
.check { display: flex; gap: .5rem; align-items: flex-start; font-size: .85rem; margin: .4rem 0 .9rem; }
.check input { margin-top: .2rem; }
.table-wrap.prev { max-height: 240px; overflow: auto; margin-bottom: .6rem; }
.tabela tr.erro td { color: var(--loss); }
#prev-clubes { margin: -.3rem 0 .6rem; line-height: 1.9; }

/* ===================== prazo de fecho ===================== */
.prazo { margin: .75rem 0 .6rem; padding: .5rem .75rem; border-radius: 10px; font-size: .86rem; background: var(--surface); border: 1px solid var(--line); }
.prazo.urgente { border-color: var(--pos-gr); background: color-mix(in srgb, var(--pos-gr) 14%, var(--surface)); }
.prazo.fechado { border-color: var(--loss); }
.hero .prazo { background: rgba(0,0,0,.18); border-color: rgba(255,255,255,.25); color: #fff; margin: .5rem 0 0; }
.hero .prazo.urgente { background: rgba(212,160,23,.35); }

/* ===================== preços variáveis ===================== */
.sobe-p, .desce-p { font-size: .72em; font-weight: 800; margin-left: .2rem; }
.sobe-p { color: var(--win); } .desce-p { color: var(--loss); }
.slot .info .sobe-p { color: #0b7a3e; } .slot .info .desce-p { color: #b02a1e; }
.preco-info { margin: 0 0 .8rem; font-size: .9rem; }

/* ===================== chips ===================== */
.chips-card { margin-top: .8rem; }
.chips-lista { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.chip-btn { display: flex; flex-direction: column; align-items: center; gap: .15rem; text-align: center; padding: .6rem .4rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.chip-btn .ic { font-size: 1.4rem; }
.chip-btn b { font-size: .82rem; }
.chip-btn small { font-size: .7rem; color: var(--muted); line-height: 1.2; }
.chip-btn.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface)); box-shadow: inset 0 0 0 1px var(--accent); }
.chip-btn:disabled { opacity: .5; cursor: not-allowed; }
.chip-usado { margin: -.2rem 0 .5rem; font-size: .85rem; font-weight: 600; color: var(--accent); }
.chips-card .aviso { margin-top: .5rem; }

/* ===================== edição de jogos e calendário ===================== */
.aj-botoes { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; gap: .3rem; align-items: stretch; }
.admin-jogo .aj-botoes .btn { grid-column: auto; grid-row: auto; }
.admin-jogo.editar-jogo { display: block; border-color: var(--accent); }
.admin-jogo.editar-jogo .form-grid { grid-template-columns: 1fr 1fr; }
@media (min-width: 700px) { .admin-jogo.editar-jogo .form-grid { grid-template-columns: 1fr 1fr 1.2fr; } }

/* ===================== emblemas ===================== */
.crest.img { background: none; text-shadow: none; border-radius: 0; }
.crest.img img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.emblema-edit { display: flex; gap: .9rem; align-items: center; margin-bottom: .9rem; }
.emblema-prev .crest { width: 64px; height: 64px; font-size: 1rem; }
.emblema-edit label.btn { cursor: pointer; }
.emblema-edit p { margin: .4rem 0 0; }

/* =====================================================================
   VISUAL 3.0 — tema "lima" (camada por cima dos estilos base)
   ===================================================================== */
body { background: var(--glow) fixed, var(--bg); }
h1, h2, h3, .eyebrow, .btn, .tabs button, .score, .num, .stats-bar b, .score-card b, .placar-grande > span, .chip, .liga-chip, .tile b {
  font-family: var(--font-display);
}
h2 { font-size: 1.45rem; font-weight: 700; text-transform: uppercase; letter-spacing: .01em; margin: 1.9rem 0 .8rem; display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
h2 small { font-family: var(--font-body); font-size: .8rem; text-transform: none; letter-spacing: 0; }
h3 { font-size: 1.08rem; }
.eyebrow { font-weight: 700; letter-spacing: .12em; font-size: .7rem; }
a { color: inherit; text-decoration-color: var(--hl); text-decoration-thickness: 2px; text-underline-offset: 3px; }
::selection { background: var(--hl); color: var(--hl-ink); }
:focus-visible { outline: 3px solid var(--hl); outline-offset: 2px; border-radius: 10px; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- cabeçalho ---------- */
.topbar { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); color: var(--text); }
.topbar-in { padding: .75rem 16px .5rem; gap: .7rem; }
.logo { display: inline-flex; align-items: center; gap: .55rem; color: var(--text); }
.logo-mark { width: 34px; height: 38px; flex: none; }
.logo-txt { display: flex; flex-direction: column; line-height: .92; font-family: var(--font-display); text-transform: uppercase; }
.logo-txt small { font-size: .62rem; letter-spacing: .22em; color: var(--muted); font-weight: 700; }
.logo-txt b { font-size: 1.4rem; letter-spacing: .01em; font-weight: 700; color: var(--text); }
.topbar .input { border-radius: 999px; padding: .5rem 1rem; background: var(--surface); }
.tabs { gap: .25rem; padding-bottom: .6rem; }
.tabs button { border: 0; border-radius: 999px; color: var(--muted); font-size: .95rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: .5rem 1rem; display: inline-flex; align-items: center; gap: .45rem; transition: background .15s, color .15s; }
.tabs button:hover { color: var(--text); background: var(--surface-2); }
.tabs button.on { background: var(--pill-bg); color: var(--pill-ink); }
.tabs .ico { width: 17px; height: 17px; }
.avatar { background: var(--hl); color: var(--hl-ink); }

/* barra de navegação flutuante no telemóvel (só na app pública) */
@media (max-width: 720px) {
  body:not(.admin) { padding-bottom: 96px; }
  body:not(.admin) .tabs {
    position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); margin: 0; padding: 7px;
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; background: var(--nav-bg); border-radius: 26px;
    box-shadow: 0 18px 40px -16px rgba(0,0,0,.6);
  }
  body:not(.admin) .tabs button { flex-direction: column; gap: 3px; font-size: .62rem; padding: .45rem 0 .35rem; color: var(--nav-ink); border-radius: 20px; background: none; }
  body:not(.admin) .tabs button.on { background: var(--hl); color: var(--hl-ink); }
  body:not(.admin) .tabs .ico { width: 22px; height: 22px; }
  body:not(.admin) #toast { bottom: 104px; }
  .logo-txt b { font-size: 1.2rem; }
}

/* ---------- botões, pílulas, cartões ---------- */
.btn { border-radius: 999px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; font-size: .88rem; padding: .7rem 1.25rem; transition: transform .12s, box-shadow .12s, filter .12s; }
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 20px -12px rgba(0,0,0,.55); }
.btn:active:not(:disabled) { transform: translateY(0) scale(.98); }
.btn.sm { padding: .42rem .9rem; font-size: .78rem; }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn.lima { background: var(--hl); color: var(--hl-ink); }
.card, .news-item, .match, .table-wrap, .ranking, .breakdown, .regras, .stats-bar div, .score-card div, .transf, .prazo, .admin-jogo, .picker, .banco { border-radius: var(--radius); }
.card, .news-item, .match, .table-wrap, .ranking, .breakdown, .stats-bar div, .score-card div { border-color: var(--line); box-shadow: var(--shadow); }
.input { border-radius: 14px; }
.tag { border-radius: 999px; letter-spacing: .06em; padding: .16rem .6rem; font-family: var(--font-display); background: var(--surface-2); color: var(--text); }
.tag-resultado { background: color-mix(in srgb, var(--loss) 16%, transparent); color: var(--loss); }
.tag-destaque { background: color-mix(in srgb, #ff9a3c 20%, transparent); color: #d26a00; }
.tag-fantasy, .tag-oficial { background: var(--hl); color: var(--hl-ink); }
.tag-classificação { background: color-mix(in srgb, var(--pos-def) 16%, transparent); color: var(--pos-def); }
.chip { font-weight: 700; border-radius: 999px; }
.chip.done { background: var(--surface-2); }
.chip.on { background: var(--pill-bg); border-color: var(--pill-bg); color: var(--pill-ink); }
.liga-chip.on { background: var(--pill-bg); border-color: var(--pill-bg); color: var(--pill-ink); }

/* ---------- destaque da página inicial ---------- */
.destaque { position: relative; overflow: hidden; display: grid; gap: .9rem; grid-template-columns: 1fr; padding: 1.3rem; border-radius: 30px; color: var(--hero-ink); background: var(--hero-bg); border: 1px solid var(--panel-line); box-shadow: var(--shadow); }
.destaque .eyebrow { color: var(--hero-muted); }
.destaque h1 { font-size: 2.5rem; line-height: .95; margin: .3rem 0 .8rem; text-transform: uppercase; letter-spacing: -.005em; }
.destaque p { margin: .25rem 0; color: var(--hero-muted); }
.destaque p b { color: var(--hero-ink); }
.progresso { height: 10px; border-radius: 99px; background: var(--panel); border: 1px solid var(--panel-line); overflow: hidden; margin: .5rem 0 .55rem; }
.progresso span { display: block; height: 100%; background: var(--hl); border-radius: inherit; }
.painel { background: var(--panel); border: 1px solid var(--panel-line); border-radius: 24px; padding: 1rem; backdrop-filter: blur(6px); }
.painel .btn { margin-top: .8rem; }
.jogo-destaque { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem; text-align: center; margin: .7rem 0 .2rem; }
.jogo-destaque .lado { display: flex; flex-direction: column; align-items: center; gap: .45rem; font-family: var(--font-display); font-size: 1.02rem; font-weight: 700; line-height: 1.1; }
.jogo-destaque .lado small { font-family: var(--font-body); font-size: .72rem; font-weight: 400; color: var(--hero-muted); }
.jogo-destaque .crest { width: 66px; height: 66px; font-size: 1rem; }
.jogo-destaque .vs { font-family: var(--font-display); color: var(--hero-muted); font-size: .85rem; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.jogo-destaque .vs b { color: var(--hero-ink); font-size: 2.1rem; line-height: 1; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .5rem; }
.tile { border-radius: 20px; padding: .8rem .85rem; display: flex; flex-direction: column; gap: .15rem; min-height: 104px; justify-content: space-between; }
.tile small { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.tile b { font-size: 2.1rem; line-height: 1; font-weight: 700; }
.tile b small { font-size: .85rem; letter-spacing: 0; text-transform: none; }
.tile span { font-size: .78rem; opacity: .85; }
.tile.quente { background: var(--hot); color: #fff; }
.tile.lima { background: var(--hl); color: var(--hl-ink); }
.tile.lima b { font-size: 1.55rem; }
.destaque h3.branco { color: var(--hero-ink); font-size: 1.5rem; text-transform: uppercase; margin: .2rem 0 .3rem; font-family: var(--font-display); }
@media (min-width: 900px) {
  .destaque { grid-template-columns: 1fr 1.2fr 1.05fr; align-items: stretch; padding: 1.6rem; }
  .destaque .liga { align-self: center; padding-right: .5rem; }
  .destaque h1 { font-size: 2.9rem; }
}

/* ---------- notícias ---------- */
.news { gap: .65rem; }
.news-destaque { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; min-height: 230px; padding: 1.3rem; border-radius: 28px; color: #fff; cursor: pointer;
  background: linear-gradient(160deg, var(--c1, #2b322c) 0%, color-mix(in srgb, var(--c1, #111511) 45%, #000) 100%); box-shadow: var(--shadow); transition: transform .15s; }
.news-destaque:hover { transform: translateY(-2px); }
.news-destaque::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 15%, rgba(0,0,0,.6)); }
.news-destaque .marca { position: absolute; right: -10px; top: -10px; width: 180px; height: 180px; opacity: .28; transform: rotate(-8deg); }
.news-destaque .marca .crest { width: 100%; height: 100%; font-size: 3rem; }
.news-destaque > *:not(.marca) { position: relative; }
.news-destaque h3 { font-family: var(--font-display); font-size: 1.75rem; line-height: 1.02; margin: .45rem 0; text-transform: uppercase; }
.news-destaque p { margin: 0; color: rgba(255,255,255,.88); }
.news-destaque .meta { color: rgba(255,255,255,.8); font-size: .8rem; margin: 0; }
.news-destaque .tag { background: var(--hl); color: var(--hl-ink); }
.news-item { border-left: 0; position: relative; padding-left: 1.2rem; transition: transform .12s; }
.news-item::before { content: ""; position: absolute; left: .55rem; top: 1rem; bottom: 1rem; width: 4px; border-radius: 4px; background: var(--line); }
.news-item.t-resultado::before { background: var(--loss); }
.news-item.t-destaque::before { background: #ff9a3c; }
.news-item.t-fantasy::before { background: var(--hl); }
.news-item.t-classificação::before { background: var(--pos-def); }
.news-item[data-action]:hover { transform: translateY(-1px); }
.news-item h3 { font-family: var(--font-display); font-size: 1.15rem; }

/* ---------- jogos: cartões com emblemas grandes e resultado enorme ---------- */
.matches { display: grid; gap: .6rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { main > .matches { grid-template-columns: repeat(2, 1fr); } }
.matches .dia, .matches > p, .matches > .btn { grid-column: 1 / -1; }
.dia { display: flex; align-items: center; gap: .6rem; margin: .9rem 0 .1rem; font-family: var(--font-display); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.dia::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.dia:first-child { margin-top: .1rem; }
.match { grid-template-columns: 1fr auto 1fr; gap: .4rem; padding: .95rem .8rem .85rem; transition: transform .12s, box-shadow .12s, border-color .12s; align-items: start; }
.match:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--hl); }
.match .t { flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; gap: .45rem; font-family: var(--font-display); font-size: .92rem; font-weight: 700; line-height: 1.1; }
.match .home, .match .away { justify-content: flex-start; text-align: center; }
.match .crest { width: 46px; height: 46px; font-size: .75rem; display: inline-grid; }
.match .nm { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.score { background: none; color: var(--text); min-width: 0; padding: .5rem .2rem 0; font-size: 2.1rem; font-weight: 700; line-height: 1; gap: .3rem; flex-direction: row; letter-spacing: 0; }
.score span { color: var(--muted); font-size: 1.4rem; }
.score.por-jogar { background: none; color: var(--text); font-size: 1.35rem; padding-top: .85rem; }
.score.por-jogar .hora { display: inline-block; background: var(--surface-2); border-radius: 999px; padding: .3rem .7rem; font-size: 1.05rem; }
@media (max-width: 560px) {
  .match .crest { width: 40px; height: 40px; }
  .match .t { font-size: .85rem; }
  .score { font-size: 1.8rem; }
}
.jornada-nav h2 { margin: 0; justify-content: center; font-size: 1.8rem; }
.jornada-nav .btn { width: 44px; height: 44px; padding: 0; font-size: 1.4rem; }

/* ---------- classificação ---------- */
.tabela thead th { background: transparent; font-family: var(--font-display); letter-spacing: .1em; padding-top: .8rem; }
.tabela tbody tr { transition: background .12s; }
.tabela tbody tr:hover { background: var(--surface-2); }
.tabela td:first-child { font-family: var(--font-display); font-weight: 700; color: var(--muted); }
.tabela tr.sobe td:first-child { color: var(--win); box-shadow: inset 4px 0 var(--win); }
.tabela tr.desce td:first-child { color: var(--loss); box-shadow: inset 4px 0 var(--loss); }
.tabela td b { font-family: var(--font-display); font-size: 1.1rem; }
.tabela .clube span { font-weight: 600; }
.tabela tr.eu { background: color-mix(in srgb, var(--hl) 22%, transparent); }
.forma i { border-radius: 50%; width: 19px; height: 19px; }
.ranking .num { font-family: var(--font-display); font-size: 1.6rem; }
.ranking li:first-child { background: color-mix(in srgb, var(--hl) 22%, transparent); }

/* ---------- fantasy ---------- */
.stats-bar b { font-size: 1.35rem; }
.score-card div:first-child { background: var(--hot); color: #fff; border: 0; }
.score-card div:first-child small { color: rgba(255,255,255,.85); }
.score-card b { font-size: 2.2rem; }
.pitch {
  border-radius: 28px; border: 0; min-height: 480px;
  background:
    linear-gradient(90deg, transparent 30%, rgba(255,255,255,.3) 30%, rgba(255,255,255,.3) calc(30% + 2px), transparent calc(30% + 2px), transparent calc(70% - 2px), rgba(255,255,255,.3) calc(70% - 2px), rgba(255,255,255,.3) 70%, transparent 70%) bottom / 100% 15% no-repeat,
    linear-gradient(rgba(255,255,255,.3), rgba(255,255,255,.3)) bottom 15% center / 40.5% 2px no-repeat,
    repeating-linear-gradient(180deg, #3d9a4f 0 9%, #368c48 9% 18%);
  box-shadow: inset 0 0 0 6px #368c48, inset 0 0 0 8px rgba(255,255,255,.35), var(--shadow);
}
.slot .shirt { width: 46px; height: 46px; filter: drop-shadow(0 3px 3px rgba(0,0,0,.35)); }
.slot .nome { background: #111511; font-family: var(--font-display); font-size: .78rem; border-radius: 8px 8px 0 0; padding: 2px 8px; }
.slot .info { background: #fff; color: #111511; font-weight: 700; border-radius: 0 0 8px 8px; }
.slot .cap { background: var(--hl); color: var(--hl-ink); box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.slot .cap.vice { background: #fff; color: #111511; }
.banco { border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.banco .slot .nome { background: #2b322c; }
.chip-btn { border-radius: 20px; transition: transform .12s, border-color .12s; }
.chip-btn:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--hl); }
.chip-btn.on { border-color: var(--hl); background: color-mix(in srgb, var(--hl) 25%, var(--surface)); box-shadow: inset 0 0 0 1px var(--hl); }
.prazo { display: flex; align-items: center; gap: .55rem; }
.prazo .ico { width: 18px; height: 18px; }
.prazo.urgente { border-color: #ff9a3c; background: color-mix(in srgb, #ff9a3c 14%, var(--surface)); }
.prazo > span { flex: 1; }
.transf.ok { border-color: color-mix(in srgb, var(--hl) 70%, var(--line)); }

/* ---------- modal ---------- */
dialog { border-radius: 28px; }
dialog::backdrop { background: rgba(5,8,6,.55); backdrop-filter: blur(3px); }
.placar-grande > span { font-size: 3rem; }
.placar-grande .crest { width: 66px; height: 66px; }
.convite { border-color: var(--hl); background: color-mix(in srgb, var(--hl) 16%, var(--surface)); }

/* ---------- vários ---------- */
.espaco-topo { margin-top: .7rem; }
.destaque .eyebrow.espaco { margin-top: .9rem; }
.folga { text-align: center; margin-top: .8rem; }
.rodape { border-top: 1px solid var(--line); margin-top: 1rem; }
.rodape .logo-mark { width: 22px; height: 24px; vertical-align: middle; margin-right: .3rem; }
/* o desfoque do cabeçalho prenderia a barra fixa lá dentro: no telemóvel usa fundo sólido */
@media (max-width: 720px) { body:not(.admin) .topbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); } }
/* equipa da casa: emblema por cima do nome, como a de fora */
.match .home { flex-direction: column-reverse; justify-content: flex-end; }

/* ===================== início: notícias em carrossel + mini-classificação ===================== */
.cab-secao { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.cab-secao h2 { margin-bottom: .6rem; }
.cab-secao .setas { display: flex; gap: .35rem; margin-top: 1.2rem; }
.cab-secao .setas .btn { width: 38px; height: 38px; padding: 0; font-size: 1.25rem; }
@media (max-width: 720px) { .cab-secao .setas { display: none; } }
.carrossel {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 300px); gap: .8rem;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; padding: .2rem 2px 1rem;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.carrossel::-webkit-scrollbar { display: none; }
@media (max-width: 720px) { .carrossel { margin: 0 -16px; padding-left: 16px; padding-right: 16px; grid-auto-columns: 80%; } }
.nc {
  position: relative; overflow: hidden; scroll-snap-align: start; display: flex; flex-direction: column; gap: .35rem;
  min-height: 220px; padding: 1.15rem 1.1rem 1rem; border-radius: 26px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow); transition: transform .15s, border-color .15s;
}
.nc[data-action] { cursor: pointer; }
.nc[data-action]:hover { transform: translateY(-3px); border-color: var(--hl); }
.nc .meta { margin: 0; font-size: .78rem; color: var(--muted); }
.nc h3 { font-family: var(--font-display); text-transform: uppercase; font-size: 1.28rem; line-height: 1.05; margin: .2rem 0 0; }
.nc .txt { margin: 0; color: var(--muted); font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nc .rodape-nc { margin: auto 0 0; padding-top: .4rem; font-family: var(--font-display); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.nc::after { content: ""; position: absolute; left: 1.1rem; right: 1.1rem; top: 0; height: 4px; border-radius: 0 0 4px 4px; background: var(--line); }
.nc.t-resultado::after { background: var(--loss); }
.nc.t-destaque::after { background: #ff9a3c; }
.nc.t-fantasy::after { background: var(--hl); }
.nc.t-classificação::after { background: var(--pos-def); }
.nc.com-cor { color: #fff; border: 0; background: linear-gradient(160deg, var(--c1) 0%, color-mix(in srgb, var(--c1) 45%, #000) 100%); }
.nc.com-cor::after { display: none; }
.nc.com-cor::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 25%, rgba(0,0,0,.5)); }
.nc.com-cor > *:not(.marca) { position: relative; }
.nc.com-cor .meta, .nc.com-cor .txt, .nc.com-cor .rodape-nc { color: rgba(255,255,255,.85); }
.nc.com-cor .tag { background: var(--hl); color: var(--hl-ink); }
.nc .marca { position: absolute; right: -14px; top: -14px; width: 130px; height: 130px; opacity: .25; transform: rotate(-8deg); }
.nc .marca .crest { width: 100%; height: 100%; font-size: 2.4rem; }
@media (min-width: 900px) { .nc.primeira h3 { font-size: 1.45rem; } }
.inicio-baixo { margin-top: .4rem; }
.tabela.mini td, .tabela.mini th { padding: .6rem .5rem; }
.tabela.mini .clube .crest { width: 26px; height: 26px; }

/* =====================================================================
   POLIMENTO — fantasy, jogos, tabela, ranking, ficha de jogo
   ===================================================================== */

/* ---------- fantasy: cabeçalho da equipa ---------- */
.equipa-cab { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .8rem 1rem; margin: 1.2rem 0 .9rem; padding: 1.1rem 1.2rem; border-radius: 26px; background: var(--hero-bg); border: 1px solid var(--panel-line); color: var(--hero-ink); box-shadow: var(--shadow); }
.equipa-nome { flex: 1 1 240px; min-width: 0; }
.equipa-nome .eyebrow { color: var(--hero-muted); margin-bottom: .1rem; }
.titulo-input { width: 100%; border: 0; border-bottom: 2px dashed transparent; background: none; color: inherit; font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; text-transform: uppercase; letter-spacing: -.005em; padding: .05rem 0; outline: none; transition: border-color .15s; }
.titulo-input::placeholder { color: var(--hero-muted); opacity: .7; }
.titulo-input:hover, .titulo-input:focus { border-bottom-color: var(--hl); }
.formacoes { display: flex; flex-wrap: wrap; gap: .3rem; padding: 4px; border-radius: 999px; background: var(--panel); border: 1px solid var(--panel-line); }
.form-btn { border: 0; background: none; color: var(--hero-muted); font-family: var(--font-display); font-weight: 700; font-size: .92rem; letter-spacing: .03em; padding: .42rem .8rem; border-radius: 999px; cursor: pointer; transition: background .15s, color .15s; }
.form-btn:hover { color: var(--hero-ink); }
.form-btn.on { background: var(--pill-bg); color: var(--pill-ink); }

/* ---------- fantasy: quadrados de estatística ---------- */
.stats-bar { gap: .6rem; margin: 0 0 .8rem; }
.stats-bar div { position: relative; overflow: hidden; padding: .75rem .9rem .85rem; }
.stats-bar b { display: block; font-size: 1.55rem; line-height: 1.1; margin-top: .1rem; }
.stats-bar b small { font-size: .9rem; color: var(--muted); font-weight: 400; display: inline; text-transform: none; letter-spacing: 0; }
.stats-bar .barra { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--surface-2); }
.stats-bar .barra span { display: block; height: 100%; background: var(--hl); transition: width .3s; }
.stats-bar .completo .barra span { background: var(--win); }
.stats-bar .saldo-tile { background: var(--hl); color: var(--hl-ink); border-color: transparent; }
.stats-bar .saldo-tile small { color: color-mix(in srgb, var(--hl-ink) 75%, transparent); }
.stats-bar .saldo-tile.negativo { background: var(--hot); color: #fff; }
.stats-bar .saldo-tile.negativo small { color: rgba(255,255,255,.85); }
.stats-bar .cv { font-size: 1.15rem; padding-top: .2rem; }
.stats-bar .cv span { color: var(--muted); }
@media (max-width: 560px) { .stats-bar b { font-size: 1.25rem; } .stats-bar .cv { font-size: .95rem; } .titulo-input { font-size: 1.5rem; } }

/* ---------- fantasy: regras recolhidas ---------- */
.regras-box { margin-top: 1.4rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.regras-box summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: .1rem; padding: 1rem 3rem 1rem 1.1rem; position: relative; }
.regras-box summary::-webkit-details-marker { display: none; }
.regras-box summary span { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; text-transform: uppercase; }
.regras-box summary small { color: var(--muted); }
.regras-box summary::after { content: "+"; position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-weight: 700; transition: transform .2s; }
.regras-box[open] summary::after { content: "–"; }
.regras-box .regras { border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.regras-box > p { padding: 0 1.1rem; }
.regras-box > p:last-child { padding-bottom: .6rem; }

/* ---------- jogos: cabeçalho da jornada ---------- */
.jornada-nav { background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: .9rem; box-shadow: var(--shadow); margin-top: 1.2rem; }
.jornada-nav .eyebrow { color: var(--muted); margin: 0; }
.jornada-nav h2 { font-size: 2rem; line-height: 1; margin: .15rem 0 .2rem; }

/* ---------- medalhas (tabela, mini-tabela, ranking) ---------- */
.lugar { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 4px; border-radius: 999px; font-family: var(--font-display); font-weight: 700; font-size: .9rem; }
.lugar.l1 { background: linear-gradient(135deg, #ffe27a, #e7b416); color: #3b2c00; }
.lugar.l2 { background: linear-gradient(135deg, #eef1f4, #b9c1ca); color: #2b3138; }
.lugar.l3 { background: linear-gradient(135deg, #f3c39a, #c9814a); color: #3a1f08; }
.tabela tr.sobe td:first-child, .tabela tr.desce td:first-child { box-shadow: none; }
.tabela tr.desce .lugar { background: color-mix(in srgb, var(--loss) 18%, transparent); color: var(--loss); }
.tabela .clube { min-width: 180px; }

/* ---------- ranking: pódio ---------- */
.podio { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: .6rem; margin: .4rem 0 1rem; }
.degrau { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .2rem; padding: .9rem .6rem 1rem; border-radius: 24px 24px 18px 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 0; }
.degrau b { font-family: var(--font-display); text-transform: uppercase; font-size: 1rem; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.degrau small { color: var(--muted); font-size: .75rem; }
.degrau strong { font-family: var(--font-display); font-size: 1.6rem; line-height: 1; margin-top: .2rem; }
.degrau strong small { font-size: .8rem; }
.degrau .lugar { width: 36px; height: 36px; font-size: 1.1rem; margin-bottom: .2rem; }
.degrau.d1 { padding-top: 1.4rem; padding-bottom: 1.6rem; background: var(--hero-bg); border-color: var(--panel-line); }
.degrau.d1 strong { font-size: 2.1rem; }
.degrau.eu { outline: 3px solid var(--hl); outline-offset: -3px; }

/* ---------- ficha de jogo ---------- */
dialog { padding: 0; overflow: auto; }
#modal-body { padding: 1.2rem 1.3rem 1.4rem; }
.ficha-cab { margin: -1.2rem -1.3rem 1rem; padding: 1.4rem 1.3rem 1.1rem; background: var(--hero-bg); color: var(--hero-ink); border-bottom: 1px solid var(--panel-line); text-align: center; }
.ficha-cab .eyebrow { color: var(--hero-muted); }
.ficha-cab .placar-grande { margin: .7rem 0 .3rem; }
.ficha-cab .placar-grande > span { background: none; color: var(--hero-ink); font-size: 3.4rem; padding: 0 .4rem; display: flex; gap: .35rem; align-items: center; }
.ficha-cab .placar-grande > span i { font-style: normal; color: var(--hero-muted); font-size: 2rem; }
.ficha-cab .placar-grande div { gap: .3rem; }
.ficha-cab .placar-grande div b { font-family: var(--font-display); font-size: 1rem; text-transform: uppercase; line-height: 1.1; }
.ficha-cab .placar-grande div small { color: var(--hero-muted); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; }
.ficha-cab .placar-grande .venceu .crest { box-shadow: 0 0 0 3px var(--hl); border-radius: 50%; }
.estado-jogo { display: inline-block; margin: .3rem 0 0; padding: .2rem .7rem; border-radius: 999px; background: var(--pill-bg); color: var(--pill-ink); font-family: var(--font-display); font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.fechar { z-index: 2; top: .7rem; right: .8rem; width: 34px; height: 34px; border-radius: 50%; background: var(--panel); color: var(--hero-ink); font-size: 1.4rem; display: grid; place-items: center; }
#modal-body h3 { font-family: var(--font-display); text-transform: uppercase; font-size: 1rem; letter-spacing: .04em; margin-top: 1.1rem; }
.cronologia { list-style: none; margin: 0; padding: .2rem 0; position: relative; }
.cronologia::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--line); transform: translateX(-50%); }
.cronologia li { position: relative; display: grid; grid-template-columns: 1fr 52px 1fr; align-items: center; padding: .3rem 0; font-size: .88rem; }
.cronologia .min { grid-column: 2; grid-row: 1; justify-self: center; z-index: 1; min-width: 40px; text-align: center; padding: .15rem .4rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-family: var(--font-display); font-weight: 700; font-size: .8rem; }
.cronologia li.h .txt { grid-column: 1; grid-row: 1; text-align: right; padding-right: .3rem; }
.cronologia li.a .txt { grid-column: 3; grid-row: 1; padding-left: .3rem; }
.cronologia small { color: var(--muted); display: block; font-size: .75rem; }
.onzes { gap: 1rem; }
.onze-cab { display: flex; align-items: center; gap: .45rem; margin: 0 0 .4rem; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: .9rem; }
.onze-cab .crest { width: 24px; height: 24px; font-size: .5rem; }
.onzes li { padding: .25rem 0; border-bottom: 1px solid var(--line); }
.onzes li:last-child { border-bottom: 0; }

/* ---------- carregamento e entrada suave ---------- */
.esqueleto { display: grid; gap: 1rem; padding-top: 1.2rem; }
.esq { border-radius: 26px; background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: brilho 1.2s ease-in-out infinite; }
.esq.grande { height: 230px; border-radius: 30px; }
.esq-linha { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; }
.esq-linha .esq { height: 180px; }
@keyframes brilho { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.entrar > * { animation: subir .35s cubic-bezier(.2,.7,.2,1) both; }
.entrar > *:nth-child(2) { animation-delay: .05s; }
.entrar > *:nth-child(3) { animation-delay: .1s; }
.entrar > *:nth-child(4) { animation-delay: .15s; }
@keyframes subir { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
dialog[open] { animation: subir .25s cubic-bezier(.2,.7,.2,1); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.degrau.d1 { grid-column: 2; grid-row: 1; } .degrau.d2 { grid-column: 1; grid-row: 1; } .degrau.d3 { grid-column: 3; grid-row: 1; }
@media (max-width: 560px) {
  .formacoes { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; gap: 0; }
  .formacoes::-webkit-scrollbar { display: none; }
  .form-btn { padding: .4rem .55rem; font-size: .84rem; flex: none; }
}

/* ===================== fantasy: época, rivais, contas ===================== */
.grafico { display: flex; align-items: flex-end; gap: 6px; height: 150px; margin: .8rem 0; padding: .9rem .8rem .6rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow-x: auto; }
.barra-j { flex: 1 0 22px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; }
.barra-j i { display: block; width: 100%; max-width: 30px; border-radius: 8px 8px 4px 4px; background: color-mix(in srgb, var(--text) 18%, transparent); transition: height .3s; }
.barra-j.melhor i { background: var(--hl); }
.barra-j:last-child i { background: var(--hot); }
.barra-j .v { font-family: var(--font-display); font-weight: 700; font-size: .75rem; }
.barra-j small { font-size: .62rem; color: var(--muted); font-family: var(--font-display); }
.epoca-info { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.epoca-info > div { padding: .8rem .9rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.epoca-info small { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.epoca-info b { font-family: var(--font-display); font-size: 1.5rem; }
.epoca-info b span { font-size: .85rem; color: var(--muted); font-weight: 400; }
.epoca-info > div > span { font-size: .75rem; color: var(--muted); overflow-wrap: anywhere; }
tr.clicavel { cursor: pointer; }
tr.clicavel:hover td:nth-child(2) b { text-decoration: underline; text-decoration-color: var(--hl); text-decoration-thickness: 2px; }
.degrau.clicavel { cursor: pointer; transition: transform .15s; }
.degrau.clicavel:hover { transform: translateY(-3px); }
.pitch-mini { min-height: 340px; padding: .8rem .2rem; }
.pitch-mini .slot { width: 64px; cursor: default; }
.pitch-mini .slot .shirt { width: 36px; height: 36px; }
.pitch-mini .slot .nome { font-size: .7rem; max-width: 64px; }
.slot.fora { opacity: .45; }
.slot.entrou .shirt { filter: drop-shadow(0 0 6px var(--hl)); }
.tiles-modal { margin: .9rem auto 0; max-width: 380px; text-align: left; }
.tiles-modal .tile { min-height: 90px; }
h2.sem-margem { margin: .1rem 0 0; justify-content: center; }
.passos { padding-left: 1.2rem; font-size: .9rem; }
.passos li { margin: .3rem 0; }
.btn.danger-fundo { background: var(--loss); color: #fff; }
.menu-conta .btn + .btn { margin-top: .35rem; }
.linha-form { display: flex; gap: .5rem; flex-wrap: wrap; margin: .5rem 0; }
.linha-form .input { flex: 1 1 220px; }
/* mensagens: escondem-se de vez (antes, no telemóvel, ficavam a espreitar por cima da barra) */
#toast { opacity: 0; visibility: hidden; pointer-events: none; transform: translate(-50%, 16px); transition: opacity .25s, transform .25s, visibility 0s .25s; border-radius: 16px; box-shadow: 0 12px 30px -12px rgba(0,0,0,.5); cursor: pointer; }
#toast.show { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); transition: opacity .25s, transform .25s, visibility 0s; }

/* ===================== delegados ===================== */
.delegado-aviso { margin-top: 1rem; }
.aj-meta .por { color: var(--muted); font-size: .75rem; }
.delegado-linha { grid-template-columns: 1fr; }
.delegado-linha .aj-meta { flex-direction: column; align-items: flex-start; gap: .35rem; grid-column: 1; }
.delegado-linha .del { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.codigo-card { border: 2px solid var(--hl); }
.codigo-grande { font-family: ui-monospace, Consolas, monospace; font-size: 1.8rem; font-weight: 700; letter-spacing: .12em; margin: .2rem 0; }

/* =====================================================================
   VISUAL 4.0 — estilo claro inspirado no "Sports Mobile App"
   (sempre claro: fundo quase branco, brilho lima-pálido, pílulas pretas,
    letra geométrica e grossa, números grandes)
   ===================================================================== */
:root {
  --bg: #f4f5f0; --surface: #ffffff; --surface-2: #f0f1eb; --text: #121412; --muted: #7b8077; --line: #e8eae3;
  --accent: #121412; --accent-ink: #ffffff; --hl: #d9f25e; --hl-ink: #1b2300; --brand: #121412; --brand-2: #2b302b;
  --hot: linear-gradient(140deg, #1b1f1b, #121412);
  --radius: 26px;
  --shadow: 0 1px 2px rgba(18,20,18,.04), 0 18px 40px -26px rgba(18,20,18,.28);
  --glow: radial-gradient(70% 38% at 50% -6%, rgba(222,244,120,.65), transparent 72%);
  --hero-bg: linear-gradient(180deg, #edf5c4 0%, #f6f9e6 52%, #ffffff 100%);
  --hero-ink: #121412; --hero-muted: #6f746b; --panel: rgba(255,255,255,.82); --panel-line: rgba(18,20,18,.05);
  --pill-bg: #121412; --pill-ink: #ffffff; --nav-bg: #ffffff; --nav-ink: #8b9087;
  --font-display: "Segoe UI Variable Display", "SF Pro Display", "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f5f0; --surface: #ffffff; --surface-2: #f0f1eb; --text: #121412; --muted: #7b8077; --line: #e8eae3;
    --accent: #121412; --accent-ink: #ffffff; --hl: #d9f25e; --hl-ink: #1b2300; --brand: #121412; --brand-2: #2b302b;
    --hot: linear-gradient(140deg, #1b1f1b, #121412);
    --shadow: 0 1px 2px rgba(18,20,18,.04), 0 18px 40px -26px rgba(18,20,18,.28);
    --glow: radial-gradient(70% 38% at 50% -6%, rgba(222,244,120,.65), transparent 72%);
    --hero-bg: linear-gradient(180deg, #edf5c4 0%, #f6f9e6 52%, #ffffff 100%);
    --hero-ink: #121412; --hero-muted: #6f746b; --panel: rgba(255,255,255,.82); --panel-line: rgba(18,20,18,.05);
    --pill-bg: #121412; --pill-ink: #ffffff; --nav-bg: #ffffff; --nav-ink: #8b9087;
    color-scheme: light;
  }
}

/* ---------- letra: geométrica, grossa, sem maiúsculas ---------- */
h1, h2, h3, .btn, .tabs button, .logo-txt, .destaque h1, .nc h3, .news-destaque h3, .titulo-input, .degrau b,
.jornada-nav h2, .regras-box summary span, .onze-cab, #modal-body h3, .destaque h3.branco, .form-btn, .match .t, .dia {
  text-transform: none; letter-spacing: -.02em;
}
h1, h2, h3, .destaque h1, .nc h3, .news-destaque h3, .titulo-input, .jornada-nav h2 { font-weight: 800; }
h2 { font-size: 1.5rem; }
.eyebrow { text-transform: none; letter-spacing: 0; font-size: .82rem; font-weight: 600; color: var(--muted); }
.dia { font-size: .85rem; letter-spacing: -.01em; font-weight: 700; }
.score, .tile b, .stats-bar b, .score-card b, .num, .degrau strong, .placar-grande > span, .pontos-grandes, .contagem, .epoca-info b { font-weight: 800; letter-spacing: -.035em; }
.btn { font-weight: 700; font-size: .92rem; letter-spacing: -.01em; }
.tag { text-transform: none; letter-spacing: 0; font-weight: 600; }

/* ---------- cabeçalho e separadores (pílula preta) ---------- */
.topbar { background: color-mix(in srgb, var(--bg) 88%, transparent); border-bottom: 0; }
.logo-txt small { text-transform: uppercase; letter-spacing: .18em; }
.logo-txt b { font-weight: 800; letter-spacing: -.02em; }
.tabs { gap: 0; padding: 4px; margin: 0 auto .7rem; width: fit-content; max-width: calc(100% - 32px); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); }
.tabs button { font-size: .92rem; padding: .5rem 1.05rem; color: var(--muted); }
.tabs button.on { background: var(--pill-bg); color: var(--pill-ink); }
@media (max-width: 720px) {
  body:not(.admin) .tabs { width: auto; max-width: none; background: var(--nav-bg); border: 1px solid var(--line); border-radius: 30px; box-shadow: 0 18px 40px -18px rgba(18,20,18,.35); }
  body:not(.admin) .tabs button { font-size: .66rem; color: var(--nav-ink); border-radius: 22px; }
  body:not(.admin) .tabs button.on { background: var(--pill-bg); color: var(--pill-ink); }
}

/* ---------- cartões e botões ---------- */
.card, .news-item, .match, .table-wrap, .ranking, .breakdown, .stats-bar div, .score-card div, .epoca-info > div, .grafico, .regras-box, .jornada-nav, .banco, .nc { border-color: var(--line); }
.btn.ghost { background: var(--surface); border-color: var(--line); }
.chip.on, .liga-chip.on { box-shadow: none; }

/* ---------- destaque da página inicial ---------- */
.destaque { border-radius: 34px; border: 1px solid var(--panel-line); }
.destaque h1 { font-size: 2.6rem; line-height: 1; letter-spacing: -.035em; }
.painel { border-radius: 26px; background: rgba(255,255,255,.75); box-shadow: 0 10px 30px -22px rgba(18,20,18,.35); }
.painel .btn { background: var(--pill-bg); color: var(--pill-ink); }
.painel .btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.progresso span { background: var(--text); }
.jogo-destaque .crest { width: 70px; height: 70px; }
.jogo-destaque .vs b { font-size: 2.3rem; letter-spacing: -.04em; }
.tile { border-radius: 22px; }
.tile.quente { background: var(--hot); color: #fff; }
.tile.lima { background: linear-gradient(160deg, #e6f6a0, #f3f9d6); color: var(--hl-ink); }

/* ---------- jogos: cartões brancos, emblemas e números grandes ---------- */
.match { border-radius: 30px; padding: 1.1rem .9rem 1rem; }
.match .crest { width: 54px; height: 54px; }
.match .t { font-size: .9rem; font-weight: 700; }
.score { font-size: 2.5rem; letter-spacing: -.045em; }
.score span { color: var(--text); font-size: 2rem; }
.score.por-jogar .hora { background: var(--text); color: #fff; font-size: 1rem; font-weight: 700; letter-spacing: -.01em; }
@media (max-width: 560px) { .match .crest { width: 46px; height: 46px; } .score { font-size: 2.1rem; } }
.jornada-nav { border-radius: 30px; }
.jornada-nav h2 { font-size: 2.1rem; letter-spacing: -.035em; }

/* ---------- notícias ---------- */
.nc { border-radius: 30px; }
.nc h3 { font-size: 1.3rem; line-height: 1.12; }
.nc .tag, .news-destaque .tag { background: var(--hl); color: var(--hl-ink); }
.nc::after { display: none; }

/* ---------- fantasy ---------- */
.equipa-cab { border-radius: 30px; }
.titulo-input { font-size: 2rem; letter-spacing: -.035em; }
.stats-bar .saldo-tile { background: linear-gradient(160deg, #e6f6a0, #f3f9d6); }
.score-card div:first-child { background: var(--hot); }
.slot .nome { background: #121412; border-radius: 999px 999px 0 0; padding: 2px 9px; }
.slot .info { border-radius: 0 0 999px 999px; }
.pitch { border-radius: 32px; }

/* ---------- tabela e ranking ---------- */
.tabela thead th { text-transform: none; letter-spacing: 0; font-weight: 600; }
.degrau { border-radius: 28px 28px 20px 20px; }

/* ---------- ficha de jogo ---------- */
dialog { border-radius: 32px; }
.ficha-cab .placar-grande > span { font-size: 3.6rem; letter-spacing: -.05em; font-weight: 800; }
.estado-jogo { text-transform: none; letter-spacing: 0; }

/* ============================================================
   PROGNÓSTICOS
   ============================================================ */
@media (max-width: 720px) { body:not(.admin) .tabs { grid-template-columns: repeat(6, 1fr); } body:not(.admin) .tabs button { font-size: .6rem; } }
.prog-topo { display: grid; gap: 1rem; align-items: end; margin-bottom: 1.2rem; }
.prog-topo h1 { margin: .1rem 0 .4rem; }
.prog-topo p { margin: 0; max-width: 60ch; }
@media (min-width: 760px) { .prog-topo { grid-template-columns: 1fr 360px; } }
.palpites { display: grid; gap: .55rem; margin-top: 1rem; }
.palpite { display: grid; grid-template-columns: 1fr auto 1fr; grid-template-areas: "h m a" "q q q"; column-gap: .6rem; row-gap: .35rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem .85rem; box-shadow: var(--shadow); }
.palpite > .home { grid-area: h; } .palpite > .away { grid-area: a; }
.palpite > .marcador, .palpite > .placar-p { grid-area: m; }
.palpite .t { display: flex; align-items: center; gap: .45rem; font-weight: 700; font-size: .9rem; min-width: 0; }
.palpite .t .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palpite .home { justify-content: flex-end; text-align: right; }
.palpite .quando { grid-area: q; text-align: center; color: var(--muted); font-size: .75rem; }
.palpite .marcador { display: flex; align-items: center; gap: .35rem; }
.palpite .marcador i, .palpite .placar-p i { font-style: normal; color: var(--muted); font-weight: 700; }
.palpite input { width: 46px; height: 50px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--text);
  font: 700 1.45rem/1 inherit; text-align: center; -moz-appearance: textfield; appearance: textfield; }
.palpite input::-webkit-outer-spin-button, .palpite input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.palpite input:focus { outline: none; border-color: var(--text); background: var(--surface); }
.palpite.guardado input { border-color: color-mix(in srgb, var(--win) 55%, var(--line)); }
.palpite.pendente { border-color: color-mix(in srgb, var(--hl) 80%, var(--text) 20%); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hl) 45%, transparent); }
.palpite .placar-p { display: flex; align-items: center; gap: .4rem; font-size: 1.45rem; }
.palpite .placar-p b { min-width: 1.2ch; text-align: center; }
.palpite.fechado { background: var(--surface); }
.pts-p { display: inline-block; margin-left: .3rem; padding: .1rem .5rem; border-radius: 999px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.pts-p.p3 { background: var(--hl); color: var(--hl-ink); }
.pts-p.p1 { background: color-mix(in srgb, var(--win) 18%, var(--surface)); color: var(--win); }
.tendencia { grid-column: 1 / -1; display: flex; height: 20px; border-radius: 999px; overflow: hidden; font-size: .66rem; font-weight: 700; }
.tendencia span { display: flex; align-items: center; justify-content: center; min-width: 0; overflow: hidden; white-space: nowrap; }
.tendencia .c { background: var(--text); color: var(--surface); }
.tendencia .e { background: var(--surface-2); color: var(--muted); }
.tendencia .f { background: var(--hl); color: var(--hl-ink); }
.barra-guardar { position: sticky; bottom: 12px; z-index: 5; display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; padding: .6rem;
  background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); }
.barra-guardar .btn:not(.ghost) { flex: 1; max-width: 280px; }
@media (max-width: 720px) {
  body:not(.admin) .barra-guardar { bottom: calc(96px + env(safe-area-inset-bottom)); }
  .palpite { padding: .7rem .6rem; column-gap: .4rem; }
  .palpite .t { font-size: .8rem; flex-direction: column; gap: .25rem; text-align: center; }
  .palpite .home { flex-direction: column-reverse; }
  .palpite .t .nm { white-space: normal; line-height: 1.15; }
  .palpite input { width: 42px; height: 48px; }
}
.modo-rank { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); }
.modo-rank button { border: 0; background: none; font: inherit; font-weight: 700; padding: .45rem 1rem; border-radius: 999px; color: var(--muted); cursor: pointer; }
.modo-rank button.on { background: var(--pill-bg); color: var(--pill-ink); }
.barra-guardar.vazio { display: none; }

/* ============================================================
   MODO MANAGER (manager.html)
   ============================================================ */
@media (max-width: 720px) { body.pagina-manager .tabs { grid-template-columns: repeat(5, 1fr); } body.pagina-manager .tabs button { font-size: .62rem; } }
body.pagina-manager .topbar-in { gap: .6rem; }
.voltar-app { margin-left: auto; }
.mgr-intro .liga { grid-column: 1 / -1; }
.mgr-intro h1 { max-width: 18ch; }
.mgr-como { margin: .8rem 0 0; padding-left: 1.1rem; display: grid; gap: .35rem; max-width: 70ch; }
.mgr-liga { display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: inherit; text-decoration: none; transition: transform .15s, border-color .15s; }
.mgr-liga:hover { border-color: var(--text); transform: translateY(-1px); }
.mgr-liga h3 { margin: .1rem 0 .2rem; }
.mgr-liga p { margin: 0; }
.seta-dir { font-size: 1.8rem; color: var(--muted); }
.mgr-cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: 1rem; }
.mgr-cab h2 { margin: 0; }
.mgr-cab .convite { margin: 0; }
.mgr-clubes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.mgr-clube { display: flex; flex-direction: column; align-items: center; gap: .35rem; text-align: center; font: inherit; color: inherit; cursor: pointer; margin: 0; }
.mgr-clube .crest { width: 54px; height: 54px; }
.mgr-clube:hover:not(:disabled) { border-color: var(--text); }
.mgr-clube:disabled { opacity: .55; cursor: default; }
.mgr-clube .livre { color: var(--win); font-weight: 700; }
.forca { display: inline-flex; align-items: center; justify-content: center; min-width: 2.1rem; padding: .1rem .35rem; border-radius: 8px; font-weight: 700; font-size: .85rem; }
.forca.f1 { background: var(--surface-2); color: var(--muted); }
.forca.f2 { background: color-mix(in srgb, var(--win) 16%, var(--surface)); color: var(--win); }
.forca.f3 { background: var(--hl); color: var(--hl-ink); }
.barra-f { flex: 1; min-width: 40px; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.barra-f i { display: block; height: 100%; border-radius: inherit; background: var(--text); }
.mgr-clube-cab .mgr-id { display: flex; align-items: center; gap: .9rem; }
.mgr-clube-cab .mgr-id .crest { width: 64px; height: 64px; }
.mgr-clube-cab h1 { margin: 0; }
.mgr-clube-cab .tile i { font-style: normal; }
.mgr-rot { margin: .9rem 0 .35rem; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.mgr-plantel { display: grid; gap: .8rem; margin-top: 1rem; }
.mgr-pos { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .7rem; box-shadow: var(--shadow); }
.mgr-pos-cab { display: flex; align-items: center; gap: .45rem; margin: .1rem 0 .45rem; font-weight: 700; }
.mgr-pos-cab small { margin-left: auto; color: var(--muted); font-weight: 600; }
.mgr-pos-cab small.falta, .falta { color: var(--loss); }
.mgr-jog, .mgr-mercado, .mgr-transf, .mgr-membros { list-style: none; margin: 0; padding: 0; }
.mgr-jog li, .mgr-mercado li { display: flex; align-items: center; gap: .6rem; padding: .45rem .2rem; border-top: 1px solid var(--line); }
.mgr-jog li:first-child { border-top: 0; }
.mgr-jog li.on { background: color-mix(in srgb, var(--hl) 22%, transparent); border-radius: 12px; }
.mgr-jog .nm, .mgr-mercado .nm { display: flex; flex-direction: column; min-width: 0; flex: 0 1 46%; }
.mgr-jog .nm b, .mgr-mercado .nm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mgr-jog .nm small, .mgr-mercado .nm small { color: var(--muted); display: flex; align-items: center; gap: .3rem; }
.mgr-mercado .nm small .crest { width: 18px; height: 18px; font-size: .5rem; }
.mgr-mercado .nm { flex: 1; }
.titular-btn { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface-2); font: 700 1rem/1 inherit; color: var(--muted); cursor: pointer; }
.mgr-jog li.on .titular-btn { background: var(--text); border-color: var(--text); color: var(--surface); }
.mgr-forca { position: sticky; top: 1rem; }
.mgr-f { display: flex; align-items: center; gap: .7rem; margin: .55rem 0; }
.mgr-f span:first-child { width: 6.5rem; font-weight: 600; }
.mgr-f .barra-f { height: 10px; }
.mgr-f b { width: 2rem; text-align: right; }
.mgr-membros li { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; }
.mgr-membros li .crest { width: 24px; height: 24px; font-size: .55rem; }
.mgr-membros small { color: var(--muted); margin-left: auto; }
.mgr-orc { display: flex; gap: 2rem; align-items: center; }
.mgr-orc small { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.mgr-orc b { font-size: 1.5rem; }
.mgr-filtros { display: grid; gap: .5rem; margin-bottom: .6rem; }
.mgr-mercado { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .2rem .7rem; box-shadow: var(--shadow); }
.mgr-mercado li:first-child { border-top: 0; }
.mgr-mercado .btn { flex: none; min-width: 6.5rem; }
.mgr-transf li { padding: .4rem 0; border-top: 1px solid var(--line); font-size: .88rem; }
.mgr-transf small { color: var(--muted); display: block; }
.match.meu-jogo { border-color: var(--text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hl) 50%, transparent); }
.mgr-tr { display: block; color: var(--muted); font-weight: 500; font-size: .7rem; }
.cronologia.relato li.c .txt { grid-column: 1 / -1; grid-row: 2; text-align: center; color: var(--muted); font-size: .84rem; padding: .15rem .5rem 0; position: relative; z-index: 1; background: var(--surface); justify-self: center; border-radius: 8px; }
@media (max-width: 720px) {
  .voltar-app { display: none; }
  .mgr-forca { position: static; }
  .mgr-jog .barra-f { display: none; }
  .mgr-jog .nm { flex: 1; }
}
/* chamada para o Manager na página inicial da app */
.painel-manager { background: var(--brand); color: #fff; }
.painel-manager .eyebrow { color: var(--hl); }
.painel-manager p { color: rgba(255,255,255,.75); }
.painel-manager .btn { background: var(--hl); color: var(--hl-ink); border-color: var(--hl); }
.mgr-chamada { display: flex; align-items: center; justify-content: space-between; gap: 1rem; text-decoration: none; margin: 1rem 0; }
.mgr-chamada h3 { margin: .1rem 0 .25rem; color: #fff; }
.mgr-chamada p { margin: 0; }
.mgr-chamada .btn { flex: none; }
@media (max-width: 560px) { .mgr-chamada { flex-direction: column; align-items: flex-start; } }
@media (max-width: 400px) { .mgr-clubes { grid-template-columns: 1fr 1fr; } .mgr-clube { padding: .8rem .5rem; } }
body.pagina-manager .grid-2 > section { min-width: 0; }
/* botões de opção (formação, estilo, filtros) */
.opcoes { display: flex; flex-wrap: wrap; gap: .45rem; padding: .2rem 0 .3rem; }
.opcao { flex: none; padding: .55rem 1rem; min-height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font: inherit; font-size: .9rem; font-weight: 700; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.opcao:hover { border-color: var(--text); }
.opcao.on { background: var(--pill-bg); color: var(--pill-ink); border-color: var(--pill-bg); }
.opcao:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.mgr-estilo-txt { margin: .35rem 0 0; }
/* painel: importar do zerozero */
.zz-card { margin: 1rem 0; }
.zz-linha { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; }
.zz-linha h3 { margin: 0 0 .2rem; }
.zz-jogo { border-top: 1px solid var(--line); padding: .7rem 0; }
.zz-jogo.inativo { opacity: .7; }
.zz-cab { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; cursor: pointer; }
.zz-cab input { width: 20px; height: 20px; accent-color: var(--text); }
.zz-placar { padding: .1rem .6rem; border-radius: 8px; background: var(--surface-2); font-weight: 700; }
.zz-marc { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: .4rem 0 .2rem; }
.zz-avisos { margin: .35rem 0 0; padding-left: 1.1rem; font-size: .82rem; color: #8a5a00; }
.zz-jogo.com-avisos .zz-cab b { text-decoration: underline dotted #c98a00; }
.tag.ok { background: color-mix(in srgb, var(--win) 18%, var(--surface)); color: var(--win); }
.zz-registo { margin-top: .6rem; }
.zz-registo summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.zz-registo > ul { list-style: none; padding: 0; margin: .5rem 0 0; }
.zz-registo > ul > li { padding: .35rem 0; border-top: 1px solid var(--line); }
/* atalho para o Modo Manager no topo da app */
.topbar .btn.ir-manager { display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; font-weight: 700; background: var(--brand); color: #fff; border-color: var(--brand); }
.topbar .btn.ir-manager .ico { width: 18px; height: 18px; fill: none; stroke: var(--hl); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.topbar .btn.ir-manager:hover { background: var(--brand-2); color: #fff; }
@media (max-width: 560px) {
  .topbar .btn.ir-manager { order: 1; padding: .4rem .65rem; font-size: .82rem; gap: .3rem; }
  body:not(.admin):not(.pagina-manager) .topbar-in { gap: .45rem; }
}
