/* ============================================================
   LANDING PAGE — Tela inicial pública (mobile first)
   ============================================================ */

/* 1. Variáveis */
:root {
  --lp-primary:       #17335d;
  --lp-primary-dark:  #10294d;
  --lp-hover:         #2956a0;
  --lp-gold:          #b88a2d;
  --lp-gold-light:    #e1c178;
  --lp-bg-soft:       #fff8eb;
  --lp-text:          #28364e;
  --lp-text-muted:    #636d7e;
  --lp-border:        #dfe3e8;
  --lp-gray-light:    #f7f7f7;
}

/* 2. Container principal — imagem de fundo + overlay via ::before */
.landing-page {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  background-image: url("img/altar-paroquia-sao-roque.jpg");
  background-repeat: no-repeat;
  background-position: 50% 20%;
  background-size: cover;
  overflow-x: hidden;
}

/* Overlay escuro — gradient sobre a foto */
.landing-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(12, 30, 53, 0.72),
    rgba(12, 30, 53, 0.84)
  );
  pointer-events: none;
}

/* 3. Card de boas-vindas */
.welcome-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  padding: 24px 18px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.30);
  text-align: center;
  font-family: 'Inter', "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  animation: lp-card-entry 0.45s ease-out both;
}

@keyframes lp-card-entry {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 4. Logos */
.brand-images {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 14px;
}

.brand-images img {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 50%;
}

/* 5. Títulos */
.welcome-label {
  margin: 0;
  color: var(--lp-gold);
  font-family: 'Playfair Display', Georgia, "Times New Roman", serif;
  font-size: clamp(1.1rem, 4.5vw, 1.5rem);
  font-style: italic;
  line-height: 1.2;
}

.welcome-title {
  margin: 4px 0 8px;
  color: var(--lp-primary);
  font-family: 'Playfair Display', Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 7vw, 2.6rem);
  font-weight: 700;
  line-height: 1.08;
}

.welcome-subtitle {
  margin: 0 0 4px;
  color: var(--lp-text-muted);
  font-size: clamp(0.92rem, 3.5vw, 1.05rem);
  line-height: 1.5;
}

/* 6. Mensagem institucional */
.contribution-message {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--lp-bg-soft);
  border: 1px solid #ead8ac;
  border-radius: 14px;
  text-align: left;
}

.message-icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contribution-message p {
  margin: 0;
  color: var(--lp-text);
  font-size: 0.93rem;
  line-height: 1.55;
}

/* 7. Benefícios — 2 col mobile → 4 col tablet+ */
.benefits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

@media (min-width: 560px) {
  .benefits { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.benefit-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px;
  border: 1px solid var(--lp-border);
  border-radius: 12px;
  background: #fff;
}

.benefit-item strong {
  display: block;
  color: var(--lp-primary);
  font-size: 0.80rem;
  line-height: 1.3;
}

.benefit-item span {
  display: block;
  color: var(--lp-text-muted);
  font-size: 0.72rem;
  line-height: 1.3;
}

/* 8. Botão principal — Quero ser Dizimista */
.primary-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  margin-top: 16px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #173c78, #102d5d);
  color: #fff;
  border: 1px solid #c89b3c;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(23, 60, 120, 0.28);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(23, 60, 120, 0.34);
}

.primary-button:active { transform: translateY(0); }

.primary-button:focus-visible {
  outline: 3px solid rgba(200, 155, 60, 0.45);
  outline-offset: 3px;
}

/* 8b. Grupo de botões da landing page — empilhados */
.lp-btn-grupo {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  width: 100%;
}

/* Botão principal: largura total, sem margin-top extra */
.lp-btn-grupo .lp-btn-principal {
  width: 100%;
  margin-top: 0;
}

/* Bloco de textos (label + subtítulo) dentro dos botões */
.lp-btn-texts {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}
.lp-btn-main {
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.2;
}
.lp-btn-sub {
  font-size: .73rem;
  font-weight: 400;
  opacity: .70;
  line-height: 1;
}

/* Botão secundário — "Já sou dizimista" */
.lp-btn-secundario {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 52px;
  padding: 12px 16px;
  background: transparent;
  color: var(--lp-primary);
  border: 1.5px solid rgba(23,51,93,0.25);
  border-radius: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.lp-btn-secundario:hover {
  background: rgba(23,51,93,0.06);
  border-color: rgba(23,51,93,0.50);
  transform: translateY(-1px);
}
.lp-btn-secundario:active  { transform: translateY(0); }
.lp-btn-secundario:focus-visible {
  outline: 3px solid rgba(184,138,45,0.50);
  outline-offset: 3px;
}

/* 9. Link admin — discreto, dentro do card */
.admin-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  padding: 10px 16px;
  color: #4c5668;
  border: 1px solid var(--lp-border);
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.admin-link:hover {
  background: var(--lp-gray-light);
  border-color: #b0b8c4;
}

/* 10. Divisor bloco admin */
.lp-admin-divisor {
  display: flex;
  align-items: center;
  margin: 16px 0 12px;
  gap: 8px;
  color: #9ca3af;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lp-admin-divisor::before,
.lp-admin-divisor::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

/* 11. Versículo — dentro do card */
.bible-verse {
  margin: 16px 0 0;
  padding: 12px 14px;
  background: var(--lp-primary);
  color: #fff;
  border-radius: 12px;
  font-family: 'Playfair Display', Georgia, "Times New Roman", serif;
  font-size: 0.88rem;
  line-height: 1.55;
  font-style: italic;
}

.bible-verse cite {
  display: block;
  margin-top: 4px;
  color: var(--lp-gold-light);
  font-family: inherit;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 600;
}

/* 12. Rodapé de contato — links discretos abaixo do card */
.contact-footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 20px;
  margin-top: 20px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  font-size: 0.80rem;
}

.contact-footer a {
  color: rgba(255, 255, 255, 0.80);
  text-decoration: none;
  transition: color 0.15s;
}

.contact-footer a:hover { color: #fff; text-decoration: underline; }

/* 13. Breakpoints tablet / desktop */
@media (min-width: 768px) {
  .landing-page    { padding: 32px; }
  .welcome-card    { padding: 34px 38px; }
  .brand-images img { width: 78px; height: 78px; }
  .primary-button  { min-height: 62px; font-size: 1.1rem; }
}

/* 14. Celular muito pequeno (< 360px) */
@media (max-width: 359px) {
  .landing-page    { padding: 10px; }
  .welcome-card    { padding: 20px 14px; border-radius: 18px; }
  .brand-images img { width: 54px; height: 54px; }
  .benefits        { grid-template-columns: 1fr; }
}

/* 15. Preferência de movimento reduzido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ============================================================
   ESTILOS DO USUARIO (estrutura dashboard)
   ============================================================ */

:root {
    --bg: #f3f4f6;
    --card: #ffffff;
    --primary: #243447;
    --secondary: #d4a017;
    --text: #111827;
    --text-light: #6b7280;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.12);
    --radius: 24px;
}

body {
    background: var(--bg);
    font-family: 'Segoe UI', sans-serif;
    color: var(--text);
    min-height: 100vh;
}

/* TOPO */
.topo {
    background: var(--primary);
    color: white;
    border-bottom: 4px solid var(--secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
}

.topo-info h1 {
    font-size: 22px;
    margin-bottom: 4px;
}

.topo-info small {
    color: #d1d5db;
}

.topo-acoes {
    display: flex;
    gap: 12px;
}

.btn-topo {
    background: white;
    color: var(--primary);
    border: none;
    border-radius: 12px;
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s ease;
}

.btn-topo:hover {
    transform: translateY(-2px);
    background: #e5e7eb;
}

/* HOME */
.home-container {
    max-width: 1400px;
    margin: auto;
    padding: 40px 30px;
}

/* CABECALHO INSTITUCIONAL */
.home-cabecalho-institucional {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    margin-bottom: 70px;
    flex-wrap: wrap;
}

.imagem-santo {
    width: 260px;
    height: 360px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 5px solid white;
}

.brasao-banner {
    max-width: 720px;
    width: 100%;
    height: auto;
    flex: 1 1 500px;
    object-fit: contain;
    border-radius: 8px;
}

.home-titulo h1 {
    font-size: 52px;
    color: #1f2937;
    margin-bottom: 10px;
}

.home-subtitulo {
    font-size: 20px;
    color: var(--text-light);
    line-height: 1.7;
}

/* CARDS */
.home-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.home-tile {
    background: var(--card);
    border-radius: var(--radius);
    padding: 40px 25px;
    text-align: center;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    box-shadow: var(--shadow);
    transition: .25s ease;
}

.home-tile:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.home-tile-icone {
    font-size: 64px;
    margin-bottom: 20px;
}

.home-tile-titulo {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
}

.home-tile-descricao {
    color: var(--text-light);
    line-height: 1.5;
}

/* CORES DOS CARDS */
.home-tile-consulta .home-tile-icone { color: #2563eb; }
.home-tile-cadastro .home-tile-icone { color: #16a34a; }
.home-tile-aniversario .home-tile-icone { color: #d97706; }
.home-tile-relatorio .home-tile-icone { color: #9333ea; }
.home-tile-exportar .home-tile-icone { color: #16a34a; }
.home-tile-importar .home-tile-icone { color: #2563eb; }
.home-tile-codigo .home-tile-icone { color: #e65100; }
.home-tile-lista .home-tile-icone { color: #6a1b9a; }
.home-tile-informativo .home-tile-icone { color: #0891b2; }
.home-tile-email-templates .home-tile-icone { color: #7c3aed; }

.home-tile-usuarios .home-tile-icone { color: #dc2626; }
/* Barra de acoes da tela Configuracoes */
.config-barra-acoes {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 2px solid #e5e7eb;
}
.config-titulo {
    margin: 0;
    font-size: 26px;
    color: #1f2937;
    font-weight: 700;
}

/* RESPONSIVO */
@media (max-width: 768px) {
    .topo {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    .home-cabecalho-institucional {
        flex-direction: column;
        text-align: center;
    }
    .home-titulo h1 { font-size: 36px; }
    .home-subtitulo { font-size: 16px; }
    .brasao-banner { max-width: 100%; }
    .home-tiles { grid-template-columns: 1fr; }
}

/* ============================================================
   Cadastro de Dizimistas - Folha de estilos
   ============================================================ */

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0; padding: 0;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 15px; color: #111827; background: #f3f4f6;
  scroll-behavior: smooth;
}

.topo {
  background: #243447; color: #fff;
  padding: 18px 24px; border-bottom: 4px solid #d4a017;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.15);
}
.subtitulo { margin: 0; font-size: 13px; color: #d1d5db; }
.rodape {
  text-align: center; padding: 12px; margin-top: 40px;
  color: #777; border-top: 1px solid #ddd;
}

main { max-width: 1200px; margin: 24px auto; padding: 0 16px; }
.tela { display: none; }
.tela.ativa { display: block; }

.cabecalho-lista {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; margin-bottom: 16px;
}
.cabecalho-lista h2 { margin: 0; font-size: 20px; color: #2c3e50; }
.badge {
  display: inline-block; background: #2c3e50; color: #fff;
  font-size: 13px; border-radius: 12px; padding: 2px 10px;
  margin-left: 6px; vertical-align: middle;
}
.acoes-cabecalho { display: flex; gap: 8px; flex-wrap: wrap; }

.btn {
  background: #ecf0f1; border: 1px solid #bdc3c7; color: #2c3e50;
  padding: 8px 14px; border-radius: 4px; cursor: pointer;
  font-size: 14px; font-family: inherit;
}
.btn:hover { background: #dde4e6; }
.btn-primario { background: #2c3e50; color: #fff; border-color: #2c3e50; }
.btn-primario:hover { background: #1e2b38; }
.btn-perigo { background: #fdecea; border-color: #e57373; color: #c62828; }
.btn-perigo:hover { background: #fad4d0; }
.btn-expurgo { background: #4a0000; border-color: #7f1d1d; color: #fca5a5; font-weight: 600; }
.btn-expurgo:hover { background: #7f1d1d; color: #fee2e2; border-color: #991b1b; }
.btn-pequeno { padding: 4px 10px; font-size: 12px; }
.btn-destacar {
  background: #fff3cd !important;
  border-color: #d4a017 !important;
  color: #6d5208 !important;
  animation: pulsar-destaque 2s ease-in-out infinite;
}
@keyframes pulsar-destaque {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 160, 23, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(212, 160, 23, 0); }
}

.aviso { padding: 10px 14px; border-radius: 4px; margin-bottom: 12px; font-size: 14px; }
.aviso-backup { background: #fff8e1; border-left: 4px solid #d4a017; color: #6d5208; }
.aviso-info { background: #e8f4fd; border-left: 4px solid #2196f3; color: #1565c0; }
.aviso-sucesso { background: #e8f5e9; border-left: 4px solid #2e7d32; color: #1b5e20; }
.aviso-erro { background: #fdecea; border-left: 4px solid #c62828; color: #8d1d1d; }
.aviso-alerta { background: #fef3c7; border-left: 4px solid #f59e0b; color: #78350f; }
.aviso-inline {
  display: block; margin-top: 4px; padding: 6px 8px;
  background: #fff8e1; border-left: 3px solid #d4a017;
  color: #6d5208; font-size: 12px; border-radius: 2px;
}

.aviso-inline-erro {
  background: #fdecea; border-left-color: #e57373; color: #c62828;
}

.aviso-inline-info {
  background: #e8f0fe; border-left-color: #3b6fd4; color: #1a3a7a;
}

.campo-busca-wrap { margin-bottom: 12px; display: flex; gap: 8px; align-items: center; }
#campo-busca {
  width: 100%; max-width: 480px; padding: 10px 14px; font-size: 15px;
  border: 1px solid #bdc3c7; border-radius: 4px; font-family: inherit;
}
#campo-busca:focus {
  outline: none; border-color: #2c3e50;
  box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.15);
}

.container-tabela {
  background: #fff; border: 1px solid #e1e4e8; border-radius: 6px;
  overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.tabela-cadastros { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabela-cadastros thead { background: #2c3e50; color: #fff; }
.tabela-cadastros th, .tabela-cadastros td {
  padding: 10px 12px; text-align: left;
  border-bottom: 1px solid #eee; vertical-align: middle;
}
.tabela-cadastros tbody tr:hover { background: #f8fafc; }
.tabela-cadastros tbody tr:last-child td { border-bottom: none; }
.col-ficha { width: 80px; font-family: "Consolas", monospace; }
.col-data { width: 140px; color: #777; font-size: 13px; }
.col-acoes { width: 240px; text-align: right; }
.col-acoes .btn { margin-left: 4px; }

/* Cabeçalhos ordenáveis */
.th-ordenavel { cursor: pointer; user-select: none; white-space: nowrap; }
.th-ordenavel:hover { background: #3d5166; }
.th-ordenavel.th-ativo { background: #1a2d3e; }
.sort-icon { font-size: 11px; opacity: 0.7; }

/* Controles de paginação */
.paginacao-container {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; padding: 12px 0; margin-top: 4px;
}
.paginacao-info { font-size: 13px; color: #6b7280; }

/* Filtros de inadimplentes */
.btn-inad-filtro.ativo { background: #243447; color: #fff; border-color: #243447; }

/* Dropdown de impressão */
.rel-print-wrap { display: flex; gap: 6px; align-items: center; }

/* ── Impressão seletiva ──────────────────────────────────────
   Por padrão (@media print) tudo imprime normalmente.
   Com .print-resumo → oculta bloco de inadimplentes.
   Com .print-inadimplentes → oculta gráficos e cards, mostra só inadimplentes.
*/
@media print {
  /* Modo: Só resumo + gráficos */
  body.print-resumo #bloco-inadimplentes { display: none !important; }

  /* Modo: Só inadimplentes */
  body.print-inadimplentes .config-cards      { display: none !important; }
  body.print-inadimplentes .rel-grafico-bloco { display: none !important; }
  body.print-inadimplentes #bloco-inadimplentes {
    display: block !important;
  }
}

/* ── Busca Avançada ─────────────────────────────────────────── */
#btn-busca-avancada { font-size: 13px; }
#btn-busca-avancada.ativo { background: #243447; color: #fff; border-color: #243447; }

#painel-busca-avancada {
  background: #f8fafc;
  border: 1px solid #dde1e7;
  border-radius: 6px;
  padding: 14px 16px;
  margin: 8px 0 4px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}
#painel-busca-avancada select,
#painel-busca-avancada input {
  padding: 6px 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 13px;
  background: #fff;
  color: #2c3e50;
  height: 34px;
}
#painel-busca-avancada .ba-grupo {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
#painel-busca-avancada .ba-grupo label {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .4px;
}
#painel-busca-avancada .ba-acoes {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  padding-bottom: 1px;
}

/* ── Auditoria — badges de ação ───────────────────────────── */
.audit-filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 12px 0;
}
.audit-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.audit-badge-insert { background: #dcfce7; color: #166534; }
.audit-badge-update { background: #dbeafe; color: #1e40af; }
.audit-badge-delete { background: #fee2e2; color: #991b1b; }
.audit-badge-login  { background: #f3f4f6; color: #374151; }
.audit-badge-export { background: #ffedd5; color: #9a3412; }

.lista-vazia { padding: 40px 20px; text-align: center; color: #999; font-style: italic; }

/* FORMULARIO */
#formulario-cadastro {
  background: #fff; border: 1px solid #e1e4e8;
  border-radius: 6px; padding: 18px 22px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.grupo {
  border: 1px solid #e1e4e8; border-radius: 6px;
  padding: 14px 18px; margin: 0 0 16px 0; background: #fafbfc;
}
.grupo > legend {
  padding: 0 8px; color: #2c3e50; font-weight: 600; font-size: 14px;
  background: #fff; border: 1px solid #e1e4e8; border-radius: 4px;
}
.linha { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 10px; }
.linha:last-child { margin-bottom: 0; }
.linha.alinhar-fim { align-items: flex-end; }
.campo { display: flex; flex-direction: column; min-width: 180px; flex: 1; }
.campo.campo-grande { flex: 2; min-width: 280px; }
.campo > label { font-size: 13px; color: #555; margin-bottom: 4px; font-weight: 600; }
.obrigatorio { color: #c62828; }

.campo input[type=text],
.campo input[type=tel],
.campo input[type=email],
.campo input[type=number],
.campo input[type=date],
.campo input[type=search] {
  padding: 7px 10px; border: 1px solid #bdc3c7; border-radius: 4px;
  font-size: 14px; font-family: inherit; background: #fff;
}
.campo input:focus {
  outline: none; border-color: #2c3e50;
  box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.12);
}
.campo input[readonly] { background: #f0f3f5; color: #555; }

.grupo-radio { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 6px 0; }
.grupo-radio label {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 14px; cursor: pointer; font-weight: 400; color: #333;
}
.grupo-radio input[type=radio] { margin: 0; }

.bloco-ano {
  background: #fff; border: 1px solid #e1e4e8;
  border-radius: 4px; padding: 10px 14px; margin: 10px 0;
}
.cabecalho-ano {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.cabecalho-ano h4 { margin: 0; color: #2c3e50; font-size: 15px; }
.tabela-pagamento { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabela-pagamento th {
  background: #f0f3f5; padding: 6px 8px; text-align: left;
  border-bottom: 1px solid #ddd; font-weight: 600; color: #2c3e50;
}
.tabela-pagamento td { padding: 4px 6px; border-bottom: 1px solid #f0f0f0; }
.tabela-pagamento input {
  width: 100%; padding: 5px 8px; border: 1px solid #d5dbdf;
  border-radius: 3px; font-size: 13px; font-family: inherit;
}
.tabela-pagamento tfoot td {
  background: #fff8e1;
  border-top: 2px solid #d4a017;
  padding: 6px 8px;
  color: #6d5208;
}
.linha-total-ano-impr td {
  background: #f0f3f5 !important;
  border-top: 2px solid #2c3e50 !important;
  padding: 4px 6px;
}

/* MODAL */
.modal-fundo {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 10000; padding: 20px;
}
.modal-caixa {
  background: #fff; border-radius: 6px; max-width: 520px; width: 100%;
  padding: 22px 26px; box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}
.modal-caixa h3 {
  margin-top: 0; color: #c62828; font-size: 18px;
  border-bottom: 2px solid #d4a017; padding-bottom: 8px;
}
.modal-caixa p { line-height: 1.5; }

/* ── Modal de Verificação de Identidade (auto-cadastro público) ── */
.modal-caixa-verif {
  max-width: 480px;
}
.modal-caixa-verif h3.verif-titulo {
  color: #1e3a5f; border-bottom-color: #1e3a5f;
  font-size: 17px;
}
.verif-texto {
  line-height: 1.6; color: #374151; font-size: 14px; margin: 0 0 14px;
}
.verif-ok { color: #15803d; font-weight: 600; }
.verif-card-dados {
  background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 8px; padding: 14px 18px;
  display: grid; gap: 8px;
  margin-bottom: 12px;
}
.verif-dado {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px;
}
.verif-label { color: #6b7280; font-weight: 600; }
.verif-valor { color: #111827; font-weight: 700; font-size: 15px; }
.verif-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
}
@media (max-width: 480px) {
  .verif-form-grid { grid-template-columns: 1fr; }
  .verif-form-grid .campo[style*="grid-column"] { grid-column: 1 !important; }
}

/* MODAL OVERLAY (genérico — usado pelo exportar Excel e futuros modais) */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.50);
  display: flex; align-items: center; justify-content: center;
  z-index: 1100; padding: 20px;
}
.modal-overlay .modal-caixa {
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0,0,0,0.30);
  padding: 0;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 2px solid #d4a017;
  background: #f8fafc;
  border-radius: 6px 6px 0 0;
}
.modal-titulo {
  margin: 0; font-size: 17px; font-weight: 700; color: #243447;
}
.modal-fechar {
  background: none; border: none; font-size: 22px; cursor: pointer;
  color: #6b7280; padding: 2px 6px; border-radius: 4px; line-height: 1;
}
.modal-fechar:hover { background: #e5e7eb; color: #111; }
.modal-corpo { padding: 20px 24px; }

/* BOTÃO ACESSO ADMIN — cadeado flutuante (canto inferior direito) */
#btn-acesso-admin {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 8888;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(36, 52, 71, 0.18);
  color: rgba(36, 52, 71, 0.40);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
#btn-acesso-admin:hover {
  background: rgba(36, 52, 71, 0.70);
  color: #fff;
  transform: scale(1.10);
}
/* Oculta o botão fora das telas públicas */
#btn-acesso-admin.oculto { display: none; }

/* botão link pequeno (ex: "Selecionar tudo") */
.btn-link-pequeno {
  background: none; border: none; font-size: 12px;
  color: #2563eb; cursor: pointer; padding: 2px 4px;
  text-decoration: underline; font-family: inherit;
}
.btn-link-pequeno:hover { color: #1d4ed8; }

/* ── Formulários dentro de modais ── */
.form-grupo {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 16px;
}
.form-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}
.input-form {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  font-size: 14px;
  color: #111827;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.input-form:focus {
  outline: none;
  border-color: #2c3e50;
  box-shadow: 0 0 0 3px rgba(44,62,80,0.08);
}
.input-form:disabled { background: #f3f4f6; color: #6b7280; }
.aviso-form {
  margin-top: 4px;
  padding: 8px 12px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 5px;
  color: #b91c1c;
  font-size: 13px;
}
.form-acoes {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
}
.btn-sm {
  padding: 4px 8px;
  font-size: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #f9fafb;
  cursor: pointer;
  line-height: 1;
}
.btn-sm:hover { background: #f3f4f6; }

/* Botões de ícone — tabela de usuários */
.acoes-usuario {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
}
.btn-icone {
  width: 32px;
  height: 32px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f9fafb;
  color: #374151;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
  padding: 0;
}
.btn-icone:hover { background: #e5e7eb; }
.btn-icone-perigo { color: #b91c1c; border-color: #fca5a5; }
.btn-icone-perigo:hover { background: #fef2f2; }
.btn-icone-ok { color: #16a34a; border-color: #86efac; }
.btn-icone-ok:hover { background: #f0fdf4; }

.modal-botoes {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end;
  margin-top: 18px;
}
.painel-status {
  background: #fff; border: 1px solid #e1e4e8; border-radius: 6px;
  padding: 20px 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  margin-bottom: 18px;
}

/* ============================================================
   FICHA DE VISUALIZACAO / IMPRESSAO (layout em secoes)
   ============================================================ */
.ficha-impressao {
  background: #fff;
  border: 1px solid #d0d4d9;
  border-radius: 4px;
  padding: 18px 22px;
  font-size: 13px;
  line-height: 1.4;
  color: #222;
  max-width: 900px;
  margin: 0 auto;
}

.cabecalho-paroquia {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #d0d4d9;
  padding: 6px 10px;
  margin-bottom: 10px;
  background: #fff;
}
.cabecalho-paroquia img.img-pastor {
  height: 95px;
  width: auto;
  object-fit: contain;
  flex: 0 0 auto;
}
.cabecalho-paroquia img.img-brasao {
  height: 95px;
  width: auto;
  object-fit: contain;
  flex: 1 1 auto;
  max-width: 80%;
}

.ficha-titulo-principal {
  display: flex; justify-content: space-between; align-items: flex-end;
  border-bottom: 2px solid #2c3e50;
  padding-bottom: 6px; margin-bottom: 10px;
}
.ficha-titulo-principal h2 {
  margin: 0; font-size: 17px; color: #2c3e50; letter-spacing: 0.5px;
}
.ficha-numero {
  font-size: 13px; font-weight: 700; color: #2c3e50;
}
.ficha-numero strong {
  font-size: 16px; font-family: "Consolas", "Courier New", monospace;
}

.ficha-secao {
  border: 1px solid #d0d4d9;
  border-radius: 3px;
  padding: 6px 10px;
  margin-bottom: 6px;
}
.ficha-secao-titulo {
  font-size: 11px; font-weight: 700; color: #2c3e50;
  text-transform: uppercase; letter-spacing: 0.4px;
  border-bottom: 1px solid #e0e3e6;
  padding-bottom: 2px; margin-bottom: 4px;
}
.ficha-linha {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-bottom: 3px;
}
.ficha-linha:last-child { margin-bottom: 0; }
.ficha-campo-impr {
  display: flex; gap: 6px; align-items: baseline;
  flex: 1; min-width: 200px;
}
.ficha-campo-impr.campo-largo { flex: 100%; }
.ficha-rotulo {
  font-weight: 600; color: #555; white-space: nowrap;
}
.ficha-valor {
  flex: 1; border-bottom: 1px dotted #b0b0b0;
  min-height: 1.2em; word-break: break-word;
}

.quadradinho {
  display: inline-block; width: 10px; height: 10px;
  border: 1px solid #333; vertical-align: middle;
  margin-right: 3px; background: #fff;
  position: relative; top: -1px;
}
.quadradinho.marcado { background: #2c3e50; }
.opcoes-radio {
  display: inline-flex; flex-wrap: wrap; gap: 10px;
}
.opcao-radio { display: inline-flex; align-items: center; gap: 2px; }

.tabela-ficha-pagamentos {
  width: 100%; border-collapse: collapse;
  margin-top: 3px; font-size: 11px;
}
.tabela-ficha-pagamentos th,
.tabela-ficha-pagamentos td {
  border: 1px solid #d0d4d9;
  padding: 2px 5px; text-align: left;
  height: 14px;
}
.tabela-ficha-pagamentos th {
  background: #f0f3f5; font-weight: 700; color: #2c3e50;
  padding: 3px 5px;
}
.bloco-ano-impr { margin-top: 4px; }
.bloco-ano-impr h4 {
  margin: 0 0 2px 0; font-size: 12px; color: #2c3e50;
  border-left: 3px solid #d4a017; padding-left: 6px;
}

/* ============================================================
   IMPRESSAO A4
   ============================================================ */
@media print {
  @page {
    size: A4 portrait;
    margin: 15mm 15mm;
  }

  /* Zera background e layout base */
  html, body {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 9pt;
    color: #000;
    width: 100% !important;
    box-sizing: border-box;
  }

  /* Oculta tudo que não é conteúdo de impressão */
  #tela-login,
  .topo,
  .rodape,
  .nao-imprimir,
  .cabecalho-lista { display: none !important; }

  /* Main ocupa 100% sem padding nem overflow */
  #conteudo {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    overflow: visible !important;
    box-sizing: border-box;
  }

  /* Oculta TODAS as telas — exceto a ativa */
  #conteudo > .tela { display: none !important; }
  #conteudo > .tela.ativa {
    display: block !important;
    padding: 0 !important;
    width: 100% !important;
    box-sizing: border-box;
    overflow: visible !important;
  }

  /* ── FICHA DE CADASTRO ────────────────────────────────── */
  .ficha-impressao {
    border: none;
    padding: 0;
    box-shadow: none;
    max-width: 100%;
    width: 100%;
    margin: 0;
    font-size: 9pt;
    line-height: 1.25;
    box-sizing: border-box;
    overflow: visible;
  }
  .cabecalho-paroquia {
    margin-bottom: 4px;
    padding: 2px 5px;
    page-break-after: avoid;
    width: 100%;
    box-sizing: border-box;
  }
  .cabecalho-paroquia img.img-pastor { height: 60px; flex: 0 0 auto; }
  .cabecalho-paroquia img.img-brasao { height: 60px; max-width: 60%; }
  .ficha-titulo-principal {
    padding-bottom: 3px;
    margin-bottom: 4px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
  }
  .ficha-titulo-principal h2 { font-size: 12pt; margin: 0; }
  .ficha-numero { font-size: 10pt; white-space: nowrap; }
  .ficha-numero strong { font-size: 11pt; }
  .ficha-secao {
    padding: 3px 7px;
    margin-bottom: 3px;
    page-break-inside: avoid;
    width: 100%;
    box-sizing: border-box;
  }
  .ficha-secao-titulo { font-size: 8pt; padding-bottom: 1px; margin-bottom: 2px; }
  .ficha-linha { gap: 8px; margin-bottom: 1px; flex-wrap: wrap; }
  .ficha-campo-impr { gap: 4px; min-width: 160px; max-width: 100%; }

  .tabela-ficha-pagamentos {
    font-size: 8pt;
    page-break-inside: avoid;
    width: 100%;
    border-collapse: collapse;
  }
  .tabela-ficha-pagamentos th,
  .tabela-ficha-pagamentos td {
    padding: 2px 5px;
    border: 1px solid #aaa;
  }
  .tabela-ficha-pagamentos th { background: #eee !important; -webkit-print-color-adjust: exact; }
  .bloco-ano-impr h4 { font-size: 9pt; margin: 4px 0 2px; }

  /* ── ANIVERSARIANTES / LISTAS GERAIS ─────────────────── */
  .container-tabela { overflow: visible !important; }
  .tabela-cadastros {
    width: 100%;
    border-collapse: collapse;
    font-size: 9pt;
  }
  .tabela-cadastros th,
  .tabela-cadastros td {
    border: 1px solid #aaa;
    padding: 3px 6px;
  }
  .tabela-cadastros thead tr {
    background: #ddd !important;
    -webkit-print-color-adjust: exact;
  }
  #titulo-aniversariantes { font-size: 13pt; margin-bottom: 6px; }
}

/* ============================================================
   ADIMPLÊNCIA — cards e tabelas
   ============================================================ */
.adim-cards {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0 20px;
}
.adim-card {
  flex: 1 1 130px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
}
.adim-card-num {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}
.adim-card-label {
  font-size: 11px;
  color: #6b7280;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.adim-card-ok   .adim-card-num { color: #16a34a; }
.adim-card-nok  .adim-card-num { color: #dc2626; }
.adim-card-valor .adim-card-num { color: #2563eb; font-size: 20px; }
.adim-card-pct  .adim-card-num { color: #7c3aed; }
.adim-card-total .adim-card-num { color: #1e293b; }

.adim-tabelas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 10px;
}
@media (max-width: 700px) {
  .adim-tabelas { grid-template-columns: 1fr; }
}
.adim-subtitulo {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 2px solid #e2e8f0;
}
.adim-subtitulo.adim-ok  { color: #16a34a; border-color: #86efac; }
.adim-subtitulo.adim-nok { color: #dc2626; border-color: #fca5a5; }

/* ============================================================
   TELA INICIAL (HOME) - Fase 9.1
   ============================================================ */
.home-container {
  max-width: 1400px;
  margin: auto;
  padding: 40px 30px;
  text-align: center;
  background: transparent;
  border: none;
  box-shadow: none;
}
.home-titulo h1 { font-size: 22px; margin: 10px 0 4px 0; }
.home-cabecalho-institucional {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px;
  margin-bottom: 70px;
  flex-wrap: wrap;
}
.imagem-santo {
  width: 260px;
  height: 360px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  border: 5px solid #fff;
}
.home-titulo { text-align: left; }
.home-titulo h1 {
  font-size: 52px;
  color: #1f2937;
  margin: 0 0 10px 0;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.home-subtitulo {
  font-size: 20px;
  color: #6b7280;
  line-height: 1.7;
  margin: 0;
}
.home-titulo h1 {
  margin: 0 0 6px 0;
  color: #2c3e50;
  font-size: 26px;
  font-weight: 700;
}
.home-subtitulo {
  margin: 0;
  color: #777;
  font-size: 14px;
}
.home-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}
@media (max-width: 768px) { .home-tiles { grid-template-columns: 1fr; } }

.home-tile {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  padding: 40px 25px;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  transition: 0.25s ease;
}
.home-tile:hover, .home-tile:focus {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
  outline: none;
}
.home-tile-icone {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-tile-icone svg {
  width: 64px;
  height: 64px;
}
.home-tile-titulo {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #111827;
}
.home-tile-descricao {
  color: #6b7280;
  line-height: 1.5;
  font-size: 14px;
}
.home-tile-consulta .home-tile-icone { color: #2563eb; }
.home-tile-cadastro .home-tile-icone { color: #16a34a; }
.home-tile-aniversario .home-tile-icone { color: #d97706; }
.home-tile-relatorio .home-tile-icone { color: #9333ea; }
.home-tile-exportar .home-tile-icone { color: #16a34a; }
.home-tile-importar .home-tile-icone { color: #2563eb; }
.home-tile-codigo .home-tile-icone { color: #e65100; }
.home-tile-lista .home-tile-icone { color: #6a1b9a; }
.home-tile-informativo .home-tile-icone { color: #0891b2; }
.home-tile-email-templates .home-tile-icone { color: #7c3aed; }

.home-tile-usuarios .home-tile-icone { color: #dc2626; }
/* Barra de acoes da tela Configuracoes */
.config-barra-acoes {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 2px solid #e5e7eb;
}
.config-titulo {
    margin: 0;
    font-size: 26px;
    color: #1f2937;
    font-weight: 700;
}

/* Badge da Situacao Dizimista */
.badge-situacao {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.badge-situacao-ativo {
  background: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #66bb6a;
}
.badge-situacao-inativo {
  background: #fafafa;
  color: #757575;
  border: 1px solid #bdbdbd;
}

/* Select base para campo-situacao */
.campo select {
  padding: 7px 10px;
  border: 1px solid #bdc3c7;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}
.campo select:focus {
  outline: none;
  border-color: #2c3e50;
  box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.12);
}

.home-config {
  margin-top: 16px;
  border-top: 1px dashed #ddd;
  padding-top: 14px;
}

/* Indicador de modo na barra de cabecalho da lista/formulario */
.indicador-modo {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  margin-left: 8px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.indicador-modo.modo-consulta { background: #e8f4fd; color: #1565c0; border: 1px solid #90caf9; }
.indicador-modo.modo-cadastro { background: #fff8e1; color: #6d5208; border: 1px solid #d4a017; }

/* ============================================================
   TELA CONFIGURACOES - Fase 9.1
   ============================================================ */
.config-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 18px;
  margin-top: 16px;
  scroll-margin-top: 70px;
}
.config-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s ease;
}
.config-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.config-card-icone {
  width: 60px; height: 60px; min-width: 60px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.config-card-conteudo { flex: 1; }
.config-card-conteudo h3 {
  margin: 0 0 6px 0;
  font-size: 16px;
  color: #2c3e50;
}
.config-card-conteudo p {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: #666;
  line-height: 1.4;
}
.config-card button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ============================================================
   MODAL DE CODIGO ADMINISTRATIVO (Fase 9.2)
   ============================================================ */
.modal-caixa-codigo {
    max-width: 460px;
}
.mc-grupo {
    margin: 14px 0;
}
.mc-grupo label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.mc-grupo input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 18px;
    font-family: "Consolas", "Courier New", monospace;
    letter-spacing: 4px;
    text-align: center;
}
.mc-grupo input:focus {
    outline: none;
    border-color: #243447;
    box-shadow: 0 0 0 3px rgba(36, 52, 71, 0.15);
}
.mc-erro {
    margin: 10px 0;
    padding: 8px 12px;
    background: #fef2f2;
    border-left: 4px solid #dc2626;
    color: #991b1b;
    font-size: 13px;
    border-radius: 4px;
}
.mc-erro-grande {
    color: #dc2626;
    font-weight: 700;
    font-size: 16px;
    text-align: center;
}
.mc-aviso {
    color: #6d5208;
    background: #fff8e1;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    margin: 8px 0;
}

/* ============================================================
   TRAVA DE PAGAMENTOS (Fase 9.3)
   ============================================================ */
/* ============================================================
   GERENCIADOR DE TEMPLATES DE E-MAIL (Fase 5.9)
   ============================================================ */

/* Grid de cards na tela de templates */
.grid-email-templates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  padding: 20px;
}

/* Card individual de template */
.card-email-template {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 18px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: box-shadow 0.15s;
}
.card-email-template:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

.card-tpl-icone {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.card-tpl-corpo { flex: 1; min-width: 0; }
.card-tpl-nome  { font-weight: 700; font-size: 15px; color: #111827; margin-bottom: 4px; }
.card-tpl-desc  { font-size: 13px; color: #6b7280; margin-bottom: 6px; line-height: 1.4; }
.card-tpl-assunto {
  font-size: 12px; color: #374151;
  background: #f3f4f6; border-radius: 4px;
  padding: 4px 8px; margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-tpl-assunto em { font-style: normal; color: #7c3aed; }
.card-tpl-data { font-size: 11px; color: #9ca3af; }
.card-tpl-acoes { flex-shrink: 0; }

/* Modal editor — maior que os outros */
.modal-caixa-template {
  max-width: 720px;
  width: 96%;
  max-height: 92vh;
  overflow-y: auto;
}

/* Chips de variáveis */
.chip-variavel {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  background: #ede9fe;
  color: #5b21b6;
  border: 1px solid #c4b5fd;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  font-family: monospace;
  transition: background 0.12s, border-color 0.12s;
  text-align: left;
  line-height: 1.3;
}
.chip-variavel:hover { background: #ddd6fe; border-color: #a78bfa; }
.chip-variavel:active { background: #c4b5fd; }
.chip-variavel-nome { font-weight: 700; font-size: 12px; }
.chip-variavel-desc { font-size: 10px; color: #7c3aed; font-family: sans-serif; font-weight: 400; margin-top: 1px; opacity: .85; }

/* Painel de variáveis do editor */
.editor-vars-painel {
  background: #faf9ff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.editor-vars-campo-ativo {
  font-size: 11px;
  color: #9ca3af;
  margin-bottom: 6px;
}
.editor-vars-campo-ativo strong { color: #5b21b6; }

/* Editor Quill — sobrescreve estilos padrão para encaixar no modal */
#editor-quill-body {
  border: 1px solid #bdc3c7;
  border-top: none;
  border-radius: 0 0 4px 4px;
  font-family: 'Segoe UI', sans-serif;
  font-size: 14px;
}
#editor-quill-toolbar {
  border: 1px solid #bdc3c7;
  border-radius: 4px 4px 0 0;
  background: #f9fafb;
}
.ql-toolbar.ql-snow { border: none; padding: 6px 8px; }
.ql-container.ql-snow { border: none; }
.ql-editor { min-height: 160px; padding: 10px 12px; }
.ql-editor p { margin-bottom: 8px; }

/* Avisos dentro do modal de template */
.aviso-sucesso {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
}
.aviso-erro {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
}

/* Coluna Forma de Pagamento (PIX / Dinheiro) */
.col-forma-hdr { width: 100px; text-align: center; }
.col-forma { width: 100px; text-align: center; }
.sel-forma {
  width: 92px;
  padding: 3px 4px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 12px;
  font-family: inherit;
  background: #fff;
  color: #374151;
  cursor: pointer;
}
.sel-forma:focus { outline: none; border-color: #243447; }
.sel-forma option[value="pix"]      { color: #2563eb; }
.sel-forma option[value="dinheiro"] { color: #16a34a; }

.col-trava { width: 40px; text-align: center; }
.linha-bloqueada td input {
    background: #f3f4f6 !important;
    color: #6b7280;
    cursor: not-allowed;
}
.linha-bloqueada td .btn-destravar {
    background: #fef3c7;
    border: 1px solid #d4a017;
    color: #6d5208;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
}
.linha-bloqueada td .btn-destravar:hover { background: #fde68a; }
.col-trava .fa-lock-open { color: #2e7d32; font-size: 14px; }

/* ============================================================
   RELATORIOS (Fase 9.4.1)
   ============================================================ */
.rel-stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin: 24px 0;
}
.rel-stat-card {
  display: flex;
  gap: 18px;
  align-items: center;
  background: #fff;
  border-left: 6px solid #ddd;
  border-radius: 10px;
  padding: 20px 22px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
.rel-stat-card.rel-stat-azul { border-left-color: #2563eb; }
.rel-stat-card.rel-stat-verde { border-left-color: #16a34a; }
.rel-stat-icone {
  width: 60px; height: 60px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}
.rel-stat-azul .rel-stat-icone { background: #e3f2fd; color: #1565c0; }
.rel-stat-verde .rel-stat-icone { background: #e8f5e9; color: #16a34a; }
.rel-stat-conteudo { flex: 1; }
.rel-stat-titulo {
  font-size: 11px;
  letter-spacing: 1px;
  color: #6b7280;
  font-weight: 600;
  text-transform: uppercase;
}
.rel-stat-numero {
  font-size: 32px;
  font-weight: 700;
  color: #111827;
  margin: 4px 0;
}
.rel-stat-detalhe { display: flex; gap: 10px; flex-wrap: wrap; }
.rel-badge {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}
.rel-badge-ativo { background: #dcfce7; color: #166534; }
.rel-badge-inativo { background: #f3f4f6; color: #6b7280; }
.rel-detalhe-pequeno { color: #6b7280; font-size: 13px; }

/* ── Navegação rápida dos Relatórios ──────────────────────── */
.rel-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  background: #fff;
  border-radius: 10px;
  padding: 10px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  margin-bottom: 20px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.rel-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  background: #f3f4f6;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.rel-nav-btn:hover { background: #e5e7eb; color: #111827; }
.rel-nav-btn-destaque { background: #dcfce7; color: #15803d; }
.rel-nav-btn-destaque:hover { background: #bbf7d0; color: #14532d; }

.rel-grafico-bloco {
  background: #fff;
  border-radius: 10px;
  padding: 22px 24px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  margin-bottom: 20px;
  scroll-margin-top: 70px; /* compensa a nav sticky */
}
.rel-grafico-cabecalho {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
}
.rel-grafico-cabecalho h3 { margin: 0; font-size: 17px; color: #1f2937; }
.rel-seletor {
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
}
.rel-grafico-area {
  width: 100%;
  min-height: 280px;
  overflow-x: auto;
}
.rel-grafico-vazio {
  text-align: center;
  padding: 40px 20px;
  color: #9ca3af;
  font-style: italic;
}

/* Barras SVG */
.rel-bar-rect { transition: opacity 0.2s ease; }
.rel-bar-rect:hover { opacity: 0.75; }
.rel-bar-label { fill: #6b7280; font-size: 11px; }
.rel-bar-value { fill: #1f2937; font-size: 11px; font-weight: 600; }
.rel-eixo-linha { stroke: #e5e7eb; stroke-width: 1; }
.rel-eixo-label { fill: #9ca3af; font-size: 10px; }

/* ============================================================
   BADGES DE ESTATISTICA E AJUSTES RELATORIOS
   ============================================================ */
.badge-estat {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  margin-right: 6px;
}
.badge-estat-ativo { background: #dcfce7; color: #166534; }
.badge-estat-inativo { background: #f3f4f6; color: #6b7280; }

/* Card especifico para estatisticas (Relatorios) - nao contamina Configuracoes */
.config-card.card-stat h3 {
  margin: 0 0 4px 0;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: #6b7280;
  text-transform: uppercase;
  font-weight: 600;
}
.card-stat .stat-numero {
  font-size: 30px;
  font-weight: 700;
  color: #111827;
  line-height: 1.1;
  margin: 6px 0 8px 0;
}
.card-stat .stat-detalhe {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

/* Icones FontAwesome dentro de config-card-icone */
.config-card-icone i {
  font-size: 28px;
}
.card-stat .config-card-icone {
  width: 64px;
  height: 64px;
  min-width: 64px;
}

/* ============================================================
   FASE 3 — TELA DE LOGIN (JWT)
   ============================================================ */

/* Fundo azul escuro — ocupa toda a viewport
   display: flex !important sobrepõe .tela.ativa { display: block } */
.tela-login-fundo,
.tela.ativa.tela-login-fundo {
  min-height: 100vh;
  background: var(--primary) !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.login-container {
  width: 100%;
  max-width: 440px;
}

.login-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  padding: 40px 36px 32px;
  text-align: center;
}

.login-cabecalho-imgs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.login-img-santo {
  height: 108px;
  width: 108px;
  object-fit: cover;
  object-position: top center;
  border-radius: 50%;
  border: 4px solid var(--secondary);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

.login-img-brasao {
  height: 108px;
  width: 108px;
  object-fit: contain;
}

.login-titulo {
  font-size: 22px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 4px;
}

.login-subtitulo {
  font-size: 13px;
  color: #6b7280;
  margin: 0 0 24px;
}

.login-campo {
  text-align: left;
  margin-bottom: 18px;
}

.login-campo label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.login-campo input {
  width: 100%;
  padding: 11px 14px;
  font-size: 15px;
  border: 2px solid #d1d5db;
  border-radius: 10px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.login-campo input:focus {
  border-color: var(--primary);
}

.btn-login-submit {
  width: 100%;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  margin-top: 6px;
  border-radius: 10px;
}

.btn-login-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-rodape {
  margin-top: 20px;
  font-size: 12px;
  color: #9ca3af;
}

/* ── Seja Dizimista CTA (topo do login-card) ── */
.seja-dizimista-cta {
  margin-bottom: 20px;
  text-align: center;
}

.seja-dizimista-divisor {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  margin-bottom: 16px;
  color: #9ca3af;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.seja-dizimista-divisor::before,
.seja-dizimista-divisor::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.seja-dizimista-texto {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: #243447;
}

.seja-dizimista-btn {
  width: 100%;
  padding: 13px;
  font-size: 15px;
  font-weight: 600;
  background: #fff;
  border: 2px solid #243447;
  color: #243447;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.seja-dizimista-btn:hover {
  background: #243447;
  color: #fff;
}

/* ── Tela Auto-Cadastro Público ── */
#tela-auto-cadastro {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.auto-cadastro-topo {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
}

.auto-cadastro-titulo {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}

.auto-cadastro-subtitulo {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 8px;
}

.auto-cadastro-acoes {
  margin-top: 28px;
  display: flex;
  justify-content: flex-end;
}

.btn-pub-submit {
  padding: 12px 32px;
  font-size: 15px;
  font-weight: 700;
}

/* ── Tela Cadastro Confirmado ── */
#tela-cadastro-confirmado {
  align-items: center;
  justify-content: center;
  min-height: 70vh;
}
#tela-cadastro-confirmado.ativa {
  display: flex;
}

.confirmado-container {
  text-align: center;
  max-width: 480px;
  padding: 48px 32px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  margin: 40px auto;
}

.confirmado-icone {
  font-size: 56px;
  color: var(--primary);
  margin-bottom: 16px;
}

.confirmado-titulo {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 12px;
}

.confirmado-mensagem {
  font-size: 15px;
  color: #4b5563;
  line-height: 1.6;
  margin: 0 0 12px;
}

.confirmado-ficha {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 24px;
  font-weight: 600;
}

.confirmado-btn {
  padding: 12px 32px;
  font-size: 15px;
  font-weight: 700;
}

/* ── Tile Pendentes (home) ── */
.home-tile-pendentes {
  background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
  border: 1px solid #fdba74;
  color: #9a3412;
}

.home-tile-pendentes .home-tile-titulo {
  color: #9a3412;
}

.home-tile-pendentes .home-tile-descricao {
  color: #c2410c;
}

/* ── Tile Solicitações (home) ── */
.home-tile-solicitacoes {
  background: linear-gradient(135deg, #eff6ff 0%, #bfdbfe 100%);
  border: 1px solid #93c5fd;
  color: #1e40af;
}
.home-tile-solicitacoes .home-tile-titulo  { color: #1e40af; }
.home-tile-solicitacoes .home-tile-descricao { color: #1d4ed8; }

/* ── Cards da fila de solicitações ── */
.sol-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.sol-card-topo {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.sol-card-nome  { font-weight: 700; font-size: 15px; color: #111827; }
.sol-card-ficha { font-size: 12px; color: #6b7280; background: #f3f4f6; padding: 2px 8px; border-radius: 12px; }
.sol-alteracoes {
  margin: 0 0 6px 0;
  padding-left: 18px;
  color: #374151;
  font-size: 13px;
}
.sol-alteracoes li { margin-bottom: 2px; }
.sol-data { font-size: 11px; color: #9ca3af; margin: 0; }

/* ── Badges de flag ── */
.badge-flag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.badge-flag-segunda  { background: #fef3c7; color: #92400e; border: 1px solid #f59e0b; }
.badge-flag-remocao  { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.badge-flag-casamento { background: #ecfdf5; color: #065f46; border: 1px solid #6ee7b7; }

/* ── Badge contador (tile pendentes) ── */
.badge-contador {
  position: absolute;
  top: -6px;
  right: -10px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  line-height: 1;
}

/* ── Badge PENDENTE na lista ── */
.badge-pendente {
  background: #fed7aa;
  color: #9a3412;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ── Botão Aprovar na lista ── */
.btn-aprovar {
  background: #16a34a;
  color: #fff;
  border: none;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-aprovar:hover { background: #15803d; }

.btn-negar {
  background: #dc2626;
  color: #fff;
  border: none;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-negar:hover { background: #b91c1c; }

/* Topo: usuário logado e botão Sair */
.topo-usuario {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.80);
  background: rgba(0, 0, 0, 0.18);
  padding: 4px 10px;
  border-radius: 6px;
  margin-right: 8px;
}

.btn-topo-sair {
  background: rgba(220, 38, 38, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(220, 38, 38, 0.35);
}

.btn-topo-sair:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

/* ============================================================
   TELA DE LOGIN (Fase 3)
   ============================================================ */
.tela-login-fundo {
  min-height: 100vh;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-container {
  width: 100%;
  max-width: 440px;
}

.login-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.30);
  text-align: center;
}

.login-cabecalho-imgs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.login-img-santo {
  height: 108px;
  width: 108px;
  object-fit: cover;
  object-position: top center;
  border-radius: 50%;
  border: 4px solid var(--secondary);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

.login-img-brasao {
  height: 108px;
  width: 108px;
  object-fit: contain;
}

.login-titulo {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.login-subtitulo {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 28px;
}

.login-campo {
  text-align: left;
  margin-bottom: 16px;
}

.login-campo label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.login-campo input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 15px;
  transition: border-color .2s;
  box-sizing: border-box;
}

.login-campo input:focus {
  outline: none;
  border-color: var(--primary);
}

.btn-login-submit {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  border-radius: 12px;
  margin-top: 8px;
  margin-bottom: 20px;
  cursor: pointer;
  border: none;
}

.btn-login-submit:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.login-rodape {
  font-size: 12px;
  color: var(--text-light);
}

/* Indicador de usuário logado no topo */
.topo-usuario {
  color: #d1d5db;
  font-size: 13px;
  padding: 8px 12px;
  background: rgba(255,255,255,.08);
  border-radius: 8px;
  white-space: nowrap;
}

.btn-topo-sair {
  background: #fdecea;
  color: #c62828;
}

.btn-topo-sair:hover {
  background: #c62828;
  color: white;
}

/* ============================================================
   RESPONSIVO — Formulário Público (Auto-Cadastro + Confirmado)
   Escopo: somente #tela-auto-cadastro e #tela-cadastro-confirmado.
   O painel admin NÃO é afetado por estas regras.
   ============================================================ */
@media (max-width: 640px) {

  /* ── Tela de auto-cadastro ── */
  #tela-auto-cadastro {
    padding: 16px 12px 48px;
  }

  .auto-cadastro-topo {
    margin-bottom: 16px;
    gap: 6px;
  }

  .auto-cadastro-titulo {
    font-size: 18px;
  }

  .auto-cadastro-subtitulo {
    font-size: 13px;
  }

  /* Campos empilhados verticalmente */
  #tela-auto-cadastro .linha {
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
  }

  #tela-auto-cadastro .campo,
  #tela-auto-cadastro .campo.campo-grande {
    min-width: 0;
    width: 100%;
    flex: none;
    margin-bottom: 12px;
  }

  /* font-size 16px nos inputs evita zoom automático no iOS */
  #tela-auto-cadastro input[type="text"],
  #tela-auto-cadastro input[type="tel"],
  #tela-auto-cadastro input[type="email"],
  #tela-auto-cadastro input[type="number"],
  #tela-auto-cadastro input[type="date"] {
    font-size: 16px;
    padding: 10px 12px;
  }

  /* Radios em coluna para facilitar o toque */
  #tela-auto-cadastro .grupo-radio {
    flex-direction: column;
    gap: 10px;
    padding: 4px 0;
  }

  #tela-auto-cadastro .grupo-radio label {
    font-size: 15px;
    min-height: 36px;
    align-items: center;
  }

  /* Grupos fieldset com padding menor */
  #tela-auto-cadastro .grupo {
    padding: 12px 14px;
  }

  /* Botão envio: full-width, área de toque confortável */
  .auto-cadastro-acoes {
    justify-content: stretch;
    margin-top: 20px;
  }

  .btn-pub-submit {
    width: 100%;
    padding: 16px;
    font-size: 16px;
  }

  /* Botão voltar no topo do formulário */
  #btn-voltar-login {
    font-size: 14px;
    padding: 8px 14px;
  }

  /* ── Tela de agradecimento ── */
  .confirmado-container {
    padding: 32px 20px;
    margin: 24px auto;
  }

  .confirmado-icone {
    font-size: 40px;
    margin-bottom: 12px;
  }

  .confirmado-titulo {
    font-size: 20px;
  }

  .confirmado-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
  }

  /* ── Login card no mobile (CTA + formulário admin) ── */
  .login-card {
    padding: 28px 20px 24px;
  }

  .login-img-santo,
  .login-img-brasao {
    height: 60px;
    width: 60px;
  }

  .login-campo input {
    font-size: 16px; /* evita zoom iOS */
  }
}

/* ============================================================
   FASE 5.10 — COMUNICADO OFICIAL + DADOS DA PARÓQUIA
   ============================================================ */

/* ── Tiles novos ─────────────────────────────────────────── */
.home-tile-comunicado .home-tile-icone { color: #b45309; }
.home-tile-paroquia   .home-tile-icone { color: #065f46; }

/* ── Formulário de Dados da Paróquia ─────────────────────── */
.form-paroquia {
  max-width: 800px;
  margin: 24px auto;
  padding: 0 8px;
}

.form-paroquia-grupo {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.form-paroquia-secao {
  font-size: 14px;
  font-weight: 600;
  color: #243447;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-paroquia-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ── Comunicado — wrapper da tela ────────────────────────── */
.comunicado-wrapper {
  max-width: 800px;
  margin: 16px auto 40px;
  padding: 0 8px;
}

/* ── Documento do Comunicado ─────────────────────────────── */
.comunicado-doc {
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  overflow: hidden;
  font-family: 'Georgia', 'Times New Roman', serif;
  color: #1f2937;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

/* Cabeçalho vinho */
.comunicado-header {
  background: #5c1e1e;
  color: #fff;
  padding: 18px 32px;
  text-align: center;
}

.comunicado-header-titulo {
  font-size: 12px;
  font-family: Arial, sans-serif;
  letter-spacing: 3px;
  font-weight: 700;
  color: #f5e6c8;
  margin-bottom: 8px;
}

.comunicado-header-paroquia {
  font-size: 18px;
  font-weight: 400;
  color: #fff;
  margin-bottom: 8px;
}

.comunicado-header-divisor {
  width: 100px;
  height: 1px;
  background: #c9a95a;
  margin: 6px auto;
  border: none;
}

.comunicado-header-pastoral {
  font-size: 10px;
  letter-spacing: 3px;
  color: #f5e6c8;
  font-family: Arial, sans-serif;
  text-transform: uppercase;
}

/* Corpo do comunicado */
.comunicado-corpo {
  padding: 20px 32px;
  line-height: 1.6;
  font-size: 13.5px;
  color: #374151;
  text-align: justify;
}

.comunicado-corpo h2 {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
  border-left: 4px solid #c9a95a;
  padding-left: 12px;
  margin: 0 0 14px;
  page-break-after: avoid;
}

.comunicado-corpo h3 {
  font-size: 14px;
  font-weight: 700;
  color: #374151;
  padding-bottom: 4px;
  border-bottom: 1px solid #e5e7eb;
  margin: 16px 0 8px;
  page-break-after: avoid;
}

.comunicado-corpo ul {
  padding-left: 0;
  list-style: none;
  margin: 6px 0;
  page-break-inside: avoid;
}

.comunicado-corpo ul li {
  padding: 3px 0 3px 20px;
  position: relative;
}

.comunicado-corpo ul li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: #b45309;
}

.comunicado-corpo blockquote {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: 4px;
  padding: 10px 14px;
  margin: 12px 0;
  font-size: 13px;
  color: #92400e;
  font-style: normal;
  page-break-inside: avoid;
}

.comunicado-corpo table {
  width: 100%;
  border-collapse: collapse;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin: 16px 0;
  font-size: 14px;
}

.comunicado-corpo table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
}

.comunicado-corpo table td:first-child {
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
  width: 180px;
}

.comunicado-corpo table tr:last-child td {
  border-bottom: none;
}

.comunicado-corpo em {
  display: block;
  background: #f9f5f0;
  border: 1px dashed #c9a95a;
  border-radius: 6px;
  padding: 16px 20px;
  text-align: center;
  font-style: italic;
  color: #5c3d11;
  margin: 20px 0;
  line-height: 1.6;
}

/* Assinaturas */
.comunicado-assinaturas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 18px 32px 14px;
  border-top: 2px solid #e5e7eb;
  margin-top: 4px;
  page-break-inside: avoid;
}

.comunicado-ass-col {
  text-align: center;
}

.comunicado-ass-linha {
  height: 1px;
  background: #374151;
  margin-bottom: 10px;
}

.comunicado-ass-nome {
  font-size: 14px;
  color: #1f2937;
}

.comunicado-ass-desc {
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
}

/* Rodapé do comunicado */
.comunicado-rodape {
  background: #f3f4f6;
  border-top: 1px solid #e5e7eb;
  padding: 12px 40px;
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  font-family: Arial, sans-serif;
}

/* ── CSS de Impressão do Comunicado ──────────────────────
   Removido: o comunicado agora usa html2canvas/jsPDF,
   não window.print(). O @media print do comunicado
   interferia na impressão da ficha de cadastro. */

/* ── Modal Inatividade ─────────────────────────────────────── */
#modal-inatividade .modal-caixa {
  border-top: 4px solid #d97706;
}

/* ── Responsividade mobile ───────────────────────────────── */
@media (max-width: 600px) {
  .form-paroquia-grid { grid-template-columns: 1fr; }
  .form-paroquia-grid .campo[style*="span 2"] { grid-column: span 1; }

  .comunicado-header  { padding: 20px 20px; }
  .comunicado-corpo   { padding: 20px 20px; }
  .comunicado-assinaturas {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 20px;
  }
  .comunicado-rodape  { padding: 10px 20px; }
}

/* ============================================================
   NOVO PAINEL ADMIN — Layout sidebar + topbar + mobile nav
   ============================================================ */

/* ── Variáveis do admin ── */
:root {
  --adm-sidebar-w:         260px;
  --adm-sidebar-collapsed: 80px;
  --adm-sidebar-bg:        #17335d;
  --adm-sidebar-bg2:       #10294d;
  --adm-sidebar-text:      rgba(255,255,255,0.78);
  --adm-sidebar-act:       rgba(255,255,255,0.12);
  --adm-topbar-h:          72px;
  --adm-topbar-bg:         #ffffff;
  --adm-gold:              #c79a2b;
  --adm-bg:                #f4f6f9;
  --adm-card:              #ffffff;
  --adm-text:              #1e293b;
  --adm-muted:             #64748b;
  --adm-border:            #e2e8f0;
  --adm-radius:            20px;
  --adm-shadow:            0 2px 16px rgba(0,0,0,0.08);
  --adm-shadow-hover:      0 8px 28px rgba(0,0,0,0.13);
}

/* ── Wrapper geral (sidebar + topbar + conteúdo) ── */
.admin-layout {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--adm-topbar-h);
  z-index: 200;
  display: flex;
  align-items: stretch;
  pointer-events: none; /* só os filhos capturam eventos */
}

/* ── SIDEBAR ── */
.admin-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--adm-sidebar-w);
  background: linear-gradient(180deg, var(--adm-sidebar-bg) 0%, var(--adm-sidebar-bg2) 100%);
  display: flex;
  flex-direction: column;
  z-index: 210;
  pointer-events: all;
  transition: width 0.26s ease, transform 0.28s ease;
  overflow: hidden;
}

/* Marca d'água da igreja no fundo da sidebar */
.admin-sidebar::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 220px;
  background: url("img/altar-paroquia-sao-roque.jpg") 50% 30% / cover no-repeat;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}

/* Logo */
.sidebar-logo {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 0;
  min-height: var(--adm-topbar-h);
  flex-shrink: 0;
}
.sidebar-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--adm-gold);
  flex-shrink: 0;
}
.sidebar-logo-text {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: opacity 0.2s, width 0.26s;
}
.sidebar-nome-paroquia {
  color: #fff;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

/* Linha dourada abaixo do logo */
.sidebar-gold-line {
  position: relative;
  z-index: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--adm-gold), transparent);
  margin: 12px 16px 4px;
  flex-shrink: 0;
  border-radius: 2px;
}

/* Botão de collapse (desktop) */
.sidebar-collapse-btn {
  position: absolute;
  top: 20px;
  right: -14px;
  width: 28px; height: 28px;
  background: var(--adm-card);
  border: 1px solid var(--adm-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--adm-text);
  z-index: 220;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: background 0.15s;
}
.sidebar-collapse-btn:hover { background: var(--adm-bg); }

/* Navegação */
.sidebar-nav {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 8px 8px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  color: var(--adm-sidebar-text);
  background: transparent;
  border: none;
  border-radius: 10px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.sidebar-item svg { flex-shrink: 0; opacity: 0.80; }
.sidebar-item:hover { background: var(--adm-sidebar-act); color: #fff; }
.sidebar-item:hover svg { opacity: 1; }
.sidebar-item-label { transition: opacity 0.2s; }

.sidebar-item-ativo {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.sidebar-item-ativo svg { opacity: 1; }

.sidebar-item-sair { color: #fca5a5; }
.sidebar-item-sair:hover { background: rgba(239,68,68,0.15); color: #fca5a5; }

/* Badge sidebar */
.sidebar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: #ef4444;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 9px;
  margin-left: auto;
}

/* Separador sidebar */
.sidebar-sep {
  position: relative;
  z-index: 1;
  height: 1px;
  background: rgba(255,255,255,0.10);
  margin: 6px 12px;
  flex-shrink: 0;
}

/* Rodapé sidebar */
.sidebar-footer {
  position: relative;
  z-index: 1;
  padding: 8px 8px max(8px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

/* ── SIDEBAR RECOLHIDA (desktop collapse) ── */
.admin-sidebar.recolhida {
  width: var(--adm-sidebar-collapsed);
}
.admin-sidebar.recolhida .sidebar-logo-text,
.admin-sidebar.recolhida .sidebar-item-label,
.admin-sidebar.recolhida .sidebar-nome-paroquia,
.admin-sidebar.recolhida .sidebar-badge {
  opacity: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
}
.admin-sidebar.recolhida .sidebar-gold-line {
  margin: 12px 8px 4px;
}
.admin-sidebar.recolhida .sidebar-item {
  justify-content: center;
  padding: 10px;
  gap: 0;
}
.admin-sidebar.recolhida .sidebar-collapse-btn {
  right: -14px;
}
/* Conteúdo se ajusta quando recolhida */
#conteudo.sidebar-recolhida {
  margin-left: var(--adm-sidebar-collapsed);
}
.admin-topbar.sidebar-recolhida {
  left: var(--adm-sidebar-collapsed);
}

/* ── TOPBAR ── */
.admin-topbar {
  position: fixed;
  top: 0;
  left: var(--adm-sidebar-w);
  right: 0;
  height: var(--adm-topbar-h);
  background: var(--adm-topbar-bg);
  border-bottom: 1px solid var(--adm-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 205;
  pointer-events: all;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.topbar-esquerda {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-hamburger {
  display: none; /* só aparece no mobile */
  background: transparent;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--adm-text);
  border-radius: 8px;
}
.topbar-hamburger:hover { background: var(--adm-bg); }

.topbar-titulo {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--adm-text);
}

.topbar-direita {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Notificação */
.topbar-notif-wrap { position: relative; }

.topbar-notif {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  background: var(--adm-bg);
  border: 1px solid var(--adm-border);
  border-radius: 50%;
  cursor: pointer;
  color: var(--adm-text);
  transition: background 0.15s;
}
.topbar-notif:hover { background: #e2e8f0; }

.topbar-notif-badge {
  position: absolute;
  top: -3px; right: -3px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

/* Dropdown notificações */
.notif-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 300px;
  background: #fff;
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  z-index: 300;
  overflow: hidden;
  animation: fadeInDown 0.18s ease-out;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.notif-header {
  padding: 12px 16px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--adm-text);
  border-bottom: 1px solid var(--adm-border);
  background: var(--adm-bg);
}

.notif-lista { padding: 8px 0; }

.notif-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.12s;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: 'Inter', system-ui, sans-serif;
}
.notif-item:hover { background: var(--adm-bg); }

.notif-item-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.notif-icon-amarelo { background: #fef3c7; color: #d97706; }
.notif-icon-azul    { background: #dbeafe; color: #2563eb; }

.notif-item-texto { flex: 1; }
.notif-item-texto strong { display: block; font-size: 0.82rem; color: var(--adm-text); }
.notif-item-texto span   { font-size: 0.75rem; color: var(--adm-muted); }

.notif-vazio {
  padding: 16px;
  text-align: center;
  color: var(--adm-muted);
  font-size: 0.83rem;
  margin: 0;
}

/* Usuário no topbar */
.topbar-usuario-wrap {
  position: relative;
}

.topbar-usuario {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 10px;
  transition: background 0.15s;
  font-family: 'Inter', system-ui, sans-serif;
}
.topbar-usuario:hover { background: #f1f5f9; }

.topbar-avatar {
  width: 36px; height: 36px;
  background: var(--adm-sidebar-bg);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  flex-shrink: 0;
  border: 2px solid var(--adm-gold);
}

.topbar-usuario-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-align: left;
}
.topbar-nome {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--adm-text);
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-cargo {
  font-size: 0.70rem;
  color: var(--adm-muted);
}
.topbar-chevron {
  color: var(--adm-muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.topbar-usuario[aria-expanded="true"] .topbar-chevron {
  transform: rotate(180deg);
}

/* Avatar dropdown */
.avatar-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  z-index: 300;
  overflow: hidden;
  animation: fadeInDown 0.18s ease-out;
  padding: 6px 0;
}
.avatar-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  width: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--adm-text);
  font-family: 'Inter', system-ui, sans-serif;
  text-align: left;
  transition: background 0.12s;
  min-height: 44px;
}
.avatar-menu-item:hover { background: var(--adm-bg); }
.avatar-menu-item svg  { color: var(--adm-muted); flex-shrink: 0; }
.avatar-menu-sep {
  height: 1px;
  background: var(--adm-border);
  margin: 4px 0;
}
.avatar-menu-sair { color: #ef4444; }
.avatar-menu-sair svg { color: #ef4444; }

/* ── Conteúdo principal deslocado pela sidebar ── */
#conteudo {
  margin-left: var(--adm-sidebar-w);
  padding-top: var(--adm-topbar-h);
  min-height: 100vh;
  background: var(--adm-bg);
}

/* ── MOBILE BOTTOM NAV ── */
.admin-bottom-nav {
  display: none; /* escondido por padrão, aparece em mobile */
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(60px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: #fff;
  border-top: 1px solid var(--adm-border);
  z-index: 210;
  flex-direction: row;
  align-items: stretch;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
}

.bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: var(--adm-muted);
  font-size: 0.60rem;
  font-family: 'Inter', system-ui, sans-serif;
  cursor: pointer;
  transition: color 0.15s;
  padding: 6px 4px 4px;
}
.bnav-item:hover,
.bnav-ativo { color: var(--adm-sidebar-bg); }
.bnav-ativo svg { stroke: var(--adm-sidebar-bg); }

/* ── HOME — Visão Geral ── */
.home-scroll-area {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
}

/* ── HERO BANNER — 3 colunas ── */
/* ── HERO BANNER (banner navy escuro integrado) ── */
.home-hero-banner {
  display: flex;
  background: linear-gradient(120deg, #17335d 0%, #10294d 65%, #0d2040 100%);
  border-radius: var(--adm-radius);
  overflow: hidden;
  min-height: 220px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}

.home-hero-text {
  flex: 1;
  padding: 32px 36px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.home-hero-diocese {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
}

.home-hero-regiao {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  color: var(--adm-gold);
  text-transform: uppercase;
}

.home-hero-paroquia {
  margin: 4px 0 2px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.3rem, 2.8vw, 2rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
}

/* Linha dourada abaixo do título */
.home-hero-gold-line {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--adm-gold), transparent);
  border-radius: 2px;
  margin: 6px 0 8px;
}

.home-hero-saudacao {
  margin: 0;
  font-size: 0.87rem;
  color: rgba(255,255,255,0.82);
}

.home-hero-quote {
  margin: 8px 0 0;
  border-left: 3px solid var(--adm-gold);
  padding-left: 12px;
  font-style: italic;
  font-size: 0.80rem;
  color: rgba(255,255,255,0.60);
}
.home-hero-quote cite {
  font-style: normal;
  font-weight: 600;
}

/* Coluna direita — padroeiro */
.home-hero-image {
  width: clamp(160px, 26%, 280px);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.home-hero-santo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

@media (max-width: 600px) {
  .home-hero-image { display: none; }
  .home-hero-text  { padding: 24px 20px; }
}

/* ── STAT CARDS — grade independente abaixo do hero ── */
.home-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

@media (min-width: 768px) {
  .home-stats-grid { grid-template-columns: repeat(4, 1fr); }
}

.home-stat-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 18px;
  background: var(--adm-card);
  border-radius: var(--adm-radius);
  border: 1px solid var(--adm-border);
  box-shadow: var(--adm-shadow);
  transition: box-shadow 0.18s, transform 0.18s;
}
.home-stat-card:hover {
  box-shadow: var(--adm-shadow-hover);
  transform: translateY(-2px);
}

.stat-icone {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.stat-icone-azul   { background: #dbeafe; color: #1d4ed8; }
.stat-icone-laranja{ background: #fef3c7; color: #d97706; }
.stat-icone-verde  { background: #dcfce7; color: #16a34a; }
.stat-icone-roxo   { background: #f3e8ff; color: #9333ea; }

.stat-numero {
  font-size: clamp(1.8rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--adm-text);
  line-height: 1;
  display: block;
}
.stat-descricao {
  font-size: 0.78rem;
  color: var(--adm-muted);
  line-height: 1.3;
}
.stat-link {
  font-size: 0.72rem;
  color: var(--adm-sidebar-bg);
  text-decoration: none;
  font-weight: 600;
  margin-top: 2px;
  display: inline-block;
}
.stat-link:hover { text-decoration: underline; }

/* ── ACESSOS RÁPIDOS ── */
.home-section-titulo {
  font-size: 1rem;
  font-weight: 600;
  color: var(--adm-text);
  margin: 0 0 14px;
}

.home-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}

@media (min-width: 900px) {
  .home-quick-grid { grid-template-columns: repeat(4, 1fr); }
}

.home-quick-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  background: var(--adm-card);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  cursor: pointer;
  text-align: left;
  font-family: 'Inter', system-ui, sans-serif;
  box-shadow: var(--adm-shadow);
  transition: box-shadow 0.18s, transform 0.18s;
}
.home-quick-card:hover {
  box-shadow: var(--adm-shadow-hover);
  transform: translateY(-2px);
}

.hqc-icone {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hqc-azul   { background: #dbeafe; color: #2563eb; }
.hqc-verde  { background: #dcfce7; color: #16a34a; }
.hqc-laranja{ background: #fef3c7; color: #d97706; }
.hqc-roxo   { background: #f3e8ff; color: #9333ea; }
.hqc-amarelo{ background: #fef9c3; color: #ca8a04; }
.hqc-rosa   { background: #fce7f3; color: #db2777; }
.hqc-cinza  { background: #f1f5f9; color: #64748b; }

.hqc-info { flex: 1; }
.hqc-info strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--adm-text);
  margin-bottom: 4px;
}
.hqc-info p {
  margin: 0;
  font-size: 0.76rem;
  color: var(--adm-muted);
  line-height: 1.4;
}
.hqc-arrow {
  align-self: flex-end;
  color: var(--adm-muted);
  transition: transform 0.15s, color 0.15s;
}
.home-quick-card:hover .hqc-arrow {
  transform: translateX(3px);
  color: var(--adm-sidebar-bg);
}

/* ── RODAPÉ DA HOME ── */
.home-rodape {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 18px 0 8px;
  border-top: 1px solid var(--adm-border);
}
.home-rodape-versiculo {
  font-size: 0.78rem;
  color: var(--adm-muted);
  font-style: italic;
}
.home-rodape-copy {
  font-size: 0.74rem;
  color: var(--adm-muted);
}

/* ── RESPONSIVIDADE MOBILE ── */
@media (max-width: 768px) {
  /* Esconder sidebar, mostrar hamburger e bottom nav */
  .admin-sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }
  .admin-sidebar.aberta {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.25);
  }
  .admin-topbar {
    left: 0;
  }
  .topbar-hamburger { display: flex; }
  .topbar-usuario-info { display: none; }
  #conteudo {
    margin-left: 0;
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }
  .admin-bottom-nav { display: flex; }

  /* Hero: empilhar — mostrar só coluna de texto e brasão em mobile */
  .home-hero-card {
    grid-template-columns: 1fr auto;
  }
  .home-hero-imagem { display: none; }   /* imagem do padroeiro some em mobile */
  .home-hero-info { padding: 20px 18px; }
  .home-hero-brasao { width: 80px; padding: 16px 12px; }

  /* Stats: 2 colunas */
  .home-stats-grid { grid-template-columns: 1fr 1fr; }

  /* Quick grid */
  .home-quick-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .home-quick-card { padding: 14px; }
  .hqc-icone { width: 40px; height: 40px; border-radius: 10px; }

  /* Ocultar info do usuário no topbar (evitar overflow) */
  .topbar-chevron { display: none; }

  /* Scroll area */
  .home-scroll-area { padding: 16px 12px; }
}

@media (max-width: 480px) {
  .home-quick-grid { grid-template-columns: 1fr; }
  .home-stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ── CABEÇALHO DE TELA PADRÃO (page-header) ── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-header-titulo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 700;
  color: var(--adm-text);
  margin: 0 0 4px;
}
.page-header-subtitulo {
  font-size: 0.83rem;
  color: var(--adm-muted);
  margin: 0;
}

/* ── CONFIG CARD — componente reutilizável ── */
.config-card {
  background: var(--adm-card);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  box-shadow: var(--adm-shadow);
  padding: 20px 22px;
}
.config-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.config-card-header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--adm-text);
}
.config-card-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.config-icon-azul   { background: #dbeafe; color: #2563eb; }
.config-icon-verde  { background: #dcfce7; color: #16a34a; }
.config-icon-laranja{ background: #fef3c7; color: #d97706; }
.config-icon-roxo   { background: #f3e8ff; color: #9333ea; }
.config-card-desc {
  font-size: 0.80rem;
  color: var(--adm-muted);
  line-height: 1.5;
  margin: 0 0 14px;
}
.config-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* config-card-btn: variação clicável com ícone + texto + seta
   Convertido de div[role=button] para <button> nativo (P2-03 auditoria) */
button.config-card-btn {
  background: var(--adm-card);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  box-shadow: var(--adm-shadow);
  width: 100%;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}
.config-card-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  cursor: pointer;
  transition: box-shadow 0.18s, transform 0.15s;
  text-align: left;
}
.config-card-btn:hover, .config-card-btn:focus-visible {
  box-shadow: var(--adm-shadow-hover);
  transform: translateY(-2px);
  outline: none;
}
.config-card-btn .config-card-icone {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.config-card-btn .config-card-conteudo { flex: 1; min-width: 0; }
.config-card-btn .config-card-titulo {
  display: block;
  font-size: 0.90rem;
  font-weight: 600;
  color: var(--adm-text);
  margin-bottom: 2px;
}
.config-card-btn .config-card-desc {
  margin: 0;
  font-size: 0.78rem;
}
.config-card-arrow { color: var(--adm-muted); flex-shrink: 0; }

/* Rótulo de grupo entre seções de config */
.config-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--adm-muted);
  margin: 0 0 10px;
}

/* page-header-sub: subtítulo menor no page-header */
.page-header-sub {
  font-size: 0.82rem;
  color: var(--adm-muted);
  margin: 2px 0 0;
}

/* Grid para cards de configuração/comunicação */
.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

/* ── PERFIL ── */
.perfil-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 600px) {
  .perfil-layout { grid-template-columns: 1fr; }
}
.perfil-avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.perfil-avatar-grande {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--adm-sidebar-bg);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  border: 3px solid var(--adm-gold);
  letter-spacing: 0.05em;
}
.perfil-cargo-label {
  font-size: 0.78rem;
  color: var(--adm-muted);
  margin: 0;
}
.perfil-info-col { min-width: 0; }
.perfil-campo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--adm-border);
  gap: 12px;
}
.perfil-campo:last-of-type { border-bottom: none; }
.perfil-campo-label {
  font-size: 0.78rem;
  color: var(--adm-muted);
  white-space: nowrap;
}
.perfil-campo-valor {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--adm-text);
  text-align: right;
}

/* ── PREFERÊNCIAS — toggle switch ── */
.pref-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.83rem;
  color: var(--adm-text);
  padding: 6px 0;
}
.pref-toggle-switch {
  position: relative;
  display: inline-flex;
  width: 42px; height: 24px;
  cursor: pointer;
  flex-shrink: 0;
}
.pref-toggle-switch input { opacity: 0; width: 0; height: 0; }
.pref-toggle-knob {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 24px;
  transition: background 0.2s;
}
.pref-toggle-knob::after {
  content: "";
  position: absolute;
  left: 3px; top: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.pref-toggle-switch input:checked + .pref-toggle-knob { background: var(--adm-sidebar-bg); }
.pref-toggle-switch input:checked + .pref-toggle-knob::after { transform: translateX(18px); }

/* Overlay de fundo quando sidebar mobile está aberta */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 209;
}
.sidebar-overlay.visivel { display: block; }

/* ── Ocultar cabecalho institucional na tela do admin (só aparece na impressão) ── */
#tela-relatorios .home-cabecalho-institucional,
#tela-configuracoes .home-cabecalho-institucional {
  display: none;
}
@media print {
  #tela-relatorios .home-cabecalho-institucional { display: flex !important; }
}

/* ── FIX: tela-solicitacoes está fora de #conteudo — aplicar offsets manualmente ── */
#tela-solicitacoes {
  margin-left: var(--adm-sidebar-w);
  padding-top: var(--adm-topbar-h);
  min-height: 100vh;
  background: var(--adm-bg);
  box-sizing: border-box;
}
.admin-sidebar.recolhida ~ #tela-solicitacoes { margin-left: var(--adm-sidebar-collapsed); }
@media (max-width: 768px) {
  #tela-solicitacoes {
    margin-left: 0;
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }
}

/* V4 visual movido para v4.css (carregado após este arquivo no index.html) */

/* ══════════════════════════════════════════════════════════════
   MÓDULO FLUXO DE CAIXA — estilos (adicionado 22/08/2026)
   ══════════════════════════════════════════════════════════════ */

/* Cards de resumo (creditos, debitos, saldo, acumulado, meta) */
#fc-cards {
  grid-template-columns: repeat(5, 1fr);
}
@media (max-width: 1024px) { #fc-cards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { #fc-cards { grid-template-columns: repeat(2, 1fr); } }

#fc-cards .card-stat {
  flex-direction: column;
}
.card-stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--adm-muted, #6b7280);
  margin-bottom: 6px;
}
.card-stat-valor {
  font-size: 22px;
  font-weight: 700;
  color: var(--adm-text, #111827);
  line-height: 1.1;
}
#fc-card-creditos .card-stat-valor { color: #15803d; }
#fc-card-debitos  .card-stat-valor { color: #c62828; }
#fc-card-saldo    .card-stat-valor.negativo { color: #c62828; }
#fc-card-saldo    .card-stat-valor.positivo { color: #15803d; }

/* Badge tipo lançamento na tabela */
.fc-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.fc-badge-credito { background: #dcfce7; color: #166534; }
.fc-badge-debito  { background: #fee2e2; color: #991b1b; }

/* Botão de ação na tabela */
.fc-btn-acao {
  background: none;
  border: 1px solid var(--adm-border, #e5e7eb);
  border-radius: 4px;
  padding: 3px 8px;
  cursor: pointer;
  font-size: 12px;
  color: var(--adm-text, #374151);
  margin-right: 4px;
  transition: background 0.15s;
}
.fc-btn-acao:hover { background: var(--adm-hover, #f3f4f6); }
.fc-btn-acao.danger { color: #c62828; border-color: #fca5a5; }
.fc-btn-acao.danger:hover { background: #fee2e2; }

/* ── Gerenciar Categorias — badges e menu ── */

/* Badge "Padrão" discreta */
.cat-badge-padrao {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .03em;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  padding: 1px 6px;
  border-radius: 20px;
  vertical-align: middle;
  margin-left: 5px;
}

/* Badges de status */
.cat-status {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}
.cat-status-ativa  { color: #15803d; background: #dcfce7; }
.cat-status-inativa { color: #9ca3af; background: #f3f4f6; }

/* Hover nas linhas da tabela de categorias */
#fc-cat-tbody tr:hover { background: #f8fafc; }

/* Botão ⋮ */
.cat-menu-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: #6b7280;
  padding: 2px 8px;
  transition: background 0.15s, border-color 0.15s;
}
.cat-menu-btn:hover { background: #f3f4f6; border-color: #e5e7eb; color: #374151; }

/* Menu flutuante (context menu) */
.cat-dropdown {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  min-width: 188px;
  z-index: 9999;
  padding: 4px 0;
  overflow: hidden;
}
.cat-dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 9px 16px;
  font-size: 13.5px;
  color: #111827;
  cursor: pointer;
  transition: background 0.12s;
}
.cat-dropdown-item:hover { background: #f3f4f6; }
.cat-dropdown-danger { color: #b91c1c; }
.cat-dropdown-danger:hover { background: #fee2e2; }
.cat-dropdown-sep {
  border: none;
  border-top: 1px solid #f0f0f0;
  margin: 4px 0;
}
.cat-dropdown-info {
  font-size: 12px;
  color: #9ca3af;
  padding: 8px 16px;
  margin: 0;
  font-style: italic;
  line-height: 1.4;
}

/* Linha zebrada para a tabela de lançamentos */
#fc-tabela tbody tr:nth-child(even) {
  background: var(--adm-table-stripe, #f8fafc);
}
#fc-tabela tbody tr:hover { background: #eef7ff; }

/* Células da tabela FC */
#fc-tabela td {
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Tipo (2ª col): centralizar badge */
#fc-tabela td:nth-child(2) { text-align: center; }
/* Coluna de Anexos/Ações: não truncar, centralizar */
#fc-tabela td:nth-child(7),
#fc-tabela td:last-child {
  overflow: visible;
  white-space: normal;
  text-align: center;
}

/* Badge de total: oculto quando vazio */
#fc-total-label:empty { display: none; }

/* ── Modal Novo Lançamento — estilos de UX ── */

/* Grupo de competência */
.fc-comp-grupo {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px 14px;
  background: #f9fafb;
}
.fc-comp-titulo {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.fc-comp-titulo small {
  font-weight: 400;
  font-size: 11px;
  color: #9ca3af;
  text-transform: none;
  letter-spacing: 0;
  margin-left: 4px;
}
.fc-sublabel {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #6b7280 !important;
}

/* Drop zone de upload */
.fc-upload-zona {
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  padding: 18px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  color: #6b7280;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  user-select: none;
}
.fc-upload-zona:hover,
.fc-upload-zona.fc-dragover {
  border-color: #3b82f6;
  background: #eff6ff;
  color: #1d4ed8;
}
.fc-upload-zona svg {
  color: #9ca3af;
  transition: color 0.2s;
  margin-bottom: 4px;
}
.fc-upload-zona:hover svg,
.fc-upload-zona.fc-dragover svg { color: #3b82f6; }
.fc-upload-zona small {
  color: #9ca3af;
  font-size: 11px;
}
.fc-upload-zona:focus { outline: 2px solid #3b82f6; outline-offset: 2px; }

/* Botão remover chip de novo anexo */
.fc-chip-remover {
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  font-size: 13px;
  padding: 1px 4px;
  border-radius: 3px;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}
.fc-chip-remover:hover { color: #c62828; background: #fee2e2; }

/* Responsividade do modal no mobile */
@media (max-width: 500px) {
  #modal-fluxo .modal-caixa { max-height: 96vh; }
  #modal-fluxo [style*="grid-template-columns:2fr 3fr"] {
    grid-template-columns: 1fr !important;
  }
  .fc-comp-grupo [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* Chip de anexo */
.fc-chip-anexo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 11px;
  color: #1d4ed8;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  margin-right: 4px;
  margin-bottom: 2px;
}
.fc-chip-anexo:hover { background: #dbeafe; }
.fc-chip-excluir {
  background: none; border: none; color: #c62828;
  cursor: pointer; font-size: 13px; padding: 0; line-height: 1;
}

/* Tela do fluxo: layout idêntico às outras telas */
#tela-fluxo-caixa {
  margin-left: var(--adm-sidebar-w);
  padding: var(--adm-topbar-h) 0 0;
  min-height: 100vh;
  background: var(--adm-bg);
  box-sizing: border-box;
}
.admin-sidebar.recolhida ~ #tela-fluxo-caixa { margin-left: var(--adm-sidebar-collapsed); }
@media (max-width: 768px) {
  #tela-fluxo-caixa {
    margin-left: 0;
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }
}

