:root {
  --g-900: #0b4a37;
  --g-800: #0e5a43;
  --g-700: #116a4f;
  --g-600: #13795a;
  --g-500: #1a8d68;
  --g-100: #d9e9e1;
  --g-50: #eef4f1;
  --ink: #1b2a24;
  --ink-2: #4b5d56;
  --ink-3: #7c8c86;
  --line: #e2ebe7;
  --odd: #eef3f1;
  --odd-h: #e0ebe6;
  --yellow: #ffd200;
  --up: #1aa364;
  --down: #e0433a;
  --card-y: #f4c20d;
  --card-r: #e0262c;
  font-family: Roboto, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--g-800);
}
* { box-sizing: border-box; }
[hidden], .hidden { display: none !important; }
html, body { margin: 0; background: var(--g-800); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; }

/* ---------- Cabeçalho ---------- */
.hdr { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; height: 48px; padding: 0 14px; background: var(--g-700); color: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.15); }
.hdr-menu { display: none; font-size: 20px; color: #fff; }
.brand { display: flex; align-items: center; gap: 7px; font-weight: 900; font-size: 18px; letter-spacing: .5px; font-style: italic; }
.brand b { color: var(--yellow); font-weight: 900; }
.brand-mark { width: 26px; height: 26px; border-radius: 6px; background: var(--yellow); color: var(--g-900); display: grid; place-items: center; font-style: normal; font-size: 15px; }
.hdr-nav { display: flex; gap: 4px; }
.hdr-nav a { padding: 7px 12px; border-radius: 4px; font-size: 13px; font-weight: 700; text-transform: uppercase; color: #dfeee7; }
.hdr-nav a b { font-weight: 700; font-size: 11px; background: rgba(255,255,255,.15); padding: 1px 6px; border-radius: 8px; margin-left: 4px; }
.hdr-nav a.active { background: var(--g-500); color: #fff; }
.hdr-search { margin-left: auto; position: relative; width: 260px; }
.hdr-search input { width: 100%; height: 32px; border-radius: 4px; border: 0; background: var(--g-900); color: #fff; padding: 0 32px 0 12px; font: inherit; font-size: 13px; outline: none; }
.hdr-search input::placeholder { color: #a9c8bb; }
.hdr-search span { position: absolute; right: 10px; top: 6px; color: #cfe3da; font-size: 16px; }

.wrap { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 8px; padding: 8px; max-width: 1680px; margin: 0 auto; }

/* ---------- Barra lateral ---------- */
.sb { position: sticky; top: 56px; align-self: start; max-height: calc(100vh - 64px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #2b7a60 transparent; display: flex; flex-direction: column; gap: 8px; }
.sb > * { flex-shrink: 0; }
.sb-featured { background: #fff; border-radius: 4px; overflow: hidden; }
.sbf-head { display: flex; align-items: center; justify-content: space-between; background: var(--g-600); color: #fff; padding: 8px 10px; font-size: 14px; font-weight: 600; }
.sbf-nav { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.sbf-nav button { color: #fff; font-size: 15px; padding: 0 2px; }
.sbf-body { padding: 8px 10px 4px; cursor: pointer; }
.sbf-league { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.sbf-time { font-size: 12px; color: #e09400; margin: 3px 0 5px; }
.sbf-team { display: flex; align-items: center; gap: 7px; font-size: 13px; padding: 2px 0; }
.sbf-team > span:not(.crest-fallback) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbf-team b { font-weight: 700; }
.sbf-odds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 6px 8px 8px; }
.sbf-odds span { display: flex; justify-content: space-between; padding: 6px 8px; background: var(--odd); border-radius: 3px; font-size: 13px; }
.sbf-odds span em { font-style: normal; color: var(--ink-2); }
.sb-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--g-600); border-radius: 4px 4px 0 0; overflow: hidden; margin-bottom: -8px; }
.sb-tabs button { padding: 11px 6px; color: #d8ebe2; font-size: 13px; font-weight: 700; }
.sb-tabs button.active { background: var(--g-900); color: #fff; }
.sb-tabs button[data-mode="live"].active { color: #7dff9a; }
.sb-all { display: flex; justify-content: space-between; align-items: center; background: #f3f6f5; padding: 10px 12px; font-size: 13px; font-weight: 700; color: var(--ink); text-align: left; }
.sb-all.active { background: var(--g-100); }
.sb-list { background: #fff; border-radius: 0 0 4px 4px; margin-top: -8px; }
.sb-sport { border-top: 1px solid var(--line); }
.sb-sport > button { width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px 12px; font-size: 14px; text-align: left; }
.sb-sport > button:hover { background: var(--g-50); }
.sb-sport.active > button { background: var(--g-600); color: #fff; }
.sb-ico { width: 20px; text-align: center; font-size: 15px; }
.sb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-chev { font-size: 11px; opacity: .7; transition: transform .15s; }
.sb-sport.open .sb-chev { transform: rotate(180deg); }
.sb-leagues { background: #f7faf9; }
.sb-league { width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 12px 8px 22px; font-size: 13px; text-align: left; border-top: 1px solid #edf2f0; }
.sb-league:hover { background: var(--g-50); }
.sb-league.active { background: var(--g-100); font-weight: 600; }
.sb-league img { width: 18px; height: 13px; object-fit: cover; border-radius: 2px; flex: 0 0 auto; }
.sb-league span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-league b { font-weight: 400; color: var(--ink-3); font-size: 12px; }

/* ---------- Conteúdo ---------- */
.main { min-width: 0; background: #fff; border-radius: 4px; overflow: hidden; min-height: calc(100vh - 64px); }
.crumbs { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; background: var(--g-600); color: #fff; }
.crumb-home { font-size: 18px; }
.crumb-path { font-size: 13px; color: #d6ebe1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb-tabs { display: flex; gap: 4px; margin-left: 16px; }
.crumb-tabs a { padding: 13px 10px 11px; font-size: 14px; font-weight: 600; color: #cfe5db; border-bottom: 2px solid transparent; cursor: pointer; }
.crumb-tabs a.active { color: #fff; border-color: #fff; }
.sport-bar { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; background: var(--g-800); padding: 0 8px; }
.sport-bar::-webkit-scrollbar { display: none; }
.sport-bar button { display: flex; align-items: center; gap: 6px; padding: 11px 12px; color: #e3f1ea; font-size: 14px; font-weight: 700; white-space: nowrap; border-bottom: 3px solid transparent; }
.sport-bar button.active { border-color: var(--yellow); color: #fff; }
.sport-bar button b { font-weight: 500; font-size: 11px; opacity: .75; }

/* Tabela de jogos */
.league { border-top: 1px solid var(--line); }
.league-head { display: grid; grid-template-columns: minmax(0, 1fr) var(--oddcols); align-items: center; background: var(--g-100); min-height: 44px; padding: 0 0 0 12px; position: sticky; top: 48px; z-index: 5; }
.lh-name { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; min-width: 0; }
.lh-name img { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; }
.lh-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lh-name i { font-style: normal; font-size: 15px; }
.lh-cols, .g-odds { display: grid; grid-template-columns: repeat(9, 66px) 52px; gap: 0 6px; padding: 0 8px; }
.lh-cols span { text-align: center; font-size: 12px; color: var(--ink-2); line-height: 1.15; }
.game { display: grid; grid-template-columns: minmax(0, 1fr) var(--oddcols); align-items: center; padding: 8px 0 6px 12px; border-top: 1px solid var(--line); cursor: pointer; }
.game:hover { background: #fafcfb; }
.game.selected { background: #f3f8f6; }
.g-main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; }
.g-team { display: flex; align-items: center; gap: 8px; font-size: 14px; min-width: 0; }
.g-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-scores { display: flex; gap: 10px; font-size: 13px; justify-content: flex-end; font-variant-numeric: tabular-nums; }
.g-scores b { min-width: 14px; text-align: right; }
.g-scores span { min-width: 14px; text-align: right; color: var(--ink-2); }
.g-meta { grid-column: 1 / -1; font-size: 11.5px; color: var(--ink-2); margin-top: 3px; display: flex; gap: 6px; align-items: center; }
.g-meta .live-clock { color: #c0392b; font-weight: 600; }
.g-meta .kick { color: var(--ink); font-weight: 600; }
.crest { width: 18px; height: 18px; object-fit: contain; flex: 0 0 auto; }
.crest-fallback { width: 18px; height: 18px; border-radius: 50%; background: #d5e3dd; color: var(--g-800); font-size: 8px; font-weight: 700; display: inline-grid; place-items: center; flex: 0 0 auto; }
.o { height: 34px; display: grid; place-items: center; background: var(--odd); border-radius: 4px; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; position: relative; }
.o.param { background: transparent; text-decoration: underline; text-decoration-color: #9db3aa; text-underline-offset: 3px; font-size: 12.5px; }
.o.empty { color: #9aa9a3; }
.o.locked::after { content: "🔒"; position: absolute; top: -6px; right: -4px; font-size: 10px; }
.o.up { animation: up 2.2s; }
.o.down { animation: down 2.2s; }
@keyframes up { 0%, 60% { background: #cdeedd; color: var(--up); } }
@keyframes down { 0%, 60% { background: #f8d6d3; color: var(--down); } }
.more { font-size: 12.5px; color: var(--g-600); font-weight: 600; text-decoration: underline; text-align: center; }
.list-empty { padding: 60px 20px; text-align: center; color: var(--ink-3); }
.list-more { display: block; margin: 14px auto 20px; padding: 10px 18px; border-radius: 4px; background: var(--g-600); color: #fff; font-weight: 600; font-size: 13px; }

/* ---------- Página do evento ---------- */
.ev-top { display: grid; grid-template-columns: 440px minmax(0, 1fr); gap: 10px; padding: 10px; color: #fff;
  background: radial-gradient(90% 120% at 70% 10%, rgba(52,140,96,.45), transparent 60%), linear-gradient(135deg, #0f3d30, #145440 55%, #0d3a2c); }
.ev-stats { background: rgba(4,30,22,.55); border-radius: 6px; padding: 8px; max-height: 260px; overflow-y: auto; scrollbar-width: thin; }
.ev-stats-tabs { display: flex; gap: 18px; padding: 4px 6px 8px; font-size: 13px; }
.ev-stats-tabs span:first-child { border-bottom: 2px solid #fff; padding-bottom: 4px; }
.ev-stats-tabs span { color: #bcd6ca; }
.st-row { position: relative; display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; height: 30px; margin-top: 3px; border-radius: 3px; overflow: hidden; background: rgba(255,255,255,.06); font-size: 13px; }
.st-row .bar-l, .st-row .bar-r { position: absolute; top: 0; bottom: 0; }
.st-row .bar-l { left: 0; background: rgba(46,170,110,.55); }
.st-row .bar-r { right: 0; background: rgba(46,170,110,.3); }
.st-row b, .st-row span { position: relative; z-index: 1; }
.st-row b { text-align: center; font-weight: 700; color: #ffe25c; }
.st-row span { text-align: center; }
.ev-board { position: relative; border-radius: 6px; padding: 10px 14px; min-height: 240px; display: flex; flex-direction: column; }
.ev-board-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.ev-board-head img { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; }
.ev-weather { margin-left: auto; display: flex; gap: 12px; font-size: 12px; color: #dcebe4; flex-wrap: wrap; justify-content: flex-end; }
.ev-score { flex: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-top: 14px; }
.ev-team { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; min-width: 0; }
.ev-team.home { justify-content: flex-end; text-align: right; }
.ev-team .crest, .ev-team .crest-fallback { width: 40px; height: 40px; font-size: 12px; }
.ev-center { text-align: center; }
.ev-period { font-size: 13px; color: #e5f1eb; display: flex; align-items: center; gap: 6px; justify-content: center; }
.ev-nums { font-size: 44px; font-weight: 800; color: var(--yellow); letter-spacing: 2px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ev-nums span { margin: 0 6px; }
.ev-kick { font-size: 15px; font-weight: 700; color: var(--yellow); }
.ev-count { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ev-sub { font-size: 12px; color: #c4dbcf; margin-top: 2px; }
.ev-periods { display: flex; justify-content: center; margin-top: 12px; }
.ev-periods table { border-collapse: collapse; font-size: 12px; background: rgba(4,30,22,.45); border-radius: 4px; overflow: hidden; }
.ev-periods th { font-weight: 500; color: #bcd6ca; padding: 4px 10px; }
.ev-periods td { padding: 3px 10px; text-align: center; color: var(--yellow); font-weight: 700; }
.ev-periods td:first-child { text-align: left; color: #fff; font-weight: 500; }
.ev-cards { display: flex; justify-content: center; gap: 18px; margin-top: 10px; font-size: 13px; }
.ev-cards span { display: inline-flex; align-items: center; gap: 5px; }
.ico-y, .ico-r { display: inline-block; width: 9px; height: 12px; border-radius: 1.5px; }
.ico-y { background: var(--card-y); } .ico-r { background: var(--card-r); }

.mk-bar { display: flex; align-items: center; gap: 4px; background: var(--g-700); color: #fff; padding: 0 10px; overflow-x: auto; scrollbar-width: none; }
.mk-bar::-webkit-scrollbar { display: none; }
.mk-sub { position: relative; flex: 0 0 auto; }
.mk-sub select { appearance: none; background: transparent; color: #fff; border: 0; border-right: 1px solid rgba(255,255,255,.2); font: inherit; font-size: 14px; font-weight: 700; padding: 13px 26px 13px 4px; cursor: pointer; }
.mk-sub select option { color: var(--ink); }
.mk-sub::after { content: "▾"; position: absolute; right: 10px; top: 13px; pointer-events: none; }
.mk-bar .mk-tab { padding: 13px 10px 11px; font-size: 14px; color: #d3e7de; white-space: nowrap; border-bottom: 2px solid transparent; }
.mk-bar .mk-tab.active { color: #fff; border-color: var(--yellow); font-weight: 600; }
.mk-find { margin-left: auto; flex: 0 0 200px; }
.mk-find input { width: 100%; height: 30px; border-radius: 4px; border: 0; background: var(--g-900); color: #fff; padding: 0 10px; font: inherit; font-size: 13px; outline: none; }
.mk-find input::placeholder { color: #a9c8bb; }
.mk-note { font-size: 11px; color: var(--ink-3); padding: 6px 12px 0; display: flex; justify-content: space-between; }
.mk-grid { columns: 2 420px; column-gap: 10px; padding: 8px 10px 20px; }
.mk-card { break-inside: avoid; margin-bottom: 10px; border-radius: 4px; overflow: hidden; background: #f4f7f6; border: 1px solid var(--line); }
.mk-card-head { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; background: #e6eeeb; font-size: 13.5px; color: #2c3c35; text-align: left; }
.mk-card-head i { font-style: normal; font-size: 11px; color: var(--ink-3); transition: transform .15s; }
.mk-card.collapsed .mk-card-head i { transform: rotate(180deg); }
.mk-card.collapsed .mk-rows { display: none; }
.mk-row { display: grid; gap: 2px; margin-top: 2px; }
.mk-cell { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; padding: 6px 12px; background: #fff; font-size: 13px; }
.mk-cell span { color: #2a3832; line-height: 1.25; }
.mk-cell b { font-weight: 600; font-variant-numeric: tabular-nums; }
.mk-cell.center { background: #fbf6d6; }
.mk-cell.locked b::before { content: "🔒 "; font-size: 10px; }
.mk-cell.empty { background: #fff; }
.mk-cell.up b { color: var(--up); } .mk-cell.down b { color: var(--down); }
.ev-back { display: inline-flex; align-items: center; gap: 6px; margin: 10px; font-size: 13px; color: var(--g-600); font-weight: 600; }

/* ---------- Estado ---------- */
.status-chip { position: fixed; right: 12px; bottom: 12px; z-index: 30; display: flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 16px; background: rgba(9,40,30,.92); color: #d5e8df; font-size: 12px; max-width: min(460px, calc(100vw - 24px)); }
.status-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-chip i { width: 8px; height: 8px; border-radius: 50%; background: #777; flex: 0 0 auto; }
.status-chip.live i { background: #43e07c; box-shadow: 0 0 0 3px rgba(67,224,124,.2); }
.status-chip.error i { background: #ff5a4e; }

/* ---------- Responsivo ---------- */
:root { --oddcols: auto; }
@media (max-width: 1400px) { .lh-cols, .g-odds { grid-template-columns: repeat(9, 56px) 46px; gap: 0 4px; } }
@media (max-width: 1200px) {
  .wrap { grid-template-columns: 1fr; }
  .sb { position: fixed; left: 0; top: 48px; bottom: 0; width: 290px; max-height: none; z-index: 25; background: var(--g-800); padding: 8px; transform: translateX(-100%); transition: transform .2s; }
  body.sb-open .sb { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .hdr-menu { display: block; }
  .ev-top { grid-template-columns: 1fr; }
  .ev-stats { order: 2; }
}
@media (max-width: 900px) {
  .lh-cols span:nth-child(n+4):not(:last-child), .g-odds > *:nth-child(n+4):not(:last-child) { display: none; }
  .lh-cols, .g-odds { grid-template-columns: repeat(3, 54px) 40px; }
  .hdr-search { width: 150px; }
  .hdr-nav a { padding: 6px 7px; font-size: 12px; }
  .mk-grid { columns: 1; }
  .mk-find { display: none; }
}
@media (max-width: 560px) {
  .brand { font-size: 15px; }
  .hdr-search { display: none; }
  .crumb-path { display: none; }
  .crumb-tabs { margin-left: 0; }
  .lh-cols, .g-odds { grid-template-columns: repeat(3, 46px) 34px; gap: 0 3px; padding: 0 4px; }
  .o { font-size: 12px; height: 32px; }
  .g-team { font-size: 13px; }
  .ev-team { font-size: 13px; flex-direction: column; gap: 6px; }
  .ev-team.home { flex-direction: column-reverse; text-align: center; }
  .ev-team.away { text-align: center; }
  .ev-nums { font-size: 34px; }
  .ev-weather { display: none; }
}
