/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   NUR WORLD â€” ENTERPRISE DESIGN SYSTEM v1.0
   Premium CSS tokens, components & animations
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€â”€ Google Fonts & Icon Imports (MUST be first) â”€â”€â”€ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Hind+Siliguri:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap');

/* â”€â”€â”€ Backward Compatibility: old sidebar-link class â”€â”€â”€ */
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; font-size: 13px; font-weight: 500;
  color: #94a3b8; text-decoration: none; border-left: 3px solid transparent;
  transition: all 0.15s ease;
}
.sidebar-link:hover  { background: rgba(255,255,255,0.05); color: #e2e8f0; border-left-color: rgba(255,255,255,0.15); }
.sidebar-link.active { background: rgba(37,99,235,0.85); color: #fff; font-weight: 700; border-left-color: #93c5fd; }
.sidebar-link svg    { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.7; }
.sidebar-link.active svg, .sidebar-link:hover svg { opacity: 1; }
.sidebar-logo-box    { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg,#2563eb,#1e40af); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-weight: 900; color: #fff; font-size: 14px; overflow: hidden; }
.sidebar-logo-box img { width: 100%; height: 100%; object-fit: contain; }
.sidebar-user-bar    { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid rgba(255,255,255,0.07); }
.sidebar-user-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg,#0ea5e9,#0369a1); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #fff; flex-shrink: 0; overflow: hidden; }
.sidebar-logout      { margin: 8px 14px 14px; background: rgba(185,28,28,0.18); border: 1px solid rgba(239,68,68,0.3); color: #f87171; font-size: 13px; font-weight: 700; padding: 9px; border-radius: 8px; cursor: pointer; text-align: center; transition: all 0.2s ease; display: block; text-decoration: none; }
.sidebar-logout:hover { background: rgba(185,28,28,0.32); color: #fca5a5; }

/* â”€â”€â”€ CSS Custom Properties (Design Tokens) â”€â”€â”€ */
:root {
  --font-main: 'Inter', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
  --font-mono: 'Courier New', Courier, monospace;

  /* Theme Palette from Geist Dark Config */
  --bg-dark:                #0f131c;
  --surface-container:      #1c1f29;
  --surface-container-high: #262a34;
  --surface-container-low:  #181b25;
  --primary-accent:         #c0c1ff;
  --primary-container:      #8083ff;
  --secondary-container:    #0053db;
  --tertiary-accent:        #7bd0ff;
  --error-accent:           #ffb4ab;

  /* Sidebar */
  --sidebar-bg:      #0f131c;
  --sidebar-width:   240px;
  --sidebar-border:  rgba(255, 255, 255, 0.08);
  --sidebar-text:    #c7c4d7;
  --sidebar-hover:   rgba(255, 255, 255, 0.05);
  --sidebar-active:  rgba(0, 83, 219, 0.25);
  --sidebar-section: rgba(255, 255, 255, 0.35);

  /* Surface */
  --surface-bg:    #0f131c;
  --surface-card:  #1c1f29;
  --surface-border:rgba(255, 255, 255, 0.08);

  /* Text */
  --text-primary:   #dfe2ef;
  --text-secondary: #c7c4d7;
  --text-muted:     #908fa0;
}

/* Accessibility & Global overrides */
html, body {
  font-family: var(--font-main) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Visible focus for keyboard users */
:where(:focus-visible) {
  outline: 3px solid rgba(96,146,255,0.18);
  outline-offset: 3px;
}

/* Respect reduced motion preferences: disable heavy animations and backdrop blurs */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .glass-panel, .backdrop-blur-sm, .backdrop-filter {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

/* Soften some extreme glows on small screens */
@media (max-width: 640px) {
  .ent-sidebar { width: 64px; }
  .ambient-glow { display: none; }
}

/* End accessibility overrides */

/* â”€â”€â”€ Geist Dark Glassmorphism Utilities â”€â”€â”€ */
.glass-panel {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.75) 0%, rgba(15, 23, 42, 0.45) 100%) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.neon-glow {
    filter: drop-shadow(0 0 8px rgba(192, 193, 255, 0.5));
}

.table-row-hover {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.table-row-hover:hover {
    background-color: rgba(255, 255, 255, 0.03) !important;
    transform: scale(1.002);
}

/* â”€â”€â”€ Base Reset â”€â”€â”€ */
*, *::before, *::after { box-sizing: border-box; }
body { font-family: var(--font-main); }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   ENTERPRISE SIDEBAR
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.ent-sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  /* overflow: hidden; Removed so toggle can protrude */
  border-right: 1px solid var(--sidebar-border);
}

/* Logo area */
.ent-sidebar-logo {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.ent-sidebar-logo-icon {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg,#3b82f6,#8b5cf6,#ec4899);
  background-size: 200% 200%;
  animation: nurGradientGlow 4s ease infinite;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-weight: 900; color: #fff; font-size: 15px;
  box-shadow: 0 0 15px rgba(139,92,246,0.5), 0 0 30px rgba(59,130,246,0.3);
  border: 1px solid rgba(255,255,255,0.2);
}
.ent-sidebar-logo-icon img {
  width: 100%; height: 100%; object-fit: contain; border-radius: 10px;
}
.ent-sidebar-logo-name {
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.08em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-width: 0;
  text-transform: uppercase;
  background: linear-gradient(90deg, #60a5fa, #c084fc, #f472b6, #60a5fa);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: nurTextShimmer 4s linear infinite, nurPulseGlow 2s ease-in-out infinite alternate;
}

@keyframes nurGradientGlow {
  0% { background-position: 0% 50%; box-shadow: 0 0 15px rgba(59,130,246,0.6), 0 0 30px rgba(139,92,246,0.3); }
  50% { background-position: 100% 50%; box-shadow: 0 0 20px rgba(236,72,153,0.7), 0 0 35px rgba(139,92,246,0.5); }
  100% { background-position: 0% 50%; box-shadow: 0 0 15px rgba(59,130,246,0.6), 0 0 30px rgba(139,92,246,0.3); }
}

@keyframes nurTextShimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

@keyframes nurPulseGlow {
  0% { filter: drop-shadow(0 0 2px rgba(96,165,250,0.5)); }
  100% { filter: drop-shadow(0 0 8px rgba(192,132,252,0.8)); }
}

/* Nav */
.ent-sidebar-nav {
  flex: 1; overflow-y: auto; padding: 10px 0;
}
.ent-sidebar-nav::-webkit-scrollbar { width: 3px; }
.ent-sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.ent-sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* Section label */
.ent-nav-section {
  padding: 14px 18px 4px;
  font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.22);
}

.ent-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px;
  font-size: 13px; font-weight: 500;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: 8px;
  transition: var(--transition-fast);
  border-left: 3px solid transparent;
  position: relative;
  margin: 2px 10px;
}
.ent-nav-link:hover {
  background: var(--sidebar-hover);
  color: #fff;
  border-left-color: rgba(255,255,255,0.2);
}
.ent-nav-link.active { background: linear-gradient(90deg, #6366f1, #4f46e5); color: #ffffff !important; font-weight: 700; border-left-color: transparent; box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4); }
.ent-nav-link svg, .ent-nav-link .material-symbols-outlined {
  font-size: 18px !important;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; opacity: 0.85;
}
.ent-nav-link.active svg, .ent-nav-link.active .material-symbols-outlined, .ent-nav-link:hover svg, .ent-nav-link:hover .material-symbols-outlined { opacity: 1; color: #ffffff; }

/* Sidebar Toggle Collapsed State */
.ent-sidebar.collapsed {
  width: 70px !important;
}
.ent-sidebar.collapsed .ent-sidebar-logo-name,
.ent-sidebar.collapsed .ent-nav-section,
.ent-sidebar.collapsed .ent-nav-link span,
.ent-sidebar.collapsed .ent-sidebar-user-info,
.ent-sidebar.collapsed .ent-sidebar-support,
.ent-sidebar.collapsed .ent-sidebar-software-by {
  display: none !important;
}
.ent-sidebar.collapsed .ent-sidebar-logo {
  justify-content: center;
  padding: 18px 8px 14px;
}
.ent-sidebar.collapsed .ent-sidebar-logo-icon {
  display: none !important; /* Hide the 'N' logo icon when collapsed to show just the toggle button centered */
}
.ent-sidebar.collapsed .ent-sidebar-toggle {
  margin-left: 0;
}
.ent-sidebar.collapsed .ent-nav-link {
  justify-content: center;
  padding: 10px;
  margin: 4px 6px;
}
.ent-sidebar-toggle {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4), 0 0 15px rgba(124, 58, 237, 0.3);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: auto;
  flex-shrink: 0;
  outline: none;
}
.ent-sidebar-toggle:hover {
  transform: scale(1.1);
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.6), 0 0 25px rgba(139, 92, 246, 0.5);
  border-color: rgba(255, 255, 255, 0.6);
}
.ent-sidebar-toggle span, .ent-sidebar-toggle svg {
  font-size: 18px !important;
  color: #ffffff !important;
  transition: transform 0.3s ease;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}
.ent-sidebar.collapsed .ent-sidebar-toggle span,
.ent-sidebar.collapsed .ent-sidebar-toggle svg {
  transform: rotate(180deg);
}


.ent-nav-link.active svg, .ent-nav-link:hover svg { opacity: 1; }

/* Badge on nav link */
.ent-nav-badge {
  margin-left: auto;
  font-size: 9px; font-weight: 800;
  padding: 1px 6px; border-radius: 20px;
  background: #ef4444; color: #fff;
}

/* User bar */
.ent-sidebar-user {
  border-top: 1px solid var(--sidebar-border);
  padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
}
.ent-sidebar-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg,#0ea5e9,#0369a1);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
.ent-sidebar-user-info { flex: 1; min-width: 0; }
.ent-sidebar-user-name {
  font-size: 12px; font-weight: 700; color: #f1f5f9;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ent-sidebar-user-role {
  font-size: 10px; color: #64748b;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ent-sidebar-logout {
  width: 30px; height: 30px; border-radius: 8px; border: none;
  background: rgba(239,68,68,0.12); color: #f87171;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: var(--transition-fast); flex-shrink: 0;
}
.ent-sidebar-logout:hover { background: rgba(239,68,68,0.25); color: #fca5a5; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   TOP HEADER / TOPBAR
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.ent-topbar {
  height: 60px;
  background: var(--surface-card);
  border-bottom: 1px solid var(--surface-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
  gap: 16px;
}
.ent-topbar-title { font-size: 15px; font-weight: 800; color: var(--text-primary, #dfe2ef) !important; letter-spacing: -0.01em; }
.ent-topbar-subtitle { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* Global Search */
.ent-search {
  display: flex; align-items: center; gap: 8px;
  background: #f8fafc;
  border: 1.5px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 6px 14px;
  min-width: 220px; max-width: 320px;
  cursor: pointer; transition: var(--transition-fast);
}
.ent-search:hover { border-color: #93c5fd; background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,0.06); }
.ent-search input {
  border: none; outline: none; background: transparent;
  font-size: 13px; color: var(--text-primary); width: 100%;
  font-family: var(--font-main);
}
.ent-search input::placeholder { color: var(--text-muted); }
.ent-search-kbd {
  font-size: 10px; font-weight: 600; color: var(--text-muted);
  background: #e2e8f0; border-radius: 4px; padding: 1px 5px;
  border: 1px solid #cbd5e1; white-space: nowrap;
}

/* Icon buttons in header */
.ent-icon-btn {
  width: 36px; height: 36px; border-radius: var(--radius-md);
  background: transparent; border: none;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); cursor: pointer;
  transition: var(--transition-fast); position: relative;
}
.ent-icon-btn:hover { background: var(--surface-bg); color: var(--text-primary); }
.ent-icon-btn .badge {
  position: absolute; top: 4px; right: 4px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #ef4444; color: #fff;
  font-size: 9px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   CARDS
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.ent-card {
  background: var(--surface-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.ent-card-header {
  padding: 18px 20px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.ent-card-title {
  font-size: 14px; font-weight: 700; color: var(--text-primary);
}
.ent-card-body { padding: 16px 20px 20px; }

/* KPI Stat Card */
.ent-kpi-card {
  background: var(--surface-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  cursor: pointer; text-decoration: none; display: block;
  position: relative; overflow: hidden;
}
.ent-kpi-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--kpi-color, #2563eb);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.ent-kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(37,99,235,0.2);
}
.ent-kpi-icon {
  width: 40px; height: 40px; border-radius: var(--radius-md);
  background: var(--kpi-bg, #eff6ff);
  display: flex; align-items: center; justify-content: center;
  color: var(--kpi-color, #2563eb);
  font-size: 18px; margin-bottom: 14px;
}
.ent-kpi-label {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 4px;
}
.ent-kpi-value {
  font-size: 28px; font-weight: 900; color: var(--text-primary);
  line-height: 1; letter-spacing: -0.03em;
}
.ent-kpi-trend {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
  margin-top: 8px;
}
.ent-kpi-trend.up { background: #ecfdf5; color: #059669; }
.ent-kpi-trend.down { background: #fef2f2; color: #dc2626; }
.ent-kpi-trend.neutral { background: var(--surface-bg); color: var(--text-muted); }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   SKELETON LOADERS
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
.ent-skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.ent-skeleton-text { height: 14px; border-radius: 4px; }
.ent-skeleton-circle { border-radius: 50%; }
.ent-skeleton-card {
  background: var(--surface-card); border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg); padding: 18px 20px;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   TABLES
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.ent-table-wrap {
  overflow-x: auto; border-radius: var(--radius-lg);
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-sm);
}
.ent-table {
  width: 100%; border-collapse: collapse; background: var(--surface-card);
  font-size: 13px; color: var(--text-primary);
}
.ent-table thead th {
  background: var(--surface-container-high);
  padding: 11px 14px;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-muted);
  border-bottom: 1.5px solid var(--surface-border);
  white-space: nowrap; user-select: none;
  cursor: pointer; transition: var(--transition-fast);
  position: sticky; top: 0; z-index: 1;
}
.ent-table thead th:hover { background: var(--surface-border); color: var(--text-primary); }
.ent-table tbody tr { border-bottom: 1px solid var(--surface-border); transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
.ent-table tbody tr:last-child { border-bottom: none; }
.ent-table tbody tr:hover { background: rgba(255,255,255,0.04); backdrop-filter: blur(8px); transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,0.15); z-index: 10; position: relative; }
.ent-table td { padding: 11px 14px; vertical-align: middle; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   STATUS BADGES
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.ent-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 20px;
}
.ent-badge::before {
  content: ''; width: 5px; height: 5px;
  border-radius: 50%; background: currentColor; flex-shrink: 0;
}
.ent-badge-success { background: var(--success-bg); color: var(--success-text); }
.ent-badge-warning { background: var(--warning-bg); color: var(--warning-text); }
.ent-badge-danger  { background: var(--danger-bg);  color: var(--danger-text); }
.ent-badge-info    { background: var(--info-bg);    color: var(--info-text); }
.ent-badge-neutral { background: var(--surface-container-high); color: var(--text-muted); }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   BUTTONS
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.ent-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-main); font-size: 13px; font-weight: 700;
  padding: 9px 18px; border-radius: var(--radius-md);
  border: none; cursor: pointer; transition: var(--transition-fast);
  white-space: nowrap; text-decoration: none;
  line-height: 1;
}
.ent-btn-primary {
  background: var(--brand-500); color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}
.ent-btn-primary:hover {
  background: var(--brand-600);
  box-shadow: 0 4px 14px rgba(37,99,235,0.4);
  transform: translateY(-1px);
}
.ent-btn-outline {
  background: transparent; color: var(--text-secondary);
  border: 1.5px solid var(--surface-border);
}
.ent-btn-outline:hover { border-color: var(--brand-500); color: var(--brand-500); background: var(--brand-50); }
.ent-btn-danger { background: #fef2f2; color: #dc2626; border: 1.5px solid #fecaca; }
.ent-btn-danger:hover { background: #dc2626; color: #fff; }
.ent-btn-sm { font-size: 11.5px; padding: 6px 12px; }
.ent-btn-lg { font-size: 15px; padding: 12px 24px; border-radius: var(--radius-lg); }
.ent-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   AVATAR
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.ent-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #fff; flex-shrink: 0;
  overflow: hidden;
}
.ent-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Avatar color palette by index */
.ent-avatar-0  { background: linear-gradient(135deg,#2563eb,#1d4ed8); }
.ent-avatar-1  { background: linear-gradient(135deg,#059669,#047857); }
.ent-avatar-2  { background: linear-gradient(135deg,#d97706,#b45309); }
.ent-avatar-3  { background: linear-gradient(135deg,#7c3aed,#6d28d9); }
.ent-avatar-4  { background: linear-gradient(135deg,#db2777,#be185d); }
.ent-avatar-5  { background: linear-gradient(135deg,#0891b2,#0e7490); }
.ent-avatar-6  { background: linear-gradient(135deg,#16a34a,#15803d); }
.ent-avatar-7  { background: linear-gradient(135deg,#9333ea,#7e22ce); }
.ent-avatar-8  { background: linear-gradient(135deg,#e11d48,#be123c); }
.ent-avatar-9  { background: linear-gradient(135deg,#0284c7,#0369a1); }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   MODALS
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.ent-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: modal-bg-in 0.2s ease;
}
@keyframes modal-bg-in { from { opacity: 0; } to { opacity: 1; } }
.ent-modal {
  background: var(--surface-card); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%; max-width: 540px;
  animation: modal-in 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.ent-modal-header {
  padding: 22px 24px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.ent-modal-title { font-size: 17px; font-weight: 800; color: var(--text-primary); }
.ent-modal-body  { padding: 20px 24px; }
.ent-modal-footer {
  padding: 0 24px 22px;
  display: flex; justify-content: flex-end; gap: 10px;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   TOAST NOTIFICATIONS
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
#ent-toast-container {
  position: fixed; top: 20px; right: 20px;
  z-index: 9999; display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.ent-toast {
  min-width: 300px; max-width: 400px;
  background: var(--surface-container-high, #fff); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--surface-border);
  border-left: 4px solid #2563eb;
  padding: 14px 16px;
  display: flex; align-items: flex-start; gap: 12px;
  pointer-events: all;
  animation: toast-in 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(100px); }
  to   { opacity: 1; transform: translateX(0); }
}
.ent-toast.hiding { animation: toast-out 0.3s ease forwards; }
@keyframes toast-out {
  to { opacity: 0; transform: translateX(100px); max-height: 0; padding: 0; margin: 0; }
}
.ent-toast.success { border-left-color: #059669; }
.ent-toast.warning { border-left-color: #d97706; }
.ent-toast.error   { border-left-color: #dc2626; }
.ent-toast-icon { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.ent-toast-msg  { font-size: 13px; font-weight: 600; color: var(--text-primary); flex: 1; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   GLOBAL SPOTLIGHT SEARCH
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
#ent-spotlight-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.55);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 100px;
  animation: modal-bg-in 0.15s ease;
}
#ent-spotlight {
  width: 100%; max-width: 580px; margin: 0 20px;
  background: var(--surface-card); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: modal-in 0.2s cubic-bezier(0.34,1.56,0.64,1);
}
#ent-spotlight-input-wrap {
  display: flex; align-items: center; gap: 12px; padding: 16px 18px;
  border-bottom: 1px solid var(--surface-border);
}
#ent-spotlight-input {
  flex: 1; border: none; outline: none; font-size: 16px; font-weight: 500;
  color: var(--text-primary); background: transparent; font-family: var(--font-main);
}
#ent-spotlight-input::placeholder { color: var(--text-muted); }
.ent-spotlight-results { max-height: 360px; overflow-y: auto; }
.ent-spotlight-group { padding: 8px 0; }
.ent-spotlight-group-label {
  padding: 4px 16px 6px;
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-muted);
}
.ent-spotlight-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 16px;
  cursor: pointer; transition: var(--transition-fast);
  text-decoration: none; color: var(--text-primary);
}
.ent-spotlight-item:hover, .ent-spotlight-item.selected {
  background: var(--brand-50);
}
.ent-spotlight-item-icon {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: var(--surface-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.ent-spotlight-item-name { font-size: 13.5px; font-weight: 600; }
.ent-spotlight-item-sub  { font-size: 11px; color: var(--text-muted); }
.ent-spotlight-empty {
  padding: 40px 20px; text-align: center;
  color: var(--text-muted); font-size: 13px;
}
#ent-spotlight-footer {
  padding: 10px 18px;
  border-top: 1px solid var(--surface-border);
  display: flex; gap: 16px;
  font-size: 11px; color: var(--text-muted);
}
.ent-kbd {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 700;
  background: #f1f5f9; border: 1px solid #e2e8f0;
  padding: 2px 6px; border-radius: 4px; color: var(--text-secondary);
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   PAGE ANIMATIONS
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ent-fade-in      { animation: fade-in-up 0.4s ease forwards; opacity: 0; }
.ent-fade-in-d1   { animation-delay: 60ms; }
.ent-fade-in-d2   { animation-delay: 120ms; }
.ent-fade-in-d3   { animation-delay: 180ms; }
.ent-fade-in-d4   { animation-delay: 240ms; }
.ent-fade-in-d5   { animation-delay: 300ms; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   FORM ELEMENTS
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.ent-label {
  display: block; font-size: 11.5px; font-weight: 700;
  color: var(--text-secondary); text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: 6px;
}
.ent-input {
  width: 100%; height: 40px;
  background: var(--surface-bg); border: 1.5px solid var(--surface-border);
  border-radius: var(--radius-md); padding: 0 12px;
  font-size: 13.5px; color: var(--text-primary);
  font-family: var(--font-main); transition: var(--transition-fast);
  outline: none;
}
.ent-input:focus {
  border-color: var(--brand-500); background: var(--surface-card);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}
.ent-select {
  appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 34px;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   UTILITIES & SAAS RESPONSIVE POLISH
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.ent-divider { height: 1px; background: var(--surface-border); }
.ent-page-bg { background: var(--surface-bg); min-height: 100vh; }

/* Mobile Touch Optimization & Responsive Tables */
@media (max-width: 768px) {
  button, .ent-btn, input, select, .sidebar-link {
    min-height: 42px;
    touch-action: manipulation;
  }
  .table-responsive-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .saas-card-mobile {
    padding: 16px !important;
    border-radius: 12px !important;
  }
}

/* Glassmorphism SaaS Card Effects */
.saas-glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

/* Sidebar Toggle Button CSS */
.ent-sidebar {
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.ent-sidebar-toggle {
  width: 32px; height: 32px; border-radius: 8px; border: none;
  background: transparent; color: var(--text-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: var(--transition-fast); flex-shrink: 0; margin-left: auto;
}
.ent-sidebar-toggle:hover {
  background: var(--sidebar-hover); color: #fff;
}
.ent-sidebar-toggle .material-symbols-outlined {
  font-size: 20px; transition: transform 0.3s ease;
}
.ent-sidebar.collapsed .ent-sidebar-toggle {
  position: absolute;
  right: -16px;
  top: 20px;
  background: var(--primary-secondary); /* Give it a background so it's visible */
  border: 1px solid var(--sidebar-border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  background-color: var(--surface-bg);
  z-index: 100;
}
.ent-sidebar.collapsed .ent-sidebar-toggle:hover {
  background-color: var(--sidebar-hover);
}
.ent-sidebar.collapsed .ent-sidebar-toggle .material-symbols-outlined {
  transform: rotate(180deg);
}

/* Ensure logo area can position absolute child */
.ent-sidebar-logo {
  position: relative;
}

/* Fix user section spacing in collapsed mode */
.ent-sidebar.collapsed .ent-sidebar-user {
  justify-content: center;
}
.ent-sidebar.collapsed .ent-sidebar-logout {
  display: none;
}

/* ── Light Mode Override (Safe Toggle) ── */
:root[data-theme="light"] {
  --bg-dark:                #f1f5f9;
  --surface-container:      #ffffff;
  --surface-container-high: #f8fafc;
  --surface-container-low:  #ffffff;
  
  --primary-accent:         #4f46e5;
  --primary-container:      #e0e7ff;
  --secondary-container:    #dbeafe;
  --tertiary-accent:        #0284c7;

  /* Sidebar */
  --sidebar-bg:      #ffffff;
  --sidebar-border:  #e2e8f0;
  --sidebar-text:    #475569;
  --sidebar-hover:   #f1f5f9;
  --sidebar-active:  #eff6ff;
  --sidebar-section: #94a3b8;

  /* Surface */
  --surface-bg:      #f8fafc;
  --surface-card:    #ffffff;
  --surface-border:  #e2e8f0;

  /* Text */
  --text-primary:    #0f172a;
  --text-secondary:  #475569;
  --text-muted:      #64748b;
  --text-inverted:   #ffffff;
}

/* ── Dark Mode Explicit (when JS sets data-theme="dark") ── */
:root[data-theme="dark"] {
  --bg-dark:                #0f131c;
  --surface-container:      #1c1f29;
  --surface-container-high: #262a34;
  --surface-container-low:  #181b25;

  --primary-accent:         #c0c1ff;
  --primary-container:      #8083ff;
  --secondary-container:    #0053db;
  --tertiary-accent:        #7bd0ff;
  --error-accent:           #ffb4ab;

  /* Sidebar */
  --sidebar-bg:      #0f131c;
  --sidebar-border:  rgba(255,255,255,0.08);
  --sidebar-text:    #c7c4d7;
  --sidebar-hover:   rgba(255,255,255,0.05);
  --sidebar-active:  rgba(0,83,219,0.25);
  --sidebar-section: rgba(255,255,255,0.35);

  /* Surface */
  --surface-bg:    #0f131c;
  --surface-card:  #1c1f29;
  --surface-border:rgba(255,255,255,0.08);

  /* Text */
  --text-primary:   #dfe2ef;
  --text-secondary: #c7c4d7;
  --text-muted:     #908fa0;
}

/* Universal Dark Mode Form Element Guard */
select option { background: var(--surface-card) !important; color: var(--text-primary) !important; }
.theme-card { background: var(--surface-card, #1c1f29); border-color: var(--surface-border, rgba(255,255,255,0.08)); }
.theme-border { border-color: var(--surface-border, rgba(255,255,255,0.08)) !important; }


/* ==========================================================================
   ULTRA-PREMIUM ENTERPRISE MODAL & FORM DESIGN SYSTEM (v2.0)
   ========================================================================== */

/* Universal Modal Backdrop */
.ent-modal-backdrop,
.fixed.inset-0[x-show] {
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}

/* Universal Modal Card Container */
.ent-modal-card {
  background: var(--surface-card, #1c1f29) !important;
  border: 1px solid var(--surface-border, rgba(255, 255, 255, 0.12)) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
  border-radius: 20px !important;
  color: var(--text-primary, #dfe2ef) !important;
}

/* Universal Form Labels */
label,
.ent-label {
  color: var(--text-secondary, #c7c4d7) !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  margin-bottom: 5px !important;
}

/* Universal Inputs, Selects & Textareas */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="tel"],
input[type="search"],
select,
textarea,
.ent-input {
  background: var(--surface-container-high, #262a34) !important;
  color: var(--text-primary, #dfe2ef) !important;
  border: 1.5px solid var(--surface-border, rgba(255, 255, 255, 0.12)) !important;
  border-radius: 10px !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  transition: all 0.15s ease-in-out !important;
}

[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="number"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="password"],
[data-theme="light"] input[type="date"],
[data-theme="light"] input[type="tel"],
[data-theme="light"] input[type="search"],
[data-theme="light"] select,
[data-theme="light"] textarea,
[data-theme="light"] .ent-input {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1.5px solid #cbd5e1 !important;
}

input:focus,
select:focus,
textarea:focus,
.ent-input:focus {
  outline: none !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted, #908fa0) !important;
  opacity: 0.8 !important;
}

/* Universal Financial Status Badges */
.badge-paid, .badge-active, .badge-success {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  padding: 4px 10px !important;
  border-radius: 9999px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
}
.badge-paid::before, .badge-active::before, .badge-success::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

.badge-due, .badge-expired, .badge-danger, .badge-unpaid {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  padding: 4px 10px !important;
  border-radius: 9999px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
}
.badge-due::before, .badge-expired::before, .badge-danger::before, .badge-unpaid::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
}

.badge-partial, .badge-pending, .badge-warning {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  padding: 4px 10px !important;
  border-radius: 9999px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
}
.badge-partial::before, .badge-pending::before, .badge-warning::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
}

.badge-info, .badge-processing {
  background: rgba(59, 130, 246, 0.15) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(59, 130, 246, 0.3) !important;
  padding: 4px 10px !important;
  border-radius: 9999px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
}
.badge-info::before, .badge-processing::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
}

/* Table Header & Hover Enhancement */
th {
  color: var(--text-muted, #908fa0) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
}
thead tr {
  background: var(--surface-container-high, #262a34) !important;
}
[data-theme="light"] thead tr {
  background: #f1f5f9 !important;
}
tbody tr:hover {
  background: rgba(59, 130, 246, 0.05) !important;
}

/* High Contrast Overrides for dark mode */
[data-theme="dark"] .text-gray-800,
[data-theme="dark"] .text-gray-900,
[data-theme="dark"] .text-slate-800,
[data-theme="dark"] .text-slate-900,
[data-theme="dark"] .text-black {
  color: var(--text-primary, #dfe2ef) !important;
}

[data-theme="dark"] .text-gray-700,
[data-theme="dark"] .text-slate-700,
[data-theme="dark"] .text-gray-600 {
  color: var(--text-secondary, #c7c4d7) !important;
}

[data-theme="dark"] .text-gray-500,
[data-theme="dark"] .text-slate-500,
[data-theme="dark"] .text-gray-400 {
  color: var(--text-muted, #908fa0) !important;
}

/* High Contrast Overrides for light mode */
[data-theme="light"] .text-gray-800,
[data-theme="light"] .text-gray-900,
[data-theme="light"] .text-slate-800,
[data-theme="light"] .text-slate-900 {
  color: #0f172a !important;
}

[data-theme="light"] .text-gray-700,
[data-theme="light"] .text-slate-700 {
  color: #334155 !important;
}


/* Light Mode Dashboard & Topbar Enhancements */
[data-theme="light"] .ent-topbar {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
}
[data-theme="light"] .ent-topbar-title {
  color: #0f172a !important;
}
[data-theme="light"] .ent-topbar-subtitle {
  color: #64748b !important;
}
[data-theme="light"] .ent-search {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}
[data-theme="light"] .ent-search input {
  color: #0f172a !important;
}
[data-theme="light"] .ent-search-kbd {
  background: #e2e8f0 !important;
  color: #64748b !important;
}

[data-theme="light"] .tenant-banner {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important;
}
[data-theme="light"] .tenant-banner::before {
  background: radial-gradient(circle, rgba(59,130,246,0.08) 0%, transparent 70%) !important;
}
[data-theme="light"] .tb-name {
  color: #0f172a !important;
}
[data-theme="light"] .tb-sub {
  color: #64748b !important;
}
[data-theme="light"] .tb-select {
  background: #f8fafc !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #0f172a !important;
}
[data-theme="light"] .tb-select option {
  background: #ffffff !important;
  color: #0f172a !important;
}

[data-theme="light"] .kpi-link-card,
[data-theme="light"] .analytics-card,
[data-theme="light"] .launchpad-section,
[data-theme="light"] .welcome-banner,
[data-theme="light"] .sec-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04) !important;
}

[data-theme="light"] .kpi-value,
[data-theme="light"] .ac-title,
[data-theme="light"] .lp-name,
[data-theme="light"] .lp-title,
[data-theme="light"] .wb-title,
[data-theme="light"] .wb-stat-val {
  color: #0f172a !important;
}

[data-theme="light"] .kpi-label,
[data-theme="light"] .kpi-sub,
[data-theme="light"] .lp-desc,
[data-theme="light"] .wb-sub,
[data-theme="light"] .wb-stat-label {
  color: #64748b !important;
}

[data-theme="light"] .lp-card {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}
[data-theme="light"] .lp-card:hover {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
}

/* Light mode KPI Badges */
[data-theme="light"] .kc-blue .kpi-badge { background: rgba(59,130,246,0.15) !important; color: #1d4ed8 !important; font-weight: 800 !important; }
[data-theme="light"] .kc-indigo .kpi-badge { background: rgba(99,102,241,0.15) !important; color: #4338ca !important; font-weight: 800 !important; }
[data-theme="light"] .kc-emerald .kpi-badge { background: rgba(16,185,129,0.15) !important; color: #047857 !important; font-weight: 800 !important; }
[data-theme="light"] .kc-rose .kpi-badge { background: rgba(244,63,94,0.15) !important; color: #be123c !important; font-weight: 800 !important; }
[data-theme="light"] .kc-amber .kpi-badge { background: rgba(245,158,11,0.15) !important; color: #b45309 !important; font-weight: 800 !important; }
[data-theme="light"] .kc-purple .kpi-badge { background: rgba(168,85,247,0.15) !important; color: #7e22ce !important; font-weight: 800 !important; }
[data-theme="light"] .kc-cyan .kpi-badge { background: rgba(6,182,212,0.15) !important; color: #0e7490 !important; font-weight: 800 !important; }
[data-theme="light"] .kc-teal .kpi-badge { background: rgba(13,148,136,0.15) !important; color: #0f766e !important; font-weight: 800 !important; }

/* Theme Utilities */
.theme-bg { background: var(--bg-dark); }
.theme-surface { background: var(--surface-container-high); }
.theme-text-primary { color: var(--text-primary) !important; }
.theme-text-secondary { color: var(--text-secondary) !important; }
.theme-text-muted { color: var(--text-muted) !important; }


[data-theme="light"] .theme-surface { background: #f8fafc !important; border-color: #e2e8f0 !important; }
[data-theme="light"] .theme-text-primary { color: #0f172a !important; }
[data-theme="light"] .theme-text-secondary { color: #334155 !important; }
[data-theme="light"] .theme-text-muted { color: #64748b !important; }


/* ── Sidebar Toggle Premium Styling ── */
.ent-sidebar-toggle {
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.ent-sidebar-toggle:hover {
    background: var(--primary-color, #3b82f6);
    color: #ffffff;
    border-color: var(--primary-color, #3b82f6);
    transform: scale(1.05);
}
.ent-sidebar-toggle .material-symbols-outlined {
    font-size: 18px !important;
}

/* ── Premium Tenant Banner ── */
.tenant-banner {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.5) 0%, rgba(15, 23, 42, 0.8) 100%) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 24px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
    padding: 24px 32px !important;
}
[data-theme="light"] .tenant-banner {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.8) 100%) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04) !important;
}
.tb-logo {
    box-shadow: 0 8px 24px rgba(59,130,246,0.35) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
}

/* ── Premium KPI Grid Cards ── */
.kpi-link-card {
    border-radius: 24px !important;
    padding: 24px !important;
    background: var(--surface-card) !important;
    border: 1px solid var(--surface-border) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.kpi-link-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 16px 40px rgba(0,0,0,0.15) !important;
}
[data-theme="light"] .kpi-link-card:hover {
    box-shadow: 0 16px 40px rgba(0,0,0,0.08) !important;
}

/* Subtle inner glows for KPI cards based on their accent */
.kc-blue { position: relative; overflow: hidden; }
.kc-blue::after { content: ''; position: absolute; top: -50px; right: -50px; width: 100px; height: 100px; background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, transparent 70%); border-radius: 50%; pointer-events: none; }
.kc-indigo { position: relative; overflow: hidden; }
.kc-indigo::after { content: ''; position: absolute; top: -50px; right: -50px; width: 100px; height: 100px; background: radial-gradient(circle, rgba(99,102,241,0.1) 0%, transparent 70%); border-radius: 50%; pointer-events: none; }
.kc-emerald { position: relative; overflow: hidden; }
.kc-emerald::after { content: ''; position: absolute; top: -50px; right: -50px; width: 100px; height: 100px; background: radial-gradient(circle, rgba(16,185,129,0.1) 0%, transparent 70%); border-radius: 50%; pointer-events: none; }
.kc-rose { position: relative; overflow: hidden; }
.kc-rose::after { content: ''; position: absolute; top: -50px; right: -50px; width: 100px; height: 100px; background: radial-gradient(circle, rgba(244,63,94,0.1) 0%, transparent 70%); border-radius: 50%; pointer-events: none; }
.kc-amber { position: relative; overflow: hidden; }
.kc-amber::after { content: ''; position: absolute; top: -50px; right: -50px; width: 100px; height: 100px; background: radial-gradient(circle, rgba(245,158,11,0.1) 0%, transparent 70%); border-radius: 50%; pointer-events: none; }
.kc-purple { position: relative; overflow: hidden; }
.kc-purple::after { content: ''; position: absolute; top: -50px; right: -50px; width: 100px; height: 100px; background: radial-gradient(circle, rgba(168,85,247,0.1) 0%, transparent 70%); border-radius: 50%; pointer-events: none; }
.kc-cyan { position: relative; overflow: hidden; }
.kc-cyan::after { content: ''; position: absolute; top: -50px; right: -50px; width: 100px; height: 100px; background: radial-gradient(circle, rgba(6,182,212,0.1) 0%, transparent 70%); border-radius: 50%; pointer-events: none; }
.kc-teal { position: relative; overflow: hidden; }
.kc-teal::after { content: ''; position: absolute; top: -50px; right: -50px; width: 100px; height: 100px; background: radial-gradient(circle, rgba(13,148,136,0.1) 0%, transparent 70%); border-radius: 50%; pointer-events: none; }

/* ── Launchpad Section Refinement ── */
.launchpad-section {
    border-radius: 24px !important;
}
.lp-card {
    border-radius: 18px !important;
    background: var(--surface-container-high) !important;
}
[data-theme="light"] .lp-card {
    background: #ffffff !important;
}
.lp-card:hover {
    transform: translateY(-3px) !important;
}
.lp-icon {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
[data-theme="light"] .lp-icon {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* ── Analytics Card Refinement ── */
.analytics-card {
    border-radius: 24px !important;
}

/* Override any bad toggle positioning */
.ent-sidebar-logo {
    justify-content: space-between !important;
}
.ent-sidebar-toggle {
    margin-left: 0 !important;
    position: static !important;
    flex-shrink: 0 !important;
}
.ent-sidebar.collapsed .ent-sidebar-toggle {
    position: absolute !important;
    right: -14px !important;
    top: 20px !important;
}

/* Global Layout Shell */
.app-shell { display: flex; flex: 1; height: 100%; width: 100%; overflow: hidden; }
.main-wrap { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.page-content { flex: 1; overflow-y: auto; padding: 24px 28px; }


/* Premium Gradient Button */
.btn-primary-gradient { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 10px; background: linear-gradient(135deg, #4f46e5, #6366f1); color: #fff !important; border: none; font-size: 13px; font-weight: 700; font-family: var(--font-main); cursor: pointer; box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3); transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); text-decoration: none; white-space: nowrap; }
.btn-primary-gradient:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(79, 70, 229, 0.45); background: linear-gradient(135deg, #6366f1, #818cf8); }
.btn-primary-gradient:active { transform: translateY(0); }
.btn-primary-gradient:disabled, .btn-primary-gradient[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }


/* Premium Data Grid Row */
.rider-row { transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); border: 1px solid transparent; border-radius: 12px; margin-bottom: 2px; }
.rider-row:hover { background: var(--surface-card); border-color: var(--surface-border); box-shadow: 0 8px 24px rgba(0,0,0,0.12); transform: translateY(-1px); z-index: 10; position: relative; }


/* Premium Form Inputs */
.ent-input { width: 100%; background: var(--surface-bg); border: 1.5px solid transparent; color: var(--text-primary); border-radius: 8px; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); font-weight: 600; }
.ent-input:focus { outline: none; background: var(--surface-card); border-color: #6366f1; box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15); }
.ent-input:disabled { opacity: 0.6; cursor: not-allowed; background: var(--surface-border) !important; color: var(--text-muted); }



/* =====================================================
   SKELETON LOADING SYSTEM  Extended (2026 Premium)
   ===================================================== */

/* Dark-mode aware skeleton base */
.skeleton {
  background: linear-gradient(90deg, var(--surface-container, #1e2433) 25%, rgba(255,255,255,0.06) 50%, var(--surface-container, #1e2433) 75%);
  background-size: 600px 100%;
  animation: skeleton-shimmer 1.6s infinite linear;
  border-radius: 8px;
  display: block;
  pointer-events: none;
  user-select: none;
}
[data-theme="light"] .skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f8fafc 50%, #e2e8f0 75%);
  background-size: 600px 100%;
  animation: skeleton-shimmer 1.6s infinite linear;
}

.skeleton-text    { height: 14px; border-radius: 6px; }
.skeleton-text-sm { height: 11px; border-radius: 4px; width: 60%; }
.skeleton-text-lg { height: 28px; border-radius: 8px; }
.skeleton-title   { height: 22px; border-radius: 7px; width: 55%; }
.skeleton-circle  { border-radius: 50% !important; }
.skeleton-badge   { height: 20px; width: 60px; border-radius: 20px; display: inline-block; }
.skeleton-btn     { height: 38px; width: 130px; border-radius: 10px; }
.skeleton-avatar  { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.skeleton-icon    { width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0; }

/* KPI card skeleton  matches dashboard kpi-link-card */
.skeleton-kpi-card {
  background: var(--surface-card, #1c1f29);
  border: 1px solid var(--surface-border, rgba(255,255,255,0.08));
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 130px;
  animation: skeleton-pulse 2s ease-in-out infinite;
}
.skeleton-kpi-card .sk-top   { display: flex; align-items: center; justify-content: space-between; }
.skeleton-kpi-card .sk-label { height: 11px; border-radius: 4px; width: 55%; }
.skeleton-kpi-card .sk-value { height: 30px; border-radius: 8px; width: 40%; }
.skeleton-kpi-card .sk-sub   { height: 10px; border-radius: 4px; width: 75%; }

/* Table row skeleton */
.skeleton-table-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--surface-border, rgba(255,255,255,0.05));
}
.skeleton-table-row .sk-col-xs { height: 13px; border-radius: 5px; flex: 0 0 40px; }
.skeleton-table-row .sk-col-sm { height: 13px; border-radius: 5px; flex: 0 0 80px; }
.skeleton-table-row .sk-col-md { height: 13px; border-radius: 5px; flex: 0 0 140px; }
.skeleton-table-row .sk-col-lg { height: 13px; border-radius: 5px; flex: 1; }

/* Stat summary card skeleton */
.skeleton-stat-card {
  background: var(--surface-card, #1c1f29);
  border: 1px solid var(--surface-border, rgba(255,255,255,0.08));
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  animation: skeleton-pulse 2s ease-in-out infinite;
}

/* Visibility helpers */
.is-skeleton-loading .hide-while-loading { display: none !important; }
.is-skeleton-loading .show-while-loading { display: flex !important; }
.is-skeleton-ready   .show-while-loading { display: none !important; }

/* KPI grid skeleton container */
.skeleton-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 1200px) { .skeleton-kpi-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 768px)  { .skeleton-kpi-grid { grid-template-columns: 1fr; } }

/* fadeInUp animation for skeleton?real transition */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
