/* ===== Tokens ===== */
/* Identidade: preto, vermelho e branco (cores do logo public/img/logo.svg). */
:root {
  --bg: #050505;
  --bg-2: #0e0e0e;
  --surface: #151515;
  --surface-2: #1f1f1f;
  --border: #2c2c2c;
  --text: #ffffff;
  --muted: #a3a3a3;
  --accent: #d84040;
  --accent-text: #ffffff;
  --danger: #ef4444;
  --warn: #f59e0b;
  --live: #ff2d2d;
  /* Fallbacks; views/partials/head.ejs overrides them with the colours from Admin > Configurações. */
  --primary: #d03a3a;
  --primary-text: #ffffff;
  --secondary: #000000;
  --secondary-text: #ffffff;
  --win: #19c37d;
  --lose: #ef4444;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(0, 0, 0, .35);
  --side-w: 264px;
  --slip-w: 336px;
}
:root[data-theme="light"] {
  --bg: #f3f3f3;
  --bg-2: #eaeaea;
  --surface: #ffffff;
  --surface-2: #f7f7f7;
  --border: #dddddd;
  --text: #0a0a0a;
  --muted: #666666;
  --accent: #c62828;
  --accent-text: #ffffff;
  /* Status colours darkened for white backgrounds (WCAG AA 4.5:1; the dark-theme values gave 2.2–3.8:1 here). */
  --win: #0f7a4d;
  --lose: #c62828;
  --danger: #c62828;
  --warn: #a15c00;
  --live: #d50000;
  --shadow: 0 6px 24px rgba(0, 0, 0, .08);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) { --bg: #f3f3f3; --surface: #fff; --text: #0a0a0a; }
}

* { box-sizing: border-box; }
/* Scrollbars: thin, in the site's colours (Firefox and Chrome use scrollbar-color; older WebKit the pseudo-elements). */
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--primary) 65%, var(--surface-2)) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--primary) 65%, var(--surface-2)); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--primary); }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 14px/1.45 Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
p a, .prose a, .small a { color: var(--accent); }
h1, h2, h3 { margin: 0 0 .6em; line-height: 1.2; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 11px; width: 100%; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: transparent; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--accent); }
input[type="color"] { padding: 2px; height: 40px; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.center { text-align: center; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.neg { color: var(--lose) !important; }
.pos { color: var(--win); }
.show-sm, .show-md { display: none !important; }
/* read by screen readers, not shown */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 8px; padding: 9px 16px; font-weight: 600;
  white-space: nowrap; transition: filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.1); color: inherit; }
.btn-sm { padding: 6px 11px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: var(--primary-text); }
.btn-accent { background: var(--accent); color: var(--accent-text); }
.btn-accent:hover { color: var(--accent-text); }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-danger { background: var(--danger); color: #fff; }
/* the ticket's WhatsApp share (public/js/share-ticket.js): WhatsApp green in every visual */
.btn-whatsapp, a.btn-whatsapp { background: #25d366; color: #052e16; border-color: #25d366; }
.btn-whatsapp:hover { filter: brightness(1.05); color: #052e16; }
.btn-whatsapp[aria-busy="true"] { opacity: .7; cursor: progress; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
/* A link drawn as a button keeps its own colours inside tables and texts, whose plain links are coloured
   (without this, "Validar" or "Analisar" showed red text on a red button until the mouse was over it). */
.btn.btn-primary, .btn.btn-primary:hover { color: var(--primary-text); }
.btn.btn-accent, .btn.btn-accent:hover { color: var(--accent-text); }
.btn.btn-danger, .btn.btn-danger:hover { color: #fff; }
.btn.btn-ghost, .btn.btn-ghost:hover { color: var(--text); }
.icon-btn { background: transparent; border: 0; padding: 8px; border-radius: 8px; color: inherit; }
.icon-btn:hover { background: rgba(255, 255, 255, .08); }
.link-btn { background: none; border: 0; color: var(--muted); padding: 4px; font-size: .85rem; }
.link-btn:hover { color: var(--text); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pill {
  display: inline-block; min-width: 20px; padding: 1px 7px; border-radius: 99px; font-size: .75rem;
  font-weight: 700; background: var(--surface-2); color: var(--text); text-align: center;
}
.pill-live { background: var(--live); color: #fff; }
.pill-warn { background: var(--warn); color: #111; }

/* ===== Header ===== */
.topbar { background: var(--secondary); color: var(--secondary-text); border-bottom: 3px solid var(--primary); position: sticky; top: 0; z-index: 30; box-shadow: var(--shadow); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; max-width: 1600px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .5px; color: inherit; }
.brand:hover { color: inherit; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar .btn-ghost, .topbar .btn.btn-ghost, .topbar .btn.btn-ghost:hover { border-color: rgba(255, 255, 255, .35); color: var(--secondary-text); }
.login-inline { display: flex; gap: 6px; align-items: center; }
.login-inline input { width: 130px; padding: 7px 10px; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .25); color: var(--secondary-text); }
.login-inline input::placeholder { color: rgba(255, 255, 255, .7); }
.user-box { display: flex; align-items: center; gap: 8px; }
.user-box form { margin: 0; }
.balance { display: flex; flex-direction: column; line-height: 1.1; text-align: right; color: inherit; }
.balance small { opacity: .75; font-size: .75rem; }
.mainnav {
  display: flex; gap: 2px; overflow-x: auto; padding: 0 12px; background: var(--secondary);
  color: var(--secondary-text); scrollbar-width: none;
}
.mainnav::-webkit-scrollbar { display: none; }
.mainnav a { padding: 11px 14px; white-space: nowrap; font-weight: 600; font-size: .9rem; border-bottom: 3px solid transparent; display: flex; gap: 7px; align-items: center; color: inherit; opacity: .85; }
.mainnav a:hover { opacity: 1; color: inherit; }
.mainnav a.active { border-bottom-color: var(--accent); opacity: 1; }

.flash { max-width: 1600px; margin: 12px auto 0; padding: 11px 16px; border-radius: var(--radius); font-weight: 500; width: calc(100% - 32px); }
.flash-success { background: rgba(25, 195, 125, .15); border: 1px solid rgba(25, 195, 125, .4); }
.flash-error { background: rgba(239, 68, 68, .15); border: 1px solid rgba(239, 68, 68, .4); }

/* ===== Layout ===== */
.layout {
  display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr) var(--slip-w);
  gap: 22px; padding: 22px 24px; max-width: 1720px; margin: 0 auto; align-items: start;
}
.layout.no-slip { grid-template-columns: var(--side-w) minmax(0, 1fr); }
.layout.no-side { grid-template-columns: minmax(0, 1fr) var(--slip-w); }
.layout.no-side.no-slip { grid-template-columns: minmax(0, 1fr); max-width: 1100px; }
/* empty slip: hidden until the first selection (the board takes its room) */
body.slip-off .slip, body.slip-off .slip-fab { display: none !important; }
body.slip-off .layout:not(.no-slip):not(.no-side) { grid-template-columns: var(--side-w) minmax(0, 1fr); }
body.slip-off .layout.no-side:not(.no-slip) { grid-template-columns: minmax(0, 1fr); }
.content { min-width: 0; }

/* ===== Sidebar ===== */
.sidebar { position: sticky; top: 112px; max-height: calc(100vh - 128px); overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding-right: 4px; }
.widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.widget-title { font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-bottom: 10px; display: flex; gap: 7px; align-items: center; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form > input, .inline-form > select { flex: 1 1 160px; }
.inline-form .field { flex: 1 1 140px; }
.day-list { display: flex; flex-wrap: wrap; gap: 8px; }
.day-list a { padding: 6px 12px; border-radius: 99px; background: var(--surface-2); font-size: .82rem; text-transform: capitalize; }
.day-list a.active { background: var(--primary); color: var(--primary-text); }
.side-link { display: flex; align-items: center; gap: 8px; padding: 8px 8px; border-radius: 7px; font-size: .88rem; }
.side-link:hover { background: var(--surface-2); color: var(--text); }
.side-link i { width: 16px; color: var(--muted); }
.side-link .count { margin-left: auto; font-size: .75rem; color: var(--muted); }

/* ===== Board ===== */
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 8px 0 16px; flex-wrap: wrap; }
.board-head h1 { margin: 0; display: flex; align-items: center; gap: 8px; }
.board-head select { width: auto; }
.search { position: relative; flex: 0 1 320px; }
.search i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; }
.search input { padding-left: 32px; }
.league { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 18px; overflow: hidden; }
.league-head {
  display: flex; justify-content: space-between; align-items: center; padding: 11px 16px;
  background: var(--surface-2); font-weight: 700; font-size: .88rem; gap: 10px;
}
.league-head i { color: var(--muted); margin-right: 4px; }
.league-cols { display: grid; gap: 6px; width: 228px; margin-right: 0; text-align: center; color: var(--muted); font-size: .78rem; }
.league-cols.cols-2 { grid-template-columns: repeat(2, 1fr); width: 150px; }
.league-cols.cols-3 { grid-template-columns: repeat(3, 1fr); }
.match { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-top: 1px solid var(--border); scroll-margin-top: 130px; }
.match:target { background: color-mix(in srgb, var(--primary) 14%, var(--surface)); }
.match:hover { background: var(--surface-2); }
.match-info { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; color: inherit; }
.match-info:hover { color: inherit; }
.match-time { display: flex; flex-direction: column; font-size: .78rem; width: 52px; flex-shrink: 0; text-align: center; font-weight: 600; }
.match-teams { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-weight: 600; }
.match-teams span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: 8px; justify-content: space-between; }
.score { color: var(--accent); min-width: 18px; text-align: right; }
.match-odds { display: grid; gap: 6px; width: 228px; flex-shrink: 0; }
.match-odds.cols-2 { grid-template-columns: repeat(2, 1fr); width: 150px; }
.match-odds.cols-3 { grid-template-columns: repeat(3, 1fr); }
.match-side { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
/* "Mais mercados": a full-width button under the odds, easy to spot and to tap */
.match-more { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 6px 10px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: .78rem; font-weight: 600; }
.match-more b { color: var(--accent); }
.match-more i { font-size: .7rem; color: var(--muted); }
.match-more:hover { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 16%, var(--surface-2)); color: var(--text); }
.live-badge { color: #fff; background: var(--live); border-radius: 4px; padding: 1px 5px; font-size: .65rem; font-weight: 800; letter-spacing: .4px; display: inline-block; }
.minute { color: var(--live); font-weight: 700; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--live); display: inline-block; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* ===== Odd buttons ===== */
.odd {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 6px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px; padding: 7px 9px;
  min-height: 40px; transition: background .12s, border-color .12s, transform .08s;
}
.odd small { color: var(--muted); font-size: .75rem; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.odd strong { font-weight: 700; }
.odd:hover:not(:disabled) { border-color: var(--primary); }
.odd:active:not(:disabled) { transform: scale(.97); }
.odd.active { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.odd.active small { color: inherit; opacity: .85; }
.odd:disabled { opacity: .45; cursor: not-allowed; }
.odd:disabled strong::after { content: "\f023"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: .75rem; }
.odd.flash-up { animation: up 1.2s; }
.odd.flash-down { animation: down 1.2s; }
@keyframes up { 0%, 60% { box-shadow: inset 0 0 0 2px var(--win); } }
@keyframes down { 0%, 60% { box-shadow: inset 0 0 0 2px var(--lose); } }

/* Days of the board, scrolled sideways (phones and tablets; the sidebar has the same list on wide screens). */
.day-strip { display: none; flex-wrap: nowrap; gap: 8px; overflow-x: auto; margin: 4px 0 6px; padding-bottom: 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
.day-strip::-webkit-scrollbar { display: none; }
.day-strip .chip { white-space: nowrap; flex-shrink: 0; padding: 7px 14px; text-transform: capitalize; scroll-snap-align: start; }

/* ===== Featured ===== */
.featured-block .section-title { margin-top: 0; }
.featured { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 18px; scroll-snap-type: x mandatory; }
.feature-card {
  scroll-snap-align: start; border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 12px;
  background: linear-gradient(145deg, var(--primary), color-mix(in srgb, var(--primary) 50%, #000));
  color: var(--primary-text); border: 1px solid rgba(255, 255, 255, .08);
}
.feature-card .muted { color: inherit; opacity: .75; }
.feature-card .match-more { background: rgba(0, 0, 0, .25); border-color: rgba(255, 255, 255, .18); color: inherit; }
.feature-card .match-more b, .feature-card .match-more i { color: inherit; }
.feature-top { display: flex; flex-direction: column; gap: 6px; color: inherit; }
.feature-top:hover { color: inherit; }
.feature-teams { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .95rem; }
.feature-teams em { opacity: .6; font-size: .75rem; font-style: normal; }
.feature-card .match-odds { width: 100%; }
.feature-card .odd { background: rgba(0, 0, 0, .25); border-color: rgba(255, 255, 255, .12); color: inherit; flex-direction: column; gap: 0; }
.feature-card .odd small { color: inherit; opacity: .75; }
.feature-card .odd.active { background: var(--accent); color: var(--accent-text); }

/* ===== Live games on the home (dark cards with the score, unlike the red featured ones) ===== */
.live-block .row-between { align-items: center; margin-bottom: 12px; }
.live-block .section-title { margin: 0; }
.live-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 18px; scroll-snap-type: x mandatory; }
.live-card { scroll-snap-align: start; display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--live); box-shadow: var(--shadow); }
.live-card[hidden] { display: none; }
.live-top { display: flex; flex-direction: column; gap: 8px; color: var(--text); }
.live-top:hover { color: var(--text); }
.live-meta { display: flex; align-items: center; gap: 8px; min-width: 0; }
.live-meta .live-badge, .live-meta .minute { white-space: nowrap; flex-shrink: 0; }
.live-league { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: auto; }
.live-team { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; }
.live-team .team { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.live-team .team-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-score { font-size: 1.25rem; color: var(--live); min-width: 22px; text-align: right; }
.live-card .match-odds { width: 100%; }

/* ===== Next day's featured games (end of the board) ===== */
.next-day { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--border); }
.next-day .section-title { margin: 0; }
.next-day .row-between { align-items: center; margin-bottom: 14px; }
.next-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.next-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); transition: border-color .15s, transform .15s; }
.next-card:hover { border-color: var(--primary); color: var(--text); transform: translateY(-2px); }
.next-teams { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.next-teams .team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.next-time { font-size: .82rem; color: var(--accent); font-weight: 700; }

/* ===== Game page ===== */
.game-hero {
  border-radius: var(--radius); padding: 18px; margin-bottom: 12px; color: var(--primary-text);
  background: linear-gradient(145deg, var(--primary), color-mix(in srgb, var(--primary) 45%, #000));
}
.game-hero .muted { color: inherit; opacity: .8; }
.hero-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 14px 0 8px; }
.hero-team { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 1rem; }
img.crest { object-fit: contain; padding: 6px; background: rgba(255, 255, 255, .9); }
.crest { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .15); font-weight: 800; }
.hero-center { text-align: center; }
.hero-score { font-size: 2rem; font-weight: 800; }
.hero-date { font-size: 1.1rem; font-weight: 700; }
/* the live pitch and panel (views/partials/pitch.ejs), in the manner of the Sofascore tracker. By default a card in the corner of the
   score (wide screen) with the tabs Campo | Estatísticas | Lances, one pane at a time (data-tab on .hero-live); "Expandir" (.pitch-big,
   only on a wide screen) puts the score on top and the pitch big with the statistics beside it. On a phone the card goes under the score.
   The same grass in every visual and theme. */
.game-hero.has-live { display: grid; gap: 14px; align-items: start; }
.hero-live { --c-home: #36c46a; --c-away: #8c7cf7; display: grid; gap: 10px; align-items: start; min-width: 0; }
.live-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.live-head .live-tabs { flex: 1; min-width: 0; margin: 0; }
.hero-live[data-tab="pitch"] .live-panel, .hero-live[data-tab="events"] .live-stats, .hero-live:not([data-tab="events"]) .live-events { display: none; }
.game-hero:not(.pitch-big) .hero-live:not([data-tab="pitch"]) .pitch-wrap { display: none; }
@media (min-width: 900px) {
  .game-hero.has-live:not(.pitch-big) { grid-template-columns: minmax(0, 1fr) 300px; }
  .game-hero.has-live:not(.pitch-big) .hero-live { padding: 8px; border-radius: 12px; background: rgba(0, 0, 0, .18); }
  .game-hero.has-live:not(.pitch-big) .live-panel { max-height: 260px; overflow-y: auto; padding: 4px 6px; background: none; }
  .pitch-big .hero-live { width: 100%; max-width: 1100px; margin: 0 auto; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .pitch-big .pitch-wrap { grid-column: 1; grid-row: 1 / span 2; }
  .pitch-big .live-head { grid-column: 2; grid-row: 1; }
  .pitch-big .live-panel { grid-column: 2; grid-row: 2; align-self: stretch; }
  .pitch-big [data-live-tab="pitch"] { display: none; }
}
.pitch-wrap { position: relative; min-width: 0; }
.pitch-expand { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 0; cursor: pointer;
  padding: 6px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; background: rgba(0, 0, 0, .3); color: inherit; }
.pitch-expand:hover { background: rgba(0, 0, 0, .5); }
.game-hero:not(.pitch-big) .pitch-expand span { display: none; }
.game-hero:not(.pitch-big) .pitch-expand { padding: 6px 8px; }
.game-hero:not(.pitch-big) .live-head .live-tabs { gap: 4px; }
.game-hero:not(.pitch-big) .live-head .live-tabs button { padding: 5px 6px; font-size: .74rem; }
.pitch-big .pitch-expand i::before { content: "\f066"; }
@media (max-width: 899px) { .pitch-expand { display: none; } }
.pitch { position: relative; margin: 0; }
.pitch[hidden], .pitch [hidden], .live-panel[hidden], .live-panel [hidden] { display: none; }
.pitch svg { display: block; width: 100%; height: auto; border-radius: 10px; box-shadow: 0 4px 16px rgba(0, 0, 0, .3); font-family: inherit; }
.pitch-grass { fill: #3f7d22; }
.pitch-stripe { fill: #468a27; }
.pitch-lines rect, .pitch-lines line, .pitch-lines circle, .pitch-lines path { fill: none; stroke: rgba(255, 255, 255, .78); stroke-width: .45; }
.pitch-lines .pitch-dot { fill: rgba(255, 255, 255, .85); stroke: none; }
.pitch-net { stroke: rgba(255, 255, 255, .8); stroke-width: .25; }
.pitch-flag { fill: #e53935; }
.pitch-mark { opacity: .35; }
.pitch-poss { transition: opacity .5s ease; }
.pitch-poss.is-possession { opacity: .55; }
.pitch-poss.is-attack, .pitch-poss.is-set { opacity: .8; }
.pitch-poss.is-danger, .pitch-poss.is-goal { opacity: 1; animation: pitch-pulse 1.4s ease-in-out infinite; }
@keyframes pitch-pulse { 50% { opacity: .7; } }
.pitch-trail { fill: none; stroke: rgba(255, 255, 255, .7); stroke-width: .35; stroke-linecap: round; stroke-linejoin: round; }
.pitch-label text { fill: #fff; paint-order: stroke; stroke: rgba(0, 0, 0, .35); stroke-width: .35; }
/* the label reads at the card's size: bigger letters when the pitch is small (public/js/app.js measures it with the same scale) */
.pitch-label-in { transform: scale(1.5); }
.pitch-big .pitch-label-in { transform: scale(1); }
@media (max-width: 899px) { .pitch-big .pitch-label-in { transform: scale(1.5); } }
.pitch-label-team { font-size: 3.4px; font-weight: 700; }
.pitch-label-action { font-size: 2.7px; }
.pitch-label-player { font-size: 2.3px; opacity: .85; }
.pitch-label-bar { stroke: #fff; stroke-width: .6; }
.pitch-ball-spin { animation: pitch-spin 2.4s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pitch-spin { to { transform: rotate(360deg); } }
.pitch-ball .pitch-ball-halo { fill: rgba(255, 255, 255, .25); stroke: none; animation: pitch-halo 1.6s ease-out infinite; }
@keyframes pitch-halo { from { r: 2.2px; opacity: .9; } to { r: 5px; opacity: 0; } }
/* a set piece (corner, goal kick, penalty, throw-in, free kick): a yellow ring pulsing on the spot */
.pitch-ball-ring { fill: none; stroke: #ffd400; stroke-width: .7; opacity: 0; }
.pitch-ball.is-set .pitch-ball-ring { animation: pitch-ring 1.2s ease-out infinite; }
@keyframes pitch-ring { from { r: 2.4px; opacity: 1; } to { r: 7px; opacity: 0; } }
/* goal: the whole field; card: a card on the side of the team (the size of the field, 3:2, without aspect-ratio for older browsers) */
.pitch-fx { position: absolute; top: 0; left: 0; width: 100%; height: 0; padding-top: 66.6667%; pointer-events: none; border-radius: 10px; overflow: hidden; }
.fx-goal { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: grid; place-items: center; align-content: center; text-align: center; color: #fff;
  background: radial-gradient(circle, rgba(255, 215, 0, .55), rgba(0, 0, 0, .55) 70%); animation: fx-goal 4.5s ease-out forwards; }
.fx-goal b { font-size: clamp(2rem, 7vw, 3.6rem); font-weight: 900; letter-spacing: 2px; text-shadow: 0 3px 12px rgba(0, 0, 0, .6); animation: fx-goal-word .6s ease-out 3; }
.fx-goal span { display: block; font-size: 1rem; font-weight: 700; }
@keyframes fx-goal { 0% { opacity: 0; } 8%, 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes fx-goal-word { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
.fx-card { position: absolute; top: 18%; width: 16%; height: 36%; border-radius: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); display: grid; align-items: end;
  animation: fx-card 3.6s ease-out forwards; }
.fx-card.is-home { left: 24%; }
.fx-card.is-away { left: 60%; }
.fx-card.yellow { background: #ffd400; }
.fx-card.red { background: #e10600; }
.fx-card span { font-size: .62rem; font-weight: 800; color: #111; background: rgba(255, 255, 255, .85); text-align: center; padding: 2px; border-radius: 0 0 6px 6px; }
@keyframes fx-card { 0% { opacity: 0; transform: translateY(-30%) rotate(-25deg) scale(.6); } 15% { opacity: 1; transform: translateY(0) rotate(-8deg) scale(1.05); }
  25%, 80% { opacity: 1; transform: rotate(-8deg) scale(1); } 100% { opacity: 0; transform: rotate(-8deg) scale(.9); } }
/* the statistics: possession with the share in the teams' colours, then each number at the ends with a bar from the middle out */
.live-panel { border-radius: 10px; padding: 12px 14px 14px; background: rgba(0, 0, 0, .25); font-size: .82rem; min-width: 0; }
.live-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.live-tabs button { flex: 1; border: 0; cursor: pointer; padding: 6px 10px; border-radius: 999px; font: inherit; font-weight: 700; color: inherit; background: rgba(255, 255, 255, .1); }
.live-tabs button { white-space: nowrap; }
.live-tabs button[hidden] { display: none; }
.live-tabs button.is-on { background: #fff; color: #111; }
.live-stats { display: grid; gap: 12px; }
.live-poss-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.live-poss-head b { padding: 2px 9px; border-radius: 999px; color: #fff; font-size: .78rem; }
.live-poss-head .pill-h, .live-poss-bar .bar-h { background: var(--c-home); }
.live-poss-head .pill-a, .live-poss-bar .bar-a { background: var(--c-away); }
.live-poss-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; gap: 2px; }
.live-poss-bar i { display: block; height: 100%; transition: width .8s ease; }
.live-poss-bar .bar-a { flex: 1; }
.live-stat { display: grid; grid-template-columns: 3em 1fr 3em; align-items: center; gap: 4px 8px; }
.live-stat span { text-align: center; opacity: .85; }
.live-stat b:last-of-type { text-align: right; }
.live-stat.lead-h b:first-child, .live-stat.lead-a b:last-of-type { font-weight: 900; }
.live-bars { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.live-bars i { display: flex; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.live-bars .bar-h { justify-content: flex-end; }
.live-bars em { display: block; height: 100%; border-radius: 999px; transition: width .8s ease; }
.live-bars .bar-h em { background: var(--c-home); }
.live-bars .bar-a em { background: var(--c-away); }
.live-stat:not(.lead-h) .bar-h em { opacity: .55; }
.live-stat:not(.lead-a) .bar-a em { opacity: .55; }
.live-events { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 24em; overflow-y: auto; }
.live-events li { display: grid; grid-template-columns: 3.2em 1.1em 1fr; align-items: center; gap: 6px; }
/* the play's team by the colour of its shirt (the feed's kit colour) */
.live-events li[data-kit] { border-left: 4px solid transparent; padding-left: 6px; }
.live-events em { font-style: normal; opacity: .7; text-align: right; }
.ev-icon { width: .8em; height: 1em; border-radius: 2px; font-style: normal; }
.ev-yellow .ev-icon { background: #ffd400; }
.ev-red .ev-icon { background: #e10600; }
.ev-goal .ev-icon::before { content: "\26BD"; font-size: .9em; }
.ev-corner .ev-icon::before { content: "\2691"; }
.ev-pen_miss .ev-icon::before { content: "\2715"; }
.ev-sub .ev-icon::before { content: "\21C4"; }
.ev-goal span { font-weight: 800; }
.live-events li.is-home { border-left: 3px solid var(--c-home); padding-left: 4px; }
.live-events li.is-away { border-left: 3px solid var(--c-away); padding-left: 4px; }
.visual-bt .live-panel { background: color-mix(in srgb, currentColor 6%, transparent); }
.visual-bt .live-tabs button { background: color-mix(in srgb, currentColor 10%, transparent); }
.visual-bt .live-tabs button.is-on { background: var(--primary); color: var(--primary-text); }
.visual-bt .live-bars i { background: color-mix(in srgb, currentColor 12%, transparent); }
.visual-bt .game-hero.has-live:not(.pitch-big) .hero-live { background: color-mix(in srgb, currentColor 5%, transparent); }
.visual-bt .pitch-expand { background: color-mix(in srgb, currentColor 10%, transparent); }
.visual-bt .pitch-expand:hover { background: color-mix(in srgb, currentColor 18%, transparent); }
@media (prefers-reduced-motion: reduce) {
  .pitch-poss, .live-poss-bar i, .live-bars em { transition: none; }
  .pitch-poss.is-danger, .pitch-poss.is-goal, .pitch-ball .pitch-ball-halo, .pitch-ball-spin, .fx-goal b, .pitch-ball.is-set .pitch-ball-ring { animation: none; }
  .pitch-ball.is-set .pitch-ball-ring { opacity: 1; }
}
.market-tools { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.market-tools .search { flex: none; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { background: var(--surface); border: 1px solid var(--border); border-radius: 99px; padding: 5px 12px; font-size: .82rem; }
.chip.active, .chip:hover { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.markets { display: flex; flex-direction: column; gap: 10px; }
.market { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.market summary { list-style: none; padding: 11px 14px; font-weight: 700; display: flex; justify-content: space-between; cursor: pointer; }
.market summary::-webkit-details-marker { display: none; }
/* the two "Vencedor do Encontro" of a game with early payout (src/lib/earlyPayout.js): with early payout and the Super odd */
.market-name { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.market-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: .7rem; font-weight: 700; letter-spacing: .02em;
  text-transform: none; line-height: 1.4; }
.market-tag-ep { background: #6d28d9; color: #fff; }
.market-tag-so { background: #f59e0b; color: #1c1300; }
.market[open] summary i { transform: rotate(180deg); }
.market-odds { display: grid; gap: 6px; padding: 0 12px 12px; }
.market-odds.grid-2 { grid-template-columns: repeat(2, 1fr); }
.market-odds.grid-3 { grid-template-columns: repeat(3, 1fr); }
.odd-wide { min-height: 42px; }
.odd-wide small { white-space: normal; font-size: .8rem; color: var(--text); }

/* ===== Bet slip ===== */
.slip {
  position: sticky; top: 112px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; flex-direction: column; max-height: calc(100vh - 128px);
}
.slip-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; font-weight: 800; background: var(--primary); color: var(--primary-text); border-radius: var(--radius) var(--radius) 0 0; }
.slip-head .pill { background: rgba(255, 255, 255, .2); color: inherit; }
.slip-kinds { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--border); }
.slip-kinds span { text-align: center; padding: 8px; font-size: .8rem; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; }
.slip-kinds span.active { color: var(--text); border-bottom-color: var(--accent); }
.slip-items { overflow-y: auto; flex: 1; min-height: 80px; }
.slip-empty { text-align: center; color: var(--muted); padding: 24px 16px; }
.slip-empty i { font-size: 1.6rem; }
.slip-item { padding: 10px 14px; border-bottom: 1px solid var(--border); position: relative; }
.slip-item .teams { font-weight: 700; font-size: .88rem; padding-right: 24px; }
.slip-item .meta { color: var(--muted); font-size: .75rem; }
.slip-item .pick { display: flex; justify-content: space-between; margin-top: 4px; font-size: .85rem; gap: 8px; }
.slip-item .pick b { color: var(--accent); }
.slip-item .pick span { display: block; text-align: center; padding: 8px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 600; font-size: .85rem; cursor: pointer; }
.slip-item .remove { position: absolute; top: 8px; right: 8px; }
.slip-item.bad { background: rgba(239, 68, 68, .08); }
.slip-item .reason { color: var(--lose); font-size: .75rem; }
.slip-item .changed { color: var(--warn); font-size: .75rem; }
.slip-foot { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border); }
.field-sm { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; color: var(--muted); }
.quick-stakes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.quick-stakes button { background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px; padding: 6px; font-size: .8rem; font-weight: 600; }
.slip-summary { margin: 0; display: grid; gap: 4px; font-size: .85rem; }
.slip-summary div { display: flex; justify-content: space-between; }
.slip-summary dt { color: var(--muted); }
.slip-summary dd { margin: 0; font-weight: 700; }
.slip-summary .prize dd { color: var(--accent); font-size: 1.05rem; }
.slip-errors { color: var(--lose); font-size: .8rem; }
.slip-actions { display: flex; justify-content: space-between; }
.slip-fab {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; border: 0; border-radius: 12px; padding: 13px 16px;
  background: var(--accent); color: var(--accent-text); font-weight: 800; display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow);
}
.slip-fab .pill { background: rgba(0, 0, 0, .2); color: inherit; }
.slip-fab strong { margin-left: auto; }

/* ===== Cards, forms, tables ===== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 14px; }
.cards .card { margin: 0; }
.progress { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 6px 0 2px; }
.progress span { display: block; height: 100%; background: var(--accent); }
.form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: .82rem; color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea { color: var(--text); font-size: .95rem; }
.check { display: flex; gap: 8px; align-items: center; font-size: .9rem; }
.grid-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-form.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.auth-card { max-width: 420px; margin: 24px auto; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px; box-shadow: var(--shadow); }
.auth-card.wide { max-width: 640px; }
.alert { padding: 11px 14px; border-radius: var(--radius); background: rgba(245, 158, 11, .12); border: 1px solid rgba(245, 158, 11, .4); margin-bottom: 12px; }
.alert-error { background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .4); }
/* login, sign-up and the bettor's account (views/hub/login.ejs, views/account/*): a card with the brand band on top */
.auth-shell { display: flex; justify-content: center; padding: 28px 16px 40px; }
.auth-box { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; box-shadow: 0 18px 50px rgba(0, 0, 0, .14); }
.auth-hero { padding: 26px 28px 22px; text-align: center; color: #fff; background: radial-gradient(120% 140% at 0% 0%, rgba(255, 255, 255, .22), transparent 55%), var(--primary, #f15a24); }
.auth-hero .brand-logo { height: 34px; width: auto; display: inline-block; }
.auth-hero p { margin: 12px auto 0; max-width: 340px; font-size: 1.4rem; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.auth-body { padding: 24px 28px 26px; }
.auth-body h1 { font-size: 1.45rem; margin: 0 0 16px; }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 50px; padding: 0 16px; border-radius: 999px; background: #fff; color: #1f1f1f; border: 1px solid #747775; font-weight: 600; font-size: 1rem; text-decoration: none; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); transition: box-shadow .15s, background .15s; }
.google-btn:hover, .google-btn:focus-visible { background: #f8fafd; color: #1f1f1f; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.google-g { flex: none; }
.placed-invite { margin-top: 16px; padding: 14px; border-radius: 12px; border: 1px dashed var(--border); background: var(--surface-2, transparent); text-align: center; }
.placed-invite b { font-size: 1.02rem; }
.placed-invite p { margin: 6px 0 12px; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 20px 0 14px; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-more { border: 1px solid var(--border); border-radius: 12px; padding: 0 14px; }
.auth-more > summary { cursor: pointer; padding: 13px 0; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
.auth-more > summary::-webkit-details-marker { display: none; }
.auth-more > summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.auth-more[open] > summary::after { transform: rotate(45deg); }
.auth-more[open] { padding-bottom: 14px; }
.auth-switch { text-align: center; margin: 18px 0 6px; font-size: .95rem; }
.auth-switch a { font-weight: 700; }
.auth-foot { text-align: center; margin: 8px 0 0; font-size: .78rem; color: var(--muted); line-height: 1.45; }
.auth-danger { margin-top: 18px; border-color: rgba(239, 68, 68, .35); }
.auth-danger > summary { color: #dc2626; }
.auth-danger-btn { background: #dc2626; color: #fff; border: 0; }
@media (max-width: 480px) { .auth-shell { padding: 12px 0 28px; } .auth-box { border-radius: 14px; } .auth-hero, .auth-body { padding-left: 18px; padding-right: 18px; } }
.ticket-validated { margin: 10px 0; padding: 10px 14px; border-radius: var(--radius); background: rgba(34, 197, 94, .12); border: 1px solid rgba(34, 197, 94, .4); }
.ticket-validated.waiting { background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .4); }
.bettor-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .4px; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table.compact td { padding: 5px 8px; }
.table a { color: var(--accent); }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 20px; margin: 0; }
.kv dt { color: var(--muted); font-size: .78rem; }
.kv dd { margin: 0; font-weight: 600; }
.status { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .75rem; font-weight: 700; background: var(--surface-2); text-transform: capitalize; }
.status-ganho { background: rgba(25, 195, 125, .18); color: var(--win); }
.status-perdido, .status-cancelado { background: rgba(239, 68, 68, .16); color: var(--lose); }
.status-aberto, .status-pendente { background: rgba(245, 158, 11, .16); color: var(--warn); }
.status-cashout { background: rgba(56, 189, 248, .18); color: #38bdf8; }
.status-devolvido { background: rgba(120, 120, 140, .2); }
.empty-state { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty-state i { font-size: 2.2rem; margin-bottom: 10px; }
.empty-state h1 { color: var(--text); }
.section-title { margin: 22px 0 12px; display: flex; align-items: center; gap: 8px; }
.prose { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; line-height: 1.65; }
.row-between { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }

/* ===== Ticket ===== */
.ticket-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }

/* ===== modal / toast ===== */
.modal { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0, 0, 0, .6); z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-box { background: var(--surface); border-radius: 14px; padding: 22px; width: 100%; max-width: 420px; position: relative; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow); }
.modal-close { position: absolute; top: 8px; right: 8px; }
.modal-box h2 { padding-right: 30px; }
.install-steps { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; line-height: 1.5; }
.big-code { font: 800 1.8rem ui-monospace, Consolas, monospace; letter-spacing: 3px; text-align: center; padding: 12px; background: var(--surface-2); border-radius: 10px; margin: 10px 0; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 10px; z-index: 200; font-weight: 600; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.toast.error { background: var(--danger); color: #fff; }

/* ===== Footer ===== */
.footer { background: var(--bg-2); border-top: 1px solid var(--border); padding: 28px 16px 90px; margin-top: 24px; }
.footer-cols { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; }
.footer h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); }
.footer-cols a { display: block; padding: 3px 0; font-size: .88rem; }
.socials { display: flex; gap: 12px; font-size: 1.3rem; }
.footer-legal { max-width: 1200px; margin: 20px auto 0; color: var(--muted); font-size: .8rem; text-align: center; }
/* ===== Resultados (/resultados): finished games of a day ===== */
.results-head { flex-direction: column; align-items: stretch; }
.results-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.results-filter input[type="date"] { width: auto; }
.results-filter input[name="q"] { flex: 1 1 180px; }
.results-league { margin-bottom: 16px; }
.results-league-head { margin: 0; padding: 10px 14px; font-size: .9rem; background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; }
.result-card { display: grid; gap: 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-top: 0; }
.result-teams { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; gap: 10px; text-align: center; }
.result-names { display: flex; flex-direction: column; gap: 2px; }
.result-names small { color: var(--muted); }
.result-scores { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font-size: .85rem; }
.result-scores div { display: flex; flex-direction: column; align-items: center; }
.result-scores dt { color: var(--muted); font-size: .75rem; }
.result-scores dd { margin: 0; font-weight: 700; }
.result-final dd { color: var(--accent); }

/* visual switch at the top (views/partials/visual-bar.ejs): in the header on wide screens, its own first row below 1100px */
.visual-bar { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .82rem; }
.visual-bar-label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 600; opacity: .85; }
.visual-seg { display: inline-flex; border: 1px solid color-mix(in srgb, currentColor 35%, transparent); border-radius: 99px; overflow: hidden; }
.visual-seg button { background: none; border: 0; color: inherit; padding: 5px 13px; font-weight: 600; white-space: nowrap; }
.visual-seg button + button { border-left: 1px solid color-mix(in srgb, currentColor 35%, transparent); }
.visual-seg button:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.visual-seg button[aria-current="true"] { background: var(--primary); color: var(--primary-text); }
.visual-bar-row { display: none; justify-content: center; padding: 7px 10px; background: var(--bg-2); color: var(--text); border-bottom: 1px solid var(--border); }
@media (max-width: 1100px) {
  .visual-bar-inline { display: none; }
  .visual-bar-row { display: flex; }
}
@media print { .visual-bar { display: none !important; } }

/* visual switch (footer, and the side menus of the SA visual) */
.visual-switch { display: flex; flex-direction: column; margin: 0; }
.visual-switch button { display: flex; align-items: center; gap: 7px; background: none; border: 0; padding: 3px 0; text-align: left; font-size: .88rem; color: inherit; }
.visual-switch button:hover { color: var(--accent); }
.visual-switch button[aria-current="true"] { color: var(--accent); font-weight: 700; }
.age { border: 2px solid var(--lose); color: var(--lose); border-radius: 50%; padding: 3px 4px; font-weight: 800; font-size: .7rem; margin-right: 6px; }

/* ===== Responsive ===== */
@media (max-width: 1280px) {
  :root { --side-w: 220px; --slip-w: 300px; }
  .league-cols, .match-odds.cols-3 { width: 198px; }
}
@media (max-width: 1100px) {
  .layout, .layout.no-slip, .layout.no-side { grid-template-columns: minmax(0, 1fr) var(--slip-w); }
  .layout.no-slip, .layout.no-side.no-slip, body.slip-off .layout:not(.no-slip):not(.no-side) { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .day-strip { display: flex; }
}
@media (max-width: 860px) {
  .show-sm { display: inline-flex !important; }
  .hide-sm { display: none !important; }
  .layout, .layout.no-slip, .layout.no-side { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; }
  .login-inline { display: none; }
  .slip {
    position: fixed; top: auto; right: 0; bottom: 0; left: 0; z-index: 60; max-height: 88vh; border-radius: 16px 16px 0 0;
    transform: translateY(105%); transition: transform .25s; box-shadow: 0 -10px 40px rgba(0, 0, 0, .5);
  }
  .slip.open { transform: none; }
  .slip-head { border-radius: 16px 16px 0 0; }
  .balance small { display: none; }
  .user-box .btn { padding: 6px 9px; }
}
@media (max-width: 600px) {
  .hide-xs { display: none; }
  .topbar-inner { gap: 6px; padding: 8px 10px; }
  .topbar-right, .user-box { gap: 4px; min-width: 0; }
  .balance strong { font-size: .9rem; }
  .match { flex-wrap: wrap; padding: 12px 14px; }
  .board-head .search { flex: 1 1 100%; }
  .match-info { flex: 1 1 100%; }
  .match-side { flex: 1 1 100%; }
  .match-odds, .match-odds.cols-3, .match-odds.cols-2 { flex: 1; width: auto; }
  .league-cols { display: none; }
  .grid-form, .grid-form.cols-3 { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .market-odds.grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero-score { font-size: 1.6rem; }
}

@media print {
  .topbar, .sidebar, .slip, .footer, .ticket-actions, .board-head form, .slip-fab, .flash { display: none !important; }
  body { background: #fff; color: #000; }
  .layout { display: block; padding: 0; }
}

/* ===== Ticket receipt ("Conferir bilhete"): the same coupon on screen and on paper ===== */
.receipt-wrap { max-width: 500px; margin: 0 auto; }
.receipt-buttons { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.receipt-buttons form { margin: 0; }
.receipt-btn { width: 100%; justify-content: center; padding: 13px 14px; font-size: .95rem; border: 0; color: #fff; }
.receipt-green { background: #5cb85c; }
.receipt-green:hover { background: #4cae4c; color: #fff; }
.receipt-blue { background: #3b5fc9; }
.receipt-blue:hover { background: #2f4fb0; color: #fff; }
.receipt-red { background: #ef4444; }
.receipt-red:hover { background: #dc2626; color: #fff; }
.receipt { background: #f7ebc4; color: #111; padding: 18px 20px; border-radius: 2px; font: 15px/1.45 Helvetica, Arial, sans-serif; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.receipt p { margin: 0; color: #111; }
.receipt hr { border: 0; border-top: 1px dashed #333; margin: 9px 0; }
.receipt-center { text-align: center; display: flex; flex-direction: column; }
.receipt-site { font-size: 1.05rem; letter-spacing: .3px; }
.receipt-line { display: flex; justify-content: space-between; gap: 12px; }
.receipt-line span:last-child { text-align: right; white-space: nowrap; }
.receipt-item.item-ganho .receipt-status-ganho { color: #0a7d45; font-weight: 700; }
.receipt-item.item-perdido .receipt-status-perdido { color: #c62828; font-weight: 700; }
.receipt-score { color: #444; }
.receipt-note { font-size: .82rem; color: #0a7d45; }
/* "Criar aposta": each leg's price when the ticket was sold (display only) */
.receipt-line.receipt-leg { font-size: .82rem; padding-left: 8px; }
.tl-legs { list-style: none; margin: 6px 0 0; padding: 0; font-size: 12px; color: var(--muted); }
.tl-legs li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.receipt-code { font-weight: 800; font-size: 1.1rem; letter-spacing: 2px; font-family: ui-monospace, Consolas, monospace; }
.receipt-state { margin: 14px 0; padding: 13px; text-align: center; color: #fff; border-radius: 2px; font-weight: 600; background: #3b5fc9; }
.receipt-state-pendente { background: #d97706; }
.receipt-state-ganho { background: #15803d; }
.receipt-state-perdido, .receipt-state-cancelado { background: #b91c1c; }
.receipt-state-devolvido { background: #6b7280; }
.receipt-state-cashout { background: #0e7490; }
.ticket-page-head form .btn { white-space: nowrap; }

/* printing a receipt: only the coupon goes to the paper, in black on white */
@media print {
  /* everything but the path down to the coupon is left out, so nothing else takes paper */
  body.print-receipt > *:not(.layout),
  body.print-receipt .layout > *:not(.content),
  body.print-receipt .content > *:not(.receipt-wrap),
  body.print-receipt .receipt-wrap > *:not(#ticket-print) { display: none !important; }
  body.print-receipt .layout, body.print-receipt .content, body.print-receipt .receipt-wrap { display: block; padding: 0; margin: 0; max-width: none; width: auto; }
  body.print-receipt #ticket-print { page: receipt; background: #fff !important; box-shadow: none; border-radius: 0; color: #000; margin: 0; width: auto; max-width: 120mm; padding: 4mm 6mm; font-size: 12.5pt; word-wrap: break-word; }
  body.print-receipt #ticket-print p, body.print-receipt #ticket-print * { color: #000 !important; }
  body.print-receipt #ticket-print hr { border-top-color: #000; }
  body.print-receipt { background: #fff !important; }
}
/* the paper is the one chosen in the print dialog (no @page size): a roll gets the receipt in a small monospaced font */
@media print and (max-width: 90mm) {
  body.print-receipt #ticket-print { padding: 0; font: 9.5pt/1.3 ui-monospace, Consolas, "Courier New", monospace; }
  body.print-receipt #ticket-print .receipt-note { font-size: 8.5pt; }
}
@media print and (max-width: 62mm) {
  body.print-receipt #ticket-print { font: 8pt/1.25 ui-monospace, Consolas, "Courier New", monospace; }
  body.print-receipt #ticket-print .receipt-note { font-size: 7pt; }
  body.print-receipt #ticket-print .receipt-line { gap: 4px; }
  body.print-receipt #ticket-print .receipt-code { font-size: 11pt; letter-spacing: 1px; }
}
@page receipt { margin: 3mm; }

/* ===== Super Dicas ===== */
/* each theme (src/lib/tips.js THEMES) has its colour: the band of the card and its chip */
.tip, .tips-themes .chip { --tip-c: #f15a24; }
.tip--logica, .tip-chip--logica { --tip-c: #2563eb; }
.tip--casa, .tip-chip--casa { --tip-c: #16a34a; }
.tip--fora, .tip-chip--fora { --tip-c: #0891b2; }
.tip--azarao, .tip-chip--azarao { --tip-c: #d97706; }
.tip--zebra, .tip-chip--zebra { --tip-c: #7c3aed; }
.tip--empate, .tip-chip--empate { --tip-c: #64748b; }
.tip--gols, .tip-chip--gols { --tip-c: #e11d48; }
.tip--ambas, .tip-chip--ambas { --tip-c: #db2777; }
.tip--mix, .tip-chip--mix { --tip-c: #f15a24; }
.tips-hero { display: flex; align-items: center; gap: 14px; margin: 4px 0 14px; }
.tips-hero h1 { margin: 0; font-size: 1.5rem; font-weight: 800; }
.tips-hero p { margin: 2px 0 0; color: var(--muted); }
.tips-hero-icon { flex: none; width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem; color: #fff;
  background: linear-gradient(135deg, #f59e0b, #f15a24); box-shadow: 0 6px 18px rgba(241, 90, 36, .3); }
.tips-themes { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; margin-bottom: 6px; scrollbar-width: none; }
.tips-themes::-webkit-scrollbar { display: none; }
.tips-themes .chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; font-weight: 600; white-space: nowrap; }
.tips-themes .chip i { color: var(--tip-c); }
.tips-themes .chip span { font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: color-mix(in srgb, var(--tip-c) 15%, transparent); color: var(--tip-c); }
.tips-themes .chip.active, .tips-themes .chip:hover { background: var(--tip-c); border-color: var(--tip-c); color: #fff; }
.tips-themes .chip.active i, .tips-themes .chip:hover i, .tips-themes .chip.active span, .tips-themes .chip:hover span { color: #fff; }
.tips-themes .chip.active span, .tips-themes .chip:hover span { background: rgba(255, 255, 255, .22); }
.tips-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin-bottom: 14px; }
.tip { display: flex; flex-direction: column; padding: 0; overflow: hidden; border-top: 0; }
.tip-band { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: #fff;
  background: linear-gradient(135deg, var(--tip-c), color-mix(in srgb, var(--tip-c) 65%, #000)); }
.tip-icon { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; background: rgba(255, 255, 255, .18); }
.tip-theme { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .9; }
.tip-band h3 { margin: 1px 0 0; font-size: 1.05rem; line-height: 1.2; color: #fff; }
.tip-line { margin: 12px 16px 2px; font-size: .9rem; font-style: italic; color: var(--muted); }
.tip-items { list-style: none; padding: 0 16px; margin: 6px 0; flex: 1; }
.tip-items li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.tip-items li:last-child { border-bottom: 0; }
.tip-items li > span { min-width: 0; display: flex; flex-direction: column; }
.tip-items li > span b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tip-items li > span small { font-size: .78rem; }
.tip-items li strong { flex: none; min-width: 48px; text-align: center; padding: 4px 8px; border-radius: 8px; font-size: .88rem;
  background: color-mix(in srgb, var(--tip-c) 12%, transparent); color: var(--tip-c); }
.tip-items li.closed { opacity: .5; }
.tip-foot { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--tip-c) 5%, transparent); }
.tip-total { display: flex; flex-direction: column; line-height: 1.15; }
.tip-total small { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tip-total b { font-size: 1.05rem; }
.tip-foot .btn { margin-left: auto; }
.tips-empty { display: flex; align-items: center; gap: 14px; padding: 22px; border: 1px dashed var(--border); border-radius: 14px; margin-bottom: 14px; }
.tips-empty i { font-size: 2rem; color: var(--muted); }
.tips-empty p { margin: 0; }
.tips-note { text-align: center; }


/* ===== Logo & banners ===== */
.brand-logo { height: 38px; width: auto; max-width: 200px; object-fit: contain; }
/* Built-in logo has white letters on transparent: keep it on black where the background may be light. */
.brand-logo.big { height: 64px; max-width: 280px; margin-bottom: 12px; }
@media (max-width: 600px) { .topbar .brand-logo { height: 30px; } }
.banners { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin-bottom: 14px; border-radius: var(--radius); }
.banners > * { scroll-snap-align: start; }
.banners img { width: 100%; aspect-ratio: 4 / 1; object-fit: cover; border-radius: var(--radius); display: block; }

/* ---------- pagamento antecipado ---------- */
.early-badge { margin: 10px auto 0; width: fit-content; max-width: 100%; display: flex; gap: 8px; align-items: center; background: var(--surface-2); border: 1px solid var(--win); color: var(--text); border-radius: 99px; padding: 5px 12px; font-size: .82rem; font-weight: 600; }
.early-badge i, .early-tag i, .early-note i, .badge-early i { color: var(--win); }
/* the early payout tag: icon and "PA +2" together, as one small pill */
.early-tag { font-size: .68rem; font-weight: 700; color: var(--win); display: inline-flex; gap: 3px; align-items: center; padding: 1px 7px; border-radius: 99px;
  border: 1px solid color-mix(in srgb, var(--win) 45%, transparent); background: color-mix(in srgb, var(--win) 12%, transparent); width: fit-content; line-height: 1.5; }
.match-teams .early-tag { display: inline-flex; justify-content: flex-start; gap: 3px; margin-top: 2px; }
.early-note { font-size: .75rem; color: var(--muted); margin-top: 3px; }
/* the home's "Principais ligas": one list of the main leagues' games, each row with its league (views/board.ejs) */
.league-tag { display: block; margin-top: 2px; font-size: .72rem; font-weight: 500; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.league-tag i { font-size: .66rem; margin-right: 2px; }
.principal-head .league-name i { color: var(--warn); }
/* "Abrir todos / Recolher todos" of the game page's markets */
.market-fold { display: flex; gap: 6px; }
/* Minha conta do apostador (views/account/account.ejs) */
.acc-shell .acc-box { max-width: 520px; width: 100%; }
.acc-head { display: flex; align-items: center; gap: 14px; padding: 20px; color: #fff;
  background: radial-gradient(120% 160% at 0% 0%, rgba(255, 255, 255, .22), transparent 55%), var(--primary, #f15a24); }
.acc-avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.25rem;
  background: rgba(255, 255, 255, .22); border: 2px solid rgba(255, 255, 255, .5); }
.acc-who { min-width: 0; }
.acc-who h1 { margin: 0; font-size: 1.3rem; font-weight: 800; color: #fff; overflow-wrap: anywhere; }
.acc-who p { margin: 3px 0 0; font-size: .85rem; opacity: .92; overflow-wrap: anywhere; }
.acc-quick { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--border); }
.acc-quick a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; font-size: .82rem; font-weight: 700; color: inherit; text-decoration: none; text-align: center; }
.acc-quick a + a { border-left: 1px solid var(--border); }
.acc-quick a i { font-size: 1.15rem; color: var(--primary, #f15a24); }
.acc-quick a:hover { background: color-mix(in srgb, var(--primary, #f15a24) 7%, transparent); }
.acc-title { margin: 0 0 4px; font-size: 1.05rem; font-weight: 800; }
.acc-out { margin-top: 12px; }
.acc-pw { margin-top: 14px; }
/* the password with its "show" eye (data-pw-toggle, app.js): sign-up, login and Minha conta */
.pw-field { position: relative; display: block; }
.pw-field input { width: 100%; padding-right: 46px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 8px; }
.pw-eye:hover, .pw-eye[aria-pressed="true"] { color: var(--text); }
[data-phone-login] + .auth-switch, [data-phone-signup] + .auth-switch { margin-top: 12px; }

/* Sugestões (views/suggest.ejs) */
.sug-hero { display: flex; align-items: center; gap: 14px; padding: 18px 20px; margin: 4px 0 14px; border-radius: 16px; color: #fff;
  background: radial-gradient(120% 160% at 0% 0%, rgba(255, 255, 255, .22), transparent 55%), var(--primary, #f15a24); }
.sug-hero h1 { margin: 0; font-size: 1.45rem; font-weight: 800; letter-spacing: -.01em; color: #fff; }
.sug-hero p { margin: 4px 0 0; font-size: .95rem; opacity: .95; }
.sug-hero-icon { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; background: rgba(255, 255, 255, .2); }
.suggest-form.sug-steps { max-width: 640px; gap: 12px; }
.sug-step { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.sug-step-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .9rem;
  color: #fff; background: var(--primary, #f15a24); }
.sug-step-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.sug-step-title { font-weight: 700; font-size: 1rem; }
.sug-money { display: flex; align-items: center; gap: 6px; max-width: 220px; padding: 0 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg, transparent); }
.sug-money > span { font-weight: 700; color: var(--muted); }
.sug-steps .sug-money input { max-width: none; flex: 1; min-width: 0; border: 0; background: transparent; padding: 11px 0; font-size: 1.05rem; font-weight: 700; outline: none; }
.suggest-ranges.sug-ranges { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.sug-ranges .chip.sug-range { display: flex; align-items: center; gap: 8px; justify-content: flex-start; padding: 11px 12px; border-radius: 12px; font-weight: 700; text-align: left; }
.sug-ranges .sug-range i { color: var(--primary, #f15a24); }
.sug-ranges .sug-range.active i { color: inherit; }
.suggest-target.sug-target { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.sug-target .sug-money { flex: 1; max-width: 260px; }
.suggest-result.sug-result { max-width: 640px; margin-top: 14px; border-radius: 16px; padding: 0 0 2px; overflow: hidden; gap: 0; }
.sug-result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; color: #fff;
  background: linear-gradient(135deg, var(--primary, #f15a24), color-mix(in srgb, var(--primary, #f15a24) 70%, #000)); }
.sug-result-head small { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; opacity: .9; }
.sug-result-head strong { font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; }
.sug-odds { margin: 0; text-align: right; padding: 6px 10px; border-radius: 12px; background: rgba(255, 255, 255, .18); }
.sug-odds dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; opacity: .9; }
.sug-odds dd { margin: 0; font-size: 1.15rem; font-weight: 800; }
.sug-result .suggest-items { padding: 4px 16px; }
.sug-result .suggest-pick { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.sug-result .suggest-pick b { margin: 0; padding: 2px 8px; border-radius: 8px; background: color-mix(in srgb, var(--accent, #16a34a) 14%, transparent); }
.sug-pick-label { font-size: .82rem; color: var(--muted); }
.sug-result-line { margin: 10px 16px 0; font-size: .85rem; color: var(--muted); }
.btn-row.sug-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px 0; }
.sug-result > .muted.small { padding: 0 16px 14px; margin: 8px 0 0; }
@media (max-width: 560px) {
  .suggest-ranges.sug-ranges { grid-template-columns: 1fr; }
  .sug-ranges .chip.sug-range { font-size: .9rem; padding: 11px 12px; }
  .sug-result .suggest-item { flex-direction: column; align-items: stretch; gap: 6px; }
  .sug-result .suggest-pick { flex-direction: row; align-items: center; justify-content: space-between; text-align: left; gap: 10px; }
  .btn-row.sug-actions .btn { flex: 1 1 100%; width: 100%; justify-content: center; }
  .sug-hero h1 { font-size: 1.25rem; }
}
.suggest-form { display: flex; flex-direction: column; gap: 10px; max-width: 560px; margin: 12px 0 16px; }
.suggest-form input { max-width: 200px; }
.suggest-ranges { display: flex; flex-wrap: wrap; gap: 8px; }
.suggest-ranges .chip { padding: 8px 14px; font-weight: 600; }
.suggest-target { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.suggest-result { max-width: 640px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); display: flex; flex-direction: column; gap: 12px; }
.suggest-items { display: flex; flex-direction: column; }
.suggest-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.suggest-item > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.suggest-pick { text-align: right; font-size: .86rem; }
.suggest-pick b { color: var(--accent); margin-left: 6px; }
/* Minhas apostas (views/my-tickets.ejs, regra do dono 12/11/2026): one card per ticket, its games where they are now */
.mt-tabs { display: flex; gap: 6px; margin: 10px 0 14px; padding: 4px; background: var(--surface-2); border-radius: 12px; max-width: 420px; }
.mt-tab { flex: 1; text-align: center; padding: 8px 10px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--muted); }
.mt-tab:hover { color: var(--text); }
.mt-tab.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.mt-list { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.mt-card { display: block; background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--warn); border-radius: 16px; padding: 14px; color: var(--text); box-shadow: var(--shadow); }
.mt-card:hover { color: var(--text); border-color: var(--primary); }
.mt-ganho, .mt-cashout { border-top-color: var(--win); }
.mt-perdido, .mt-cancelado, .mt-expirado { border-top-color: var(--lose); }
.mt-devolvido { border-top-color: var(--muted); }
.mt-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.mt-id { display: flex; flex-direction: column; min-width: 0; }
.mt-code { font-size: 22px; font-weight: 900; line-height: 1.1; letter-spacing: .02em; }
.mt-id small { color: var(--muted); font-size: 12px; }
.mt-badge { padding: 5px 10px; border-radius: 99px; font-weight: 800; font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); text-align: right; }
.mt-badge-pendente, .mt-badge-aberto { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.mt-badge-ganho, .mt-badge-cashout { background: color-mix(in srgb, var(--win) 18%, transparent); color: var(--win); border-color: color-mix(in srgb, var(--win) 45%, transparent); }
.mt-badge-perdido, .mt-badge-cancelado, .mt-badge-expirado { background: color-mix(in srgb, var(--lose) 15%, transparent); color: var(--lose); border-color: color-mix(in srgb, var(--lose) 45%, transparent); }
.mt-sum { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; }
.mt-sum li { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); display: inline-flex; align-items: center; gap: 5px; }
.mt-sum-live { color: var(--live); }
.mt-sum-win { color: var(--win); }
.mt-sum-lose { color: var(--lose); }
.mt-games { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mt-game { background: var(--surface-2); border-left: 4px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.mt-match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.mt-team { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 700; font-size: 14px; }
.mt-team-away { justify-content: flex-end; text-align: right; }
.mt-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mt-crest { width: 18px; height: 18px; object-fit: contain; flex: none; }
.mt-crest-none { display: inline-grid; place-items: center; border-radius: 50%; background: var(--surface); color: var(--muted); font-size: 8px; font-weight: 800; }
.mt-score { font-size: 17px; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; padding: 0 4px; color: var(--muted); }
.mt-score.is-live { color: var(--live); }
.mt-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.mt-pick { min-width: 0; overflow-wrap: anywhere; }
.mt-pick b { color: var(--text); }
.mt-price { display: inline-block; background: var(--primary); color: var(--primary-text); font-weight: 800; border-radius: 6px; padding: 0 6px; margin-left: 2px; }
.mt-when { white-space: nowrap; font-weight: 700; }
.mt-when.is-live { color: var(--live); }
.mt-state { display: block; margin-top: 4px; font-size: 12px; font-weight: 800; color: var(--warn); }
.mt-game.tl-state-won .mt-state, .mt-game.tl-state-winning .mt-state { color: var(--win); }
.mt-game.tl-state-lost .mt-state, .mt-game.tl-state-losing .mt-state { color: var(--lose); }
.mt-game.tl-state-void .mt-state, .mt-game.tl-state-void-now .mt-state, .mt-game.tl-state-running .mt-state { color: var(--muted); }
.mt-more { font-size: 12px; font-weight: 700; color: var(--muted); padding-left: 4px; }
.mt-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 0; }
.mt-values div { background: var(--surface-2); border-radius: 10px; padding: 6px 10px; min-width: 0; }
.mt-values dt { font-size: 11px; color: var(--muted); }
.mt-values dd { margin: 1px 0 0; font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-prize dd { color: var(--primary); }
.mt-open { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; font-weight: 800; color: var(--primary); }
.badge-early { display: inline-flex; gap: 5px; align-items: center; font-size: .72rem; font-weight: 600; color: var(--muted); }

/* ---------- criar aposta ---------- */
.builder-toggle { align-self: flex-start; }
.builder-toggle[aria-pressed="true"] { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.builder-mode .market[data-builder-ok="0"] { opacity: .45; }
/* "Criar aposta" on: a button that can't go in is grey (its reason on a tap), one the others already win says "já incluída" */
.builder-mode .odd.builder-off { opacity: .32; cursor: not-allowed; filter: grayscale(1); }
.builder-mode .odd.builder-off [data-odd-value] { text-decoration: line-through; }
.odd .builder-tag { display: block; font-size: .62rem; font-style: normal; font-weight: 700; line-height: 1.2; opacity: .85; }
.odd .builder-tag[hidden] { display: none; }
.slip-legs { margin: 4px 0 0; padding: 0 0 0 18px; font-size: .78rem; color: var(--muted); }
.slip-legs li { margin: 1px 0; overflow-wrap: anywhere; }
.slip-legs li.is-included { opacity: .75; }
.slip-legs em { font-style: normal; font-weight: 700; font-size: .7rem; }

/* ---------- escudos e ligas favoritas ---------- */
.league-head .league-name { flex: 1; min-width: 0; color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.league-head .league-name:hover { color: var(--accent); }
.fav-btn { background: none; border: 0; padding: 4px 6px; color: var(--muted); font-size: .95rem; line-height: 1; border-radius: 6px; flex-shrink: 0; }
.fav-btn:hover { color: var(--warn); }
.fav-btn[aria-pressed="true"] { color: var(--warn); }
.fav-btn[aria-pressed="true"] i { font-weight: 900; }
.league-head .fav-btn i { margin-right: 0; color: inherit; }
.match-teams .team { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.match-teams .team-name { overflow: hidden; text-overflow: ellipsis; }
.crest-sm { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; }
/* team without a crest (or a broken image): a grey shield of the same size */
.crest-none { display: inline-grid; place-items: center; color: #8a8a8a; flex-shrink: 0; }
.crest-sm.crest-none { font-size: .85rem; }
.crest.crest-none { font-size: 1.5rem; background: rgba(255, 255, 255, .9); color: #9a9a9a; }

/* ---------- the ticket's live page (/bilhete/:code, views/ticket-live.ejs, public/js/ticket-live.js) ---------- */
.tl { max-width: 640px; margin: 0 auto; }
.tl-head { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); border-top: 4px solid var(--primary); }
.tl-head-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tl-kicker { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.tl-code { margin: 2px 0 0; font-size: 30px; line-height: 1; letter-spacing: .02em; }
.tl-badge { padding: 6px 12px; border-radius: 99px; font-weight: 800; font-size: 13px; background: var(--surface-2); border: 1px solid var(--border); white-space: nowrap; }
.tl-badge-aberto { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.tl-badge-ganho, .tl-badge-cashout { background: color-mix(in srgb, var(--win) 18%, transparent); color: var(--win); border-color: color-mix(in srgb, var(--win) 45%, transparent); }
.tl-badge-perdido { background: color-mix(in srgb, var(--lose) 15%, transparent); color: var(--lose); border-color: color-mix(in srgb, var(--lose) 45%, transparent); }
.tl-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 10px; }
.tl-values div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.tl-values dt { font-size: 12px; color: var(--muted); }
.tl-values dd { margin: 2px 0 0; font-weight: 800; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-prize dd { color: var(--primary); }
.tl-summary { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; }
.tl-summary li { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); display: inline-flex; align-items: center; gap: 6px; }
.tl-sum-live { color: var(--live); }
.tl-sum-won, .tl-sum-winning { color: var(--win); }
.tl-sum-lost, .tl-sum-losing { color: var(--lose); }
.tl-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); display: inline-block; animation: tl-pulse 1.4s ease-in-out infinite; }
@keyframes tl-pulse { 50% { opacity: .25; } }
.tl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tl-card { background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--border); border-radius: 14px; padding: 12px 14px; }
.tl-state-won, .tl-state-winning { border-left-color: var(--win); }
.tl-state-lost, .tl-state-losing { border-left-color: var(--lose); }
.tl-state-pre, .tl-state-starting, .tl-state-running, .tl-state-waiting { border-left-color: var(--warn); }
.tl-phase-live, .tl-phase-interval { box-shadow: 0 0 0 1px color-mix(in srgb, var(--live) 35%, transparent); }
.tl-card-top { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.tl-league { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-phase { white-space: nowrap; font-weight: 700; }
.tl-phase-on { color: var(--live); display: inline-flex; align-items: center; gap: 6px; }
.tl-teams { display: flex; flex-direction: column; gap: 6px; }
.tl-team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tl-crest { width: 28px; height: 28px; object-fit: contain; flex: none; }
.tl-crest-none { display: inline-grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 800; }
.tl-name { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-goals { font-size: 22px; font-weight: 900; min-width: 28px; text-align: right; font-variant-numeric: tabular-nums; }
.tl-play { font-size: 13px; font-weight: 700; margin: 8px 0 0; }
.tl-play.tl-kind-danger, .tl-play.tl-kind-goal { color: var(--live); }
.tl-events { list-style: none; margin: 6px 0 0; padding: 0; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.tl-events b { color: var(--text); }
.tl-ev-red b { color: var(--lose); }
.tl-pick { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.tl-pick-text { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.tl-pick-text span { color: var(--muted); }
.tl-pick-text b { font-size: 15px; overflow-wrap: anywhere; }
.tl-price { flex: none; background: var(--primary); color: var(--primary-text); font-weight: 800; border-radius: 8px; padding: 4px 10px; }
.tl-state { margin-top: 8px; font-size: 13px; font-weight: 800; color: var(--muted); }
.tl-state-won .tl-state, .tl-state-winning .tl-state { color: var(--win); }
.tl-state-lost .tl-state, .tl-state-losing .tl-state { color: var(--lose); }
.tl-state-pre .tl-state, .tl-state-starting .tl-state, .tl-state-waiting .tl-state { color: var(--warn); }
.tl-goal { animation: tl-goal 1s ease-in-out 4; }
@keyframes tl-goal { 50% { background: color-mix(in srgb, var(--win) 22%, var(--surface)); } }
.tl-badge-pendente { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent);
  white-space: normal; text-align: center; max-width: 50%; border-radius: 12px; }
.tl-note { margin: 0 0 10px; font-size: 13px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.tl-note i { color: var(--win); margin-right: 4px; }
.tl-note-wait i { color: var(--warn); }
.tl-note-bad { color: var(--lose); }
.tl-foot { text-align: center; margin: 14px 0 4px; }
@media (max-width: 420px) {
  .tl-values { grid-template-columns: 1fr 1fr; }
  .tl-prize { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { .tl-dot, .tl-goal { animation: none; } }
.receipt-before { color: var(--muted); font-size: .85em; }
