.border-left-primary { border-left: 4px solid #4e73df; }

.border-left-success { border-left: 4px solid #1cc88a; }

.border-left-info { border-left: 4px solid #36b9cc; }

.border-left-warning { border-left: 4px solid #f6c23e; }

.border-left-danger { border-left: 4px solid #e74a3b; }

.btn [data-feather] {
    vertical-align: text-bottom;
    width: 1em;
    height: 1em;
}

.bg-opacity-10 {
    background-color: rgba(var(--bs-bg-rgb), 0.1) !important;
}

.metrics-card {
    transition: transform 0.2s ease-in-out;
}

.metrics-card:hover {
    transform: translateY(-2px);
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-sm {
    width: 32px;
    height: 32px;
}

.avatar-lg {
    width: 48px;
    height: 48px;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
}

.action-buttons .btn {
    margin-right: 0.25rem;
}

.action-buttons .btn:last-child {
    margin-right: 0;
}

.loading-spinner {
    width: 1rem;
    height: 1rem;
    border-width: 0.125rem;
}

body.dark-mode .border-left-primary { border-left-color: #4dabf7; }

body.dark-mode .border-left-success { border-left-color: #28a745; }

body.dark-mode .border-left-info { border-left-color: #17a2b8; }

body.dark-mode .border-left-warning { border-left-color: #ffc107; }

body.dark-mode .border-left-danger { border-left-color: #dc3545; }

body.dark-mode .text-primary { color: #4dabf7 !important; }

body.dark-mode .text-success { color: #28a745 !important; }

body.dark-mode .text-info { color: #17a2b8 !important; }

body.dark-mode .text-warning { color: #ffc107 !important; }

body.dark-mode .text-danger { color: #dc3545 !important; }

body.dark-mode .text-secondary { color: #6c757d !important; }

body.dark-mode .bg-primary { background-color: #4dabf7 !important; }

body.dark-mode .bg-success { background-color: #28a745 !important; }

body.dark-mode .bg-info { background-color: #17a2b8 !important; }

body.dark-mode .bg-warning { background-color: #ffc107 !important; color: #000 !important; }

body.dark-mode .bg-danger { background-color: #dc3545 !important; }

body.dark-mode .bg-secondary { background-color: #6c757d !important; }

body.dark-mode .badge.bg-primary { background-color: #4dabf7 !important; }

body.dark-mode .badge.bg-success { background-color: #28a745 !important; }

body.dark-mode .badge.bg-info { background-color: #17a2b8 !important; }

body.dark-mode .badge.bg-warning { background-color: #ffc107 !important; color: #000 !important; }

body.dark-mode .badge.bg-danger { background-color: #dc3545 !important; }

body.dark-mode .badge.bg-secondary { background-color: #6c757d !important; }

body.dark-mode .btn-outline-primary {
    color: #4dabf7;
    border-color: #4dabf7;
}

body.dark-mode .btn-outline-primary:hover {
    background-color: #4dabf7;
    border-color: #4dabf7;
    color: #fff;
}

body.dark-mode .btn-outline-success {
    color: #28a745;
    border-color: #28a745;
}

body.dark-mode .btn-outline-success:hover {
    background-color: #28a745;
    border-color: #28a745;
    color: #fff;
}

body.dark-mode .btn-outline-info {
    color: #17a2b8;
    border-color: #17a2b8;
}

body.dark-mode .btn-outline-info:hover {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: #fff;
}

body.dark-mode .btn-outline-warning {
    color: #ffc107;
    border-color: #ffc107;
}

body.dark-mode .btn-outline-warning:hover {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
}

body.dark-mode .btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
}

body.dark-mode .btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

body.dark-mode .btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
}

body.dark-mode .btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

body.dark-mode .bg-primary.bg-opacity-10 {
    background-color: rgba(77, 171, 247, 0.1) !important;
}

body.dark-mode .bg-success.bg-opacity-10 {
    background-color: rgba(40, 167, 69, 0.1) !important;
}

body.dark-mode .bg-info.bg-opacity-10 {
    background-color: rgba(23, 162, 184, 0.1) !important;
}

body.dark-mode .bg-warning.bg-opacity-10 {
    background-color: rgba(255, 193, 7, 0.1) !important;
}

body.dark-mode .bg-danger.bg-opacity-10 {
    background-color: rgba(220, 53, 69, 0.1) !important;
}

body.dark-mode .bg-secondary.bg-opacity-10 {
    background-color: rgba(108, 117, 125, 0.1) !important;
}

body.dark-mode .badge.bg-primary-subtle,
[data-bs-theme="dark"] .badge.bg-primary-subtle {
    background-color: rgba(77, 171, 247, 0.15) !important;
    color: #a5d8ff !important;
}

body.dark-mode .badge.bg-success-subtle,
[data-bs-theme="dark"] .badge.bg-success-subtle {
    background-color: rgba(40, 167, 69, 0.15) !important;
    color: #8ce99a !important;
}

body.dark-mode .badge.bg-info-subtle,
[data-bs-theme="dark"] .badge.bg-info-subtle {
    background-color: rgba(23, 162, 184, 0.15) !important;
    color: #99e9f2 !important;
}

body.dark-mode .badge.bg-warning-subtle,
[data-bs-theme="dark"] .badge.bg-warning-subtle {
    background-color: rgba(255, 193, 7, 0.15) !important;
    color: #ffe066 !important;
}

body.dark-mode .badge.bg-danger-subtle,
[data-bs-theme="dark"] .badge.bg-danger-subtle {
    background-color: rgba(220, 53, 69, 0.15) !important;
    color: #ff8787 !important;
}

body.dark-mode .badge.bg-secondary-subtle,
[data-bs-theme="dark"] .badge.bg-secondary-subtle {
    background-color: rgba(108, 117, 125, 0.2) !important;
    color: #ced4da !important;
}

body.dark-mode .progress {
    background-color: #2a2a2a;
}

body.dark-mode .progress-bar {
    background-color: #4dabf7;
}

body.dark-mode .tooltip-inner {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

body.dark-mode .tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: #2a2a2a;
}

body.dark-mode .tooltip.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: #2a2a2a;
}

body.dark-mode .popover {
    background-color: #2a2a2a;
    border-color: #444;
}

body.dark-mode .popover-header {
    background-color: #3a3a3a;
    border-color: #444;
}

body.dark-mode .popover-body {
    color: #e0e0e0;
}

body.dark-mode .nav-tabs {
    border-color: #444;
}

body.dark-mode .nav-tabs .nav-link {
    color: #a0a0a0;
    border-color: transparent;
}

body.dark-mode .nav-tabs .nav-link:hover {
    color: #fff;
    border-color: #444 #444 transparent;
}

body.dark-mode .nav-tabs .nav-link.active {
    color: #fff;
    background-color: #1e1e1e;
    border-color: #444 #444 #1e1e1e;
}

body.dark-mode .accordion-item {
    background-color: #1e1e1e;
    border-color: #444;
}

body.dark-mode .accordion-button {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

body.dark-mode .accordion-button:not(.collapsed) {
    background-color: #3a3a3a;
    color: #fff;
}

body.dark-mode .accordion-button::after {
    filter: invert(1);
}

body.dark-mode .offcanvas {
    background-color: #1e1e1e;
}

body.dark-mode .offcanvas-header {
    border-color: #444;
}

body.dark-mode .toast {
    background-color: #2a2a2a;
    border-color: #444;
}

body.dark-mode .toast-header {
    background-color: #3a3a3a;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode .toast-body {
    color: #e0e0e0;
}

.navbar {
  height: 60px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05) !important;
  z-index: 1000 !important;
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  transition: transform 0.3s ease-in-out;
}

body {
  box-sizing: border-box;
  min-height: calc(100dvh - var(--app-header-height, 60px));
  padding-top: var(--app-header-height, 60px);
}

body.auth-layout {
  min-height: 100dvh !important;
  padding-top: 0 !important;
}

.navbar .btn {
  transition: all 0.3s ease;
}

.navbar .btn:hover {
  transform: scale(1.05);
  animation: buttonPulse 0.6s ease-in-out;
}

.navbar .app-header-search-clear:hover,
.navbar .app-header-search-submit:hover {
  transform: translateY(-50%) !important;
  animation: none !important;
}

@keyframes buttonPulse {
  0%, 100% { transform: scale(1.05); }
  50% { transform: scale(1.1); }
}

.navbar .badge {
  animation: badgeBounce 2s ease-in-out infinite;
  animation-delay: 2s;
}

@keyframes badgeBounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) scale(1);
  }
  40% {
    transform: translateY(-3px) scale(1.1);
  }
  60% {
    transform: translateY(-1px) scale(1.05);
  }
}

.notifications-container {
  max-height: 360px;
  overflow-y: auto;
}

.dropdown-item:hover {
  background-color: rgba(0,0,0,0.05);
}

.dropdown-item .dropdown-fa-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  vertical-align: middle;
  flex: 0 0 24px;
}

.dropdown-menu {
  animation: fadeInDown 0.2s ease-out;
  z-index: 9999 !important;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.badge {
  transition: all 0.2s ease;
}

.btn-link:hover {
  background-color: rgba(0,0,0,0.05);
  border-radius: 50%;
}

.dropdown-menu-notification {
  border: none;
  background-color: transparent !important;
  box-shadow: none !important;
  z-index: 1060 !important;
  padding: 0 !important;
  min-width: 0 !important;
  width: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.notification-overlay,
.notification-overlay-mobile {
  z-index: 1060 !important;
}

#notifications-container {
  min-width: 0 !important;
  overflow: visible !important;
}

.notification-load-more {
  background-color: rgba(0, 0, 0, 0.02);
}

.notification-load-more .btn {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.notification-overlay {
  pointer-events: auto;
}

.notification-item, .notification-load-more {
  pointer-events: auto;
}

.notification-load-more button {
  pointer-events: auto;
}

.notification-toast {
  position: absolute;
  top: 46px;
  right: -4px;
  width: 320px;
  max-width: calc(100vw - 24px);
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #dde5ef;
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.16);
  padding: 12px;
  z-index: 10001;
  transform: translateY(-6px);
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  min-width: 260px;
  white-space: normal;
  pointer-events: none;
  line-height: 1.4;
}

.notification-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.notification-toast::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 22px;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-left: 1px solid #dde5ef;
  border-top: 1px solid #dde5ef;
  transform: rotate(45deg);
}

.notification-toast__content {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.notification-toast__icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
}

.notification-toast__icon [data-feather] {
  width: 16px;
  height: 16px;
}

.notification-toast__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.notification-toast__title {
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
}

.notification-toast__message {
  display: -webkit-box;
  overflow: hidden;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
  text-overflow: ellipsis;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.notification-pulse {
  animation: notificationPulse 2s ease-in-out;
}

@keyframes notificationPulse {
  0%, 100% { transform: scale(1); }
  10%, 30%, 50%, 70%, 90% { transform: scale(1.1); }
  20%, 40%, 60%, 80% { transform: scale(1.05); }
}

.notification-loading-icon {
  background-color: white;
  border-radius: 50%;
  padding: 1px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  animation: notificationLoadingPulse 1.5s ease-in-out infinite;
}

@keyframes notificationLoadingPulse {
  0%, 100% { 
    opacity: 1;
    transform: scale(1);
  }
  50% { 
    opacity: 0.7;
    transform: scale(1.1);
  }
}

.notification-auto-refresh-icon {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  padding: 2px 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.auto-refresh-dots {
  display: flex;
  gap: 2px;
  align-items: center;
}

.auto-refresh-dots .dot {
  width: 3px;
  height: 3px;
  background-color: #6c757d;
  border-radius: 50%;
  animation: autoRefreshDots 1.4s ease-in-out infinite both;
}

.auto-refresh-dots .dot:nth-child(1) {
  animation-delay: -0.32s;
}

.auto-refresh-dots .dot:nth-child(2) {
  animation-delay: -0.16s;
}

.auto-refresh-dots .dot:nth-child(3) {
  animation-delay: 0s;
}

@keyframes autoRefreshDots {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

.modal-content {
  background-color: rgba(255, 255, 255, 0.95);
}

.account-switcher-item {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.account-switcher-item:hover {
  border-color: #007bff;
  background-color: #f8f9fa;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.account-switcher-item.current-account {
  border-color: #28a745;
  background-color: #f8fff8;
}

.account-switcher-item.current-account .badge {
  background-color: #28a745 !important;
}

.account-item {
  border-radius: 8px;
  transition: all 0.2s ease;
}

.account-item:hover:not(.current-account) {
  background-color: #f8f9fa;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.account-item.current-account {
  background-color: #f8fff8;
  border-left: 4px solid #28a745;
}

.account-item.current-account .badge {
  background-color: #28a745 !important;
}

@media (max-width: 767.98px) {
  .navbar {
    height: 54px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  .navbar .btn:hover {
    transform: none;
    animation: none;
  }
  .navbar .badge {
    animation: badgeBounceMobile 3s ease-in-out infinite;
    animation-delay: 2s;
  }
  
  @keyframes badgeBounceMobile {
    0%, 20%, 50%, 80%, 100% {
      transform: translateY(0) scale(1);
    }
    40% {
      transform: translateY(-2px) scale(1.05);
    }
    60% {
      transform: translateY(-1px) scale(1.02);
    }
  }

  .notification-toast {
    position: fixed;
    top: 70px;
    right: 16px;
    left: auto;
    width: min(320px, calc(100vw - 32px));
    max-width: 320px;
    min-width: auto;
    padding: 12px;
    transform: translateY(-8px);
  }
  
  .notification-toast.show {
    transform: translateY(0);
  }

  .notification-toast::before {
    display: none;
  }

  .notification-toast__message {
    font-size: 0.78rem;
  }

  .notification-toast__icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }
  .dropdown-menu-notification {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    pointer-events: none;
  }

  .dropdown-menu-notification.show {
    display: block !important;
  }

  #desktop-notifications-container {
    display: none !important;
  }

  #mobile-notifications-container {
    display: none;
  }
}

body.dark-mode .navbar {
  background-color: #1e1e1e !important;
  border-color: #444;
}

body.dark-mode .navbar .navbar-brand {
  color: #e0e0e0 !important;
}

body.dark-mode .dropdown-menu {
  background-color: #2a2a2a;
  border-color: #444;
}

body.dark-mode .dropdown-item {
  color: #e0e0e0;
}

body.dark-mode .dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.075);
  color: #e0e0e0;
}

body.dark-mode .dropdown-header {
  color: #a0a0a0;
}

body.dark-mode .dropdown-divider {
  border-color: #444;
}

body.dark-mode .btn-link:hover {
  background-color: rgba(255, 255, 255, 0.075);
}

body.dark-mode .notification-overlay,
body.dark-mode .notification-overlay-mobile {
  background-color: #2a2a2a;
  border-color: #444;
}

body.dark-mode .notification-load-more {
  background-color: rgba(255, 255, 255, 0.02);
}

body.dark-mode .modal-content {
  background-color: rgba(30, 30, 30, 0.95);
  border-color: #444;
}

body.dark-mode .modal-header {
  border-color: #444;
}

body.dark-mode .modal-title {
  color: #e0e0e0;
}

body.dark-mode .account-switcher-item {
  border-color: #444;
  background-color: #2a2a2a;
}

body.dark-mode .account-switcher-item:hover {
  border-color: #4dabf7;
  background-color: #333;
}

body.dark-mode .account-switcher-item.current-account {
  border-color: #28a745;
  background-color: #1a3d1a;
}

body.dark-mode .account-item {
  color: #e0e0e0;
}

body.dark-mode .account-item:hover:not(.current-account) {
  background-color: #333;
}

body.dark-mode .account-item.current-account {
  background-color: #1a3d1a;
  border-left-color: #28a745;
}

body.dark-mode .text-muted {
  color: #a0a0a0 !important;
}

body.dark-mode .small.text-muted {
  color: #888 !important;
}

body.dark-mode .badge.bg-primary {
  background-color: #4dabf7 !important;
}

body.dark-mode .badge.bg-success {
  background-color: #28a745 !important;
}

body.dark-mode .notification-toast {
  background: #242424;
  border-color: #444;
  color: #e0e0e0;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34);
}

body.dark-mode .notification-toast::before {
  background: #242424;
  border-color: #444;
}

body.dark-mode .notification-toast__icon {
  background: #303030;
  border-color: #444;
  color: #cbd5e1;
}

body.dark-mode .notification-toast__title {
  color: #f8fafc;
}

body.dark-mode .notification-toast__message {
  color: #cbd5e1;
}

body.dark-mode .notification-loading-icon {
  background-color: #2a2a2a;
}

body.dark-mode .notification-auto-refresh-icon {
  background-color: rgba(42, 42, 42, 0.9);
}

body.dark-mode .auto-refresh-dots .dot {
  background-color: #a0a0a0;
}

.position-relative {
  position: relative;
}

.position-absolute {
  position: absolute;
}

.rounded-circle {
  border-radius: 50% !important;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.btn-outline-danger {
  color: #dc3545;
  border-color: #dc3545;
}

.btn-outline-danger:hover {
  background-color: #dc3545;
  border-color: #dc3545;
  color: #fff;
}

body.dark-mode .btn-outline-danger {
  color: #f5c6cb;
  border-color: #f5c6cb;
}

body.dark-mode .btn-outline-danger:hover {
  background-color: #dc3545;
  border-color: #dc3545;
  color: #fff;
}

.theme-overlay {
  position: absolute;
  top: 100%;
  right: 0;
  width: 320px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.theme-overlay.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.theme-overlay-header {
  padding: 16px;
  border-bottom: 1px solid #e0e0e0;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.theme-overlay-header .btn-close {
  display: block !important;
}

.theme-overlay-header h6 {
  margin: 0;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.theme-overlay-body {
  padding: 16px;
}

.theme-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.theme-option:last-child {
  border-bottom: none;
}

.theme-option-info {
  flex: 1;
}

.theme-option-label {
  font-weight: 500;
  color: #333;
  font-size: 13px;
  margin-bottom: 2px;
}

.theme-option-description {
  font-size: 11px;
  color: #666;
  line-height: 1.3;
}

.theme-toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: #ddd;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.theme-toggle-switch.active {
  background: #007bff;
}

.theme-toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.theme-toggle-switch.active::after {
  transform: translateX(20px);
}

.theme-toggle-switch.disabled,
.theme-overlay .theme-toggle-switch.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.auto-dark-mode-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

.auto-dark-mode-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.auto-dark-mode-label {
  font-weight: 500;
  color: #333;
  font-size: 13px;
}

.auto-dark-mode-description {
  font-size: 11px;
  color: #666;
  margin-bottom: 12px;
  line-height: 1.4;
}

.time-range-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.time-input {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 12px;
  text-align: center;
}

.time-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.time-separator {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.theme-overlay-footer {
  padding: 12px 16px;
  border-top: 1px solid #f0f0f0;
  background: #f8f9fa;
  border-radius: 0 0 8px 8px;
  display: flex;
  gap: 8px;
}

.theme-btn {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  color: #333;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-btn:hover {
  background: #f0f0f0;
  border-color: #ccc;
}

.theme-btn.primary {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.theme-btn.primary:hover {
  background: #0056b3;
  border-color: #0056b3;
}

.auto-mode-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #666;
  margin-top: 8px;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #28a745;
}

.status-indicator.inactive {
  background: #dc3545;
}

body.dark-mode .theme-overlay {
  background: #2a2a2a;
  border-color: #444;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

body.dark-mode .theme-overlay-header {
  background: #333;
  border-color: #444;
}

body.dark-mode .theme-overlay-header h6 {
  color: #e0e0e0;
}

body.dark-mode .theme-overlay-footer {
  background: #333;
  border-color: #444;
}

body.dark-mode .theme-option {
  border-color: #444;
}

body.dark-mode .theme-option-label {
  color: #e0e0e0;
}

body.dark-mode .theme-option-description {
  color: #a0a0a0;
}

body.dark-mode .auto-dark-mode-label {
  color: #e0e0e0;
}

body.dark-mode .auto-dark-mode-description {
  color: #a0a0a0;
}

body.dark-mode .time-input {
  background: #333;
  border-color: #555;
  color: #e0e0e0;
}

body.dark-mode .time-input:focus {
  border-color: #4dabf7;
  box-shadow: 0 0 0 2px rgba(77, 171, 247, 0.25);
}

body.dark-mode .time-separator {
  color: #a0a0a0;
}

body.dark-mode .theme-btn {
  background: #333;
  border-color: #555;
  color: #e0e0e0;
}

body.dark-mode .theme-btn:hover {
  background: #444;
  border-color: #666;
}

body.dark-mode .theme-btn.primary {
  background: #4dabf7;
  border-color: #4dabf7;
  color: #000;
}

body.dark-mode .theme-btn.primary:hover {
  background: #6bc4ff;
  border-color: #6bc4ff;
}

body.dark-mode .auto-mode-status {
  color: #a0a0a0;
}

body.dark-mode .auto-dark-mode-section {
  background-color: rgba(255, 255, 255, 0.02);
  border-color: #444;
}

.time-display {
  text-align: center;
  padding: 4px 12px;
  border-radius: 6px;
  background-color: rgba(0, 0, 0, 0.03);
  min-width: 100px;
}

.current-time {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: #333;
  letter-spacing: 0.3px;
}

.current-date {
  font-size: 10px;
  line-height: 1.2;
  color: #666;
  margin-top: 1px;
}

body.dark-mode .time-display {
  background-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .current-time {
  color: #e0e0e0;
}

body.dark-mode .current-date {
  color: #a0a0a0;
}

.php-memory-display {
  text-align: center;
  padding: 4px 12px;
  border-radius: 6px;
  background-color: rgba(13, 110, 253, 0.08);
  min-width: 132px;
  max-width: 160px;
  line-height: 1.2;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.php-memory-display:hover {
  background-color: rgba(13, 110, 253, 0.14);
  transform: translateY(-1px);
}

.php-memory-label {
  font-size: 10px;
  color: #0d6efd;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.php-memory-value {
  font-size: 12px;
  color: #333;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.dark-mode .php-memory-display {
  background-color: rgba(77, 171, 247, 0.12);
}

body.dark-mode .php-memory-label {
  color: #74c0fc;
}

body.dark-mode .php-memory-value {
  color: #e0e0e0;
}

@media (max-width: 768px) {
  .theme-overlay,
  .theme-overlay.show,
  body > .theme-overlay,
  #theme-toggler-item .theme-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    z-index: 9999 !important;
    border-radius: 0 !important;
    border: none !important;
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
    padding: 0 !important;
    inset: 0 !important;
    box-shadow: none !important;
    background: #ffffff !important;
  }
  body.dark-mode .theme-overlay,
  body.dark-mode .theme-overlay.show,
  body.dark-mode > .theme-overlay,
  body.dark-mode #theme-toggler-item .theme-overlay {
    background: #2a2a2a !important;
  }
  .theme-overlay:not(.show) {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(100%) !important;
    transition: all 0.3s ease !important;
  }
  .theme-overlay.show,
  body > .theme-overlay.show,
  #theme-toggler-item .theme-overlay.show,
  .theme-overlay.show[style],
  body > .theme-overlay.show[style] {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    transition: all 0.3s ease !important;
  }
  @media (max-width: 768px) {
    .theme-overlay.show {
      opacity: 1 !important;
      visibility: visible !important;
      transform: translateY(0) !important;
    }
  }
  .theme-overlay-header {
    padding: 20px !important;
    border-radius: 0 !important;
    border-bottom: 1px solid #e0e0e0 !important;
    flex-shrink: 0 !important;
    position: relative !important;
  }
  
  .theme-overlay-header h6 {
    font-size: 18px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    padding-right: 50px !important;
  }
  
  .theme-overlay-header .btn-close {
    position: absolute !important;
    top: 50% !important;
    right: 20px !important;
    transform: translateY(-50%) !important;
    width: 36px !important;
    height: 36px !important;
    background: rgba(0, 0, 0, 0.1) !important;
    border: none !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    cursor: pointer !important;
    color: #333 !important;
    opacity: 1 !important;
  }
  
  .theme-overlay-header .btn-close:before {
    content: "×" !important;
    font-size: 20px !important;
    line-height: 1 !important;
  }
  
  .theme-overlay-header .btn-close:hover {
    background: rgba(0, 0, 0, 0.2) !important;
  }
  .theme-overlay-body {
    flex: 1 !important;
    padding: 20px !important;
    overflow-y: auto !important;
  }
  
  .theme-option {
    padding: 20px 0 !important;
    border-bottom: 1px solid #e9ecef !important;
  }
  
  .theme-option:last-child {
    border-bottom: none !important;
  }
  
  .theme-option-label {
    font-size: 16px !important;
    margin-bottom: 6px !important;
  }
  
  .theme-option-description {
    font-size: 14px !important;
  }
  
  .auto-dark-mode-label {
    font-size: 16px !important;
  }
  
  .auto-dark-mode-description {
    font-size: 14px !important;
    margin-bottom: 20px !important;
  }
  
  .time-range-inputs {
    flex-direction: column !important;
    gap: 15px !important;
  }
  
  .time-input {
    width: 100% !important;
    padding: 15px !important;
    font-size: 16px !important;
    border-radius: 8px !important;
  }
  
  .theme-toggle-switch {
    width: 56px !important;
    height: 32px !important;
  }
  
  .theme-toggle-switch::after {
    width: 28px !important;
    height: 28px !important;
    top: 2px !important;
    left: 2px !important;
  }
  
  .theme-toggle-switch.active::after {
    transform: translateX(24px) !important;
  }
  .theme-overlay-footer {
    padding: 20px !important;
    border-radius: 0 !important;
    border-top: 1px solid #e0e0e0 !important;
    flex-shrink: 0 !important;
    flex-direction: column !important;
    gap: 15px !important;
  }
  
  .theme-btn {
    width: 100% !important;
    padding: 16px !important;
    font-size: 16px !important;
    border-radius: 8px !important;
  }
  body.theme-overlay-open {
    overflow: hidden !important;
  }
  .theme-overlay[style] {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  body > .theme-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }
  body.dark-mode .theme-overlay-header .btn-close {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #e0e0e0 !important;
  }
  
  body.dark-mode .theme-overlay-header .btn-close:hover {
    background: rgba(255, 255, 255, 0.2) !important;
  }
}

#headerSidebarToggle {
  color: #6c757d;
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid #dee2e6;
  background: #ffffff;
  transition: all 0.2s ease;
}

#headerSidebarToggle:hover {
  color: #495057;
  background: #f8f9fa;
  border-color: #adb5bd;
}

#headerSidebarToggle:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

#headerSidebarToggle .fas {
  font-size: 1.1rem;
}

body.dark-mode #headerSidebarToggle {
  color: #e0e0e0;
  background: #2a2a2a;
  border-color: #444;
}

body.dark-mode #headerSidebarToggle:hover {
  color: #ffffff;
  background: #333;
  border-color: #555;
}

body.dark-mode #session-expired-overlay {
  background-color: rgba(0, 0, 0, 0.75);
}

body.dark-mode #session-expired-overlay > div {
  background-color: #2a2a2a !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
  border: 1px solid #444;
}

body.dark-mode #session-expired-overlay > div > div:first-child {
  color: #e0e0e0 !important;
}

body.dark-mode #session-expired-overlay > div > div:first-child i {
  color: #e0e0e0;
  stroke: #e0e0e0;
}

body.dark-mode #session-expired-overlay > div > div:nth-child(2) {
  color: #a0a0a0 !important;
}

body.dark-mode #session-expired-overlay > div > div:last-child > button:first-child {
  background-color: var(--primary-color, #4dabf7) !important;
  color: #000 !important;
  border: none !important;
}

body.dark-mode #session-expired-overlay > div > div:last-child > button:first-child:hover {
  background-color: #6bc4ff !important;
}

body.dark-mode #session-expired-overlay > div > div:last-child > button:last-child {
  background-color: #333 !important;
  color: #e0e0e0 !important;
  border-color: #555 !important;
}

body.dark-mode #session-expired-overlay > div > div:last-child > button:last-child:hover {
  background-color: #444 !important;
  border-color: #666 !important;
}

.navbar.app-header {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  height: 60px;
  padding: 0;
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid #dde5ef !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07) !important;
  backdrop-filter: blur(14px);
  transition: background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.app-header .app-header-inner {
  display: flex !important;
  align-items: center !important;
  height: 100%;
  gap: 0.35rem;
}

.app-header .navbar-brand,
.app-header .nav-link,
.app-header .btn {
  min-height: 0;
}

.app-header-brand {
  gap: 0;
  min-width: 0;
  overflow: visible;
  padding: 0.5rem 1.18rem 0.5rem 0.24rem;
  border-radius: 8px;
  color: #334155 !important;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.app-header-brand.has-pack-badge {
  margin-right: 0.8rem !important;
}

.app-header-brand:hover {
  background: #eef6ff;
  color: #1d4ed8 !important;
  transform: translateX(1px);
}

.app-header-brand-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  overflow: visible;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 8px;
  background: #f8fafc;
}

.app-header-brand-mark img {
  display: block;
  width: 31px;
  height: 31px;
  object-fit: contain;
}

.app-header-pack-badge {
  position: absolute;
  right: -1.15rem;
  bottom: -0.42rem;
  z-index: 3;
  align-items: center;
  min-height: 18px;
  max-width: 82px;
  padding: 0.2rem 0.48rem;
  border: 2px solid #fff;
  border-radius: 999px;
  font-size: 0.62rem;
  line-height: 1;
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.16);
  animation: none !important;
  transform: none !important;
}

.pack-badge-desktop.app-header-pack-badge {
  max-width: 96px;
}

.app-header-actions {
  gap: 0.24rem;
}

.app-header .header-icon-button,
#headerSidebarToggle.header-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  padding: 0 !important;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.app-header .header-icon-button:hover,
.app-header .header-icon-button:focus,
#headerSidebarToggle.header-icon-button:hover,
#headerSidebarToggle.header-icon-button:focus {
  background: #eef6ff;
  border-color: rgba(37, 99, 235, 0.14);
  color: #1d4ed8;
  transform: translateY(-1px);
  animation: none;
  box-shadow: none;
}

.app-header .header-icon-button svg,
.app-header .header-icon-button [data-feather],
#headerSidebarToggle.header-icon-button svg {
  width: 18px;
  height: 18px;
}

.app-header .btn:hover {
  animation: none;
}

.app-header .badge {
  animation: none !important;
}

#notification-bell.dropdown-toggle::after {
  display: none;
}

#notification-bell .badge {
  min-width: 17px;
  height: 17px;
  padding: 0 0.3rem;
  border: 2px solid #fff;
  font-size: 0.62rem;
  line-height: 13px;
}

.app-header-user {
  min-height: 42px;
  gap: 0.25rem;
  padding: 0.25rem 0.42rem !important;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #334155 !important;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.app-header-user:hover,
.app-header-user:focus {
  background: #f8fafc;
  border-color: #dde5ef;
  color: #1d4ed8 !important;
}

.app-header-user img.rounded-circle,
.app-header-user .rounded-circle {
  width: 34px !important;
  height: 34px !important;
  margin-right: 0.54rem !important;
  border: 1px solid rgba(37, 99, 235, 0.16);
}

.app-header-user .fw-semibold {
  max-width: 260px;
  color: #334155 !important;
  font-size: 0.86rem;
  line-height: 1.12;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-header-user .small.text-muted {
  max-width: 260px;
  color: #64748b !important;
  font-size: 0.72rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-header-user-menu {
  z-index: 2000 !important;
  min-width: 238px;
  padding: 0.45rem;
  border: 1px solid #dde5ef !important;
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16) !important;
}

.app-header-user-menu .dropdown-item {
  display: flex;
  align-items: center;
  min-height: 36px;
  border-radius: 7px;
  font-size: 0.9rem;
}

.app-header-more-menu {
  min-width: 248px;
  padding: 0.45rem;
  border: 1px solid #dde5ef !important;
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16) !important;
}

.header-more-status,
.app-header-more-menu .header-more-action {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  width: 100%;
  min-height: 42px;
  padding: 0.55rem 0.64rem;
  border-radius: 7px;
}

.header-more-status {
  margin-bottom: 0.2rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.header-more-status-icon,
.app-header-more-menu .header-more-action > svg,
.app-header-more-menu .header-more-action > [data-feather] {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: #64748b;
}

.header-more-status-copy,
.app-header-more-menu .header-more-action > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.header-more-status-title,
.header-more-action-title {
  color: #334155;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
}

.header-more-status-subtitle,
.header-more-action-subtitle {
  color: #64748b;
  font-size: 0.72rem;
  line-height: 1.2;
}

.app-header-more-menu .header-more-action {
  color: #334155;
  font-size: 0.9rem;
  font-weight: 600;
}

.app-header-more-menu .header-more-action:hover,
.app-header-more-menu .header-more-action:focus {
  background: #eef6ff;
  color: #1d4ed8;
}

.app-header-more-menu .header-more-action:hover > svg,
.app-header-more-menu .header-more-action:focus > svg {
  color: #1d4ed8;
}

@media (max-width: 1399.98px) {
  #header-tour-launcher {
    display: none !important;
  }
}

.time-display,
.php-memory-display {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: none;
}

.time-display {
  min-width: 112px;
  padding: 0.35rem 0.7rem;
}

.php-memory-display {
  min-width: 132px;
  padding: 0.34rem 0.7rem;
}

.current-time,
.php-memory-value {
  color: #334155;
}

.current-date,
.php-memory-label {
  color: #64748b;
}

body.dark-mode .navbar.app-header {
  background: #1e1e1e !important;
  border-bottom-color: #444 !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18) !important;
}

body.dark-mode .app-header-brand {
  color: #e0e0e0 !important;
}

body.dark-mode .app-header-brand:hover,
body.dark-mode .app-header .header-icon-button:hover,
body.dark-mode .app-header .header-icon-button:focus,
body.dark-mode #headerSidebarToggle.header-icon-button:hover,
body.dark-mode #headerSidebarToggle.header-icon-button:focus {
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.1);
  color: #6bc4ff;
}

body.dark-mode .app-header-brand-mark {
  background: #242424;
  border-color: #444;
}

body.dark-mode .app-header-pack-badge {
  border-color: #1e1e1e;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.32);
}

body.dark-mode .app-header .header-icon-button,
body.dark-mode #headerSidebarToggle.header-icon-button {
  color: #a0a0a0;
  background: transparent;
  border-color: transparent;
}

body.dark-mode #notification-bell .badge {
  border-color: #1e1e1e;
}

body.dark-mode .app-header-user {
  color: #e0e0e0 !important;
}

body.dark-mode .app-header-user:hover,
body.dark-mode .app-header-user:focus {
  background: rgba(255, 255, 255, 0.075);
  border-color: #444;
  color: #6bc4ff !important;
}

body.dark-mode .app-header-user img.rounded-circle,
body.dark-mode .app-header-user .rounded-circle {
  border-color: #444;
}

body.dark-mode .app-header-user .fw-semibold {
  color: #e0e0e0 !important;
}

body.dark-mode .app-header-user .small.text-muted {
  color: #a0a0a0 !important;
}

body.dark-mode .app-header-user-menu {
  background: #2a2a2a;
  border-color: #444 !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.32) !important;
}

body.dark-mode .app-header-more-menu {
  background: #2a2a2a;
  border-color: #444 !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.32) !important;
}

body.dark-mode .header-more-status {
  background: #242424;
  border-color: #444;
}

body.dark-mode .header-more-status-title,
body.dark-mode .header-more-action-title,
body.dark-mode .app-header-more-menu .header-more-action {
  color: #e0e0e0;
}

body.dark-mode .header-more-status-subtitle,
body.dark-mode .header-more-action-subtitle,
body.dark-mode .header-more-status-icon,
body.dark-mode .app-header-more-menu .header-more-action > svg {
  color: #a0a0a0;
}

body.dark-mode .app-header-more-menu .header-more-action:hover,
body.dark-mode .app-header-more-menu .header-more-action:focus {
  background: rgba(255, 255, 255, 0.075);
  color: #6bc4ff;
}

body.dark-mode .time-display,
body.dark-mode .php-memory-display {
  background: #242424;
  border-color: #444;
}

@media (max-width: 1199.98px) {
  .app-header-user .fw-semibold,
  .app-header-user .small.text-muted {
    max-width: 190px;
  }
}

@media (max-width: 767.98px) {
  .navbar.app-header {
    height: 60px;
  }

  .app-header .app-header-inner {
    padding-right: 0.65rem;
    padding-left: 0.65rem;
    gap: 0.2rem;
  }

  .app-header-brand {
    padding: 0.5rem 0.88rem 0.5rem 0.2rem;
  }

  .app-header-brand.has-pack-badge {
    margin-right: 0.45rem !important;
  }

  .app-header-brand-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .app-header-brand-mark img {
    width: 30px;
    height: 30px;
  }

  .app-header .header-icon-button,
  #headerSidebarToggle.header-icon-button {
    width: 36px;
    height: 36px;
  }

  .app-header-pack-badge {
    right: -0.72rem;
    bottom: -0.34rem;
    min-height: 16px;
    max-width: 50px;
    padding: 0.18rem 0.36rem;
    font-size: 0.52rem;
  }

  .app-header-user {
    padding: 0.2rem !important;
  }

  .app-header-user img.rounded-circle,
  .app-header-user .rounded-circle {
    margin-right: 0 !important;
  }
}

.app-header .app-header-inner {
  min-width: 0;
  flex-wrap: nowrap;
}

.app-header-brand,
.app-header-actions {
  flex: 0 0 auto;
}

.app-header-search {
  min-width: 180px;
  max-width: min(560px, 42vw);
}

@media (max-width: 1199.98px) {
  .app-header-search {
    min-width: 140px;
    max-width: none;
    margin-right: 0.5rem !important;
    margin-left: 0.5rem !important;
  }

  .app-header-actions {
    gap: 0.25rem;
  }

  .app-header-user .fw-semibold,
  .app-header-user .small.text-muted {
    max-width: 160px;
  }
}

@media (max-width: 991.98px) {
  .app-header-search {
    min-width: 0;
  }

  .app-header-actions > .nav-item {
    margin-right: 0.35rem !important;
  }
}

@media (max-width: 575.98px) {
  .app-header .app-header-inner {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
    gap: 0.1rem;
  }

  .app-header-actions > .nav-item {
    margin-right: 0.18rem !important;
  }

  .app-header-brand.has-pack-badge {
    margin-right: 0.25rem !important;
  }

  .app-header .header-icon-button,
  #headerSidebarToggle.header-icon-button {
    width: 34px;
    height: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .navbar.app-header,
  .navbar.app-header *,
  .app-header-user-menu {
    transition: none !important;
    animation: none !important;
  }
}

:root {
  --app-header-height: 60px;
  --app-sidebar-width: 304px;
  --app-sidebar-mini-width: 72px;
  --app-chatbot-width: 400px;
}

#chatbot-sidebar {
  position: fixed;
  top: var(--app-header-height);
  right: calc(0px - var(--app-chatbot-width));
  width: var(--app-chatbot-width);
  height: calc(100vh - var(--app-header-height));
  background-color: #fff;
  box-shadow: -2px 0 5px rgba(0,0,0,0.2);
  transition: right 0.3s ease;
  z-index: 100;
  overflow-y: auto;
}

#chatbot-sidebar.show {
  right: 0;
}

#chatbot-sidebar.show ~ .chatbot-toggle,
#chatbot-sidebar.show + .chatbot-toggle {
  display: none !important;
}

.chatbot-toggle {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 100;
  height: 80px;
  width: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px 0 0 5px;
  padding: 0;
  border-right: none;
  box-shadow: -2px 0 5px rgba(0,0,0,0.1);
  font-size: 12px;
}

.chatbot-toggle:hover {
  width: 30px;
}

.content-shifted {
  transition: width 0.3s ease;
  width: 100%;
}

.content-shifted.active {
  width: calc(100% - var(--app-chatbot-width));
}

@media (max-width: 1199.98px) {
  .content-shifted.active {
    width: 100%;
  }
}

.chatbot-header {
  padding: 15px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-body {
  height: calc(100vh - 186px);
  overflow-y: auto;
  padding: 15px;
}

.chatbot-input {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px;
  background: #fff;
  border-top: 1px solid #e0e0e0;
}

.dropdown-menu, 
.dropdown-menu-notification,
.notification-overlay, 
.notification-overlay-mobile {
  z-index: 1030 !important;
}

main {
  width: calc(100% - var(--app-sidebar-width));
  max-width: calc(100% - var(--app-sidebar-width));
  min-width: 0;
  margin-left: var(--app-sidebar-width);
  padding-top: 20px;
  transition:
    margin-left 0.3s ease,
    width 0.3s ease,
    max-width 0.3s ease;
}

#sidebar.minimal ~ main {
  width: calc(100% - var(--app-sidebar-mini-width));
  max-width: calc(100% - var(--app-sidebar-mini-width));
  margin-left: var(--app-sidebar-mini-width);
}

main.no-sidebar {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
}

@media (max-width: 767.98px) {
  #chatbot-sidebar {
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    z-index: 9999;
  }
  
  #chatbot-sidebar.show {
    right: 0;
  }
  
  .content-shifted.active {
    width: 100%;
  }
  
  .chatbot-body {
    height: calc(100vh - 130px);
  }
  
  main {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
  }
}

#theme-toggle .theme-icon-sun { 
  display: none; 
}

#theme-toggle .theme-icon-moon { 
  display: inline-block; 
}

body.dark-mode #theme-toggle .theme-icon-sun { 
  display: inline-block; 
}

body.dark-mode #theme-toggle .theme-icon-moon { 
  display: none; 
}

html.dark-mode,
body.dark-mode {
  background-color: #121212 !important;
  color: #e0e0e0;
}

body.dark-mode .bg-white,
body.dark-mode .modal-content,
body.dark-mode .card,
body.dark-mode #sidebar,
body.dark-mode .navbar,
body.dark-mode #chatbot-sidebar,
body.dark-mode .chatbot-input,
body.dark-mode .offcanvas {
  background-color: #1e1e1e !important;
}

body.dark-mode .bg-light {
  background-color: #2a2a2a !important;
}

body.dark-mode .text-body,
body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode .table,
body.dark-mode .dropdown-item,
body.dark-mode .offcanvas {
  color: #e0e0e0 !important;
}

body.dark-mode .text-muted {
  color: #a0a0a0 !important;
}

body.dark-mode .border-bottom,
body.dark-mode .border-top,
body.dark-mode .border,
body.dark-mode .modal-header,
body.dark-mode .modal-footer,
body.dark-mode .dropdown-divider,
body.dark-mode .chatbot-header {
  border-color: #333 !important;
}

body.dark-mode .shadow-sm {
  box-shadow: 0 .125rem .25rem rgba(255, 255, 255, 0.075) !important;
}

body.dark-mode .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

body.dark-mode #sidebar .nav-link { 
  color: #a0a0a0; 
}

body.dark-mode #sidebar .nav-link:hover { 
  background-color: rgba(255, 255, 255, 0.1); 
  color: #fff; 
}

body.dark-mode #sidebar .nav-link.active { 
  background-color: rgba(0, 123, 255, 0.2); 
  color: #4dabf7; 
}

body.dark-mode .offcanvas .nav-link { 
  color: #a0a0a0; 
}

body.dark-mode .offcanvas .nav-link:hover { 
  background-color: rgba(255, 255, 255, 0.1); 
  color: #fff; 
}

body.dark-mode .offcanvas .nav-link.active { 
  background-color: rgba(0, 123, 255, 0.2); 
  color: #4dabf7; 
}

body.dark-mode .dropdown-menu { 
  background-color: #2a2a2a; 
  border: 1px solid #444; 
}

body.dark-mode .dropdown-item:hover, 
body.dark-mode .dropdown-item:focus { 
  background-color: #3a3a3a; 
  color: #fff; 
}

body.dark-mode .dropdown-header { 
  color: #a0a0a0; 
}

body.dark-mode .form-control,
body.dark-mode .form-select {
  background-color: #2a2a2a;
  border-color: #444;
}

body.dark-mode .form-control:focus,
body.dark-mode .form-select:focus {
  background-color: #2a2a2a;
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

body.dark-mode .form-control::placeholder {
  color: #a0a0a0 !important;
}

body.dark-mode .table > :not(caption) > * > * { 
  background-color: transparent; 
}

body.dark-mode .table-striped > tbody > tr:nth-of-type(odd) > * { 
  --bs-table-accent-bg: rgba(255, 255, 255, 0.05); 
}

body.dark-mode .table-hover > tbody > tr:hover > * { 
  --bs-table-accent-bg: rgba(255, 255, 255, 0.075); 
}

body.dark-mode .table-bordered,
body.dark-mode .table > thead > tr > th { 
  border-color: #444; 
}

body.dark-mode .navbar .nav-link,
body.dark-mode .navbar .btn-link {
  color: #e0e0e0;
}

body.dark-mode .notification-overlay,
body.dark-mode .notification-overlay-mobile {
  background-color: #1e1e1e;
  border: 1px solid #444;
  color: #e0e0e0;
  box-shadow: 0 0.5rem 1rem rgba(255, 255, 255, 0.15);
}

body.dark-mode .notification-header,
body.dark-mode .notification-footer {
  background-color: #2a2a2a;
}

body.dark-mode .notification-item:hover,
body.dark-mode .notification-load-more:hover {
  background-color: #3a3a3a;
}

body.dark-mode .notification-item.unread {
  background-color: #2c3e50;
}

body.dark-mode .notification-text,
body.dark-mode .notification-link {
  color: #e0e0e0;
}

body.dark-mode .desktop-search-overlay {
  background: #2a2a2a !important;
  border-color: #555 !important;
}

body.dark-mode .recent-search-item,
body.dark-mode .quick-link-card,
body.dark-mode #searchModal .search-card {
  background: #3a3a3a;
  color: #e0e0e0;
}

body.dark-mode .recent-search-item:hover,
body.dark-mode .quick-link-card:hover,
body.dark-mode #searchModal .search-card:hover {
  background: #4a4a4a;
}

body.dark-mode .quick-link-icon {
  background: #2a2a2a;
}

body.dark-mode .recent-search-item a,
body.dark-mode .quick-link-card,
body.dark-mode .quick-link-text {
  color: #e0e0e0 !important;
}

body.dark-mode #searchModal .modal-header,
body.dark-mode #searchModal .search-overlay {
  background-color: #1e1e1e !important;
}

body.dark-mode #searchModal .list-group-item {
  background-color: #1e1e1e;
  border-color: #444;
}

body.dark-mode #searchModal .list-group-item a span {
  color: #e0e0e0 !important;
}

body.dark-mode p,
body.dark-mode label,
body.dark-mode .card-body, 
body.dark-mode .modal-body,
body.dark-mode .card-title,
body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode h4, 
body.dark-mode h5, 
body.dark-mode h6,
body.dark-mode .fw-semibold {
  color: #e0e0e0 !important;
}

body.dark-mode .system-notification-content-light p,
body.dark-mode .system-notification-content-light label,
body.dark-mode .system-notification-content-light h1,
body.dark-mode .system-notification-content-light h2,
body.dark-mode .system-notification-content-light h3,
body.dark-mode .system-notification-content-light h4,
body.dark-mode .system-notification-content-light h5,
body.dark-mode .system-notification-content-light h6,
body.dark-mode .system-notification-content-light .fw-semibold,
body.dark-mode .card-body .system-notification-content-light p,
body.dark-mode .card-body .system-notification-content-light label,
body.dark-mode .card-body .system-notification-content-light h1,
body.dark-mode .card-body .system-notification-content-light h2,
body.dark-mode .card-body .system-notification-content-light h3,
body.dark-mode .card-body .system-notification-content-light h4,
body.dark-mode .card-body .system-notification-content-light h5,
body.dark-mode .card-body .system-notification-content-light h6,
body.dark-mode .card-body .system-notification-content-light .fw-semibold {
  color: revert !important;
}

body.dark-mode .system-notification-content-light .ql-editor p,
body.dark-mode .system-notification-content-light .ql-editor label,
body.dark-mode .system-notification-content-light .ql-editor h1,
body.dark-mode .system-notification-content-light .ql-editor h2,
body.dark-mode .system-notification-content-light .ql-editor h3,
body.dark-mode .system-notification-content-light .ql-editor h4,
body.dark-mode .system-notification-content-light .ql-editor h5,
body.dark-mode .system-notification-content-light .ql-editor h6,
body.dark-mode .system-notification-content-light .ql-editor .fw-semibold,
body.dark-mode .card-body .system-notification-content-light .ql-editor p,
body.dark-mode .card-body .system-notification-content-light .ql-editor label,
body.dark-mode .card-body .system-notification-content-light .ql-editor h1,
body.dark-mode .card-body .system-notification-content-light .ql-editor h2,
body.dark-mode .card-body .system-notification-content-light .ql-editor h3,
body.dark-mode .card-body .system-notification-content-light .ql-editor h4,
body.dark-mode .card-body .system-notification-content-light .ql-editor h5,
body.dark-mode .card-body .system-notification-content-light .ql-editor h6,
body.dark-mode .card-body .system-notification-content-light .ql-editor .fw-semibold {
  color: revert !important;
}

body.dark-mode .card-header, 
body.dark-mode .card-footer {
  background-color: #2a2a2a;
}

body.dark-mode .list-group-item {
  background-color: #1e1e1e;
  border-color: #444;
}

body.dark-mode .btn-light {
  background-color: #3a3a3a;
  color: #e0e0e0;
  border-color: #555;
}

body.dark-mode .btn-light:hover {
  background-color: #4a4a4a;
  color: #fff;
  border-color: #666;
}

body.dark-mode .page-header {
  background-color: #2a2a2a;
  border-bottom: 1px solid #444;
}

body.dark-mode .breadcrumb {
  background-color: transparent;
}

body.dark-mode .breadcrumb-item + .breadcrumb-item::before {
  color: #6c757d;
}

body.dark-mode .breadcrumb-item.active {
  color: #a0a0a0;
}

body.dark-mode .btn-outline-primary {
  color: #4dabf7;
  border-color: #4dabf7;
}

body.dark-mode .btn-outline-primary:hover {
  background-color: #4dabf7;
  border-color: #4dabf7;
  color: #fff;
}

body.dark-mode .btn-outline-secondary {
  color: #a0a0a0;
  border-color: #6c757d;
}

body.dark-mode .btn-outline-secondary:hover {
  background-color: #6c757d;
  border-color: #6c757d;
  color: #fff;
}

body.dark-mode .pagination .page-link {
  background-color: #2a2a2a;
  border-color: #444;
  color: #e0e0e0;
}

body.dark-mode .pagination .page-link:hover {
  background-color: #3a3a3a;
  border-color: #555;
  color: #fff;
}

body.dark-mode .pagination .page-item.active .page-link {
  background-color: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
}

body.dark-mode .pagination .page-item.disabled .page-link {
  background-color: #1e1e1e;
  border-color: #333;
  color: #6c757d;
}

body.dark-mode .alert {
  color: #e0e0e0;
}

body.dark-mode .alert-success {
  background-color: #1a3a1a;
  border-color: #2a5a2a;
}

body.dark-mode .alert-danger {
  background-color: #3a1a1a;
  border-color: #5a2a2a;
}

body.dark-mode .alert-warning {
  background-color: #3a3a1a;
  border-color: #5a5a2a;
}

body.dark-mode .alert-primary {
  background-color: #1a3d5c;
  border-color: #4dabf7;
  color: #e0e0e0;
}

body.dark-mode .alert-info {
  background-color: #1a2a3a;
  border-color: #2a4a5a;
}

.table-responsive {
    overflow-x: auto;
}

.table-action-column,
.table-action-cell {
    white-space: nowrap;
}

.table-action-column {
    text-align: right;
}

.table-action-cell {
    text-align: right;
}

.table-action-cell .btn-group {
    flex-wrap: nowrap;
}

@media (max-width: 768px) {
    [data-tour-step="page-header"].d-flex.justify-content-between {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    [data-tour-step="page-header"].d-flex.justify-content-between > h1,
    [data-tour-step="page-header"].d-flex.justify-content-between > h2,
    [data-tour-step="page-header"].d-flex.justify-content-between > h3 {
        flex: 1 1 auto;
        min-width: 0;
        margin-bottom: 0;
        overflow-wrap: anywhere;
    }

    [data-tour-step="page-header"].d-flex.justify-content-between > :not(h1):not(h2):not(h3) {
        flex: 0 1 auto;
        max-width: 100%;
        margin-left: auto;
    }

    [data-tour-step="page-header"].d-flex.justify-content-between > .d-flex:last-child {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

#responsive-reload-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#responsive-reload-overlay.show {
    opacity: 1;
}

#responsive-reload-overlay .message-box {
    background-color: white;
    color: #333;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    max-width: 400px;
    transform: scale(0.9);
    animation: zoomIn 0.3s ease-out forwards;
}

@keyframes zoomIn {
    to {
        transform: scale(1);
    }
}

#responsive-reload-overlay .icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

#responsive-reload-overlay h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

#responsive-reload-overlay p {
    margin-bottom: 30px;
    color: #555;
}

#responsive-reload-overlay .reload-button {
    background-color: #0d6efd;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#responsive-reload-overlay .reload-button:hover {
    background-color: #0b5ed7;
}

#responsive-reload-overlay .skip-button {
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#responsive-reload-overlay .skip-button:hover {
    background-color: #5c636a;
}

#responsive-reload-overlay .button-container svg {
    width: 16px;
    height: 16px;
}

html.dark-mode #responsive-reload-overlay .message-box {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

html.dark-mode #responsive-reload-overlay p {
    color: #a0a0a0;
}

.pagination .page-link {
  color: var(--bs-pagination-color);
  background-color: var(--bs-pagination-bg);
  border-color: var(--bs-pagination-border-color);
}

.pagination .page-item.active .page-link {
  color: var(--bs-pagination-active-color);
  background-color: var(--bs-pagination-active-bg);
  border-color: var(--bs-pagination-active-border-color);
}

.pagination .page-item.disabled .page-link {
  color: var(--bs-pagination-disabled-color);
  background-color: var(--bs-pagination-disabled-bg);
  border-color: var(--bs-pagination-disabled-border-color);
}

.pagination .page-link:hover {
  color: var(--bs-pagination-hover-color) !important;
  background-color: var(--bs-pagination-hover-bg) !important;
  border-color: var(--bs-pagination-hover-border-color) !important;
}

.pagination .page-item.active .page-link:hover {
  color: var(--bs-pagination-active-color) !important;
  background-color: var(--bs-pagination-active-bg) !important;
  border-color: var(--bs-pagination-active-border-color) !important;
}

body.dark-mode .pagination .page-item.active .page-link:hover {
  background-color: #4dabf7;
  border-color: #4dabf7;
  color: #fff;
}
