:root {
  --royal-blue: #1656C0;
  --royal-blue-dark: #1E5EC8;
  --light-gray: #F5F6F8;
  --white: #FFFFFF;
  --text-dark: #1a1a2e;
  --text-gray: #6b7280;
  --text-muted: #9ca3af;
  --border-color: #e5e7eb;
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.08);
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 14px;
}

@font-face { font-family: 'Inter'; font-weight: 100 900; font-display: swap; src: url('/assets/fonts/Inter-var.woff2') format('woff2'); }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--white);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 { letter-spacing: -0.025em; text-wrap: balance; margin: 0; }
h1 { font-size: 2.5rem; font-weight: 700; line-height: 1.15; }
h2 { font-size: 1.875rem; font-weight: 600; line-height: 1.2; }
h3 { font-size: 1.5rem; font-weight: 600; line-height: 1.25; }
h4 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
h5 { font-size: 1.125rem; font-weight: 500; line-height: 1.4; }
h6 { font-size: 1rem; font-weight: 500; line-height: 1.4; }

/* Navigation */
.nav-main {
  height: 70px;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.nav-logo {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo .logo-img { height: 36px; width: auto; display: block; }
.nav-link-custom {
  font-size: 0.875rem;
  color: var(--text-gray) !important;
  padding: 6px 14px !important;
  border-radius: 20px;
  font-weight: 500;
  text-decoration: none !important;
  transition: all 0.2s;
}
.nav-link-custom:hover { color: var(--royal-blue) !important; }
.nav-link-custom.active {
  background: rgba(22, 86, 192, 0.08);
  color: var(--royal-blue) !important;
}
.nav-btn-outline {
  font-size: 0.85rem;
  padding: 6px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--border-color);
  background: var(--white);
  color: var(--text-gray);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}
.nav-btn-outline:hover {
  border-color: var(--royal-blue);
  color: var(--royal-blue);
}

/* Hero */
.hero-section {
  background: linear-gradient(135deg, rgba(22,86,192,0.92) 0%, rgba(30,94,200,0.92) 100%), url('https://images.unsplash.com/photo-1609220136736-443140cffec6?w=1400&q=80') center/cover no-repeat;
  padding: 80px 0;
  display: flex;
  align-items: center;
  position: relative;
}
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 24px;
}
.hero-title {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 16px;
}
.hero-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.8);
  max-width: 500px;
  line-height: 1.6;
  margin-bottom: 28px;
}
.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  color: var(--royal-blue);
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.2s;
}
.btn-hero-primary:hover {
  background: #f0f4ff;
  color: var(--royal-blue-dark);
}
.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--white);
  font-weight: 500;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1rem;
  border: 1.5px solid rgba(255,255,255,0.4);
  transition: all 0.2s;
}
.btn-hero-secondary:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.05);
}

/* Stats */
.stat-number {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-dark);
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-gray);
}

/* Cards */
.card-step {
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 25px;
  height: 100%;
}
.card-step:hover { box-shadow: var(--shadow-md); }
.card-step .step-badge {
  background: rgba(22, 86, 192, 0.08);
  color: var(--royal-blue);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 50px;
}
.card-step .step-icon {
  width: 48px;
  height: 48px;
  background: rgba(22, 86, 192, 0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.card-step .step-icon svg { width: 24px; height: 24px; color: var(--royal-blue); }

/* Grant Cards */
.grant-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  height: 100%;
  transition: all 0.2s;
}
.grant-card:hover { box-shadow: var(--shadow-md); }
.grant-badge {
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  letter-spacing: 0.5px;
}
.grant-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--royal-blue);
}
.grant-eligibility-note {
  font-size: 0.8rem;
  color: var(--text-gray);
  border-left: 2px solid rgba(22,86,192,0.3);
  padding-left: 12px;
  margin-bottom: 16px;
  font-style: italic;
}
.btn-grant-apply {
  background: var(--royal-blue);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  width: 100%;
  transition: all 0.2s;
}
.btn-grant-apply:hover {
  background: var(--royal-blue-dark);
  color: var(--white);
}

/* Region Cards */
.region-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  height: 100%;
}
.region-card:hover { box-shadow: var(--shadow-md); }
.region-icon { color: var(--royal-blue); }
.region-name { font-weight: 600; font-size: 0.9rem; }

/* Live Activity */
.activity-item {
  background: var(--light-gray);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.activity-dot {
  width: 8px; height: 8px;
  background: var(--royal-blue);
  border-radius: 50%;
  flex-shrink: 0;
}

/* CTA */
.cta-section {
  background: var(--royal-blue);
  padding: 60px 0;
}
.cta-section h2 { color: var(--white); font-weight: 700; }
.cta-section p { color: rgba(255,255,255,0.8); }

/* Footer */
.footer-main {
  background: var(--white);
  padding: 60px 0 0;
  border-top: 1px solid var(--border-color);
}
.footer-logo { font-weight: 600; font-size: 1rem; color: var(--text-dark); margin-bottom: 12px; }
.footer-heading { font-weight: 600; font-size: 0.95rem; color: var(--text-dark); margin-bottom: 16px; }
.footer-link {
  color: var(--text-gray);
  text-decoration: none;
  font-size: 0.85rem;
  display: block;
  margin-bottom: 8px;
}
.footer-link:hover { color: var(--royal-blue); }
.footer-contact { font-size: 0.85rem; color: var(--text-gray); margin-bottom: 6px; }
.footer-divider { border-color: var(--border-color); margin: 30px 0 0; }
.footer-copyright { font-size: 0.8rem; color: var(--text-gray); text-align: center; padding: 20px 0; }

/* Section Spacing */
.section-pad { padding: 80px 0; }
.section-pad-sm { padding: 50px 0; }
.section-title { font-weight: 700; font-size: 1.8rem; margin-bottom: 8px; }
.section-subtitle { color: var(--text-gray); font-size: 1rem; max-width: 500px; margin: 0 auto 48px; text-align: center; }

/* Light Gray BG */
.bg-light-custom { background: var(--light-gray); }

/* Container */
.container-custom { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .container-custom { padding: 0 40px; } }

/* Buttons */
.btn-outline-blue {
  border: 1.5px solid var(--royal-blue);
  color: var(--royal-blue);
  background: transparent;
  border-radius: 8px;
  padding: 8px 20px;
  font-weight: 500;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.btn-outline-blue:hover {
  background: var(--royal-blue);
  color: var(--white);
}
.btn-solid-blue {
  background: var(--royal-blue);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 8px 20px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.btn-solid-blue:hover { background: var(--royal-blue-dark); color: var(--white); }

/* Mobile Menu */
.mobile-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.mobile-panel {
  position: fixed;
  top: 0; right: -280px;
  width: 280px;
  height: 100%;
  background: var(--white);
  z-index: 1000;
  box-shadow: -4px 0 20px rgba(0,0,0,0.1);
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}
.mobile-panel.active {
  right: 0;
}
.mobile-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}
.mobile-panel-body {
  padding: 16px 20px;
  flex: 1;
  overflow-y: auto;
}
.mobile-nav-link {
  display: block;
  padding: 12px 0;
  font-size: 1rem;
  color: var(--text-dark);
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
  transition: color 0.2s;
}
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--royal-blue);
}

/* CTA buttons */
.btn-cta-primary {
  background: var(--white);
  color: var(--royal-blue);
  border: none;
  border-radius: 8px;
  padding: 14px 28px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}
.btn-cta-primary:hover { background: #f0f4ff; }
.btn-cta-secondary {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: 8px;
  padding: 14px 28px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}
.btn-cta-secondary:hover { border-color: var(--white); }

/* ========================================
   Admin Dashboard Theme
   ======================================== */

.grant-card {
  background: #fff;
  border-radius: 12px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.grant-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1656C0, #4A90D9);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.grant-card:hover::before { opacity: 1; }
.grant-card:hover {
  box-shadow: 0 8px 24px rgba(22,86,192,0.12);
  transform: translateY(-3px);
}
.claimed-card::before { background: linear-gradient(90deg, #28a745, #5dd475); }
.grant-amount {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1656C0;
  letter-spacing: -0.02em;
}
.grant-icon {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(22,86,192,0.1);
  border-radius: 8px;
  color: #1656C0;
  font-size: 1rem;
  flex-shrink: 0;
}
.claimed-icon { background: rgba(40,167,69,0.1); color: #28a745; }
.grant-eligibility {
  color: #6c757d;
  border-left: 3px solid #1656C0;
  padding-left: 12px;
  font-style: italic;
  line-height: 1.5;
}
.section-title {
  font-size: 1.3rem;
  color: #1a1a2e;
  position: relative;
  padding-bottom: 10px;
  margin-bottom: 1.5rem !important;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 50px; height: 3px;
  background: #1656C0;
  border-radius: 2px;
}

.admin-wrapper {
  display: flex;
  min-height: calc(100vh - 70px);
  background: #F0F2F5;
}

.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #e5e7eb;
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
  overflow-y: auto;
  z-index: 100;
}

.admin-content {
  flex: 1;
  min-width: 0;
  padding: 28px;
  max-width: calc(100% - 240px);
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.admin-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.admin-card {
  background: #fff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s;
}

.admin-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.admin-card .card-body {
  padding: 1.25rem;
}

.admin-stat {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.admin-stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

.admin-stat-label {
  font-size: 0.8rem;
  color: var(--text-gray);
  margin: 0;
}

.admin-table {
  margin: 0;
}

.admin-table thead th {
  background: #F8F9FA;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-gray);
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 2px solid #e5e7eb;
}

.admin-table tbody td {
  padding: 10px 12px;
  vertical-align: middle;
  font-size: 0.875rem;
}

.admin-table tbody tr:hover {
  background: #F8FAFD;
}

.admin-filter-bar {
  background: #fff;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.admin-nav-link {
  color: #4b5563;
  text-decoration: none;
  font-size: 0.85rem;
  padding: 10px 16px;
  border-radius: 8px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.15s;
  font-weight: 500;
}
.admin-nav-link i { font-size: 1rem; width: 20px; text-align: center; }
.admin-nav-link:hover { background: #F3F4F6; color: #1656C0; }
.admin-nav-link.active { background: #EBF0FA; color: #1656C0; font-weight: 600; }
.admin-nav-link .admin-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  line-height: 1.4;
  min-width: 18px;
  text-align: center;
}

.admin-nav-section {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #9ca3af;
  font-weight: 700;
  padding: 16px 16px 8px;
}

.admin-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.admin-badge-success { background: #d4edda; color: #155724; }
.admin-badge-danger { background: #f8d7da; color: #721c24; }
.admin-badge-warning { background: #fff3cd; color: #856404; }
.admin-badge-info { background: #d1ecf1; color: #0c5460; }
.admin-badge-secondary { background: #e2e3e5; color: #383d41; }

@media (max-width: 768px) {
  .admin-sidebar { display: none; }
  .admin-content { max-width: 100%; padding: 16px; }
}

/* Admin sidebar collapsed state */
.admin-wrapper.sidebar-collapsed .admin-sidebar { display: none; }
.admin-wrapper.sidebar-collapsed .admin-content { max-width: 100%; }

/* CMS content styling */
.cms-content h2 { font-size: 1.5rem; font-weight: 700; margin-top: 1.5rem; margin-bottom: 0.75rem; color: var(--text-dark); }
.cms-content h3 { font-size: 1.2rem; font-weight: 600; margin-top: 1.25rem; margin-bottom: 0.5rem; }
.cms-content p { margin-bottom: 0.75rem; line-height: 1.6; }
.cms-content ul, .cms-content ol { margin-bottom: 0.75rem; padding-left: 1.25rem; }
.cms-content li { margin-bottom: 0.25rem; line-height: 1.6; }
.cms-content strong { font-weight: 600; }

/* Toast animations */
@keyframes bounceIn {
  0% { transform: translateX(120%) scale(0.6); opacity: 0; }
  60% { transform: translateX(-8%) scale(1.05); opacity: 1; }
  80% { transform: translateX(2%) scale(0.98); }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}
@keyframes bounceOut {
  0% { transform: translateX(0) scale(1); opacity: 1; }
  100% { transform: translateX(120%) scale(0.8); opacity: 0; }
}
