/* =====================================================================
   NÚCLEO · ESTILO  (cores e fontes vêm do inquilino via app.js)
   ===================================================================== */
:root {
  --marca: #8a6d1f; --marca-viva: #c9a227; --marca-suave: #f1e7cc;
  --lateral: #1c1a18; --lateral-texto: #e9e1d2;
  --fundo: #f6f3ee; --papel: #fffdf9; --texto: #2b2723; --texto-suave: #6c645a;
  --borda: rgba(43,39,35,.12); --borda-forte: rgba(43,39,35,.24);
  --ok: #1d7a3a; --ok-fundo: #e3f2e7; --alerta: #8a5a00; --alerta-fundo: #fbefd2;
  --erro: #b3261e; --erro-fundo: #fbe4e2; --neutro: #5b554d; --neutro-fundo: #eeeae3;
  --fogo: #d9480f; --fogo-fundo: #fff0e6;
  --fonte-titulo: Georgia, serif; --fonte-corpo: system-ui, sans-serif;
  --raio: 12px; --sombra: 0 1px 2px rgba(0,0,0,.05), 0 6px 18px rgba(28,26,24,.06);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--fundo); color: var(--texto); font: 15px/1.5 var(--fonte-corpo); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
body.com-modal { overflow: hidden; }
h1, h2, h3, h4 { font-family: var(--fonte-titulo); font-weight: 600; margin: 0 0 .4em; line-height: 1.15; }
h1 { font-size: 2rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.15rem; } h4 { font-size: 1.05rem; display: flex; gap: 6px; align-items: center; }
a { color: var(--marca); }
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea { font-size: 16px; } /* nunca abaixo de 16px: o iPhone dá zoom */
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.sub { color: var(--texto-suave); font-size: .92rem; margin: .2em 0; }
.centro { text-align: center; }
.quebra { overflow-wrap: anywhere; }
.ok-txt { color: var(--ok); font-weight: 600; }
.perigo-txt { color: var(--erro) !important; }

/* ---------- botões, selos, cartões ---------- */
.btn { border: 1px solid var(--borda-forte); background: var(--papel); border-radius: 10px; padding: 10px 16px; cursor: pointer; font-weight: 600; text-decoration: none; color: var(--texto); display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; line-height: 1.2; }
.btn:hover { border-color: var(--marca); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primario { background: var(--lateral); border-color: var(--lateral); color: #fff; }
.btn.ouro { background: var(--marca-viva); border-color: var(--marca-viva); color: var(--lateral); }
.btn.perigo { color: var(--erro); border-color: var(--erro); }
.btn.quente { background: var(--fogo); border-color: var(--fogo); color: #fff; }
.btn.zap { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.btn.grande { min-height: 54px; font-size: 1.05rem; padding: 12px 20px; border-radius: 12px; }
.btn.largo { width: 100%; margin-top: 10px; }
.btn.claro { background: transparent; }
.btn small { font-weight: 400; opacity: .7; margin-left: 4px; }
.btn-link { background: none; border: 0; padding: 6px 0; color: var(--marca); cursor: pointer; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.btn-icone { background: none; border: 0; cursor: pointer; padding: 8px; line-height: 1; color: inherit; display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; font-size: 1.3rem; text-decoration: none; }
.link-nome { background: none; border: 0; padding: 0; font-weight: 600; cursor: pointer; text-align: left; color: var(--texto); text-decoration: underline; text-decoration-color: var(--borda-forte); text-underline-offset: 3px; overflow-wrap: anywhere; }
.selo { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .76rem; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.selo.ok { background: var(--ok-fundo); color: var(--ok); }
.selo.alerta { background: var(--alerta-fundo); color: var(--alerta); }
.selo.erro { background: var(--erro-fundo); color: var(--erro); }
.selo.neutro { background: var(--neutro-fundo); color: var(--neutro); }
.cartao { background: var(--papel); border: 1px solid var(--borda); border-radius: var(--raio); padding: 18px 20px; box-shadow: var(--sombra); min-width: 0; }
.cartao.sem-pad { padding: 0; overflow: hidden; }
.cartao.aviso { background: var(--alerta-fundo); border-color: #ecd49a; }
.cartao.vazio { color: var(--texto-suave); padding: 28px; }
.sync { font-size: .76rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.sync.ok { background: var(--ok-fundo); color: var(--ok); }
.sync.ok::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 6px; vertical-align: 1px; animation: pulsa 1.6s infinite; }
.sync.erro { background: var(--erro-fundo); color: var(--erro); }
@keyframes pulsa { 50% { opacity: .25; } }

/* ---------- formulários ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.form label, .ficha label, .filtros-linha label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { border: 1px solid var(--borda-forte); border-radius: 10px; padding: 11px 12px; background: #fff; width: 100%; min-height: 46px; }
textarea { resize: vertical; min-height: 64px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--marca-viva); outline-offset: 1px; }
.lado-a-lado { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.msg-erro { background: var(--erro-fundo); color: var(--erro); padding: 10px 12px; border-radius: 10px; margin: 0; font-weight: 600; }

/* ---------- login ---------- */
body.tela-entrar { background: radial-gradient(ellipse at top, #2c2824, var(--lateral) 70%); min-height: 100vh; }
.entrar { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; gap: 22px; }
.entrar-logo { width: min(280px, 70vw); filter: drop-shadow(0 6px 24px rgba(212,160,23,.18)); }
.entrar-caixa { background: var(--papel); border-radius: 18px; padding: 24px; width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.entrar-caixa label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
.demo-caixa { border-top: 1px dashed var(--borda-forte); margin-top: 6px; padding-top: 12px; }
.demo-caixa p { margin: 0 0 6px; font-size: .9rem; }
.demo-caixa .btn { justify-content: flex-start; margin-top: 6px; }

/* ---------- casca ---------- */
body.com-casca #app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.lateral { background: var(--lateral); color: var(--lateral-texto); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 14px; overflow-y: auto; z-index: 30; }
.marca img { width: 100%; max-width: 190px; display: block; margin: 0 auto 26px; }
.menu { display: flex; flex-direction: column; gap: 2px; }
.menu a, .menu .desligado { color: var(--lateral-texto); text-decoration: none; padding: 11px 12px; border-radius: 9px; display: flex; justify-content: space-between; align-items: center; }
.menu a { opacity: .85; }
.menu a:hover { background: rgba(255,255,255,.06); opacity: 1; }
.menu a.ativo { background: rgba(212,160,23,.16); color: var(--marca-viva); opacity: 1; font-weight: 600; box-shadow: inset 3px 0 0 var(--marca-viva); }
.menu .desligado { opacity: .38; cursor: not-allowed; }
.menu .desligado em { font-style: normal; font-size: .68rem; border: 1px solid currentColor; border-radius: 99px; padding: 0 7px; }
.lateral-pe { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-direction: column; gap: 2px; }
.lateral .btn-link { color: var(--lateral-texto); opacity: .75; text-align: left; }
.eu { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.eu small { display: block; opacity: .65; font-size: .78rem; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--marca-viva); color: var(--lateral); display: inline-grid; place-items: center; font-weight: 700; font-size: .8rem; flex: none; }
.principal { min-width: 0; }
.topo-cel { display: none; }
.topo { padding: 22px 28px 8px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.topo h1 { margin: 0; }
.faixa-demo { margin: 12px 28px 0; background: repeating-linear-gradient(135deg, var(--marca-suave), var(--marca-suave) 10px, #f8f0dc 10px, #f8f0dc 20px); border: 1px dashed var(--marca); font-size: .82rem; padding: 6px 12px; border-radius: 8px; }
.conteudo { padding: 14px 28px 56px; display: flex; flex-direction: column; gap: 16px; }
.veu { display: none; }

/* ---------- lista de eventos ---------- */
.lista-eventos { display: grid; gap: 12px; }
.evento-cartao { display: flex; gap: 16px; align-items: center; text-decoration: none; color: inherit; transition: transform .12s, box-shadow .12s; }
.evento-cartao:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(28,26,24,.1); }
.ev-data { width: 64px; height: 68px; flex: none; border-radius: 12px; background: var(--lateral); color: var(--marca-viva); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ev-data b { font: 700 1.7rem/1 var(--fonte-titulo); font-variant-numeric: lining-nums; }
.ev-data span { text-transform: uppercase; font-size: .72rem; letter-spacing: .08em; color: var(--lateral-texto); }
.ev-info { min-width: 0; flex: 1; }
.ev-info h2 { margin: 0 0 2px; }
.ev-lado { flex: none; }

/* ---------- ficha do evento ---------- */
.ev-cab { display: flex; gap: 16px; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; width: 100%; }
.ev-cab > div:first-child { min-width: 0; }
.voltar { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.ev-botoes { display: flex; gap: 8px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--papel); border: 1px solid var(--borda); border-radius: var(--raio); padding: 14px 16px; box-shadow: var(--sombra); display: flex; flex-direction: column; min-width: 0; }
.kpi span { font-size: .8rem; color: var(--texto-suave); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi b { font: 700 2.4rem/1.05 var(--fonte-titulo); font-variant-numeric: lining-nums tabular-nums; }
.kpi small { color: var(--texto-suave); font-size: .8rem; }
.kpi.destaque { background: var(--lateral); color: #fff; border-color: var(--lateral); }
.kpi.destaque span, .kpi.destaque small { color: var(--lateral-texto); opacity: .8; }
.kpi.destaque b { color: var(--marca-viva); }
.kpi.quente b { color: var(--fogo); }
.kpis.pequenos .kpi b { font-size: 1.8rem; }
.abas { display: flex; gap: 4px; border-bottom: 1px solid var(--borda-forte); overflow-x: auto; scrollbar-width: none; }
.abas a { padding: 10px 14px; text-decoration: none; color: var(--texto-suave); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.abas a.ativa { color: var(--texto); border-color: var(--marca-viva); }
.busca-hero { position: relative; }
.busca-hero .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--texto-suave); width: 20px; height: 20px; }
.busca-hero input { padding-left: 44px !important; min-height: 52px !important; font-size: 17px !important; border-radius: 14px !important; box-shadow: var(--sombra); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--borda-forte); background: var(--papel); border-radius: 99px; padding: 7px 14px; cursor: pointer; font-weight: 600; min-height: 40px; }
.chip span { color: var(--texto-suave); font-weight: 500; }
.chip.ativo { background: var(--lateral); color: #fff; border-color: var(--lateral); }
.chip.ativo span { color: var(--marca-viva); }
.tabela { width: 100%; border-collapse: collapse; }
.tabela th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-suave); padding: 10px 14px; background: #faf6ee; border-bottom: 1px solid var(--borda); }
.tabela td { padding: 10px 14px; border-bottom: 1px solid var(--borda); vertical-align: middle; }
.tabela tr.cancelada td { opacity: .55; }
.tabela td[data-label="WhatsApp"], .tabela td[data-label="Presença"] { white-space: nowrap; }
.tg { border: 1px solid var(--borda-forte); background: #fff; border-radius: 99px; padding: 6px 12px; cursor: pointer; font-weight: 600; display: inline-flex; gap: 5px; align-items: center; min-height: 38px; white-space: nowrap; color: var(--texto-suave); }
.tg.on { background: var(--ok-fundo); border-color: #9fd1ae; color: var(--ok); }
.tg.fogo.on { background: var(--fogo-fundo); border-color: #f5b48f; color: var(--fogo); }
.filtros-linha { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.filtros-linha label { min-width: 180px; flex: 1; max-width: 280px; }
.grade-leads { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.lead { display: flex; flex-direction: column; gap: 6px; border-left: 4px solid var(--fogo); }
.lead.st-contatado { border-left-color: var(--marca-viva); }
.lead.st-convertido { border-left-color: var(--ok); }
.lead.st-perdido { border-left-color: var(--neutro); opacity: .75; }
.lead-topo { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.lead .obs { margin: 0; font-style: italic; background: var(--fogo-fundo); border-radius: 8px; padding: 6px 10px; }
.lead-acoes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.lead-acoes select { width: auto; flex: 1; min-width: 130px; }
.passos { margin: 6px 0 8px; padding-left: 20px; }
.arquivo { display: flex; flex-direction: column; gap: 6px; font-weight: 600; margin: 10px 0; }
.arquivo input { font-size: 16px; max-width: 100%; }
details { margin: 8px 0 14px; }
details summary { cursor: pointer; font-weight: 600; color: var(--marca); }
details textarea { margin: 8px 0; font-family: ui-monospace, Menlo, monospace; font-size: 16px !important; }
.motivos { margin: 8px 0; padding-left: 20px; color: var(--texto-suave); }
#imp-previa { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.resultado { background: var(--ok-fundo); border-color: #9fd1ae; }
.resultado ul { padding-left: 20px; }
.pilha { display: flex; flex-direction: column; }

/* ---------- ficha do inscrito ---------- */
.ficha { display: flex; flex-direction: column; gap: 6px; }
.ficha p { margin: 0; }
.ficha-bloco { border-top: 1px solid var(--borda); padding-top: 12px; margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.ficha-bloco h4 { margin: 0; }
.extras { margin: 4px 0; padding-left: 18px; font-size: .9rem; color: var(--texto-suave); }
.linha-botoes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.passo { display: inline-flex; align-items: center; gap: 8px; }
.passo .btn { min-width: 44px; padding: 8px; }

/* ---------- modal e aviso ---------- */
.modal-fundo { position: fixed; inset: 0; background: rgba(20,18,16,.55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 100; }
.modal { background: var(--papel); border-radius: 16px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.modal header { display: flex; align-items: center; gap: 8px; padding: 14px 10px 6px 20px; }
.modal header h3 { margin: 0; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.modal-corpo { padding: 4px 20px 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--lateral); color: #fff; padding: 12px 14px 12px 18px; border-radius: 12px; display: flex; gap: 12px; align-items: center; z-index: 200; box-shadow: 0 12px 40px rgba(0,0,0,.35); max-width: calc(100vw - 32px); font-weight: 600; animation: sobe .2s ease-out; }
.toast.ok { border-left: 5px solid #3ccf6e; }
.toast.alerta { background: #6b4600; }
.toast.erro { background: var(--erro); }
.toast button { background: var(--marca-viva); color: var(--lateral); border: 0; border-radius: 8px; padding: 9px 14px; font-weight: 700; cursor: pointer; white-space: nowrap; min-height: 40px; }
.toast.sai { opacity: 0; transition: opacity .35s; }
@keyframes sobe { from { transform: translate(-50%, 14px); opacity: 0; } }

/* ---------- CHECK-IN (celular) ---------- */
body.tela-checkin { background: var(--fundo); }
.carregando-cheio { min-height: 100vh; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.carregando-cheio.escuro, body.tela-telao .carregando-cheio { background: #0f0e0d; color: #eee; }
.ck { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; max-width: 720px; margin: 0 auto; }
.ck-topo { position: sticky; top: 0; z-index: 20; background: var(--lateral); color: #fff; display: flex; align-items: center; gap: 6px; padding: 6px 12px 6px 4px; padding-top: max(6px, env(safe-area-inset-top)); }
.ck-titulo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ck-titulo b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--fonte-titulo); font-size: 1.15rem; }
.ck-titulo .sync { align-self: flex-start; }
.ck-cont { text-align: right; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.05; }
.ck-cont b { font: 700 1.9rem/1 var(--fonte-corpo); color: var(--marca-viva); font-variant-numeric: lining-nums tabular-nums; }
.ck-cont span { font-size: .75rem; opacity: .85; }
.ck-q-cont { color: #ff9d66; display: inline-flex; gap: 2px; align-items: center; font-weight: 700; }
.ck .faixa-demo { margin: 8px 12px 0; }
.ck-busca { position: sticky; top: 62px; z-index: 15; padding: 10px 12px; background: var(--fundo); }
.ck-busca .ico { position: absolute; left: 26px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; color: var(--texto-suave); }
.ck-busca input { padding-left: 48px !important; min-height: 58px !important; font-size: 19px !important; border-radius: 14px !important; border: 2px solid var(--borda-forte) !important; box-shadow: var(--sombra); }
.ck-lista { flex: 1; padding: 0 12px 110px; display: flex; flex-direction: column; gap: 10px; }
.ck-dica { color: var(--texto-suave); margin: 6px 4px 0; font-weight: 600; font-size: .9rem; }
.ck-cartao { background: var(--papel); border: 1px solid var(--borda); border-radius: 14px; padding: 14px; box-shadow: var(--sombra); display: flex; flex-direction: column; gap: 8px; }
.ck-cartao.presente { background: #f1f9f3; border-color: #b8e0c3; }
.ck-cartao.cancelada { opacity: .7; }
.ck-nome { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ck-nome .link-nome { font-size: 1.15rem; text-decoration: none; }
.ck-tel { color: var(--texto-suave); font-size: .9rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ck-linha { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn.marcar { flex: 1; background: var(--ok); border-color: var(--ok); color: #fff; min-height: 58px; font-size: 1.1rem; min-width: 0; }
.ck-fogo { border: 1.5px solid #f2c3a6; background: #fff; color: var(--fogo); border-radius: 12px; min-height: 58px; min-width: 64px; padding: 6px 10px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-weight: 700; font-size: .68rem; cursor: pointer; line-height: 1.1; }
.ck-fogo .ico { width: 24px; height: 24px; }
.ck-fogo.on { background: var(--fogo); color: #fff; border-color: var(--fogo); box-shadow: 0 0 0 3px rgba(217,72,15,.18), 0 6px 18px rgba(217,72,15,.35); }
.ck-cartao.presente .ck-fogo { min-height: 46px; }
.ck-feito { color: var(--ok); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ck-feito .ico { width: 22px; height: 22px; }
.ck-acomp { display: flex; align-items: center; gap: 10px; flex: 1 1 100%; min-width: 0; font-size: .95rem; color: var(--texto-suave); }
.ck-cartao.presente .ck-fogo { flex-direction: row; gap: 6px; font-size: .85rem; padding: 6px 14px; }
.ck-cartao.presente .ck-linha .btn-link { margin-left: auto; }
.ck-acomp .btn { min-width: 44px; padding: 6px; font-size: 1.2rem; }
.ck-vazio { text-align: center; padding: 30px 10px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.ck-pe { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 12px; padding-bottom: max(10px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--fundo) 30%); display: flex; justify-content: center; z-index: 20; }
.btn.porta { background: var(--lateral); border-color: var(--lateral); color: #fff; width: 100%; max-width: 696px; }
body.tela-checkin .toast { bottom: 88px; }

/* ---------- TELÃO DO SORTEIO ---------- */
body.tela-telao { background: #0d0c0b; color: #f3ead8; }
.telao { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: auto 1fr auto; grid-template-areas: "topo topo" "palco hist" "ctrl hist";
  background: radial-gradient(ellipse at 50% 40%, rgba(212,160,23,.16), transparent 60%), #0d0c0b; }
.telao-topo { grid-area: topo; display: flex; align-items: center; gap: 14px; padding: 12px 18px; }
.telao-topo img { height: 46px; }
.telao-ev { flex: 1; font-family: var(--fonte-titulo); font-size: 1.3rem; color: var(--marca-viva); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-icone.claro { color: #f3ead8; }
.palco { grid-area: palco; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; min-width: 0; }
.palco-premio { font-size: clamp(1rem, 2.4vw, 1.6rem); letter-spacing: .2em; text-transform: uppercase; color: var(--marca-viva); margin: 0 0 18px; }
.palco-nome { font-variant-numeric: lining-nums; font: 700 clamp(2.4rem, 8vw, 7.5rem)/1.05 var(--fonte-titulo); max-width: 100%; overflow-wrap: anywhere; }
.palco-nome.girando { color: #cfc4ad; filter: blur(.4px); }
.palco-nome.ganhou { color: #fff; text-shadow: 0 0 22px rgba(212,160,23,.85), 0 0 60px rgba(212,160,23,.5); animation: estoura .6s ease-out; }
@keyframes estoura { 0% { transform: scale(.85); opacity: .3; } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
.palco-sub { font-size: clamp(1rem, 2vw, 1.4rem); color: #d8cdb6; min-height: 1.6em; margin-top: 18px; }
.telao-controles { grid-area: ctrl; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px 18px 20px; border-top: 1px solid rgba(255,255,255,.08); }
.telao-controles input#tl-premio { flex: 1; min-width: 200px; background: #1d1b19; border-color: #3a352f; color: #fff; }
.tl-check { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; min-height: 44px; }
.tl-check input { width: 20px; height: 20px; }
.tl-conc { color: #bdb29c; font-size: .9rem; }
.telao-hist { grid-area: hist; background: rgba(255,255,255,.035); border-left: 1px solid rgba(255,255,255,.08); padding: 16px; overflow-y: auto; max-height: calc(100vh - 70px); }
.telao-hist h3 { color: var(--marca-viva); }
.telao-hist ol { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.telao-hist li { background: rgba(255,255,255,.05); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.telao-hist li b { overflow-wrap: anywhere; }
.telao-hist li span { color: var(--marca-viva); font-size: .9rem; }
.telao-hist li small { color: #a89f8c; }
.telao-hist li.ausente, .telao-hist li.cancelado { opacity: .5; }
.telao-hist li.cancelado b { text-decoration: line-through; }
.telao-hist .btn-link { color: #d8cdb6; font-size: .85rem; margin-right: 12px; }
.telao-hist .vazio { color: #8f8676; background: none; }

/* configuração do sorteio */
.palco-publico { color: #a89f8c; font-size: clamp(.9rem, 1.6vw, 1.15rem); letter-spacing: .04em; margin: 6px 0 0; min-height: 1.4em; }
.tl-resumo { flex: 1; min-width: 0; text-align: left; background: #1d1b19; border: 1px solid #3a352f; color: #e9e1d2; border-radius: 12px; padding: 10px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-height: 54px; }
.tl-resumo:hover { border-color: var(--marca-viva); }
.tl-resumo:disabled { opacity: .55; cursor: default; }
.tl-resumo-tit { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--marca-viva); font-weight: 700; }
.tl-resumo b { color: #fff; }
.tl-resumo .tl-n { color: var(--marca-viva); font-variant-numeric: tabular-nums; }
.modal.escuro { background: #171513; color: #f3ead8; border: 1px solid #3a352f; }
.modal.escuro .btn-icone { color: #f3ead8; }
.modal.escuro .sub { color: #a89f8c; }
.modal.escuro input:not([type=checkbox]):not([type=radio]) { background: #1d1b19; border-color: #3a352f; color: #fff; }
.cfg-sorteio { display: flex; flex-direction: column; gap: 12px; }
.cfg-tit { margin: 0; font-weight: 700; color: var(--marca-viva); text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
.publicos { display: grid; gap: 8px; }
.publico { display: flex; gap: 12px; align-items: center; background: #1f1c19; border: 1px solid #3a352f; border-radius: 14px; padding: 12px 14px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.publico input { width: 20px; height: 20px; accent-color: var(--marca-viva); flex: none; }
.publico .pt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.publico .pt small { color: #a89f8c; }
.publico .pn { font: 700 1.8rem/1 var(--fonte-corpo); font-variant-numeric: tabular-nums; color: #8f8676; }
.publico.on { border-color: var(--marca-viva); box-shadow: 0 0 0 1px var(--marca-viva), 0 0 24px rgba(212,160,23,.22); }
.publico.on .pn { color: #fff; text-shadow: 0 0 14px rgba(212,160,23,.6); }
.cfg-premio { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }

/* ---------- celular ---------- */
@media (max-width: 760px) {
  body.com-casca #app { display: block; }
  .lateral { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  body.menu-aberto .lateral { transform: none; }
  body.menu-aberto .veu { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 25; }
  .topo-cel { display: flex; align-items: center; gap: 8px; background: var(--lateral); padding: 4px 10px 4px 2px; position: sticky; top: 0; z-index: 20; color: #fff; }
  .topo-cel img { height: 34px; }
  .topo, .conteudo { padding-left: 16px; padding-right: 16px; }
  .faixa-demo { margin: 10px 16px 0; }
  h1 { font-size: 1.6rem; }
  .ev-botoes { width: 100%; }
  .ev-botoes .btn { flex: 1 1 auto; }
  .ev-botoes .btn.grande { flex-basis: 100%; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 10px 12px; }
  .kpi b { font-size: 1.9rem; }
  .lado-a-lado { grid-template-columns: 1fr; }
  .evento-cartao { flex-wrap: wrap; }
  .ev-lado { width: 100%; }
  /* tabela vira cartão empilhado */
  table.resp thead { display: none; }
  table.resp, table.resp tbody, table.resp tr, table.resp td { display: block; width: 100%; }
  table.resp tr { border-bottom: 1px solid var(--borda); padding: 10px 14px; }
  table.resp td { border: 0; padding: 3px 0; display: flex; gap: 10px; justify-content: space-between; align-items: center; min-width: 0; }
  table.resp td::before { content: attr(data-label); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--texto-suave); font-weight: 600; flex: none; }
  table.resp td > * { min-width: 0; }
  table.resp td[data-label="Nome"]::before { display: none; }
  table.resp td.quebra { text-align: right; }
  .filtros-linha label { max-width: none; }
  .grade-leads { grid-template-columns: minmax(0, 1fr); }
  .telao { grid-template-columns: minmax(0, 1fr); grid-template-areas: "topo" "palco" "ctrl" "hist"; }
  .telao-hist { max-height: none; border-left: 0; border-top: 1px solid rgba(255,255,255,.08); }
  .telao-controles .btn { flex: 1; }
  .tl-resumo { flex-basis: 100%; }
  .modal-fundo { align-items: flex-end; padding: 0; }
  .modal { border-radius: 18px 18px 0 0; max-height: 92vh; max-height: 92dvh; }
  .modal-corpo { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
}
