/* BilheteCerto — tokens da marca: papel, tinta e o verde da logo. */
:root {
  --brand-green: #16C784;
  --accent: #16C784;          /* preenchimentos (botões, seleção) */
  --accent-2: #12B074;
  --accent-ink: #0B1A12;      /* texto sobre o verde */
  --accent-text: #0B8A5A;     /* verde usado como texto */
  --bg: #F6F5F0;              /* papel */
  --bg-2: #FBFAF7;
  --panel: #FFFFFF;           /* folha */
  --panel-2: #F0EFE9;
  --line: #E2E0D8;
  --line-2: #D3D1C7;
  --text: #13201A;            /* tinta da logo */
  --muted: #5B6660;
  --danger: #D9363E;
  --warn: #B86E00;
  --ok: #0B8A5A;
  --info: #2F6FB3;
  --shadow: 0 1px 2px rgba(19, 32, 26, .06), 0 8px 24px rgba(19, 32, 26, .08);
  --top: 60px;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: light;
}
:root[data-mode="dark"] {
  --accent-2: #2BD896;
  --accent-text: #3FDB9E;
  --bg: #111A15;              /* verde-tinta, não preto */
  --bg-2: #142019;
  --panel: #18251E;
  --panel-2: #1F2E26;
  --line: #273830;
  --line-2: #33473C;
  --text: #EDF2EE;
  --muted: #9AAAA1;
  --danger: #F0616A;
  --warn: #E9A23B;
  --ok: #3FDB9E;
  --info: #6FA8E8;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.link { color: var(--accent-text); font-weight: 700; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

/* Ícones (sprite Tabler) */
.i { width: 18px; height: 18px; flex: 0 0 auto; vertical-align: -4px; }
.i.inline { width: 15px; height: 15px; vertical-align: -2px; }

/* ---------- topo ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--top);
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; color: var(--text); }
.brand .logo { height: 30px; width: auto; display: block; }
.topnav { display: flex; gap: 2px; margin-left: 20px; }
.topnav a { display: flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.topnav a:hover, .topnav a.active { color: var(--text); background: var(--panel-2); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { background: transparent; border: 0; width: 38px; height: 38px; border-radius: 8px; display: inline-grid; place-items: center; color: var(--muted); }
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.icon-btn .i { width: 20px; height: 20px; }
.ghost-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: transparent; border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 12px; font-weight: 600;
}
.ghost-btn:hover { background: var(--panel-2); }
.primary-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink);
  border: 0; border-radius: 8px; padding: 12px 18px; font-weight: 800;
}
.primary-btn:hover { background: var(--accent-2); }
.primary-btn:disabled { opacity: .5; cursor: not-allowed; }
.primary-btn.sm { padding: 8px 16px; }
.primary-btn.block, .ghost-btn.block { width: 100%; }
.wa-btn { background: #25D366; color: #06301A; }
.wa-btn:hover { background: #1FBF5B; }
.danger-btn { background: transparent; color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent); border-radius: 8px; padding: 8px 12px; font-weight: 600; }

/* ---------- layout ---------- */
.layout {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr) 330px;
  height: calc(100vh - var(--top));
  height: calc(100dvh - var(--top));
}
.sidebar, .slip, .main { overflow-y: auto; }
.sidebar { background: var(--bg-2); border-right: 1px solid var(--line); }
.slip { background: var(--bg); border-left: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px; }
.main { padding: 20px 24px 80px; }
.main:focus { outline: none; }
.scrim, .slip-fab, .only-mobile { display: none; }

/* ---------- barra lateral ---------- */
.side-sport { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; font-weight: 700; }
.side-sport .i { color: var(--muted); }
.side-sport select { flex: 1; background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; font-weight: 700; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-weight: 700; }
.side-link .i { color: var(--muted); }
.side-link:hover { background: var(--panel-2); }
.side-link.active { background: var(--panel-2); box-shadow: inset 3px 0 0 var(--accent); }
.sidebar > .side-link:last-of-type { border-bottom: 1px solid var(--line); margin-bottom: 6px; padding-bottom: 14px; }
.country > button {
  width: 100%; display: flex; align-items: center; gap: 10px;
  background: none; border: 0;
  padding: 9px 16px; text-align: left; font-weight: 600;
}
.country > button:hover { background: var(--panel-2); }
.flag { width: 20px; height: 15px; border-radius: 2px; object-fit: cover; flex: 0 0 auto; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
svg.flag { box-shadow: none; color: var(--muted); height: 18px; }
.country .count { margin-left: auto; color: var(--muted); font-size: 12px; }
.country .chev { color: var(--muted); width: 16px; height: 16px; transition: transform .15s; }
.country.open .chev { transform: rotate(90deg); }
.country .leagues { display: none; padding-bottom: 4px; }
.country.open .leagues { display: block; }
.country .leagues a { display: flex; padding: 7px 16px 7px 46px; color: var(--muted); }
.country .leagues a:hover, .country .leagues a.active { color: var(--text); background: var(--panel-2); }
.country .leagues a span { margin-left: auto; font-size: 12px; }

/* ---------- topo da página inicial ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: center;
  background: var(--text); color: var(--bg);
  border-radius: 14px; padding: 32px 36px; margin-bottom: 28px;
}
:root[data-mode="dark"] .hero { background: var(--panel); color: var(--text); border: 1px solid var(--line); }
.hero h1 { font-size: clamp(26px, 3.2vw, 38px); line-height: 1.08; font-weight: 800; letter-spacing: -.025em; max-width: 15ch; }
.hero p { margin: 12px 0 0; max-width: 46ch; font-size: 15px; opacity: .8; }
.how { list-style: none; counter-reset: how; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; }
.how li { counter-increment: how; display: flex; align-items: center; gap: 8px; opacity: .9; }
.how li::before {
  content: counter(how); width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 12px;
  background: var(--brand-green); color: #0B1A12;
}
/* O bilhete de exemplo: mesmo recorte do símbolo da marca. */
.hero-ticket {
  --notch: 11px;
  background: var(--bg); color: var(--text);
  border-radius: 10px; padding: 16px 18px 14px;
  transform: rotate(-3deg);
  -webkit-mask: radial-gradient(circle var(--notch) at 0 calc(100% - 52px), transparent 98%, #000) , radial-gradient(circle var(--notch) at 100% calc(100% - 52px), transparent 98%, #000);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  mask: radial-gradient(circle var(--notch) at 0 calc(100% - 52px), transparent 98%, #000), radial-gradient(circle var(--notch) at 100% calc(100% - 52px), transparent 98%, #000);
}
:root[data-mode="dark"] .hero-ticket { background: var(--bg-2); }
.ht-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; font-weight: 700; color: var(--muted); padding-bottom: 8px; }
.ht-top b { color: var(--text); font-size: 14px; letter-spacing: .04em; }
.ht-leg { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.ht-leg span { display: flex; flex-direction: column; min-width: 0; }
.ht-leg small { color: var(--muted); font-size: 12px; }
.ht-total { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 14px; border-top: 2px dashed var(--line-2); font-weight: 800; }
.ht-total span:last-child { color: var(--accent-text); text-align: right; }
.ht-total small { display: block; color: var(--muted); font-weight: 600; font-size: 11px; }

/* ---------- seções ---------- */
.section-title { font-size: 18px; font-weight: 800; margin: 0 0 12px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; display: flex; align-items: center; gap: 10px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 700; }
.back:hover { color: var(--text); }

.featured { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; margin-bottom: 26px; }
.fcard {
  flex: 0 0 290px; scroll-snap-align: start;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px;
}
.fcard.pinned { border: 2px solid var(--accent); box-shadow: var(--shadow); padding-top: 10px; }
.pin-tag { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 8px; padding: 3px 9px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.pin-tag .i { width: 13px; height: 13px; }
.fcard .fhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 600; }
.fcard .fhead > span:first-child { display: flex; align-items: center; gap: 7px; }
.fcard .fhead b { color: var(--text); display: block; font-size: 15px; text-align: right; }
.fcard .vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; text-align: center; margin: 14px 0; gap: 6px; font-weight: 700; }
.fcard .vs small { color: var(--muted); font-weight: 600; }
.fcard .vs .team { display: flex; flex-direction: column; align-items: center; gap: 8px; }

/* Escudo provisório: iniciais do time sobre a cor dele. */
.badge {
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-grid; place-items: center; flex: 0 0 auto;
  font-size: 10px; font-weight: 800; color: #fff; letter-spacing: -.02em;
  background: var(--b, #445);
}
.badge.lg { width: 50px; height: 50px; font-size: 16px; }
.badge.xl { width: 68px; height: 68px; font-size: 21px; }

.toggle { display: inline-grid; grid-template-columns: 1fr 1fr; background: var(--panel-2); border-radius: 10px; padding: 4px; margin-bottom: 14px; min-width: 300px; }
.toggle button { border: 0; background: none; padding: 9px 18px; border-radius: 7px; font-weight: 700; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 8px; }
.toggle button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(19, 32, 26, .12); }
.pill-count { background: var(--danger); color: #fff; border-radius: 99px; font-size: 11px; font-weight: 800; padding: 1px 7px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); display: inline-block; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.live-tag { color: var(--danger); font-weight: 800; }

.sports { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 10px; }
.sport-chip {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 99px;
  padding: 7px 12px 7px 10px; font-weight: 700; white-space: nowrap;
}
.sport-chip .i { color: var(--muted); }
.sport-chip small { color: var(--muted); font-size: 12px; font-weight: 600; }
.sport-chip:hover { border-color: var(--line-2); }
.sport-chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.sport-chip.on .i, .sport-chip.on small { color: inherit; opacity: .75; }

.days { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.days button { flex: 0 0 auto; background: none; border: 0; padding: 9px 12px; font-weight: 700; color: var(--muted); box-shadow: inset 0 -2px 0 transparent; }
.days button:hover { color: var(--text); }
.days button.on { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.search { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; margin-bottom: 16px; color: var(--muted); }
.search:focus-within { border-color: var(--line-2); }
.search input { flex: 1; border: 0; background: none; padding: 11px 0; outline: none; color: var(--text); }

.league-block { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; overflow: hidden; }
.league-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-weight: 800; font-size: 13px; border-bottom: 1px solid var(--line); }
.league-head > .i { color: var(--muted); }
.league-head a:hover { text-decoration: underline; }
.league-head .cols { margin-left: auto; display: grid; grid-template-columns: repeat(3, 64px); gap: 6px; text-align: center; color: var(--muted); font-size: 11px; font-weight: 600; }
.league-head .cols.two { grid-template-columns: repeat(2, 64px); }
.mrow { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto 44px; align-items: center; gap: 10px; padding: 10px 14px; }
.mrow + .mrow { border-top: 1px solid var(--line); }
.mrow .when { font-size: 12px; color: var(--muted); line-height: 1.3; }
.mrow .when b { color: var(--text); display: block; font-size: 14px; }
.mrow .when .live { color: var(--danger); font-weight: 800; }
.mrow .teams { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mrow .teams div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mrow .teams span.n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.mrow .teams:hover span.n { text-decoration: underline; text-decoration-color: var(--line-2); }
.mrow .teams .sc { margin-left: auto; font-weight: 800; color: var(--danger); }
.mrow .more { text-align: center; color: var(--muted); font-size: 12px; font-weight: 700; border-radius: 8px; padding: 9px 0; }
.mrow .more:hover { background: var(--panel-2); color: var(--text); }

/* Cotações: neutras; o verde fica só para o que está no bilhete. */
.odds { display: grid; grid-template-columns: repeat(3, 64px); gap: 6px; }
.odds.two { grid-template-columns: repeat(2, 64px); }
.odd {
  background: var(--panel-2); border: 1px solid transparent; border-radius: 8px;
  padding: 7px 4px; text-align: center; font-weight: 800; font-size: 14px; color: var(--text);
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 40px; justify-content: center;
}
.odd small { color: var(--muted); font-size: 11px; font-weight: 600; }
.odd:hover { border-color: var(--line-2); background: var(--panel); }
.odd.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.odd.on small { color: inherit; opacity: .75; }
.odd.locked { opacity: .45; cursor: not-allowed; color: var(--muted); }
.odd.locked .i { width: 15px; height: 15px; }
.odd.up { animation: up 1.5s; } .odd.down { animation: down 1.5s; }
@keyframes up { 0%, 60% { box-shadow: inset 0 0 0 2px var(--ok); } }
@keyframes down { 0%, 60% { box-shadow: inset 0 0 0 2px var(--danger); } }
.fcard .odds { grid-template-columns: repeat(3, 1fr); }
.fcard .odds.two { grid-template-columns: repeat(2, 1fr); }

.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 48px 20px; color: var(--muted); max-width: 46ch; margin: 0 auto; }
.empty-ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); color: var(--muted); }
.empty-ic .i { width: 24px; height: 24px; }
.skeleton { height: 64px; border-radius: 12px; background: linear-gradient(90deg, var(--panel) 0, var(--panel-2) 50%, var(--panel) 100%); background-size: 200% 100%; animation: sk 1.2s infinite; margin-bottom: 10px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- página do jogo ---------- */
.match-hero { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 16px; }
.match-hero .lg { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--muted); font-weight: 600; font-size: 13px; }
.match-hero .lg a:hover { text-decoration: underline; }
.match-hero .vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-top: 16px; }
.match-hero .team { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-weight: 800; font-size: 16px; }
.match-hero .center { text-align: center; }
.match-hero .score { font-size: 36px; font-weight: 800; letter-spacing: -.02em; }
.match-hero .clock { color: var(--danger); font-weight: 800; }
.mtabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.mtabs button { flex: 0 0 auto; border: 0; background: none; padding: 9px 12px; font-weight: 700; color: var(--muted); box-shadow: inset 0 -2px 0 transparent; }
.mtabs button.on { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.market { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.market h3 { font-size: 14px; font-weight: 800; padding: 12px 14px 0; }
.market .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; padding: 10px 12px 12px; }
.market .grid.c3 { grid-template-columns: repeat(3, 1fr); }
.market .grid.c2 { grid-template-columns: repeat(2, 1fr); }
.market .odd { flex-direction: row; justify-content: space-between; padding: 10px 12px; }
.market .odd small { font-size: 13px; color: var(--text); text-align: left; font-weight: 600; }
.market .odd.on small { color: inherit; }

/* ---------- bilhete (slip): um bilhete de papel ---------- */
.slip > * { flex: 0 0 auto; }
.slip-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 12px; font-weight: 800; font-size: 15px; }
.slip-head .n { background: var(--text); color: var(--bg); border-radius: 99px; padding: 0 8px; font-size: 12px; }
.slip-head .x { margin-left: auto; }
.slip-head .clear { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.slip-head .clear:hover { color: var(--danger); }
.slip-body {
  flex: 1 1 auto; overflow-y: auto; padding: 4px 14px;
  background: var(--panel); border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0;
}
.slip-body:last-child { border-bottom: 1px solid var(--line); border-radius: 12px; }
.slip-empty { height: 100%; min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); gap: 6px; padding: 30px 10px; }
.slip-empty b { color: var(--text); }
.sel { padding: 12px 22px 12px 0; position: relative; }
.sel + .sel { border-top: 1px solid var(--line); }
.sel .t { font-weight: 800; }
.sel .m { color: var(--muted); font-size: 12px; margin-top: 2px; }
.sel .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 4px; }
.sel .pr { font-weight: 800; font-size: 15px; }
.sel .rm { position: absolute; top: 10px; right: -6px; background: none; border: 0; color: var(--muted); padding: 2px; border-radius: 6px; display: grid; }
.sel .rm:hover { color: var(--text); background: var(--panel-2); }
.sel .rm .i { width: 16px; height: 16px; }
.sel.changed { background: color-mix(in srgb, var(--warn) 10%, transparent); box-shadow: -14px 0 0 color-mix(in srgb, var(--warn) 10%, transparent), 14px 0 0 color-mix(in srgb, var(--warn) 10%, transparent); }
.sel.bad { opacity: .6; }
.sel.bad .t { color: var(--danger); }
/* Picote entre as seleções e o total, com os recortes laterais do símbolo da marca. */
.slip-foot {
  position: relative; display: grid; gap: 12px; padding: 18px 14px 16px;
  background: var(--panel); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px;
  background-image: linear-gradient(90deg, var(--line-2) 50%, transparent 0);
  background-size: 10px 2px; background-repeat: repeat-x; background-position: 0 0;
}
.slip-foot::before, .slip-foot::after {
  content: ''; position: absolute; top: -11px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line);
}
.slip-foot::before { left: -12px; clip-path: inset(0 0 0 50%); }
.slip-foot::after { right: -12px; clip-path: inset(0 50% 0 0); }
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 700; }
.input { width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 11px 12px; outline: none; }
.input:focus { border-color: var(--text); }
.money { position: relative; }
.money span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; }
.money .input { padding-left: 38px; font-weight: 800; font-size: 15px; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.quick button { background: var(--panel-2); border: 0; border-radius: 6px; padding: 7px 0; font-weight: 700; font-size: 12px; }
.quick button:hover { background: var(--line); }
.sum { display: flex; justify-content: space-between; font-size: 13px; }
.sum b { font-weight: 800; }
.sum.big { font-size: 14px; font-weight: 700; }
.sum.big b { color: var(--accent-text); font-size: 18px; }
.note { font-size: 12px; color: var(--muted); }
.warnbox { background: color-mix(in srgb, var(--warn) 12%, transparent); border-left: 3px solid var(--warn); border-radius: 6px; padding: 9px 11px; font-size: 13px; }
.errbox { background: color-mix(in srgb, var(--danger) 10%, transparent); border-left: 3px solid var(--danger); border-radius: 6px; padding: 9px 11px; font-size: 13px; }

/* ---------- cartões / bilhete consultado ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 14px; }
.narrow { max-width: 720px; margin: 0 auto; }
.code-input { display: flex; gap: 8px; }
.code-input .input { font-family: var(--mono); font-size: 16px; text-transform: uppercase; letter-spacing: .06em; }
.tk-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.tk-head .code { font-family: var(--mono); font-size: 24px; font-weight: 700; letter-spacing: .04em; }
.tk-head .kind { font-size: 13px; font-weight: 700; color: var(--muted); }
.status { margin-left: auto; border-radius: 99px; padding: 4px 12px; font-weight: 800; font-size: 12px; white-space: nowrap; }
.st-open, .st-pending { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.st-won, .st-converted { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.st-lost, .st-expired, .st-cancelled { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.st-cashed_out, .st-void { background: color-mix(in srgb, var(--info) 16%, transparent); color: var(--info); }
/* Quadro de valores: as células crescem para preencher a linha, sem sobra vazia. */
.kv { display: flex; flex-wrap: wrap; margin: 16px 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.kv div { flex: 1 1 130px; padding: 10px 12px; box-shadow: -1px -1px 0 var(--line); }
.kv small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.kv b { font-size: 16px; font-weight: 800; }
.leg { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); align-items: start; }
.leg .ic { display: grid; place-items: center; height: 20px; color: var(--muted); }
.leg .ic.lg-won { color: var(--ok); } .leg .ic.lg-lost { color: var(--danger); } .leg .ic.lg-void { color: var(--info); }
.pdot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.leg .t { font-weight: 800; }
.leg .m { color: var(--muted); font-size: 12px; margin-top: 2px; }
.leg .pr { font-weight: 800; text-align: right; }
.leg .pr small { display: block; color: var(--muted); font-weight: 600; font-size: 11px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.actions > * { flex: 1 1 160px; }
.mylist a { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.mylist a:hover .mono { text-decoration: underline; }
.mylist a .mono { font-weight: 700; }

/* ---------- modal / toast ---------- */
.modal { position: fixed; inset: 0; z-index: 80; background: rgba(10, 18, 14, .55); display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-card { width: min(440px, 100%); max-height: 90vh; overflow-y: auto; background: var(--panel); border-radius: 14px; padding: 24px; box-shadow: var(--shadow); }
.modal-card h2 { font-size: 20px; font-weight: 800; }
.success-ico { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; margin: 0 auto 12px; }
.success-ico .i { width: 28px; height: 28px; stroke-width: 2.5; }
.big-code { font-family: var(--mono); font-size: 30px; font-weight: 700; text-align: center; letter-spacing: .08em; background: var(--bg); border: 2px dashed var(--line-2); border-radius: 10px; padding: 14px; margin: 14px 0; }
.center { text-align: center; }
.stack { display: grid; gap: 8px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; transition: .25s; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-weight: 700; z-index: 90; pointer-events: none; max-width: calc(100% - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- regulamento / app ---------- */
.prose { line-height: 1.65; }
.prose > p, .prose li { max-width: 72ch; }
.prose h2 { font-size: 16px; font-weight: 800; margin: 24px 0 6px; }
.prose p, .prose li { color: var(--text); }
.app-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.step { background: var(--panel-2); border-radius: 10px; padding: 14px; }
.step b { display: block; margin-bottom: 6px; }

/* ---------- painel ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; margin-bottom: 14px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.stat { background: var(--panel); padding: 14px 16px; }
.stat small { color: var(--muted); font-weight: 600; font-size: 12px; }
.stat b { display: block; font-size: 22px; font-weight: 800; margin-top: 2px; letter-spacing: -.01em; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px 8px; border-top: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
.table th { color: var(--muted); font-size: 12px; font-weight: 700; border-top: 0; }
.table td.mono { font-weight: 700; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
/* ---------- painel ---------- */
.ptabs { display: flex; gap: 4px; margin: -4px 0 16px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ptabs a { padding: 10px 14px; font-weight: 700; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.ptabs a:hover { color: var(--text); }
.ptabs a.on { color: var(--text); border-bottom-color: var(--accent); }
.ptabs .count { background: var(--danger); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 7px; font-weight: 800; }
.row-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.row-head > :last-child:not(:first-child) { margin-left: auto; }
.input.sm { width: auto; padding: 7px 10px; font-size: 13px; }
.agent-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.agent-card { display: grid; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--bg-2); transition: border-color .15s, background .15s; }
.agent-card:hover, .agent-card:focus-visible { border-color: var(--text); background: var(--panel); }
.agent-top { display: flex; align-items: center; gap: 10px; }
.agent-top b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-go { margin-left: auto; color: var(--muted); flex: none; }
.agent-ava { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-text); }
.agent-ava.lg { width: 52px; height: 52px; font-size: 18px; }
.agent-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); }
.agent-meta b { color: var(--text); }
.bar { height: 6px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.bar.high i { background: var(--warn); }
.bar.full i { background: var(--danger); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.rates-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.input-suffix { position: relative; }
.input-suffix .input { padding-right: 28px; }
.input-suffix span { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; pointer-events: none; }
.input:disabled { opacity: .55; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 99px; padding: 3px; gap: 2px; }
.seg label { padding: 6px 14px; border-radius: 99px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--muted); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--text); color: var(--bg); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 520px) {
  .rates-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ptabs { gap: 0; }
  .ptabs a { padding: 10px 9px; font-size: 13px; }
}
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.filters button { border: 1px solid var(--line); background: var(--panel); border-radius: 99px; padding: 6px 12px; font-weight: 700; color: var(--muted); font-size: 12px; }
.filters button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.footer-note { color: var(--muted); font-size: 12px; text-align: center; margin-top: 36px; line-height: 1.7; }
.footer-note b { color: var(--text); }

/* ---------- responsivo ---------- */
@media (max-width: 1280px) {
  .layout { grid-template-columns: 240px minmax(0, 1fr) 310px; }
  .topnav a span { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-ticket { display: none; }
}
@media (max-width: 1024px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .only-mobile { display: inline-grid; place-items: center; }
  .sidebar {
    position: fixed; top: var(--top); bottom: 0; left: 0; width: 290px; z-index: 60;
    transform: translateX(-100%); transition: transform .2s;
  }
  body.menu-open .sidebar { transform: none; }
  .scrim { position: fixed; inset: var(--top) 0 0 0; background: rgba(10, 18, 14, .5); z-index: 55; }
  body.menu-open .scrim, body.slip-open .scrim { display: block; }
  .slip {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; max-height: 88vh; max-height: 88dvh;
    border: 0; border-radius: 16px 16px 0 0;
    transform: translateY(105%); transition: transform .22s; box-shadow: var(--shadow);
  }
  body.slip-open .slip { transform: none; }
  .slip-fab {
    position: fixed; left: 16px; right: 16px; bottom: 14px; z-index: 50;
    display: none; align-items: center; justify-content: space-between; gap: 10px;
    background: var(--text); color: var(--bg); border: 0; border-radius: 12px; padding: 14px 16px; font-weight: 800;
    box-shadow: var(--shadow);
  }
  body.has-sel .slip-fab { display: flex; }
  .slip-fab .fab-l { display: flex; align-items: center; gap: 8px; }
  .slip-fab b { background: var(--accent); color: var(--accent-ink); border-radius: 99px; padding: 0 8px; font-size: 12px; }
  .main { padding: 16px 16px 100px; }
}
@media (max-width: 760px) {
  .topnav { display: none; }
  .topbar { padding: 0 8px 0 4px; gap: 4px; }
  .brand .logo { height: 24px; }
  .hero { padding: 22px 20px; border-radius: 12px; margin-bottom: 22px; }
  .how { flex-direction: column; gap: 8px; }
  .toggle { display: grid; min-width: 0; }
  .mrow { grid-template-columns: 46px minmax(0, 1fr) 36px; grid-template-areas: "w t m" "o o o"; row-gap: 8px; }
  .mrow .when { grid-area: w; } .mrow .teams { grid-area: t; } .mrow .more { grid-area: m; } .mrow .odds { grid-area: o; }
  .odds { grid-template-columns: repeat(3, 1fr); }
  .odds.two { grid-template-columns: repeat(2, 1fr); }
  .league-head .cols { display: none; }
  .fcard { flex-basis: 265px; }
  .market .grid.c3 { grid-template-columns: 1fr 1fr 1fr; }
  .market .grid.c3 .odd { flex-direction: column; align-items: center; padding: 8px 4px; }
  .match-hero .score { font-size: 28px; }
}
.mobile-nav { display: none; }
@media (max-width: 760px) {
  .mobile-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 14px; }
  .mobile-nav a { display: flex; align-items: center; justify-content: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 6px; font-weight: 700; font-size: 12px; }
  .mobile-nav .i { width: 16px; height: 16px; color: var(--muted); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .topbar, .sidebar, .slip, .slip-fab, .actions, .no-print { display: none !important; }
  .layout { display: block; height: auto; }
  .main { overflow: visible; }
}
.mrow .odd small { display: none; }
@media (max-width: 760px) { .mrow .odd small { display: block; } }
