/* Portal do Pulpito (secao 449) -- app do celular do pregador. Tela escura, cor de destaque
   = cor primaria da empresa (--cor, vinda da API), como no mockup aprovado. */
:root {
    --cor: #0057FF;
    --cor-txt: #6e9bff;
    --fundo: #0f1420;
    --fundo-2: #141b29;
    --painel: #182030;
    --painel-2: #1f2a3d;
    --linha: #273248;
    --linha-2: #34425c;
    --texto: #eef2f8;
    --texto-2: #c9d3e4;
    --apagado: #93a0b8;
    --verde: #5fd69c;
    --verde-fundo: #123526;
    --amarelo: #f5c84a;
    --amarelo-fundo: #3a2e10;
    --vermelho: #ff8a8e;
    --barra: #121826;
    color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
    background: var(--fundo); color: var(--texto);
    font-family: Nunito, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--cor-txt); outline-offset: 2px; }

/* ---------- casca ---------- */
.app { min-height: 100%; display: flex; flex-direction: column; max-width: 640px; margin: 0 auto; }
.topo {
    position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 12px; background: var(--fundo); border-bottom: 1px solid var(--linha);
}
.marca { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
         font-weight: 900; font-size: 14px; color: #fff; background: var(--cor); }
.topo-nome { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.topo-nome strong { font-weight: 900; font-size: 20px; letter-spacing: -.01em; }
.topo-nome small { font-size: 12px; color: var(--apagado); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topo h1 { flex: 1; margin: 0; font-size: 24px; font-weight: 900; letter-spacing: -.02em; }
.btn-redondo { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--linha); background: var(--painel);
               display: flex; align-items: center; justify-content: center; }
.btn-voltar { width: 44px; height: 44px; border-radius: 22px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; }
.sinc { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--verde); white-space: nowrap; }
.sinc.off { color: var(--amarelo); }

.conteudo { flex: 1; padding: 18px 16px calc(120px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 16px; }
.conteudo.com-base { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }

.nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end; padding: 8px 10px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--barra);
    border-top: 1px solid var(--linha); font-size: 11px; font-weight: 700; color: var(--apagado); max-width: 640px; margin: 0 auto;
}
.nav a { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 48px; justify-content: flex-end; }
.nav a.ativo { color: var(--cor-txt); }
.nav .centro { justify-content: center; margin-bottom: 2px; }
.nav .centro span { width: 60px; height: 60px; border-radius: 30px; background: var(--painel-2); color: var(--texto);
                    display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 6px var(--barra); margin-top: -26px; }
.nav .centro.ativo span { background: var(--cor); color: #fff; }

.fab { position: fixed; right: max(16px, calc(50% - 304px)); bottom: calc(104px + env(safe-area-inset-bottom, 0px)); z-index: 25;
       width: 60px; height: 60px; border-radius: 30px; background: var(--cor); color: #fff; border: 0;
       display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px rgba(0,0,0,.45); }

.base {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; gap: 10px; max-width: 640px; margin: 0 auto;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)); background: var(--barra); border-top: 1px solid var(--linha);
}

/* ---------- blocos ---------- */
.saudacao h2 { margin: 0; font-size: 26px; font-weight: 900; letter-spacing: -.02em; }
.saudacao h2 span { color: var(--cor-txt); }
.saudacao p { margin: 4px 0 0; font-size: 14px; color: var(--apagado); }
.rotulo { font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--apagado); }
.rotulo.cor { color: var(--cor-txt); }

.destaque { border: 1.5px solid var(--cor); border-radius: 22px; background: var(--fundo-2); overflow: hidden; }
.destaque-corpo { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.destaque h3 { margin: 0; font-size: 28px; font-weight: 900; letter-spacing: -.02em; line-height: 1.1; }
.destaque-verso[hidden] { display: none; }
.destaque-verso { padding: 18px 20px 20px; background: #182235; border-top: 1px solid var(--linha); display: flex; flex-direction: column; gap: 6px; }
.verso { margin: 0; font-family: Literata, Georgia, "Times New Roman", serif; font-style: italic; font-size: 18px; line-height: 1.45; }
.ref { font-size: 12px; font-weight: 800; color: var(--cor-txt); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; font-weight: 700; }
.chip { padding: 5px 10px; border-radius: 999px; background: var(--painel-2); color: var(--texto-2); display: inline-flex; align-items: center; gap: 5px; }
.chip.verde { background: var(--verde-fundo); color: var(--verde); }
.chip.amarelo { background: var(--amarelo-fundo); color: var(--amarelo); }
.chip.pequeno { font-size: 11px; padding: 3px 8px; font-weight: 800; }

.filtros { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.filtros::-webkit-scrollbar { display: none; }
.filtro { flex-shrink: 0; padding: 8px 14px; border-radius: 999px; border: 0; background: var(--painel); color: var(--texto-2);
          font-size: 13px; font-weight: 800; white-space: nowrap; min-height: 36px; }
.filtro.ativo { background: var(--cor); color: #fff; }

.botoes { display: flex; gap: 10px; }
.btn { height: 52px; border-radius: 16px; border: 1.5px solid var(--linha-2); background: transparent; font-weight: 800; font-size: 15px;
       display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; }
.btn-cor { background: var(--cor); border-color: var(--cor); color: #fff; font-weight: 900; font-size: 17px; }
.btn-cheio { flex: 1; }
.btn-quadrado { width: 52px; padding: 0; }
.btn-tracejado { border-style: dashed; }
.btn-texto-cor { color: var(--cor-txt); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-perigo { color: var(--vermelho); }

.cartao { border-radius: 20px; background: var(--painel); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.cartao-cab { display: flex; align-items: center; gap: 8px; }
.cartao-cab .rotulo { flex: 1; color: var(--texto); letter-spacing: .14em; }
.link-cor { font-size: 13px; font-weight: 800; color: var(--cor-txt); background: none; border: 0; padding: 4px 0; }

.compromisso { display: flex; gap: 12px; align-items: center; }
.dia { width: 46px; height: 50px; border-radius: 12px; background: var(--fundo); display: flex; flex-direction: column;
       align-items: center; justify-content: center; line-height: 1; flex-shrink: 0; }
.dia small { font-size: 10px; font-weight: 800; color: var(--apagado); text-transform: uppercase; }
.dia b { font-size: 20px; font-weight: 900; }
.linha2 { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.linha2 strong { font-weight: 800; font-size: 15px; }
.linha2 span { font-size: 13px; color: var(--apagado); }

.numeros { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.numero { border-radius: 16px; background: var(--painel); padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.numero b { font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; }
.numero b small { font-size: 14px; }
.numero span { font-size: 12px; color: var(--apagado); }

.lista { display: flex; flex-direction: column; gap: 10px; }
.item { border-radius: 18px; background: var(--painel); padding: 14px 16px; display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; border: 0; }
.item-faixa { width: 6px; align-self: stretch; border-radius: 3px; background: var(--cor); flex-shrink: 0; }
.item-faixa.cinza { background: #4a5670; }
.item-faixa.verde { background: #2bb673; }
.item-corpo { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.item-corpo strong { font-weight: 900; font-size: 17px; }
.item-corpo span { font-size: 13px; color: var(--apagado); }

.vazio { text-align: center; color: var(--apagado); padding: 28px 16px; line-height: 1.5; font-size: 15px; }
.aviso-barra { border-radius: 14px; padding: 12px 14px; background: var(--amarelo-fundo); color: var(--amarelo); font-size: 14px; font-weight: 700;
               display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.aviso-barra.erro { background: #3a1418; color: var(--vermelho); }

/* ---------- formulario ---------- */
.campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.campo label { font-size: 12px; font-weight: 800; color: var(--apagado); }
.entrada { width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--linha); background: var(--painel);
           color: var(--texto); font-size: 16px; font-weight: 700; }
textarea.entrada { min-height: 80px; resize: vertical; font-weight: 600; line-height: 1.45; }
.entrada.titulo { font-size: 18px; font-weight: 900; }
.duas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.combo { display: flex; gap: 8px; }
.combo select { flex: 1; min-width: 0; }
.combo .btn-redondo { border-radius: 14px; width: 46px; height: 46px; color: var(--cor-txt); }
.busca { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 14px; border-radius: 14px; background: var(--painel);
         border: 1px solid var(--linha); color: var(--apagado); }
.busca input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--texto); font-size: 16px; }

.barra-tempo { display: flex; gap: 3px; height: 8px; }
.barra-tempo span { border-radius: 4px; background: var(--cor); }

.topico { border-radius: 16px; background: var(--painel); overflow: hidden; }
.topico-cab { display: flex; gap: 12px; align-items: center; padding: 12px 14px; width: 100%; background: none; border: 0; text-align: left; }
.bolinha { width: 30px; height: 30px; border-radius: 15px; background: var(--cor); color: #fff; font-weight: 900; font-size: 14px;
           display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.topico-cab .linha2 strong { font-size: 16px; font-weight: 900; }
.topico-min { font-size: 13px; font-weight: 800; color: var(--texto-2); }
.topico-corpo { padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--linha); }
.topico-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.topico-acoes .btn { height: 42px; font-size: 13px; border-radius: 12px; padding: 0 12px; }

/* ---------- agenda ---------- */
.semana { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.semana button { height: 64px; border-radius: 14px; border: 0; background: var(--painel); display: flex; flex-direction: column;
                 align-items: center; justify-content: center; gap: 1px; padding: 0; }
.semana button small { font-size: 10px; font-weight: 800; opacity: .8; text-transform: uppercase; }
.semana button b { font-size: 18px; font-weight: 900; }
.semana button i { width: 5px; height: 5px; border-radius: 3px; background: transparent; }
.semana button.tem i { background: var(--cor-txt); }
.semana button.hoje { box-shadow: inset 0 0 0 1.5px var(--linha-2); }
.semana button.sel { background: var(--cor); color: #fff; }
.semana button.sel i { background: #fff; }
.semana-cab { display: flex; align-items: center; gap: 8px; }
.semana-cab strong { flex: 1; font-size: 14px; color: var(--apagado); font-weight: 800; }
.ordem { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; font-size: 14px; }
.ordem li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid #222c40; align-items: baseline; }
.ordem li:last-child { border-bottom: 0; }
.ordem li > span:first-child { width: 78px; flex-shrink: 0; font-size: 11px; font-weight: 800; color: var(--apagado); text-transform: uppercase; }
.ordem li > span:nth-child(2) { flex: 1; }
.ordem li small { font-size: 12px; color: var(--apagado); }
.ordem li.palavra { background: var(--painel-2); border-radius: 12px; padding: 9px 10px; margin: 2px -10px; border: 0; }
.ordem li.palavra > span:first-child, .ordem li.palavra small { color: var(--cor-txt); }

/* ---------- biblia ---------- */
.trecho { border-radius: 16px; background: var(--painel); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.trecho .verso { font-size: 16px; }
.trecho small { color: var(--apagado); font-size: 12px; }

/* ---------- conta ---------- */
.pessoa { display: flex; gap: 14px; align-items: center; }
.avatar { width: 56px; height: 56px; border-radius: 28px; background: var(--painel-2); display: flex; align-items: center; justify-content: center;
          font-weight: 900; font-size: 20px; color: var(--cor-txt); flex-shrink: 0; }
.abas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: var(--fundo); }
.abas button { height: 40px; border-radius: 11px; border: 0; background: transparent; color: var(--apagado); font-weight: 800; font-size: 14px; }
.abas button.ativo { background: var(--painel-2); color: var(--texto); }
.passos { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.passos li { display: flex; gap: 12px; align-items: center; }
.passos li > span:first-child { width: 28px; height: 28px; border-radius: 14px; background: var(--painel-2); font-weight: 900; display: flex;
                                 align-items: center; justify-content: center; flex-shrink: 0; }
.opcoes { border-radius: 20px; background: var(--painel); display: flex; flex-direction: column; }
.opcoes > * { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #222c40; min-height: 52px; }
.opcoes > *:last-child { border-bottom: 0; }
.opcoes label { flex: 1; font-weight: 700; }
.opcoes select { background: var(--painel-2); border: 0; border-radius: 10px; padding: 8px 10px; color: var(--texto); }
.opcoes button { border: 0; background: transparent; color: var(--vermelho); font-weight: 800; text-align: left; width: 100%; }

/* ---------- folha inferior (modais; nivel 1 = 1070, nivel 2 = 1080) ---------- */
.folha-fundo { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1070; display: flex; align-items: flex-end; justify-content: center; }
.folha-fundo.n2 { z-index: 1080; }
.folha { width: 100%; max-width: 640px; background: var(--fundo-2); border-radius: 22px 22px 0 0; border-top: 1px solid var(--linha);
         padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px;
         max-height: 90vh; overflow-y: auto; }
.folha h2 { margin: 0; font-size: 20px; font-weight: 900; }
.folha .alca { width: 40px; height: 5px; border-radius: 3px; background: var(--linha-2); align-self: center; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(110px + env(safe-area-inset-bottom, 0px)); z-index: 2000;
         background: #eef2f8; color: #0f1420; padding: 12px 16px; border-radius: 14px; font-weight: 800; font-size: 14px;
         box-shadow: 0 10px 30px rgba(0,0,0,.4); max-width: calc(100% - 32px); }

/* ---------- entrar ---------- */
.entrar { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.entrar-caixa { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
.entrar-marca { display: flex; align-items: center; gap: 12px; }
.entrar-marca img { width: 56px; height: 56px; border-radius: 14px; }
.entrar h1 { margin: 0; font-size: 28px; font-weight: 900; letter-spacing: -.02em; }
.entrar p { margin: 0; color: var(--apagado); line-height: 1.5; }
.contas { display: flex; flex-direction: column; gap: 8px; }
.contas button { text-align: left; border-radius: 14px; border: 1px solid var(--linha); background: var(--painel); padding: 12px 14px; }
.contas button small { display: block; color: var(--apagado); font-size: 12px; margin-top: 2px; }

@media (prefers-reduced-motion: no-preference) {
    .folha { animation: sobe .18s ease-out; }
    @keyframes sobe { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
}
