/* =====================================================================
   PWD Fund Management System — visual theme
   Palette draws from the Ghana flag, desaturated for a calm civic feel:
   deep forest green (trust/government), warm gold (the fund itself),
   a quiet terracotta-red used only for alerts/errors, and warm paper
   neutrals instead of stark white.
   ===================================================================== */

:root {
  --gh-green:        #0a4d3c;
  --gh-green-dark:   #07332a;
  --gh-green-light:  #e6f0ec;
  --gh-gold:         #d4a017;
  --gh-gold-light:   #fbf1da;
  --gh-red:          #b3422f;
  --gh-red-light:    #fbeae6;
  --paper:           #f7f5f1;
  --card:            #ffffff;
  --ink:             #1f2421;
  --ink-soft:        #5b655f;
  --border:          #e3ded3;
  --radius:          10px;
  --shadow: 0 1px 2px rgba(20,30,25,0.04), 0 4px 14px rgba(20,30,25,0.06);
}

* { box-sizing: border-box; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  margin: 0;
}

a { color: var(--gh-green); text-decoration: none; }

/* ---------- Auth / login screen ---------- */
.auth-body {
  background: linear-gradient(160deg, var(--gh-green-dark) 0%, var(--gh-green) 55%, #0d5c47 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
}
.auth-wrap { width: 100%; display: flex; justify-content: center; padding: 24px; }
.auth-card {
  background: var(--card);
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.auth-brand { text-align: center; margin-bottom: 28px; }
.auth-brand h1 { font-size: 1.25rem; font-weight: 700; margin: 14px 0 4px; color: var(--gh-green-dark); }
.auth-emblem {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--gh-gold); color: var(--gh-green-dark);
  font-weight: 800; font-size: 1.1rem; letter-spacing: 1px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto; border: 3px solid var(--gh-green);
}
.auth-emblem-sm { width: 38px; height: 38px; font-size: 0.85rem; border-width: 2px; }
.auth-footnote { font-size: 0.78rem; color: var(--ink-soft); text-align: center; margin-top: 20px; line-height: 1.5; }
.btn-primary {
  background: var(--gh-green); border-color: var(--gh-green);
}
.btn-primary:hover, .btn-primary:focus { background: var(--gh-green-dark); border-color: var(--gh-green-dark); }

/* ---------- App shell ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 252px;
  background: var(--gh-green-dark);
  color: #e8efe9;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 1040;
  transition: transform 0.25s ease;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.brand-title { font-weight: 700; font-size: 0.95rem; color: #fff; }
.brand-sub { font-size: 0.72rem; color: #a9c3b7; }

.sidebar-nav { padding: 10px 8px 30px; display: flex; flex-direction: column; }
.sidebar-nav a {
  color: #cfe0d6;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 2px;
}
.sidebar-nav a i { font-size: 1rem; width: 18px; text-align: center; }
.sidebar-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar-nav a.active { background: var(--gh-gold); color: var(--gh-green-dark); font-weight: 600; }
.nav-section {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: #7fa090; margin: 16px 12px 6px;
}

.sidebar-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 1030;
}
.sidebar-backdrop.show { display: block; }

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

.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  height: 60px;
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px;
  position: sticky; top: 0; z-index: 1020;
}
.topbar-mmda { font-weight: 600; color: var(--gh-green-dark); font-size: 0.92rem; }
.topbar-spacer { flex: 1; }
.icon-btn {
  background: none; border: none; color: var(--ink-soft); font-size: 1.2rem;
  width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--gh-green-light); color: var(--gh-green-dark); }
.notif-dot {
  position: absolute; top: 4px; right: 4px; background: var(--gh-red); color: #fff;
  font-size: 0.6rem; min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
.topbar-user-btn { background: none; border: none; display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--ink); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--gh-green);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem;
}

.page-content { padding: 22px; flex: 1; }
.page-footer { padding: 14px 22px; font-size: 0.75rem; color: var(--ink-soft); border-top: 1px solid var(--border); }

/* ---------- Cards / dashboard ---------- */
.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); height: 100%;
}
.stat-card .stat-value { font-size: 1.8rem; font-weight: 700; color: var(--gh-green-dark); }
.stat-card .stat-label { font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 4px; }
.stat-card.gold { border-left: 4px solid var(--gh-gold); }
.stat-card.green { border-left: 4px solid var(--gh-green); }
.stat-card.red { border-left: 4px solid var(--gh-red); }

.panel {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px;
}
.panel-title { font-weight: 700; color: var(--gh-green-dark); margin-bottom: 14px; font-size: 1rem; }

.badge-pending { background: var(--gh-gold-light); color: #8a6a10; }
.badge-verified { background: var(--gh-green-light); color: var(--gh-green-dark); }
.badge-rejected { background: var(--gh-red-light); color: var(--gh-red); }

.table thead th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); border-bottom: 2px solid var(--border); }
.table td, .table th { vertical-align: middle; }

.allocation-bar { height: 8px; border-radius: 4px; background: var(--border); overflow: hidden; }
.allocation-bar > span { display: block; height: 100%; background: var(--gh-green); }

/* ---------- Mobile responsiveness ---------- */
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 30px rgba(0,0,0,0.3); }
  .main-col { margin-left: 0; }
  .page-content { padding: 14px; }
  .topbar { padding: 0 12px; }
}
