/* Main sidebar scroll */
.sidebar .sidebar-inner {
  max-height: calc(100vh - 65px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #c5c5c5 transparent;
}

.sidebar .sidebar-inner::-webkit-scrollbar {
  width: 6px;
}

.sidebar .sidebar-inner::-webkit-scrollbar-thumb {
  background: #c5c5c5;
  border-radius: 4px;
}

/* Settings sidebar scroll */
.settings-wrapper .settings-sidebar .sidebar-inner {
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

.settings-wrapper .settings-sidebar .sidebar-inner::-webkit-scrollbar {
  width: 6px;
}

.settings-wrapper .settings-sidebar .sidebar-inner::-webkit-scrollbar-thumb {
  background: #c5c5c5;
  border-radius: 4px;
}

/* Header: push user info to the right */
.header .main-header {
  display: flex;
  align-items: center;
  width: 100%;
}

.header .main-header .header-left {
  float: none;
  flex-shrink: 0;
}

.header .main-header .mobile_btn {
  float: none;
  flex-shrink: 0;
}

.header .main-header .user-menu {
  display: flex;
  margin-left: auto;
  justify-content: flex-end;
  flex: 1;
}

/* Sidebar overlay when mobile menu is open */
.sidebar-overlay.opened {
  display: block !important;
}

@media (max-width: 991.98px) {
  .main-wrapper.slide-nav .sidebar {
    margin-left: 0 !important;
  }
}

/* ==========================================================================
   Universal Modal Close Button Fix (.btn-close & .modal .close)
   ========================================================================== */
.modal .btn-close,
.modal-header .btn-close,
.modal .close {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: none !important;
  background-color: rgba(0, 0, 0, 0.08) !important;
  background-image: none !important;
  color: #374151 !important;
  opacity: 0.9 !important;
  filter: none !important;
  cursor: pointer !important;
  transition: all 0.15s ease-in-out !important;
  box-shadow: none !important;
  margin: 0 !important;
  line-height: 1 !important;
}

.modal .btn-close::before,
.modal-header .btn-close::before,
.modal .close::before {
  content: '×' !important;
  display: block !important;
  font-family: Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  color: inherit !important;
  text-align: center !important;
  pointer-events: none !important;
}

.modal .btn-close:hover,
.modal-header .btn-close:hover,
.modal .close:hover {
  opacity: 1 !important;
  background-color: #ef4444 !important;
  color: #ffffff !important;
  transform: scale(1.06) !important;
}

/* Colored / Dark modal headers (e.g. blue POS headers, .btn-close-white, .text-white) */
.modal .btn-close.btn-close-white,
.modal-header.text-white .btn-close,
.modal-header[style*="background"] .btn-close,
.modal-header[style*="background:#"] .btn-close,
.modal-header.bg-primary .btn-close,
.modal-header.bg-dark .btn-close {
  background-color: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
  filter: none !important;
}

.modal .btn-close.btn-close-white:hover,
.modal-header.text-white .btn-close:hover,
.modal-header[style*="background"] .btn-close:hover,
.modal-header[style*="background:#"] .btn-close:hover,
.modal-header.bg-primary .btn-close:hover,
.modal-header.bg-dark .btn-close:hover {
  background-color: rgba(255, 255, 255, 0.38) !important;
  color: #ffffff !important;
}

/* ==========================================================================
   Clean & Modern Header Styling
   ========================================================================== */
.header {
  background: #ffffff !important;
  border-bottom: 1px solid #eef2f6 !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.02), 0 1px 2px -1px rgba(0, 0, 0, 0.02) !important;
  height: 60px !important;
}

.header .main-header {
  height: 60px !important;
}

@media (min-width: 992px) {
  .header .header-left {
    display: none !important;
  }
}

@media (max-width: 991.98px) {
  .header .header-left {
    background: #ffffff !important;
    border-right: 1px solid #f1f5f9 !important;
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 12px !important;
  }
}

.header .header-left .logo img {
  max-height: 38px !important;
  object-fit: contain !important;
}

/* Warehouse & user pill */
.header .user-header-info {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 24px !important;
  padding: 4px 14px !important;
  box-shadow: none !important;
  transition: all 0.2s ease;
}

.header .user-header-info:hover {
  border-color: #cbd5e1 !important;
  background: #f1f5f9 !important;
}

.header .user-header-info .info-icon {
  background: #ede9fe !important;
  color: #7c3aed !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 50% !important;
}

.header .user-header-info .info-content .fw-bold {
  color: #0f172a !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
}

.header .user-header-info .info-content .text-muted {
  color: #64748b !important;
  font-size: 10.5px !important;
}

/* Quick Create Button */
.header-action-btn.btn-primary {
  background: #7c3aed !important;
  border: 1px solid #7c3aed !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  padding: 0 14px !important;
  font-weight: 600 !important;
  font-size: 12.5px !important;
  letter-spacing: 0.01em !important;
  box-shadow: 0 1px 2px rgba(124, 58, 237, 0.2) !important;
  transition: all 0.2s ease !important;
}

.header-action-btn.btn-primary:hover {
  background: #6d28d9 !important;
  border-color: #6d28d9 !important;
  box-shadow: 0 4px 6px -1px rgba(124, 58, 237, 0.25) !important;
  transform: translateY(-1px);
}

/* POS Button */
.header-action-btn.btn-dark {
  background: #0f172a !important;
  border: 1px solid #0f172a !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  padding: 0 14px !important;
  font-weight: 600 !important;
  font-size: 12.5px !important;
  letter-spacing: 0.01em !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.15) !important;
  transition: all 0.2s ease !important;
}

.header-action-btn.btn-dark:hover {
  background: #1e293b !important;
  border-color: #1e293b !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.2) !important;
}

/* Header Action Icon Boxes (Fullscreen, Settings, etc.) */
.header .user-menu .nav-item-box > a,
.header .user-menu .nav-item-box .btn {
  width: 36px !important;
  height: 36px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 8px !important;
  color: #64748b !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  transition: all 0.15s ease !important;
  font-size: 17px !important;
}

.header .user-menu .nav-item-box > a:hover,
.header .user-menu .nav-item-box .btn:hover {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

/* User Avatar & Dropdown */
.header .profile-nav .userset img {
  border: 2px solid #e2e8f0 !important;
  transition: border-color 0.2s ease;
}

.header .profile-nav:hover .userset img {
  border-color: #7c3aed !important;
}

.header .dropdown-menu {
  border-radius: 12px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04) !important;
  padding: 8px !important;
}

.header .dropdown-menu .dropdown-item {
  border-radius: 6px !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #334155 !important;
  transition: all 0.15s ease;
}

.header .dropdown-menu .dropdown-item:hover {
  background: #f5f3ff !important;
  color: #7c3aed !important;
}

/* ==========================================================================
   Clean & Modern Sidebar Styling
   ========================================================================== */
.sidebar {
  background: #ffffff !important;
  border-right: 1px solid #f1f5f9 !important;
  box-shadow: none !important;
}

.sidebar .sidebar-logo {
  height: 60px !important;
  background: #ffffff !important;
  border-bottom: 1px solid #f1f5f9 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 16px !important;
}

.sidebar .sidebar-inner {
  padding: 8px 10px 20px !important;
}

/* Submenu Headers */
.sidebar .sidebar-menu .submenu-hdr {
  font-size: 10.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: #94a3b8 !important;
  padding: 16px 12px 6px !important;
  margin: 0 !important;
}

/* Sidebar Top Items */
.sidebar .sidebar-menu > ul > li > a {
  display: flex !important;
  align-items: center !important;
  padding: 8px 12px !important;
  margin: 2px 0 !important;
  border-radius: 8px !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  color: #475569 !important;
  background: transparent !important;
  transition: all 0.15s ease !important;
}

.sidebar .sidebar-menu > ul > li > a i,
.sidebar .sidebar-menu > ul > li > a svg {
  font-size: 18px !important;
  min-width: 20px !important;
  margin-right: 10px !important;
  color: #64748b !important;
  transition: color 0.15s ease !important;
}

.sidebar .sidebar-menu > ul > li > a span {
  font-size: 13.5px !important;
  font-weight: 500 !important;
  color: inherit !important;
  flex: 1 !important;
}

/* Sidebar Item Hover */
.sidebar .sidebar-menu > ul > li > a:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
}

.sidebar .sidebar-menu > ul > li > a:hover i,
.sidebar .sidebar-menu > ul > li > a:hover svg {
  color: #7c3aed !important;
}

/* Sidebar Item Active */
.sidebar .sidebar-menu > ul > li > a.active,
.sidebar .sidebar-menu > ul > li.active > a {
  background: #f5f3ff !important;
  color: #7c3aed !important;
  font-weight: 600 !important;
}

.sidebar .sidebar-menu > ul > li > a.active i,
.sidebar .sidebar-menu > ul > li > a.active svg,
.sidebar .sidebar-menu > ul > li.active > a i,
.sidebar .sidebar-menu > ul > li.active > a svg {
  color: #7c3aed !important;
}

/* Menu Arrow Chevron */
.sidebar .sidebar-menu .menu-arrow {
  margin-left: auto !important;
  transition: transform 0.2s ease !important;
  background: transparent !important;
  border: none !important;
  width: auto !important;
  height: auto !important;
}

/* Submenu Dropdown Container */
.sidebar .sidebar-menu > ul > li.submenu ul {
  background: transparent !important;
  padding: 2px 0 4px 12px !important;
  margin: 2px 0 4px 16px !important;
  border-left: 1.5px solid #f1f5f9 !important;
}

.sidebar .sidebar-menu > ul > li.submenu ul li a {
  display: block !important;
  padding: 6px 10px !important;
  margin: 1px 0 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  color: #64748b !important;
  border-radius: 6px !important;
  background: transparent !important;
  transition: all 0.15s ease !important;
}

.sidebar .sidebar-menu > ul > li.submenu ul li a:hover {
  color: #0f172a !important;
  background: #f8fafc !important;
  padding-left: 13px !important;
}

.sidebar .sidebar-menu > ul > li.submenu ul li a.router-link-active,
.sidebar .sidebar-menu > ul > li.submenu ul li a.active {
  color: #7c3aed !important;
  font-weight: 600 !important;
  background: #f5f3ff !important;
}


