/* BetSystem — tema "noite de jogo": verde-grafite, giz e âmbar só para o edge */
:root {
  --bg: #0c1613;
  --surface: #121f1b;
  --raised: #182a25;
  --line: #243a33;
  --line-soft: #1b2e28;
  --text: #e8efe7;
  --dim: #93a69c;
  --faint: #62786d;
  --amber: #f0b03c;
  --amber-ink: #2a1c00;
  --grass: #6fcf97;
  --red: #ec7a68;
  --sky: #7cc0ea;
  --radius: 10px;
  --amber-fill: #f0b03c;
  --grass-fill: #6fcf97;
  --prose: var(--prose);
  --bar-bg: rgba(12, 22, 19, 0.92);
  --art-1: #16302a;
  --art-line: #1f3a32;
  /* famílias de mercado (a cor nunca é a única pista: o nome do mercado sempre aparece) */
  --m-res: #a99cf5;
  --m-goals: #f08aa8;
  --m-under: #4fc3b5;
  --m-btts: #7fa8f7;
  --m-half: #c4de6a;
  --m-corners: #e59b5f;
  --m-late: #9fb0c4;
  --m-other: #62786d;
  --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Instrument Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}
html[data-theme='light'] {
  --bg: #f2f5ee;
  --surface: #ffffff;
  --raised: #e9eee4;
  --line: #cdd7c8;
  --line-soft: #e0e7db;
  --text: #14221c;
  --dim: #4a5e53;
  --faint: #76897e;
  --amber: #955800;
  --amber-fill: #efaa2b;
  --amber-ink: #2a1c00;
  --grass: #17783f;
  --grass-fill: #3aa96a;
  --red: #bd3626;
  --sky: #17639b;
  --prose: #28382f;
  --bar-bg: rgba(242, 245, 238, 0.92);
  --art-1: #dbe8d6;
  --art-line: #c3d4bd;
  --m-res: #6a52d6;
  --m-goals: #cc3a69;
  --m-under: #0c8a7e;
  --m-btts: #2f5fd0;
  --m-half: #667f0c;
  --m-corners: #b45d17;
  --m-late: #55697f;
  --m-other: #76897e;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 var(--font-body);
  font-variant-numeric: tabular-nums;
  min-height: 100vh;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 650; letter-spacing: -0.015em; margin: 0; line-height: 1.15; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.dim { color: var(--dim); }
.faint { color: var(--faint); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 28px;
  padding: 0 24px; height: 58px;
  background: var(--bar-bg); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 19px; text-decoration: none; letter-spacing: -0.02em; }
.brand svg { color: var(--amber); }
.nav { display: flex; gap: 4px; height: 100%; }
.nav a {
  display: flex; align-items: center; padding: 0 14px; text-decoration: none; color: var(--dim);
  border-bottom: 2px solid transparent; font-weight: 550; margin-top: 2px;
}
.nav a:hover { color: var(--text); }
.nav a[aria-current='page'] { color: var(--text); border-color: var(--amber); }
.topbar .spacer { flex: 1; }
.tz { background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; color: var(--dim); font-size: 13px; }
.usermenu { position: relative; }
.usermenu > button { display: flex; align-items: center; gap: 10px; background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px; cursor: pointer; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--raised); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--amber); }
.usermenu .who { text-align: left; line-height: 1.15; }
.usermenu .who b { display: block; font-size: 13px; font-weight: 600; }
.usermenu .who small { color: var(--dim); font-size: 12px; }
.usermenu .who small.warn { color: var(--amber); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; box-shadow: 0 18px 40px rgba(0,0,0,.45); display: none; }
.menu.open { display: block; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 6px; background: none; border: 0; text-decoration: none; cursor: pointer; font-size: 14px; }
.menu a:hover, .menu button:hover { background: var(--line-soft); }

/* ---------- botões e campos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--raised); cursor: pointer; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--faint); }
.btn.primary { background: var(--amber-fill); color: var(--amber-ink); border-color: var(--amber-fill); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--red); }
.btn.danger:hover { border-color: var(--red); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; color: var(--dim); font-weight: 550; }
.input, select.input, textarea.input {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px;
}
.input:hover { border-color: var(--faint); }
.input:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber-fill) 18%, transparent); }
textarea.input { min-height: 70px; resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.check input { accent-color: var(--amber); width: 16px; height: 16px; }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--raised); border: 1px solid var(--line); color: var(--dim); white-space: nowrap; }
.chip.ok { color: var(--grass); border-color: color-mix(in srgb, var(--grass-fill) 35%, transparent); background: color-mix(in srgb, var(--grass-fill) 8%, transparent); }
.chip.warn { color: var(--amber); border-color: color-mix(in srgb, var(--amber-fill) 40%, transparent); background: color-mix(in srgb, var(--amber-fill) 8%, transparent); }
.chip.bad { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); background: color-mix(in srgb, var(--red) 8%, transparent); }
.chip.info { color: var(--sky); border-color: color-mix(in srgb, var(--sky) 35%, transparent); background: color-mix(in srgb, var(--sky) 8%, transparent); }

/* ---------- layout do painel ---------- */
.page { max-width: 1440px; margin: 0 auto; padding: 22px 24px 60px; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 28px; }
.page-head p { margin: 4px 0 0; color: var(--dim); }
.freshness { font-size: 13px; color: var(--dim); }
.workspace { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }

.filters { position: sticky; top: 78px; display: grid; gap: 16px; padding: 16px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); max-height: calc(100vh - 100px); overflow: auto; }
.filters h3 { font-size: 15px; display: flex; justify-content: space-between; align-items: center; }
.filters .range { display: flex; align-items: center; gap: 10px; }
.filters input[type=range] { flex: 1; accent-color: var(--amber); }
.filters .range output { min-width: 42px; text-align: right; font-weight: 600; }
.filter-toggle { display: none; }

/* abas de dia */
.days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; margin-bottom: 14px; }
.day { border: 1px solid var(--line); background: transparent; padding: 7px 14px; border-radius: 8px; cursor: pointer; text-align: left; white-space: nowrap; line-height: 1.2; }
.day b { display: block; font-size: 14px; font-weight: 600; }
.day small { color: var(--dim); font-size: 12px; }
.day[aria-pressed='true'] { background: var(--raised); border-color: var(--amber); }
.listbar { display: flex; justify-content: space-between; align-items: center; margin: 0 0 8px; color: var(--dim); font-size: 13.5px; gap: 12px; flex-wrap: wrap; }
.listbar select { width: auto; padding: 6px 10px; }

/* linha de jogo */
.games { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.hour-sep { padding: 7px 18px; font-size: 12.5px; font-weight: 600; color: var(--dim); background: var(--bg); border-bottom: 1px solid var(--line-soft); }
.game {
  display: grid; grid-template-columns: 62px minmax(210px, 1.15fr) minmax(0, 1.5fr) 150px;
  gap: 18px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--line-soft);
  width: 100%; text-align: left; background: transparent; border-left: 0; border-right: 0; border-top: 0; cursor: pointer;
}
.game:last-child { border-bottom: 0; }
.game:hover { background: var(--raised); }
.game .time { font-weight: 650; font-size: 16px; }
.game .time small { display: block; font-weight: 500; color: var(--faint); font-size: 12px; }
.game .teams b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 16.5px; letter-spacing: -0.01em; }
.game .teams .vs { color: var(--faint); font-weight: 400; margin: 0 2px; }
.game .teams small { color: var(--dim); font-size: 13px; }
.signals { display: flex; flex-wrap: wrap; gap: 6px; }
.sig { display: inline-flex; gap: 6px; align-items: baseline; padding: 3px 9px; border-radius: 6px; font-size: 12.5px; background: var(--bg); border: 1px solid var(--line-soft); color: var(--dim); }
.sig b { color: var(--text); font-weight: 650; }
.sig.v { border-color: color-mix(in srgb, var(--amber-fill) 45%, transparent); color: var(--amber); }
.sig.v b { color: var(--amber); }
.sig.a { border-color: color-mix(in srgb, var(--sky) 35%, transparent); color: var(--sky); }
.sig.more { color: var(--faint); border-style: dashed; }
.edge { display: grid; gap: 5px; }
.edge .val { display: flex; justify-content: space-between; font-size: 13px; color: var(--dim); }
.edge .val b { font-size: 15px; color: var(--amber); font-weight: 700; }
.meter { height: 6px; border-radius: 99px; background: var(--bg); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--amber-fill); border-radius: 99px; }
.meter.g i { background: var(--grass-fill); }
.edge.none .val b { color: var(--faint); font-weight: 500; }
.empty { padding: 48px 20px; text-align: center; color: var(--dim); }
.empty b { display: block; color: var(--text); font-family: var(--font-display); font-size: 18px; margin-bottom: 4px; }

/* ---------- gaveta de detalhe ---------- */
.scrim { position: fixed; inset: 0; background: rgba(4, 9, 7, .62); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .18s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; width: min(880px, 100vw);
  background: var(--bg); border-left: 1px solid var(--line); transform: translateX(100%); transition: transform .22s ease;
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head { padding: 20px 28px 0; border-bottom: 1px solid var(--line-soft); background: var(--surface); }
.drawer-head .row1 { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.drawer-head h2 { font-size: 30px; }
.drawer-head h2 .vs { color: var(--faint); font-weight: 400; font-size: 20px; margin: 0 6px; }
.drawer-head .sub { color: var(--dim); margin: 6px 0 0; }
.close { background: none; border: 1px solid var(--line); border-radius: 8px; width: 34px; height: 34px; cursor: pointer; font-size: 18px; line-height: 1; }
.close:hover { border-color: var(--faint); }
.facts { display: flex; gap: 28px; flex-wrap: wrap; padding: 16px 0 14px; }
.fact b { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 650; }
.fact b.amber { color: var(--amber); }
.fact small { color: var(--dim); font-size: 12.5px; }
.tabs { display: flex; gap: 2px; }
.tab { background: none; border: 0; padding: 10px 16px; color: var(--dim); cursor: pointer; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab[aria-selected='true'] { color: var(--text); border-color: var(--amber); }
.drawer-body { overflow: auto; padding: 24px 28px 48px; flex: 1; }
.block { margin-bottom: 30px; }
.block > h3 { font-size: 17px; margin-bottom: 12px; display: flex; align-items: baseline; gap: 10px; }
.block > h3 small { font-family: var(--font-body); font-weight: 400; color: var(--dim); font-size: 13px; }

/* tabelas */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 600; color: var(--dim); font-size: 13px; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--text); }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover td { background: var(--raised); }
.tbl .r { text-align: right; }
.tbl .strong { font-weight: 650; }
.edge-n { color: var(--amber); font-weight: 700; }
.bk { background: var(--bg); }
.bk td { padding: 7px 14px 7px 28px; font-size: 13px; color: var(--dim); }
.bk .has { color: var(--grass); }
.exp { background: none; border: 0; cursor: pointer; color: var(--dim); padding: 2px 6px; border-radius: 4px; }
.exp:hover { color: var(--text); }
.warnbox { display: flex; gap: 10px; align-items: start; font-size: 13.5px; color: var(--amber); background: color-mix(in srgb, var(--amber-fill) 7%, transparent); border: 1px solid color-mix(in srgb, var(--amber-fill) 30%, transparent); border-radius: 8px; padding: 10px 12px; margin-top: 10px; }

/* mercados */
.mkt { display: grid; grid-template-columns: minmax(150px, 1.2fr) 70px minmax(110px, 2fr); gap: 14px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--line-soft); }
.mkt:last-child { border-bottom: 0; }
.mkt .pcts { color: var(--dim); font-size: 12.5px; }
.mkt .bar { display: flex; align-items: center; gap: 10px; }
.mkt .bar .meter { flex: 1; }
.mkt .bar b { min-width: 40px; text-align: right; }

/* acca no detalhe */
.accaline { display: flex; justify-content: space-between; gap: 14px; padding: 11px 16px; border-bottom: 1px solid var(--line-soft); align-items: baseline; }
.accaline:last-child { border-bottom: 0; }
.accaline p { margin: 3px 0 0; color: var(--dim); font-size: 13px; }

/* estatísticas lado a lado */
.stat-sec { margin-bottom: 26px; }
.stat-sec > h3 { font-size: 17px; margin-bottom: 4px; }
.stat-sec > p { color: var(--dim); margin: 0 0 12px; max-width: 70ch; font-size: 14px; }
.versus { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.versus-head, .vrow { display: grid; grid-template-columns: 1fr minmax(130px, 190px) 1fr; gap: 14px; align-items: center; padding: 8px 16px; }
.versus-head { border-bottom: 1px solid var(--line); font-family: var(--font-display); font-weight: 600; background: var(--raised); }
.versus-head span:first-child, .vrow .l { text-align: right; }
.versus-head small { color: var(--dim); font-family: var(--font-body); font-weight: 400; font-size: 12px; display: block; }
.vrow { border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.vrow:last-child { border-bottom: 0; }
.vrow .mid { text-align: center; color: var(--dim); font-size: 13px; line-height: 1.25; }
.vcell { display: grid; gap: 4px; }
.vcell .v { font-weight: 650; }
.vcell .meter { height: 5px; }
.vrow .l .meter i { float: right; }
/* o lado com o maior valor ganha a barra clara; sem juízo de bom/ruim (mais derrotas não é "melhor") */
.vcell .meter i { background: var(--faint); }
.vcell.hi .meter i { background: var(--text); }
.vcell:not(.hi) .v { color: var(--dim); font-weight: 550; }

/* análise */
.prose { max-width: 68ch; }
.prose p { margin: 0 0 12px; line-height: 1.65; color: var(--prose); }
.tip { border-left: 3px solid var(--amber); background: color-mix(in srgb, var(--amber-fill) 7%, transparent); padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 0 0 18px; max-width: 68ch; }
.tip b { color: var(--amber); }
.note-en { font-size: 12.5px; color: var(--faint); margin: 0 0 12px; }

/* ---------- accas ---------- */
.acca-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.acca { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.acca header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--raised); }
.acca header h3 { font-size: 16px; }
.acca header .total { text-align: right; line-height: 1.1; }
.acca header .total b { font-family: var(--font-display); font-size: 22px; color: var(--amber); }
.acca header .total small { display: block; color: var(--dim); font-size: 12px; }
.leg { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); width: 100%; text-align: left; background: none; border-left: 0; border-right: 0; border-top: 0; cursor: pointer; }
.leg:last-child { border-bottom: 0; }
.leg:hover { background: var(--raised); }
.leg b { font-family: var(--font-display); font-weight: 600; }
.leg .o { text-align: right; font-weight: 700; }
.leg small { color: var(--dim); font-size: 12.5px; }
.leg .meter { grid-column: 1 / -1; height: 4px; }

/* ---------- modais / toasts ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 60; display: none; place-items: center; background: rgba(4,9,7,.7); padding: 16px; }
.modal-wrap.open { display: grid; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.55); }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 0; }
.modal header h2 { font-size: 21px; }
.modal .body { padding: 18px 22px; display: grid; gap: 14px; }
.modal .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 20px; border-top: 1px solid var(--line-soft); }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.presets button { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; font-size: 13px; font-weight: 600; color: var(--dim); }
.presets button:hover { color: var(--text); border-color: var(--faint); }
.presets button[aria-pressed='true'] { background: var(--amber-fill); color: var(--amber-ink); border-color: var(--amber-fill); }
.formerr { color: var(--red); font-size: 13.5px; min-height: 1em; }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 80; display: grid; gap: 8px; }
.toast { background: var(--raised); border: 1px solid var(--line); padding: 10px 16px; border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.4); font-size: 14px; }
.toast.err { border-color: var(--red); }

/* ---------- admin ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); }
.kpi b { display: block; font-family: var(--font-display); font-size: 26px; }
.kpi small { color: var(--dim); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.toolbar .input { width: auto; min-width: 200px; }
.toolbar .grow { flex: 1; }
.actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.userline b { display: block; font-weight: 650; }
.userline small { color: var(--dim); }
.drop { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 22px; text-align: center; background: var(--surface); cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--amber); background: var(--raised); }
.drop b { display: block; font-family: var(--font-display); font-size: 17px; }
.drop small { color: var(--dim); }
.drops { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 20px; }
pre.code { background: var(--bg); border: 1px solid var(--line-soft); border-radius: 8px; padding: 14px; overflow: auto; font: 13px/1.5 ui-monospace, Menlo, Consolas, monospace; color: var(--prose); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, 480px); }
.login .art { position: relative; overflow: hidden; display: grid; align-content: end; padding: 56px; border-right: 1px solid var(--line-soft); background: radial-gradient(120% 90% at 10% 0%, var(--art-1) 0%, var(--bg) 60%); }
.login .art svg.pitch { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--art-line); }
.login .art::after { content: ''; position: absolute; inset: auto 0 0 0; height: 55%; background: linear-gradient(to top, var(--bg) 25%, transparent); pointer-events: none; }
.login .art h1, .login .art p { z-index: 1; }
.login .art h1 { position: relative; font-size: clamp(34px, 4.4vw, 58px); max-width: 14ch; }
.login .art p { position: relative; color: var(--dim); max-width: 44ch; margin: 14px 0 0; font-size: 16px; }
.login .form { display: grid; align-content: center; padding: 48px; }
.login form { display: grid; gap: 16px; }
.login h2 { font-size: 26px; }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
  .workspace { grid-template-columns: 1fr; }
  .filters { position: static; max-height: none; display: none; }
  .filters.open { display: grid; }
  .filter-toggle { display: inline-flex; }
  .game { grid-template-columns: 56px minmax(0, 1fr) 120px; }
  .game .signals { grid-column: 2 / -1; grid-row: 2; }
}
.workspace > section { min-width: 0; }
@media (max-width: 700px) {
  .topbar { height: auto; flex-wrap: wrap; padding: 8px 12px 0; gap: 6px 10px; }
  .topbar .spacer { flex: 1; }
  .nav { order: 3; width: 100%; height: 44px; overflow-x: auto; scrollbar-width: none; }
  .nav a { white-space: nowrap; margin-top: 0; padding: 0 12px; }
  .tz { max-width: 118px; }
  .facts { gap: 18px; padding: 12px 0; }
  .page-head h1 { font-size: 24px; }
  .usermenu .who { display: none; }
  .usermenu > button { padding: 4px; }
  .page { padding: 16px 12px 48px; }
  .game { grid-template-columns: 48px minmax(0, 1fr); gap: 8px 12px; padding: 12px; }
  .game .signals { grid-column: 1 / -1; grid-row: auto; }
  .game .edge { grid-column: 1 / -1; }
  .drawer-head, .drawer-body { padding-left: 16px; padding-right: 16px; }
  .drawer-head h2 { font-size: 23px; }
  .mkt { grid-template-columns: 1fr; gap: 6px; }
  .versus-head, .vrow { grid-template-columns: 1fr minmax(90px, 120px) 1fr; padding: 8px 10px; gap: 8px; }
  .acca-grid { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login .art { min-height: 220px; padding: 28px; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .login .form { padding: 28px 20px; }
  .modal .grid2 { grid-template-columns: 1fr; }
  .nav a { padding: 0 10px; }
  .brand span { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- tema ---------- */
.themebtn { background: transparent; border: 1px solid var(--line); border-radius: 8px; width: 34px; height: 32px; cursor: pointer; display: grid; place-items: center; color: var(--dim); }
.themebtn:hover { color: var(--text); border-color: var(--faint); }

/* ---------- famílias de mercado ---------- */
[data-f='res'] { --fc: var(--m-res); } [data-f='goals'] { --fc: var(--m-goals); } [data-f='under'] { --fc: var(--m-under); }
[data-f='btts'] { --fc: var(--m-btts); } [data-f='half'] { --fc: var(--m-half); } [data-f='corners'] { --fc: var(--m-corners); }
[data-f='late'] { --fc: var(--m-late); } [data-f='other'] { --fc: var(--m-other); }
.fdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--fc, var(--faint)); flex: none; margin-right: 7px; }
.sig[data-f]::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--fc); align-self: center; flex: none; }
.mkt[data-f], .accaline[data-f], .ins[data-f] { border-left: 3px solid var(--fc); }
.acca[data-f] { border-top: 3px solid var(--fc); }
.famlist { display: flex; flex-wrap: wrap; gap: 6px; }
.fam { display: inline-flex; gap: 0; align-items: center; padding: 4px 10px 4px 9px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 13px; color: var(--dim); }
.fam:hover { color: var(--text); border-color: var(--faint); }
.fam[aria-pressed='true'] { border-color: var(--fc); color: var(--text); background: color-mix(in srgb, var(--fc) 16%, transparent); }

/* ---------- insights ---------- */
.insights { border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.ins { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; align-items: start; padding: 11px 16px; border-bottom: 1px solid var(--line-soft); }
.ins:last-child { border-bottom: 0; }
.ins b { font-family: var(--font-display); font-weight: 600; }
.ins small { display: block; color: var(--dim); font-size: 13px; margin-top: 2px; }
.ins.alerta { border-left-color: var(--amber-fill); }
.ins.info b { font-weight: 550; }
.ins-foot { margin: 8px 2px 0; font-size: 12.5px; color: var(--faint); }
.support { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.support small { color: var(--dim); font-size: 12px; max-width: 24ch; line-height: 1.3; }
.sig .ck { font-weight: 700; margin-left: 2px; }
.sig.v.ok { border-color: color-mix(in srgb, var(--grass-fill) 60%, transparent); }
.sig.v.bad { border-style: dashed; }

@media (max-width: 700px) { .themebtn { width: 32px; } }

/* ---------- compartilhamento ---------- */
.head-actions { display: flex; gap: 8px; align-items: center; }
.sharebtn { display: inline-flex; align-items: center; gap: 7px; }
.share-dlg .linkrow { display: flex; gap: 8px; }
.share-dlg .linkrow .input { flex: 1; min-width: 0; font-size: 14px; }
.share-dlg .linkrow .btn, .btn:has(> svg) { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.shbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.shbtn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--raised); color: var(--text); font: 600 14px var(--font-body); text-decoration: none; cursor: pointer; }
.shbtn:hover { border-color: var(--faint); }
.shbtn.whatsapp { color: #25a55b; }
.shbtn.telegram { color: #2a9fd6; }
html[data-theme='light'] .shbtn.whatsapp { color: #168043; }
html[data-theme='light'] .shbtn.telegram { color: #1b78a8; }
.shbtn span { color: var(--text); }

.share-top { position: static; }
.sharepage { max-width: 980px; margin: 0 auto; padding: 22px 20px 60px; }
.sharecard { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg); }
.sharecard .drawer-body { overflow: visible; padding-bottom: 32px; }
.sh-title { font-size: 30px; }
.sh-title .vs { color: var(--faint); font-weight: 400; font-size: 20px; margin: 0 6px; }
.share-foot { margin-top: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 20px 22px; }
.share-cta { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.share-cta b { display: block; font-family: var(--font-display); font-size: 19px; }
.share-cta small { color: var(--dim); }
.share-cta .cta { padding: 11px 20px; font-size: 15px; text-decoration: none; }
.share-again { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.share-18 { margin: 16px 0 0; font-size: 12.5px; color: var(--faint); }
.share-gone { margin-top: 80px; }
@media (max-width: 700px) {
  .sharepage { padding: 14px 12px 40px; }
  .sh-title { font-size: 23px; }
  .share-top { padding: 8px 12px; }
  .share-cta .cta { width: 100%; text-align: center; }
}
.panel-form { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 18px 20px; display: grid; gap: 14px; max-width: 820px; }
.panel-form h3 { margin: 0; }
.panel-form .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .panel-form .grid2 { grid-template-columns: 1fr; } }
