/* ==========================================================================
   GRUPO BIN - ECOSSISTEMA MULTI-EMPRESAS & BPO FINANCEIRO CENTRALIZADO
   ========================================================================== */

/* SELETOR DE EMPRESAS NO TOPO (TOPBAR) */
.top-empresa-selector-container {
  position: relative;
  margin: 0 4px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.top-empresa-selector-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.4) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1.5px solid rgba(59, 130, 246, 0.4);
  border-radius: 9999px;
  padding: 4px 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  height: 32px;
  box-sizing: border-box;
}

.top-empresa-selector-btn:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.5) 0%, rgba(30, 58, 138, 0.85) 100%);
  border-color: #60a5fa;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

body.theme-light .top-empresa-selector-btn {
  background: #f1f5f9;
  border-color: #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.theme-light .top-empresa-selector-btn:hover {
  background: #e0f2fe;
  border-color: #38bdf8;
}

.top-empresa-selector-btn .empresa-icon {
  font-size: 15px;
  line-height: 1;
}

.top-empresa-selector-btn .empresa-info {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.top-empresa-selector-btn .empresa-label {
  font-size: 8px;
  font-weight: 800;
  color: #93c5fd;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  display: none; /* Mantém limpo por padrão */
}

@media (min-width: 1550px) {
  .top-empresa-selector-btn .empresa-label {
    display: block;
  }
}

.top-empresa-selector-btn .empresa-name {
  font-size: 11.5px;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.theme-light .top-empresa-selector-btn .empresa-name {
  color: #0f172a;
}

.top-empresa-selector-btn .empresa-arrow {
  font-size: 10px;
  color: #93c5fd;
  transition: transform 0.2s ease;
}

body.theme-light .top-empresa-selector-btn .empresa-arrow {
  color: #64748b;
}

.top-empresa-selector-container.open .top-empresa-selector-btn .empresa-arrow {
  transform: rotate(180deg);
}

.top-empresa-selector-container.open {
  z-index: 10000 !important;
  position: relative !important;
}

/* Dropdown Menu de Empresas */
.top-empresa-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 330px;
  background: #0f172a;
  border: 1.5px solid rgba(59, 130, 246, 0.45);
  border-radius: 12px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.8), 0 0 0 1.5px rgba(59, 130, 246, 0.4) !important;
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 100000 !important;
  backdrop-filter: blur(16px);
}

body.theme-light .top-empresa-dropdown {
  background: #ffffff !important;
  border: 2px solid #2563eb !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25), 0 0 0 1px #93c5fd !important;
}

body.theme-light .top-empresa-dropdown .dropdown-header {
  color: #0f172a !important;
  font-weight: 900 !important;
  font-size: 10px !important;
}

body.theme-light .top-empresa-dropdown .opt-title {
  color: #0f172a !important;
  font-weight: 800 !important;
}

body.theme-light .top-empresa-dropdown .opt-sub {
  color: #475569 !important;
}

body.theme-light .top-empresa-dropdown .empresa-option:hover {
  background: #eff6ff !important;
}

body.theme-light .top-empresa-dropdown .empresa-option.active {
  background: #dbeafe !important;
  border: 1px solid #3b82f6 !important;
}

.top-empresa-selector-container.open .top-empresa-dropdown {
  display: flex !important;
  animation: dropdownFadeIn 0.2s ease-out;
}

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

.top-empresa-dropdown .dropdown-header {
  font-size: 9.5px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 6px 8px 4px 8px;
}

.empresa-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.empresa-option:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.empresa-option.active {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(59, 130, 246, 0.4);
}

.empresa-option .opt-icon {
  font-size: 20px;
  width: 28px;
  text-align: center;
}

.empresa-option .opt-details {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.empresa-option .opt-title {
  font-size: 12px;
  font-weight: 800;
  color: #f8fafc;
}

.empresa-option .opt-sub {
  font-size: 10px;
  color: #94a3b8;
}

.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}

.empresa-option.opt-new-company {
  background: rgba(14, 165, 233, 0.08);
  border: 1px dashed rgba(14, 165, 233, 0.35);
}

.empresa-option.opt-new-company:hover {
  background: rgba(14, 165, 233, 0.18);
  border-color: #38bdf8;
}

/* ==========================================================================
   INCENSE CHURCH - MÓDULO MINISTERIAL
   ========================================================================== */
.church-hero-card {
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.35) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1.5px solid rgba(168, 85, 247, 0.3);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.church-hero-title h2 {
  font-size: 22px;
  font-weight: 900;
  color: #f3e8ff;
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.church-hero-title p {
  margin: 0;
  font-size: 12.5px;
  color: #c084fc;
}

.church-kpis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.church-kpi-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.church-kpi-card .kpi-label {
  font-size: 11px;
  font-weight: 700;
  color: #c084fc;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.church-kpi-card .kpi-value {
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
}

.church-kpi-card .kpi-sub {
  font-size: 10.5px;
  color: #94a3b8;
}

/* ==========================================================================
   PROGRAMA FAÇA A DIFERENÇA - MÓDULO SOCIAL
   ========================================================================== */
.social-hero-card {
  background: linear-gradient(135deg, rgba(153, 27, 27, 0.35) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1.5px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.social-hero-title h2 {
  font-size: 22px;
  font-weight: 900;
  color: #fee2e2;
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-hero-title p {
  margin: 0;
  font-size: 12.5px;
  color: #f87171;
}

.social-kpis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.social-kpi-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.social-kpi-card .kpi-label {
  font-size: 11px;
  font-weight: 700;
  color: #f87171;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.social-kpi-card .kpi-value {
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
}

.social-kpi-card .kpi-sub {
  font-size: 10.5px;
  color: #94a3b8;
}

/* ==========================================================================
   HOLDING CENTRAL - BPO FINANCEIRO DAS EMPRESAS
   ========================================================================== */
.holding-companies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.holding-company-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s ease;
}

.holding-company-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.holding-company-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.holding-company-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.holding-company-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.holding-company-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(0, 0, 0, 0.2);
  padding: 10px;
  border-radius: 8px;
}

.holding-company-actions {
  display: flex;
  gap: 8px;
}

/* Abas de Navegação Interna dos Módulos */
.suite-module-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.suite-module-tab-btn {
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: #94a3b8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.suite-module-tab-btn.active {
  color: #ffffff;
  border-color: currentColor;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Botões Temáticos */
.btn-church {
  background: linear-gradient(135deg, #7e22ce 0%, #a855f7 100%);
  color: #ffffff;
  border: none;
}
.btn-church:hover {
  background: linear-gradient(135deg, #6b21a8 0%, #9333ea 100%);
}

.btn-social {
  background: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%);
  color: #ffffff;
  border: none;
}
.btn-social:hover {
  background: linear-gradient(135deg, #991b1b 0%, #dc2626 100%);
}

@media (max-width: 768px) {
  .top-empresa-dropdown {
    width: 290px;
    left: auto;
    right: 0;
  }
}

/* ==========================================================================
   ESTILOS DO DEMONSTRATIVO DE RECEITAS INCENSE CHURCH (MOBILE & DESKTOP)
   ========================================================================== */
.incense-church-view {
  display: none;
  flex-direction: column;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 100vh;
  box-sizing: border-box !important;
  background: radial-gradient(circle at 50% 0%, #1e1035 0%, #0d121f 65%, #060b13 100%);
  animation: fadeInMobile 0.2s ease-out;
}

.church-top-header {
  border-bottom: 1px solid rgba(168, 85, 247, 0.3) !important;
}

.church-privacy-card {
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.25) 0%, rgba(15, 23, 42, 0.7) 100%);
  border: 1.5px solid rgba(168, 85, 247, 0.4);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.privacy-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.privacy-status-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}
.privacy-status-badge.badge-nominal {
  background: rgba(168, 85, 247, 0.25);
  color: #d8b4fe;
  border: 1px solid #c084fc;
}
.privacy-status-badge.badge-anonimo {
  background: rgba(234, 179, 8, 0.2);
  color: #fef08a;
  border: 1px solid #eab308;
}

.church-mode-switch-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: 10px;
}

.btn-church-mode {
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.btn-church-mode.active {
  background: linear-gradient(135deg, #7e22ce 0%, #9333ea 100%);
  color: #ffffff;
  border-color: #c084fc;
  box-shadow: 0 2px 8px rgba(126, 34, 206, 0.4);
}

.church-mode-hint {
  margin: 0;
  font-size: 11.5px;
  color: #cbd5e1;
  line-height: 1.45;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.church-filters-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.church-selection-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.church-subtotal-badge {
  font-size: 12px;
  color: #e2e8f0;
  font-weight: 600;
}
.church-subtotal-badge strong {
  color: #34d399;
  font-size: 13.5px;
  font-weight: 900;
}

/* Cards Mobile Nativos */
.church-mobile-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.15s ease;
  cursor: pointer;
  user-select: none;
}

.church-mobile-card.is-selected {
  border-color: #a855f7;
  background: rgba(88, 28, 135, 0.15);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.15);
}

.church-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.church-card-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #a855f7;
}

.church-card-membro-name {
  font-size: 14px;
  font-weight: 800;
  color: #f8fafc;
}
.church-card-membro-name.name-anonimo {
  color: #94a3b8;
  font-weight: 600;
  font-style: italic;
}

.church-badge-tipo {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
}

.church-card-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: #94a3b8;
}

.church-card-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.church-card-forma {
  font-size: 12px;
  color: #cbd5e1;
  font-weight: 600;
}

.church-card-val {
  font-size: 16px;
  font-weight: 900;
  color: #34d399;
}

.btn-church-recibo {
  width: 100%;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.btn-church-recibo:hover {
  background: #7e22ce;
  border-color: #a855f7;
  color: #ffffff;
}

.church-mobile-membro-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px;
}

.church-row-selected {
  background: rgba(168, 85, 247, 0.1) !important;
}

/* ==========================================================================
   SUPORTE COMPLETO AO MODO CLARO (WCAG AAA - ALTO CONTRASTE)
   ========================================================================== */
body.mobile-theme-light .incense-church-view,
body.theme-light .incense-church-view {
  background: #f8fafc !important;
  color: #0f172a !important;
}

body.mobile-theme-light .church-hero-card,
body.theme-light .church-hero-card {
  background: linear-gradient(135deg, #faf5ff 0%, #ffffff 100%) !important;
  border-color: #d8b4fe !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

body.mobile-theme-light .church-hero-title h2,
body.theme-light .church-hero-title h2 {
  color: #4c1d95 !important;
}

body.mobile-theme-light .church-hero-title p,
body.theme-light .church-hero-title p {
  color: #6b21a8 !important;
}

body.mobile-theme-light .church-kpi-card,
body.theme-light .church-kpi-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

body.mobile-theme-light .church-kpi-card .kpi-label,
body.theme-light .church-kpi-card .kpi-label {
  color: #6b21a8 !important;
}

body.mobile-theme-light .church-kpi-card .kpi-value,
body.theme-light .church-kpi-card .kpi-value {
  color: #0f172a !important;
}

body.mobile-theme-light .church-privacy-card,
body.theme-light .church-privacy-card {
  background: #ffffff !important;
  border-color: #d8b4fe !important;
  box-shadow: 0 2px 8px rgba(126, 34, 206, 0.08) !important;
}

body.mobile-theme-light .church-mode-switch-group,
body.theme-light .church-mode-switch-group {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
}

body.mobile-theme-light .btn-church-mode,
body.theme-light .btn-church-mode {
  color: #475569 !important;
}

body.mobile-theme-light .btn-church-mode.active,
body.theme-light .btn-church-mode.active {
  background: linear-gradient(135deg, #7e22ce 0%, #6b21a8 100%) !important;
  color: #ffffff !important;
}

body.mobile-theme-light .church-mode-hint,
body.theme-light .church-mode-hint {
  background: #fdf4ff !important;
  color: #4c1d95 !important;
  border: 1px solid #f5d0fe !important;
}

body.mobile-theme-light .church-filters-card,
body.theme-light .church-filters-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

body.mobile-theme-light .church-selection-bar,
body.theme-light .church-selection-bar {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

body.mobile-theme-light .church-subtotal-badge,
body.theme-light .church-subtotal-badge {
  color: #1e293b !important;
}

body.mobile-theme-light .church-subtotal-badge strong,
body.theme-light .church-subtotal-badge strong {
  color: #047857 !important;
}

body.mobile-theme-light .church-mobile-card,
body.theme-light .church-mobile-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

body.mobile-theme-light .church-mobile-card.is-selected,
body.theme-light .church-mobile-card.is-selected {
  border-color: #7e22ce !important;
  background: #faf5ff !important;
}

body.mobile-theme-light .church-card-membro-name,
body.theme-light .church-card-membro-name {
  color: #0f172a !important;
  font-weight: 800 !important;
}

body.mobile-theme-light .church-card-membro-name.name-anonimo,
body.theme-light .church-card-membro-name.name-anonimo {
  color: #64748b !important;
}

body.mobile-theme-light .church-card-val,
body.theme-light .church-card-val {
  color: #047857 !important;
}

body.mobile-theme-light .btn-church-recibo,
body.theme-light .btn-church-recibo {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}
body.mobile-theme-light .btn-church-recibo:hover,
body.theme-light .btn-church-recibo:hover {
  background: #7e22ce !important;
  color: #ffffff !important;
}

body.mobile-theme-light .church-mobile-membro-card,
body.theme-light .church-mobile-membro-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

