/* ChurchFlow — estilos base
   Paleta e identidad definidas en el brief: azul #2563EB, verde #10B981,
   tipografía Poppins, Bootstrap 5, Font Awesome. El acento distintivo de
   esta interfaz es la marca "cf-mark" (aguja + línea de crecimiento) y el
   uso de un borde de color por categoría en el menú lateral, que ayuda a
   ubicarse entre los módulos sin depender solo de los iconos. */

:root {
  --cf-primary: #2563EB;
  --cf-primary-dark: #1D4ED8;
  --cf-secondary: #10B981;
  --cf-ink: #111827;
  --cf-muted: #6B7280;
  --cf-surface: #FFFFFF;
  --cf-bg: #F3F4F6;
  --cf-border: #E5E7EB;
  --cf-sidebar-bg: #111827;
  --cf-sidebar-ink: #CBD5E1;
  --cf-sidebar-ink-active: #FFFFFF;
  --cf-radius: 0.75rem;
}

[data-bs-theme="dark"] {
  --cf-ink: #E5E7EB;
  --cf-muted: #9CA3AF;
  --cf-surface: #1F2937;
  --cf-bg: #0F172A;
  --cf-border: #374151;
  --cf-sidebar-bg: #0B1220;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--cf-bg);
  color: var(--cf-ink);
}

a { text-decoration: none; }

/* ---------- Marca ---------- */
.cf-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.cf-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1.25rem 1.25rem 1rem;
  color: #fff;
}

.cf-brand-name {
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.1;
}

.cf-brand-sub {
  font-size: 0.72rem;
  color: #94A3B8;
  letter-spacing: .02em;
}

/* ---------- Layout general ---------- */
.cf-app {
  display: flex;
  min-height: 100vh;
}

.cf-sidebar {
  width: 264px;
  flex-shrink: 0;
  background: var(--cf-sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  transition: transform .2s ease;
  z-index: 1030;
}

.cf-main {
  flex: 1;
  margin-left: 264px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

@media (max-width: 991.98px) {
  .cf-sidebar { transform: translateX(-100%); }
  .cf-sidebar.is-open { transform: translateX(0); }
  .cf-main { margin-left: 0; }
}

/* ---------- Menú lateral ---------- */
.cf-nav-group-label {
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: .08em;
  color: #64748B;
  padding: 1rem 1.25rem 0.35rem;
}

.cf-nav-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 1.25rem;
  color: var(--cf-sidebar-ink);
  font-size: 0.9rem;
  border-left: 3px solid transparent;
  transition: background .12s ease, color .12s ease;
}

.cf-nav-link i { width: 1.1rem; text-align: center; opacity: .85; }

.cf-nav-link:hover {
  background: rgba(255,255,255,0.06);
  color: var(--cf-sidebar-ink-active);
}

.cf-nav-link.active {
  background: rgba(37, 99, 235, 0.18);
  color: var(--cf-sidebar-ink-active);
  border-left-color: var(--cf-primary);
  font-weight: 500;
}

.cf-nav-link.is-soon {
  opacity: .45;
  cursor: default;
  pointer-events: none;
}

.cf-nav-link.is-soon::after {
  content: 'Próx.';
  margin-left: auto;
  font-size: 0.62rem;
  border: 1px solid #475569;
  border-radius: 999px;
  padding: 0.05rem 0.4rem;
}

/* ---------- Topbar ---------- */
.cf-topbar {
  background: var(--cf-surface);
  border-bottom: 1px solid var(--cf-border);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.cf-theme-toggle, .cf-sidebar-toggle {
  border: 1px solid var(--cf-border);
  background: var(--cf-surface);
  color: var(--cf-ink);
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cf-sidebar-toggle { display: none; }
@media (max-width: 991.98px) {
  .cf-sidebar-toggle { display: inline-flex; }
}

/* ---------- Contenido ---------- */
.cf-content { padding: 1.5rem; }

.cf-card {
  background: var(--cf-surface);
  border: 1px solid var(--cf-border);
  border-radius: var(--cf-radius);
}

.cf-kpi {
  padding: 1.15rem 1.25rem;
}

.cf-kpi-label {
  font-size: 0.78rem;
  color: var(--cf-muted);
  margin-bottom: 0.35rem;
}

.cf-kpi-value {
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1;
}

.cf-kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: 0.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

.btn-cf-primary {
  background: var(--cf-primary);
  border-color: var(--cf-primary);
  color: #fff;
}
.btn-cf-primary:hover { background: var(--cf-primary-dark); color: #fff; }
