/* ===== DASHBOARD LAYOUT ===== */
.dash-body {
  background: #f0f4f8;
  display: flex;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 220px;
  min-height: 100vh;
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
}

.sidebar-sub {
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s;
}

.sidebar-link:hover { background: var(--bg); color: var(--navy); }

.sidebar-link.active {
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
}

.sidebar-icon { font-size: 1rem; width: 20px; text-align: center; }

.sidebar-bottom {
  padding: 0.75rem;
  border-top: 1px solid var(--border);
}

.sidebar-audit { color: var(--text-muted); }

/* ===== MAIN WRAPPER ===== */
.dash-wrapper {
  margin-left: 220px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== TOP BAR ===== */
.dash-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--navy);
}

.topbar-brand-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
}

.topbar-nav {
  display: flex;
  gap: 1.5rem;
}

.topbar-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
  padding-bottom: 2px;
}

.topbar-link.active {
  color: var(--teal);
  border-bottom: 2px solid var(--teal);
  font-weight: 600;
}

.topbar-link:hover { color: var(--navy); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
}

.search-icon-sm { font-size: 0.8rem; color: var(--text-muted); }

.topbar-search input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.8rem;
  color: var(--text);
  width: 160px;
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
  border-radius: 8px;
}

.icon-btn {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem;
  transition: color 0.2s;
}

.icon-btn:hover { color: var(--navy); }

.topbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ===== PAGE CONTENT ===== */
.dash-content {
  padding: 2rem 1.75rem 3rem;
  flex: 1;
}

/* ===== PAGE HEADER ===== */
.dash-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.dash-page-title h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
  margin-bottom: 0.4rem;
}

.dash-page-title p {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 340px;
}

.dash-page-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.time-filters {
  display: flex;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.2rem;
  gap: 0.1rem;
}

.time-btn {
  padding: 0.35rem 0.85rem;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.time-btn.active {
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
}

.state-select-dash {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  background: var(--white);
  outline: none;
  cursor: pointer;
}

/* ===== STAT CARDS ===== */
.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-card-dark {
  background: var(--navy);
  border-color: var(--navy);
}

.stat-card-dark .stat-label-sm { color: rgba(255,255,255,0.6); }
.stat-card-dark .stat-val-lg { color: var(--white); }
.stat-card-dark .stat-growth { color: #4ade80; }

.stat-label-sm {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.5rem;
}

.stat-val-lg {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-growth {
  font-size: 0.78rem;
  font-weight: 700;
}

.stat-growth.positive { color: var(--success); }

.stat-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ===== CHART ===== */
.dash-chart-card {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
}

.chart-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.chart-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.2rem;
}

.chart-subtitle {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chart-toggle {
  display: flex;
  gap: 0.4rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.2rem;
}

.chart-toggle-btn {
  padding: 0.35rem 0.85rem;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.chart-toggle-btn.active {
  background: var(--teal);
  color: var(--white);
  font-weight: 600;
}

.chart-wrap {
  position: relative;
  height: 260px;
}

/* ===== ALERTS ===== */
.alerts-banner {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  border-left: 4px solid #ef4444;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.alerts-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-icon { font-size: 1rem; }

.alerts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.alert-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.alert-red { background: #fff5f5; border-color: #fecaca; }
.alert-green { background: #f0fdf4; border-color: #bbf7d0; }

.alert-card-icon { font-size: 0.9rem; margin-top: 0.1rem; flex-shrink: 0; }

.alert-tag {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
}

.alert-red .alert-tag { color: #ef4444; }
.alert-green .alert-tag { color: var(--success); }

.alert-card p {
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.4;
  margin: 0;
}

/* ===== BOTTOM GRID ===== */
.dash-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ===== RECENT REQUESTS ===== */
.recent-requests-card { padding: 1.5rem; }

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.card-header-row h3 { font-size: 1rem; font-weight: 700; color: var(--navy); }

.card-subtitle {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.2rem;
}

.view-all-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
}

.view-all-link:hover { color: var(--teal-dark); }

.recent-request-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.recent-request-item:last-child { border-bottom: none; }

.req-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.req-body { flex: 1; min-width: 0; }

.req-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.15rem;
}

.req-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.req-status {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.req-fulfilled { background: #d1fae5; color: #065f46; }
.req-review { background: #dbeafe; color: #1d4ed8; }
.req-new { background: #fee2e2; color: #991b1b; }

/* ===== REGIONAL REACH ===== */
.regional-reach-card { padding: 1.5rem; }

.high-activity-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.nigeria-map {
  height: 220px;
  border-radius: 10px;
  overflow: hidden;
  margin: 1rem 0;
  border: 1px solid var(--border);
}

/* Override Leaflet defaults for clean look */
.nigeria-map .leaflet-container {
  background: #e8f5f3;
  border-radius: 10px;
}

.leaflet-popup-content-wrapper {
  border-radius: 10px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12) !important;
  font-family: 'Inter', sans-serif !important;
}

.leaflet-popup-content {
  margin: 12px 16px !important;
  font-size: 0.8rem !important;
  line-height: 1.6 !important;
}

.map-popup-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #0f172a;
  margin-bottom: 6px;
  border-bottom: 2px solid #0d9488;
  padding-bottom: 4px;
}

.map-popup-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: #64748b;
}

.map-popup-row span:last-child {
  font-weight: 700;
  color: #0f172a;
}

.regional-zones { display: flex; flex-direction: column; gap: 0.85rem; }

.zone-item {}

.zone-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}

.zone-pct {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.zone-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.zone-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 2px;
  width: var(--w, 0%);
  transition: width 1s ease;
}

/* ===== VOLUNTEER ACTIVITY ===== */
.volunteer-card { padding: 1.5rem; }

.volunteer-grid {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.volunteer-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.volunteer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.volunteer-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--navy);
}

.volunteer-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.volunteer-status {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.1rem;
}

.volunteer-top-state {
  margin-left: auto;
  background: var(--navy);
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  text-align: center;
  min-width: 140px;
}

.top-state-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
}

.top-state-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
}

.top-state-sub {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  margin-top: 0.2rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .dash-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-bottom-grid { grid-template-columns: 1fr; }
  .topbar-nav { display: none; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .dash-wrapper { margin-left: 0; }
  .sidebar-toggle { display: block; }
  .topbar-search { display: none; }
  .alerts-grid { grid-template-columns: 1fr; }
  .volunteer-top-state { margin-left: 0; }
}

@media (max-width: 480px) {
  .dash-stats-grid { grid-template-columns: 1fr 1fr; }
  .dash-page-header { flex-direction: column; }
  .dash-page-actions { width: 100%; }
}
