/* Tela Parceira Rede — protótipo. Painéis claros (celular primeiro), player escuro. */
:root {
  --marca: #0f766e; --marca-2: #115e59; --fundo: #f5f7f6; --cartao: #fff; --texto: #1f2937; --texto-2: #5b6470;
  --borda: #e3e8e6; --verde: #16a34a; --amarelo: #d97706; --vermelho: #dc2626; --cinza: #6b7280;
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif; font-size: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fundo); color: var(--texto); }
button, input, select, textarea { font: inherit; color: inherit; }
h2 { font-size: 22px; margin: 4px 0 12px; } h3 { font-size: 18px; margin: 0 0 10px; }
h3 small, h2 small { font-weight: 400; color: var(--texto-2); font-size: 14px; }
.oculto { display: none !important; }
.mudo { color: var(--texto-2); font-size: 14px; }
.centro { text-align: center; }
.alerta { background: #fef3c7; border: 1px solid #fcd34d; color: #78350f; border-radius: 10px; padding: 8px 12px; font-size: 14px; }

.demo-faixa { background: #fde68a; color: #713f12; text-align: center; font-size: 13px; font-weight: 600; padding: 5px 10px; position: sticky; top: 0; z-index: 20; }
.logo { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--marca); color: #fbbf24; font-size: 22px; }
.logo.grande { width: 64px; height: 64px; font-size: 40px; border-radius: 16px; }

/* ---------- botões ---------- */
.btn { background: #fff; border: 1px solid var(--borda); border-radius: 10px; padding: 9px 14px; cursor: pointer; font-weight: 600; font-size: 15px; text-decoration: none; display: inline-block; white-space: nowrap; }
.btn:hover { border-color: var(--marca); }
.btn-link { background: none; border: 0; color: var(--marca); font-weight: 600; cursor: pointer; padding: 6px; text-decoration: underline; font-size: 15px; }
.btn-grande { display: block; width: 100%; border: 0; border-radius: 14px; padding: 15px 16px; font-size: 17px; font-weight: 700; cursor: pointer;
  background: var(--marca); color: #fff; margin: 10px 0; text-align: center; }
.btn-grande:hover { background: var(--marca-2); }
.btn-grande.verde { background: var(--verde); } .btn-grande.cinza { background: #e5e7eb; color: var(--texto); }
.btn-grande.amarelo { background: #fef3c7; color: #78350f; border: 1px solid #fcd34d; }
.botoes { display: flex; gap: 10px; } .botoes .btn-grande { margin: 6px 0 0; }

/* ---------- entrada ---------- */
.entrada { max-width: 520px; margin: 0 auto; padding: 24px 16px; }
.ent-marca { text-align: center; margin: 12px 0 22px; }
.ent-marca h1 { margin: 12px 0 6px; font-size: 28px; } .ent-marca p { color: var(--texto-2); margin: 0; }
.ent-sub { font-size: 17px; }
.ent-botoes { display: grid; gap: 12px; }
.ent-btn { display: flex; gap: 14px; align-items: center; text-align: left; background: #fff; border: 1px solid var(--borda); border-radius: 16px;
  padding: 16px; cursor: pointer; text-decoration: none; color: var(--texto); box-shadow: 0 2px 6px rgba(0,0,0,.04); }
.ent-btn:hover { border-color: var(--marca); }
.ent-btn b { display: block; font-size: 17px; } .ent-btn small { color: var(--texto-2); font-size: 14px; }
.ent-ic { font-size: 30px; width: 44px; text-align: center; flex: none; }
.rodape { text-align: center; color: #9aa3ad; font-size: 12px; padding: 24px 0 8px; }

/* ---------- moldura dos painéis ---------- */
.topo { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--borda); }
.marca { display: flex; gap: 10px; align-items: center; min-width: 0; }
.marca b { display: block; font-size: 16px; } .marca small { display: block; color: var(--texto-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.corpo { display: flex; flex-direction: column-reverse; }
.conteudo { padding: 16px 16px 96px; max-width: 980px; width: 100%; margin: 0 auto; }
.abas { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: #fff; border-top: 1px solid var(--borda); z-index: 10; padding-bottom: env(safe-area-inset-bottom); }
.aba { flex: 1; border: 0; background: none; padding: 8px 2px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; font-size: 12px; color: var(--texto-2); min-width: 0; }
.aba > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.aba-ic { font-size: 22px; } .aba.ativa { color: var(--marca); font-weight: 700; }
.bolinha { font-style: normal; background: var(--vermelho); color: #fff; border-radius: 99px; padding: 0 6px; font-size: 11px; }
@media (min-width: 900px) {
  .corpo { flex-direction: row; }
  .abas { position: sticky; top: 30px; align-self: flex-start; flex-direction: column; width: 210px; border: 0; background: none; padding: 16px 8px; }
  .aba { flex-direction: row; gap: 10px; font-size: 15px; padding: 10px 12px; border-radius: 10px; justify-content: flex-start; }
  .aba.ativa { background: #e6f2f0; }
  .conteudo { padding-bottom: 24px; }
}

/* ---------- cartões ---------- */
.cartao { background: var(--cartao); border: 1px solid var(--borda); border-radius: 16px; padding: 16px; margin: 0 0 12px; }
.cartao.destaque { border: 2px solid var(--marca); }
.cartao.vazio { text-align: center; color: var(--texto-2); }
.cartao.bom { background: #ecfdf5; border-color: #a7f3d0; } .cartao.atencao { background: #fffbeb; border-color: #fcd34d; }
.cartao.linha { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .cartao.linha > span:first-child { flex: 1; min-width: 180px; }
.numeros { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 0 0 12px; }
.numero { background: #fff; border: 1px solid var(--borda); border-radius: 14px; padding: 12px 14px; }
.numero small { display: block; color: var(--texto-2); font-size: 13px; } .numero b { display: block; font-size: 22px; margin-top: 2px; }
.numero span { display: block; color: var(--texto-2); font-size: 12px; }
.lista-simples { margin: 0; padding-left: 20px; } .lista-simples li { margin: 6px 0; }
.chip { display: inline-block; border-radius: 99px; padding: 2px 10px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip.verde { background: #dcfce7; color: #166534; } .chip.amarelo { background: #fef3c7; color: #92400e; }
.chip.vermelho { background: #fee2e2; color: #991b1b; } .chip.cinza { background: #f3f4f6; color: #4b5563; }
.tabela { width: 100%; border-collapse: collapse; font-size: 14px; margin: 6px 0 12px; background: #fff; }
.tabela th, .tabela td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--borda); }
.tabela th { color: var(--texto-2); font-weight: 600; font-size: 13px; }
.grupo-titulo { margin: 18px 0 8px; }
.tela-cartao { display: flex; gap: 12px; align-items: flex-start; }
.tc-ic { font-size: 30px; } .tc-info { flex: 1; min-width: 0; } .tc-info small { display: block; color: var(--texto-2); margin: 2px 0 4px; }

/* ---------- formulários ---------- */
label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 10px; color: var(--texto-2); }
input:not([type=radio]):not([type=checkbox]), select, textarea { display: block; width: 100%; margin-top: 4px; padding: 11px 12px; border: 1px solid #cfd8d5; border-radius: 10px; background: #fff; font-size: 16px; color: var(--texto); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--marca); border-color: transparent; }
label.inline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 400; margin: 8px 0 0; }
label.inline select, label.inline input { width: auto; margin: 0; padding: 6px 8px; }
input.curto { width: 80px !important; }
.duas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.escolha { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.escolha label { margin: 0; font-weight: 600; color: var(--texto); background: #f3f6f5; border: 1px solid var(--borda); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.escolha label:has(input:checked) { border-color: var(--marca); background: #e6f2f0; }
.checks { display: grid; gap: 4px; margin-bottom: 12px; } .checks label { font-weight: 400; color: var(--texto); margin: 0; }
.passo { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--marca); color: #fff; font-size: 15px; margin-right: 6px; }
.emojis { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.emo { font-size: 22px; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--borda); background: #fff; cursor: pointer; }
.emo.ativo { border: 2px solid var(--marca); background: #e6f2f0; }
.cores { display: flex; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
.cor { width: 36px; height: 36px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--borda); cursor: pointer; }
.cor.ativo { box-shadow: 0 0 0 3px var(--texto); }
.resumo-alvo { background: #e6f2f0; border-radius: 12px; padding: 12px 14px; margin-top: 8px; }
.resumo-alvo b { display: block; font-size: 19px; color: var(--marca-2); } .resumo-alvo small { color: var(--texto-2); }
.criar { display: grid; gap: 16px; }
.criar-previa { order: -1; }
@media (min-width: 900px) { .criar { grid-template-columns: 1fr 380px; align-items: start; } .criar-previa { order: 0; position: sticky; top: 40px; } }
textarea[readonly] { background: #f8faf9; font-size: 14px; }

/* barras do relatório */
.barras { display: flex; gap: 6px; align-items: flex-end; height: 120px; margin: 8px 0 12px; }
.barra { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.barra span { width: 100%; background: var(--marca); border-radius: 6px 6px 0 0; min-height: 2px; }
.barra small { font-size: 11px; color: var(--texto-2); } .barra i { font-style: normal; font-size: 11px; color: #fff; position: absolute; top: 4px; }

/* aviso com Desfazer */
#toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .25s;
  background: #1f2937; color: #fff; border-radius: 12px; padding: 12px 16px; display: flex; gap: 12px; align-items: center; z-index: 50; max-width: calc(100% - 32px); font-size: 15px; }
#toast.mostra { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#toast .btn-link { color: #fbbf24; }

/* ---------- slide (player e prévias) ---------- */
.slide { width: 100%; height: 100%; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 4%; align-items: center; padding: 5%;
  border-radius: 24px; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 45%, #000) 0%, var(--c) 60%, color-mix(in srgb, var(--c) 40%, #000) 100%);
  container-type: inline-size; animation: entra .5s ease-out; }
.slide.sem-qr { grid-template-columns: 1fr; text-align: center; }
@keyframes entra { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
.sl-tag { display: inline-block; background: rgba(0,0,0,.3); border-radius: 99px; padding: .3em 1em; font-size: clamp(10px, 2.6cqi, 22px); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.sl-emoji { font-size: clamp(24px, 8cqi, 110px); line-height: 1.1; margin: .2em 0 0; }
.slide h1 { font-size: clamp(18px, 7cqi, 96px); line-height: 1.05; margin: .15em 0 .2em; }
.slide p { font-size: clamp(12px, 3.4cqi, 40px); line-height: 1.3; margin: 0 0 .5em; opacity: .95; }
.sl-oferta { display: inline-block; background: #fbbf24; color: #1f2937; font-weight: 800; border-radius: 12px; padding: .3em .8em; font-size: clamp(12px, 3.6cqi, 44px); }
.slide.com-arte { background: #0b1120; padding: 3%; }
.sl-arte { height: 100%; min-height: 0; display: flex; align-items: center; justify-content: center; }
.sl-arte img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; display: block; }
.player .slide.com-arte .sl-arte { max-height: 100%; }
.sl-qr { background: #fff; color: #1f2937; border-radius: 18px; padding: 6%; text-align: center; }
.sl-qr .qr svg { width: 100%; height: auto; display: block; }
.sl-qr-txt { font-size: clamp(10px, 2.2cqi, 26px); font-weight: 600; margin-top: 4px; line-height: 1.2; }
.sl-cupom { font-size: clamp(9px, 2cqi, 22px); margin-top: 6px; background: #f3f4f6; border-radius: 8px; padding: 4px; word-break: break-all; }
.previa { aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #111; margin-bottom: 10px; }
.previa.mini { width: 150px; flex: none; margin: 0; }
.anuncio-cartao { display: flex; gap: 12px; align-items: flex-start; }
@media (max-width: 480px) { .anuncio-cartao { flex-direction: column; } .previa.mini { width: 100%; } }

/* ---------- player ---------- */
body.modo-player { background: #000; overflow: hidden; }
.player { position: fixed; inset: 0; background: #05080d; display: flex; flex-direction: column; user-select: none; cursor: none; }
.pl-palco { flex: 1; padding: 2.5vmin; min-height: 0; position: relative; }
.pl-rodape { display: flex; justify-content: space-between; gap: 10px; color: #94a3b8; font-size: clamp(10px, 1.6vmin, 16px); padding: .6vmin 2.5vmin 1.2vmin; }
.pl-controle { position: fixed; top: 10px; right: 10px; display: flex; gap: 8px; background: rgba(255,255,255,.95); border-radius: 12px; padding: 4px 8px; opacity: 0; transition: .3s; cursor: default; }
.pl-controle.ver { opacity: 1; pointer-events: auto; }
.pl-controle { pointer-events: none; flex-wrap: wrap; align-items: center; justify-content: flex-end; max-width: calc(100% - 20px); }
.pl-btn { font: inherit; font-size: 18px; min-width: 48px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: #e2e8f0; color: #0f172a; cursor: pointer; }
.pl-btn.verde { background: #0f766e; color: #fff; }
.pl-vazio { position: absolute; left: 50%; bottom: 6vmin; transform: translateX(-50%); background: rgba(0,0,0,.6); color: #e2e8f0; padding: 8px 16px; border-radius: 10px; font-size: clamp(12px, 2vmin, 20px); text-align: center; }
.slide.relogio { --c: #0f766e; }
.rel-hora { font-size: clamp(40px, 16cqi, 220px); font-weight: 800; line-height: 1; margin: .1em 0; font-variant-numeric: tabular-nums; }
/* tela em pé: QR embaixo do texto */
@media (orientation: portrait) {
  .player .slide { grid-template-columns: 1fr; grid-template-rows: 1fr auto; text-align: center; padding: 8% 7%; }
  .player .sl-qr { width: 46%; margin: 0 auto; }
  .player .slide h1 { font-size: clamp(22px, 10cqi, 120px); } .player .slide p { font-size: clamp(14px, 5cqi, 56px); }
  .player .sl-qr-txt { font-size: clamp(11px, 3.4cqi, 32px); } .player .sl-cupom { font-size: clamp(10px, 3cqi, 28px); }
}

/* pareamento */
.parear { min-height: 100vh; background: #05080d; color: #e2e8f0; }
.par-caixa { text-align: center; padding: 5vmin 16px; max-width: 720px; margin: 0 auto; }
.par-caixa h1 { font-size: clamp(26px, 5vmin, 48px); margin: 14px 0 6px; } .par-caixa p { font-size: clamp(15px, 2.4vmin, 22px); }
.par-codigo { font-size: clamp(56px, 16vmin, 150px); font-weight: 800; letter-spacing: .08em; color: #fbbf24; font-variant-numeric: tabular-nums; margin: 2vmin 0; }
.par-qr { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; }
.par-qr .qr { width: clamp(120px, 22vmin, 220px); background: #fff; border-radius: 12px; padding: 6px; } .par-qr svg { width: 100%; height: auto; display: block; }
.parear .btn-link { color: #5eead4; }

/* Login (modo banco) */
.erro { color: #b91c1c; font-weight: 600; min-height: 1.2em; margin: 4px 0 10px; }
.rotulo { font-weight: 600; margin: 4px 0 6px; }
.login-modo label { flex: 1; text-align: center; }

/* Etiqueta de produto de afiliado no slide */
.slide { position: relative; }
.sl-pub { position: absolute; top: 3%; right: 3%; background: rgba(255,255,255,.92); color: #1f2937; border-radius: 6px; padding: .2em .6em;
  font-size: clamp(9px, 1.8cqi, 18px); font-weight: 700; letter-spacing: .03em; text-transform: uppercase; z-index: 2; }
.qr-vazio { display: grid; place-items: center; aspect-ratio: 1; color: #9aa3ad; font-weight: 700; border: 2px dashed #d1d5db; border-radius: 10px; }

/* Página de links (?links=) */
.lk { min-height: 100vh; padding: 20px 16px; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 35%, #fff) 0%, #f5f7f6 55%); }
.lk-caixa { max-width: 460px; margin: 0 auto; background: #fff; border-radius: 20px; padding: 20px; box-shadow: 0 8px 30px rgba(0,0,0,.08); position: relative; }
.lk-pub { position: absolute; top: 12px; right: 12px; background: #f3f4f6; color: #4b5563; font-size: 11px; font-weight: 700; text-transform: uppercase; border-radius: 6px; padding: 2px 8px; }
.lk-topo { display: flex; gap: 12px; align-items: center; margin: 0 0 12px; padding-right: 80px; }
.lk-topo h1 { font-size: 22px; margin: 0; line-height: 1.15; } .lk-topo small { color: var(--texto-2); }
.lk-emoji { font-size: 40px; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; background: color-mix(in srgb, var(--c) 18%, #fff); flex: none; }
.lk-arte { width: 100%; border-radius: 14px; margin: 0 0 12px; display: block; }
.lk-oferta { display: inline-block; background: color-mix(in srgb, var(--c) 15%, #fff); color: color-mix(in srgb, var(--c) 70%, #000); font-weight: 700; border-radius: 10px; padding: 6px 12px; margin: 0 0 10px; }
.lk-cupom { border: 2px dashed var(--c); border-radius: 12px; padding: 10px; text-align: center; margin: 0 0 12px; }
.lk-botoes { display: grid; gap: 10px; margin: 8px 0; }
.lk-btn { display: block; text-align: center; text-decoration: none; font-weight: 700; font-size: 17px; padding: 14px; border-radius: 14px;
  border: 2px solid var(--c); color: color-mix(in srgb, var(--c) 75%, #000); background: #fff; overflow-wrap: anywhere; }
.lk-btn.whats { background: #16a34a; border-color: #16a34a; color: #fff; }
.lk-nota { font-size: 13px; color: var(--texto-2); margin: 12px 0 0; }

/* Editor de links */
.links-editor .duas { align-items: end; }
.troca-painel { margin-bottom: 14px; }

/* Slides de conteúdo (cinto, pontos turísticos...) */
.slide.conteudo .conteudo-ico { justify-self: center; display: grid; place-items: center; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: rgba(255,255,255,.12); font-size: clamp(40px, 14cqi, 180px); line-height: 1; }
.slide.conteudo .conteudo-img { justify-self: center; margin: 0; text-align: center; }
.slide.conteudo .conteudo-img img { display: block; width: 100%; max-width: 100%; max-height: 60cqi; object-fit: contain; border-radius: 18px; margin: 0 auto; }
.slide.conteudo .conteudo-img figcaption { margin-top: 4px; font-size: clamp(8px, 1.4cqi, 13px); color: rgba(255,255,255,.75); }
.slide.com-foto { display: flex; align-items: flex-end; overflow: hidden; background: #0b1120; }
.slide.com-foto .foto-fundo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide.com-foto::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(3,7,18,.88) 0%, rgba(3,7,18,.55) 45%, rgba(3,7,18,0) 75%),
  linear-gradient(0deg, rgba(3,7,18,.6) 0%, rgba(3,7,18,0) 45%); }
.slide.com-foto .foto-texto { position: relative; z-index: 1; max-width: 62%; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.slide.com-foto .foto-credito { position: absolute; z-index: 1; right: 2%; bottom: 2%; font-size: clamp(8px, 1.4cqi, 13px); color: rgba(255,255,255,.85);
  background: rgba(0,0,0,.45); padding: 2px 8px; border-radius: 6px; }
@media (orientation: portrait) { .slide.com-foto .foto-texto { max-width: 100%; } }
.cartao.desligado { opacity: .6; }
.topo-acoes { display: flex; gap: 4px; align-items: center; }
.btn-link.pequeno { font-size: 13px; color: var(--texto-2); }
.aceite { font-weight: 400; font-size: 14px; display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; }
.aceite input { width: auto; margin-top: 3px; }
.rodape a { color: #7b8590; }
.texto-legal { max-width: 720px; line-height: 1.55; } .texto-legal h1 { font-size: 24px; } .texto-legal li { margin: 0 0 8px; }
