﻿/* ==========================================
   MORAN COMMUNITY PORTAL - MAIN STYLESHEET
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Playfair+Display:wght@400;600;700&display=swap');

:root {
  --theme-primary: #7c3aed;
  --theme-primary-dark: #4c1d95;
  --theme-primary-light: #f3e8ff;
  --theme-secondary: #ca8a04;
  --theme-secondary-light: #fefce8;
  --theme-accent: #4c1d95;
  --theme-dark: #2d1b69;
  --theme-footer: #1a0a3e;
  --theme-text: #2d3748;
  --theme-muted: #718096;
  --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #4c1d95 100%);
  --gradient-secondary: linear-gradient(135deg, #ca8a04 0%, #a67c00 100%);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
  --border-radius: 10px;
  --border-radius-lg: 16px;
  --transition: all 0.3s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* ==========================================
   RIBBON — topmost & section divider
   ========================================== */
.site-ribbon-top {
  width: 100%;
  line-height: 0;
  font-size: 0;
  position: relative;
  z-index: 1060;
}
.site-ribbon-top img {
  display: block;
  width: 100%;
  height: 20px;
  object-fit: cover;
  object-position: center;
}
.ribbon-divider {
  width: 100%;
  line-height: 0;
  font-size: 0;
  overflow: hidden;
}
.ribbon-divider img {
  display: block;
  width: 100%;
  height: 20px;
  object-fit: cover;
  object-position: center;
}

body {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  color: var(--theme-text);
  background: #faf7ff;
  line-height: 1.65;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; }
ul { list-style: none; margin: 0; padding: 0; }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--theme-primary); border-radius: 3px; }

.carousel-item {
  margin: 0;
  padding: 0;
}

.carousel, .carousel-inner, .carousel-item {
  height: 100%;
}

/* Collapse empty flash wrapper */
.flash-wrapper:empty { display: none; margin: 0; padding: 0; }

/* No gap under sticky navbar */
.ams-navbar { margin-bottom: 0 !important; }

/* ==========================================
   MEGA MENUS
   ========================================== */
.mega-menu-li { position: static !important; }

.ams-navbar { position: relative; }

.mega-menu {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  border: none !important;
  border-radius: 0 0 12px 12px !important;
  margin-top: 0 !important;
  padding: 0 !important;
  box-shadow: 0 12px 40px rgba(76,29,149,.15) !important;
  z-index: 1040;
}

.mega-menu-inner {
  border-radius: 0 0 12px 12px;
  overflow: hidden;
  border-top: 3px solid #7c3aed;
}

.mega-col { background: #fff; }

.mega-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #7c3aed;
  margin-bottom: 14px;
}

.mega-link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 10px;
  border-radius: 8px;
  margin-bottom: 4px;
  text-decoration: none;
  color: #2d3748;
  transition: background .18s;
}
.mega-link:hover { background: #f3e8ff; color: #7c3aed; }

.mega-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.mega-link-title {
  font-size: .85rem;
  font-weight: 600;
  line-height: 1.3;
}
.mega-link-desc {
  font-size: .75rem;
  color: #718096;
  margin-top: 2px;
  line-height: 1.4;
}

.mega-featured .mega-label { opacity: .85; font-size: .68rem; }

/* On mobile collapse mega menus back to normal */
@media (max-width: 991.98px) {
  .mega-menu {
    position: static !important;
    width: auto !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  .mega-menu-inner { border-radius: 0; border-top: none; }
  .mega-featured { display: none; }
  .mega-col { border-left: none !important; }
}

/* ==========================================
   HEADER
   ========================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1050;
  box-shadow: var(--shadow-md);
}

.header-top {
  background: var(--theme-primary-dark);
  padding: 8px 0;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
}

.header-top a { color: rgba(255,255,255,0.85); }
.header-top a:hover { color: #fff; }
.header-top .divider { color: rgba(255,255,255,0.3); margin: 0 10px; }

.header-main {
  background: var(--gradient-primary);
  padding: 0;
}

.navbar-brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-emblem {
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  flex-shrink: 0;
}
.brand-text h1 {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.2;
}
.brand-text p {
  font-size: 10.5px;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0;
}

.main-nav .nav-link {
  color: rgba(255,255,255,0.9) !important;
  font-size: 13.5px;
  font-weight: 500;
  padding: 20px 14px !important;
  letter-spacing: 0.3px;
  position: relative;
}
.main-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; right: 50%;
  height: 3px;
  background: var(--theme-secondary);
  transition: var(--transition);
}
.main-nav .nav-link:hover, .main-nav .nav-link.active {
  color: #fff !important;
}
.main-nav .nav-link:hover::after, .main-nav .nav-link.active::after {
  left: 0; right: 0;
}
.main-nav .dropdown-menu {
  background: var(--theme-primary-dark);
  border: none;
  border-top: 3px solid var(--theme-secondary);
  border-radius: 0 0 10px 10px;
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
}
.main-nav .dropdown-menu .nav-link {
  padding: 8px 20px !important;
  font-size: 13px;
  color: rgba(255,255,255,0.8) !important;
}
.main-nav .dropdown-menu .nav-link:hover {
  background: rgba(255,255,255,0.08);
  color: #fff !important;
}
.main-nav .dropdown-menu .nav-link::after { display: none; }

.header-btns .btn-login {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  font-size: 13px;
  padding: 6px 16px;
  border-radius: 6px;
  font-weight: 500;
  transition: var(--transition);
}
.header-btns .btn-login:hover { background: rgba(255,255,255,0.25); }
.header-btns .btn-register {
  background: var(--theme-secondary);
  border: 1px solid var(--theme-secondary);
  color: #fff;
  font-size: 13px;
  padding: 6px 16px;
  border-radius: 6px;
  font-weight: 600;
  transition: var(--transition);
}
.header-btns .btn-register:hover { background: #a67c00; }

/* ==========================================
   HERO / BANNER
   ========================================== */
.hero-section {
  background: var(--gradient-primary);
  min-height: 500px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero-section::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.04'%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");
}
.hero-pattern {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 45%;
  background: rgba(255,255,255,0.04);
  clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
}
.hero-content { position: relative; z-index: 2; }
.hero-badge {
  display: inline-block;
  background: rgba(200,134,10,0.25);
  border: 1px solid var(--theme-secondary);
  color: #f5c26b;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 5px 16px;
  border-radius: 20px;
  margin-bottom: 18px;
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 18px;
}
.hero-title span { color: #f5c26b; }
.hero-subtitle {
  color: rgba(255,255,255,0.82);
  font-size: 15.5px;
  max-width: 600px;
  margin-bottom: 32px;
}
.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.hero-stat {
  text-align: center;
}
.hero-stat .num {
  font-size: 28px;
  font-weight: 800;
  color: #f5c26b;
  display: block;
  line-height: 1;
}
.hero-stat .lbl {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}
.hero-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 2;
}
.hero-feature-card {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  backdrop-filter: blur(8px);
  transition: var(--transition);
}
.hero-feature-card:hover { background: rgba(255,255,255,0.18); transform: translateX(-4px); }
.hero-feature-card .icon {
  width: 44px;
  height: 44px;
  background: var(--theme-secondary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
}
.hero-feature-card .text h6 { color: #fff; font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.hero-feature-card .text p { color: rgba(255,255,255,0.7); font-size: 12px; margin: 0; }

/* ==========================================
   TICKER / MARQUEE
   ========================================== */
.ticker-bar {
  background: #fff;
  border-bottom: 3px solid var(--theme-secondary);
  padding: 10px 0;
  overflow: hidden;
}
.ticker-label {
  background: var(--theme-secondary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 14px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 16px;
}
.ticker-scroll {
  overflow: hidden;
  flex: 1;
}
.ticker-scroll-inner {
  display: flex;
  gap: 48px;
  animation: ticker 30s linear infinite;
  white-space: nowrap;
}
.ticker-scroll-inner a {
  color: var(--theme-text);
  font-size: 13px;
}
.ticker-scroll-inner a:hover { color: var(--theme-primary); }
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==========================================
   SECTION STYLES
   ========================================== */
section { padding: 64px 0; }
.section-badge {
  display: inline-block;
  background: var(--theme-primary-light);
  color: var(--theme-primary);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 5px 16px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 700;
  color: var(--theme-primary-dark);
  margin-bottom: 12px;
}
.section-title span { color: var(--theme-secondary); }
.section-divider {
  width: 60px;
  height: 4px;
  background: var(--gradient-secondary);
  border-radius: 2px;
  margin: 0 auto 20px;
}
.section-divider.left { margin: 0 0 20px; }
.section-subtitle {
  color: var(--theme-muted);
  font-size: 15px;
  max-width: 620px;
  margin: 0 auto;
}
.bg-light-green { background: #f5f0ff; }
.bg-dark-green { background: var(--theme-primary-dark); }

/* ==========================================
   FEATURE CARDS
   ========================================== */
.feature-card {
  background: #fff;
  border-radius: var(--border-radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid #ede9fe;
  height: 100%;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: var(--transition);
}
.feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-6px); }
.feature-card:hover::before { transform: scaleX(1); }
.feature-card .card-icon {
  width: 64px;
  height: 64px;
  background: var(--theme-primary-light);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--theme-primary);
  margin-bottom: 20px;
  transition: var(--transition);
}
.feature-card:hover .card-icon {
  background: var(--theme-primary);
  color: #fff;
}
.feature-card h5 {
  font-size: 17px;
  font-weight: 700;
  color: var(--theme-primary-dark);
  margin-bottom: 10px;
}
.feature-card p { color: var(--theme-muted); font-size: 14px; margin-bottom: 20px; }
.feature-card .card-link {
  color: var(--theme-primary);
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.feature-card .card-link i { transition: var(--transition); }
.feature-card:hover .card-link i { transform: translateX(4px); }

/* ==========================================
   STAT CARDS
   ========================================== */
.stat-card {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid #ede9fe;
  transition: var(--transition);
  height: 100%;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.stat-card .stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 14px;
}
.stat-card .stat-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--theme-primary-dark);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-card .stat-label {
  font-size: 12.5px;
  color: var(--theme-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn-primary-custom {
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px 28px;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(124,58,237,0.3);
  cursor: pointer;
}
.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(124,58,237,0.4);
  color: #fff;
}
.btn-secondary-custom {
  background: var(--gradient-secondary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px 28px;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(200,134,10,0.3);
  cursor: pointer;
}
.btn-secondary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(200,134,10,0.4);
  color: #fff;
}
.btn-outline-primary-custom {
  background: transparent;
  color: var(--theme-primary);
  border: 2px solid var(--theme-primary);
  border-radius: 8px;
  padding: 10px 26px;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  cursor: pointer;
}
.btn-outline-primary-custom:hover {
  background: var(--theme-primary);
  color: #fff;
}
.btn-white-custom {
  background: #fff;
  color: var(--theme-primary);
  border: 2px solid #fff;
  border-radius: 8px;
  padding: 10px 26px;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  cursor: pointer;
}
.btn-white-custom:hover { background: transparent; color: #fff; }

/* ==========================================
   PROCESS STEPS
   ========================================== */
.process-step {
  text-align: center;
  position: relative;
}
.process-step .step-num {
  width: 56px;
  height: 56px;
  background: var(--gradient-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  margin: 0 auto 16px;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 12px rgba(124,58,237,0.3);
}
.process-step .step-connector {
  position: absolute;
  top: 28px;
  left: calc(50% + 28px);
  right: calc(-50% + 28px);
  height: 2px;
  background: #ddd6fe;
}
.process-step:last-child .step-connector { display: none; }
.process-step h6 {
  font-weight: 700;
  color: var(--theme-primary-dark);
  margin-bottom: 6px;
  font-size: 14.5px;
}
.process-step p { font-size: 13px; color: var(--theme-muted); }

/* ==========================================
   DOCUMENT CARDS
   ========================================== */
.doc-card {
  background: #fff;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid #ede9fe;
  transition: var(--transition);
  height: 100%;
}
.doc-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.doc-card-header {
  background: var(--gradient-primary);
  padding: 28px 24px;
  text-align: center;
}
.doc-card-header .doc-icon {
  width: 72px;
  height: 72px;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fff;
  margin: 0 auto 14px;
}
.doc-card-header h5 { color: #fff; font-weight: 700; font-size: 17px; margin: 0; }
.doc-card-body { padding: 24px; }
.doc-fee {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--theme-primary-light);
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 16px;
}
.doc-fee .label { font-size: 13px; color: var(--theme-muted); }
.doc-fee .amount { font-size: 20px; font-weight: 800; color: var(--theme-primary); }
.doc-features { list-style: none; margin: 0 0 20px; padding: 0; }
.doc-features li {
  font-size: 13.5px;
  color: var(--theme-text);
  padding: 5px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.doc-features li i { color: var(--theme-primary); font-size: 14px; }

/* ==========================================
   NEWS / UPDATES
   ========================================== */
.news-card {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #ede9fe;
  display: flex;
  gap: 16px;
  transition: var(--transition);
  height: 100%;
}
.news-card:hover { box-shadow: var(--shadow-md); }
.news-date {
  background: var(--theme-primary-light);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  min-width: 52px;
  flex-shrink: 0;
}
.news-date .day { font-size: 22px; font-weight: 800; color: var(--theme-primary); line-height: 1; }
.news-date .month { font-size: 10px; text-transform: uppercase; color: var(--theme-muted); letter-spacing: 1px; }
.news-content h6 { font-size: 14.5px; font-weight: 700; color: var(--theme-primary-dark); margin-bottom: 6px; }
.news-content p { font-size: 13px; color: var(--theme-muted); margin-bottom: 8px; }
.news-content a { font-size: 12.5px; color: var(--theme-primary); font-weight: 600; }

/* ==========================================
   FOOTER
   ========================================== */
.site-footer {
  background: var(--theme-footer);
  color: rgba(255,255,255,0.85);
}
.footer-top { padding: 56px 0 32px; }
.footer-brand { margin-bottom: 20px; }
.footer-brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 12px 0 4px;
}
.footer-brand-tagline { font-size: 11.5px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 1.5px; }
.footer-desc { font-size: 13.5px; color: rgba(255,255,255,0.6); line-height: 1.75; margin-bottom: 20px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 15px;
  transition: var(--transition);
}
.footer-social a:hover { background: var(--theme-primary); color: #fff; border-color: var(--theme-primary); }
.footer-heading {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(255,255,255,0.08);
}
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255,255,255,0.65); font-size: 13.5px; transition: var(--transition); }
.footer-links a:hover { color: #f5c26b; padding-left: 6px; }
.footer-contact-item {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 13.5px;
  color: rgba(255,255,255,0.65);
}
.footer-contact-item i { color: var(--theme-secondary); font-size: 16px; flex-shrink: 0; margin-top: 2px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 18px 0;
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom a { color: rgba(255,255,255,0.55); }
.footer-bottom a:hover { color: #f5c26b; }

/* ==========================================
   FORMS / AUTH PAGES
   ========================================== */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #4c1d95 0%, #7c3aed 50%, #4c1d95 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
}
.auth-page::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.04'%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");
}
.auth-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
  overflow: hidden;
  width: 100%;
  max-width: 920px;
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 580px;
}
.auth-sidebar {
  background: var(--gradient-primary);
  width: 42%;
  padding: 48px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-sidebar::before {
  content: '';
  position: absolute;
  bottom: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.auth-sidebar::after {
  content: '';
  position: absolute;
  top: -30px;
  left: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.auth-sidebar-content { position: relative; z-index: 1; }
.auth-logo { margin-bottom: 32px; }
.auth-logo .emblem {
  width: 64px;
  height: 64px;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  margin-bottom: 14px;
}
.auth-logo h3 { font-family: 'Playfair Display', serif; color: #fff; font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.auth-logo p { color: rgba(255,255,255,0.6); font-size: 12px; }
.auth-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 13.5px;
  color: rgba(255,255,255,0.8);
}
.auth-features li i { color: #f5c26b; font-size: 15px; margin-top: 1px; }
.auth-main { flex: 1; padding: 48px 40px; overflow-y: auto; }
.auth-tab-toggle {
  display: flex;
  background: #f5f0ff;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 28px;
}
.auth-tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--theme-muted);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.auth-tab-btn.active {
  background: var(--theme-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.form-group { margin-bottom: 18px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--theme-text); margin-bottom: 6px; display: block; }
.form-control-custom {
  width: 100%;
  border: 1.5px solid #d8e8df;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--theme-text);
  background: #fff;
  transition: var(--transition);
  font-family: 'Poppins', sans-serif;
  outline: none;
}
.form-control-custom:focus { border-color: var(--theme-primary); box-shadow: 0 0 0 3px rgba(124,58,237,0.12); }
.form-control-custom.error { border-color: #e53e3e; }
.input-group-custom {
  position: relative;
}
.input-group-custom .input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--theme-muted);
  font-size: 15px;
}
.input-group-custom .form-control-custom { padding-left: 38px; }
.input-group-custom .toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--theme-muted);
  font-size: 15px;
  background: none;
  border: none;
}
.form-error { font-size: 12px; color: #e53e3e; margin-top: 4px; display: none; }
.form-error.show { display: block; }
.form-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--theme-muted); font-size: 13px; }
.form-divider::before, .form-divider::after { content: ''; flex: 1; height: 1px; background: #e2e8f0; }

/* ==========================================
   DASHBOARD
   ========================================== */
.dashboard-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px;
  background: var(--theme-primary-dark);
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
  transition: var(--transition);
}
.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; }
.sidebar-brand .emblem {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
}
.sidebar-brand-text h6 { font-family: 'Playfair Display', serif; color: #fff; font-size: 13px; margin: 0; line-height: 1.3; }
.sidebar-brand-text p { color: rgba(255,255,255,0.5); font-size: 10px; margin: 0; }
.sidebar-user {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--theme-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.user-info h6 { color: #fff; font-size: 13px; font-weight: 600; margin: 0; }
.user-info p { color: rgba(255,255,255,0.5); font-size: 11px; margin: 0; }
.sidebar-nav { padding: 12px 0; }
.sidebar-nav-section { padding: 12px 20px 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,0.35); font-weight: 600; }
.sidebar-nav-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  color: rgba(255,255,255,0.65);
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  border-left: 3px solid transparent;
}
.sidebar-nav-item a i { font-size: 17px; width: 20px; text-align: center; }
.sidebar-nav-item a:hover { color: #fff; background: rgba(255,255,255,0.06); }
.sidebar-nav-item a.active { color: #fff; background: rgba(255,255,255,0.1); border-left-color: var(--theme-secondary); }
.sidebar-nav-item a .badge-count {
  margin-left: auto;
  background: var(--theme-secondary);
  color: #fff;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 700;
}
.main-content {
  flex: 1;
  margin-left: 260px;
  background: #faf7ff;
  min-height: 100vh;
}
.content-header {
  background: #fff;
  border-bottom: 1px solid #ede9fe;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.content-header h4 { font-size: 18px; font-weight: 700; color: var(--theme-primary-dark); margin: 0; }
.content-header .breadcrumb { margin: 0; font-size: 12.5px; }
.content-body { padding: 28px; }
.dash-stat-card {
  background: #fff;
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #ede9fe;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}
.dash-stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.dash-stat-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.dash-stat-info .value { font-size: 28px; font-weight: 800; color: var(--theme-primary-dark); line-height: 1; }
.dash-stat-info .label { font-size: 12.5px; color: var(--theme-muted); margin-top: 4px; font-weight: 500; }
.dash-stat-info .change { font-size: 12px; margin-top: 4px; }
.change.up { color: #5b21b6; }
.change.down { color: #e53e3e; }

/* ==========================================
   TABLES
   ========================================== */
.custom-table { border-collapse: collapse; width: 100%; }
.custom-table th {
  background: var(--theme-primary-dark);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 13px 16px;
  white-space: nowrap;
}
.custom-table td { padding: 12px 16px; font-size: 14px; border-bottom: 1px solid #f0f4f0; vertical-align: middle; }
.custom-table tr:hover td { background: #f8f4ff; }
.custom-table tr:last-child td { border-bottom: none; }
.table-wrap { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid #ede9fe; }
.table-header { padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #f0f4f0; flex-wrap: wrap; gap: 12px; }
.table-header h6 { font-size: 16px; font-weight: 700; color: var(--theme-primary-dark); margin: 0; }

/* STATUS BADGES */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.status-badge.pending { background: #fef3c7; color: #92400e; }
.status-badge.approved { background: #d1fae5; color: #065f46; }
.status-badge.rejected { background: #fee2e2; color: #991b1b; }
.status-badge.processing { background: #dbeafe; color: #1e40af; }
.status-badge.ready { background: #d1fae5; color: #065f46; }

/* ==========================================
   MAP PAGE
   ========================================== */
#demographic-map { height: 560px; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-md); }
.map-legend { background: #fff; border-radius: 10px; padding: 16px; box-shadow: var(--shadow-sm); }
.map-legend h6 { font-size: 13px; font-weight: 700; color: var(--theme-primary-dark); margin-bottom: 12px; }
.legend-item { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; color: var(--theme-text); }
.legend-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }

/* ==========================================
   CENSUS TABLE FILTERS
   ========================================== */
.filter-bar {
  background: #fff;
  border-radius: 14px;
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #ede9fe;
  margin-bottom: 20px;
}
.search-input {
  position: relative;
}
.search-input i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--theme-muted); }
.search-input input { padding-left: 36px; }
.filter-select {
  border: 1.5px solid #d8e8df;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 14px;
  background: #fff;
  color: var(--theme-text);
  width: 100%;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}
.filter-select:focus { border-color: var(--theme-primary); }

/* ==========================================
   APPLICATION FORM
   ========================================== */
.application-wizard {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #ede9fe;
  overflow: hidden;
}
.wizard-steps {
  background: #f8f4ff;
  border-bottom: 1px solid #ede9fe;
  padding: 24px 28px;
  display: flex;
  gap: 8px;
}
.wizard-step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.wizard-step-item:last-child { flex: 0; }
.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ede9fe;
  color: var(--theme-muted);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}
.step-circle.active { background: var(--theme-primary); color: #fff; }
.step-circle.done { background: #5b21b6; color: #fff; }
.step-line { flex: 1; height: 2px; background: #ede9fe; transition: var(--transition); }
.step-line.done { background: #5b21b6; }
.wizard-step-connector { flex: 1; height: 2px; background: #ede9fe; transition: var(--transition); align-self: center; }
.wizard-step-item.active .step-circle { background: var(--theme-primary); color: #fff; }
.wizard-step-item.completed .step-circle { background: #5b21b6; color: #fff; }
.wizard-step-item.active + .wizard-step-connector,
.wizard-step-item.completed + .wizard-step-connector { background: var(--theme-primary); }
.step-label { font-size: 12px; font-weight: 600; color: var(--theme-muted); white-space: nowrap; }
.step-label.active { color: var(--theme-primary); }
.wizard-step-item.active .step-label { color: var(--theme-primary); }
.wizard-step-item.completed .step-label { color: #5b21b6; }
.wizard-body { padding: 32px 28px; }
.wizard-step-panel { display: none; }
.wizard-step-panel.active { display: block; }

/* Payment card */
.payment-summary {
  background: var(--theme-primary-light);
  border: 1px solid #ddd6fe;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
}
.payment-summary .title { font-weight: 700; color: var(--theme-primary-dark); margin-bottom: 14px; font-size: 15px; }
.payment-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; border-bottom: 1px solid #ddd6fe; }
.payment-row:last-child { border-bottom: none; font-weight: 700; font-size: 16px; color: var(--theme-primary); }
.payment-method-card {
  border: 2px solid #ede9fe;
  border-radius: 10px;
  padding: 16px 20px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.payment-method-card:hover { border-color: var(--theme-primary); }
.payment-method-card.selected { border-color: var(--theme-primary); background: var(--theme-primary-light); }
.payment-method-card input[type=radio] { flex-shrink: 0; accent-color: var(--theme-primary); width: 16px; height: 16px; }
.payment-method-card:has(input:checked) { border-color: var(--theme-primary); background: var(--theme-primary-light); }
.payment-method-card i { font-size: 22px; color: var(--theme-primary); }
.payment-method-card .pm-icon { width: 44px; height: 44px; background: var(--theme-primary-light); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.payment-method-card .pm-icon i { font-size: 20px; color: var(--theme-primary); }
.payment-method-card .pm-text h6 { font-size: 14px; font-weight: 700; margin: 0 0 2px; color: var(--theme-primary-dark); }
.payment-method-card .pm-text p { font-size: 12px; color: var(--theme-muted); margin: 0; }

/* Document download card */
.download-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #ede9fe;
  box-shadow: var(--shadow-sm);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}
.download-card:hover { box-shadow: var(--shadow-md); }
.download-card .doc-thumb {
  width: 56px; height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}
.download-card .doc-info { flex: 1; }
.download-card .doc-info h6 { font-size: 15px; font-weight: 700; color: var(--theme-primary-dark); margin-bottom: 4px; }
.download-card .doc-info p { font-size: 12.5px; color: var(--theme-muted); margin: 0; }
.download-card .doc-actions { display: flex; gap: 8px; }

/* ==========================================
   MAP POPUP STYLES
   ========================================== */
.leaflet-popup-content-wrapper { border-radius: 12px !important; box-shadow: var(--shadow-lg) !important; }
.map-popup h6 { font-weight: 700; color: var(--theme-primary-dark); margin-bottom: 8px; font-size: 14px; }
.map-popup .pop-row { display: flex; justify-content: space-between; gap: 20px; font-size: 13px; margin-bottom: 4px; }
.map-popup .pop-row .key { color: var(--theme-muted); }
.map-popup .pop-row .val { font-weight: 600; color: var(--theme-text); }

/* ==========================================
   ALERTS & TOASTS
   ========================================== */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; }
.custom-toast {
  background: #fff;
  border-radius: 10px;
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 380px;
  animation: slideIn 0.3s ease;
  margin-bottom: 10px;
  border-left: 4px solid var(--theme-primary);
}
.custom-toast.success { border-left-color: #5b21b6; }
.custom-toast.error { border-left-color: #e53e3e; }
.custom-toast.warning { border-left-color: var(--theme-secondary); }
.custom-toast i { font-size: 20px; }
.custom-toast.success i { color: #5b21b6; }
.custom-toast.error i { color: #e53e3e; }
.custom-toast.warning i { color: var(--theme-secondary); }
.custom-toast .toast-text { flex: 1; font-size: 14px; }
.custom-toast .toast-close { cursor: pointer; color: var(--theme-muted); font-size: 16px; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ==========================================
   MODAL
   ========================================== */
.custom-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  display: none;
}
.custom-modal-overlay.show { display: flex; }
.custom-modal {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.3);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.3s ease;
}
@keyframes modalIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-header-custom {
  padding: 20px 24px 16px;
  border-bottom: 1px solid #f0f4f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header-custom h5 { font-size: 17px; font-weight: 700; color: var(--theme-primary-dark); margin: 0; }
.modal-close { cursor: pointer; color: var(--theme-muted); font-size: 20px; background: none; border: none; }
.modal-body-custom { padding: 24px; }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 991px) {
  .auth-card { flex-direction: column; max-width: 480px; }
  .auth-sidebar { width: 100%; min-height: unset; padding: 28px 28px 20px; }
  .auth-sidebar .sidebar-features { display: none; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .content-header { position: relative; }
}
@media (max-width: 767px) {
  section { padding: 40px 0; }
  .hero-cards { display: none; }
  .hero-stats { gap: 20px; }
  .wizard-steps { overflow-x: auto; }
  .step-label { display: none; }
}
@media (max-width: 575px) {
  .brand-text h1 { font-size: 14px; }
  .auth-main { padding: 28px 20px; }
}

/* ==========================================
   UTILITIES
   ========================================== */
.text-primary-custom { color: var(--theme-primary) !important; }
.text-secondary-custom { color: var(--theme-secondary) !important; }
.bg-primary-custom { background: var(--theme-primary) !important; }
.bg-secondary-custom { background: var(--theme-secondary) !important; }
.fw-700 { font-weight: 700 !important; }
.fw-800 { font-weight: 800 !important; }
.rounded-custom { border-radius: var(--border-radius) !important; }
.rounded-custom-lg { border-radius: var(--border-radius-lg) !important; }
.hidden { display: none !important; }
.grab { cursor: pointer; }
.overlay-green {
  background: linear-gradient(rgba(76,29,149,0.7), rgba(76,29,149,0.85));
}
.section-dark { background: var(--theme-primary-dark); }
.section-dark .section-title { color: #fff; }
.section-dark .section-subtitle { color: rgba(255,255,255,0.7); }
.section-dark .section-badge { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.85); }

/* Navbar toggler for mobile */
.mobile-menu-toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  display: none;
}
@media (max-width: 991px) { .mobile-menu-toggle { display: flex; } }

/* Sidebar toggle */
.sidebar-toggle {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--theme-primary-dark);
  cursor: pointer;
  padding: 4px 8px;
}

/* Print styles */
@media print {
  .sidebar, .content-header, .doc-actions { display: none !important; }
  .main-content { margin-left: 0 !important; }
}
