/* ShopPro Premium — beta. Sistema visual v2.2 (Design System "ShopPro Premium"). */
:root {
  --areia: #F6F2EE; --branco: #FFFFFF; --areia-2: #EFE9E2; --linha: #E4DCD3; --borda-campo: #8A7D73;
  --tinta: #1D2A31; --tinta-2: #42565E; --acao: #FE7034; --acao-pressionada: #FF8A55;
  --link: #B4460E; --link-pressionado: #8A3409;
  --midia-1: #2A3A42; --midia-2: #33464F; --midia-3: #3D515B;
  --sucesso: #136B53; --sucesso-fundo: #DCF2EA; --info: #1F5FA8; --info-fundo: #E2EDFA;
  --alerta: #7A5200; --alerta-fundo: #FFF0CF; --erro: #A8241B; --erro-fundo: #FCE5E2; --ao-vivo: #B8261C;
  --desativado-texto: #6B6158; --trilho-desligado: #968A80;
  --e1: 4px; --e2: 8px; --e3: 12px; --e4: 16px; --margem: 20px; --e6: 24px; --e8: 32px;
  --r-s: 8px; --r-m: 12px; --r-l: 16px; --r-xl: 24px; --r-p: 99px;
  --toque: 44px; --botao-grande: 52px;
  --sombra-folha: 0 -8px 24px rgba(29, 42, 49, 0.12);
  --fonte: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --seguro-baixo: env(safe-area-inset-bottom, 0px);
  --seguro-topo: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--areia); color: var(--tinta); }
body { font-family: var(--fonte); font-size: 15px; line-height: 1.5; font-weight: 500; -webkit-text-size-adjust: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--link); }
a:hover { color: var(--link-pressionado); }
svg { flex: none; display: block; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- estrutura */
#app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; max-width: 480px; margin: 0 auto; }
.tela { flex: 1; display: flex; flex-direction: column; gap: var(--e4); padding: calc(var(--e4) + var(--seguro-topo)) var(--margem) var(--e6); }
.tela.com-menu { padding-bottom: calc(96px + var(--seguro-baixo)); }
.tela.com-rodape { padding-bottom: calc(112px + var(--seguro-baixo)); }
.centro { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: var(--e4); }
.pilha { display: flex; flex-direction: column; gap: var(--e3); }
.pilha-1 { display: flex; flex-direction: column; gap: var(--e1); }
.linha-h { display: flex; align-items: center; gap: var(--e3); }
.entre { display: flex; align-items: center; justify-content: space-between; gap: var(--e3); }
.cresce { flex: 1; min-width: 0; }

/* ---------------------------------------------------------------- texto */
.numero { font-size: 32px; line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.titulo-grande { font-size: 24px; line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
.titulo { font-size: 20px; line-height: 1.25; font-weight: 800; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
.subtitulo { font-size: 17px; line-height: 1.3; font-weight: 700; margin: 0; }
.forte { font-size: 16px; line-height: 1.35; font-weight: 700; margin: 0; }
.texto { font-size: 15px; line-height: 1.5; font-weight: 500; margin: 0; }
.texto-forte { font-size: 15px; line-height: 1.5; font-weight: 700; margin: 0; }
.legenda { font-size: 13px; line-height: 1.4; font-weight: 600; color: var(--tinta-2); margin: 0; }
.sec { color: var(--tinta-2); }
.corta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nowrap { white-space: nowrap; }

/* ---------------------------------------------------------------- topo */
.topo { display: flex; align-items: center; gap: var(--e3); min-height: var(--toque); }
.voltar { width: var(--toque); height: var(--toque); border-radius: var(--r-m); border: 1px solid var(--linha); background: var(--branco); display: flex; align-items: center; justify-content: center; color: var(--tinta); flex: none; text-decoration: none; }
.marca { display: flex; align-items: center; gap: var(--e2); }
.marca-icone { width: 20px; height: 20px; border-radius: 6px; background: var(--acao); display: flex; align-items: center; justify-content: center; color: var(--tinta); }
.marca-nome { font-size: 13px; font-weight: 700; color: var(--tinta); }

/* ---------------------------------------------------------------- botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--e2); min-height: var(--toque); padding: 0 var(--e4); border-radius: var(--r-m); border: 0; font-size: 15px; line-height: 1.35; font-weight: 700; text-decoration: none; white-space: nowrap; background: transparent; }
.btn:focus-visible, .voltar:focus-visible, .linha-toque:focus-visible, .switch:focus-visible, .pilula:focus-visible, .seg button:focus-visible { outline: 2px solid var(--tinta); outline-offset: 2px; }
.btn-principal { background: var(--acao); color: var(--tinta); }
.btn-principal:active { background: var(--acao-pressionada); }
.btn-escuro { background: var(--tinta); color: var(--branco); }
.btn-contorno { background: var(--branco); color: var(--tinta); border: 1.5px solid var(--tinta); }
.btn-link { color: var(--link); padding: 0 var(--e1); }
.btn-perigo { background: var(--branco); color: var(--erro); border: 1.5px solid var(--erro); }
.btn-grande { min-height: var(--botao-grande); font-size: 16px; padding: 0 var(--e6); }
.btn-largo { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--areia-2); color: var(--desativado-texto); border-color: var(--areia-2); cursor: default; }

/* ---------------------------------------------------------------- cartões e linhas */
.card { background: var(--branco); border: 1px solid var(--linha); border-radius: var(--r-l); padding: var(--e4); display: flex; flex-direction: column; gap: var(--e3); }
.card.escuro { background: var(--tinta); border-color: var(--tinta); color: var(--branco); }
.card.escuro .legenda, .card.escuro .sec { color: #C9D3D7; }
.lista { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.lista > li { border-bottom: 1px solid var(--linha); }
.lista > li:last-child { border-bottom: 0; }
.linha-toque { display: flex; align-items: center; gap: var(--e3); min-height: var(--toque); padding: var(--e3) 0; width: 100%; background: transparent; border: 0; text-align: left; color: var(--tinta); text-decoration: none; }
.seta { color: var(--tinta-2); }
.vid { display: flex; align-items: center; gap: var(--e3); padding: var(--e3); border-radius: var(--r-l); background: var(--branco); border: 1px solid var(--linha); color: var(--tinta); text-decoration: none; }
.vid .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--e1); align-items: flex-start; }
.mini { width: 36px; height: 56px; border-radius: var(--r-s); display: flex; align-items: center; justify-content: center; color: var(--branco); flex: none; background: var(--midia-1); overflow: hidden; position: relative; }
.mini img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.mini svg { position: relative; }
.mini.m2 { background: var(--midia-2); } .mini.m3 { background: var(--midia-3); }
.mini.g { width: 40px; height: 64px; }
.quadrado { width: 44px; height: 44px; border-radius: var(--r-m); background: var(--areia-2); display: flex; align-items: center; justify-content: center; color: var(--tinta); flex: none; }
.quadrado.grande { width: 64px; height: 64px; border-radius: var(--r-l); }

/* ---------------------------------------------------------------- selos e avisos */
.selo { display: inline-flex; align-items: center; gap: var(--e1); min-height: 28px; padding: 0 var(--e3); border-radius: var(--r-s); font-size: 13px; line-height: 1.4; font-weight: 600; white-space: nowrap; }
.selo-sucesso { background: var(--sucesso-fundo); color: var(--sucesso); }
.selo-info { background: var(--info-fundo); color: var(--info); }
.selo-alerta { background: var(--alerta-fundo); color: var(--alerta); }
.selo-erro { background: var(--erro-fundo); color: var(--erro); }
.selo-neutro { background: var(--areia-2); color: var(--tinta); }
.selo-escuro { background: var(--tinta); color: var(--branco); }
.aviso { display: flex; gap: var(--e3); align-items: flex-start; padding: var(--e3) var(--e4); border-radius: var(--r-m); font-size: 15px; line-height: 1.5; font-weight: 500; background: var(--areia-2); color: var(--tinta); }
.aviso svg { margin-top: 2px; }
.aviso-alerta { background: var(--alerta-fundo); } .aviso-alerta svg, .aviso-alerta strong { color: var(--alerta); }
.aviso-sucesso { background: var(--sucesso-fundo); } .aviso-sucesso svg { color: var(--sucesso); }
.aviso-erro { background: var(--erro-fundo); } .aviso-erro svg, .aviso-erro strong { color: var(--erro); }
.aviso-info { background: var(--info-fundo); } .aviso-info svg { color: var(--info); }
.aviso strong { font-weight: 700; }

/* ---------------------------------------------------------------- controles */
.switch { width: 52px; height: var(--toque); border: 0; padding: 0; background: transparent; display: flex; align-items: center; flex: none; }
.switch .trilho { width: 52px; height: 32px; border-radius: var(--r-p); padding: var(--e1); display: flex; justify-content: flex-start; background: var(--trilho-desligado); }
.switch[aria-checked="true"] .trilho { justify-content: flex-end; background: var(--tinta); }
.switch .bola { width: 24px; height: 24px; border-radius: var(--r-p); background: var(--branco); }
.seg { display: flex; gap: var(--e1); padding: var(--e1); border-radius: var(--r-l); background: var(--branco); border: 1px solid var(--linha); }
.seg button { flex: 1 1 auto; min-height: var(--toque); padding: 0 var(--e4); border-radius: var(--r-m); border: 0; background: transparent; font-size: 15px; font-weight: 700; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--tinta); color: var(--branco); }
.pilula { display: inline-flex; align-items: center; gap: var(--e2); min-height: var(--toque); padding: 0 var(--e4); border-radius: var(--r-p); border: 1px solid var(--borda-campo); background: var(--branco); font-size: 15px; font-weight: 700; }
.pilula[aria-pressed="true"] { background: var(--tinta); border-color: var(--tinta); color: var(--branco); }
.opcao { display: flex; align-items: center; gap: var(--e3); padding: var(--e4); border-radius: var(--r-l); border: 1px solid var(--borda-campo); background: var(--branco); text-align: left; width: 100%; }
.opcao[aria-pressed="true"] { border: 2.5px solid var(--tinta); padding: calc(var(--e4) - 1.5px); }
.campo { display: flex; flex-direction: column; gap: var(--e2); }
.campo label { font-size: 15px; font-weight: 700; }
.campo input { height: var(--botao-grande); border-radius: var(--r-m); border: 1.5px solid var(--borda-campo); background: var(--branco); padding: 0 var(--e4); font-size: 16px; font-weight: 500; }
.campo input.codigo { font-size: 24px; letter-spacing: 0.3em; text-transform: uppercase; text-align: center; font-weight: 800; }
.campo input:focus { outline: 2px solid var(--tinta); outline-offset: 1px; }
.barra { height: 8px; border-radius: var(--r-p); background: var(--areia-2); overflow: hidden; }
.barra > span { display: block; height: 100%; width: 0; background: var(--tinta-2); border-radius: var(--r-p); transition: width 0.3s; }
.card.escuro .barra { background: var(--midia-3); }
.card.escuro .barra > span { background: var(--acao); }

/* ---------------------------------------------------------------- menu de baixo e rodapé */
.menu { position: fixed; left: 0; right: 0; bottom: 0; background: var(--branco); border-top: 1px solid var(--linha); padding: var(--e2) var(--e2) calc(var(--e3) + var(--seguro-baixo)); z-index: 10; }
.menu-dentro { display: flex; justify-content: space-around; align-items: flex-start; max-width: 480px; margin: 0 auto; }
.menu a { flex: 1; min-height: var(--toque); display: flex; flex-direction: column; align-items: center; gap: var(--e1); color: var(--tinta-2); text-decoration: none; font-size: 13px; line-height: 1.4; font-weight: 600; }
.menu a[aria-current="page"] { color: var(--tinta); font-weight: 700; }
.menu .mais { width: 52px; height: 40px; border-radius: var(--r-m); background: var(--acao); color: var(--tinta); display: flex; align-items: center; justify-content: center; }
.rodape { position: fixed; left: 0; right: 0; bottom: 0; background: var(--areia); border-top: 1px solid var(--linha); padding: var(--e3) var(--margem) calc(var(--e3) + var(--seguro-baixo)); z-index: 10; }
.rodape-dentro { max-width: 440px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--e2); }

/* ---------------------------------------------------------------- folha e player */
.fundo { position: fixed; inset: 0; background: rgba(29, 42, 49, 0.45); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.folha { width: 100%; max-width: 480px; background: var(--branco); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--sombra-folha); padding: var(--e3) var(--margem) calc(var(--e8) + var(--seguro-baixo)); display: flex; flex-direction: column; gap: var(--e3); }
.alca { width: 40px; height: 4px; border-radius: var(--r-p); background: var(--linha); align-self: center; }
.player { position: fixed; inset: 0; background: #000; z-index: 30; display: flex; flex-direction: column; }
.player video { flex: 1; width: 100%; min-height: 0; object-fit: contain; background: #000; }
.player .fechar { position: absolute; top: calc(var(--e3) + var(--seguro-topo)); right: var(--e3); width: var(--toque); height: var(--toque); border-radius: var(--r-p); border: 0; background: rgba(29, 42, 49, 0.85); color: var(--branco); display: flex; align-items: center; justify-content: center; }
.player .rotulo { position: absolute; left: var(--e4); top: calc(var(--e4) + var(--seguro-topo)); color: var(--branco); background: rgba(29, 42, 49, 0.85); border-radius: var(--r-s); padding: var(--e1) var(--e3); font-size: 13px; font-weight: 700; }

/* ---------------------------------------------------------------- partes (conferir) */
.parte { display: flex; flex-direction: column; gap: var(--e2); padding: var(--e3) 0; border-bottom: 1px solid var(--linha); }
.parte:last-child { border-bottom: 0; }
.parte .assistir { flex: 1; min-width: 0; min-height: 56px; display: flex; align-items: center; gap: var(--e3); padding: 0; border: 0; background: transparent; text-align: left; }
.parte .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--e1); }
.parte.off .mini { opacity: 0.45; }
.parte.off .forte, .parte.off .legenda { color: var(--desativado-texto); }
.parte.alerta .mini { outline: 3px solid var(--alerta); outline-offset: -3px; }

/* ---------------------------------------------------------------- telas de estado */
.estado { align-items: flex-start; }
.estado > .aviso, .estado > .barra { align-self: stretch; }
.estado .quadrado.grande svg { width: 32px; height: 32px; }
.passos { margin: 0; padding: 0; list-style: none; counter-reset: p; display: flex; flex-direction: column; gap: var(--e4); }
.passos li { display: flex; gap: var(--e3); align-items: flex-start; }
.passos li::before { counter-increment: p; content: counter(p); width: 28px; height: 28px; border-radius: var(--r-p); background: var(--tinta); color: var(--branco); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.passos li > div { display: flex; flex-direction: column; gap: var(--e2); align-items: flex-start; padding-top: 2px; }
.botao-celular { display: inline-flex; align-items: center; gap: var(--e2); min-height: 36px; padding: 0 var(--e3); border-radius: var(--r-s); background: var(--areia-2); color: var(--info); font-size: 15px; font-weight: 700; }
.girando { animation: gira 1.2s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .girando { animation: none; } .barra > span { transition: none; } }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(104px + var(--seguro-baixo)); background: var(--tinta); color: var(--branco); padding: var(--e3) var(--e4); border-radius: var(--r-m); font-size: 15px; font-weight: 600; z-index: 40; max-width: calc(100% - 40px); }
