:root {
  --erp-primary: #6366f1;
  --erp-bg: #f8fafc;
  --erp-sidebar-width: 0px;
  --erp-sidebar-expanded: 260px;
  --erp-sidebar-bg: #10213a;
  --erp-sidebar-bg-light: #173154;
  --navbar-height: 102px;  /* 34px util strip + 68px main nav row */
  --erp-sidebar-gap: 6px;
  --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --card-hover-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* ── App-switcher grid icon (in navbar, after logo) ── */
.erp-app-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
  margin: 0 6px 0 2px;
}
.erp-app-switcher:hover {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.5);
  color: #a5b4fc;
  transform: scale(1.06);
}
.erp-app-switcher svg {
  width: 16px;
  height: 16px;
}
/* Highlight when sidebar is open */
html.erp-sidebar-visible .erp-app-switcher {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(99, 102, 241, 0.55);
  color: #a5b4fc;
}

/* Default: sidebar hidden */
.sidebar {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

/* When sidebar is toggled open */
html.erp-sidebar-visible .sidebar {
  width: var(--erp-sidebar-expanded) !important;
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
  z-index: 150;
  visibility: visible;
}

html.erp-sidebar-visible .main-content {
  margin-left: var(--erp-sidebar-expanded) !important;
  width: calc(100% - var(--erp-sidebar-expanded)) !important;
}

.navbar {
  background: #0f172a !important; 
  /* Solid matching color from main site base - rgba(15, 23, 42, 1) */
}

/* ── Accessible focus outlines ── */
*:focus-visible {
  outline: 2px solid var(--erp-primary);
  outline-offset: 2px;
}

.sidebar-nav a:focus-visible {
  outline-color: #38bdf8;
  outline-offset: -2px;
  border-radius: 8px;
}

.unit-card:focus-visible {
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.3);
}

.next-step-item:focus-visible {
  outline-offset: -1px;
  border-radius: 999px;
}

.cta-button:focus-visible,
.erp-hero a:focus-visible,
.login-btn:focus-visible {
  outline-color: #fbbf24;
  outline-offset: 3px;
}

button:focus-visible {
  outline-offset: 2px;
}

body { 
  margin: 0; 
  padding: 0; 
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--erp-bg);
  color: #1e293b;
}

body.erp-body {
  overflow: hidden;
}

.erp-container { 
  display: block; 
  height: calc(100vh - var(--navbar-height)); 
  background: #f1f5f9;
  overflow: hidden;
  box-sizing: border-box;
}

/* Sidebar - Dark Navy Design (like reference image) */
.sidebar { 
  width: var(--erp-sidebar-expanded); 
  background:
    radial-gradient(circle at top, rgba(56, 189, 248, 0.18), transparent 26%),
    linear-gradient(180deg, #10213a 0%, #132847 42%, #0b1730 100%);
  border-right: none;
  box-shadow: 10px 0 30px rgba(2, 6, 23, 0.2);
  padding: 1rem 0.5rem; 
  position: fixed; 
  top: calc(var(--navbar-height) + var(--erp-sidebar-gap)); 
  left: 0;
  height: calc(100vh - var(--navbar-height) - var(--erp-sidebar-gap)); 
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
  will-change: width, transform;
  display: flex;
  flex-direction: column;
  z-index: 100;
  border-right: 1px solid rgba(148, 163, 184, 0.14);
  /* Firefox scrollbar */
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

/* Expand sidebar on hover - disabled when sidebar panel is open */
.sidebar:hover {
  width: var(--erp-sidebar-expanded);
}

/* Hide text labels when sidebar is hidden (default) */
.sidebar-nav .nav-link > div,
.sidebar-nav .nav-link > span:not(:first-child) {
  opacity: 1;
  width: auto;
  overflow: visible;
  white-space: nowrap;
  transition: opacity 0.12s ease, width 0.15s ease;
  margin: 0 !important;
}

/* Sidebar Header - always expanded style when visible */
.sidebar .sidebar-header {
  display: flex !important;
  text-align: left;
  justify-content: space-between;
  padding: 0.5rem 0.75rem !important;
  margin-top: 1rem !important;
  width: 100% !important;
  opacity: 1 !important;
  visibility: visible !important;
  color: rgba(255, 255, 255, 0.8) !important;
  white-space: normal !important;
  overflow: visible !important;
}

.sidebar .sidebar-header span {
  display: block; 
  opacity: 1 !important;
  width: auto;
  visibility: visible !important;
}

/* Sidebar nav links - always show labels when sidebar is visible */
.sidebar .sidebar-nav .nav-link {
  justify-content: flex-start !important;
}

.sidebar .sidebar-nav .nav-link > div,
.sidebar .sidebar-nav .nav-link > span:not(:first-child) {
  opacity: 1;
  width: auto;
}

/* Hide submenu chevron arrow when collapsed */
.sidebar-nav .nav-link.has-submenu::after {
  opacity: 0;
}
.sidebar:hover .sidebar-nav .nav-link.has-submenu::after {
  opacity: 1;
}

/* FoodPro submenu: Hide entirely when sidebar is collapsed (68px) because text items cannot fit.
   They will reappear when the sidebar expands on hover. */
.sidebar:not(:hover) li.pinned-submenu > .submenu {
  display: none !important;
}

/* Remove forced styling for collapsed submenu links as they differ from main nav */
.sidebar:not(:hover) li.pinned-submenu > .submenu .submenu-link {
  /* No special styling needed when hidden */
}

/* Expanded sidebar — original inline submenu behavior */
.sidebar:hover .sidebar-nav .submenu.pin-visible {
  display: block !important;
  opacity: 1 !important;
  max-height: none !important;
  overflow: visible !important;
  pointer-events: auto !important;
  visibility: visible !important;
}

/* Custom Scrollbar - Webkit (Chrome, Edge, Safari) */
.sidebar::-webkit-scrollbar { 
  width: 4px; 
  display: block;
}
.sidebar::-webkit-scrollbar-track { 
  background: transparent; 
  border-radius: 10px; 
}
.sidebar::-webkit-scrollbar-thumb { 
  background: rgba(255, 255, 255, 0.15); 
  border-radius: 10px;
  min-height: 40px;
}
.sidebar::-webkit-scrollbar-thumb:hover { 
  background: rgba(255, 255, 255, 0.25); 
}

.sidebar-header { 
  font-size: 0.65rem; 
  font-weight: 700; 
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  margin-bottom: 0.75rem; 
  margin-top: 1rem;
  /* brighter, higher-contrast header for better readability */
  color: rgba(255, 255, 255, 0.92);
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(0,0,0,0.12);
  padding-left: 0.75rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
  overflow: hidden;
  opacity: 1;
  transition: color 180ms ease;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 0.5rem; }

.sidebar-nav ul { list-style: none; padding: 0; margin: 0; }

/* Make the modules list stretch and distribute its items evenly top-to-bottom */
.sidebar-nav > ul[aria-label="Modules"] {
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Changed from space-between to prevent hiding items */
  flex: 1 1 auto; /* allow it to grow and fill available sidebar height */
  gap: 0.35rem; /* keep a small gutter between items */
}

/* Ensure the collapsed sidebar shows the header label fully (wrap + smaller text) */
.sidebar .sidebar-header { flex-direction: column !important; gap: 4px !important; }


.sidebar-nav .nav-link { 
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.75rem 1.25rem;
  border-radius: 12px; 
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
  font-weight: 500; 
  margin-bottom: 0.35rem; 
  text-decoration: none; 
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer; 
  position: relative;
  overflow: hidden;
  border: none;
  white-space: nowrap;
  margin-right: 0.5rem;
}

.sidebar-nav .nav-link > div,
.sidebar-nav .nav-link > span:not(:first-child) {
  transition: opacity 0.25s ease;
  overflow: hidden;
}

.sidebar-nav .nav-link i {
  font-size: 1.1rem;
  min-width: 32px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.80);
  transition: all 0.25s ease;
  flex-shrink: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
}

/* Hover State - subtle highlight */
.sidebar-nav .nav-link:hover { 
  background: linear-gradient(90deg, rgba(255,255,255,0.14), rgba(56,189,248,0.08));
  color: #ffffff;
  transform: none;
}

.sidebar-nav .nav-link:hover i {
  transform: scale(1.1);
  color: #ffffff;
}

/* Active State - accent indicator */
.sidebar-nav .nav-link.active { 
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.25), rgba(56, 189, 248, 0.15));
  color: #ffffff;
  border-left: 3px solid #6366f1;
  margin-left: -3px;
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.14);
}

.sidebar-nav .nav-link.active i {
  color: #6366f1;
  filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.5));
}

/* Icon color accents on hover */
.sidebar-nav .nav-link[href*="#hr"]:hover i,
.sidebar-nav .nav-link[href*="#hr"].active i { color: #10b981; }
.sidebar-nav .nav-link[href*="#crm"]:hover i,
.sidebar-nav .nav-link[href*="#crm"].active i { color: #3b82f6; }
.sidebar-nav .nav-link[href*="#accounting"]:hover i,
.sidebar-nav .nav-link[href*="#accounting"].active i { color: #f59e0b; }
.sidebar-nav .nav-link[href*="#inventory"]:hover i,
.sidebar-nav .nav-link[href*="#inventory"].active i { color: #8b5cf6; }
.sidebar-nav .nav-link[href*="#procurement"]:hover i,
.sidebar-nav .nav-link[href*="#procurement"].active i { color: #0d9488; }
.sidebar-nav .nav-link[href*="#school"]:hover i,
.sidebar-nav .nav-link[href*="#school"].active i { color: #ec4899; }
.sidebar-nav .nav-link[href*="#ngo"]:hover i,
.sidebar-nav .nav-link[href*="#ngo"].active i { color: #818cf8; } /* Indigo-400 */
.sidebar-nav .nav-link[href*="#healthcare"]:hover i,
.sidebar-nav .nav-link[href*="#healthcare"].active i { color: #ef4444; }
.sidebar-nav .nav-link[href*="#hotel"]:hover i,
.sidebar-nav .nav-link[href*="#hotel"].active i { color: #f97316; }
.sidebar-nav .nav-link[href*="#foodpro"]:hover i,
.sidebar-nav .nav-link[href*="#foodpro"].active i { color: #0284c7; } /* Sky-600 */
.sidebar-nav .nav-link[href*="#pos"]:hover i,
.sidebar-nav .nav-link[href*="#pos"].active i { color: #a3e635; } /* Lime-400 */
.sidebar-nav .nav-link[href*="#marketplace"]:hover i,
.sidebar-nav .nav-link[href*="#marketplace"].active i { color: #22c55e; }

/* Active states with glow effect */
.sidebar-nav .nav-link[href*="#hr"].active i { filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.5)); }
.sidebar-nav .nav-link[href*="#crm"].active i { filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.5)); }
.sidebar-nav .nav-link[href*="#accounting"].active i { filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.5)); }
.sidebar-nav .nav-link[href*="#inventory"].active i { filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.5)); }
.sidebar-nav .nav-link[href*="#foodpro"].active i { filter: drop-shadow(0 0 8px rgba(2, 132, 199, 0.5)); }
.sidebar-nav .nav-link[href*="#ngo"].active i { filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.5)); }

/* Main Content Area */
.main-content { 
  padding: var(--erp-sidebar-gap) 2px 2px;
  margin-left: var(--erp-sidebar-width);
  width: calc(100% - var(--erp-sidebar-width));
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  overflow-y: auto;
  scroll-padding-top: calc(var(--navbar-height) + 18px);
}

.erp-hero-shell {
  flex-shrink: 0;
}

/* Redesigned ERP hero — Bright Blue Enterprise Theme */
.erp-hero {
  position: relative;
  padding: 3rem 2.5rem;
  border-radius: 24px;
  background: linear-gradient(120deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
  color: #ffffff;
  box-shadow: 0 20px 40px -4px rgba(37, 99, 235, 0.25);
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Background patterns */
.erp-hero::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -20%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
  filter: blur(80px);
  pointer-events: none;
}

.erp-hero::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 60%);
  filter: blur(60px);
  pointer-events: none;
}

.erp-hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.erp-hero-content {
  z-index: 2;
}

.erp-hero-title {
  color: #ffffff;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
  margin: 0 0 1rem 0;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.erp-hero-subtitle {
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 2.2rem 0;
  font-size: 1.15rem;
  max-width: 54ch;
  line-height: 1.6;
  font-weight: 500;
}

.erp-hero-cta {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.erp-hero-cta .btn-primary {
  background: #ffffff;
  color: #2563eb; /* Blue text */
  padding: 0.9rem 1.6rem;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.12);
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.2s ease;
}

.erp-hero-cta .btn-primary:hover {
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -4px rgba(0, 0, 0, 0.18);
}

.erp-hero-cta .btn-outline {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.erp-hero-cta .btn-outline:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.erp-hero-features {
  display: flex;
  gap: 1.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.erp-hero-features .feature {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
}

.erp-hero-features .feature i {
  color: #2563eb;
  background: #ffffff;
  padding: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  box-shadow: none;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Visual Side - Glassy Dashboard */
.erp-hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
}

.mock-dashboard {
  width: 100%;
  max-width: 500px;
  border-radius: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.15); /* Glass effect */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: perspective(1000px) rotateY(-8deg) rotateX(4deg);
  transition: transform 0.4s ease;
}

.mock-dashboard:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg) scale(1.02);
}

.md-chart {
  height: 140px;
  background: rgba(255, 255, 255, 0.5); /* Semi-transparent inner */
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.md-bar {
  width: 100%;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 6px;
  display: block;
}

.md-bar.w-85 {
  background: #ffffff; /* Highlight bar is pure white */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
}
.md-bar.w-85::after {
  content: '+12%';
  position: absolute;
  top: -24px; left: 50%; transform: translateX(-50%);
  background: #ef4444; color: white; padding: 2px 6px;
  font-size: 0.7rem; font-weight: 700; border-radius: 4px;
}

.md-bar.w-60 { height: 60%; }
.md-bar.w-45 { height: 45%; }
.md-bar.w-30 { height: 30%; }

@media (max-width: 1100px) {
  .erp-hero-inner { grid-template-columns: 1fr; text-align: center; gap: 3rem; }
  .erp-hero-content { align-items: center; display: flex; flex-direction: column; }
  .erp-hero-subtitle { margin-left: auto; margin-right: auto; }
  .erp-hero-cta { justify-content: center; }
  .mock-dashboard { margin: 0 auto; transform: none; }
}

@media (max-width: 768px) {
  .erp-hero { padding: 2rem 1.5rem; }
  .erp-hero-title { font-size: 1.85rem; }
  .erp-hero-cta { flex-direction: column; width: 100%; }
  .erp-hero-cta .btn-primary, .erp-hero-cta .btn-outline { width: 100%; justify-content: center; }
}

.erp-content-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-top: 0;
  box-sizing: border-box;
}

.module-section { display: none; }
.module-section.active { display: block; animation: slideIn 0.4s ease-out; }

@keyframes slideIn { 
  from { opacity: 0; transform: translateY(10px); } 
  to { opacity: 1; transform: translateY(0); } 
}

.module-title-area {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.module-title-area h2 {
  font-size: 1.875rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

/* Unit Gateway Cards - 4-column Grid Layout */
.unit-carousel-wrapper {
  position: relative;
  width: 100%;
}

.unit-gateway-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  width: 100%;
}

.unit-carousel-wrapper:hover .unit-gateway-grid {
  /* animation-play-state: paused; — disabled */
}

@keyframes autoScrollUnits {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.unit-gateway-grid::-webkit-scrollbar {
  height: 6px;
}

.unit-gateway-grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}

.unit-gateway-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border-radius: 3px;
}

.unit-card {
  background: white;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid #e6eef8;
  box-shadow: 0 6px 18px rgba(16,24,40,0.04);
  height: 340px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  width: 100%;
  min-width: 0;
  max-width: none;
}

.unit-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1);
  border-color: transparent;
}

.unit-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  transition: height 0.3s ease;
}

.unit-card:hover::before {
  height: 100%;
  opacity: 0.03;
}

.unit-card[data-unit="hr"]::before, .unit-card.unit-hr::before { background: #10b981; }
.unit-card[data-unit="crm"]::before, .unit-card.unit-crm::before { background: #3b82f6; }
.unit-card[data-unit="accounting"]::before, .unit-card.unit-acc::before { background: #f59e0b; }
.unit-card[data-unit="inventory"]::before, .unit-card.unit-inv::before { background: #8b5cf6; }
.unit-card[data-unit="procurement"]::before, .unit-card.unit-proc::before { background: #0d9488; }
.unit-card[data-unit="foodpro"]::before, .unit-card.unit-foodpro::before { background: #10b981; }
.unit-card.unit-agropro::before { background: #16a34a; }
.unit-card.unit-propertypro::before { background: #6366f1; }

/* Additional unit accents to keep all cards consistent */
.unit-card.unit-sch::before { background: #ec4899; }
.unit-card.unit-ch::before { background: #8b5cf6; }
.unit-card.unit-hc::before { background: #ef4444; }
.unit-card.unit-hotel::before { background: #f97316; }
.unit-card.unit-mkt::before { background: #22c55e; }
.unit-card.unit-pos::before { background: #0ea5e9; }
/* Supply Chain unit styles */
.unit-sc .unit-icon-wrapper { background: #ecfeff; color: #06b6d4; }
.unit-card.unit-sc::before { background: #06b6d4; }
.unit-card.unit-ai::before { background: #4f46e5; }
.unit-card.unit-cyber::before { background: #059669; }
/* Staff Roster unit styles */
.unit-card.unit-roster::before { background: #6366f1; }
/* Logistics unit styles */
.unit-card.unit-logistics::before { background: #0891b2; }
/* CarePro unit styles */
.unit-card.unit-carepro::before { background: #14b8a6; }
/* HomeSafe unit styles */
.unit-card.unit-homesafe::before { background: #f97316; }
/* FleetTrack / Vehicle Tracker unit styles */
.unit-card.unit-fleettrack::before { background: #4f46e5; }
/* Payroll unit styles */
.unit-card.unit-payroll::before { background: #6366f1; }
/* Marketing Hub unit styles */
.unit-card.unit-marketing-hub::before { background: #ec4899; }
/* Time Tracker unit styles */
.unit-card.unit-timetracker::before { background: #0891b2; }

.unit-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.unit-hr .unit-icon-wrapper { background: #f0fdf4; color: #10b981; }
.unit-crm .unit-icon-wrapper { background: #eff6ff; color: #3b82f6; }
.unit-acc .unit-icon-wrapper { background: #fffbeb; color: #f59e0b; }
.unit-inv .unit-icon-wrapper { background: #f5f3ff; color: #8b5cf6; }
.unit-proc .unit-icon-wrapper { background: #f0fdf9; color: #0d9488; }
.unit-foodpro .unit-icon-wrapper { background: #ecfdf5; color: #10b981; }

.unit-sch .unit-icon-wrapper { background: #fdf2f8; color: #ec4899; }
.unit-ch .unit-icon-wrapper { background: #f5f3ff; color: #8b5cf6; }
.unit-hc .unit-icon-wrapper { background: #fef2f2; color: #ef4444; }
.unit-hotel .unit-icon-wrapper { background: #fff7ed; color: #f97316; }
.unit-mkt .unit-icon-wrapper { background: #ecfdf5; color: #22c55e; }
.unit-pos .unit-icon-wrapper { background: #f0f9ff; color: #0ea5e9; }
.unit-ai .unit-icon-wrapper { background: #eef2ff; color: #4f46e5; }
.unit-cyber .unit-icon-wrapper { background: #ecfdf3; color: #059669; }
.unit-roster .unit-icon-wrapper { background: #eef2ff; color: #6366f1; }
.unit-logistics .unit-icon-wrapper { background: #ecfeff; color: #0891b2; }
.unit-carepro .unit-icon-wrapper { background: #f0fdfa; color: #14b8a6; }
.unit-homesafe .unit-icon-wrapper { background: #fff7ed; color: #f97316; }
.unit-fleettrack .unit-icon-wrapper { background: #eef2ff; color: #4f46e5; }
.unit-payroll .unit-icon-wrapper { background: #eef2ff; color: #6366f1; }
.unit-marketing-hub .unit-icon-wrapper { background: #fdf2f8; color: #ec4899; }
.unit-timetracker .unit-icon-wrapper { background: #ecfeff; color: #0891b2; }

.unit-card:hover .unit-icon-wrapper {
  transform: scale(1.1) rotate(-5deg);
}

.unit-card h3 { margin: 0; font-size: 1.2rem; font-weight: 700; }
.unit-card p { margin: 0; font-size: 0.9rem; color: #64748b; line-height: 1.5; }

.unit-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(148, 163, 184, 0.16);
  color: #475569;
  width: fit-content;
}
.unit-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 0.8rem; border-top: 1px dashed #e2e8f0; font-size: 0.75rem; font-weight: 600; color: #94a3b8; }
.unit-footer i { transition: transform 0.2s; }
.unit-card:hover .unit-footer i { transform: translateX(4px); color: var(--erp-primary); }

.sidebar-nav .nav-link.has-submenu::after {
  content: '\f107';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-left: auto;
  font-size: 0.7rem;
  transition: transform 0.3s;
  color: rgba(255, 255, 255, 0.4);
  opacity: 0;
}

.sidebar:hover .sidebar-nav .nav-link.has-submenu::after {
  opacity: 1;
}

.sidebar-nav .nav-link.has-submenu.open::after {
  transform: rotate(180deg);
}

.sidebar-nav .submenu {
  display: none;
  list-style: none;
  padding-left: 2.5rem;
  margin-bottom: 0.5rem;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  margin-left: 1.2rem;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.sidebar-nav li.pinned-submenu {
  position: relative;
}

.sidebar-nav .submenu.pin-visible {
  /* controlled by collapsed/expanded rules above */
}

.sidebar:hover .sidebar-nav .submenu {
  opacity: 1;
  max-height: 9999px;
}

.sidebar-nav .submenu.open {
  display: block;
  opacity: 1;
  max-height: 9999px;
  animation: slideDown 0.3s ease-out;
}

.sidebar-nav .submenu-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0.42rem 0.5rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.2s;
  position: relative;
  border-radius: 7px;
}

.sidebar-nav .submenu-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
  padding-left: 0.75rem;
}

.sidebar-nav .submenu-link.active {
  color: #818cf8;
  background: rgba(99, 102, 241, 0.14);
  font-weight: 600;
}

.sidebar-nav .submenu-link::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  flex-shrink: 0;
  transition: background 0.2s;
}

.sidebar-nav .submenu-link:hover::before {
  background: rgba(255, 255, 255, 0.65);
}

.sidebar-nav .submenu-link.active::before {
  background: #818cf8;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Dashboard Landing Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.next-steps-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: stretch;
  margin-bottom: 2.5rem;
  background: linear-gradient(90deg, rgba(15,23,42,0.02), rgba(37,99,235,0.03));
  border-radius: 999px;
  padding: 0.35rem 0.5rem;
}

.next-step-item {
  flex: 1 1 180px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  color: #0f172a;
  cursor: pointer;
  transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.next-step-item span.next-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 700;
  font-size: 0.75rem;
}

.next-step-item span.next-step-label {
  font-weight: 600;
  white-space: nowrap;
}

.next-step-item:hover {
  background: rgba(148, 163, 184, 0.14);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  border: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-hover-shadow);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-info h4 { margin: 0; font-size: 2rem; font-weight: 800; color: #1e293b; }
.stat-info p { margin: 0; color: #64748b; font-size: 0.875rem; font-weight: 500; }

/* Module Section Handling */
.module-section { 
  display: none; 
  animation: fadeIn 0.4s ease-out;
  position: relative;
}

.module-section.active { 
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.module-title-area {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.module-section iframe { 
  width: 100%; 
  min-height: 85vh; 
  border-radius: 20px; 
  border: 1px solid rgba(99,102,241,0.25); 
  background: #fff; 
  box-shadow: 0 0 0 1px rgba(99,102,241,0.15), var(--card-shadow);
  display: block;
  -webkit-clip-path: inset(0 round 20px);
  clip-path: inset(0 round 20px);
}

/* Module loading skeleton */
.module-loader {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  background: #f8fafc;
  border-radius: 20px;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.module-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.module-loader-bar {
  width: 260px;
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  position: relative;
}

.module-loader-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 40%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--erp-primary), #38bdf8);
  animation: loaderSlide 1.2s ease-in-out infinite;
}

@keyframes loaderSlide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

.module-loader-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

.module-loader-skeleton {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 70%;
  max-width: 520px;
  margin-top: 0.5rem;
}

.module-loader-skeleton span {
  display: block;
  height: 14px;
  border-radius: 8px;
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}

.module-loader-skeleton span:nth-child(1) { width: 100%; }
.module-loader-skeleton span:nth-child(2) { width: 80%; }
.module-loader-skeleton span:nth-child(3) { width: 60%; }

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (max-width: 1100px) {
  .sidebar { 
    width: 100%; 
    height: auto; 
    top: 0; 
    position: relative; 
    border-right: none; 
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem;
  }
  .sidebar-nav ul {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  .sidebar-nav .nav-link { margin-bottom: 0; }
  .main-content { padding: 1rem 1rem 0.75rem; margin-left: 0; width: 100%; }

  /* Modules: 3 columns on tablet */
  .unit-gateway-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
  }

  .unit-card {
    min-width: 0;
    max-width: none;
    padding: 1.2rem;
  }

  /* Next-steps strip wraps more gracefully */
  .next-steps-strip {
    border-radius: 16px;
    padding: 0.5rem;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: var(--navbar-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--navbar-height));
    background: white;
    flex-direction: column;
    padding: 2rem;
    transition: 0.3s;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex !important;
  }

  .nav-menu.active {
    left: 0;
  }

  .mobile-menu-btn {
    display: block !important;
  }

  .nav-auth-buttons {
    display: none !important;
  }

  /* Modules: 2 columns on mobile */
  .unit-gateway-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding-left: 0;
  }

  .unit-card {
    min-width: 0;
    max-width: none;
    padding: 1.2rem;
    border-radius: 14px;
  }

  .unit-card h3 {
    font-size: 0.85rem;
  }

  .unit-card p {
    font-size: 0.7rem;
    line-height: 1.35;
  }

  /* Smaller icon wrapper on mobile */
  .unit-icon-wrapper {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  /* Stack next-steps vertically */
  .next-steps-strip {
    flex-direction: column;
    border-radius: 14px;
    padding: 0.5rem;
    gap: 0.25rem;
  }

  .next-step-item {
    flex: 1 1 auto;
    padding: 0.55rem 0.9rem;
    font-size: 0.82rem;
  }

  /* Stat cards stack better */
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stat-card {
    padding: 1.25rem;
  }
}

/* Compact Footer for ERP */

/* ── Actions Band ── */
.erp-actions-band {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.4rem 1.5rem;
  margin: 3rem 0 0; /* Added generous top margin */
  background: linear-gradient(135deg, #f1f5f9 0%, #e0e7ff 100%);
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.erp-actions-band-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  background: white;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.erp-actions-band-item i {
  font-size: 0.9rem;
  color: var(--erp-primary);
  transition: transform 0.2s ease;
}

.erp-actions-band-item:hover {
  background: var(--erp-primary);
  color: white;
  border-color: var(--erp-primary);
  box-shadow: 0 6px 20px rgba(99,102,241,0.25);
  transform: translateY(-2px);
}

.erp-actions-band-item:hover i {
  color: white;
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .erp-actions-band {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    padding: 1.2rem 1rem;
  }
  .erp-actions-band-item {
    justify-content: center;
    padding: 0.75rem 1rem;
  }
}

.footer { padding: 0; }
.footer-content { gap: 2rem; margin-bottom: 0; }
.footer-section h3 { margin-bottom: 0.75rem; font-size: 1.15rem; color: var(--erp-primary); }
.footer-section p, .footer-section a { margin-bottom: 0.5rem; line-height: 1.6; font-size: 0.95rem; }
.footer-bottom { padding-top: 0; }

/* Sidebar Logo Area */
.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 1rem;
}

.sidebar-logo i {
  font-size: 1.5rem;
  color: #6366f1;
  filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.4));
}

/* Tooltip for collapsed sidebar */
.sidebar-nav .nav-link .tooltip {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--erp-sidebar-bg);
  color: #ffffff;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sidebar:not(:hover) .sidebar-nav .nav-link:hover .tooltip {
  opacity: 1;
  visibility: visible;
}

/* Colored sidebar dividers */
.sidebar-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  margin: 1rem 0;
}

/* User profile section at bottom */
.sidebar-profile {
  margin-top: auto;
  padding: 1rem 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.sidebar-profile-info {
  opacity: 1;
  transition: opacity 0.3s ease;
  overflow: hidden;
}

.sidebar-profile-name {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

.sidebar-profile-role {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.7rem;
  white-space: nowrap;
}

/* Mobile sidebar adjustments */
@media (max-width: 768px) {
  :root {
    --navbar-height: 56px; /* util-bar hidden on mobile */
  }
  .sidebar {
    width: 0;
    z-index: 999;
  }
  
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
  }

  /* App-switcher: touch-friendly size on mobile */
  .erp-app-switcher {
    width: 40px;
    height: 40px;
  }
}

/* Legacy collapsed-state overrides — hide text when sidebar is narrow */
.sidebar:not(:hover) .sidebar-header {
  opacity: 0;
  visibility: hidden;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.sidebar:not(:hover) .sidebar-profile-info {
  opacity: 0;
  width: 0;
  overflow: hidden;
}




/* ---------------------------------------------------- */
/* Sidebar Status Visibility Rules                      */
/* ---------------------------------------------------- */

/* Default: Collapsed State */
.sidebar:not(:hover) .status-text {
  display: none !important;
  opacity: 0 !important;
  width: 0 !important;
}

.sidebar:not(:hover) .status-dot {
  display: none !important; /* Hide dot in favor of check icon when collapsed */
}

.sidebar:not(:hover) .status-icon {
  display: flex !important;
  font-size: 1.4rem;
  color: #10b981;
  opacity: 1 !important;
  visibility: visible !important;
  margin: 0 auto;
}

/* Expanded State */
.sidebar:hover .status-text {
  display: inline-block !important;
  opacity: 1 !important;
  width: auto !important;
  white-space: nowrap;
}

.sidebar:hover .status-dot {
  display: inline-block !important;
}

.sidebar:hover .status-icon {
  display: none !important; /* Hide check icon when expanded to show full pill */
}

/* Ensure container centers the icon when collapsed */
.sidebar:not(:hover) .sidebar-status > div > div {
  justify-content: center;
}

/* ══════════════════════════════════════════════════
   MODERN SIDEBAR ENHANCEMENTS
   - Per-module always-on icon colours with pill bg
   - Larger, clearer nav labels
   - Styled submenu group separators
   ══════════════════════════════════════════════════ */

/* Per-module icon colours — icon symbol coloured, no background in normal state */
.sidebar-nav .nav-link[href*="#hr"] i            { color: #10b981; background: rgba(16,185,129,0.12); }
.sidebar-nav .nav-link[href*="#crm"] i           { color: #3b82f6; background: rgba(59,130,246,0.12); }
.sidebar-nav .nav-link[href*="#accounting"] i    { color: #f59e0b; background: rgba(245,158,11,0.12); }
.sidebar-nav .nav-link[href*="#inventory"] i     { color: #8b5cf6; background: rgba(139,92,246,0.12); }
.sidebar-nav .nav-link[href*="#procurement"] i   { color: #14b8a6; background: rgba(20,184,166,0.12); }
.sidebar-nav .nav-link[href*="#treasury"] i      { color: #34d399; background: rgba(52,211,153,0.12); }
.sidebar-nav .nav-link[href*="#school"] i        { color: #ec4899; background: rgba(236,72,153,0.12); }
.sidebar-nav .nav-link[href*="#ngo"] i           { color: #818cf8; background: rgba(129,140,248,0.12); }
.sidebar-nav .nav-link[href*="#healthcare"] i    { color: #f87171; background: rgba(248,113,113,0.12); }
.sidebar-nav .nav-link[href*="#hotel"] i         { color: #fb923c; background: rgba(251,146,60,0.12); }
.sidebar-nav .nav-link[href*="#foodpro"] i       { color: #22d3ee; background: rgba(34,211,238,0.12); }
.sidebar-nav .nav-link[href*="#agropro"] i       { color: #4ade80; background: rgba(74,222,128,0.12); }
.sidebar-nav .nav-link[href*="#pos"] i           { color: #a3e635; background: rgba(163,230,53,0.12); }
.sidebar-nav .nav-link[href*="#marketplace"] i   { color: #22c55e; background: rgba(34,197,94,0.12); }
.sidebar-nav .nav-link[href*="#logistics"] i     { color: #38bdf8; background: rgba(56,189,248,0.12); }
.sidebar-nav .nav-link[href*="#carepro"] i       { color: #2dd4bf; background: rgba(45,212,191,0.12); }
.sidebar-nav .nav-link[href*="#church"] i        { color: #c084fc; background: rgba(192,132,252,0.12); }
.sidebar-nav .nav-link[href*="#homecare"] i      { color: #fb923c; background: rgba(251,146,60,0.12); }

/* On hover — add a subtle tinted pill behind each coloured icon */
.sidebar-nav .nav-link[href*="#hr"]:hover i, .sidebar-nav .nav-link[href*="#hr"].active i { background: rgba(16,185,129,0.12); }
.sidebar-nav .nav-link[href*="#crm"]:hover i, .sidebar-nav .nav-link[href*="#crm"].active i { background: rgba(59,130,246,0.12); }
.sidebar-nav .nav-link[href*="#accounting"]:hover i, .sidebar-nav .nav-link[href*="#accounting"].active i { background: rgba(245,158,11,0.12); }
.sidebar-nav .nav-link[href*="#inventory"]:hover i, .sidebar-nav .nav-link[href*="#inventory"].active i { background: rgba(139,92,246,0.12); }
.sidebar-nav .nav-link[href*="#procurement"]:hover i, .sidebar-nav .nav-link[href*="#procurement"].active i { background: rgba(20,184,166,0.12); }
.sidebar-nav .nav-link[href*="#treasury"]:hover i, .sidebar-nav .nav-link[href*="#treasury"].active i { background: rgba(52,211,153,0.12); }
.sidebar-nav .nav-link[href*="#school"]:hover i, .sidebar-nav .nav-link[href*="#school"].active i { background: rgba(236,72,153,0.12); }
.sidebar-nav .nav-link[href*="#ngo"]:hover i, .sidebar-nav .nav-link[href*="#ngo"].active i { background: rgba(129,140,248,0.12); }
.sidebar-nav .nav-link[href*="#healthcare"]:hover i, .sidebar-nav .nav-link[href*="#healthcare"].active i { background: rgba(248,113,113,0.12); }
.sidebar-nav .nav-link[href*="#hotel"]:hover i, .sidebar-nav .nav-link[href*="#hotel"].active i { background: rgba(251,146,60,0.12); }
.sidebar-nav .nav-link[href*="#foodpro"]:hover i, .sidebar-nav .nav-link[href*="#foodpro"].active i { background: rgba(34,211,238,0.12); }
.sidebar-nav .nav-link[href*="#agropro"]:hover i, .sidebar-nav .nav-link[href*="#agropro"].active i { background: rgba(74,222,128,0.12); }
.sidebar-nav .nav-link[href*="#pos"]:hover i, .sidebar-nav .nav-link[href*="#pos"].active i { background: rgba(163,230,53,0.12); }
.sidebar-nav .nav-link[href*="#marketplace"]:hover i, .sidebar-nav .nav-link[href*="#marketplace"].active i { background: rgba(34,197,94,0.12); }
.sidebar-nav .nav-link[href*="#logistics"]:hover i, .sidebar-nav .nav-link[href*="#logistics"].active i { background: rgba(56,189,248,0.12); }
.sidebar-nav .nav-link[href*="#carepro"]:hover i, .sidebar-nav .nav-link[href*="#carepro"].active i { background: rgba(45,212,191,0.12); }
.sidebar-nav .nav-link[href*="#church"]:hover i, .sidebar-nav .nav-link[href*="#church"].active i { background: rgba(192,132,252,0.12); }
.sidebar-nav .nav-link[href*="#homecare"]:hover i, .sidebar-nav .nav-link[href*="#homecare"].active i { background: rgba(251,146,60,0.12); }

/* Hover & active glow and scale */
.sidebar-nav .nav-link:hover i { transform: scale(1.1); }
.sidebar-nav .nav-link.active i { filter: brightness(1.2) drop-shadow(0 0 5px currentColor); }

/* Main label text inside nav-link div */
.sidebar-nav .nav-link > div > span:first-child {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Sub-label text (e.g. "Human Resources", "powered by Elinom") */
.sidebar-nav .nav-link > div > span:last-child {
  font-size: 0.72rem !important;
  opacity: 0.65;
}

/* Submenu group separator headers (uppercase labels like BANKING, SALES & REVENUE) */
.sidebar-nav .submenu li[style*="pointer-events:none"],
.sidebar-nav .submenu li[style*="pointer-events: none"] {
  font-size: 0.7rem !important;
  color: rgba(255, 255, 255, 0.5) !important;
  letter-spacing: 0.1em !important;
  padding: 6px 8px 2px !important;
  margin-top: 4px;
}

/* Wider submenu left gutter for accounting (long text items) */
#accountingSubmenu {
  padding-left: 0.5rem;
}

/* Accounting submenu — section-coloured dot (colour injected via JS --acct-dot) */
#accountingSubmenu .submenu-link::before {
  background: var(--acct-dot, rgba(255, 255, 255, 0.22));
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE OVERRIDES — Dashboard-specific
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .unit-gateway-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
}
@media (max-width: 480px) {
  .unit-gateway-grid {
    grid-template-columns: 1fr !important;
  }
  .dashboard-grid {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 600px) {
  .main-content { padding: 12px; }
  .card-body { padding: 12px; }
}
