/* ============================================================
   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-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;
}

.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-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-inline {
  display: block; margin-top: 4px; padding: 6px 8px;
  background: #fff8e1; border-left: 3px solid #d4a017;
  color: #6d5208; font-size: 12px; border-radius: 2px;
}

.campo-busca-wrap { margin-bottom: 12px; }
#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; }

.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=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: 1000; 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; }

/* ── 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; }

.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; }
}

/* ============================================================
   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-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;
}
.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)
   ============================================================ */
.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; }

.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;
}
.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: 80px;
  width: 80px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--secondary);
}

.login-img-brasao {
  height: 80px;
  width: auto;
  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;
}

/* 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;
}
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: 80px;
  object-fit: contain;
  border-radius: 50%;
  border: 3px solid var(--secondary);
}

.login-img-brasao {
  height: 80px;
  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;
}
