/* Paleta Erifarma (mesma do sistema de cupons e do protótipo do painel) */
:root {
  --azul: #2F3987; --azul-escuro: #1F2766; --azul-claro: #6C78C9; --amarelo: #F1CB30;
  --fundo: #F4F6F8; --texto: #1C2733; --texto2: #4F5B69; --borda: #DDE3E9; --trilho: #E6E9F2;
  --chip: #EEF0FA;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
       background: var(--fundo); color: var(--texto); font-size: 15px; }
a { color: var(--azul); } a:hover { color: var(--azul-escuro); }

.topo { background: var(--azul); color: #fff; padding: 10px 16px; display: flex;
        flex-wrap: wrap; align-items: center; gap: 12px; border-bottom: 4px solid var(--amarelo); }
.marca { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.marca img { height: 34px; width: auto; display: block; }
.marca span { font-weight: 600; font-size: 15px; }
.topo nav { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.topo nav a { color: #dfe2f5; text-decoration: none; padding: 0 10px; border-radius: 6px;
              min-height: 44px; display: inline-flex; align-items: center; }
.topo nav a:hover { background: rgba(255,255,255,.16); color: #fff; }
.topo nav a.sair { color: var(--amarelo); }
main { max-width: 1200px; margin: 0 auto; padding: 20px 16px 60px; }
h1 { font-size: 24px; margin: 4px 0 14px; }
h2 { font-size: 19px; margin: 0 0 10px; }
h3 { font-size: 16px; margin: 0 0 8px; }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.flash.ok { background: #e2f5e9; color: #14532d; border: 1px solid #a7dcb8; }
.flash.erro { background: #fde8e8; color: #8a1c1c; border: 1px solid #f3b4b4; }
.flash.aviso { background: #fff4d6; color: #6b4e00; border: 1px solid #ecd28a; }
.flash.info { background: #eef0fa; color: #26306f; border: 1px solid #c9d0e3; }

.cartao { background: #fff; border: 1px solid var(--borda); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.grade { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

form.pilha label { display: block; font-weight: 600; margin: 12px 0 4px; }
label { font-weight: 600; }
input[type=text], input[type=password], input[type=date], input[type=number], input[type=month], select, textarea {
  width: 100%; max-width: 420px; padding: 9px 10px; border: 1px solid #b9c2cc; min-height: 44px;
  border-radius: 7px; font-size: 16px; background: #fff; color: var(--texto); font-family: inherit; }
input.curto { max-width: 110px; }
input[type=file] { margin: 8px 0; max-width: 100%; }
input[type=checkbox] { width: 22px; height: 22px; vertical-align: middle; }
button, .botao { display: inline-flex; align-items: center; justify-content: center; background: var(--azul);
  color: #fff; border: 0; padding: 0 18px; min-height: 44px; border-radius: 8px; font-size: 15px;
  font-weight: 600; cursor: pointer; text-decoration: none; }
button:hover, .botao:hover { background: var(--azul-escuro); color: #fff; }
button.secundario, .botao.secundario { background: #fff; color: var(--azul); border: 2px solid #C9D0E3; }
button.secundario:hover, .botao.secundario:hover { border-color: var(--azul); color: var(--azul); }
button.amarelo, .botao.amarelo { background: var(--amarelo); color: var(--texto); }
button.perigo { background: #b32020; }
button:disabled { background: #9aa3ad; cursor: not-allowed; }
.acoes { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.tabela { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #e4e9ee; vertical-align: middle; }
th { background: #eef2f5; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: #46535f; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tag.rascunho { background: #e4e9ee; color: #46535f; }
.tag.publicado { background: var(--chip); color: var(--azul); }
.tag.fechado { background: #1C2733; color: #fff; }
.tag.ok { background: #e2f5e9; color: #14532d; }
.tag.falta { background: #fde8e8; color: #8a1c1c; }
.muted { color: var(--texto2); font-size: 13px; }
.login-caixa { max-width: 380px; margin: 60px auto; }
.senha-temp { font-family: ui-monospace, Consolas, monospace; font-size: 20px; font-weight: 700;
              background: #fff8db; border: 2px solid var(--amarelo); border-radius: 8px; padding: 8px 12px;
              display: inline-block; user-select: all; }

/* ---------------------------------------------------------------- painel do líder */
.painel { display: flex; flex-direction: column; gap: 20px; }
.painel-topo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.painel-topo h1 { margin: 0; font-size: 26px; }
.painel-topo p { margin: 4px 0 0; font-size: 14px; color: var(--texto2); }
.seletor { display: flex; gap: 8px; flex-wrap: wrap; }
.seletor a { min-height: 44px; padding: 0 16px; border-radius: 8px; border: 2px solid #C9D0E3; background: #fff;
             color: var(--azul); font-weight: 600; display: inline-flex; align-items: center; text-decoration: none; }
.seletor a.ativo { background: var(--azul); border-color: var(--azul); color: #fff; }
.secao { background: #fff; border: 1px solid var(--borda); border-radius: 12px; padding: 24px;
         display: flex; flex-direction: column; gap: 16px; }
.secao-cab { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.secao-cab h2 { margin: 0; font-size: 20px; }
.rotulo { font-size: 14px; font-weight: 600; color: var(--texto2); text-transform: uppercase; letter-spacing: .5px; }
.premio-linha { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.premio-valor { font-size: 48px; font-weight: 800; color: var(--azul); line-height: 1; }
.premio-de { font-size: 18px; color: var(--texto2); }
.total-pts { font-size: 32px; font-weight: 700; line-height: 1; }
.total-pts small { font-size: 18px; font-weight: 500; color: var(--texto2); }
.barra-empilhada { display: flex; height: 28px; border-radius: 8px; overflow: hidden; background: var(--trilho); }
.legenda { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; }
.legenda span { display: inline-flex; align-items: center; gap: 8px; }
.quad { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.c-meta { background: var(--amarelo); } .c-ind { background: var(--azul); } .c-aud { background: var(--azul-claro); }
.c-falta { background: var(--trilho); border: 1px solid #C9D0E3; }
.opps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.opp { background: #fff; border: 1px solid var(--borda); border-top: 4px solid var(--amarelo); border-radius: 12px;
       padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.opp b { font-size: 15px; } .opp .v { font-size: 26px; font-weight: 800; color: var(--azul); }
.opp .t { font-size: 14px; color: var(--texto2); }
.regua { position: relative; height: 72px; margin: 0 14px; }
.regua .trilho, .regua .cheio { position: absolute; top: 18px; height: 16px; border-radius: 8px; }
.regua .trilho { left: 0; right: 0; background: var(--trilho); }
.regua .cheio { left: 0; background: var(--amarelo); }
.regua .tick { position: absolute; top: 12px; display: flex; flex-direction: column; align-items: center; transform: translateX(-50%); }
.regua .tick i { width: 2px; height: 28px; background: var(--azul); display: block; }
.regua .tick span { font-size: 12px; font-weight: 600; margin-top: 4px; white-space: nowrap; }
.regua .tick span + span { font-weight: 400; color: var(--texto2); margin-top: 0; }
@media (max-width: 600px) { .regua .tick:nth-child(even of .tick) span { display: none; } }
.linha-ind { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 8px 24px;
             padding: 14px 0; border-top: 1px solid #EEF1F4; align-items: center; }
.linha-ind .esq, .linha-ind .dir { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.linha-ind .nome { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--chip); color: var(--azul); }
.chip.trava { background: #fde8e8; color: #8a1c1c; }
.barrinha { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--trilho); }
.barrinha div { background: var(--azul); } .barrinha.aud div { background: var(--azul-claro); }
.prox { color: var(--azul); font-weight: 600; }

/* ---------------------------------------------------------------- administração */
.lojas3 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.loja-card h2 { display: flex; justify-content: space-between; align-items: center; }
.loja-card .grande { font-size: 34px; font-weight: 800; color: var(--azul); line-height: 1.1; }
.passos { counter-reset: passo; }
.passos > .cartao > h2::before { counter-increment: passo; content: counter(passo) ". "; color: var(--azul); }
.digitar { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px 16px; }
.blocos-aud { display: grid; gap: 4px 12px; grid-template-columns: minmax(130px, 1fr) 100px 100px; align-items: center; }
.cortes td input { max-width: 92px; min-width: 70px; }
details > summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }

/* ---------------------------------------------------------------- auditoria no celular */
.aud { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.aud-titulo { font-size: 20px; font-weight: 700; }
.barra-prog { height: 10px; border-radius: 5px; overflow: hidden; background: var(--trilho); }
.barra-prog div { height: 100%; background: var(--azul); }
.sorteio { margin: 0; padding: 12px 14px; }
.sorteio summary { font-size: 13px; font-weight: 600; color: var(--texto2); text-transform: uppercase; letter-spacing: .5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips .chip { font-size: 14px; padding: 6px 12px; }
.aud-item { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.aud-pergunta { font-size: 18px; font-weight: 700; line-height: 1.3; }
.criterios { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.simnao { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.simnao button { min-height: 56px; border-radius: 10px; border: 2px solid var(--azul); background: #fff;
                 color: var(--azul); font-size: 18px; font-weight: 700; }
.simnao button:hover { background: var(--chip); color: var(--azul); }
.simnao button.marcado { background: var(--azul); color: #fff; }
.caixa-foto { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 10px;
              background: #FFF8DB; border: 1px solid var(--amarelo); font-size: 14px; }
.caixa-foto[hidden] { display: none; }
.botao-foto { min-height: 48px; border-radius: 10px; border: 1px dashed var(--azul); background: #fff; color: var(--azul);
              font-size: 15px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.foto-mini { max-width: 100%; max-height: 220px; object-fit: contain; border-radius: 8px; border: 1px solid var(--borda); }
.foto-mini[hidden] { display: none; }
button.grande, .botao.grande { min-height: 52px; width: 100%; font-size: 16px; }
button[hidden] { display: none; }
.aud-rodape { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.aud-rodape > * { width: 100%; }
.lista-links { columns: 2; padding-left: 18px; margin: 0; }
.lista-links li { margin-bottom: 6px; }
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.fotos figure { margin: 0; background: var(--fundo); border-radius: 10px; padding: 8px; }
.fotos img { width: 100%; height: 180px; object-fit: cover; border-radius: 6px; display: block; }
.fotos figcaption { font-size: 14px; margin-top: 6px; }
@media (max-width: 600px) {
  .topo { gap: 6px; padding: 8px 12px; }
  .topo nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; margin-left: 0; scrollbar-width: none; }
  .topo nav a { white-space: nowrap; min-height: 44px; padding: 0 8px; font-size: 14px; }
}

/* ---------------------------------------------------------------- simulador */
.campos-sim { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 20px; }
.campos-sim label { display: block; margin-bottom: 4px; }
.campos-sim input { max-width: 100%; }
.campos-sim .muted { margin-top: 4px; font-size: 12px; }
.campos-sim input::placeholder { color: #9AA5B1; opacity: 1; }
.sobe { color: #1F7A3D; }
.desce { color: #B3261E; }
.mudanca { padding: 10px 0; border-top: 1px solid #EEF1F4; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.mudanca-cab { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 15px; }
