/* Main site styles for Smart Business System */

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow:
    0 0 0 0.1rem white,
    0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

.footer {
  position: relative;
  width: 100%;
  white-space: nowrap;
  line-height: 18px;
  margin-top: auto;
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
  flex-shrink: 0;
}

/* Custom styles for Smart Business System */
.main-content {
  padding: 20px;
}

.sidebar {
  min-height: 100vh;
  background-color: #f8f9fa;
}

.navbar-brand {
  font-weight: bold;
}

.card {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.table th {
  background-color: #003366;
  color: white;
  border-color: #003366;
}

.btn-primary {
  background-color: #003366;
  border-color: #003366;
}

.btn-primary:hover {
  background-color: #0059ee;
  border-color: #0059ee;
}

.alert {
  border-radius: 0.375rem;
}

/* Loading spinner */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive utilities */
@media (max-width: 768px) {
  .sidebar {
    height: auto;
    min-height: auto;
  }

  .main-content {
    padding: 10px;
  }
}

/* Global DataTable Scrollbar Styling */
.dataTables_wrapper ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.dataTables_wrapper ::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.dataTables_wrapper ::-webkit-scrollbar-thumb {
  background: #003366;
  border-radius: 4px;
}

.dataTables_wrapper ::-webkit-scrollbar-thumb:hover {
  background: #0059ee;
}

.dataTables_wrapper {
  scrollbar-width: thin;
  scrollbar-color: #003366 #f1f1f1;
}

/* Table container scrollbars */
.table-responsive::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: #003366;
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: #0059ee;
}

.table-responsive {
  scrollbar-width: thin;
  scrollbar-color: #003366 #f1f1f1;
}

/* Stats styling */
.avatar-initial {
  padding: 4px;
  color: white;
}

/* User Avatar Initials - Base Styles */
.user-avatar-initial {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  animation: avatarPulse 3s ease-in-out infinite;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 32px;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  animation: avatarPulse 3s ease-in-out infinite;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Avatar Color Palette (Light Theme - Vibrant Colors) ── */
.avatar-color-0 {
  background: #6366f1;
} /* Indigo */
.avatar-color-1 {
  background: #8b5cf6;
} /* Violet */
.avatar-color-2 {
  background: #ec4899;
} /* Pink */
.avatar-color-3 {
  background: #f59e0b;
} /* Amber */
.avatar-color-4 {
  background: #10b981;
} /* Emerald */
.avatar-color-5 {
  background: #06b6d4;
} /* Cyan */
.avatar-color-6 {
  background: #3b82f6;
} /* Blue */
.avatar-color-7 {
  background: #f97316;
} /* Orange */
.avatar-color-8 {
  background: #14b8a6;
} /* Teal */
.avatar-color-9 {
  background: #a855f7;
} /* Purple */

/* Subtle breathing animation */
@keyframes avatarPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

/* Hover effect for top nav avatar */
.topnav-link:hover .user-avatar-initial {
  transform: scale(1.1) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
  animation: none; /* Stop breathing when hovering */
}

/* Hover effect for large dropdown avatar */
.user-avatar-large:hover {
  transform: scale(1.05) rotate(3deg) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25) !important;
  animation: none;
}

/* Subtle gradient overlay for depth */
.user-avatar-initial::before,
.user-avatar-large::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 50%,
    rgba(0, 0, 0, 0.1) 100%
  );
  border-radius: 50%;
  pointer-events: none;
}

/* Active state ring effect */
.topnav-unified-item.show .user-avatar-initial {
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.3),
    0 4px 16px rgba(0, 0, 0, 0.25) !important;
}

/* Smooth transitions */
.user-avatar-initial,
.user-avatar-large {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Stats and Action Buttons Section */
.stats-section {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
}

.stats-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.stats-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.stats-item .fw-bold {
  color: #495057;
}

.action-buttons-section .btn-group .btn {
  border-radius: 6px;
  font-weight: 500;
  padding: 8px 16px;
}

.action-buttons-section .btn-group .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

/* Compact Filters */
.compact-filters .form-label {
  font-size: 0.875rem;
  color: #6c757d;
}

.compact-filters .form-select-sm,
.compact-filters .form-control-sm {
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
}

/* Table Container Styling for Centralized Table Headers */
.table-container {
  margin-bottom: 1rem;
}

.table-container .card {
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* Fix DataTable header width alignment issues */
.dataTables_wrapper .dataTables_scrollHead {
  overflow: hidden !important;
}

.dataTables_wrapper .dataTables_scrollHead table {
  width: 100% !important;
}

.dataTables_wrapper .dataTables_scrollBody {
  overflow-x: auto;
}

/* Ensure table headers take full width */
.dataTables_wrapper table {
  width: 100% !important;
  table-layout: auto;
}

.dataTables_wrapper thead th {
  white-space: nowrap;
  min-width: auto;
}

/* Business System specific styles */
.business-link {
  color: #000;
  text-decoration: none;
  transition: color 0.2s ease;
}

.business-link:hover {
  color: #003366;
  text-decoration: underline;
}

.table thead th {
  color: white;
}

.link-title {
  margin-left: 10px !important;
}

/* Fix: Sidebar items should not shift/dance on hover */
/* NobleUI compiled selector: .sidebar .sidebar-body .nav .nav-item:hover .nav-link .link-title { margin-left: 31px } */
/* We match that specificity and keep margin at 10px (same as non-hover) */
.sidebar .sidebar-body .nav .nav-item .nav-link .link-title {
  transition: none !important;
  -webkit-transition: none !important;
}
.sidebar .sidebar-body .nav .nav-item:hover .nav-link .link-title {
  margin-left: 10px !important;
}
.sidebar .sidebar-body .nav .nav-item:hover .nav-link {
  transform: none !important;
}
/* Sub-menu: NobleUI adds margin-left: 3px on hover */
.sidebar .sidebar-body .nav.sub-menu .nav-item:hover .nav-link {
  margin-left: 0 !important;
  transform: none !important;
}

.page-header {
  margin-bottom: 0px !important;
  border-bottom: none !important;
}

.page-description {
  max-width: fit-content !important;
}

.card {
  border-color: white;
}

/* Custom Logo Styling */
.sidebar .sidebar-header .sidebar-brand {
  font-size: 22px !important;
  font-weight: 700 !important;
  color: #000865 !important;
}

.sidebar .sidebar-header .sidebar-brand span {
  margin-left: 5px;
}

/* Sidebar Menu Items Styling */
/* Parent menu items with dropdowns - Show arrow icon on the right */
.sidebar .nav-link[href^="#"] {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar .nav-link .link-title {
  flex: 1;
  margin-right: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar .nav-link .fa-chevron-down,
.sidebar .nav-link .fa-chevron-up {
  margin-left: auto;
  transition: transform 0.3s ease;
  font-size: 12px;
  flex-shrink: 0;
  min-width: 12px;
  display: inline-block;
}

/* Rotate arrow when dropdown is expanded */
.sidebar .nav-link[aria-expanded="true"] .fa-chevron-down {
  transform: rotate(180deg);
}

/* Hide chevron icons when sidebar is folded */
body.sidebar-folded:not(.open-sidebar-folded)
  .sidebar
  .nav-link
  .fa-chevron-down,
body.sidebar-folded:not(.open-sidebar-folded)
  .sidebar
  .nav-link
  .fa-chevron-up {
  display: none !important;
}

/* Hide premium-ui CSS-drawn ::after chevron when sidebar is folded (toggles otherwise remain visible) */
body.sidebar-folded:not(.open-sidebar-folded).premium-ui
  .sidebar
  .nav-link[href^="#"]::after {
  display: none !important;
}

/* External Dropdown Panel Styling */
.sidebar-dropdown-parent {
  position: relative;
}

.sidebar-dropdown-panel {
  position: fixed;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  max-width: 250px;
  max-height: calc(100vh - 20px);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px);
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease;
  padding: 0;
  margin: 0;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-dropdown-panel.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Force-hide fixed dropdown panels on mobile when sidebar is closed (they stay in viewport otherwise) */
@media (max-width: 991px) {
  body:not(.sidebar-open) .sidebar-dropdown-panel {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: none !important;
  }
}

.sidebar-dropdown-header {
  padding: 6px 10px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 13px;
  font-weight: 700;
  color: #000;
  background: #ffffff;
  border-radius: 4px 4px 0 0;
  line-height: 1.4;
  flex-shrink: 0;
}

.sidebar-dropdown-header strong {
  font-weight: 700;
  color: #000;
}

.sidebar-dropdown-menu {
  list-style: none;
  padding: 2px 0 !important;
  margin: 0;
  display: flex !important;
  flex-direction: column !important;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
  max-height: none;
}

/* Custom scrollbar styling for dropdown menus */
.sidebar-dropdown-menu::-webkit-scrollbar {
  width: 6px;
}

.sidebar-dropdown-menu::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.sidebar-dropdown-menu::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.sidebar-dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.sidebar-dropdown-menu .nav-item {
  margin: 0;
}

.sidebar-dropdown-menu .nav-link {
  display: flex;
  align-items: center;
  padding: 6px 10px !important;
  color: #000;
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.sidebar-dropdown-menu .nav-link:hover {
  background-color: #f3f4f6;
  color: #000;
}

.sidebar-dropdown-menu .nav-link:active {
  background-color: #e5e7eb;
}

.sidebar-dropdown-menu .nav-link.active {
  background-color: #f3f4f6;
  color: #000;
  font-weight: 500;
}

.sidebar-dropdown-menu .nav-link i {
  margin-right: 10px;
  width: 16px;
  text-align: center;
  font-size: 13px;
  color: #000;
  flex-shrink: 0;
}

/* Submenu headers in dropdown panels */
.sidebar-dropdown-panel .submenu-header {
  padding: 6px 10px 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
  border-top: 1px solid #e5e7eb;
}

.sidebar-dropdown-panel .submenu-header:first-child {
  border-top: none;
  margin-top: 0;
}

/* Scrollable dropdown content area */
.sidebar-dropdown-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
}

.sidebar-dropdown-scroll::-webkit-scrollbar {
  width: 5px;
}

.sidebar-dropdown-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-dropdown-scroll::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.sidebar-dropdown-scroll::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Lightweight section labels – smaller than submenu-header, no box */
.sidebar-dropdown-panel .submenu-section-label {
  padding: 4px 10px 2px 10px;
  font-size: 10px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 2px;
  border-top: 1px solid #f3f4f6;
  line-height: 1.3;
}

.sidebar-dropdown-panel .submenu-section-label:first-child {
  border-top: none;
  margin-top: 0;
}

/* Override NobleUI sidebar nav padding for dropdown panel */
.sidebar-dropdown-panel .nav,
.sidebar-dropdown-panel .sidebar-dropdown-menu {
  padding: 2px 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Override NobleUI active styles for dropdown menu items - prevent inheritance */
.sidebar-dropdown-panel .nav-item .nav-link {
  color: #000 !important;
  padding: 6px 10px !important;
}

.sidebar-dropdown-panel .nav-item.active .nav-link {
  color: #000 !important;
}

.sidebar-dropdown-panel .nav-item .nav-link:hover {
  color: #000 !important;
  background-color: #f3f4f6;
}

.sidebar-dropdown-panel .nav-item.active .nav-link:hover {
  color: #000 !important;
  background-color: #f3f4f6;
}

.sidebar-dropdown-panel .nav-item.active .nav-link::before {
  display: none !important;
}

.sidebar-dropdown-panel .nav-item .nav-link .link-icon {
  fill: inherit !important;
  color: #000 !important;
}

.sidebar-dropdown-panel .nav-item.active .nav-link .link-icon {
  fill: inherit !important;
  color: #000 !important;
}

/* Only apply active styling to the parent trigger link, not dropdown items */
.sidebar-dropdown-parent.active > .sidebar-dropdown-trigger {
  background-color: rgba(101, 113, 255, 0.1);
  color: #6571ff;
}

/* Submenu items - Add proper spacing between icon and text */
.sidebar .nav .sub-menu .nav-link {
  padding-left: 3.5rem;
}

.sidebar .nav .sub-menu .nav-link i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

/* Dashboard Cards Styling */
.dashboard-card {
  border-radius: 15px;
  border: none;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.dashboard-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.dashboard-card .card-body {
  padding: 1.5rem;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 140px;
}

.dashboard-card .card-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dashboard-card .card-icon {
  width: 50px;
  height: 50px;
  min-width: 50px;
  min-height: 50px;
  max-width: 50px;
  max-height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
}

.dashboard-card .card-icon::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 50%;
  opacity: 0.3;
  aspect-ratio: 1 / 1;
}

.dashboard-card .card-info {
  flex: 1;
}

.dashboard-card .card-number {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.2rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard-card .card-text {
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.9;
  margin: 0;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-text-muted {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* AI Dashboard specific - allow text wrapping but maintain height */
.dashboard-card.ai-card .card-text {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  line-height: 1.2;
  max-height: 2.4em; /* Allow 2 lines max */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.dashboard-card .progress {
  height: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.dashboard-card .progress-bar {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  transition: width 1s ease-in-out;
}

/* Blue Card - Total Customers */
.dashboard-card.blue-card {
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
  color: white;
}

.dashboard-card.blue-card .card-icon {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.dashboard-card.blue-card .card-icon::before {
  background: #4a90e2;
}

/* Green Card - Total Employees */
.dashboard-card.green-card {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
  color: white;
}

.dashboard-card.green-card .card-icon {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.dashboard-card.green-card .card-icon::before {
  background: #2ecc71;
}

/* Yellow Card - Active Projects */
.dashboard-card.yellow-card {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
  color: white;
}

.dashboard-card.yellow-card .card-icon {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.dashboard-card.yellow-card .card-icon::before {
  background: #f39c12;
}

/* Purple Card - Monthly Revenue */
.dashboard-card.purple-card {
  background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
  color: white;
}

.dashboard-card.purple-card .card-icon {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.dashboard-card.purple-card .card-icon::before {
  background: #9b59b6;
}

/* Red Card - For risk/danger items only */
.dashboard-card.red-card {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
}

.dashboard-card.red-card .card-icon {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.dashboard-card.red-card .card-icon::before {
  background: #e74c3c;
}

/* Teal Card - For quarterly/intermediate metrics */
.dashboard-card.teal-card {
  background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
  color: white;
}

.dashboard-card.teal-card .card-icon {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.dashboard-card.teal-card .card-icon::before {
  background: #1abc9c;
}

/* Orange Card - For yearly/major metrics */
.dashboard-card.orange-card {
  background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
  color: white;
}

.dashboard-card.orange-card .card-icon {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.dashboard-card.orange-card .card-icon::before {
  background: #e67e22;
}

/* Indigo Card - For performance/rate metrics */
.dashboard-card.indigo-card {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
}

.dashboard-card.indigo-card .card-icon {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.dashboard-card.indigo-card .card-icon::before {
  background: #6366f1;
}

/* Card animations */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.dashboard-card:nth-child(1) {
  animation: slideInLeft 0.6s ease-out;
}
.dashboard-card:nth-child(2) {
  animation: slideInLeft 0.7s ease-out;
}
.dashboard-card:nth-child(3) {
  animation: slideInRight 0.8s ease-out;
}
.dashboard-card:nth-child(4) {
  animation: slideInRight 0.9s ease-out;
}

/* Navbar Settings Dropdown Styling */
.navbar .dropdown-menu {
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
  border-radius: 0.375rem;
}

.navbar .dropdown-item {
  transition: all 0.2s ease;
  cursor: pointer;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
  background-color: #f8f9fa;
  color: #495057;
}

/* Ensure all links in navbar dropdowns have consistent hover behavior */
.navbar .dropdown-menu a.dropdown-item-link {
  transition: all 0.2s ease;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
  display: inline-block;
}

.navbar .dropdown-menu a.dropdown-item-link:hover,
.navbar .dropdown-menu a.dropdown-item-link:focus {
  background-color: #f8f9fa;
  color: #495057;
}

.navbar .dropdown-divider {
  margin: 0.5rem 0;
  border-color: #e9ecef;
}

/* Role-specific badges */
.admin-badge {
  background: linear-gradient(45deg, #dc3545, #c82333);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.manager-badge {
  background: linear-gradient(45deg, #007bff, #0056b3);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.employee-badge {
  background: linear-gradient(45deg, #28a745, #1e7e34);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Customer Details - Customer Info tab */
.customer-info-tab-content .info-section {
  background: #f8f9fa;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
}

.customer-info-tab-content .info-section-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.customer-info-tab-content .table td {
  padding: 0.35rem 0;
  vertical-align: top;
}

.customer-info-tab-content .table td:first-child {
  color: #6c757d;
  font-size: 0.875rem;
}

/* Professional Avatar with Name Styling */
.table-avatar-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  background: linear-gradient(
    135deg,
    var(--bs-primary, #405189) 0%,
    #5a6acf 100%
  );
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.table-avatar-container:hover .table-avatar {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
  border-color: rgba(64, 81, 137, 0.3);
}

.table-avatar-info {
  flex: 1;
  min-width: 0;
}

.table-avatar-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #212529;
  margin: 0 0 2px 0;
  line-height: 1.3;
  transition: color 0.2s ease;
  display: block;
  text-decoration: none;
}

.table-avatar-container:hover .table-avatar-name {
  color: var(--bs-primary, #405189);
}

.table-avatar-subtitle {
  font-size: 0.8125rem;
  color: #6c757d;
  margin: 0;
  line-height: 1.3;
  display: block;
}

.table-avatar-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.table-avatar-link:hover {
  text-decoration: none;
  color: inherit;
}

.table-avatar-link:hover .table-avatar-name {
  color: var(--bs-primary, #405189);
}

/* Avatar color variations */
.table-avatar-primary {
  background: linear-gradient(135deg, #405189 0%, #5a6acf 100%);
}

.table-avatar-success {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.table-avatar-info-color {
  background: linear-gradient(135deg, #06b6d4 0%, #22d3ee 100%);
}

.table-avatar-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
}

.table-avatar-danger {
  background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
}

.table-avatar-purple {
  background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .table-avatar {
    width: 36px;
    height: 36px;
    font-size: 0.8125rem;
  }

  .table-avatar-name {
    font-size: 0.875rem;
  }

  .table-avatar-subtitle {
    font-size: 0.75rem;
  }
}

/* ─────────────────────────────────────────────────────────────
   Auto-Apply Filters - Loading state
   ───────────────────────────────────────────────────────────── */
.filter-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.filter-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #e9ecef;
  border-top-color: #0d6efd;
  border-radius: 50%;
  animation: filter-spin 0.6s linear infinite;
}

@keyframes filter-spin {
  to {
    transform: rotate(360deg);
  }
}
