/* ====================================================
   AD Ministério Filadélfia de Jesus — Premium Theme
   Paleta: Navy #1a2744 + Dourado #c8a45c
   ==================================================== */

:root {
  --navy: #1a2744;
  --navy-light: #2d3f6b;
  --gold: #c8a45c;
  --gold-light: #e9c882;
  --gold-dark: #a88840;
  --white: #ffffff;
}

/* --- Tipografia --- */
body,
.fi-sidebar,
.fi-topbar,
.fi-main {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.fi-header-heading,
h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
}

/* --- Sidebar --- */
.fi-sidebar {
  background: linear-gradient(180deg, #1a2744 0%, #1e2e50 100%) !important;
  border-right: 1px solid rgba(200, 164, 92, 0.15) !important;
}

.fi-sidebar-nav-groups {
  padding: 0.5rem !important;
}

.fi-sidebar-group-label {
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  font-weight: 600 !important;
  padding: 0.75rem 0.75rem 0.3rem !important;
}

.fi-sidebar-item-button {
  color: #ffffff !important;
  border-radius: 10px !important;
  transition: all 0.2s ease !important;
  padding: 0.55rem 0.75rem !important;
}

.fi-sidebar-item-button span,
.fi-sidebar-item-button .fi-sidebar-item-label {
  color: #ffffff !important;
}

.fi-sidebar-item-button:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

.fi-sidebar-item-button:hover span,
.fi-sidebar-item-button:hover .fi-sidebar-item-label {
  color: #ffffff !important;
}

/* fi-active fica no <li class="fi-sidebar-item">, não no <a> */
.fi-sidebar-item.fi-active .fi-sidebar-item-button {
  background: #ffffff !important;
  border: 1px solid rgba(200, 164, 92, 0.4) !important;
  font-weight: 700 !important;
}

.fi-sidebar-item.fi-active .fi-sidebar-item-label,
.fi-sidebar-item.fi-active .fi-sidebar-item-button span {
  color: #000000 !important;
}

.fi-sidebar-item.fi-active .fi-sidebar-item-icon {
  color: #1a2744 !important;
}

.fi-sidebar-item-icon {
  color: #ffffff !important;
}

/* --- Brand logo / nome --- */
.fi-sidebar-header {
  padding: 1.25rem 1rem !important;
  border-bottom: 1px solid rgba(200, 164, 92, 0.15) !important;
}

.fi-logo {
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  line-height: 1.3 !important;
}

/* --- Topbar --- */
.fi-topbar {
  background: #ffffff !important;
  border-bottom: 1px solid rgba(26, 39, 68, 0.08) !important;
  box-shadow: 0 1px 8px rgba(26, 39, 68, 0.06) !important;
}

/* --- Cards e Widgets --- */
.fi-wi-stats-overview-stat,
.fi-card {
  border-radius: 14px !important;
  box-shadow: 0 2px 12px rgba(26, 39, 68, 0.07) !important;
  transition: box-shadow 0.2s ease, transform 0.2s ease !important;
  border: 1px solid rgba(26, 39, 68, 0.06) !important;
}

.fi-wi-stats-overview-stat:hover,
.fi-card:hover {
  box-shadow: 0 6px 20px rgba(26, 39, 68, 0.12) !important;
  transform: translateY(-1px) !important;
}

/* --- Botões primários --- */
.fi-btn-primary {
  background: linear-gradient(135deg, #1a2744, #2d3f6b) !important;
  border: 1px solid #1a2744 !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
}

.fi-btn-primary:hover {
  background: linear-gradient(135deg, #2d3f6b, #1a2744) !important;
  box-shadow: 0 4px 14px rgba(26, 39, 68, 0.3) !important;
  transform: translateY(-1px) !important;
}

/* --- Botão danger (PDF) --- */
.fi-btn-danger {
  background: linear-gradient(135deg, #b91c1c, #dc2626) !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
}

/* --- Tabelas --- */
.fi-ta-header-cell {
  background: #f8f9fc !important;
  font-weight: 700 !important;
  font-size: 0.72rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.07em !important;
  color: #1a2744 !important;
}

.fi-ta-row:hover .fi-ta-cell {
  background: rgba(26, 39, 68, 0.03) !important;
}

/* --- Badges --- */
.fi-badge {
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 0.7rem !important;
}

/* --- Forms --- */
.fi-input,
.fi-select-input {
  border-radius: 10px !important;
  border-color: rgba(26, 39, 68, 0.2) !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}

.fi-input:focus,
.fi-select-input:focus {
  border-color: #1a2744 !important;
  box-shadow: 0 0 0 3px rgba(26, 39, 68, 0.1) !important;
}

/* --- Seções dos forms --- */
.fi-section {
  border-radius: 14px !important;
  box-shadow: 0 1px 8px rgba(26, 39, 68, 0.05) !important;
}

.fi-section-header {
  border-bottom-color: rgba(200, 164, 92, 0.2) !important;
}

/* --- Tabs --- */
.fi-tabs-tab[aria-selected="true"] {
  border-bottom-color: #c8a45c !important;
  color: #1a2744 !important;
  font-weight: 700 !important;
}

/* --- Navigation badge --- */
.fi-sidebar-item-badge {
  background: #c8a45c !important;
  color: #1a2744 !important;
  font-weight: 700 !important;
}

/* --- Page header --- */
.fi-page-header-heading {
  color: #1a2744 !important;
  font-family: 'Playfair Display', Georgia, serif !important;
  font-weight: 700 !important;
}

/* --- Notificações --- */
.fi-no-notification {
  border-radius: 14px !important;
  box-shadow: 0 8px 24px rgba(26, 39, 68, 0.12) !important;
}

/* --- Dashboard grid --- */
.fi-wi {
  border-radius: 16px !important;
}

/* --- Scrollbar customizada --- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(26, 39, 68, 0.2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(200, 164, 92, 0.5); }

/* --- Login Page Override --- */
.fi-simple-page {
  background: #f0f2f8 !important;
}

.fi-simple-layout {
  background: #fff !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 60px rgba(26, 39, 68, 0.15) !important;
  overflow: hidden !important;
  max-width: 900px !important;
  min-height: 520px !important;
  display: flex !important;
}

/* --- Chart widgets --- */
.fi-wi-chart {
  background: #fff !important;
  border-radius: 16px !important;
  border: 1px solid rgba(26, 39, 68, 0.07) !important;
}

/* Animações suaves */
.fi-sidebar-item-button,
.fi-btn,
.fi-card,
.fi-wi-stats-overview-stat {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* --- Dark Mode --- */
.dark .fi-sidebar {
  background: linear-gradient(180deg, #0f172a 0%, #1a2744 100%) !important;
}

.dark .fi-topbar {
  background: #1e293b !important;
  border-bottom-color: rgba(200, 164, 92, 0.1) !important;
}

.dark .fi-main {
  background: #0f172a !important;
}

.dark .fi-card,
.dark .fi-wi-stats-overview-stat {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}

.dark .fi-wi-chart {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}

.dark .fi-section {
  background: #1e293b !important;
}

.dark .fi-ta-header-cell {
  background: #0f172a !important;
  color: rgba(200, 164, 92, 0.8) !important;
}

.dark .fi-page-header-heading {
  color: #c8a45c !important;
}

.dark .fi-tabs-tab[aria-selected="true"] {
  color: #c8a45c !important;
}

.dark body {
  background: #0f172a !important;
}

/* --- Botão Dark Mode — garantir visibilidade --- */
.fi-theme-switcher-btn,
[data-theme-switcher],
button[title*="dark"],
button[title*="light"],
button[title*="theme"],
button[aria-label*="dark"],
button[aria-label*="theme"] {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.dark .fi-icon-btn svg {
  color: rgba(200, 164, 92, 0.8);
}

.dark::-webkit-scrollbar-thumb {
  background: rgba(200, 164, 92, 0.25);
}

.dark .fi-simple-page {
  background: #0f172a !important;
}

.dark .fi-simple-layout {
  background: #1e293b !important;
  border: 1px solid rgba(200, 164, 92, 0.15) !important;
}
