/* ============================================================
   TEMA DINÂMICO — gerado por tema.php
   Sobrescreve TODAS as cores hardcoded #1a237e / #283593
   ============================================================ */

/* ── 1. Variáveis CSS globais ─────────────────────────────── */
:root {
    --primary-gold:        #1a237e !important;
    --primary-gold-dark:   #283593 !important;
    --primary-gold-light:  #c5cae9 !important;
    --sidebar-bg:          #1A1A18 !important;
    --sidebar-dark:        #2A2A28 !important;
    --sidebar-text:        #CBD5E1 !important;
    --gold:                #1a237e !important;
    --gold-dark:           #283593 !important;
    --gold-hover:          #283593 !important;
    --gold-light:          #c5cae9 !important;
    --gold-gradient:       #1a237e !important;
    --cor-primaria:        #1a237e !important;
    --cor-primaria-dark:   #283593 !important;
    --cor-primaria-light:  #c5cae9 !important;
    --primary:             #1a237e !important;
    --primary-dark:        #283593 !important;
    /* --accent é usado em cadastro_membro.php */
    --accent:              #1a237e !important;
    --cor-neon:            #1a237e !important;
}

/* ── 2. Sidebar ───────────────────────────────────────────── */
.sidebar {
    background-color: #1A1A18 !important;
    background: #1A1A18 !important;
}
.sidebar .sidebar-header,
.sidebar-header {
    background-color: #2A2A28 !important;
    background: #2A2A28 !important;
}
.sidebar .nav-link.active {
    background: #1a237e !important;
    color: #fff !important;
    border-left-color: #1a237e !important;
}
.sidebar .nav-link:hover {
    color: #1a237e !important;
    background: #1a237e22 !important;
}
.sidebar .nav-link.active i,
.sidebar .nav-link.active span {
    color: #fff !important;
}
.sidebar .nav-section-title {
    color: #1a237e !important;
}
.sidebar .brand-text h5 {
    color: #1a237e !important;
}
.sidebar .sidebar-logo,
.sidebar-logo {
    border-color: #1a237e66 !important;
    box-shadow: 0 0 20px #1a237e33 !important;
}
.user-avatar,
.sidebar .user-avatar {
    background: #1a237e !important;
    color: #fff !important;
}

/* ── 3. Botões primários (todas as páginas) ───────────────── */
.btn-primary,
.btn-gold,
.btn.btn-primary,
.btn.btn-gold,
button.btn-primary,
a.btn-primary {
    background: #1a237e !important;
    background-color: #1a237e !important;
    border-color: #1a237e !important;
    color: #fff !important;
}
.btn-primary:hover,
.btn-gold:hover,
button.btn-primary:hover,
a.btn-primary:hover {
    background: #283593 !important;
    background-color: #283593 !important;
    border-color: #283593 !important;
    color: #fff !important;
}

/* ── 4. Botão de login ────────────────────────────────────── */
.btn-login {
    background: #1a237e !important;
}
.btn-login:hover {
    background: #283593 !important;
}
.modal-button {
    background: #1a237e !important;
}
.modal-header {
    background: #1a237e !important;
    background-color: #1a237e !important;
    color: #fff !important;
}
.modal-header .modal-title,
.modal-header button,
.modal-header .close,
.modal-header .btn-close {
    color: #fff !important;
}

/* ── 5. Ícones de estatística (dashboard e outras páginas) ── */
.stat-icon,
.stats-icon,
.card-icon,
.icon-circle,
.badge-icon,
.metric-icon,
.kpi-icon {
    background: #1a237e !important;
    color: #fff !important;
}

/* ── 6. Botão flutuante (theme toggle e similares) ────────── */
.floating-theme-toggle,
.fab-button,
.float-btn,
.btn-float,
.floating-btn {
    background: #1a237e !important;
}
.floating-theme-toggle:hover,
.fab-button:hover {
    background: #283593 !important;
}

/* ── 7. Cabeçalhos e barras decorativas de cards e sections ─ */
.welcome-card::before,
.stat-card::before,
.card-header-bar::before,
.card::before,
.dashboard-card::before,
.page-card::before,
.welcome-section::before,
.section-header::before,
[class*="card"]::before,
[class*="section"]::before {
    background: #1a237e !important;
}

/* ── 8. Títulos com gradiente (page-title, h2 destaque) ───── */
.page-title,
.welcome-content h2,
.gradient-text,
[class*="gradient-title"] {
    background: #1a237e !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* ── 9. Inputs, selects e textareas — foco ────────────────── */
input:focus,
select:focus,
textarea:focus,
.form-control:focus,
.form-select:focus,
.form-input:focus {
    border-color: #1a237e !important;
    box-shadow: 0 0 0 3px #1a237e33 !important;
    outline: none !important;
}

/* ── 10. Badges e etiquetas primárias ────────────────────── */
.badge-gold,
.badge-primary,
.tag-gold,
.tag-primary,
.label-gold,
.chip-gold {
    background: #c5cae9 !important;
    color: #283593 !important;
    border-color: #1a237e66 !important;
}
.badge-solid-gold,
.badge.badge-gold[class*="solid"] {
    background: #1a237e !important;
    color: #fff !important;
}

/* ── 11. Borders e destaques coloridos ───────────────────── */
.border-gold,
.border-primary,
[class*="border-gold"],
[class*="card-accent"],
[class*="section-accent"] {
    border-color: #1a237e !important;
}
.border-left-gold,
[class*="alert-primary"],
[class*="info-card"],
.stat-highlight,
.card-left-accent {
    border-left-color: #1a237e !important;
    color: #1a237e !important;
}

/* ── 12. Textos com cor primária ─────────────────────────── */
.text-gold,
.text-primary-gold,
.gold,
[class*="text-gold"],
.stat-number,
.header h1,
.header-title {
    color: #1a237e !important;
}

/* ── 13. Fundos com cor primária ─────────────────────────── */
.bg-gold,
.bg-primary,
.bg-primary-gold,
[class*="bg-gold"] {
    background-color: #1a237e !important;
    color: #fff !important;
}

/* ── 14. Links ────────────────────────────────────────────── */
a.primary-link,
.link-gold {
    color: #1a237e !important;
}
a.primary-link:hover,
.link-gold:hover {
    color: #283593 !important;
}

/* ── 15. Progress bars e sliders ─────────────────────────── */
.progress-bar,
.progress-fill,
[class*="progress-primary"],
input[type="range"]::-webkit-slider-thumb {
    background: #1a237e !important;
    background-color: #1a237e !important;
}

/* ── 16. Checkboxes e radios ─────────────────────────────── */
input[type="checkbox"]:checked,
input[type="radio"]:checked {
    accent-color: #1a237e !important;
    background-color: #1a237e !important;
}

/* ── 17. Tabs e abas ─────────────────────────────────────── */
.tab-item.active,
.nav-tab.active,
.tab.active,
[class*="tab"][class*="active"],
.wizard-step.active .step-number,
.wizard-step.active .step-circle {
    background: #1a237e !important;
    color: #fff !important;
    border-color: #1a237e !important;
}
.wizard-step.active .step-label,
.tab-item.active .tab-label {
    color: #1a237e !important;
}

/* ── 18. Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar-thumb {
    background: #1a237e !important;
}
::-webkit-scrollbar-thumb:hover {
    background: #283593 !important;
}

/* ── 19. Seleção de texto ─────────────────────────────────── */
::selection {
    background-color: #1a237e44 !important;
}

/* ── 20. Headers de seção / h1 destacados ────────────────── */
.header { border-bottom-color: #1a237e !important; }
.header h1 { color: #1a237e !important; }
.relatorio-header,
.section-header,
.page-header-accent {
    border-bottom-color: #1a237e !important;
}


/* ── 22. Avatar fallback e círculos coloridos ────────────── */
.avatar-circle,
[class*="avatar"][class*="gold"],
[class*="member-avatar"],
.circle-primary {
    background: #1a237e !important;
    color: #fff !important;
}

/* ── 23. Disparador WhatsApp e áreas especiais ───────────── */
[class*="whatsapp-btn"],
[class*="send-btn"],
[class*="disparar"],
[class*="enviar-btn"] {
    background: #1a237e !important;
    color: #fff !important;
}

/* ── 24. Responsivo — mobile menu ────────────────────────── */
.mobile-menu-btn:hover,
.hamburger-btn:hover {
    color: #1a237e !important;
}

/* ── 25. cadastro_membro.php — header, wizard, toggle ────── */
.form-header {
    background: #1a237e !important;
    background-color: #1a237e !important;
}
.wizard-step.active {
    background: #1a237e !important;
    background-color: #1a237e !important;
    border-color: #1a237e !important;
}
.wizard-step.active .step-label {
    color: #1a237e !important;
}
.wizard-step.completed {
    background: #283593 !important;
    border-color: #283593 !important;
}
.theme-toggle {
    background: #1a237e !important;
    background-color: #1a237e !important;
}
.theme-toggle:hover {
    background: #283593 !important;
}

/* ── 26. Badges de departamento (membros.php) ─────────────── */
.department-badge,
.dept-badge,
[class*="dept-tag"],
[class*="department-tag"] {
    background: #1a237e !important;
    color: #fff !important;
}

/* ── 27. Botão batismo inline (membros.php) ───────────────── */
.btn-batismo,
button[name="registrar_batismo"] {
    background: #1a237e !important;
    color: #fff !important;
    border: none !important;
}

/* ── 28. Elementos que usam var(--accent) como fundo (não links/textos) ── */
div[style*="var(--accent)"],
span[style*="var(--accent)"],
button[style*="var(--accent)"],
li[style*="var(--accent)"] {
    background-color: #1a237e !important;
}

/* ── 29. Visualizar membro — header do perfil ───────────── */
.profile-header {
    background: #1a237e !important;
}
.profile-header::before {
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%) !important;
}

/* ── 30. Aniversários — badges de data ───────────────────── */
.badge-today,
.badge-birthday,
.date-badge,
.birth-date-badge,
[class*="date-circle"],
[class*="aniv-badge"],
[class*="birth-badge"] {
    background: #1a237e !important;
    color: #fff !important;
}

/* ── 31. Editar membro — barras decorativas ──────────────── */
.member-header::before,
.edit-header::before,
.wizard-header::before,
[class*="member-card"]::before,
[class*="edit-card"]::before {
    background: #1a237e !important;
}

/* ── 32. Cor neon — textos e destaques ────────────────────── */
.text-gold,
.gold,
.text-primary-gold,
[class*="text-gold"],
.stat-number,
.stat-value,
.count-number,
.metric-value,
.kpi-value,
.highlight-number {
    color: #1a237e !important;
}
/* Link "Joe" e links de destaque */
.login-footer a,
a[style*="var(--gold)"],
.link-neon {
    color: #1a237e !important;
}
/* Empty state icons */
.empty-state i,
.empty-state .icon {
    color: #1a237e !important;
    opacity: 0.5;
}
/* Neon via variável CSS — para qualquer elemento que use var(--cor-neon) */
[style*="var(--cor-neon)"] {
    color: #1a237e !important;
}

/* ── 33. visualizar_membro — spiritual icons negativos ────── */
.spiritual-icon.no,
.spiritual-answer.no {
    color: #1a237e !important;
}

/* ── 34. Editar membro — barras topo de cards (::before) ─── */
.card-header::before,
.wizard-steps::before {
    background: #1a237e !important;
}

/* ============================================================
   MODERNIZAÇÃO GLOBAL — camada de polimento visual (2026)
   Aplicada em todas as páginas via <link href="tema.php">.
   Apenas refina aparência; não altera estrutura/lógica.
   ============================================================ */

/* Tipografia mais nítida em todo o sistema */
* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* Botões: cantos suaves, transição fluida e leve elevação no hover */
.btn, button.btn, a.btn, .btn-primary, .btn-gold, .btn-login,
.modal-button, .lock-btn, .photo-btn, input[type="submit"], button[type="submit"] {
    border-radius: 12px !important;
    transition: transform .18s cubic-bezier(.4,0,.2,1), box-shadow .18s cubic-bezier(.4,0,.2,1), background .18s ease !important;
    letter-spacing: .2px;
}
.btn:hover, button.btn:hover, a.btn:hover, .btn-primary:hover, .btn-gold:hover,
.btn-login:hover, .modal-button:hover, input[type="submit"]:hover, button[type="submit"]:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 22px -8px #1a237e66 !important;
}
.btn:active, button.btn:active, .btn-primary:active { transform: translateY(0) !important; }

/* Inputs e selects: borda suave, foco moderno (reforça o item 9) */
input[type=text], input[type=tel], input[type=url], input[type=password],
input[type=email], input[type=number], input[type=date], input[type=search],
textarea, select, .form-control, .form-input, .form-select {
    border-radius: 10px !important;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease !important;
}

/* Cards e caixas: cantos mais suaves e sombra moderna e discreta */
.card, .stat-card, .dashboard-card, .page-card, .welcome-card,
.info-card, .lock-card, .member-card, .panel, .box-card, .content-card {
    border-radius: 16px !important;
    box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px -12px rgba(16,24,40,.18) !important;
    transition: transform .2s cubic-bezier(.4,0,.2,1), box-shadow .2s cubic-bezier(.4,0,.2,1) !important;
}
.card:hover, .stat-card:hover, .dashboard-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 4px 8px rgba(16,24,40,.06), 0 16px 32px -12px rgba(16,24,40,.22) !important;
}

/* Sidebar: itens com transição suave e item ativo com leve brilho */
.sidebar .nav-link { border-radius: 12px !important; }
.sidebar .nav-link.active {
    box-shadow: 0 8px 18px -8px #1a237eaa !important;
}

/* Tabelas: cabeçalho sólido e linhas com hover */
table thead th { letter-spacing: .3px; }
table tbody tr { transition: background .15s ease; }
table tbody tr:hover { background: #1a237e0d !important; }

/* Modais: cantos arredondados modernos */
.modal-content, .modal-dialog .modal-content, .modal-card {
    border-radius: 18px !important;
    overflow: hidden;
    border: none !important;
    box-shadow: 0 24px 48px -16px rgba(16,24,40,.45) !important;
}

/* Badges/etiquetas: formato pílula */
.badge, .tag, .chip, .label-pill { border-radius: 999px !important; }

/* Rolagem mais discreta */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   SIDEBAR / MENU SENSÍVEL AO TEMA
   Modo claro  → menu e sistema claros
   Modo escuro → menu e sistema escuros
   (vence as cores fixas das páginas por usar [data-theme] .sidebar)
   ============================================================ */

/* ───── MODO CLARO: menu claro ───── */
[data-theme="light"] .sidebar {
    background: #ffffff !important;
    border-right: 1px solid #e5e7eb !important;
}
[data-theme="light"] .sidebar .sidebar-header,
[data-theme="light"] .sidebar-header {
    background: #ffffff !important;
    border-bottom: 1px solid #eef1f5 !important;
}
[data-theme="light"] .sidebar .sidebar-footer,
[data-theme="light"] .sidebar-footer {
    border-top: 1px solid #eef1f5 !important;
}
[data-theme="light"] .sidebar .nav-link {
    color: #475569 !important;
    background: transparent !important;
}
[data-theme="light"] .sidebar .nav-link i { color: #64748b !important; opacity: .9 !important; }
[data-theme="light"] .sidebar .nav-link:hover {
    color: #1a237e !important;
    background: #1a237e14 !important;
}
[data-theme="light"] .sidebar .nav-link:hover i { color: #1a237e !important; }
[data-theme="light"] .sidebar .nav-link.active,
[data-theme="light"] .sidebar .nav-link.active i,
[data-theme="light"] .sidebar .nav-link.active span {
    color: #ffffff !important;
}
[data-theme="light"] .sidebar .nav-link.active {
    background: #1a237e !important;
}
[data-theme="light"] .sidebar .nav-section-title { color: #94a3b8 !important; }
[data-theme="light"] .sidebar .brand-text h5 { color: #1a237e !important; }
[data-theme="light"] .sidebar .brand-text p  { color: #64748b !important; }
[data-theme="light"] .sidebar .user-details h6 { color: #1f2937 !important; }
[data-theme="light"] .sidebar .user-details p  { color: #64748b !important; }

/* ───── MODO ESCURO: menu escuro ───── */
[data-theme="dark"] .sidebar {
    background: #15151a !important;
    border-right: 1px solid #26262c !important;
}
[data-theme="dark"] .sidebar .sidebar-header,
[data-theme="dark"] .sidebar-header {
    background: #15151a !important;
    border-bottom: 1px solid #26262c !important;
}
[data-theme="dark"] .sidebar .sidebar-footer,
[data-theme="dark"] .sidebar-footer {
    border-top: 1px solid #26262c !important;
}
[data-theme="dark"] .sidebar .nav-link {
    color: #cbd5e1 !important;
    background: transparent !important;
}
[data-theme="dark"] .sidebar .nav-link i { color: #94a3b8 !important; opacity: .95 !important; }
[data-theme="dark"] .sidebar .nav-link:hover {
    color: #ffffff !important;
    background: rgba(255,255,255,.08) !important;
}
[data-theme="dark"] .sidebar .nav-link:hover i { color: #ffffff !important; }
[data-theme="dark"] .sidebar .nav-link.active,
[data-theme="dark"] .sidebar .nav-link.active i,
[data-theme="dark"] .sidebar .nav-link.active span {
    color: #ffffff !important;
}
[data-theme="dark"] .sidebar .nav-link.active {
    background: #1a237e !important;
}
[data-theme="dark"] .sidebar .nav-section-title { color: #7c8597 !important; }
[data-theme="dark"] .sidebar .brand-text h5 { color: #ffffff !important; }
[data-theme="dark"] .sidebar .brand-text p  { color: #94a3b8 !important; }
[data-theme="dark"] .sidebar .user-details h6 { color: #f1f5f9 !important; }
[data-theme="dark"] .sidebar .user-details p  { color: #94a3b8 !important; }

/* ───── MODO ESCURO: legibilidade de textos/destaques ───── */
[data-theme="dark"] .page-title,
[data-theme="dark"] .welcome-content h2,
[data-theme="dark"] .gradient-text,
[data-theme="dark"] [class*="gradient-title"] {
    background: none !important;
    -webkit-background-clip: border-box !important;
    -webkit-text-fill-color: #c5cae9 !important;
    background-clip: border-box !important;
    color: #c5cae9 !important;
}
[data-theme="dark"] .stat-number,
[data-theme="dark"] .stat-value,
[data-theme="dark"] .count-number,
[data-theme="dark"] .metric-value,
[data-theme="dark"] .kpi-value,
[data-theme="dark"] .highlight-number,
[data-theme="dark"] .text-gold,
[data-theme="dark"] .gold,
[data-theme="dark"] [class*="text-gold"],
[data-theme="dark"] [style*="var(--cor-neon)"] {
    color: #9fa8da !important;
}

/* ───── LOGO sempre visível (fundo branco no círculo, claro e escuro) ───── */
.sidebar .sidebar-logo, .sidebar-logo {
    background: #ffffff !important;
}
.sidebar .sidebar-logo img, .sidebar-logo img {
    background: #ffffff !important;
    object-fit: cover !important;
}

/* ───── Hover do menu BEM visível no modo claro (texto azul, fundo claro) ───── */
[data-theme="light"] .sidebar .nav-link:hover,
[data-theme="light"] .sidebar .nav-link:hover i,
[data-theme="light"] .sidebar .nav-link:hover span {
    color: #1a237e !important;
}
[data-theme="light"] .sidebar .nav-link:hover {
    background: #1a237e1f !important;
}

/* ============================================================
   BOTÕES — cores SÓLIDAS e visíveis (claro e escuro)
   Cada tipo recebe sua cor de fundo + texto contrastante.
   Substitui qualquer degradê e evita botão branco invisível.
   ============================================================ */
.btn-primary, button.btn-primary, a.btn-primary,
.btn-gold, .btn.btn-primary {
    background: #1a237e !important;
    color: #ffffff !important; border: none !important;
}
.btn-primary:hover, button.btn-primary:hover, a.btn-primary:hover {
    background: #283593 !important; color: #fff !important;
}
.btn-success, .btn-share-pdf, .btn-whatsapp {
    background: #16a34a !important; color: #fff !important; border: none !important;
}
.btn-success:hover, .btn-share-pdf:hover { background: #15803d !important; color:#fff !important; }
.btn-warning {
    background: #f59e0b !important; color: #ffffff !important; border: none !important;
}
.btn-warning:hover { background: #d97706 !important; }
.btn-danger {
    background: #ef4444 !important; color: #ffffff !important; border: none !important;
}
.btn-danger:hover { background: #dc2626 !important; }
.btn-info {
    background: #0ea5e9 !important; color: #ffffff !important; border: none !important;
}
/* Secundário: cinza claro no tema claro, cinza escuro no tema escuro */
.btn-secondary, .btn-outline-secondary {
    background: #e8eaf0 !important; color: #1f2937 !important; border: 1px solid #cdd3df !important;
}
.btn-secondary:hover, .btn-outline-secondary:hover {
    background: #dde1ea !important; color: #1a237e !important;
}
[data-theme="dark"] .btn-secondary, [data-theme="dark"] .btn-outline-secondary {
    background: #3a3a44 !important; color: #e5e7eb !important; border-color: #4a4a55 !important;
}
[data-theme="dark"] .btn-secondary:hover, [data-theme="dark"] .btn-outline-secondary:hover {
    background: #45454f !important; color: #fff !important;
}
/* Ícones/avatares com cor sólida (sem degradê) */
.stat-icon, .stats-icon, .card-icon, .icon-circle, .badge-icon, .metric-icon,
.kpi-icon, .user-avatar, .sidebar .user-avatar, .floating-theme-toggle, .fab-button {
    background: #1a237e !important; background-image: none !important; color: #fff !important;
}
.welcome-section, .welcome-card, .department-badge, .dept-badge {
    background-image: none !important;
}
