/* ==========================================================================
   CHURCH PLATFORM — CLASSICAL CHURCH HERITAGE DESIGN SYSTEM
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Merriweather:ital,wght@0,400;0,700;1,400&family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Source+Sans+3:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  /* Tipografia Institucional Clássica */
  --font-heading: 'Merriweather', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', 'Source Sans 3', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Merriweather', Georgia, serif;

  /* Paleta Eclesiástica Solene (Deep Eclesiastic Navy & Gold Accent) */
  --cor-primaria: #1e3a5f;
  --cor-primaria-hover: #142842;
  --cor-primaria-clara: #2b5282;
  --cor-primaria-suave: #f0f4f8;
  --cor-primaria-borda: #cbd5e1;
  --cor-foco-anel: rgba(30, 58, 95, 0.25);

  /* Destaque Ouro Velho / Madeira Nobre */
  --cor-destaque: #8b5e34;
  --cor-destaque-hover: #704824;
  --cor-destaque-suave: #fdf8f3;
  --cor-destaque-borda: #e8d7c5;

  /* Neutros Sóbrios (Parchment & Paper Heritage) */
  --cinza-bg: #f8f9fa;
  --cinza-bg-subtil: #f1f5f9;
  --cinza-card: #ffffff;
  --cinza-borda: #d1d5db;
  --cinza-borda-forte: #9ca3af;
  --texto: #111827;
  --texto-suave: #374151;
  --texto-mutado: #4b5563;
  --branco: #ffffff;
  --cor-borda: var(--cinza-borda);
  --cinza-fundo: var(--cinza-bg-subtil);
  --texto-destaque: var(--texto);

  /* Estados Semânticos Clássicos */
  --sucesso: #15803d;
  --sucesso-bg: #f0fdf4;
  --sucesso-borda: #bbf7d0;
  --sucesso-texto: #15803d;

  --erro: #b91c1c;
  --erro-bg: #fef2f2;
  --erro-borda: #fecaca;
  --erro-texto: #991b1b;

  --aviso: #b45309;
  --aviso-bg: #fffbeb;
  --aviso-borda: #fde68a;
  --aviso-texto: #92400e;

  --info: #0369a1;
  --info-bg: #f0f9ff;
  --info-borda: #bae6fd;
  --info-texto: #075985;

  /* Elevação & Sombras Sutis estilo Papel Formal */
  --shadow-xs: 0 1px 2px 0 rgba(17, 24, 39, 0.04);
  --shadow-sm: 0 1px 3px 0 rgba(17, 24, 39, 0.06), 0 1px 2px -1px rgba(17, 24, 39, 0.04);
  --shadow-md: 0 3px 6px -1px rgba(17, 24, 39, 0.07), 0 2px 4px -2px rgba(17, 24, 39, 0.05);
  --shadow-lg: 0 8px 14px -3px rgba(17, 24, 39, 0.08), 0 4px 6px -4px rgba(17, 24, 39, 0.04);
  --shadow-xl: 0 16px 24px -5px rgba(17, 24, 39, 0.1), 0 8px 10px -6px rgba(17, 24, 39, 0.05);

  /* Raios de Arredondamento Contidos e Formais */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-pill: 9999px;

  /* Tabela de Relatórios e Registros (Cabeçalhos Destacados com Cor Viva) */
  --crm-th-bg: #1e3a8a;
  --crm-th-text: #ffffff;
  --crm-th-border-bottom: #172554;
  --crm-th-divider: rgba(255, 255, 255, 0.15);
  --crm-tr-even: #f8fafc;
  --crm-tr-hover: #eff6ff;
  --crm-tr-hover-border: #bfdbfe;
  --crm-table-border: #cbd5e1;
}

/* ==========================================================================
   TEMA ESCURO (DARK MODE DESIGN SYSTEM)
   ========================================================================== */
[data-tema="dark"],
body.tema-dark {
  /* Paleta Dark Theme Eclesiástica */
  --cor-primaria: #4a7bb0;
  --cor-primaria-hover: #6c97c8;
  --cor-primaria-clara: #6c97c8;
  --cor-primaria-suave: rgba(74, 123, 176, 0.15);
  --cor-primaria-borda: rgba(74, 123, 176, 0.35);
  --cor-foco-anel: rgba(74, 123, 176, 0.35);

  /* Neutros Dark */
  --cinza-bg: #0d1520;
  --cinza-bg-subtil: #131f2e;
  --cinza-card: #182638;
  --cinza-borda: #25384e;
  --cinza-borda-forte: #3b5370;
  --texto: #f8fafc;
  --texto-suave: #cbd5e1;
  --texto-mutado: #94a3b8;
  --branco: #182638;
  --cor-borda: var(--cinza-borda);
  --cinza-fundo: var(--cinza-bg-subtil);
  --texto-destaque: var(--texto);

  /* Estados Semânticos Dark */
  --sucesso: #4ade80;
  --sucesso-bg: rgba(34, 197, 94, 0.15);
  --sucesso-borda: rgba(34, 197, 94, 0.3);
  --sucesso-texto: #4ade80;

  --erro: #f87171;
  --erro-bg: rgba(239, 68, 68, 0.15);
  --erro-borda: rgba(239, 68, 68, 0.3);
  --erro-texto: #f87171;

  --aviso: #fbbf24;
  --aviso-bg: rgba(245, 158, 11, 0.15);
  --aviso-borda: rgba(245, 158, 11, 0.3);
  --aviso-texto: #fbbf24;

  --info: #38bdf8;
  --info-bg: rgba(14, 165, 233, 0.15);
  --info-borda: rgba(14, 165, 233, 0.3);
  --info-texto: #38bdf8;

  /* Sombras Dark */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.7), 0 8px 10px -6px rgba(0, 0, 0, 0.5);

  /* Tabela CRM Dark Mode */
  --crm-th-bg: #131f2e;
  --crm-th-text: #f8fafc;
  --crm-th-border-bottom: #25384e;
  --crm-th-divider: rgba(255, 255, 255, 0.08);
  --crm-tr-even: #0d1520;
  --crm-tr-hover: rgba(74, 123, 176, 0.15);
  --crm-tr-hover-border: rgba(74, 123, 176, 0.3);
  --crm-table-border: #25384e;
}

/* Transições suaves ao alternar tema */
body, .topo-painel, .card, .kpi-card, .widget-card, .atalho-card, .nav-modulos-topo, input, select, textarea {
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--cinza-bg);
  color: var(--texto);
  line-height: 1.5;
  font-size: 14px;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

a {
  color: var(--cor-primaria-clara);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--cor-primaria-hover);
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  color: var(--texto);
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

/* ==========================================================================
   SUPERFÍCIES & CONTAINERS
   ========================================================================== */
.container-central {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 20%, #ffffff 0%, #f0f4f8 100%);
  box-sizing: border-box;
}

.pagina-central-footer {
  text-align: center;
  font-size: 12px;
  color: var(--texto-mutado);
  margin-top: 20px;
  font-family: var(--font-sans);
  letter-spacing: 0.3px;
}

.card {
  background: var(--branco);
  border: 1px solid var(--cinza-borda);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-login {
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-md), 0 0 0 1px var(--cinza-borda);
  border-radius: var(--radius-lg);
  border-top: 4px solid var(--cor-primaria);
}

.card-login .logo-topo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 21px;
  color: var(--cor-primaria);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.card-login .logo-topo .ponto {
  color: var(--cor-destaque);
}

/* ==========================================================================
   FORMULÁRIOS & CONTROLES DE ENTRADA
   ========================================================================== */
label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--texto-suave);
  margin: 16px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

input, select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--cinza-borda);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  background: var(--branco);
  color: var(--texto);
  transition: all 0.2s ease;
  min-height: 42px;
}

input:hover, select:hover, textarea:hover {
  border-color: var(--cinza-borda-forte);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--cor-primaria-clara);
  box-shadow: 0 0 0 3px var(--cor-foco-anel);
}

input::placeholder, textarea::placeholder {
  color: var(--texto-mutado);
  opacity: 0.8;
}

input[type="radio"],
input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  flex-shrink: 0;
  cursor: pointer;
}

input[type="radio"]:focus,
input[type="checkbox"]:focus {
  box-shadow: none;
}

/* ==========================================================================
   BOTÕES & AÇÕES INTERATIVAS
   ========================================================================== */
button, .botao {
  cursor: pointer;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 42px;
}

button:active, .botao:active {
  transform: scale(0.98);
}

.botao-primario {
  background: var(--cor-primaria);
  color: var(--branco);
  border: 1px solid var(--cor-primaria-hover);
  box-shadow: var(--shadow-sm);
}

.botao-primario:hover {
  background: var(--cor-primaria-hover);
  box-shadow: var(--shadow-md);
}

.card-login .botao-primario,
#form-login .botao-primario,
#form-registro .botao-primario,
#form-recuperar-senha .botao-primario {
  width: 100%;
  margin-top: 20px;
}

.botao-secundario {
  background: #ffffff;
  color: var(--cor-primaria);
  border: 1px solid var(--cinza-borda-forte);
}

.botao-secundario:hover {
  background: var(--cinza-bg-subtil);
  border-color: var(--cor-primaria);
}

.botao-perigo {
  background: var(--erro-bg);
  color: var(--erro);
  border: 1px solid var(--erro-borda);
  padding: 6px 12px;
  font-size: 13px;
  min-height: 34px;
}

.botao-perigo:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

.link-alternar {
  text-align: center;
  margin-top: 18px;
  font-size: 14px;
  color: var(--texto-suave);
}

/* ==========================================================================
   MENSAGENS & FEEDBACK
   ========================================================================== */
.mensagem-erro {
  background: var(--erro-bg);
  color: var(--erro-texto);
  border: 1px solid var(--erro-borda);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mensagem-sucesso {
  background: var(--sucesso-bg);
  color: var(--sucesso-texto);
  border: 1px solid var(--sucesso-borda);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.oculto {
  display: none !important;
}

/* ==========================================================================
   SISTEMA DE TOAST NOTIFICATIONS (FEEDBACK FLUTUANTE)
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 90vw;
  width: 360px;
}

.toast-item {
  pointer-events: auto;
  background: var(--branco);
  color: var(--texto);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--cinza-borda);
  border-left: 4px solid var(--cor-primaria-clara);
  font-size: 13px;
  font-weight: 600;
  animation: toastSlideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.25s ease;
}

.toast-item.sucesso {
  border-left-color: var(--sucesso);
}

.toast-item.erro {
  border-left-color: var(--erro);
}

.toast-item.aviso {
  border-left-color: var(--aviso);
}

.toast-item.removendo {
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   TOPO DO PAINEL (CABEÇALHO CLÁSSICO INSTITUCIONAL & SOLENE)
   ========================================================================== */
.topo-painel {
  background: #0f2035;
  border-bottom: 2px solid var(--cor-destaque, #8b5e34);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 990;
  min-height: 60px;
  height: 60px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.topo-esquerda {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  height: 100%;
}

.logo-topo {
  font-family: var(--font-heading);
  font-size: 15.5px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
  margin: 0;
  padding: 0;
  line-height: 1;
}

.logo-topo .logo-topo-img {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm, 4px);
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
}

.logo-topo .logo-texto {
  font-family: var(--font-heading);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
}

.logo-topo-badge-edit {
  display: none !important;
}

.btn-hamburguer {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm, 4px);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  min-height: 36px;
}

.btn-hamburguer:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-hamburguer:active {
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.22);
}

.btn-hamburguer span {
  display: block;
  width: 16px;
  height: 2px;
  background: #ffffff;
  border-radius: 1px;
  transition: all 0.25s ease;
}

/* Navegação Clássica no Header Topo (Desktop) */
.nav-modulos-topo {
  display: flex;
  align-items: stretch;
  gap: 2px;
  background: transparent;
  padding: 0;
  border-radius: 0;
  border: none;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  max-width: 100%;
  height: 60px;
}

.nav-modulos-topo::-webkit-scrollbar {
  display: none;
}

.nav-modulos-topo .aba-btn {
  background: transparent;
  border: none;
  border-radius: 0;
  border-bottom: 3px solid transparent;
  padding: 0 14px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--font-sans);
  color: rgba(255, 255, 255, 0.72);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  transition: all 0.18s ease;
  cursor: pointer;
  white-space: nowrap;
  height: 60px;
  min-height: 60px;
}

.nav-modulos-topo .aba-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-modulos-topo .aba-btn.ativa {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 700;
  border-bottom: 3px solid #d4af37;
  box-shadow: none;
}

/* Oculta emojis coloridos despadronizados das abas */
.nav-modulos-topo .aba-icon {
  display: none !important;
}

.nav-modulos-topo .aba-label {
  font-size: 13.5px;
  letter-spacing: 0.01em;
}

.btn-tema-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm, 4px);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
  color: #ffffff;
  min-height: 36px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-tema-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.btn-tema-toggle:active {
  transform: scale(0.94);
}

.topo-acoes-direita {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.avatar-topo-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm, 4px);
  padding: 3px 10px 3px 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 36px;
}

.avatar-topo-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.avatar-topo-iniciais {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm, 4px);
  background: var(--cor-destaque, #8b5e34);
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.badge-topo-papel {
  font-size: 12.5px;
  font-weight: 600;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 4px;
}

@media (max-width: 768px) {
  .nav-modulos-topo {
    display: none;
  }
}

@media (min-width: 769px) and (max-width: 1180px) {
  .nav-modulos-topo {
    display: flex;
    overflow-x: auto;
    max-width: calc(100vw - 260px);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .nav-modulos-topo .aba-btn {
    padding: 5px 9px;
    font-size: 12px;
  }
}

/* ==========================================================================
   ESPECIFICIDADES DARK MODE PARA COMPONENTES
   ========================================================================== */
[data-tema="dark"] .container-central,
body.tema-dark .container-central {
  background: linear-gradient(135deg, #0b0f19 0%, #111827 100%);
}

[data-tema="dark"] .topo-painel,
body.tema-dark .topo-painel {
  background: #08101a;
  border-bottom: 2px solid var(--cor-destaque, #8b5e34);
}

[data-tema="dark"] .nav-modulos-topo,
body.tema-dark .nav-modulos-topo {
  background: transparent;
  border: none;
}

[data-tema="dark"] .nav-modulos-topo .aba-btn,
body.tema-dark .nav-modulos-topo .aba-btn {
  color: rgba(248, 250, 252, 0.72);
}

[data-tema="dark"] .nav-modulos-topo .aba-btn:hover,
body.tema-dark .nav-modulos-topo .aba-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

[data-tema="dark"] .nav-modulos-topo .aba-btn.ativa,
body.tema-dark .nav-modulos-topo .aba-btn.ativa {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-bottom: 3px solid #d4af37;
  box-shadow: none;
}

[data-tema="dark"] .pwa-install-banner,
body.tema-dark .pwa-install-banner {
  background: #0f2744;
  border-color: #1e4976;
}

[data-tema="dark"] .info-pwa strong,
body.tema-dark .info-pwa strong {
  color: #7dd3fc;
}

[data-tema="dark"] .card,
[data-tema="dark"] .kpi-card,
[data-tema="dark"] .widget-card,
[data-tema="dark"] .atalho-card,
[data-tema="dark"] .modal-conteudo,
[data-tema="dark"] .drawer-lateral,
[data-tema="dark"] .item-acordeon,
body.tema-dark .card,
body.tema-dark .kpi-card,
body.tema-dark .widget-card,
body.tema-dark .atalho-card,
body.tema-dark .modal-conteudo,
body.tema-dark .drawer-lateral,
body.tema-dark .item-acordeon {
  background: #151d2e;
  border-color: #1f293d;
  color: #f8fafc;
}

[data-tema="dark"] .item-aniversariante,
[data-tema="dark"] .item-reuniao-recente,
[data-tema="dark"] .widget-vazio,
body.tema-dark .item-aniversariante,
body.tema-dark .item-reuniao-recente,
body.tema-dark .widget-vazio {
  background: #111827;
  border-color: #1f293d;
}

[data-tema="dark"] .item-aniversariante:hover,
[data-tema="dark"] .item-reuniao-recente:hover,
[data-tema="dark"] .atalho-card:hover,
body.tema-dark .item-aniversariante:hover,
body.tema-dark .item-reuniao-recente:hover,
body.tema-dark .atalho-card:hover {
  background: #1a243a;
  border-color: #3b82f6;
}

[data-tema="dark"] .kpi-valor,
[data-tema="dark"] .widget-header-title h3,
[data-tema="dark"] .atalho-rotulo,
[data-tema="dark"] .item-aniv-info strong,
[data-tema="dark"] .item-reuniao-info strong,
body.tema-dark .kpi-valor,
body.tema-dark .widget-header-title h3,
body.tema-dark .atalho-rotulo,
body.tema-dark .item-aniv-info strong,
body.tema-dark .item-reuniao-info strong {
  color: #f8fafc;
}

[data-tema="dark"] .btn-widget-acao,
body.tema-dark .btn-widget-acao {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

[data-tema="dark"] .btn-widget-acao:hover,
body.tema-dark .btn-widget-acao:hover {
  background: #334155;
  color: #ffffff;
}

[data-tema="dark"] .btn-hamburguer,
[data-tema="dark"] .avatar-topo-btn,
[data-tema="dark"] .btn-tema-toggle,
body.tema-dark .btn-hamburguer,
body.tema-dark .avatar-topo-btn,
body.tema-dark .btn-tema-toggle {
  background: #111827;
  border-color: #1f293d;
  color: #f8fafc;
}

[data-tema="dark"] .btn-hamburguer span,
body.tema-dark .btn-hamburguer span {
  background: #f8fafc;
}

[data-tema="dark"] .drawer-header,
[data-tema="dark"] .drawer-footer,
[data-tema="dark"] .rodape-modal,
body.tema-dark .drawer-header,
body.tema-dark .drawer-footer,
body.tema-dark .rodape-modal {
  background: #111827;
  border-color: #1f293d;
}

/* Formulários, Inputs & Controles no Modo Escuro */
[data-tema="dark"] .painel-footer,
body.tema-dark .painel-footer,
[data-tema="dark"] .pagina-central-footer,
body.tema-dark .pagina-central-footer,
[data-tema="dark"] .drawer-copyright,
body.tema-dark .drawer-copyright {
  color: #64748b;
  border-top-color: #1f293d;
}

[data-tema="dark"] {
  color-scheme: dark;
}

[data-tema="dark"] input,
[data-tema="dark"] select,
[data-tema="dark"] textarea,
body.tema-dark input,
body.tema-dark select,
body.tema-dark textarea {
  background: #111827 !important;
  border-color: #1f293d !important;
  color: #f8fafc !important;
  color-scheme: dark;
}

[data-tema="dark"] input:hover,
[data-tema="dark"] select:hover,
[data-tema="dark"] textarea:hover,
body.tema-dark input:hover,
body.tema-dark select:hover,
body.tema-dark textarea:hover {
  border-color: #334155 !important;
  background: #131c2d !important;
}

[data-tema="dark"] input:focus,
[data-tema="dark"] select:focus,
[data-tema="dark"] textarea:focus,
body.tema-dark input:focus,
body.tema-dark select:focus,
body.tema-dark textarea:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
  background: #151d2e !important;
}

[data-tema="dark"] input::placeholder,
[data-tema="dark"] textarea::placeholder,
body.tema-dark input::placeholder,
body.tema-dark textarea::placeholder {
  color: #64748b !important;
  opacity: 0.9;
}

[data-tema="dark"] select option,
[data-tema="dark"] select optgroup,
body.tema-dark select option,
body.tema-dark select optgroup {
  background: #111827;
  color: #f8fafc;
}

[data-tema="dark"] label,
body.tema-dark label {
  color: #94a3b8;
}

[data-tema="dark"] label strong,
body.tema-dark label strong {
  color: #f8fafc;
}

[data-tema="dark"] input:disabled,
[data-tema="dark"] select:disabled,
[data-tema="dark"] textarea:disabled,
body.tema-dark input:disabled,
body.tema-dark select:disabled,
body.tema-dark textarea:disabled {
  background: #0b0f19 !important;
  border-color: #1e293b !important;
  color: #475569 !important;
  cursor: not-allowed;
}

[data-tema="dark"] input[type="file"],
body.tema-dark input[type="file"] {
  background: #111827 !important;
  border: 1px dashed #334155 !important;
  color: #cbd5e1 !important;
}

[data-tema="dark"] input[type="file"]::file-selector-button,
body.tema-dark input[type="file"]::file-selector-button {
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 6px 12px;
  margin-right: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

[data-tema="dark"] input[type="file"]::file-selector-button:hover,
body.tema-dark input[type="file"]::file-selector-button:hover {
  background: #334155;
}

[data-tema="dark"] input[type="checkbox"],
[data-tema="dark"] input[type="radio"],
body.tema-dark input[type="checkbox"],
body.tema-dark input[type="radio"] {
  accent-color: #3b82f6;
  cursor: pointer;
}

/* Modais no Modo Escuro */
[data-tema="dark"] .overlay-modal,
body.tema-dark .overlay-modal {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

[data-tema="dark"] .modal,
[data-tema="dark"] .modal-largo,
body.tema-dark .modal,
body.tema-dark .modal-largo {
  background: #151d2e;
  border: 1px solid #1f293d;
  color: #f8fafc;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

[data-tema="dark"] .modal h3,
[data-tema="dark"] .modal h4,
[data-tema="dark"] .modal h5,
body.tema-dark .modal h3,
body.tema-dark .modal h4,
body.tema-dark .modal h5 {
  color: #f8fafc;
}

[data-tema="dark"] .modal p,
[data-tema="dark"] .modal small,
body.tema-dark .modal p,
body.tema-dark .modal small {
  color: #94a3b8;
}

[data-tema="dark"] .modal .rodape-modal,
body.tema-dark .modal .rodape-modal {
  border-top: 1px solid #1f293d;
  background: transparent;
}

[data-tema="dark"] .botao-secundario,
body.tema-dark .botao-secundario {
  background: #1e293b;
  color: #cbd5e1;
  border-color: #334155;
}

[data-tema="dark"] .botao-secundario:hover,
body.tema-dark .botao-secundario:hover {
  background: #334155;
  border-color: #475569;
  color: #ffffff;
}

/* Sub-blocos, Caixas e Contêineres de Formulários */
[data-tema="dark"] .form-secao,
[data-tema="dark"] .bloco-secao,
[data-tema="dark"] .bloco-campos,
[data-tema="dark"] #caixa-nova-reuniao,
body.tema-dark .form-secao,
body.tema-dark .bloco-secao,
body.tema-dark .bloco-campos,
body.tema-dark #caixa-nova-reuniao {
  background: #111827 !important;
  border: 1px solid #1f293d !important;
  color: #f8fafc;
}

[data-tema="dark"] #container-chamada-celula,
[data-tema="dark"] #lista-chamada-membros,
[data-tema="dark"] #lista-presencas-alunos,
[data-tema="dark"] #lista-membros-grupo,
[data-tema="dark"] #lista-historico-reunioes,
[data-tema="dark"] .lista-scroll-chamada,
body.tema-dark #container-chamada-celula,
body.tema-dark #lista-chamada-membros,
body.tema-dark #lista-presencas-alunos,
body.tema-dark #lista-membros-grupo,
body.tema-dark #lista-historico-reunioes,
body.tema-dark .lista-scroll-chamada {
  background: #0f1523 !important;
  border-color: #1f293d !important;
  color: #f8fafc;
}

[data-tema="dark"] .rc-stat-box,
body.tema-dark .rc-stat-box {
  background: #111827 !important;
  border: 1px solid #1f293d !important;
}

[data-tema="dark"] .rc-stat-box-sucesso,
body.tema-dark .rc-stat-box-sucesso {
  background: rgba(34, 197, 94, 0.12) !important;
  border: 1px solid rgba(34, 197, 94, 0.3) !important;
}

[data-tema="dark"] #banner-relatorio-analitico,
body.tema-dark #banner-relatorio-analitico {
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}

[data-tema="dark"] #banner-relatorio-analitico h3,
body.tema-dark #banner-relatorio-analitico h3 {
  color: #fbbf24 !important;
}

[data-tema="dark"] #banner-relatorio-analitico span,
body.tema-dark #banner-relatorio-analitico span {
  color: #fde68a !important;
}

/* Chips de Funções / Chamados no Modo Escuro */
[data-tema="dark"] .chip-funcao,
body.tema-dark .chip-funcao {
  background: #151d2e;
  border-color: #1f293d;
  color: #94a3b8;
}

[data-tema="dark"] .chip-funcao:hover,
body.tema-dark .chip-funcao:hover {
  background: #1a243a;
  border-color: #334155;
  color: #f8fafc;
}

[data-tema="dark"] .chip-funcao.chip-ativo.chip-funcao-pastor,
body.tema-dark .chip-funcao.chip-ativo.chip-funcao-pastor {
  background: rgba(99, 102, 241, 0.22); color: #c7d2fe; border-color: #6366f1; box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.4);
}

[data-tema="dark"] .chip-funcao.chip-ativo.chip-funcao-lider,
body.tema-dark .chip-funcao.chip-ativo.chip-funcao-lider {
  background: rgba(34, 197, 94, 0.22); color: #86efac; border-color: #22c55e; box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.4);
}

[data-tema="dark"] .chip-funcao.chip-ativo.chip-funcao-anfitriao,
body.tema-dark .chip-funcao.chip-ativo.chip-funcao-anfitriao {
  background: rgba(245, 158, 11, 0.22); color: #fde68a; border-color: #f59e0b; box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.4);
}

[data-tema="dark"] .chip-funcao.chip-ativo.chip-funcao-professor,
body.tema-dark .chip-funcao.chip-ativo.chip-funcao-professor {
  background: rgba(14, 165, 233, 0.22); color: #7dd3fc; border-color: #0ea5e9; box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.4);
}

[data-tema="dark"] .chip-funcao.chip-ativo.chip-funcao-diacono,
body.tema-dark .chip-funcao.chip-ativo.chip-funcao-diacono {
  background: rgba(168, 85, 247, 0.22); color: #e9d5ff; border-color: #a855f7; box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.4);
}

[data-tema="dark"] .chip-funcao.chip-ativo.chip-funcao-louvor,
body.tema-dark .chip-funcao.chip-ativo.chip-funcao-louvor {
  background: rgba(236, 72, 153, 0.22); color: #fbcfe8; border-color: #ec4899; box-shadow: 0 0 0 1px rgba(236, 72, 153, 0.4);
}

[data-tema="dark"] .chip-funcao.chip-ativo.chip-funcao-voluntario,
body.tema-dark .chip-funcao.chip-ativo.chip-funcao-voluntario {
  background: rgba(20, 184, 166, 0.22); color: #99f6e4; border-color: #14b8a6; box-shadow: 0 0 0 1px rgba(20, 184, 166, 0.4);
}

[data-tema="dark"] .chip-funcao.chip-ativo.chip-funcao-membro,
body.tema-dark .chip-funcao.chip-ativo.chip-funcao-membro {
  background: rgba(59, 130, 246, 0.22); color: #bfdbfe; border-color: #3b82f6; box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.4);
}

[data-tema="dark"] .chip-funcao.chip-ativo.chip-funcao-default,
body.tema-dark .chip-funcao.chip-ativo.chip-funcao-default {
  background: rgba(59, 130, 246, 0.22); color: #bfdbfe; border-color: #3b82f6; box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.4);
}

/* Tags dinâmicas adaptadas para o Dark Mode */
[data-tema="dark"] .tag,
body.tema-dark .tag {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-tema="dark"] .tag[style*="background:#e0f2fe"],
[data-tema="dark"] .tag[style*="background: #e0f2fe"],
[data-tema="dark"] .tag[style*="background:#eff6ff"],
body.tema-dark .tag[style*="background:#e0f2fe"],
body.tema-dark .tag[style*="background: #e0f2fe"],
body.tema-dark .tag[style*="background:#eff6ff"] {
  background: rgba(14, 165, 233, 0.2) !important;
  color: #38bdf8 !important;
  border-color: rgba(14, 165, 233, 0.4) !important;
}

[data-tema="dark"] .tag[style*="background:#fef3c7"],
[data-tema="dark"] .tag[style*="background: #fef3c7"],
[data-tema="dark"] .tag[style*="background:#fffbeb"],
body.tema-dark .tag[style*="background:#fef3c7"],
body.tema-dark .tag[style*="background: #fef3c7"],
body.tema-dark .tag[style*="background:#fffbeb"] {
  background: rgba(245, 158, 11, 0.2) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
}

[data-tema="dark"] .tag[style*="background:#f0fdf4"],
[data-tema="dark"] .tag[style*="background: #f0fdf4"],
[data-tema="dark"] .tag[style*="background:#dcfce7"],
body.tema-dark .tag[style*="background:#f0fdf4"],
body.tema-dark .tag[style*="background: #f0fdf4"],
body.tema-dark .tag[style*="background:#dcfce7"] {
  background: rgba(34, 197, 94, 0.2) !important;
  color: #4ade80 !important;
  border-color: rgba(34, 197, 94, 0.4) !important;
}

[data-tema="dark"] .tag[style*="background:#f1f5f9"],
[data-tema="dark"] .tag[style*="background: #f1f5f9"],
[data-tema="dark"] .tag[style*="background:#e2e8f0"],
body.tema-dark .tag[style*="background:#f1f5f9"],
body.tema-dark .tag[style*="background: #f1f5f9"],
body.tema-dark .tag[style*="background:#e2e8f0"] {
  background: #1e293b !important;
  color: #94a3b8 !important;
  border-color: #334155 !important;
}

[data-tema="dark"] .tag[style*="background:#faf5ff"],
[data-tema="dark"] .tag[style*="background: #faf5ff"],
[data-tema="dark"] .tag[style*="background:#f3e8ff"],
body.tema-dark .tag[style*="background:#faf5ff"],
body.tema-dark .tag[style*="background: #faf5ff"],
body.tema-dark .tag[style*="background:#f3e8ff"] {
  background: rgba(168, 85, 247, 0.2) !important;
  color: #c084fc !important;
  border-color: rgba(168, 85, 247, 0.4) !important;
}

[data-tema="dark"] table td,
body.tema-dark table td {
  border-color: #1f293d;
  color: #f8fafc;
}

[data-tema="dark"] table tr:hover td,
body.tema-dark table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

[data-tema="dark"] .mobile-bottom-nav,
body.tema-dark .mobile-bottom-nav {
  background: rgba(11, 15, 25, 0.92);
  border-top-color: #1f293d;
}

[data-tema="dark"] .mobile-nav-item,
body.tema-dark .mobile-nav-item {
  color: #94a3b8;
}

[data-tema="dark"] .mobile-nav-item.ativa,
body.tema-dark .mobile-nav-item.ativa {
  color: #60a5fa;
}

[data-tema="dark"] .item-acordeon-grupo,
[data-tema="dark"] .item-acordeon-pessoa,
body.tema-dark .item-acordeon-grupo,
body.tema-dark .item-acordeon-pessoa {
  background: #151d2e;
  border-color: #1f293d;
  color: #f8fafc;
}

[data-tema="dark"] .topo-acordeon-grupo,
[data-tema="dark"] .topo-acordeon-pessoa,
body.tema-dark .topo-acordeon-grupo,
body.tema-dark .topo-acordeon-pessoa {
  background: #151d2e;
  color: #f8fafc;
}

[data-tema="dark"] .topo-acordeon-grupo:hover,
[data-tema="dark"] .topo-acordeon-pessoa:hover,
body.tema-dark .topo-acordeon-grupo:hover,
body.tema-dark .topo-acordeon-pessoa:hover {
  background: #1a243a;
}

[data-tema="dark"] .corpo-acordeon-grupo,
[data-tema="dark"] .corpo-acordeon-pessoa,
body.tema-dark .corpo-acordeon-grupo,
body.tema-dark .corpo-acordeon-pessoa {
  background: #0d1322 !important;
  border-top: 1px solid #1f293d !important;
}

[data-tema="dark"] .detalhes-grid-grupo,
[data-tema="dark"] .detalhes-grid-pessoa,
body.tema-dark .detalhes-grid-grupo,
body.tema-dark .detalhes-grid-pessoa {
  background: #151d2e !important;
  border: 1px solid #1f293d !important;
}

[data-tema="dark"] .detalhe-item .rotulo,
body.tema-dark .detalhe-item .rotulo {
  color: #94a3b8 !important;
}

[data-tema="dark"] .detalhe-item .valor,
body.tema-dark .detalhe-item .valor {
  color: #f8fafc !important;
}

[data-tema="dark"] .btn-contato-rapido,
body.tema-dark .btn-contato-rapido {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
}

[data-tema="dark"] .btn-contato-rapido.whatsapp,
body.tema-dark .btn-contato-rapido.whatsapp {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.35);
}

[data-tema="dark"] .btn-contato-rapido.telefone,
body.tema-dark .btn-contato-rapido.telefone {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.35);
}

[data-tema="dark"] .seta-acordeon,
body.tema-dark .seta-acordeon {
  background: #1e293b;
  color: #94a3b8;
}

[data-tema="dark"] .item-acordeon-grupo.aberto .seta-acordeon,
[data-tema="dark"] .item-acordeon-pessoa.aberto .seta-acordeon,
body.tema-dark .item-acordeon-grupo.aberto .seta-acordeon,
body.tema-dark .item-acordeon-pessoa.aberto .seta-acordeon {
  background: rgba(59, 130, 246, 0.25);
  color: #60a5fa;
}

[data-tema="dark"] .botao-perigo,
body.tema-dark .botao-perigo {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

[data-tema="dark"] .botao-perigo:hover,
body.tema-dark .botao-perigo:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

[data-tema="dark"] .kpi-icon-blue { background: rgba(37, 99, 235, 0.2); color: #60a5fa; }
[data-tema="dark"] .kpi-icon-green { background: rgba(22, 163, 74, 0.2); color: #4ade80; }
[data-tema="dark"] .kpi-icon-purple { background: rgba(147, 51, 234, 0.2); color: #c084fc; }
[data-tema="dark"] .kpi-icon-amber { background: rgba(217, 119, 6, 0.2); color: #fbbf24; }

[data-tema="dark"] .atalho-icon {
  background: rgba(59, 130, 246, 0.15);
}

.avatar-topo-btn:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.avatar-topo-btn:active {
  transform: scale(0.96);
}

.avatar-topo-iniciais {
  width: 28px !important;
  height: 28px !important;
  border-radius: var(--radius-sm, 4px) !important;
  background: var(--cor-destaque, #8b5e34) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
  flex-shrink: 0;
}

.badge-topo-papel {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.badge-topo-papel span:first-child {
  color: #ffffff !important;
  font-weight: 700 !important;
}

.badge-topo-papel span:last-child {
  color: #fde68a !important;
  opacity: 0.9 !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
}

/* ==========================================================================
   DRAWER LATERAL (MENU LATERAL DESLIZANTE)
   ========================================================================== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-overlay.aberto {
  opacity: 1;
  pointer-events: auto;
}

.drawer-lateral {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 320px;
  max-width: 86vw;
  background: var(--branco);
  z-index: 1060;
  box-shadow: 8px 0 32px rgba(15, 23, 42, 0.16);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.drawer-lateral.aberto {
  transform: translateX(0);
}

.drawer-header {
  padding: max(18px, env(safe-area-inset-top)) 18px 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--cinza-borda);
  background: var(--cinza-bg);
}

.drawer-igreja-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-avatar-igreja-wrapper {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.drawer-avatar-igreja {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md, 6px);
  overflow: hidden;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
  border: 1.5px solid var(--cinza-borda, rgba(255, 255, 255, 0.15));
  transition: all 0.2s ease;
  position: relative;
}

.drawer-avatar-igreja-wrapper:hover .drawer-avatar-igreja {
  border-color: var(--cor-primaria);
  transform: scale(1.02);
}

.drawer-avatar-igreja .drawer-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.btn-avatar-edit-logo {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  max-width: 22px !important;
  min-height: 22px !important;
  max-height: 22px !important;
  border-radius: 50% !important;
  background: var(--cor-primaria, #1e3a5f);
  color: #ffffff;
  border: 2px solid var(--cinza-card, #ffffff);
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, background 0.2s ease;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box;
  z-index: 2;
}

.btn-avatar-edit-logo:hover {
  transform: scale(1.15);
  background: var(--cor-primaria-hover, #142842);
}

.btn-link-alterar-logo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--cor-destaque, #8b5e34);
  background: transparent;
  border: none;
  padding: 3px 0 0 0 !important;
  margin: 0 !important;
  min-height: auto !important;
  cursor: pointer;
  font-weight: 700;
  transition: opacity 0.2s;
  text-decoration: underline;
}

.btn-link-alterar-logo:hover {
  opacity: 0.8;
}

.logo-topo.admin-clickable {
  cursor: pointer;
  position: relative;
  transition: transform 0.15s ease;
}

.logo-topo.admin-clickable:hover {
  transform: translateY(-1px);
}

.logo-topo-badge-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  background: rgba(30, 58, 138, 0.15);
  color: var(--cor-primaria);
  border: 1px solid var(--cor-primaria-borda, rgba(30, 58, 138, 0.3));
  border-radius: 6px;
  padding: 1px 6px;
  margin-left: 6px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.drawer-nome-igreja {
  font-size: 15px;
  font-weight: 700;
  color: var(--texto);
  display: block;
}

.drawer-subtitulo {
  font-size: 11px;
  color: var(--texto-mutado);
  font-weight: 500;
}

.btn-fechar-drawer {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--cinza-borda);
  background: var(--branco);
  color: var(--texto-suave);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  touch-action: manipulation;
  min-height: 36px;
}

.btn-fechar-drawer:hover {
  background: var(--cinza-bg-subtil);
  color: var(--texto);
}

.drawer-perfil-card {
  margin: 14px 16px;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--cor-primaria-suave), #f8fafc);
  border: 1px solid var(--cor-primaria-borda);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.drawer-perfil-card:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

[data-tema="dark"] .drawer-perfil-card {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), var(--cinza-card));
  border-color: rgba(255, 255, 255, 0.1);
}

[data-tema="dark"] .drawer-perfil-card:hover {
  filter: brightness(1.15);
}

.drawer-perfil-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--cor-primaria-clara);
  color: var(--branco);
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

.drawer-user-nome {
  font-size: 14px;
  font-weight: 700;
  color: var(--texto);
  display: block;
}

.drawer-user-papel {
  font-size: 12px;
  color: var(--cor-primaria-clara);
  font-weight: 600;
}

.drawer-secao-titulo {
  padding: 10px 18px 4px 18px;
  font-size: 11px;
  font-weight: 700;
  color: var(--texto-mutado);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 0 10px;
  gap: 4px;
  flex: 1;
}

.drawer-nav-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--texto-suave);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.15s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
  box-sizing: border-box;
}

.drawer-nav-item.oculto {
  display: none !important;
}

.drawer-nav-item:hover {
  background: var(--cinza-bg-subtil);
  color: var(--texto);
}

.drawer-nav-item.ativa {
  background: var(--cor-primaria-suave);
  color: var(--cor-primaria-clara);
  font-weight: 700;
}

.drawer-nav-item .drawer-icon,
.drawer-nav-item .icone-tema {
  font-size: 18px;
  width: 24px;
  min-width: 24px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#btn-drawer-tema {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  padding: 12px 14px !important;
  text-align: left !important;
  width: 100% !important;
}

.drawer-footer {
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom)) 16px;
  border-top: 1px solid var(--cinza-borda);
  background: var(--cinza-bg);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer-copyright {
  text-align: center;
  font-size: 11px;
  color: var(--texto-suave, #94a3b8);
  padding-top: 6px;
  line-height: 1.4;
}

.painel-footer {
  margin-top: 48px;
  padding: 24px 16px;
  border-top: 1px solid var(--cinza-borda);
  text-align: center;
  font-size: 12px;
  color: var(--texto-suave, #94a3b8);
  letter-spacing: 0.2px;
}

.btn-drawer-sair {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  padding: 12px 14px !important;
  border-radius: var(--radius-md);
  border: 1px solid var(--erro-borda);
  background: var(--erro-bg);
  color: var(--erro-texto);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  touch-action: manipulation;
  min-height: 44px;
  width: 100%;
  box-sizing: border-box;
  text-align: left !important;
}

.btn-drawer-sair:hover {
  background: #fee2e2;
}

.btn-drawer-sair:active {
  transform: scale(0.97);
}

/* ==========================================================================
   MIOLO DO PAINEL & LAYOUT PRINCIPAL
   ========================================================================== */
.miolo-painel {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 60px 24px;
}

.cabecalho-secao {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 14px;
  flex-wrap: wrap;
}

.busca-pessoas {
  flex: 1;
  min-width: 220px;
  max-width: 360px;
}

/* ==========================================================================
   NAVEGAÇÃO DE MÓDULOS (DESKTOP)
   ========================================================================== */
.nav-modulos {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--cinza-borda);
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.aba-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--texto-suave);
  cursor: pointer;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  margin-bottom: -1px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.aba-btn:hover {
  color: var(--texto);
  background: var(--cinza-bg-subtil);
}

.aba-btn.ativa {
  color: var(--cor-primaria-clara);
  border-bottom-color: var(--cor-primaria-clara);
  font-weight: 700;
  background: var(--cor-primaria-suave);
}

/* Sub-abas de Navegação Interna */
.subaba-btn {
  background: var(--cinza-bg-subtil);
  border: 1px solid var(--cinza-borda);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--texto-suave);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.18s ease;
  min-height: 38px;
}

.subaba-btn:hover {
  background: #e2e8f0;
  color: var(--texto);
}

.subaba-btn.ativa {
  background: var(--cor-primaria);
  color: var(--branco);
  border-color: var(--cor-primaria);
  box-shadow: 0 2px 6px rgba(30, 58, 138, 0.25);
}

.subaba-btn-contador {
  border-color: rgba(37, 99, 235, 0.4);
  background: rgba(37, 99, 235, 0.08);
  color: #1e40af;
}

.subaba-btn-contador:hover {
  background: rgba(37, 99, 235, 0.16);
  color: #1e3a8a;
}

.subaba-btn-contador.ativa {
  background: var(--cor-primaria) !important;
  color: #ffffff !important;
  border-color: var(--cor-primaria) !important;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.35) !important;
}

.badge-contador-subaba {
  font-size: 10px;
  background: #2563eb;
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 6px;
  font-weight: 700;
  letter-spacing: 0.3px;
  transition: all 0.18s ease;
  display: inline-block;
}

.subaba-btn-contador.ativa .badge-contador-subaba {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

[data-tema="dark"] .subaba-btn-contador,
body.tema-dark .subaba-btn-contador {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.4);
}

[data-tema="dark"] .subaba-btn-contador.ativa,
body.tema-dark .subaba-btn-contador.ativa {
  background: #2563eb !important;
  color: #ffffff !important;
}

[data-tema="dark"] .subaba-btn-contador.ativa .badge-contador-subaba,
body.tema-dark .subaba-btn-contador.ativa .badge-contador-subaba {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

/* ==========================================================================
   CARDS & RESUMOS FINANCEIROS
   ========================================================================== */
.cards-financeiros {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.card-resumo {
  background: var(--branco);
  border: 1px solid var(--cinza-borda);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-resumo:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-resumo-inchurch {
  position: relative;
  overflow: hidden;
}

/* ==========================================================================
   EVENTOS ESTILO INCHURCH (GRID DE CARDS & DATA BOX)
   ========================================================================== */
.grade-eventos-inchurch {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.card-evento-inchurch {
  background: var(--branco);
  border: 1px solid var(--cinza-borda);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-evento-inchurch:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border-color: var(--cinza-borda-forte);
}

.evento-header-box {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.data-box-inchurch {
  width: 52px;
  min-width: 52px;
  height: 58px;
  border-radius: 12px;
  background: var(--cinza-bg-subtil);
  border: 1px solid var(--cinza-borda);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

.data-box-inchurch .dia {
  font-size: 20px;
  font-weight: 800;
  color: var(--texto);
  line-height: 1;
}

.data-box-inchurch .mes {
  font-size: 10px;
  font-weight: 700;
  color: var(--texto-mutado);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 3px;
}

.evento-info-corpo {
  flex: 1;
  min-width: 0;
}

.evento-info-corpo .titulo-evento {
  font-size: 15px;
  font-weight: 700;
  color: var(--texto);
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.evento-info-corpo .local-evento {
  font-size: 12px;
  color: var(--texto-mutado);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}

.evento-badges-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
}

.evento-footer-acoes {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--cinza-borda);
  gap: 8px;
}

/* ==========================================================================
   CÉLULAS & GRUPOS ESTILO INCHURCH (GRID DE CARDS)
   ========================================================================== */
.grade-grupos-inchurch {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.card-grupo-inchurch {
  background: var(--branco);
  border: 1px solid var(--cinza-borda);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-grupo-inchurch:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border-color: var(--cinza-borda-forte);
}

.grupo-header-inchurch {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.grupo-lider-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.grupo-info-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0;
  font-size: 13px;
  color: var(--texto-suave);
}

.grupo-info-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   ENSINO & TURMAS ESTILO INCHURCH
   ========================================================================== */
.grade-turmas-inchurch {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.card-turma-inchurch {
  background: var(--branco);
  border: 1px solid var(--cinza-borda);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-turma-inchurch:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.07);
}

.card-resumo .titulo-resumo {
  font-size: 12px;
  font-weight: 700;
  color: var(--texto-mutado);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-resumo .valor-resumo {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.valor-receita { color: var(--sucesso); }
.valor-despesa { color: var(--erro); }
.valor-saldo { color: var(--cor-primaria-clara); }

/* ==========================================================================
   BADGES & TAGS
   ========================================================================== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--cor-primaria-suave);
  color: var(--cor-primaria);
  font-size: 12px;
  font-weight: 700;
}

.badge-papel {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: #e2e8f0;
  color: var(--texto-suave);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge-papel.lider {
  background: var(--cor-primaria-suave);
  color: var(--cor-primaria);
  border: 1px solid var(--cor-primaria-borda);
}

/* Multi-Select Chips de Funções / Chamados */
.chips-funcoes-grade {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  margin-bottom: 6px;
}

.chip-funcao {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--cinza-borda);
  background: var(--cinza-card);
  color: var(--texto-suave);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  touch-action: manipulation;
}

.chip-funcao .chip-icone {
  font-size: 14px;
  line-height: 1;
}

.chip-funcao:hover {
  background: var(--cor-primaria-suave);
  border-color: var(--cor-primaria-borda);
  color: var(--cor-primaria-clara);
  transform: translateY(-1px);
}

.chip-funcao.chip-ativo {
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.chip-funcao.chip-ativo::after {
  content: ' ✓';
  font-weight: 800;
  font-size: 11px;
  margin-left: 2px;
}

/* Paleta de Cores dos Chips Ativos (Modo Claro) */
.chip-funcao.chip-ativo.chip-funcao-pastor { background: #e0e7ff; color: #3730a3; border-color: #818cf8; }
.chip-funcao.chip-ativo.chip-funcao-lider { background: #dcfce7; color: #15803d; border-color: #4ade80; }
.chip-funcao.chip-ativo.chip-funcao-anfitriao { background: #fef3c7; color: #92400e; border-color: #facc15; }
.chip-funcao.chip-ativo.chip-funcao-professor { background: #e0f2fe; color: #0369a1; border-color: #38bdf8; }
.chip-funcao.chip-ativo.chip-funcao-diacono { background: #fae8ff; color: #86198f; border-color: #e879f9; }
.chip-funcao.chip-ativo.chip-funcao-louvor { background: #fdf4ff; color: #a21caf; border-color: #f472b6; }
.chip-funcao.chip-ativo.chip-funcao-voluntario { background: #ccfbf1; color: #115e59; border-color: #2dd4bf; }
.chip-funcao.chip-ativo.chip-funcao-membro { background: #eff6ff; color: #1e40af; border-color: #60a5fa; }
.chip-funcao.chip-ativo.chip-funcao-default { background: #eff6ff; color: #1e40af; border-color: #60a5fa; }

.tag-chamado {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.01em;
  border: 1px solid transparent;
}

.tag-chamado-pastor { background: #e0e7ff; color: #3730a3; border-color: #c7d2fe; }
.tag-chamado-lider { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.tag-chamado-professor { background: #e0f2fe; color: #0369a1; border-color: #bae6fd; }
.tag-chamado-anfitriao { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.tag-chamado-diacono { background: #fae8ff; color: #86198f; border-color: #f5d0fe; }
.tag-chamado-louvor { background: #fdf4ff; color: #a21caf; border-color: #f0abfc; }
.tag-chamado-default { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }

[data-tema="dark"] .tag-chamado-pastor, body.tema-dark .tag-chamado-pastor { background: rgba(99, 102, 241, 0.18); color: #a5b4fc; border-color: rgba(99, 102, 241, 0.35); }
[data-tema="dark"] .tag-chamado-lider, body.tema-dark .tag-chamado-lider { background: rgba(34, 197, 94, 0.18); color: #4ade80; border-color: rgba(34, 197, 94, 0.35); }
[data-tema="dark"] .tag-chamado-professor, body.tema-dark .tag-chamado-professor { background: rgba(14, 165, 233, 0.18); color: #38bdf8; border-color: rgba(14, 165, 233, 0.35); }
[data-tema="dark"] .tag-chamado-anfitriao, body.tema-dark .tag-chamado-anfitriao { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border-color: rgba(245, 158, 11, 0.35); }
[data-tema="dark"] .tag-chamado-diacono, body.tema-dark .tag-chamado-diacono { background: rgba(168, 85, 247, 0.18); color: #c084fc; border-color: rgba(168, 85, 247, 0.35); }
[data-tema="dark"] .tag-chamado-louvor, body.tema-dark .tag-chamado-louvor { background: rgba(236, 72, 153, 0.18); color: #f472b6; border-color: rgba(236, 72, 153, 0.35); }
[data-tema="dark"] .tag-chamado-default, body.tema-dark .tag-chamado-default { background: rgba(59, 130, 246, 0.18); color: #60a5fa; border-color: rgba(59, 130, 246, 0.35); }

.badge-status {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-status.pago {
  background: var(--sucesso-bg);
  color: var(--sucesso-texto);
  border: 1px solid var(--sucesso-borda);
}

.badge-status.pendente {
  background: var(--aviso-bg);
  color: var(--aviso-texto);
  border: 1px solid var(--aviso-borda);
}

.badge-status.cancelado {
  background: var(--erro-bg);
  color: var(--erro-texto);
  border: 1px solid var(--erro-borda);
}

/* ==========================================================================
   TABELAS ESTILO LIVRO DE REGISTROS / LEDGER CLÁSSICO INSTITUCIONAL
   ========================================================================== */
table,
.tabela-estilizada {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--branco);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--crm-table-border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

table thead,
.tabela-estilizada thead {
  background: var(--crm-th-bg);
}

th,
table thead th,
.tabela-estilizada thead th {
  background: var(--crm-th-bg) !important;
  color: #ffffff !important;
  font-family: var(--font-sans);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 2px solid var(--crm-th-border-bottom);
  border-top: none;
  border-left: none;
  border-right: 1px solid var(--crm-th-divider);
  text-align: left;
  white-space: nowrap;
  vertical-align: middle;
}

table thead th:last-child,
.tabela-estilizada thead th:last-child {
  border-right: none;
}

[data-tema="dark"] th,
[data-tema="dark"] table thead th,
[data-tema="dark"] .tabela-estilizada thead th,
body.tema-dark th,
body.tema-dark table thead th,
body.tema-dark .tabela-estilizada thead th {
  color: #ffffff !important;
}

/* Arredondamento suave no cabeçalho */
table thead tr:first-child th:first-child,
.tabela-estilizada thead tr:first-child th:first-child {
  border-top-left-radius: calc(var(--radius-md) - 1px);
}
table thead tr:first-child th:last-child,
.tabela-estilizada thead tr:first-child th:last-child {
  border-top-right-radius: calc(var(--radius-md) - 1px);
}

td,
table tbody td,
.tabela-estilizada tbody td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--crm-table-border);
  font-size: 13.5px;
  color: var(--texto);
  vertical-align: middle;
  transition: background 0.15s ease, color 0.15s ease;
}

table tbody tr:nth-child(even) td,
.tabela-estilizada tbody tr:nth-child(even) td {
  background-color: var(--crm-tr-even);
}

table tbody tr:hover td,
.tabela-estilizada tbody tr:hover td {
  background-color: var(--crm-tr-hover) !important;
}

table tbody tr:last-child td,
.tabela-estilizada tbody tr:last-child td {
  border-bottom: none;
}

table tbody tr:last-child td:first-child,
.tabela-estilizada tbody tr:last-child td:first-child {
  border-bottom-left-radius: calc(var(--radius-md) - 1px);
}
table tbody tr:last-child td:last-child,
.tabela-estilizada tbody tr:last-child td:last-child {
  border-bottom-right-radius: calc(var(--radius-md) - 1px);
}

/* Containers de Tabela CRM & Scroll com Cabeçalho Fixo */
.area-tabela-scroll,
.tabela-container,
.container-tabela {
  border-radius: var(--radius-lg);
  border: 1px solid var(--crm-table-border);
  background: var(--branco);
  box-shadow: 0 4px 14px -3px rgba(15, 23, 42, 0.08);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.area-tabela-scroll table,
.tabela-container table,
.container-tabela table {
  border: none;
  box-shadow: none;
  margin-bottom: 0;
}

.area-tabela-scroll table thead th,
.tabela-container table thead th,
.container-tabela table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
}

/* Botões de Ações CRM dentro das Linhas */
.acoes-linha {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.acoes-linha button,
.acoes-linha .btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid var(--cinza-borda);
  background: var(--branco);
  color: var(--texto-suave);
}

.acoes-linha button:hover,
.acoes-linha .btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-xs);
  border-color: var(--cor-primaria-clara);
  color: var(--cor-primaria);
}

[data-tema="dark"] .acoes-linha button,
[data-tema="dark"] .acoes-linha .btn,
body.tema-dark .acoes-linha button,
body.tema-dark .acoes-linha .btn {
  background: #111827;
  border-color: #1f293d;
  color: #94a3b8;
}

[data-tema="dark"] .acoes-linha button:hover,
[data-tema="dark"] .acoes-linha .btn:hover,
body.tema-dark .acoes-linha button:hover,
body.tema-dark .acoes-linha .btn:hover {
  border-color: #3b82f6;
  color: #60a5fa;
  background: #1e293b;
}

/* Alternância Responsiva: Tabela Completa (Desktop) vs Cards Verticais (Mobile) */
.visualizacao-desktop,
#container-tabela-pessoas,
#container-tabela-grupos {
  display: block !important;
}
.visualizacao-mobile,
#container-mobile-pessoas,
#container-mobile-grupos {
  display: none !important;
}

@media screen and (max-width: 768px) {
  .visualizacao-desktop,
  div.visualizacao-desktop,
  #container-tabela-pessoas,
  #container-tabela-grupos,
  #area-tabela .visualizacao-desktop,
  #area-tabela-grupos .visualizacao-desktop,
  #tabela-pessoas,
  #tabela-grupos {
    display: none !important;
  }
  .visualizacao-mobile,
  div.visualizacao-mobile,
  #container-mobile-pessoas,
  #container-mobile-grupos,
  #area-tabela .visualizacao-mobile,
  #area-tabela-grupos .visualizacao-mobile {
    display: block !important;
  }
}

/* ==========================================================================
   ACORDEONS VERTICAIS (GRUPOS & PESSOAS)
   ========================================================================== */
.lista-acordeon-grupos,
.lista-acordeon-pessoas {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.item-acordeon-grupo,
.item-acordeon-pessoa {
  background: var(--branco);
  border: 1px solid var(--cinza-borda);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  box-sizing: border-box;
}

[data-tema="dark"] .item-acordeon-grupo,
[data-tema="dark"] .item-acordeon-pessoa,
body.tema-dark .item-acordeon-grupo,
body.tema-dark .item-acordeon-pessoa {
  background: #151d2e;
  border-color: #1f293d;
  color: #f8fafc;
}

.item-acordeon-grupo:hover,
.item-acordeon-pessoa:hover {
  border-color: var(--cinza-borda-forte);
  box-shadow: var(--shadow-md);
}

.topo-acordeon-grupo {
  padding: 14px 16px;
  background: var(--branco);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  user-select: none;
  transition: background-color 0.15s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
  box-sizing: border-box;
}

/* Cabeçalho 3 Colunas: [RE | Renata] [Funções/Cargos] [✏️ Editar ▼] */
.topo-acordeon-pessoa {
  padding: 12px 14px;
  background: var(--branco);
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(110px, 1.2fr) minmax(110px, 1.8fr) auto;
  align-items: center;
  gap: 10px;
  user-select: none;
  transition: background-color 0.15s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
  box-sizing: border-box;
}

[data-tema="dark"] .topo-acordeon-grupo,
[data-tema="dark"] .topo-acordeon-pessoa,
body.tema-dark .topo-acordeon-grupo,
body.tema-dark .topo-acordeon-pessoa {
  background: #151d2e;
  color: #f8fafc;
}

.topo-acordeon-grupo:hover,
.topo-acordeon-pessoa:hover {
  background-color: var(--cinza-bg);
}

[data-tema="dark"] .topo-acordeon-grupo:hover,
[data-tema="dark"] .topo-acordeon-pessoa:hover,
body.tema-dark .topo-acordeon-grupo:hover,
body.tema-dark .topo-acordeon-pessoa:hover {
  background: #1a243a;
}

/* Coluna 1: Usuário (Avatar + Nome) */
.coluna-pessoa-usuario {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}

.avatar-pessoa-acordeon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cor-primaria), var(--cor-primaria-clara));
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.info-nome-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.nome-pessoa {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--texto);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.subinfo-pessoa {
  font-size: 11px;
  color: var(--texto-suave);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Coluna 2: Funções / Cargos */
.coluna-pessoa-cargos {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  min-width: 0;
}

.coluna-pessoa-cargos .tag-chamado {
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  line-height: 1.25;
  white-space: nowrap;
}

/* Coluna 3: Ações (Editar + Expansor) */
.coluna-pessoa-acoes {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

.btn-editar-pessoa-card {
  padding: 6px 11px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  min-height: unset !important;
  height: auto !important;
  line-height: 1.2 !important;
  white-space: nowrap;
  margin: 0 !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: var(--radius-sm);
}

.seta-acordeon {
  font-size: 11px;
  color: var(--texto-mutado);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--cinza-bg-subtil);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s;
  flex-shrink: 0;
}

.item-acordeon-grupo.aberto .seta-acordeon,
.item-acordeon-pessoa.aberto .seta-acordeon {
  transform: rotate(180deg);
  background-color: var(--cor-primaria-suave);
  color: var(--cor-primaria-clara);
}

@media (max-width: 480px) {
  .topo-acordeon-pessoa {
    grid-template-columns: minmax(88px, 1.1fr) minmax(100px, 1.5fr) auto;
    gap: 6px;
    padding: 10px 12px;
  }
  .btn-editar-pessoa-card {
    padding: 4px 8px !important;
    font-size: 11px !important;
  }
  .seta-acordeon {
    width: 24px;
    height: 24px;
    font-size: 9px;
  }
}

.corpo-acordeon-grupo,
.corpo-acordeon-pessoa {
  padding: 16px 20px 20px 20px;
  border-top: 1px solid var(--cinza-borda);
  background: var(--cinza-bg-subtil);
}

.detalhes-grid-grupo,
.detalhes-grid-pessoa {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px 20px;
  margin-bottom: 18px;
  background: var(--cinza-card);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--cinza-borda);
}

.detalhe-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.detalhe-item .rotulo {
  font-size: 11px;
  font-weight: 700;
  color: var(--texto-mutado);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.detalhe-item .valor {
  font-size: 14px;
  font-weight: 600;
  color: var(--texto);
  word-break: break-word;
}

.detalhe-item .valor a {
  color: var(--cor-primaria-clara);
}

.detalhe-item .valor a:hover {
  text-decoration: underline;
}

.acoes-acordeon-grupo,
.acoes-acordeon-pessoa {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.acoes-acordeon-grupo button,
.acoes-acordeon-pessoa button {
  margin: 0;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  min-height: 36px;
}

.btn-contato-rapido {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  background: var(--cinza-bg-subtil);
  color: var(--texto-suave);
  transition: all 0.15s ease;
  min-height: 34px;
}

.btn-contato-rapido.whatsapp {
  background: var(--sucesso-bg);
  color: var(--sucesso-texto);
  border: 1px solid var(--sucesso-borda);
}

.btn-contato-rapido.whatsapp:hover {
  background: #dcfce7;
}

.btn-contato-rapido.telefone {
  background: var(--info-bg);
  color: var(--info-texto);
  border: 1px solid var(--info-borda);
}

.btn-contato-rapido.telefone:hover {
  background: #e0f2fe;
}

/* ==========================================================================
   MODAIS & BOTTOM SHEETS
   ========================================================================== */
.overlay-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2000;
}

.modal {
  background: var(--branco);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 100%;
  max-width: 580px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}

.modal-largo {
  max-width: 760px;
}

.grade-campos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.grade-campos .campo-largo {
  grid-column: 1 / -1;
}

/* Helpers de Blocos e Subseções de Formulários */
.bloco-secao {
  background: var(--cinza-bg);
  border: 1px solid var(--cinza-borda);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.lista-scroll-chamada {
  background: var(--branco);
  border: 1px solid var(--cinza-borda-forte);
  transition: all 0.2s ease;
}

.form-info-banner {
  background: var(--cor-primaria-suave);
  border: 1px solid var(--cor-primaria-borda);
  color: var(--cor-primaria-hover);
}

.banner-relatorio-analitico {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
}

.banner-relatorio-analitico h3 {
  color: #92400e;
}

.banner-relatorio-analitico span {
  color: #b45309;
}

.rc-stat-box {
  background: var(--cinza-bg);
  border: 1px solid var(--cinza-borda-forte);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  transition: all 0.2s ease;
}

.rc-stat-box-sucesso {
  background: var(--sucesso-bg);
  border: 1px solid var(--sucesso-borda);
  transition: all 0.2s ease;
}

/* Espelho Mobile — Relatório Semanal em 2 Passos */
.rc-passos-indicator {
  display: flex;
  align-items: center;
  background: var(--branco);
  border: 1px solid var(--cinza-borda);
  border-radius: 14px;
  padding: 6px;
  margin-bottom: 18px;
  gap: 6px;
}

.rc-passo-tab {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
  margin: 0 !important;
  width: auto !important;
}

.rc-passo-tab.ativo {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.rc-passo-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rc-passo-tab.ativo .rc-passo-badge {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.rc-passo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.rc-passo-text small {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.rc-passo-tab.ativo .rc-passo-text small {
  color: #2563eb;
}

.rc-passo-text strong {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}

.rc-passo-tab.ativo .rc-passo-text strong {
  color: #0f172a;
}

.rc-passo-divider {
  width: 1px;
  height: 28px;
  background: var(--cinza-borda);
}

.rc-bloco-mobile {
  border-radius: 14px;
  padding: 18px;
  background: var(--branco);
}

.rc-gc-selector-box {
  margin-bottom: 16px;
}

.rc-gc-selector-box label {
  margin-top: 0;
}

.rc-presencas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.rc-presencas-header h4,
.rc-bloco-titulo-row h4 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--texto);
}

.rc-bloco-titulo-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.rc-btn-cadastrar-hora {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  margin: 0 !important;
  width: auto !important;
  transition: all 0.15s ease;
}

.rc-btn-cadastrar-hora:hover {
  background: #dbeafe;
}

.rc-chamada-acoes {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding: 0 2px;
}

#rc-chamada-contador {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--texto-suave);
}

.rc-btn-alternar-todos {
  background: transparent;
  border: none;
  color: #2563eb;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 6px;
  margin: 0 !important;
  width: auto !important;
}

.rc-btn-alternar-todos:hover {
  text-decoration: underline;
}

.rc-lista-chamada {
  max-height: 260px;
  overflow-y: auto;
  border-radius: 10px;
  padding: 8px;
  margin-bottom: 14px;
  background: var(--cinza-bg);
}

.rc-chamada-vazia {
  color: var(--texto-mutado);
  font-size: 13px;
  margin: 0;
  padding: 12px 6px;
  text-align: center;
}

.rc-participante-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  min-height: 44px;
  border-radius: 8px;
  margin-bottom: 5px;
  background: var(--branco);
  border: 1px solid var(--cinza-borda);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.rc-participante-row:last-child {
  margin-bottom: 0;
}

.rc-participante-row:hover {
  border-color: #93c5fd;
}

.rc-participante-row input[type="checkbox"] {
  width: 19px;
  height: 19px;
  accent-color: #2563eb;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}

.rc-participante-nome {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--texto);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rc-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.rc-stat-label {
  font-size: 10px;
  color: var(--texto-mutado);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.25;
}

.rc-stat-num {
  font-size: 19px;
  font-weight: 800;
  color: var(--texto);
  margin-top: 3px;
}

.rc-btn-avancar {
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transition: background 0.18s ease, transform 0.12s ease;
  margin: 0;
}

.rc-btn-avancar:hover {
  background: #1d4ed8;
}

.rc-form-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rc-form-stack label {
  margin-top: 0;
}

.rc-ofertas-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 560px) {
  .rc-ofertas-row {
    grid-template-columns: 1fr;
  }
}

.rc-kilo-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rc-kilo-row input {
  flex: 1;
  margin-bottom: 0;
}

.rc-stepper-inline {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rc-step-btn {
  width: 44px !important;
  height: 44px;
  min-width: 44px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0 !important;
  padding: 0;
  transition: background 0.15s ease;
}

.rc-step-btn:hover {
  background: #e2e8f0;
}

.rc-step-menos {
  color: #ef4444;
}

.rc-step-mais {
  color: #0ea5e9;
}

.rc-upload-trigger {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px dashed #93c5fd;
  color: #2563eb !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
  cursor: pointer;
  padding: 10px 14px;
  margin-top: 6px !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  transition: background 0.15s ease;
}

.rc-upload-trigger:hover {
  background: #eff6ff;
}

.rc-comprovante-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.rc-preview-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
}

.rc-preview-thumb-box {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--cinza-borda-forte);
}

.rc-preview-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rc-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px !important;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  font-size: 12px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0 !important;
  padding: 0;
}

.rc-btn-whatsapp {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #15803d;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  margin: 0;
  transition: background 0.15s ease;
}

.rc-btn-whatsapp:hover {
  background: #dcfce7;
}

.rc-botoes-passo2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.rc-btn-voltar {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 12px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  margin: 0;
  width: auto;
}

.rc-btn-voltar:hover {
  background: #e2e8f0;
}

.rc-btn-enviar {
  flex: 1;
  min-height: 48px;
  border-radius: 12px;
  background: #2563eb;
  border: none;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  margin: 0;
}

.rc-btn-enviar:hover {
  background: #1d4ed8;
}

[data-tema="dark"] .rc-passos-indicator,
body.tema-dark .rc-passos-indicator {
  background: #0f172a;
  border-color: #1e293b;
}

[data-tema="dark"] .rc-passo-tab.ativo,
body.tema-dark .rc-passo-tab.ativo {
  background: rgba(37, 99, 235, 0.16);
  border-color: rgba(59, 130, 246, 0.4);
}

[data-tema="dark"] .rc-passo-text strong,
body.tema-dark .rc-passo-text strong {
  color: #f1f5f9;
}

[data-tema="dark"] .rc-passo-badge,
body.tema-dark .rc-passo-badge {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

[data-tema="dark"] .rc-participante-row,
body.tema-dark .rc-participante-row {
  background: #111827;
  border-color: #1f293d;
}

[data-tema="dark"] .rc-step-btn,
[data-tema="dark"] .rc-btn-voltar,
body.tema-dark .rc-step-btn,
body.tema-dark .rc-btn-voltar {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

[data-tema="dark"] .rc-upload-trigger,
body.tema-dark .rc-upload-trigger {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(59, 130, 246, 0.4);
}

[data-tema="dark"] .rc-btn-whatsapp,
body.tema-dark .rc-btn-whatsapp {
  background: rgba(22, 163, 74, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
  color: #4ade80;
}

.rodape-modal {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.rodape-modal button,
.rodape-modal .botao,
.rodape-modal .botao-primario,
.rodape-modal .botao-secundario {
  margin: 0 !important;
  width: auto !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 8px 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 13.5px !important;
  box-sizing: border-box !important;
}

.link-publico-caixa {
  background: var(--cor-primaria-suave);
  border: 1px dashed var(--cor-primaria-borda);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.link-publico-caixa code {
  background: var(--branco);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  border: 1px solid var(--cor-primaria-borda);
}

.vazio-estado {
  text-align: center;
  padding: 48px 24px;
  color: var(--texto-suave);
  background: var(--branco);
  border: 1px dashed var(--cinza-borda-forte);
  border-radius: var(--radius-lg);
  font-weight: 500;
}

/* ==========================================================================
   PWA & EXPERIÊNCIA MOBILE-FIRST
   ========================================================================== */
.pwa-install-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--cor-primaria), var(--cor-primaria-clara));
  color: var(--branco);
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
}

.pwa-install-banner .info-pwa {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pwa-install-banner .info-pwa img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--branco);
  padding: 2px;
}

.pwa-install-banner .btn-instalar-banner {
  background: var(--branco);
  color: var(--cor-primaria);
  border: none;
  padding: 9px 18px;
  font-weight: 700;
  font-size: 13px;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  min-height: 38px;
}

.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--cinza-borda);
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06);
  z-index: 1000;
  padding: 6px 12px calc(8px + env(safe-area-inset-bottom));
  justify-content: space-around;
  align-items: center;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--texto-mutado);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 60px;
  min-height: 48px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item .nav-icon {
  font-size: 20px;
  margin-bottom: 2px;
  transition: transform 0.2s ease;
}

.mobile-nav-item.ativa {
  color: var(--cor-primaria-clara);
  background: var(--cor-primaria-suave);
  font-weight: 700;
}

.mobile-nav-item.ativa .nav-icon {
  transform: scale(1.15);
}

/* ==========================================================================
   BREAKPOINTS RESPONSIVOS (MOBILE < 768px)
   ========================================================================== */
@media (max-width: 768px) {
  body {
    padding-bottom: calc(85px + env(safe-area-inset-bottom));
    -webkit-text-size-adjust: 100%;
  }

  .nav-modulos {
    display: none !important;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .miolo-painel {
    padding: 14px 12px;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .painel-footer {
    padding-bottom: calc(75px + env(safe-area-inset-bottom));
  }

  .topo-painel {
    padding: 8px 12px !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    min-height: 54px !important;
    gap: 8px !important;
  }

  .topo-esquerda {
    min-width: 0 !important;
    flex: 1 !important;
    gap: 8px !important;
    overflow: hidden !important;
  }

  .logo-topo {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .logo-topo .logo-texto {
    max-width: 145px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: inline-block !important;
    font-size: 13.5px !important;
  }

  .topo-acoes-direita {
    gap: 6px !important;
    flex-shrink: 0 !important;
  }

  #usuario-perfil-badge,
  .badge-topo-papel {
    display: none !important;
  }

  .avatar-topo-btn {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    border-radius: 50% !important;
    min-height: 32px !important;
    min-width: 32px !important;
    box-shadow: none !important;
  }

  .avatar-topo-iniciais {
    width: 32px !important;
    height: 32px !important;
    font-size: 12px !important;
  }

  input, select, textarea {
    font-size: 16px !important;
    min-height: 46px;
    border-radius: var(--radius-md);
    padding: 10px 14px;
  }

  button, .botao, .botao-primario, .botao-secundario {
    min-height: 46px;
    border-radius: var(--radius-md);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  body:has(.overlay-modal:not(.oculto)) .mobile-bottom-nav,
  body:has(.overlay-modal:not(.oculto)) #mobile-bottom-nav,
  body.modal-aberto .mobile-bottom-nav,
  body.modal-aberto #mobile-bottom-nav {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .overlay-modal {
    align-items: flex-end !important;
    padding: 0 !important;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 5000 !important;
  }

  .modal, .modal-largo {
    border-radius: 24px 24px 0 0 !important;
    max-height: 85vh !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 20px 18px 24px 18px !important;
    animation: sheetUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.35);
    position: relative;
    z-index: 5001 !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal::before, .modal-largo::before {
    content: '';
    display: block;
    width: 44px;
    height: 5px;
    background: var(--cinza-borda-forte);
    border-radius: 4px;
    margin: 0 auto 16px;
  }

  .rodape-modal {
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    margin-top: 24px;
    padding: 14px 0 calc(20px + env(safe-area-inset-bottom)) 0;
    position: sticky;
    bottom: 0;
    background: var(--branco);
    border-top: 1px solid var(--cinza-borda);
    z-index: 30;
  }

  .rodape-modal button {
    width: 100% !important;
    min-height: 48px;
    font-size: 15px;
    font-weight: 700;
  }

  .cabecalho-secao {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100% !important;
    max-width: 100% !important;
  }

  .cabecalho-secao select,
  .cabecalho-secao input,
  .cabecalho-secao button {
    width: 100% !important;
    max-width: 100% !important;
  }

  .sub-nav-modulos {
    width: 100% !important;
    max-width: 100% !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .cards-financeiros {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .card-resumo {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .grade-campos {
    grid-template-columns: 1fr !important;
    gap: 0;
  }

  .subaba-btn {
    padding: 10px 14px;
    font-size: 13px;
    flex: 1;
    text-align: center;
    min-height: 44px;
  }

  .topo-acordeon-grupo,
  .topo-acordeon-pessoa {
    padding: 14px;
  }

  .corpo-acordeon-grupo,
  .corpo-acordeon-pessoa {
    padding: 14px;
  }

  .detalhes-grid-grupo,
  .detalhes-grid-pessoa {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .acoes-acordeon-grupo,
  .acoes-acordeon-pessoa {
    flex-direction: column;
    align-items: stretch;
  }

  .acoes-acordeon-grupo button,
  .acoes-acordeon-pessoa button {
    width: 100%;
    text-align: center;
  }

  #area-tabela,
  #area-tabela-grupos,
  #area-tabela-financeiro,
  #area-tabela-ensino,
  #area-tabela-eventos,
  #area-tabela-formularios,
  #area-tabela-usuarios,
  #area-consolidado-tabela,
  .area-tabela-scroll,
  .tabela-container:not(.visualizacao-desktop),
  .container-tabela {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: block !important;
    margin-top: 12px;
    border-radius: var(--radius-md);
    box-sizing: border-box !important;
  }

  #area-tabela-financeiro table,
  #area-tabela-ensino table,
  #area-tabela-eventos table,
  #area-tabela-formularios table,
  #area-tabela-usuarios table,
  #area-consolidado-tabela table,
  .area-tabela-scroll table,
  .tabela-container:not(.visualizacao-desktop) table,
  .container-tabela table {
    min-width: 600px !important;
    width: 100% !important;
  }

  .visualizacao-desktop,
  div.visualizacao-desktop,
  .visualizacao-desktop.tabela-container {
    display: none !important;
  }
  .visualizacao-mobile,
  div.visualizacao-mobile {
    display: block !important;
  }

  .card {
    padding: 16px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .card-link-publico-destaque {
    padding: 14px 16px !important;
  }
}

@keyframes sheetUp {
  from {
    transform: translateY(100%);
    opacity: 0.8;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ==========================================================================
   DASHBOARD / VISÃO GERAL (DESIGN SYSTEM MODERNO & REFINADO)
   ========================================================================== */
.pwa-install-banner {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.info-pwa {
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-pwa strong {
  color: #0c4a6e;
  font-size: 13.5px;
  font-weight: 700;
}

.pwa-icon-circulo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #0284c7;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.btn-instalar-banner {
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
  min-height: 32px;
}

.btn-instalar-banner:hover {
  background: #0369a1;
}

.btn-fechar-pwa-banner {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.btn-fechar-pwa-banner:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #0f172a;
}

/* Hero Banner Card */
.dashboard-hero-card {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 55%, #2563eb 100%);
  color: #ffffff;
  border-radius: 16px;
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.25);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.dashboard-hero-card::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.dashboard-hero-content {
  position: relative;
  z-index: 1;
  max-width: 650px;
}

.dashboard-tag-escopo {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: 9999px;
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.dashboard-titulo-hero {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 6px 0;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.dashboard-subtitulo-hero {
  font-size: 13.5px;
  opacity: 0.92;
  margin: 0;
  color: #e0e7ff;
  line-height: 1.4;
}

.dashboard-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* Grade de Indicadores (KPIs) */
.dashboard-kpis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.06);
  border-color: #93c5fd;
}

.kpi-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.kpi-rotulo {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

.kpi-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.kpi-icon-blue { background: #eff6ff; color: #2563eb; }
.kpi-icon-green { background: #f0fdf4; color: #16a34a; }
.kpi-icon-purple { background: #faf5ff; color: #9333ea; }
.kpi-icon-amber { background: #fffbeb; color: #d97706; }

.kpi-valor {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.kpi-subtexto {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
  display: block;
}

/* Card KPI Financeiro de Destaque */
.kpi-card-financeiro {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #d1fae5 100%);
  border: 1px solid #a7f3d0;
  position: relative;
}

.kpi-card-financeiro:hover {
  border-color: #10b981;
  box-shadow: 0 10px 22px -4px rgba(16, 185, 129, 0.16);
  transform: translateY(-3px);
}

.kpi-card-financeiro .kpi-valor {
  color: #047857;
}

.kpi-badge-financeiro {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(16, 185, 129, 0.18);
  color: #065f46;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.04em;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

/* Links Acionáveis em Estados Vazios nos Cards */
.kpi-acao-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.3;
}

.kpi-acao-link:hover {
  text-decoration: underline;
  color: #1d4ed8;
}

.kpi-acao-link-green {
  color: #047857;
}

.kpi-acao-link-green:hover {
  color: #065f46;
}

/* Estado Vazio Interativo em Widgets */
.widget-vazio-card {
  padding: 28px 16px;
  text-align: center;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.widget-vazio-icon {
  font-size: 32px;
  margin-bottom: 2px;
}

.widget-vazio-titulo {
  font-size: 14px;
  font-weight: 700;
  color: #334155;
}

.widget-vazio-sub {
  font-size: 12px;
  color: #64748b;
  max-width: 320px;
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.btn-acao-vazio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.25);
}

.btn-acao-vazio:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

/* Item de Reunião Recente no Dashboard */
.item-reuniao-recente {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  margin-bottom: 8px;
  transition: all 0.15s ease;
  gap: 12px;
}

.item-reuniao-recente:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.item-reuniao-info {
  flex: 1;
  min-width: 0;
}

.item-reuniao-info strong {
  display: block;
  font-size: 13px;
  color: #0f172a;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-reuniao-info span {
  font-size: 11px;
  color: #64748b;
  display: block;
}

.item-reuniao-stats {
  text-align: right;
  flex-shrink: 0;
}

.item-reuniao-stats .stat-presenca {
  font-size: 12px;
  font-weight: 700;
  color: #1e40af;
  display: block;
}

.item-reuniao-stats .stat-oferta {
  font-size: 11px;
  color: #15803d;
  font-weight: 600;
}

/* Dark Mode para Novos Estilos */
[data-tema="dark"] .kpi-card-financeiro,
body.tema-dark .kpi-card-financeiro {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.45) 0%, rgba(6, 95, 70, 0.25) 100%);
  border-color: rgba(16, 185, 129, 0.35);
}

[data-tema="dark"] .kpi-card-financeiro .kpi-valor,
body.tema-dark .kpi-card-financeiro .kpi-valor {
  color: #34d399;
}

[data-tema="dark"] .kpi-badge-financeiro,
body.tema-dark .kpi-badge-financeiro {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.3);
}

[data-tema="dark"] .kpi-acao-link,
body.tema-dark .kpi-acao-link {
  color: #60a5fa;
}

[data-tema="dark"] .kpi-acao-link-green,
body.tema-dark .kpi-acao-link-green {
  color: #34d399;
}

[data-tema="dark"] .widget-vazio-card,
body.tema-dark .widget-vazio-card {
  background: #111827;
  border-color: #1f293d;
}

[data-tema="dark"] .widget-vazio-titulo,
body.tema-dark .widget-vazio-titulo {
  color: #e2e8f0;
}

[data-tema="dark"] .widget-vazio-sub,
body.tema-dark .widget-vazio-sub {
  color: #94a3b8;
}

/* Grid de Widgets */
.dashboard-widgets-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.widget-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
}

.widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.widget-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-header-title h3 {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.widget-icon {
  font-size: 18px;
}

.widget-badge {
  font-size: 11px;
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  padding: 3px 10px;
  border-radius: 9999px;
  border: 1px solid #dbeafe;
}

.btn-widget-acao {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 30px;
}

.btn-widget-acao:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

.widget-vazio {
  padding: 24px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
  font-style: italic;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px dashed #e2e8f0;
}

.widget-carregando {
  padding: 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

/* Itens de Aniversariante */
.item-aniversariante {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  margin-bottom: 8px;
  transition: all 0.15s ease;
  gap: 12px;
}

.item-aniversariante:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.item-aniv-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.item-aniv-info {
  flex: 1;
  min-width: 0;
}

.item-aniv-info strong {
  display: block;
  font-size: 13px;
  color: #0f172a;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-aniv-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  flex-wrap: wrap;
}

.aniv-tag-dia {
  font-size: 11px;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  padding: 1px 6px;
  border-radius: 4px;
}

.aniv-tag-funcao {
  font-size: 11px;
  color: #64748b;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
}

.btn-aniv-zap {
  background: #25d366;
  color: #ffffff;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 4px rgba(37, 211, 102, 0.2);
  transition: all 0.15s ease;
  flex-shrink: 0;
  min-height: 28px;
}

.btn-aniv-zap:hover {
  background: #1eb857;
  color: #ffffff;
  transform: translateY(-1px);
}

/* Itens de Reunião Recente */
.item-reuniao-recente {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  gap: 12px;
}

.item-reuniao-recente:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.item-reuniao-info strong {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  display: block;
}

.item-reuniao-meta {
  font-size: 12px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.tag-status-reuniao {
  background: #dcfce7;
  color: #15803d;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 9999px;
  white-space: nowrap;
}

/* Ações Rápidas */
.dashboard-atalhos-secao {
  margin-top: 10px;
}

.dashboard-atalhos-titulo {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dashboard-atalhos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.atalho-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 52px;
}

.atalho-card:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.06);
  background: #f8fafc;
}

.atalho-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #eff6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.atalho-info {
  flex: 1;
}

.atalho-rotulo {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

.atalho-desc {
  font-size: 11.5px;
  color: #64748b;
  display: block;
  margin-top: 2px;
}

@media (max-width: 900px) {
  .dashboard-widgets-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-hero-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   MODAL DE PERSONALIZAÇÃO DE LOGO DA IGREJA
   ========================================================================== */
.logo-preview-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--cinza-bg-subtil);
  border: 1px solid var(--cinza-borda);
  border-radius: var(--radius-lg);
  margin-bottom: 18px;
}

.logo-preview-box {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--cor-primaria);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}

.logo-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

/* ==========================================================================
   MODAL DE IDENTIDADE VISUAL & LOGO ESTILO INCHURCH
   ========================================================================== */
.brand-preview-showcase {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.brand-logo-frame {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  flex-shrink: 0;
  overflow: hidden;
}

.brand-logo-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.brand-dropzone-modern {
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
}

.brand-dropzone-modern:hover,
.brand-dropzone-modern.dragover {
  border-color: #0284c7;
  background: #f0f9ff;
  transform: translateY(-1px);
}

.dropzone-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.btn-dropzone-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}

.brand-dropzone-modern:hover .btn-dropzone-action {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

/* Suporte ao Modo Escuro no Modal de Identidade Visual & Logo */
[data-tema="dark"] .brand-preview-showcase,
body.tema-dark .brand-preview-showcase {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: #25384e !important;
}

[data-tema="dark"] .brand-logo-frame,
body.tema-dark .brand-logo-frame {
  background: #0f172a !important;
  border-color: #334155 !important;
}

[data-tema="dark"] .brand-dropzone-modern,
body.tema-dark .brand-dropzone-modern {
  background: rgba(15, 23, 42, 0.5) !important;
  border-color: #334155 !important;
}

[data-tema="dark"] .brand-dropzone-modern:hover,
[data-tema="dark"] .brand-dropzone-modern.dragover,
body.tema-dark .brand-dropzone-modern:hover,
body.tema-dark .brand-dropzone-modern.dragover {
  background: rgba(14, 165, 233, 0.08) !important;
  border-color: #38bdf8 !important;
}

[data-tema="dark"] .dropzone-icon-circle,
body.tema-dark .dropzone-icon-circle {
  background: #1e293b !important;
  border-color: #334155 !important;
}

[data-tema="dark"] .btn-dropzone-action,
body.tema-dark .btn-dropzone-action {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

.upload-dropzone {
  border: 2px dashed var(--cinza-borda);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  background: var(--cinza-card);
  transition: all 0.2s ease;
  user-select: none;
}

.upload-dropzone:hover {
  border-color: var(--cor-primaria);
  background: var(--cor-primaria-suave);
}

.upload-dropzone.dragover {
  border-color: var(--cor-primaria);
  background: var(--cor-primaria-suave);
  transform: scale(1.01);
}

/* ==========================================================================
   REGRAS DE IMPRESSÃO
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .topo-painel,
  .link-publico-caixa,
  .nav-modulos,
  .sub-nav-modulos,
  .mobile-bottom-nav,
  #btn-imprimir-relatorio-celulas,
  #btn-filtrar-relatorio-consolidado,
  #form-relatorio-celula,
  #btn-imprimir-lancamentos-fin,
  #btn-imprimir-relatorio-dizimos,
  #btn-abrir-relatorios-fin,
  #btn-abrir-contas-fin,
  #botao-nova-transacao,
  #campo-busca-fin,
  #filtro-tipo-fin,
  #filtro-status-fin,
  .btn-fechar-drawer,
  .rodape-modal {
    display: none !important;
  }
  .miolo-painel {
    padding: 0 !important;
    max-width: 100% !important;
  }
  .card, table {
    box-shadow: none !important;
    border: 1px solid #cbd5e1 !important;
  }
  th {
    background: #f1f5f9 !important;
    color: #0f172a !important;
  }
}

/* ==========================================================================
   INCHURCH DESKTOP & MODERN SIDEBAR SYSTEM (DARK SIDEBAR + LIGHT CONTENT)
   ========================================================================== */
@media (min-width: 1024px) {
  .drawer-lateral {
    transform: translateX(0) !important;
    width: 260px !important;
    max-width: 260px !important;
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.08) !important;
    border-right: none !important;
    z-index: 990 !important;
  }

  .drawer-overlay {
    display: none !important;
  }

  .btn-hamburguer {
    display: none !important;
  }

  .btn-fechar-drawer {
    display: none !important;
  }

  .topo-painel {
    margin-left: 260px !important;
    width: calc(100% - 260px) !important;
    padding: 0 32px !important;
    background: var(--cinza-card) !important;
    border-bottom: 1px solid var(--cinza-borda) !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
  }

  .topo-painel .btn-tema-toggle {
    background: var(--cinza-bg-subtil) !important;
    color: var(--texto) !important;
    border: 1px solid var(--cinza-borda) !important;
  }

  .topo-painel .avatar-topo-btn {
    background: var(--cinza-bg-subtil) !important;
    color: var(--texto) !important;
    border: 1px solid var(--cinza-borda) !important;
  }

  .topo-painel .badge-topo-papel,
  .topo-painel .badge-topo-papel span:first-child {
    color: var(--texto, #111827) !important;
  }

  .topo-painel .badge-topo-papel span:last-child {
    color: var(--cor-primaria, #2563eb) !important;
    opacity: 1 !important;
  }

  [data-tema="dark"] .topo-painel .badge-topo-papel span:first-child,
  body.tema-dark .topo-painel .badge-topo-papel span:first-child {
    color: #f8fafc !important;
  }

  [data-tema="dark"] .topo-painel .badge-topo-papel span:last-child,
  body.tema-dark .topo-painel .badge-topo-papel span:last-child {
    color: #93c5fd !important;
  }

  .logo-topo {
    display: none !important;
  }

  .miolo-painel {
    margin-left: 260px !important;
    width: calc(100% - 260px) !important;
    padding: 26px 32px !important;
    box-sizing: border-box !important;
  }

  .nav-modulos-topo {
    display: none !important;
  }
}

/* Estilização Dark Navy estilo inChurch para o Drawer / Sidebar */
.drawer-lateral,
[data-tema="dark"] .drawer-lateral,
body.tema-dark .drawer-lateral {
  background: #111827 !important;
  color: #f9fafb !important;
  font-family: 'Plus Jakarta Sans', var(--font-sans) !important;
}

.drawer-header,
[data-tema="dark"] .drawer-header,
body.tema-dark .drawer-header {
  padding: max(14px, env(safe-area-inset-top)) 16px 12px 16px !important;
  background: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.drawer-nome-igreja {
  color: #ffffff !important;
  font-family: 'Plus Jakarta Sans', var(--font-sans) !important;
}

.drawer-subtitulo {
  color: #9ca3af !important;
}

.btn-fechar-drawer {
  color: #9ca3af !important;
}

.drawer-perfil-card,
[data-tema="dark"] .drawer-perfil-card,
body.tema-dark .drawer-perfil-card {
  margin: 12px 14px 6px 14px !important;
  padding: 10px 12px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}

.drawer-perfil-avatar {
  width: 36px !important;
  height: 36px !important;
  font-size: 13px !important;
  background: linear-gradient(135deg, #2563eb, #06b6d4) !important;
  border: 2px solid rgba(255, 255, 255, 0.15) !important;
}

.drawer-user-nome {
  color: #ffffff !important;
}

.drawer-user-papel {
  color: #60a5fa !important;
}

.drawer-nav {
  padding: 4px 12px 10px 12px !important;
  gap: 2px !important;
  overflow-y: auto;
}

.drawer-secao-titulo {
  font-size: 9.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: #6b7280 !important;
  background: transparent !important;
  border: none !important;
  padding: 10px 10px 3px 10px !important;
  margin: 0 !important;
}

.drawer-nav-item {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 11px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 7px 12px !important;
  min-height: 34px !important;
  border-radius: 9px !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #d1d5db !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  text-align: left !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
}

.drawer-nav-item .drawer-icon {
  width: 20px !important;
  min-width: 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 0.8;
  color: inherit !important;
}

.drawer-nav-item span:not(.drawer-icon) {
  background: transparent !important;
  padding: 0 !important;
  border: none !important;
  color: inherit !important;
}

.drawer-nav-item:hover {
  background: rgba(255, 255, 255, 0.07) !important;
  color: #ffffff !important;
  transform: none !important;
}

.drawer-nav-item.ativa,
[data-tema="dark"] .drawer-nav-item.ativa,
body.tema-dark .drawer-nav-item.ativa {
  background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  border-left: none !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
}

.drawer-nav-item.ativa .drawer-icon {
  opacity: 1 !important;
}

/* Rodapé Compacto Dark do Drawer */
.drawer-footer,
[data-tema="dark"] .drawer-footer,
body.tema-dark .drawer-footer {
  padding: 12px 14px calc(14px + env(safe-area-inset-bottom)) 14px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(0, 0, 0, 0.15) !important;
  gap: 8px !important;
}

.drawer-link-publico-box {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 10px !important;
  padding: 8px 10px !important;
}

.drawer-link-publico-label {
  font-size: 10px;
  font-weight: 700;
  color: #9ca3af !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 5px;
}

.drawer-link-input {
  font-size: 11px !important;
  min-height: 28px !important;
  height: 28px !important;
  padding: 2px 8px !important;
  flex: 1;
  min-width: 0;
  background: rgba(17, 24, 39, 0.7) !important;
  color: #e5e7eb !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 6px !important;
}

.drawer-link-copy-btn {
  min-height: 28px !important;
  height: 28px !important;
  padding: 0 10px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  background: rgba(37, 99, 235, 0.25) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(96, 165, 250, 0.3) !important;
  margin: 0 !important;
  flex-shrink: 0;
}

.drawer-link-copy-btn:hover {
  background: rgba(37, 99, 235, 0.4) !important;
  color: #ffffff !important;
}

.drawer-footer-actions {
  display: flex;
  gap: 8px;
}

.drawer-footer-btn {
  flex: 1;
  min-height: 36px !important;
  height: 36px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border-radius: 9px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: #d1d5db !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}

.drawer-footer-btn:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
}

.drawer-footer-btn-sair {
  flex: 0 0 auto;
  padding: 0 14px !important;
  color: #fca5a5 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  background: rgba(239, 68, 68, 0.1) !important;
}

.drawer-footer-btn-sair:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  color: #ffffff !important;
}

.drawer-copyright {
  padding-top: 2px !important;
  font-size: 10.5px !important;
  color: #6b7280 !important;
}

/* Tabelas Leves estilo inChurch */
table thead th,
.tabela-estilizada thead th {
  background: #f9fafb !important;
  color: #6b7280 !important;
  border-bottom: 1px solid var(--cinza-borda) !important;
  font-weight: 700 !important;
  font-size: 11.5px !important;
}

/* Cabeçalhos com vida e identidade visual nas planilhas do Financeiro */
#secao-financeiro table thead th,
#secao-financeiro .tabela-estilizada thead th {
  background: linear-gradient(135deg, #0f766e 0%, #059669 100%) !important;
  color: #ffffff !important;
  border-bottom: 2px solid #047857 !important;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
}

#secao-financeiro #tabela-relatorio-fin-contador thead th {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  border-bottom: 2px solid #1d4ed8 !important;
}

[data-tema="dark"] table thead th,
[data-tema="dark"] .tabela-estilizada thead th,
body.tema-dark table thead th,
body.tema-dark .tabela-estilizada thead th {
  background: #1e293b !important;
  color: #94a3b8 !important;
  border-bottom-color: #334155 !important;
}

[data-tema="dark"] #secao-financeiro table thead th,
[data-tema="dark"] #secao-financeiro .tabela-estilizada thead th,
body.tema-dark #secao-financeiro table thead th,
body.tema-dark #secao-financeiro .tabela-estilizada thead th {
  background: linear-gradient(135deg, #065f46 0%, #047857 100%) !important;
  color: #ecfdf5 !important;
  border-bottom-color: #10b981 !important;
}

[data-tema="dark"] #secao-financeiro #tabela-relatorio-fin-contador thead th,
body.tema-dark #secao-financeiro #tabela-relatorio-fin-contador thead th {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%) !important;
  color: #eff6ff !important;
  border-bottom-color: #3b82f6 !important;
}

/* Cards e Banners do Módulo App & Mídia */
.grid-app-banners {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.banner-item-card {
  border: 1px solid var(--cinza-borda);
  border-radius: 12px;
  overflow: hidden;
  background: var(--cinza-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.banner-item-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.banner-item-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: #0f172a;
}

.banner-item-body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.video-item-card {
  border: 1px solid var(--cinza-borda);
  border-radius: 12px;
  overflow: hidden;
  background: var(--cinza-card);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.video-item-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.video-thumbnail-wrapper {
  position: relative;
  width: 100%;
  height: 140px;
  background: #000;
}

.video-thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge-aovivo {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  animation: pulseAoVivo 1.8s infinite;
}

@keyframes pulseAoVivo {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

.aviso-item-card {
  border: 1px solid var(--cinza-borda);
  border-left: 4px solid var(--cor-primaria);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--cinza-card);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

/* ==========================================================================
   INCHURCH MODERN PILLS & DRAWER FICHA DE MEMBRO
   ========================================================================== */

/* Pílulas de Filtro Modernas (Pills) */
.filtros-pilulas-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}

.filtro-pilula {
  background: var(--cinza-bg);
  border: 1px solid var(--cinza-borda);
  color: var(--texto-suave);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filtro-pilula:hover {
  background: var(--cor-primaria-suave);
  color: var(--cor-primaria);
  border-color: var(--cor-primaria-clara);
}

.filtro-pilula.ativa {
  background: var(--cor-primaria, #1e3a5f);
  color: #ffffff;
  border-color: var(--cor-primaria, #1e3a5f);
  box-shadow: 0 2px 6px rgba(30, 58, 95, 0.25);
}

/* Ficha do Membro (Drawer Lateral à Direita) */
.drawer-membro-lateral {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: 400px;
  max-width: 90vw;
  background: var(--cinza-card);
  z-index: 1070;
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.18);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.drawer-membro-lateral.aberto {
  transform: translateX(0);
}

.drawer-membro-header {
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--cinza-borda);
  background: var(--cinza-bg);
}

.btn-fechar-drawer-membro {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--texto-mutado);
  padding: 4px 8px;
  border-radius: 6px;
}

.btn-fechar-drawer-membro:hover {
  background: var(--cinza-borda);
  color: var(--texto);
}

.drawer-membro-body {
  padding: 24px 20px;
  flex: 1;
}

.membro-ficha-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 24px;
}

.membro-ficha-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--cor-primaria-suave);
  color: var(--cor-primaria);
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(30, 58, 95, 0.15);
  border: 3px solid #ffffff;
}

.membro-ficha-secao {
  background: var(--cinza-bg);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border: 1px solid var(--cinza-borda);
}

.membro-ficha-secao-titulo {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--texto-mutado);
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.membro-ficha-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--cinza-borda);
}

.membro-ficha-item:last-child {
  border-bottom: none;
}

.membro-ficha-label {
  color: var(--texto-suave);
}

.membro-ficha-valor {
  font-weight: 600;
  color: var(--texto);
  text-align: right;
}

