:root {
  --brand-primary: #1b5e20;
  --brand-primary-dark: #0c3d10;
  --brand-accent: #f9a825;
  --brand-soft: #e8f5e9;
  --brand-light-bg: #f6f9f6;
  --text-muted-2: #6c757d;
}

body {
  background: var(--brand-light-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #2b2b2b;
}

.app-navbar {
  background: linear-gradient(90deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.app-navbar .nav-link {
  font-weight: 500; padding: 0.5rem 0.9rem !important;
  border-radius: 6px; margin: 0 2px;
}
.app-navbar .nav-link:hover { background: rgba(255, 255, 255, 0.12); }

/* Styled confirmation modal (replaces the browser's plain confirm() box) */
.faida-confirm {
  border: none;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}
.faida-confirm-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto;
}
.faida-confirm-icon.danger { background: #fdecea; color: #c62828; }
.faida-confirm-icon.primary { background: var(--brand-soft); color: var(--brand-primary); }
.faida-confirm h5 { font-weight: 600; color: #2b2b2b; }

/* Yellow pending-action badge on navbar dropdowns — pulses softly to draw the eye */
.app-navbar .nav-link .badge.bg-warning {
  font-weight: 500;
  box-shadow: 0 0 0 0 rgba(249, 168, 37, 0.6);
  animation: faida-pulse 2.2s infinite;
}
@keyframes faida-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(249, 168, 37, 0.65); }
  60%  { box-shadow: 0 0 0 8px rgba(249, 168, 37, 0);    }
  100% { box-shadow: 0 0 0 0   rgba(249, 168, 37, 0);    }
}

/* Make navbar dropdowns readable on desktop (white menus over the green bar) */
@media (min-width: 992px) {
  .app-navbar .dropdown-menu {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  }
  .app-navbar .dropdown-menu .dropdown-item {
    color: #2b2b2b;
    padding: 0.5rem 1rem;
  }
  .app-navbar .dropdown-menu .dropdown-item:hover {
    background: var(--brand-soft);
    color: var(--brand-primary-dark);
  }
  .app-navbar .dropdown-menu .dropdown-item .badge {
    margin-left: 0.5rem;
  }
}

/* Quick-find search box in the navbar — blends with the green theme */
.app-navbar .navbar-search .form-control {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
}
.app-navbar .navbar-search .form-control::placeholder {
  color: rgba(255, 255, 255, 0.65);
}
.app-navbar .navbar-search .form-control:focus {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}
.app-navbar .navbar-search .btn {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-left: none;
  color: #fff;
  transition: background 0.15s;
}
.app-navbar .navbar-search .btn:hover,
.app-navbar .navbar-search .btn:focus {
  background: rgba(255, 255, 255, 0.32);
  color: #fff;
}

/* On small/mobile screens the hamburger menu floats as a frosted-glass mirror
   panel anchored to the top-right corner, so the page below stays visible
   through it instead of being pushed down. */
@media (max-width: 991.98px) {
  .app-navbar .navbar-collapse {
    position: absolute;
    top: 100%;
    right: 0.5rem;
    left: auto;
    width: 280px;
    max-width: calc(100vw - 1rem);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    /* Frosted-glass mirror effect — the page below shows through */
    background: rgba(27, 94, 32, 0.78);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 0.75rem 0.5rem;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    z-index: 1050;
  }
  .app-navbar .navbar-collapse .nav-link {
    padding: 0.55rem 0.9rem !important;
  }
  .app-navbar .navbar-collapse .dropdown-menu {
    position: static;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
  }
}

.card {
  border: none; border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s ease;
}
.card:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); }
.card-header {
  background: white; border-bottom: 1px solid #eef1ee;
  font-weight: 600; border-radius: 12px 12px 0 0 !important;
}

.stat-card { border-radius: 14px; border: none; overflow: hidden; position: relative; }
.stat-card .stat-icon { position: absolute; right: -10px; top: -10px; font-size: 5rem; opacity: 0.12; }
.stat-card .stat-label {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.6px;
  font-weight: 600; opacity: 0.9;
}
.stat-card .stat-value { font-size: 1.7rem; font-weight: 700; margin-top: 0.3rem; }
.stat-card.bg-primary-soft { background: linear-gradient(135deg, #1b5e20, #2e7d32); color: white; }
.stat-card.bg-info-soft    { background: linear-gradient(135deg, #0277bd, #039be5); color: white; }
.stat-card.bg-warning-soft { background: linear-gradient(135deg, #ef6c00, #fb8c00); color: white; }
.stat-card.bg-danger-soft  { background: linear-gradient(135deg, #c62828, #e53935); color: white; }
.stat-card.bg-success-soft { background: linear-gradient(135deg, #2e7d32, #43a047); color: white; }
.stat-card.bg-dark-soft    { background: linear-gradient(135deg, #37474f, #546e7a); color: white; }

.btn-primary { background: var(--brand-primary); border-color: var(--brand-primary); }
.btn-primary:hover, .btn-primary:focus { background: var(--brand-primary-dark); border-color: var(--brand-primary-dark); }
.btn-outline-primary { color: var(--brand-primary); border-color: var(--brand-primary); }
.btn-outline-primary:hover { background: var(--brand-primary); border-color: var(--brand-primary); }

.table { background: white; border-radius: 10px; overflow: hidden; }
.table > thead { background: var(--brand-soft); color: var(--brand-primary-dark); }
.table > thead th {
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
  font-size: 0.78rem; border-bottom: none;
}

.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  padding: 2rem 1rem;
}
.login-card {
  background: white; border-radius: 18px; padding: 2.5rem;
  max-width: 420px; width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
.login-card h1 { color: var(--brand-primary); font-weight: 700; margin-bottom: 0.25rem; }
.login-card .subtitle { color: var(--text-muted-2); margin-bottom: 2rem; }

.page-header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem;
}
.page-header h2 { font-weight: 700; margin: 0; color: var(--brand-primary-dark); }

.cat-gira_inka   { background: #8d6e63; color: white; }
.cat-school_fees { background: #1976d2; color: white; }
.cat-medical     { background: #c62828; color: white; }
.cat-ceremony    { background: #6a1b9a; color: white; }
.cat-operations  { background: #455a64; color: white; }
.cat-social_aid  { background: #2e7d32; color: white; }
.cat-other       { background: #757575; color: white; }

.status-active    { background: #2e7d32; color: white; }
.status-inactive  { background: #757575; color: white; }
.status-paid      { background: #1565c0; color: white; }
.status-defaulted { background: #c62828; color: white; }

.has-login-yes { background: #2e7d32; color: white; }
.has-login-no  { background: #e0e0e0; color: #424242; }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted-2); }
.empty-state i { font-size: 3.5rem; color: #c8e6c9; }
.text-money { font-variant-numeric: tabular-nums; font-weight: 600; }
