/* =============================================
   MERIDIAN DEVELOPMENT FUND - GRANT PORTAL
   Brand: #006400 (MDF Green) + White
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=DM+Sans:wght@300;400;500;600&family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --kfw-green: #006400;
  --kfw-green-dark: #004d00;
  --kfw-green-mid: #1a7a1a;
  --kfw-green-light: #e8f5e8;
  --kfw-green-pale: #f0faf0;
  --kfw-accent: #00a651;
  --kfw-gold: #c9a227;
  --white: #ffffff;
  --off-white: #f8faf8;
  --text-dark: #1a2e1a;
  --text-mid: #3d5c3d;
  --text-light: #6b8f6b;
  --border: #d4e8d4;
  --shadow-sm: 0 2px 8px rgba(0,100,0,0.08);
  --shadow-md: 0 8px 32px rgba(0,100,0,0.12);
  --shadow-lg: 0 20px 60px rgba(0,100,0,0.15);
  --radius: 12px;
  --radius-lg: 20px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', sans-serif;
  --font-numeric: 'Space Grotesk', 'DM Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--kfw-green-pale); }
::-webkit-scrollbar-thumb { background: var(--kfw-green); border-radius: 3px; }

/* ── UTILITIES ── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.w-full { width: 100%; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.3px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--kfw-green);
  color: white;
}
.btn-primary:hover {
  background: var(--kfw-green-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,100,0,0.3);
}

.btn-outline {
  background: transparent;
  color: var(--kfw-green);
  border: 2px solid var(--kfw-green);
}
.btn-outline:hover {
  background: var(--kfw-green);
  color: white;
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.25);
}

.btn-danger {
  background: #dc3545;
  color: white;
}
.btn-danger:hover { background: #b02a37; }

.btn-gold {
  background: var(--kfw-gold);
  color: white;
}
.btn-gold:hover { background: #a8861f; transform: translateY(-1px); }

.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 16px 40px; font-size: 16px; }
.btn-full { width: 100%; justify-content: center; }

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* ── FORM ELEMENTS ── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-weight: 500;
  font-size: 13px;
  color: var(--text-mid);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}
.form-label .required { color: #dc3545; margin-left: 3px; }

.form-control {
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-dark);
  background: white;
  transition: var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--kfw-green);
  box-shadow: 0 0 0 3px rgba(0,100,0,0.1);
}
.form-control::placeholder { color: #a0b8a0; }
.form-control.error { border-color: #dc3545; }

textarea.form-control { resize: vertical; min-height: 100px; }

.form-hint {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}
.form-error {
  font-size: 12px;
  color: #dc3545;
  margin-top: 4px;
}

/* ── CARDS ── */
.card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-body { padding: 24px; }
.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--off-white);
}

/* ── BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-family: var(--font-numeric);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.badge-success { background: #e8f5e8; color: var(--kfw-green); }
.badge-warning { background: #fff8e1; color: #f59e0b; }
.badge-danger { background: #fef2f2; color: #dc3545; }
.badge-info { background: #e0f2fe; color: #0277bd; }
.badge-secondary { background: #f0f0f0; color: #666; }
.badge-gold { background: #fef9e7; color: var(--kfw-gold); }

/* ── ALERTS ── */
.alert {
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.alert-success { background: #e8f5e8; color: var(--kfw-green-dark); border-left: 4px solid var(--kfw-green); }
.alert-error { background: #fef2f2; color: #991b1b; border-left: 4px solid #dc3545; }
.alert-warning { background: #fff8e1; color: #92400e; border-left: 4px solid #f59e0b; }
.alert-info { background: #e0f2fe; color: #01579b; border-left: 4px solid #0277bd; }

/* ── LOADING SPINNER ── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
.spinner-green {
  border: 2px solid var(--kfw-green-light);
  border-top-color: var(--kfw-green);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}
.modal {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-lg { max-width: 720px; }
.modal-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { font-family: var(--font-display); font-size: 20px; color: var(--text-dark); }
.modal-body { padding: 24px 28px; }
.modal-footer {
  padding: 20px 28px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--off-white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-light);
  transition: var(--transition);
}
.modal-close:hover { background: var(--border); color: var(--text-dark); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── TOAST ── */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-md);
  animation: slideInRight 0.3s ease;
  min-width: 300px;
  max-width: 400px;
}
.toast-success { background: var(--kfw-green); color: white; }
.toast-error { background: #dc3545; color: white; }
.toast-warning { background: #f59e0b; color: white; }
.toast-info { background: #0277bd; color: white; }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── TABLES ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--kfw-green-pale); }
thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--kfw-green-dark);
}
tbody tr {
  border-top: 1px solid var(--border);
  transition: background 0.2s;
}
tbody tr:hover { background: var(--kfw-green-pale); }
tbody td { padding: 14px 16px; font-size: 14px; color: var(--text-dark); }

/* ── PROGRESS STEPS ── */
.step-progress {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
}
.step-item {
  display: flex;
  align-items: center;
  flex: 1;
}
.step-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  transition: var(--transition);
}
.step-item.active .step-num {
  background: var(--kfw-green);
  color: white;
  box-shadow: 0 4px 12px rgba(0,100,0,0.4);
}
.step-item.completed .step-num {
  background: var(--kfw-accent);
  color: white;
}
.step-item.pending .step-num {
  background: var(--border);
  color: var(--text-light);
}
.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  transition: var(--transition);
}
.step-item.completed + .step-item .step-line,
.step-line.done { background: var(--kfw-green); }
.step-label {
  font-size: 11px;
  font-weight: 500;
  margin-top: 6px;
  color: var(--text-light);
  text-align: center;
}
.step-item.active .step-label { color: var(--kfw-green); font-weight: 600; }
.step-item.completed .step-label { color: var(--kfw-accent); }

/* ── SIDEBAR LAYOUT ── */
.portal-layout {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 260px;
  background: var(--kfw-green-dark);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.3s ease;
}
.sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-logo img { height: 40px; }
.sidebar-logo-text { color: white; }
.sidebar-logo-text .name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}
.sidebar-logo-text .sub {
  font-size: 10px;
  opacity: 0.65;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.sidebar-nav { flex: 1; padding: 16px 0; overflow-y: auto; }
.nav-section-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  padding: 12px 20px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: var(--transition);
  border-left: 3px solid transparent;
  user-select: none;
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: white; }
.nav-item.active {
  background: rgba(255,255,255,0.12);
  color: white;
  border-left-color: var(--kfw-accent);
  font-weight: 600;
}
.nav-item .icon { font-size: 18px; width: 20px; text-align: center; }
.nav-item .badge-dot {
  margin-left: auto;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--kfw-gold);
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.85);
}
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--kfw-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: white;
  flex-shrink: 0;
}
.avatar-lg { width: 52px; height: 52px; font-size: 18px; }
.user-name { font-size: 13px; font-weight: 600; }
.user-email { font-size: 11px; opacity: 0.6; }

/* ── MAIN CONTENT ── */
.main-content {
  margin-left: 260px;
  flex: 1;
  min-height: 100vh;
  background: var(--off-white);
  display: flex;
  flex-direction: column;
}

.topbar {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}
.topbar-title { font-family: var(--font-display); font-size: 18px; color: var(--text-dark); }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.notification-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--off-white);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  font-size: 18px;
  transition: var(--transition);
}
.notification-btn:hover { background: var(--kfw-green-light); }
.notif-badge {
  position: absolute;
  top: -2px; right: -2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #dc3545;
  color: white;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-content { padding: 28px 32px; flex: 1; }

/* ── DASHBOARD STATS ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 22px 24px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.stat-icon-green { background: var(--kfw-green-light); }
.stat-icon-gold { background: #fef9e7; }
.stat-icon-blue { background: #e0f2fe; }
.stat-icon-red { background: #fef2f2; }
.stat-value {
  font-family: var(--font-numeric);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1;
  letter-spacing: -0.3px;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
  font-weight: 500;
}

/* ── GRANT BANNER ── */
.grant-banner {
  background: linear-gradient(135deg, var(--kfw-green) 0%, var(--kfw-green-mid) 60%, var(--kfw-accent) 100%);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}
.grant-banner::before {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.grant-banner::after {
  content: '';
  position: absolute;
  right: 80px; bottom: -80px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.banner-content { position: relative; z-index: 1; }
.banner-content h2 {
  font-family: var(--font-display);
  font-size: 22px;
  margin-bottom: 8px;
}
.banner-content p { opacity: 0.9; font-size: 14px; max-width: 500px; line-height: 1.6; }
.banner-actions { position: relative; z-index: 1; display: flex; gap: 12px; flex-shrink: 0; }

/* ── FILE UPLOAD ── */
.doc-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 8px;
}

.file-drop {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--off-white);
}
.file-drop:hover, .file-drop.dragging {
  border-color: var(--kfw-green);
  background: var(--kfw-green-pale);
}
.file-drop-icon { font-size: 36px; margin-bottom: 8px; }
.file-drop-text { font-size: 14px; color: var(--text-mid); }
.file-drop-hint { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.file-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
}
.file-item .file-name { flex: 1; color: var(--text-dark); }
.file-item .file-size { color: var(--text-light); font-size: 12px; }
.file-item .file-remove {
  color: #dc3545;
  cursor: pointer;
  font-size: 16px;
  background: none;
  border: none;
  padding: 0 4px;
}

/* ── SECTION TABS ── */
.page-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}
.page-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.page-tab:hover { color: var(--kfw-green); }
.page-tab.active {
  color: var(--kfw-green);
  border-bottom-color: var(--kfw-green);
  font-weight: 600;
}

/* ── WALLET CARD ── */
.wallet-card {
  background: linear-gradient(135deg, var(--kfw-green-dark) 0%, var(--kfw-green) 100%);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  color: white;
  position: relative;
  overflow: hidden;
}
.wallet-card::before {
  content: '';
  position: absolute;
  right: -40px; top: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.wallet-balance-label { font-family: var(--font-numeric); font-size: 10px; opacity: 0.75; letter-spacing: 1px; text-transform: uppercase; font-weight: 500; }
.wallet-balance {
  font-family: var(--font-numeric);
  font-size: 38px;
  font-weight: 700;
  margin: 8px 0;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}
.wallet-currency { font-size: 18px; opacity: 0.8; }
.wallet-grant-num { font-size: 12px; opacity: 0.75; letter-spacing: 2.5px; font-family: var(--font-mono); font-weight: 500; }

/* ── TIMELINE ── */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 0; bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  margin-bottom: 24px;
  padding-left: 20px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -24px; top: 5px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid white;
  box-shadow: 0 0 0 2px var(--border);
}
.timeline-item.done::before {
  background: var(--kfw-green);
  box-shadow: 0 0 0 2px var(--kfw-green-light);
}
.timeline-item.active::before {
  background: var(--kfw-gold);
  box-shadow: 0 0 0 3px rgba(201,162,39,0.2);
  animation: pulse 2s ease infinite;
}
.timeline-item.rejected::before { background: #b45309; }
.timeline-item.rejected .timeline-text { color: #b45309; font-weight: 600; }

.timeline-date { font-size: 11px; color: var(--text-light); margin-bottom: 3px; }
.timeline-text { font-size: 14px; color: var(--text-dark); font-weight: 500; }
.timeline-sub { font-size: 12px; color: var(--text-light); margin-top: 2px; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(201,162,39,0.2); }
  50% { box-shadow: 0 0 0 6px rgba(201,162,39,0.1); }
}

/* ── OTP INPUT ── */
.otp-grid {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 20px 0;
}
.otp-input {
  width: 50px; height: 58px;
  border: 2px solid var(--border);
  border-radius: 10px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--kfw-green-dark);
  outline: none;
  transition: var(--transition);
}
.otp-input:focus {
  border-color: var(--kfw-green);
  box-shadow: 0 0 0 3px rgba(0,100,0,0.12);
}

/* ── SECTION HEADERS ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text-dark);
}
.section-subtitle { font-size: 13px; color: var(--text-light); margin-top: 2px; }

/* ── GRID LAYOUTS ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-sidebar { display: grid; grid-template-columns: 1fr 340px; gap: 24px; }

/* ── MOBILE TOGGLE ── */
.mobile-toggle {
  display: none;
  width: 40px; height: 40px;
  background: var(--kfw-green);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 20px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .grid-sidebar { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .mobile-toggle { display: flex; }
  .page-content { padding: 20px 16px; }
  .topbar { padding: 0 16px; }
  .grant-banner { flex-direction: column; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .banner-actions { flex-direction: column; width: 100%; }
}

/* ── QUESTION SECTION ── */
.question-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
}
.question-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--kfw-green);
  margin-bottom: 6px;
}
.question-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 14px;
}
.radio-group { display: flex; flex-direction: column; gap: 8px; }
.radio-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
}
.radio-option:hover { border-color: var(--kfw-green); background: var(--kfw-green-pale); }
.radio-option input[type=radio] { accent-color: var(--kfw-green); }
.radio-option.selected { border-color: var(--kfw-green); background: var(--kfw-green-pale); color: var(--kfw-green-dark); }

/* ── WITHDRAWAL MODAL ── */
.currency-select-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.currency-option {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}
.currency-option:hover, .currency-option.active {
  border-color: var(--kfw-green);
  background: var(--kfw-green-pale);
  color: var(--kfw-green);
}
.currency-flag { font-size: 20px; display: block; margin-bottom: 4px; }

/* ── AUTH PAGE ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  background: var(--off-white);
}
.auth-left {
  flex: 1;
  background: linear-gradient(160deg, var(--kfw-green-dark) 0%, var(--kfw-green) 50%, var(--kfw-accent) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  color: white;
  position: relative;
  overflow: hidden;
}
.auth-left::before {
  content: '';
  position: absolute;
  bottom: -100px; right: -80px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.auth-left::after {
  content: '';
  position: absolute;
  top: -80px; left: -60px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.auth-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 52px;
}
.auth-brand-logo {
  width: 52px; height: 52px;
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}
.auth-brand-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
}
.auth-brand-sub { font-size: 12px; opacity: 0.65; letter-spacing: 1px; }
.auth-headline {
  position: relative; z-index: 1;
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
}
.auth-sub { position: relative; z-index: 1; font-size: 16px; opacity: 0.85; line-height: 1.7; max-width: 400px; }
.auth-features { position: relative; z-index: 1; margin-top: 44px; display: flex; flex-direction: column; gap: 14px; }
.auth-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  opacity: 0.9;
}
.auth-feature-icon {
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.auth-right {
  width: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.auth-box {
  width: 100%;
  max-width: 440px;
}
.auth-box-header { margin-bottom: 32px; }
.auth-box-title {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.auth-box-sub { font-size: 14px; color: var(--text-light); }

/* ── ACCREDITATION PAGE ── */
.accred-header {
  background: linear-gradient(135deg, var(--kfw-gold), #a8861f);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  color: white;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.accred-header::before {
  content: '';
  position: absolute;
  right: -40px; top: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  pointer-events: none;
}
.accred-header h2 { font-family: var(--font-display); font-size: 22px; margin-bottom: 6px; position: relative; z-index: 1; }
.accred-header p { position: relative; z-index: 1; }

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 52px 20px;
  color: var(--text-light);
}
.empty-state-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.4; }
.empty-state-title { font-size: 16px; font-weight: 600; color: var(--text-mid); margin-bottom: 6px; }
.empty-state-text { font-size: 13px; }

/* ── KFW SEAL ── */
.kfw-seal {
  width: 48px; height: 48px;
  background: var(--kfw-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: white;
  flex-shrink: 0;
}

/* ── DEMO BADGE ── */
.demo-banner {
  background: #fff8e1;
  border-bottom: 2px solid var(--kfw-gold);
  padding: 8px 20px;
  text-align: center;
  font-size: 13px;
  color: #92400e;
  font-weight: 500;
}
.demo-banner strong { color: var(--kfw-gold); }

/* =============================================
   PUBLIC WEBSITE STYLES
   Homepage, About, Programs, etc.
   ============================================= */

/* ── SITE NAV ── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.site-nav.scrolled {
  box-shadow: var(--shadow-md);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-brand-seal {
  width: 44px; height: 44px;
  background: var(--kfw-green);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: white;
}
.nav-brand-text .name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
}
.nav-brand-text .sub {
  font-size: 10px;
  color: var(--text-light);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-link {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-mid);
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}
.nav-link:hover { background: var(--kfw-green-pale); color: var(--kfw-green); }
.nav-link.active { color: var(--kfw-green); font-weight: 600; }
.nav-cta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  width: 24px; height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: var(--transition);
}
.mobile-nav {
  display: none;
  background: white;
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  flex-direction: column;
  gap: 4px;
}
.mobile-nav.open { display: flex; }
.mobile-nav-link {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 15px;
  color: var(--text-mid);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}
.mobile-nav-link:hover { background: var(--kfw-green-pale); color: var(--kfw-green); }

/* ── SITE FOOTER ── */
.site-footer {
  background: var(--kfw-green-dark);
  color: white;
  padding: 64px 0 0;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}
.footer-brand .logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.footer-brand p {
  font-size: 13px;
  opacity: 0.75;
  line-height: 1.8;
  max-width: 320px;
}
.footer-col h4 {
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 16px;
  font-weight: 600;
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  margin-bottom: 10px;
  transition: var(--transition);
}
.footer-col a:hover { color: white; padding-left: 4px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 32px;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  opacity: 0.6;
}

/* ── PAGE WRAPPER ── */
.site-page { padding-top: 72px; }
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── HERO ── */
.hero {
  min-height: calc(100vh - 72px);
  background: linear-gradient(150deg, var(--kfw-green-dark) 0%, var(--kfw-green) 50%, var(--kfw-accent) 100%);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 80px 0;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}
.hero::after {
  content: '';
  position: absolute;
  right: -200px; top: -200px;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.hero-content {}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.95);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: 58px;
  font-weight: 700;
  color: white;
  line-height: 1.1;
  margin-bottom: 20px;
}
.hero-title span { color: var(--kfw-gold); }
.hero-sub {
  font-size: 17px;
  color: rgba(255,255,255,0.88);
  line-height: 1.8;
  max-width: 480px;
  margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 52px;
  padding-top: 36px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.hero-stat-num {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: white;
}
.hero-stat-label { font-size: 12px; color: rgba(255,255,255,0.65); margin-top: 2px; }

/* Hero card stack */
.hero-visual {
  position: relative;
  z-index: 1;
}
.hero-card-stack {
  position: relative;
  width: 100%;
}
.hero-card {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 24px 28px;
  color: white;
  position: relative;
}
.hero-card-label { font-size: 11px; opacity: 0.7; text-transform: uppercase; letter-spacing: 1px; }
.hero-card-value { font-family: var(--font-display); font-size: 36px; font-weight: 700; margin: 6px 0; }
.hero-card-sub { font-size: 13px; opacity: 0.8; }
.hero-card-badge {
  position: absolute;
  top: 20px; right: 20px;
  background: var(--kfw-gold);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.hero-mini-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.hero-mini-card {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 14px;
  padding: 16px 18px;
  color: white;
}
.hero-mini-icon { font-size: 22px; margin-bottom: 6px; }
.hero-mini-title { font-size: 13px; font-weight: 600; }
.hero-mini-text { font-size: 11px; opacity: 0.7; margin-top: 2px; }

/* ── SECTIONS ── */
.section { padding: 96px 0; }
.section-alt { background: var(--off-white); }
.section-dark {
  background: var(--kfw-green-dark);
  color: white;
}
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--kfw-green);
  margin-bottom: 10px;
}
.section-dark .section-label { color: var(--kfw-gold); }
.section-title {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 16px;
}
.section-dark .section-title { color: white; }
.section-sub {
  font-size: 16px;
  color: var(--text-light);
  max-width: 560px;
  line-height: 1.8;
}
.section-dark .section-sub { color: rgba(255,255,255,0.75); }
.section-header { margin-bottom: 56px; }
.section-header-center { text-align: center; }
.section-header-center .section-sub { margin: 0 auto; }

/* ── PROGRAM CARDS ── */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.program-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.program-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--kfw-green);
  transform: scaleX(0);
  transition: var(--transition);
  transform-origin: left;
}
.program-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.program-card:hover::before { transform: scaleX(1); }
.program-icon {
  width: 56px; height: 56px;
  background: var(--kfw-green-light);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 20px;
}
.program-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.program-text { font-size: 14px; color: var(--text-light); line-height: 1.7; margin-bottom: 20px; }
.program-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.program-amount { font-weight: 700; font-size: 15px; color: var(--kfw-green); }
.program-tag { font-size: 11px; color: var(--text-light); background: var(--off-white); padding: 4px 10px; border-radius: 20px; }

/* ── PROCESS STEPS ── */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.process-grid::before {
  content: '';
  position: absolute;
  top: 32px; left: calc(12.5% + 16px); right: calc(12.5% + 16px);
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.process-step {
  text-align: center;
  padding: 0 16px;
  position: relative;
  z-index: 1;
}
.process-num {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--kfw-green);
  color: white;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 8px 20px rgba(0,100,0,0.3);
  position: relative;
}
.process-title { font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.process-text { font-size: 13px; color: var(--text-light); line-height: 1.6; }

/* ── TESTIMONIALS / IMPACT ── */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius);
  overflow: hidden;
}
.impact-item {
  padding: 40px 32px;
  text-align: center;
  background: rgba(255,255,255,0.06);
}
.impact-num {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  color: var(--kfw-gold);
  line-height: 1;
}
.impact-label {
  font-size: 13px;
  opacity: 0.75;
  margin-top: 8px;
  line-height: 1.5;
}

/* ── NEWS CARDS ── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.news-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}
.news-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.news-img {
  height: 180px;
  background: linear-gradient(135deg, var(--kfw-green-light), var(--kfw-green-pale));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}
.news-body { padding: 22px 24px; }
.news-tag {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--kfw-green);
  margin-bottom: 8px;
}
.news-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
  color: var(--text-dark);
}
.news-excerpt { font-size: 13px; color: var(--text-light); line-height: 1.7; margin-bottom: 16px; }
.news-date { font-size: 12px; color: var(--text-light); }

/* ── PARTNERS STRIP ── */
.partners-strip {
  background: var(--off-white);
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.partners-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 48px;
  justify-content: center;
  flex-wrap: wrap;
}
.partner-logo {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
}

/* ── GRANT ELIGIBILITY CHECKER ── */
.eligibility-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: 40px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.eligibility-result {
  margin-top: 24px;
  padding: 20px;
  border-radius: 10px;
  display: none;
}
.eligibility-result.show { display: block; }

/* ── CTA BAND ── */
.cta-band {
  background: linear-gradient(135deg, var(--kfw-green-dark), var(--kfw-green));
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  right: -100px; bottom: -100px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.cta-band h2 {
  font-family: var(--font-display);
  font-size: 40px;
  color: white;
  margin-bottom: 16px;
}
.cta-band p {
  font-size: 16px;
  color: rgba(255,255,255,0.85);
  max-width: 520px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

/* ── BREADCRUMB ── */
.breadcrumb {
  padding: 16px 0;
  font-size: 13px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 6px;
}
.breadcrumb a { color: var(--kfw-green); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  background: linear-gradient(135deg, var(--kfw-green-dark), var(--kfw-green-mid));
  padding: 72px 0;
  color: white;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  right: -80px; top: -80px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.page-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 700;
  margin-bottom: 14px;
}
.page-hero p {
  font-size: 17px;
  opacity: 0.88;
  max-width: 560px;
  line-height: 1.7;
}

/* ── FAQ ── */
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-question {
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-dark);
  gap: 16px;
}
.faq-icon { font-size: 20px; flex-shrink: 0; transition: transform 0.3s; color: var(--kfw-green); }
.faq-answer {
  display: none;
  padding: 0 0 18px;
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.8;
}
.faq-item.open .faq-answer { display: block; }
.faq-item.open .faq-icon { transform: rotate(45deg); }

/* ── RESPONSIVE ADJUSTMENTS ── */
@media (max-width: 1024px) {
  .hero-title { font-size: 44px; }
  .section-title { font-size: 34px; }
  .programs-grid { grid-template-columns: 1fr 1fr; }
  .news-grid { grid-template-columns: 1fr 1fr; }
  .process-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .process-grid::before { display: none; }
  .impact-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-title { font-size: 36px; }
  .hero-visual { display: none; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
  .programs-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .impact-grid { grid-template-columns: 1fr 1fr; }
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .section { padding: 64px 0; }
  .hero { padding: 52px 0; min-height: auto; }
  .section-title { font-size: 28px; }
  .cta-band h2 { font-size: 28px; }
  .page-hero h1 { font-size: 32px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* ============================================================
   ADDITIONAL RESPONSIVE + MISSING COMPONENTS
   ============================================================ */

/* ── 480px breakpoint (small phones) ── */
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-sidebar { grid-template-columns: 1fr; }
  .auth-box { padding: 24px 20px; border-radius: 16px; }
  .auth-right { padding: 16px; }
  .otp-grid { gap: 6px; }
  .otp-input { width: 42px; height: 52px; font-size: 22px; }
  .modal { margin: 8px; width: calc(100% - 16px); max-height: calc(100vh - 16px); border-radius: 16px; }
  .page-content { padding: 16px 12px; }
  .card-body { padding: 16px; }
  .card-header { padding: 14px 16px; flex-wrap: wrap; gap: 8px; }
  .btn { padding: 10px 20px; font-size: 13px; }
  .btn-lg { padding: 14px 28px; font-size: 15px; }
  .topbar { height: 56px; padding: 0 12px; }
  .grant-banner { padding: 20px 16px; }
  .grant-banner h2 { font-size: 18px; }
  .banner-actions { flex-direction: column; }
  .banner-actions .btn { width: 100%; justify-content: center; }
  .stat-card { padding: 16px; }
  .stat-card .stat-value { font-size: 22px; }
  .wallet-balance { font-size: 28px !important; }
  .user-row { grid-template-columns: 1fr; gap: 4px; padding: 12px; }
  .wd-row { grid-template-columns: 1fr; padding: 12px; }
  .section-title { font-size: 24px; }
  .hero-title { font-size: 28px; }
  .hero-stats { flex-direction: column; gap: 12px; }
}

/* ── 360px breakpoint (very small phones) ── */
@media (max-width: 360px) {
  .otp-input { width: 36px; height: 44px; font-size: 18px; }
  .sidebar { width: 240px !important; }
  .page-content { padding: 12px 8px; }
}

/* ── Portal layout responsive ── */
@media (max-width: 1024px) {
  .portal-layout { flex-direction: row; }
  .sidebar { width: 220px; }
}
@media (max-width: 768px) {
  .portal-layout { position: relative; }
  .sidebar {
    position: fixed; top: 0; left: 0; height: 100vh; z-index: 200;
    transform: translateX(-100%); transition: transform .3s ease; width: 260px !important;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 20px rgba(0,0,0,0.25); }
  .main-content { margin-left: 0 !important; width: 100%; }
  .topbar-title { font-size: 15px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .grid-sidebar { grid-template-columns: 1fr; }
  .table-wrap table { min-width: 600px; }
  /* Sidebar overlay */
  .sidebar-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4);
    z-index: 199; backdrop-filter: blur(2px);
  }
  .sidebar-overlay.active { display: block; }
}

/* ── Modal full screen on mobile ── */
@media (max-width: 600px) {
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal { border-radius: 20px 20px 0 0; max-height: 90vh; width: 100%; overflow-y: auto; }
  .modal-lg { max-width: 100%; }
  .modal-tab-strip { overflow-x: auto; flex-wrap: nowrap; }
}

/* ── Auth page responsive ── */
@media (max-width: 900px) {
  .auth-left { display: none !important; }
  .auth-right { width: 100% !important; min-height: 100vh; }
  .auth-box { max-width: 100%; box-shadow: none; border-radius: 0; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
}

/* ── Public pages nav responsive ── */
@media (max-width: 768px) {
  .nav-inner { padding: 0 16px; }
  .site-nav { position: sticky; top: 0; z-index: 100; }
  .footer-inner { padding: 40px 16px; }
  .page-hero { padding: 48px 16px; }
  .container { padding: 0 16px; }
  .section { padding: 48px 0; }
}

/* ── Sidebar overlay div ── */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.4); z-index: 199;
}
.sidebar-overlay.active { display: block; }

/* ── Admin table responsive ── */
@media (max-width: 1100px) {
  .user-row { grid-template-columns: 32px 1fr 1fr 100px 120px !important; }
  .user-row > div:nth-child(4), .user-row > div:nth-child(5) { display: none; }
  .wd-row { grid-template-columns: 110px 1fr 90px 80px 80px 150px !important; }
}
@media (max-width: 768px) {
  .user-row { grid-template-columns: 1fr 1fr !important; gap: 6px; padding: 12px 14px; }
  .user-row > div:nth-child(1) { display: none; }
  .wd-row { grid-template-columns: 1fr 1fr !important; padding: 12px 14px; }
  .card-header-tabs { flex-direction: column; align-items: flex-start; }
}

/* ── Progress bar component ── */
.mdf-progress { height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; }
.mdf-progress-fill { height: 100%; background: var(--kfw-green); border-radius: 99px; transition: width .4s ease; }

/* ── Status badges refined ── */
.status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 99px;
  font-family: var(--font-numeric);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.6px; text-transform: uppercase;
}
.status-pill::before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; }
.status-funded     { background: #dcfce7; color: #166534; }
.status-approved   { background: #dbeafe; color: #1e40af; }
.status-review     { background: #fef9c3; color: #854d0e; }
.status-rejected   { background: #fee2e2; color: #991b1b; }
.status-pending    { background: #f3f4f6; color: #4b5563; }
.status-accredit   { background: #ede9fe; color: #5b21b6; }

/* ── Loading skeleton ── */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite;
  border-radius: 6px;
}
@keyframes shimmer { 0%{background-position:200%} 100%{background-position:-200%} }

/* ── Toast refined positioning ── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 9999; max-width: 360px;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  animation: slideIn .3s ease; font-size: 14px; font-weight: 500;
  min-width: 240px;
}
@keyframes slideIn { from{transform:translateX(100%);opacity:0} to{transform:translateX(0);opacity:1} }
@media (max-width: 480px) {
  #toast-container { right: 12px; left: 12px; max-width: 100%; bottom: 16px; }
  .toast { min-width: 0; width: 100%; }
}

/* ── File item ── */
.file-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: var(--kfw-green-pale);
  border: 1px solid var(--border); border-radius: 8px; margin-top: 8px;
}
.file-name { flex: 1; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: 11px; color: var(--text-light); white-space: nowrap; }
.file-remove {
  background: none; border: 1px solid var(--border); cursor: pointer;
  color: var(--text-light); font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 6px; transition: all .2s;
  white-space: nowrap; flex-shrink: 0;
}
.file-remove:hover { background: #fee2e2; border-color: #fca5a5; color: #dc3545; }

/* ── Notification bell ── */
.notification-btn {
  position: relative; width: 40px; height: 40px; border-radius: 10px;
  background: var(--kfw-green-pale); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 18px; transition: var(--transition);
}
.notification-btn:hover { background: var(--kfw-green-light); }
.notif-badge {
  position: absolute; top: -5px; right: -5px;
  background: #dc3545; color: white; font-size: 10px; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid white;
}

/* ── Avatar ── */
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--kfw-green); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0; text-transform: uppercase;
}
.avatar-lg { width: 52px; height: 52px; font-size: 18px; }
.avatar-xl { width: 72px; height: 72px; font-size: 24px; }

/* ── KfW Seal ── */
.kfw-seal {
  width: 44px; height: 44px; background: var(--kfw-green); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  color: white; flex-shrink: 0;
}

/* ── Utility: visually hidden ── */
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0; }

/* ── Touch targets ── */
@media (hover: none) {
  .btn { min-height: 44px; }
  .nav-item { min-height: 44px; }
  .form-control { min-height: 44px; }
}

/* ── Print ── */
@media print {
  .sidebar, .topbar, .mobile-toggle, .btn, .notification-btn { display: none !important; }
  .main-content { margin: 0 !important; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}


/* ═══════════════════════════════════════════════════════════
   MOBILE OVERRIDES — comprehensive responsive fix
   Desktop styles above are untouched.
   ═══════════════════════════════════════════════════════════ */

/* ── Global: prevent horizontal overflow ───────────────────── */
html, body { overflow-x: hidden; -webkit-text-size-adjust: 100%; }
*, *::before, *::after { box-sizing: border-box; }
img, video, iframe, embed { max-width: 100%; }

/* ── Responsive utility classes (used by public pages) ────────
   These replace inline style= grids that can't be overridden
   by media queries from external CSS. */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 48px;
  align-items: start;
}
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.checklist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.programs-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ── 1024px ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .values-grid        { grid-template-columns: 1fr 1fr; }
  .programs-grid-3    { grid-template-columns: 1fr 1fr; }
}

/* ── 900px (tablets, small laptops) ────────────────────────── */
@media (max-width: 900px) {
  /* Auth */
  .auth-left  { display: none !important; }
  .auth-right { width: 100% !important; min-height: 100vh; align-items: flex-start !important; padding-top: 32px; }
  .auth-box   { max-width: 100%; box-shadow: none; border-radius: 0; width: 100%; padding: 32px 20px; }
  html, body  { height: auto; overflow-y: auto !important; }
  /* Layouts */
  .contact-layout { grid-template-columns: 1fr; gap: 28px; }
  .about-split    { grid-template-columns: 1fr; gap: 36px; }
}

/* ── 768px (mobile landscape + portrait) ───────────────────── */
@media (max-width: 768px) {

  /* ── Public nav ── */
  .nav-inner        { height: 60px; padding: 0 16px; gap: 12px; }
  .nav-brand-seal   { width: 36px; height: 36px; font-size: 13px; }
  .nav-brand-text .name { font-size: 14px; }
  .nav-brand-text .sub  { display: none; }
  .nav-links, .nav-cta  { display: none; }
  .nav-hamburger    { display: flex; min-width: 44px; min-height: 44px; justify-content: center; align-items: center; }
  .mobile-nav       { padding: 12px 16px 24px; }
  .mobile-nav-link  { padding: 13px 16px; font-size: 16px; min-height: 50px; display: flex; align-items: center; border-radius: 8px; }
  /* Push page content below the now-60px fixed nav */
  .site-page        { padding-top: 60px !important; }
  .site-nav         { position: sticky; top: 0; z-index: 200; }

  /* ── Hero ── */
  .hero             { min-height: unset; padding: 48px 0 52px; }
  .hero-inner       { grid-template-columns: 1fr; padding: 0 20px; gap: 28px; }
  .hero-visual      { display: none; }
  .hero-title       { font-size: 34px; line-height: 1.15; }
  .hero-sub         { font-size: 15px; }
  .hero-eyebrow     { font-size: 12px; }
  .hero-actions     { flex-direction: column; gap: 12px; }
  .hero-actions .btn { width: 100%; text-align: center; justify-content: center; }
  .hero-stats       { gap: 20px; flex-wrap: wrap; }

  /* ── Page hero (inner pages) ── */
  .page-hero        { padding: 44px 16px 36px; }
  .page-hero h1     { font-size: 28px; line-height: 1.25; }
  .page-hero p      { font-size: 15px; }

  /* ── Sections ── */
  .section          { padding: 52px 0; }
  .container        { padding: 0 16px; }
  .section-title    { font-size: 26px; }
  .section-sub      { font-size: 15px; }
  .section-header   { margin-bottom: 36px; }

  /* ── Grids ── */
  .checklist-grid   { grid-template-columns: 1fr; gap: 16px; }
  .values-grid      { grid-template-columns: 1fr 1fr; }
  .programs-grid    { grid-template-columns: 1fr; }
  .programs-grid-3  { grid-template-columns: 1fr; }
  .news-grid        { grid-template-columns: 1fr; }
  .process-grid     { grid-template-columns: 1fr; }
  .process-grid::before { display: none; }
  .impact-grid      { grid-template-columns: 1fr 1fr; }
  .footer-inner     { grid-template-columns: 1fr; gap: 32px; padding: 40px 16px; }
  .footer-bottom    { flex-direction: column; gap: 8px; text-align: center; padding: 20px 16px; font-size: 12px; }

  /* ── Portal layout ── */
  .portal-layout    { position: relative; }
  .sidebar {
    position: fixed !important;
    top: 0; left: 0;
    width: 272px !important;
    height: 100vh;
    z-index: 300;
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    box-shadow: none;
  }
  .sidebar.open     { transform: translateX(0); box-shadow: 6px 0 32px rgba(0,0,0,.28); }
  .main-content     { margin-left: 0 !important; width: 100% !important; overflow-x: hidden; }
  .topbar           { padding: 0 12px; height: 56px; }
  .topbar-title     { font-size: 14px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page-content     { padding: 16px 12px; }
  .card-body        { padding: 16px; }
  .card-header      { padding: 14px 16px; }
  .mobile-toggle    { display: flex; }

  /* ── Stats / banner ── */
  .stats-grid       { grid-template-columns: 1fr 1fr; gap: 10px; }
  .grant-banner     { flex-direction: column; padding: 20px 16px; gap: 16px; }
  .grant-banner h2  { font-size: 18px; }
  .banner-actions   { flex-direction: column; width: 100%; gap: 10px; }
  .banner-actions .btn { width: 100%; justify-content: center; }
  .grid-2           { grid-template-columns: 1fr !important; }
  .doc-upload-grid  { grid-template-columns: 1fr !important; }
  /* Communications panel mobile */
  .notif-type-btn   { flex: 1 1 calc(50% - 4px); text-align: center; }
  #comms-log-body   { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #comms-log-body table { min-width: 480px; }
  .grid-3           { grid-template-columns: 1fr !important; }
  .grid-sidebar     { grid-template-columns: 1fr !important; }

  /* ── Tables ── */
  .table-wrap       { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-wrap table { min-width: 480px; }

  /* ── Forms ── */
  .form-control, input[type="text"], input[type="email"],
  input[type="password"], input[type="number"], input[type="tel"],
  input[type="url"], select, textarea { font-size: 16px !important; }

  /* ── Buttons ── */
  .btn    { min-height: 44px; }
  .btn-sm { min-height: 36px; }
}

/* ── .sidebar-overlay (used by admin panel site.js if needed) ── */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 199; }
.sidebar-overlay.active { display: block; }

/* ── 480px (small phones) ──────────────────────────────────── */
@media (max-width: 480px) {
  /* Nav */
  .nav-brand-text .name { font-size: 13px; }

  /* Hero */
  .hero             { padding: 36px 0 44px; }
  .hero-inner       { padding: 0 16px; }
  .hero-title       { font-size: 28px; }
  .hero-stat-num    { font-size: 26px; }
  .hero-stats       { flex-direction: column; gap: 14px; }

  /* Page hero */
  .page-hero h1     { font-size: 24px; }
  .page-hero        { padding: 36px 16px 28px; }

  /* Sections */
  .section          { padding: 40px 0; }
  .section-title    { font-size: 22px; }
  .values-grid      { grid-template-columns: 1fr; }
  .impact-grid      { grid-template-columns: 1fr 1fr; }

  /* Portal */
  .topbar           { height: 52px; padding: 0 10px; }
  .topbar-title     { font-size: 13px; max-width: 130px; }
  .page-content     { padding: 12px 10px; }
  .stats-grid       { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card        { padding: 14px 12px; }
  .stat-card .stat-value { font-size: 20px; }
  .stat-label       { font-size: 11px; }
  .file-drop        { padding: 20px 12px; }

  /* Auth */
  .auth-box         { padding: 24px 16px; }
  .otp-input        { width: 40px; height: 50px; font-size: 22px; }
  .otp-grid         { gap: 6px; }

  /* Modals */
  .modal-overlay    { align-items: flex-end; padding: 0; }
  .modal            { border-radius: 20px 20px 0 0; max-height: 92vh; width: 100%; margin: 0; }
  .modal-lg         { max-width: 100%; }
  .modal-tab-strip  { overflow-x: auto; white-space: nowrap; flex-wrap: nowrap; }

  /* Toast */
  #toast-container  { left: 8px; right: 8px; max-width: 100%; bottom: 12px; }
  .toast            { min-width: 0; width: 100%; font-size: 13px; }
  .modal-footer     { padding: 16px; flex-direction: column; }
  .modal-footer .btn { width: 100%; justify-content: center; }
}

/* ── 360px (very small phones) ─────────────────────────────── */
@media (max-width: 360px) {
  .sidebar          { width: 240px !important; }
  .nav-brand-text   { display: none; }
  .hero-title       { font-size: 24px; }
  .topbar-title     { max-width: 100px; }
  .otp-input        { width: 34px; height: 42px; font-size: 16px; }
  .otp-grid         { gap: 4px; }
}

/* ── Touch device targets ───────────────────────────────────── */
@media (hover: none) and (pointer: coarse) {
  .btn               { min-height: 46px; }
  .nav-item          { min-height: 46px; }
  .form-control      { min-height: 46px; font-size: 16px !important; }
  .mobile-nav-link   { min-height: 50px; }
}

/* ── Print ──────────────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .mobile-toggle, .notification-btn { display: none !important; }
  .main-content { margin: 0 !important; }
}
