/* Lucky Apostas - ecra dos amigos. Estrutura copiada de um sportsbook classico:
   barra de topo verde, coluna de ligas a' esquerda, jogos ao centro, boletim flutuante. */
:root {
  --topo: #126e51;
  --topo-escuro: #0d5a42;
  --acento: #26ffbe;
  --fundo: #383838;
  --painel: #2f2f2f;
  --painel-2: #3a3a3a;
  --lateral: #262626;
  --linha: #474747;
  --odd: #ffdf1b;
  --texto: #ffffff;
  --mudo: #b9b9b9;
  --erro: #ff6b6b;
  --ok: #26ffbe;
  --claro: #e4e4e4;
  --claro-2: #d2d2d2;
  --tinta: #1d1d1d;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--fundo); color: var(--texto); font: 13px/1.35 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; }
a { color: inherit; text-decoration: none; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- topo ---------- */
.topo { position: sticky; top: 0; z-index: 30; height: 44px; background: var(--topo); display: flex; align-items: center; padding: 0 12px; gap: 12px; box-shadow: 0 1px 0 rgba(0,0,0,.35); }
.logo { font-weight: 900; font-size: 22px; letter-spacing: -.5px; color: var(--odd); white-space: nowrap; }
.logo span { color: #fff; margin-left: 2px; }
.abas { flex: 1; display: flex; justify-content: center; gap: 4px; height: 100%; }
.abas button { height: 100%; padding: 0 12px; white-space: nowrap; color: #fff; border-bottom: 2px solid transparent; }
.abas button.ativa { color: var(--acento); border-bottom-color: var(--acento); }
.direita { display: flex; align-items: center; gap: 8px; position: relative; }
.saldo { border: 1px solid rgba(255,255,255,.6); border-radius: 14px; padding: 3px 10px; font-weight: 600; white-space: nowrap; }
.conta-btn { width: 26px; height: 26px; border: 1px solid rgba(255,255,255,.6); border-radius: 50%; display: grid; place-items: center; }
.conta-btn svg { width: 14px; height: 14px; }
.menu { position: absolute; right: 0; top: 36px; background: var(--painel); border: 1px solid var(--linha); border-radius: 6px; min-width: 190px; padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.menu .quem { padding: 6px 8px 8px; color: var(--mudo); border-bottom: 1px solid var(--linha); margin-bottom: 4px; }
.menu button { display: block; width: 100%; text-align: left; padding: 8px; border-radius: 4px; }
.menu button:hover { background: var(--painel-2); }

/* ---------- corpo ---------- */
.corpo { display: grid; grid-template-columns: 158px minmax(0, 1fr); min-height: calc(100vh - 44px); }
.lateral { background: var(--lateral); padding: 8px 0 80px; position: sticky; top: 44px; align-self: start; height: calc(100vh - 44px); overflow-y: auto; }
.lateral h3 { margin: 14px 10px 6px; font-size: 11px; letter-spacing: .3px; color: var(--acento); text-transform: uppercase; font-weight: 700; }
.lateral button { display: flex; width: 100%; align-items: center; gap: 8px; text-align: left; padding: 8px 10px; font-weight: 600; }
.lateral button:hover { background: #303030; }
.lateral button.ativa { color: var(--acento); }
.lateral .conta { margin-left: auto; color: var(--mudo); font-weight: 400; font-size: 11px; }
.bola { width: 13px; height: 13px; flex: none; }
.centro { padding: 12px 10px 110px; min-width: 0; }
.blocos { display: grid; grid-template-columns: repeat(auto-fit, minmax(430px, 1fr)); gap: 12px 10px; align-items: start; }
.bloco h2 { margin: 2px 0 8px; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.bloco h2 small { margin-left: auto; font-size: 11px; font-weight: 400; color: var(--mudo); }
.tabela { background: var(--painel); border-radius: 4px; overflow: hidden; }
.dia, .jogo { display: grid; grid-template-columns: 62px minmax(0, 1fr) repeat(3, 74px) 46px; align-items: center; }
.dia { background: #444; color: var(--mudo); font-size: 11px; min-height: 24px; }
.dia > span { text-align: center; }
.dia > span:first-child { grid-column: 1 / 3; padding-left: 10px; font-weight: 700; text-align: left; }
.jogo { border-top: 1px solid var(--linha); min-height: 44px; }
.jogo .hora { padding-left: 10px; color: var(--mudo); font-size: 11px; }
.jogo .equipas { padding: 5px 4px; min-width: 0; cursor: pointer; }
.jogo .equipas div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; line-height: 1.5; }
.odd { align-self: stretch; display: grid; place-items: center; color: var(--odd); font-weight: 600; border-left: 1px solid var(--linha); min-height: 44px; }
.odd:hover { background: #404040; }
.odd.escolhida { background: #f2f2f2; color: var(--topo); }
.odd.fechada { color: #777; cursor: default; }
.mais { align-self: stretch; display: grid; place-items: center; color: var(--mudo); font-size: 11px; border-left: 1px solid var(--linha); }
.mais:hover { color: #fff; }
.vazio { padding: 36px 16px; text-align: center; color: var(--mudo); background: var(--painel); border-radius: 4px; }

/* ---------- pagina do jogo ---------- */
.cabeca-jogo { background: linear-gradient(180deg, #17503f, #20463a 60%, var(--painel)); border-radius: 4px 4px 0 0; padding: 10px 12px 12px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
.cabeca-jogo .caminho { color: #d6e9e2; font-size: 11px; cursor: pointer; }
.cabeca-jogo .quando { color: #d6e9e2; font-size: 11px; text-align: right; }
.cabeca-jogo h1 { margin: 2px 0 0; font-size: 17px; grid-column: 1 / 3; }
.mercado { background: var(--painel); border-top: 1px solid var(--acento-fraco, #1e7a5d); }
.mercado h3 { margin: 0; padding: 10px 12px; font-size: 13px; }
.selecoes { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); border-top: 1px solid var(--linha); }
.sel { display: flex; gap: 6px; padding: 10px 12px; text-align: left; border-left: 1px solid var(--linha); min-height: 38px; align-items: center; }
.sel:first-child { border-left: 0; }
.sel span { color: #e8e8e8; }
.sel b { color: var(--odd); font-weight: 600; }
.sel:hover { background: #3a3a3a; }
.sel.escolhida { background: #f2f2f2; }
.sel.escolhida span, .sel.escolhida b { color: var(--topo); }
.golos { display: grid; grid-template-columns: 90px 1fr 1fr; border-top: 1px solid var(--linha); }
.golos .cab { background: #444; color: var(--mudo); font-size: 11px; text-align: center; padding: 4px; font-weight: 700; }
.golos .linha { display: grid; place-items: center; border-top: 1px solid var(--linha); color: #e8e8e8; }
.golos .odd { border-top: 1px solid var(--linha); min-height: 34px; }

/* ---------- boletim ---------- */
.boletim-barra { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 40; width: min(276px, calc(100vw - 20px)); background: var(--claro); color: var(--tinta); border-radius: 3px; padding: 8px 12px; display: flex; align-items: center; gap: 8px; box-shadow: 0 6px 22px rgba(0,0,0,.55); text-align: left; }
.pastilha { width: 20px; height: 20px; border-radius: 50%; background: var(--topo); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.veu { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 45; }
.boletim { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 50; width: min(300px, calc(100vw - 16px)); max-height: calc(100vh - 70px); display: flex; flex-direction: column; background: var(--claro); color: var(--tinta); border-radius: 3px; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.boletim header { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid #c4c4c4; }
.boletim header b { font-weight: 600; }
.boletim header .s { margin-left: auto; text-align: right; font-size: 11px; color: #555; line-height: 1.25; }
.boletim header .fechar { width: 30px; height: 30px; border-left: 1px solid #c4c4c4; margin: -8px -10px -8px 4px; padding: 0 20px 0 12px; font-size: 16px; color: #555; }
.boletim .tudo { padding: 7px 10px; color: var(--topo); font-size: 12px; display: flex; }
.boletim .lista { overflow-y: auto; }
.item { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto 76px; gap: 2px 6px; padding: 8px 8px 8px 6px; background: var(--claro-2); border-top: 1px solid #bdbdbd; align-items: start; border-left: 2px solid transparent; }
.item.aviso { border-left-color: #d33; }
.item .x { color: #666; font-size: 13px; line-height: 1.2; }
.item .nome { font-weight: 600; font-size: 13px; }
.item .det { grid-column: 2 / 3; color: #555; font-size: 11px; line-height: 1.3; }
.item .o { font-weight: 600; }
.item .o.mudou { color: #c22; }
.item input, .multi input { width: 76px; border: 0; border-bottom: 1px solid #aaa; background: #ececec; padding: 3px 4px; text-align: right; color: var(--tinta); border-radius: 2px 2px 0 0; outline: none; }
.item input:focus, .multi input:focus { border-bottom-color: var(--topo); background: #fff; }
.item .ret { grid-column: 3 / 5; text-align: right; color: #555; font-size: 11px; }
.multi { display: grid; grid-template-columns: minmax(0, 1fr) auto 76px; gap: 2px 6px; align-items: center; padding: 8px; background: #dcdcdc; border-top: 1px solid #bdbdbd; }
.multi .nota { grid-column: 1 / 4; color: #b02a2a; font-size: 11px; }
.multi .ret { grid-column: 1 / 4; text-align: right; color: #555; font-size: 11px; }
.total { padding: 7px 10px; text-align: right; font-size: 11px; color: #444; border-top: 1px solid #bdbdbd; }
.msg { padding: 7px 10px; font-size: 12px; background: #fbe3e3; color: #a11; border-top: 1px solid #e3b5b5; }
.msg.boa { background: #dff5ea; color: #0c6a48; border-top-color: #b3dcc8; }
.apostar { background: var(--topo); color: #fff; padding: 12px; font-size: 14px; border-radius: 0 0 3px 3px; }
.apostar:disabled { background: #7d9a90; cursor: default; }
.apostar b { color: var(--odd); font-weight: 600; }

/* ---------- minhas apostas ---------- */
.filtros { display: flex; gap: 6px; margin-bottom: 10px; }
.filtros button { padding: 6px 12px; border-radius: 14px; background: var(--painel); color: var(--mudo); }
.filtros button.ativa { background: var(--acento); color: #0b3a2c; font-weight: 700; }
.apostas { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; align-items: start; }
.cartao { background: var(--painel); border-radius: 4px; overflow: hidden; }
.cartao header { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #444; }
.cartao header small { margin-left: auto; color: var(--mudo); }
.etiqueta { font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 2px 6px; border-radius: 3px; background: #666; }
.etiqueta.ganho { background: var(--acento); color: #0b3a2c; }
.etiqueta.perdido { background: #7a2e2e; }
.etiqueta.anulado { background: #70652a; }
.etiqueta.aberto { background: #2d5d8a; }
.cartao .l { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 0 6px; padding: 7px 10px; border-top: 1px solid var(--linha); }
.cartao .l .p { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; background: #888; }
.cartao .l .p.ganha { background: var(--acento); }
.cartao .l .p.perdida { background: #e05252; }
.cartao .l .p.anulada { background: #c9b53d; }
.cartao .l .o { color: var(--odd); font-weight: 600; }
.cartao .l .det { grid-column: 2 / 4; color: var(--mudo); font-size: 11px; }
.cartao footer { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--linha); color: var(--mudo); font-size: 12px; }
.cartao footer b { color: #fff; }
.cartao footer .v b { color: var(--acento); }

/* ---------- entrada ---------- */
.entrada { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: linear-gradient(180deg, var(--topo) 0, var(--topo) 190px, var(--fundo) 190px); }
.entrada form { width: min(340px, 100%); background: var(--painel); border-radius: 6px; padding: 22px 20px; box-shadow: 0 12px 40px rgba(0,0,0,.45); }
.entrada .logo { font-size: 30px; display: block; text-align: center; margin-bottom: 4px; }
.entrada p { color: var(--mudo); text-align: center; margin: 0 0 16px; }
.entrada label { display: block; color: var(--mudo); font-size: 12px; margin: 10px 0 4px; }
.entrada input { width: 100%; padding: 10px; border-radius: 4px; border: 1px solid var(--linha); background: #242424; color: #fff; outline: none; }
.entrada input:focus { border-color: var(--acento); }
.entrada button { width: 100%; margin-top: 16px; padding: 11px; border-radius: 4px; background: var(--acento); color: #0b3a2c; font-weight: 700; }
.entrada .erro { color: var(--erro); min-height: 18px; margin-top: 10px; text-align: center; }
.torrada { position: fixed; left: 50%; top: 54px; transform: translateX(-50%); z-index: 60; background: #0b3a2c; color: var(--acento); border: 1px solid var(--acento); padding: 8px 14px; border-radius: 4px; box-shadow: 0 6px 20px rgba(0,0,0,.5); }

/* ---------- ecras estreitos ---------- */
@media (max-width: 760px) {
  .topo .logo { font-size: 19px; }
  .abas { justify-content: flex-start; }
  .abas button { padding: 0 8px; }
  .corpo { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .lateral { position: static; height: auto; padding: 6px 6px; display: flex; gap: 6px; overflow-x: auto; white-space: nowrap; }
  .lateral h3 { display: none; }
  .lateral button { width: auto; flex: none; padding: 6px 10px; border-radius: 14px; background: #333; }
  .lateral .conta { margin-left: 4px; }
  .centro { padding: 10px 6px 110px; }
  .blocos { grid-template-columns: minmax(0, 1fr); }
  .dia, .jogo { grid-template-columns: 46px minmax(0, 1fr) repeat(3, 56px) 34px; }
  .jogo .hora { padding-left: 6px; }
  .dia > span:first-child { padding-left: 6px; }
  .golos { grid-template-columns: 64px 1fr 1fr; }
  .sel { padding: 10px 8px; flex-direction: column; align-items: flex-start; gap: 0; }
}
