/* WMS Professional Theme - GKS Projects & Events */
/* Color Palette derived from GKS Logo */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* GKS Brand Colors */
  --gks-primary: #1E3A8A;      /* Deep blue from hexagon */
  --gks-secondary: #3B82F6;    /* Medium blue */
  --gks-accent: #93C5FD;       /* Light blue highlights */
  --gks-light: #DBEAFE;        /* Very light blue */
  
  /* Professional Grays */
  --text-dark: #374151;        /* Primary text */
  --text-medium: #6B7280;      /* Secondary text */
  --text-light: #9CA3AF;       /* Muted text */
  
  /* Backgrounds */
  --bg-primary: #F8FAFC;       /* Main background */
  --bg-secondary: #F1F5F9;     /* Secondary background */
  --bg-white: #FFFFFF;         /* Card backgrounds */
  
  /* Borders & Dividers */
  --border-light: #E5E7EB;     /* Light borders */
  --border-medium: #D1D5DB;    /* Medium borders */
  
  /* Status Colors */
  --success: #10B981;          /* Green */
  --warning: #F59E0B;          /* Amber */
  --danger: #EF4444;           /* Red */
  --info: #3B82F6;             /* Blue */
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 250ms ease-in-out;
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
}

/* Base Typography */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-dark);
  line-height: 1.6;
}

/* Header & Navigation Enhancements */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  color: var(--text-dark) !important;
}

.navbar-brand .logo-img {
  height: 32px;
  width: auto;
}

.navbar {
  background-color: var(--bg-white) !important;
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

/* Enhanced Top Bar */
.top-navbar {
  background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-secondary) 100%) !important;
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.navbar-text {
  font-weight: 500;
  color: var(--text-dark);
}

/* Fix Profile-Notification Alignment */
.navbar-nav .nav-item {
  display: flex;
  align-items: center;
}

.navbar-nav .dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  border: none;
  background: transparent;
}

.navbar-nav .dropdown-toggle:hover {
  background-color: var(--bg-secondary);
}

.notification-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  color: var(--text-medium);
}

.notification-badge:hover {
  background-color: var(--bg-secondary);
  color: var(--gks-primary);
}

.notification-badge .badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: var(--danger);
  color: white;
  font-size: 0.75rem;
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== MODERN SIDEBAR SYSTEM ===== */

/* Sidebar Container */
.modern-sidebar-container {
  background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
  width: 280px;
  min-height: 100vh;
  box-shadow: var(--shadow-lg);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

/* Desktop Fixed Sidebar Layout */
@media (min-width: 992px) {
  .modern-sidebar-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 1000 !important;
    width: 280px !important;
    height: 100vh !important;
    transition: transform var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
    transform: none !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  /* Body layout adjustments - Only when authenticated */
  body.authenticated {
    padding-left: 280px !important;
    transition: padding-left var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  /* Main content adjustments */
  .main-content {
    margin-left: 0;
    width: 100%;
  }
  
  /* Top navbar adjustments */
  .top-navbar {
    margin-left: -280px;
    padding-left: 280px;
    transition: all var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  /* Disable Bootstrap offcanvas on desktop */
  .offcanvas-lg.offcanvas-start {
    transform: none !important;
    visibility: visible !important;
  }
  
  /* Remove offcanvas backdrops on desktop */
  .offcanvas-backdrop {
    display: none !important;
  }
  
  /* Collapsed sidebar state */
  body.authenticated.sidebar-collapsed {
    padding-left: 0 !important;
  }
  
  body.authenticated.sidebar-collapsed .modern-sidebar-container {
    transform: translateX(-280px) !important;
  }
  
  body.authenticated.sidebar-collapsed .top-navbar {
    margin-left: 0;
    padding-left: 0;
  }
  
  /* Center main content when sidebar is collapsed */
  body.authenticated.sidebar-collapsed .main-content {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
  }
}

/* Sidebar Content Layout */
.modern-sidebar-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100vh;
}

/* Mobile Header */
.modern-sidebar-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.1);
}

.modern-sidebar-header .offcanvas-title {
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Minimized Brand Section - Optimized for Space */
.modern-sidebar-brand {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  color: white !important;
  text-decoration: none !important;
  display: flex;
  transition: all var(--transition-fast);
  border-radius: var(--radius-md);
  padding: 0.375rem;
  margin: -0.375rem;
  flex: 1;
}

.brand-link:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--gks-accent) !important;
}

.brand-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-logo {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.0625rem;
  min-width: 0;
  flex: 1;
}

.brand-name {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.1;
}

.brand-subtitle {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.7rem;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Scrollable Navigation Area - Enhanced */
.modern-sidebar-nav {
  flex: 1;
  overflow: hidden;
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.nav-scroll-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.75rem 0 1.5rem 0;
  
  /* Enhanced scrolling */
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  
  
  /* Scroll fade effects */
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 8px,
    black calc(100% - 8px),
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 8px,
    black calc(100% - 8px),
    transparent 100%
  );
}

/* Slick narrow scrollbar */
.nav-scroll-container {
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent; /* Firefox */
}

.nav-scroll-container::-webkit-scrollbar {
  width: 4px; /* Narrow scrollbar */
}

.nav-scroll-container::-webkit-scrollbar-track {
  background: transparent;
}

.nav-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  transition: background var(--transition-fast);
}

.nav-scroll-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* Navigation List - Optimized */
.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.nav-item {
  margin: 0 0.75rem;
  flex-shrink: 0;
}

.nav-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 1rem 1.5rem;
}

/* Navigation Links */
.nav-link {
  display: flex;
  align-items: center;
  padding: 0.875rem 1rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  font-weight: 400;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  text-decoration: none;
  transform: translateX(2px);
}

.nav-link.active {
  background: linear-gradient(135deg, var(--gks-primary), var(--gks-secondary));
  color: white;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gks-accent);
}

.nav-link.disabled {
  color: rgba(255, 255, 255, 0.4);
  cursor: not-allowed;
  position: relative;
}

.nav-link.disabled:hover {
  background-color: transparent;
  transform: none;
}

/* Navigation Icons */
.nav-icon {
  width: 20px;
  height: 20px;
  margin-right: 0.75rem;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.9;
}

.nav-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Navigation Badges */
.nav-badge {
  background: var(--gks-accent);
  color: var(--gks-primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 50px;
  margin-left: 0.5rem;
  min-width: 1.5rem;
  text-align: center;
  line-height: 1;
}

.nav-status-indicator {
  width: 8px;
  height: 8px;
  background: var(--warning);
  border-radius: 50%;
  margin-left: 0.5rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Sidebar Footer - Optimized */
.modern-sidebar-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
  margin-top: auto;
}

.user-info-compact {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
}

.user-info-compact .bi {
  font-size: 1.25rem;
  opacity: 0.7;
}

.user-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.user-name {
  font-weight: 500;
  color: white;
}

.user-role {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
}

/* Integrated Sidebar Toggle - Seamless Design */
.sidebar-integrated-toggle {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.sidebar-integrated-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transform: scale(1.05);
}

.sidebar-integrated-toggle:active {
  transform: scale(0.95);
  background: rgba(255, 255, 255, 0.15);
}

.sidebar-integrated-toggle:focus-visible {
  outline: 2px solid var(--gks-accent);
  outline-offset: 2px;
}

/* Chevron Toggle Animation */
.sidebar-integrated-toggle i {
  transition: transform var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 18px;
}

/* Collapsed state - rotate chevron to point right */
body.authenticated.sidebar-collapsed .sidebar-integrated-toggle i {
  transform: rotate(180deg);
}

/* Collapsed Sidebar Toggle Button - Appears when sidebar is hidden */
.collapsed-sidebar-toggle {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1002;
  background: linear-gradient(135deg, var(--gks-primary) 0%, var(--gks-secondary) 100%);
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25), 0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-100px);
}

.collapsed-sidebar-toggle:hover {
  background: linear-gradient(135deg, var(--gks-secondary) 0%, #60A5FA 100%);
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 6px 16px rgba(30, 58, 138, 0.35), 0 4px 8px rgba(0, 0, 0, 0.15);
}

.collapsed-sidebar-toggle:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.3), 0 1px 2px rgba(0, 0, 0, 0.1);
}

.collapsed-sidebar-toggle i {
  font-size: 18px;
  transition: transform var(--transition-fast);
}

/* Show collapsed toggle when sidebar is collapsed */
body.authenticated.sidebar-collapsed .collapsed-sidebar-toggle {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Hide toggle buttons on mobile */
@media (max-width: 991px) {
  .sidebar-integrated-toggle,
  .collapsed-sidebar-toggle {
    display: none;
  }
}

/* Mobile optimizations */
@media (max-width: 991px) {
  .modern-sidebar-container {
    width: 280px;
  }
  
  .nav-scroll-container {
    padding: 0.5rem 0;
  }
  
  .nav-item {
    margin: 0.0625rem 0.5rem;
  }
  
  .nav-link {
    padding: 0.75rem 1rem;
  }
}

/* Legacy nav-icon class for backward compatibility */
.nav-link .nav-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

/* Card Components */
.card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  background-color: var(--bg-white);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.card-header {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
  padding: 1rem 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
}

.card-body {
  padding: 1.5rem;
}

/* Button Enhancements */
.btn {
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all var(--transition-fast);
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--gks-primary);
  color: white;
}

.btn-primary:hover {
  background-color: #1E40AF;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--text-medium);
  color: white;
}

.btn-secondary:hover {
  background-color: var(--text-dark);
}

.btn-outline-primary {
  border: 1px solid var(--gks-primary);
  color: var(--gks-primary);
  background: transparent;
}

.btn-outline-primary:hover {
  background-color: var(--gks-primary);
  color: white;
}

/* Form Enhancements */
.form-control {
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  transition: all var(--transition-fast);
  background-color: var(--bg-white);
}

.form-control:focus {
  border-color: var(--gks-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

.form-label {
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

/* Table Enhancements */
.table {
  background-color: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table thead th {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
  font-weight: 600;
  color: var(--text-dark);
  padding: 1rem;
}

.table tbody td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.table tbody tr:hover {
  background-color: var(--bg-secondary);
}

/* Badge/Status Enhancements */
.badge {
  border-radius: var(--radius-md);
  font-weight: 500;
  padding: 0.375rem 0.75rem;
}

.badge-success {
  background-color: var(--success);
  color: white;
}

.badge-warning {
  background-color: var(--warning);
  color: white;
}

.badge-danger {
  background-color: var(--danger);
  color: white;
}

.badge-info {
  background-color: var(--info);
  color: white;
}

/* Loading States */
.loading-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--border-light);
  border-top: 2px solid var(--gks-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    height: 100vh;
    z-index: 1000;
    transition: left var(--transition-normal);
  }
  
  .sidebar.open {
    left: 0;
  }
  
  .main-content {
    margin-left: 0;
  }
}

/* Login Page Specific - Ensure proper centering */
body:not(.authenticated) {
  padding-left: 0 !important;
  margin-left: 0 !important;
}

body:not(.authenticated) .main-content {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

/* ===== ACTIVITY LOG COLOR CODING ===== */
/* Activity-type-based color scheme for semantic categorization */

/* Activity Item Base Styles */
.activity-item {
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.activity-item:hover {
  background-color: #f8f9fa;
}

/* Activity Type-Based Background and Border Colors */

/* Goods Operations (Receive, Send, Request) - Green */
.activity-item.activity-goods {
  background-color: #d1e7dd; /* Success subtle */
  border-left-color: #198754; /* Success */
}

/* Transit & Challan Operations - Blue/Cyan */
.activity-item.activity-transit {
  background-color: #cff4fc; /* Info subtle */
  border-left-color: #0dcaf0; /* Info */
}

/* Site & Project Operations - Purple/Primary */
.activity-item.activity-site {
  background-color: #cfe2ff; /* Primary subtle */
  border-left-color: #0d6efd; /* Primary */
}

/* Inventory Management (Items, Categories, Templates) - Teal */
.activity-item.activity-inventory {
  background-color: #d1ecf1; /* Cyan subtle - custom */
  border-left-color: #20c997; /* Teal */
}

/* Warehouse Operations - Indigo */
.activity-item.activity-warehouse {
  background-color: #e0cffc; /* Indigo subtle - custom */
  border-left-color: #6610f2; /* Indigo */
}

/* Authentication (Login, Logout) - Gray */
.activity-item.activity-auth {
  background-color: #e2e3e5; /* Secondary subtle */
  border-left-color: #6c757d; /* Secondary */
}

/* Security Events & Failures - Red */
.activity-item.activity-security {
  background-color: #f8d7da; /* Danger subtle */
  border-left-color: #dc3545; /* Danger */
}

/* Admin & System Operations - Amber/Warning */
.activity-item.activity-admin {
  background-color: #fff3cd; /* Warning subtle */
  border-left-color: #ffc107; /* Warning */
}

/* Default/Fallback - Light Gray */
.activity-item.activity-default {
  background-color: #f8f9fa;
  border-left-color: #adb5bd;
}

/* Activity Type Indicator Dots */
.activity-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.activity-status-dot.dot-goods {
  background-color: #198754; /* Success - Green */
}

.activity-status-dot.dot-transit {
  background-color: #0dcaf0; /* Info - Cyan */
}

.activity-status-dot.dot-site {
  background-color: #0d6efd; /* Primary - Blue */
}

.activity-status-dot.dot-inventory {
  background-color: #20c997; /* Teal */
}

.activity-status-dot.dot-warehouse {
  background-color: #6610f2; /* Indigo */
}

.activity-status-dot.dot-auth {
  background-color: #6c757d; /* Secondary - Gray */
}

.activity-status-dot.dot-security {
  background-color: #dc3545; /* Danger - Red */
}

.activity-status-dot.dot-admin {
  background-color: #ffc107; /* Warning - Amber */
}

.activity-status-dot.dot-neutral {
  background-color: #adb5bd; /* Gray-500 */
}

/* Activity Type Badges */
.activity-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  font-weight: 500;
}

.badge-goods {
  background-color: #198754;
  color: white;
}

.badge-transit {
  background-color: #0dcaf0;
  color: #000;
}

.badge-site {
  background-color: #0d6efd;
  color: white;
}

.badge-inventory {
  background-color: #20c997;
  color: white;
}

.badge-warehouse {
  background-color: #6610f2;
  color: white;
}

.badge-auth {
  background-color: #6c757d;
  color: white;
}

.badge-security {
  background-color: #dc3545;
  color: white;
}

.badge-admin {
  background-color: #ffc107;
  color: #000;
}

/* ========================================
   NOTIFICATION COLOR CODING
   ======================================== */

/* Notification Color-Based Background and Border Colors */

/* Success/Confirmation Notifications (GREEN) - Goods Delivered, Approvals, Login Success */
.notification-item.notification-success,
.notification-item-dropdown.notification-success,
.recent-notification.notification-success {
  background-color: #d1e7dd; /* Success subtle */
  border-left-color: #198754 !important; /* Success */
}

/* Warning/Pending Notifications (YELLOW) - Approvals Needed, Delays, Pending Actions */
.notification-item.notification-warning,
.notification-item-dropdown.notification-warning,
.recent-notification.notification-warning {
  background-color: #fff3cd; /* Warning subtle */
  border-left-color: #ffc107 !important; /* Warning */
}

/* Urgent/Error Notifications (RED) - Failed Operations, Security Alerts, Critical Issues */
.notification-item.notification-danger,
.notification-item-dropdown.notification-danger,
.recent-notification.notification-danger {
  background-color: #f8d7da; /* Danger subtle */
  border-left-color: #dc3545 !important; /* Danger */
}

/* Informational Notifications (BLUE) - System Updates, General Info */
.notification-item.notification-info,
.notification-item-dropdown.notification-info,
.recent-notification.notification-info {
  background-color: #cff4fc; /* Info subtle */
  border-left-color: #0dcaf0 !important; /* Info */
}

/* Default/Fallback - Neutral Gray */
.notification-item.notification-default,
.notification-item-dropdown.notification-default,
.recent-notification.notification-default {
  background-color: #f8f9fa;
  border-left-color: #adb5bd !important;
}

/* Notification Badge Colors (already in use, ensure consistency) */
.notification-badge-success {
  background-color: #198754;
  color: white;
}

.notification-badge-warning {
  background-color: #ffc107;
  color: #000;
}

.notification-badge-danger {
  background-color: #dc3545;
  color: white;
}

.notification-badge-info {
  background-color: #0dcaf0;
  color: #000;
}

/* Outline Badge Styles for Better Contrast on Colored Backgrounds */
.badge-outline-success {
  background-color: #ffffff;
  color: #198754;
  border: 1.5px solid #198754;
  font-weight: 600;
}

.badge-outline-warning {
  background-color: #ffffff;
  color: #856404; /* Darker yellow-brown for better contrast */
  border: 1.5px solid #ffc107;
  font-weight: 600;
}

.badge-outline-danger {
  background-color: #ffffff;
  color: #dc3545;
  border: 1.5px solid #dc3545;
  font-weight: 600;
}

.badge-outline-info {
  background-color: #ffffff;
  color: #087990; /* Darker cyan for better contrast */
  border: 1.5px solid #0dcaf0;
  font-weight: 600;
}

/* Hover States for Colored Notifications */
.notification-item.notification-success:hover {
  background-color: #c3e6cb; /* Slightly darker green on hover */
}

.notification-item.notification-warning:hover {
  background-color: #ffeaa7; /* Slightly darker yellow on hover */
}

.notification-item.notification-danger:hover {
  background-color: #f1b0b7; /* Slightly darker red on hover */
}

.notification-item.notification-info:hover {
  background-color: #b6effb; /* Slightly darker blue on hover */
}

/* Maintain unread highlight alongside color coding */
.notification-item.unread,
.notification-item-dropdown.unread,
.recent-notification.unread {
  font-weight: 500;
  border-left-width: 4px !important;
}

/* Activity Metadata Styling */
.activity-meta {
  font-size: 0.875rem;
  color: #6c757d;
}

/* Hover States for Activity Icons */
.activity-item .text-success,
.activity-item .text-info,
.activity-item .text-warning,
.activity-item .text-danger {
  transition: opacity 0.2s ease;
}

.activity-item:hover .text-success,
.activity-item:hover .text-info,
.activity-item:hover .text-warning,
.activity-item:hover .text-danger {
  opacity: 0.8;
}

/* Legacy Support - Keep old class names for backward compatibility */
.success-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.5rem;
}

.success-indicator.success {
  background-color: #198754; /* Bootstrap success */
}

.success-indicator.failed {
  background-color: #dc3545; /* Bootstrap danger */
}

.activity-item.critical {
  border-left-color: #dc3545;
  background-color: #f8d7da;
}

.activity-item.failed {
  border-left-color: #dc3545;
  background-color: #f8d7da;
}

/* ===== END ACTIVITY LOG COLOR CODING ===== */

/* Utility Classes */
.text-primary { color: var(--gks-primary) !important; }
.text-secondary { color: var(--gks-secondary) !important; }
.text-muted { color: var(--text-light) !important; }
.bg-primary { background-color: var(--gks-primary) !important; }
.bg-secondary { background-color: var(--bg-secondary) !important; }

/* Dashboard Specific */
.stats-card {
  background: linear-gradient(135deg, var(--gks-primary), var(--gks-secondary));
  color: white;
  border: none;
}

.stats-card .card-body {
  padding: 2rem;
}

.stats-number {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

.stats-label {
  opacity: 0.9;
  font-weight: 500;
}

/* --- NEW_DASHBOARD compact layout helpers --- */
.kpi-strip {
  gap: 8px;
}

.kpi-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
}

.kpi-user-chip {
  border: 1px solid var(--border-light);
  border-radius: 999px;
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
}

.dashboard-sticky-right {
  position: sticky;
  top: 72px; /* navbar (56) + content padding */
  align-self: flex-start;
}