.loader-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(240, 236, 236, 0.47);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.loader-car {
  width: 102px;
  height: 40px;
}

.loader-car__body {
  stroke: #4dac51;
  animation: loader-car-shake 0.2s ease-in-out infinite alternate;
}

.loader-car__wheel--left,
.loader-car__wheel--right {
  stroke: #4dac51;
}

.loader-car__line {
  stroke: #696d6c;
  transform-origin: center right;
  stroke-dasharray: 22;
  animation: loader-car-line 0.8s ease-in-out infinite;
  animation-fill-mode: both;
}

.loader-car__line--top {
  animation-delay: 0s;
}

.loader-car__line--middle {
  animation-delay: 0.2s;
}

.loader-car__line--bottom {
  animation-delay: 0.4s;
}

.header-logo-image {
  max-height: 60px !important;
}

.header-user-avatar {
  width: 36px !important;
  height: 36px !important;
  object-fit: cover;
  border: 2px solid #e2ede5;
}

.modal-content--sm {
  max-width: 400px;
}

.modal-content--md {
  max-width: 500px;
}

.modal-content--lg {
  max-width: 1100px;
}

.logout-modal-image {
  max-width: 100px;
  margin-bottom: 20px;
}

.header-notification-item {
  width: 300px;
}

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

.header-nav .notifications .notification-item {
  width: 300px;
}

.text-black {
  color: #000;
}

.pointer-enabled {
  cursor: pointer !important;
}

@keyframes loader-car-shake {
  0% {
    transform: translateY(-1%);
  }

  100% {
    transform: translateY(3%);
  }
}

@keyframes loader-car-line {
  0% {
    stroke-dashoffset: 22;
  }

  25% {
    stroke-dashoffset: 22;
  }

  50% {
    stroke-dashoffset: 0;
  }

  51% {
    stroke-dashoffset: 0;
  }

  80% {
    stroke-dashoffset: -22;
  }

  100% {
    stroke-dashoffset: -22;
  }
}

/* =====================================================
   HEADER - Modern Design
   ===================================================== */
#header.header {
  height: 68px;
  padding: 0 24px;
  background: #ffffff;
  border-bottom: 1px solid #e8eeeb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(15, 45, 28, 0.03);
}

#header .logo img {
  max-height: 44px;
}

#header .toggle-sidebar-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f0f9f2;
  color: #1f8a3e !important;
  font-size: 1.5rem !important;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

#header .toggle-sidebar-btn:hover {
  background: #e2f4e6;
  border-color: #c8e8cf;
}

/* Header icon button (notification bell) */
.header-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f5f7f6;
  transition: all 0.2s ease;
  position: relative;
  border: 1px solid transparent;
}

.header-icon-btn:hover {
  background: #eef6f0;
  border-color: #d4e8d9;
}

.header-icon-btn i {
  font-size: 1.15rem;
  color: #334d3e;
}

.header-nav .nav-icon {
  color: #334d3e !important;
  margin-right: 8px;
}

.header-nav .badge-number {
  background: #16a34a !important;
  font-size: 10px !important;
  padding: 2px 5px !important;
  border-radius: 50px;
  position: absolute !important;
  top: -3px !important;
  right: -3px !important;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
}

.header-nav .nav-profile {
  border: 1px solid #e2ede5;
  border-radius: 999px;
  padding: 4px 12px 4px 4px !important;
  background: #ffffff;
  transition: all 0.2s ease;
  gap: 4px;
}

.header-nav .nav-profile:hover {
  background: #f8fcf9;
  border-color: #c8e0cf;
}

.header-nav .nav-profile span {
  font-size: 13px !important;
  font-weight: 600;
  color: #1e3a2b;
}

/* Profile dropdown */
.header-nav .profile {
  min-width: 220px;
  padding: 8px 0 !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12) !important;
  border: 1px solid #e8eeeb !important;
}

.header-nav .profile .dropdown-header {
  padding: 12px 16px !important;
}

.header-nav .profile .dropdown-header h6 {
  font-size: 0.95rem !important;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}

.header-nav .profile .dropdown-header span {
  font-size: 0.78rem;
  color: #94a3b8;
}

.header-nav .profile .dropdown-item {
  padding: 10px 16px !important;
  font-size: 0.85rem !important;
  font-weight: 500;
  color: #475569;
  border-radius: 0;
  transition: all 0.15s ease;
}

.header-nav .profile .dropdown-item i {
  font-size: 1rem !important;
  margin-right: 10px;
  color: #64748b;
}

.header-nav .profile .dropdown-item:hover {
  background: #f0fdf4 !important;
  color: #16a34a;
}

.header-nav .profile .dropdown-item:hover i {
  color: #16a34a;
}

/* Notification dropdown */
.header-nav .notifications {
  border-radius: 12px !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12) !important;
  border: 1px solid #e8eeeb !important;
  padding: 0 !important;
  overflow: hidden;
}

.header-nav .notifications .dropdown-header {
  background: #f8fcf9;
  font-weight: 600;
  color: #1e3a2b;
  padding: 14px 16px !important;
  font-size: 0.85rem !important;
  border-bottom: 1px solid #e8eeeb;
}

.header-nav .notifications .notification-item {
  padding: 12px 16px !important;
  border-bottom: 1px solid #f1f5f3;
  transition: all 0.15s ease;
}

.header-nav .notifications .notification-item:last-child {
  border-bottom: none;
}

.header-nav .notifications .notification-item:hover {
  background: #f0fdf4 !important;
}

.header-nav .notifications .notification-item i {
  margin: 0 14px 0 0 !important;
  font-size: 18px !important;
  color: #16a34a;
  flex-shrink: 0;
}

.header-nav .notifications .notification-item h4 {
  font-size: 0.85rem !important;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 3px;
}

.header-nav .notifications .notification-item p {
  font-size: 0.78rem !important;
  color: #64748b;
  margin-bottom: 0;
}

/* =====================================================
   SIDEBAR - Modern Design
   ===================================================== */
#sidebar.sidebar {
  width: 280px;
  padding: 0 14px 18px;
  background: #ffffff;
  border-right: 1px solid #e8eeeb;
  box-shadow: 1px 0 8px rgba(0, 0, 0, 0.03);
  top: 68px;
  overflow-x: hidden;
}

#sidebar.sidebar::-webkit-scrollbar {
  width: 4px;
}

#sidebar.sidebar::-webkit-scrollbar-thumb {
  background: #c8e0cf;
  border-radius: 10px;
}

/* Sidebar brand section */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 14px 16px;
  margin-bottom: 4px;
  border-bottom: 1px solid #f1f5f3;
}

.sidebar-brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #ffffff;
  font-size: 1.15rem;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.25);
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.sidebar-brand-label {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Sidebar nav headings */
.sidebar-nav .sidebar-nav-heading,
li.sidebar-nav-heading {
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8 !important;
  padding: 18px 14px 6px !important;
  margin: 0 !important;
  list-style: none;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

/* Sidebar nav list */
.sidebar-nav {
  padding: 0 !important;
  margin: 0 !important;
}

/* Nav items */
.sidebar-nav .nav-item {
  margin-bottom: 2px !important;
}

.sidebar-nav .nav-link {
  border-radius: 10px !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  color: #475569 !important;
  background: transparent !important;
  padding: 10px 14px !important;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 2px;
}

.sidebar-nav .nav-link i {
  width: 22px;
  text-align: center;
  font-size: 1.05rem !important;
  color: #64748b !important;
  margin-right: 10px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sidebar-nav .nav-link span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-nav .nav-link:hover {
  background: #f0fdf4 !important;
  color: #16a34a !important;
}

.sidebar-nav .nav-link:hover i {
  color: #16a34a !important;
}

/* Active state - green gradient with shadow */
.sidebar-nav .nav-link.menu-active.active,
.sidebar-nav .nav-link.active,
.sidebar-nav .nav-link:not(.collapsed) {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.28);
}

.sidebar-nav .nav-link.menu-active.active i,
.sidebar-nav .nav-link.active i,
.sidebar-nav .nav-link:not(.collapsed) i {
  color: #ffffff !important;
}

/* Sidebar width adjustments */
@media (min-width: 1200px) {
  #main,
  #footer {
    margin-left: 280px !important;
  }

  .toggle-sidebar #main,
  .toggle-sidebar #footer {
    margin-left: 0 !important;
  }

  .toggle-sidebar #sidebar.sidebar {
    left: -280px !important;
  }
}

@media (max-width: 1199px) {
  #sidebar.sidebar {
    left: -280px;
  }
}

/* Override main margin-top for taller header */
#main {
  margin-top: 68px;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar-brand {
    padding: 16px 12px 14px;
  }

  .sidebar-brand-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .sidebar-brand-name {
    font-size: 0.95rem;
  }
}
