@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('./variables.css');

/* ==========================================================================
   RESET & FOUNDATIONS
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: var(--lx-font-family);
  font-size: var(--lx-font-size-base);
  line-height: 1.45;
  color: var(--lx-text-main);
  background-color: var(--lx-bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--lx-accent);
  text-decoration: none;
  transition: color var(--lx-transition-fast);
}

a:hover {
  color: var(--lx-accent-hover);
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* ==========================================================================
   LAYOUT ARCHITECTURE
   ========================================================================== */
.lx-app {
  min-height: 100vh;
  width: 100%;
  position: relative;
}

/* ---------------- SIDEBAR ---------------- */
.lx-sidebar {
  width: var(--lx-sidebar-width);
  background: var(--lx-sidebar-bg-gradient);
  border-right: 1px solid var(--lx-sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1020;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: width;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.12);
}

.lx-sidebar-brand {
  height: var(--lx-topbar-height);
  padding: 0 0.875rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.lx-brand-logo {
  display: flex;
  align-items: center;
  width: 100%;
  text-decoration: none;
}

/* Full Brand Logo (Full PNG display, completely transparent, crisp) */
.lx-brand-img-full,
.lx-brand-img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 48px;
  object-fit: contain;
  object-position: left center;
  background: transparent !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  transition: all var(--lx-transition-fast);
}

/* Company First Letter 'L' or Mini Logo Icon for Collapsed Menu & Mobile */
.lx-brand-icon-mini {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: var(--lx-radius-md);
  background: var(--lx-primary-gradient);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.35rem;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 153, 229, 0.4);
  border: 1px solid rgba(0, 153, 229, 0.35);
  flex-shrink: 0;
  line-height: 1;
  overflow: hidden;
}

.lx-brand-icon-mini.has-icon-img {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.lx-brand-icon-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: auto;
}

.lx-brand-fallback-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.lx-brand-badge {
  color: #38bdf8;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.lx-sidebar-menu {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem 0.75rem;
}

.lx-sidebar-menu::-webkit-scrollbar {
  width: 5px;
}

.lx-sidebar-menu::-webkit-scrollbar-track {
  background: transparent;
}

.lx-sidebar-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.lx-nav-section-title,
.menu-title {
  color: var(--lx-sidebar-heading, #7e8da6) !important;
  font-size: 0.6875rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  padding: 0.85rem 0.75rem 0.35rem !important;
  white-space: nowrap !important;
  pointer-events: none !important;
  user-select: none !important;
  list-style: none !important;
}

.lx-nav-list {
  list-style: none;
}

.lx-nav-item {
  position: relative;
  margin-bottom: 2px;
}

.lx-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  color: var(--lx-sidebar-text);
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: var(--lx-radius-md);
  transition: all var(--lx-transition-fast);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

.lx-nav-link:hover {
  color: var(--lx-sidebar-text-hover);
  background: var(--lx-sidebar-item-hover);
}

.lx-nav-item.active>.lx-nav-link {
  color: var(--lx-sidebar-text-active);
  background: var(--lx-sidebar-item-active);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--lx-sidebar-active-indicator);
}

.lx-nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity var(--lx-transition-fast);
}

.lx-nav-link:hover .lx-nav-icon,
.lx-nav-item.active>.lx-nav-link .lx-nav-icon {
  opacity: 1;
}

.lx-nav-title {
  flex: 1;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Prevent reflow/scroll flashes during sidebar expand/collapse transition */
body.lx-layout-transitioning .lx-sidebar,
body.lx-layout-transitioning .lx-sidebar-menu {
  overflow: hidden !important;
}

.lx-nav-arrow {
  margin-left: auto;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--lx-transition-fast);
  opacity: 0.6;
}

.lx-nav-item.open>.lx-nav-link .lx-nav-arrow {
  transform: rotate(90deg);
  opacity: 1;
}

/* Submenu */
.lx-submenu {
  list-style: none;
  background: var(--lx-sidebar-submenu-bg);
  border-radius: var(--lx-radius-md);
  margin: 4px 0 6px 0;
  padding: 4px 0;
  display: none;
}

.lx-nav-item.open>.lx-submenu {
  display: block;
}

.lx-submenu-link {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem 0.5rem 2.65rem;
  color: var(--lx-sidebar-text);
  font-size: 0.8125rem;
  border-radius: var(--lx-radius-sm);
  transition: all var(--lx-transition-fast);
  position: relative;
}

.lx-submenu-link::before {
  content: "";
  position: absolute;
  left: 1.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.3);
  transition: all var(--lx-transition-fast);
}

.lx-submenu-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.lx-submenu-link:hover::before,
.lx-submenu-item.active>.lx-submenu-link::before {
  background-color: var(--lx-accent);
  box-shadow: 0 0 6px var(--lx-accent);
}

.lx-submenu-item.active>.lx-submenu-link {
  color: #ffffff;
  font-weight: 600;
}

/* Level 2 with Level 3 Submenus */
.lx-submenu-item {
  position: relative;
}

.lx-sub-arrow {
  margin-left: auto;
  width: 12px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--lx-transition-fast);
  opacity: 0.6;
}

.lx-submenu-item.open>.lx-submenu-link .lx-sub-arrow {
  transform: rotate(90deg);
  opacity: 1;
}

/* Level 3 Submenu Container */
.lx-sub-submenu {
  list-style: none;
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--lx-radius-sm);
  margin: 3px 0 6px 1.5rem;
  padding: 4px 0;
  display: none;
  border-left: 2px solid rgba(56, 189, 248, 0.4);
}

.lx-submenu-item.open>.lx-sub-submenu {
  display: block;
}

.lx-sub-submenu-link {
  display: flex;
  align-items: center;
  padding: 0.45rem 0.85rem 0.45rem 1.25rem;
  color: #a8b3cf;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.35;
  border-radius: var(--lx-radius-xs);
  transition: all var(--lx-transition-fast);
  position: relative;
}

.lx-sub-submenu-link::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.3);
  transition: all var(--lx-transition-fast);
}

.lx-sub-submenu-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.lx-sub-submenu-link:hover::before,
.lx-sub-submenu-item.active>.lx-sub-submenu-link::before {
  background-color: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
}

.lx-sub-submenu-item.active>.lx-sub-submenu-link {
  color: #ffffff;
  font-weight: 600;
}

/* Sidebar Footer */
.lx-sidebar-footer {
  padding: 0.875rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lx-user-mini {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
}

.lx-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.lx-user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lx-user-name {
  color: #fff;
  font-weight: 600;
  font-size: 0.8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lx-user-role {
  color: var(--lx-sidebar-heading);
  font-size: 0.6875rem;
  white-space: nowrap;
}

/* ---------------- MAIN CONTENT WRAPPER ---------------- */
.lx-main {
  flex: 1;
  min-width: 0;
  width: calc(100% - var(--lx-sidebar-width));
  max-width: calc(100% - var(--lx-sidebar-width));
  margin-left: var(--lx-sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1), width 0.25s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: margin-left, width;
  background-color: var(--lx-bg-body);
}

body.sidebar-collapsed .lx-main {
  margin-left: var(--lx-sidebar-collapsed-width);
  width: calc(100% - var(--lx-sidebar-collapsed-width));
  max-width: calc(100% - var(--lx-sidebar-collapsed-width));
}

/* ---------------- FULLSCREEN KIOSK / EXPANDED WORKSPACE MODE ---------------- */
body.is-fullscreen-active .lx-sidebar,
body.is-fullscreen-active aside.lx-sidebar,
body.is-fullscreen-active .lx-topbar,
body.is-fullscreen-active #page-topbar,
body.is-fullscreen-active .footer,
body.is-fullscreen-active footer,
body.is-fullscreen-active .lx-backdrop {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.is-fullscreen-active #layout-wrapper,
body.is-fullscreen-active .lx-app {
  width: 100% !important;
  max-width: 100% !important;
}

body.is-fullscreen-active .lx-main,
body.is-fullscreen-active .main-content {
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 100% !important;
  transition: none !important;
}

body.is-fullscreen-active .lx-content {
  padding-bottom: 1.5rem !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* ---------------- TOPBAR (SOLID & ELEVATED) ---------------- */
.lx-topbar {
  height: var(--lx-topbar-height);
  background-color: #ffffff !important;
  background: #ffffff !important;
  border-bottom: 1px solid var(--lx-border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1025 !important;
  /* Always sits securely above all page content */
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lx-topbar-left,
.lx-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

/* Topbar Live Date & Time Widget */
.lx-header-datetime {
  display: inline-flex;
  align-items: center;
  background: var(--lx-bg-surface, #f8fafc);
  border: 1px solid var(--lx-border-color, #e2e8f0);
  border-radius: var(--lx-radius-md, 8px);
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--lx-text-secondary, #475569);
  line-height: 1.4;
  white-space: nowrap;
  user-select: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: all var(--lx-transition-fast, 0.15s ease);
}

.lx-header-datetime:hover {
  border-color: var(--lx-border-strong, #cbd5e1);
  background: #ffffff;
}

.lx-header-datetime .lx-date-part {
  display: inline-flex;
  align-items: center;
}

.lx-header-datetime .lx-time-part {
  display: inline-flex;
  align-items: center;
}

.lx-header-datetime .lx-time-text {
  font-weight: 600;
  color: var(--lx-text-main, #0f172a);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2px;
}

.lx-header-datetime .lx-divider {
  color: var(--lx-border-strong, #cbd5e1);
  margin: 0 0.5rem;
  user-select: none;
}

@media (max-width: 991.98px) {
  .lx-header-datetime .lx-day-name {
    display: none;
  }
}

@media (max-width: 640px) {
  .lx-header-datetime {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }

  .lx-header-datetime .lx-date-year {
    display: none;
  }

  .lx-header-datetime .lx-divider {
    margin: 0 0.35rem;
  }
}

@media (max-width: 440px) {
  .lx-header-datetime .lx-date-part,
  .lx-header-datetime .lx-divider {
    display: none;
  }
}

.lx-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--lx-radius-md);
  border: 1px solid var(--lx-border-color);
  background: var(--lx-bg-surface);
  color: var(--lx-text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--lx-transition-fast);
  position: relative;
}

.lx-icon-btn:hover {
  background: var(--lx-bg-hover);
  color: var(--lx-text-main);
  border-color: var(--lx-border-strong);
}

.lx-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.lx-search-input {
  width: 240px;
  height: 38px;
  padding: 0 2.25rem 0 2.25rem;
  border: 1px solid var(--lx-border-color);
  border-radius: var(--lx-radius-md);
  background: var(--lx-bg-muted);
  font-size: 0.8125rem;
  color: var(--lx-text-main);
  transition: all var(--lx-transition-fast);
}

.lx-search-input:focus {
  outline: none;
  width: 300px;
  background: #ffffff;
  border-color: var(--lx-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.lx-search-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--lx-text-muted);
  pointer-events: none;
}

.lx-kbd-hint {
  position: absolute;
  right: 0.625rem;
  background: var(--lx-bg-surface);
  border: 1px solid var(--lx-border-color);
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--lx-text-muted);
  padding: 1px 5px;
  pointer-events: none;
}

/* ---------------- CONTENT AREA ---------------- */
.lx-content {
  flex: 1;
  min-width: 0;
  padding: 0.875rem 1.25rem;
  position: relative;
  z-index: 1;
  /* Always below sticky topbar */
}

/* ---------------- OPTIMIZED ERP PAGE HEADER ---------------- */
.lx-page-header {
  background: var(--lx-bg-surface);
  border: 1px solid var(--lx-border-color);
  border-radius: var(--lx-radius-md);
  padding: 0.625rem 1rem;
  margin-bottom: 0.875rem;
  box-shadow: var(--lx-shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.lx-page-header-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

/* ---------------- STREAMLINED ERP BREADCRUMB TRAIL ---------------- */
.lx-breadcrumb-nav {
  display: flex;
  align-items: center;
  line-height: 1;
}

.lx-breadcrumb {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  list-style: none;
  font-size: var(--lx-font-size-xs);
  line-height: 1.2;
}

.lx-breadcrumb-item {
  display: inline-flex;
  align-items: center;
}

.lx-breadcrumb-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--lx-text-muted);
  font-weight: 500;
  font-size: var(--lx-font-size-xs);
  padding: 0;
  transition: color var(--lx-transition-fast);
}

.lx-breadcrumb-link:hover {
  color: var(--lx-accent);
  background: transparent;
}

.lx-breadcrumb-sep {
  display: inline-flex;
  align-items: center;
  color: var(--lx-text-light);
  opacity: 0.6;
  padding: 0 1px;
}

.lx-breadcrumb-sep svg {
  width: 9px;
  height: 9px;
}

.lx-breadcrumb-current {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  color: var(--lx-text-secondary);
  font-size: var(--lx-font-size-xs);
  padding: 0;
  background: transparent;
}

/* ---------------- COMPACT ERP TITLE ROW ---------------- */
.lx-page-title-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.lx-page-title-icon-box {
  width: 32px;
  height: 32px;
  border-radius: var(--lx-radius-sm);
  background: var(--lx-primary-light);
  color: var(--lx-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(23, 55, 103, 0.08);
}

.lx-page-title-icon-box svg {
  width: 17px !important;
  height: 17px !important;
}

.lx-page-title {
  font-size: var(--lx-font-size-xl);
  font-weight: 700;
  color: var(--lx-text-main);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.lx-page-subtitle {
  font-size: var(--lx-font-size-xs);
  color: var(--lx-text-muted);
  margin-top: 0.1rem;
  line-height: 1.25;
}

.lx-page-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lx-page-header-actions .lx-btn {
  padding: 0.35rem 0.75rem;
  font-size: var(--lx-font-size-sm);
  height: 32px;
  border-radius: var(--lx-radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.lx-page-header-actions .lx-btn svg {
  width: 13px;
  height: 13px;
}

/* Pulse animation dot for live status tags */
.lx-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--lx-success);
  margin-right: 5px;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7);
  animation: lxPulse 1.8s infinite;
}

@keyframes lxPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(5, 150, 105, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(5, 150, 105, 0);
  }
}

/* ---------------- FOOTER ---------------- */
.lx-footer {
  height: var(--lx-footer-height);
  background: var(--lx-footer-bg);
  border-top: 1px solid var(--lx-footer-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  font-size: 0.75rem;
  color: var(--lx-text-muted);
}

/* ==========================================================================
   COMPONENT STYLES
   ========================================================================== */

/* ---------------- CARDS ---------------- */
.lx-card {
  background: var(--lx-bg-surface);
  border: 1px solid var(--lx-border-color);
  border-radius: var(--lx-radius-lg);
  box-shadow: var(--lx-shadow-card);
  margin-bottom: 1.5rem;
  transition: box-shadow var(--lx-transition-fast), border-color var(--lx-transition-fast);
}

.lx-card:hover {
  box-shadow: var(--lx-shadow-md);
  border-color: rgba(37, 99, 235, 0.2);
}

.lx-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--lx-border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: transparent;
}

.lx-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--lx-text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lx-card-body {
  padding: 1.25rem;
}

.lx-card-footer {
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--lx-border-color);
  background: var(--lx-bg-muted);
  border-bottom-left-radius: var(--lx-radius-lg);
  border-bottom-right-radius: var(--lx-radius-lg);
}

/* ---------------- STAT CARDS / KPIS ---------------- */
.lx-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.lx-stat-card {
  background: var(--lx-bg-surface);
  border: 1px solid var(--lx-border-color);
  border-radius: var(--lx-radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  box-shadow: var(--lx-shadow-card);
  transition: transform var(--lx-transition-fast), box-shadow var(--lx-transition-fast);
}

.lx-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--lx-shadow-lg);
}

.lx-stat-info {
  display: flex;
  flex-direction: column;
}

.lx-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--lx-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.35rem;
}

.lx-stat-value {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--lx-text-main);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.lx-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--lx-radius-pill);
  width: fit-content;
}

.lx-stat-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: var(--lx-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------------- BUTTONS ---------------- */
.lx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--lx-radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--lx-transition-fast);
  white-space: nowrap;
}

.lx-btn-primary {
  background: var(--lx-primary-gradient);
  color: #ffffff;
  border-color: var(--lx-primary);
  box-shadow: 0 2px 4px rgba(23, 55, 103, 0.25);
}

.lx-btn-primary:hover {
  background: linear-gradient(135deg, #102648 0%, #1d4ed8 100%);
  color: #ffffff;
  box-shadow: 0 4px 8px rgba(23, 55, 103, 0.35);
}

.lx-btn-secondary {
  background: var(--lx-bg-surface);
  color: var(--lx-text-secondary);
  border-color: var(--lx-border-color);
}

.lx-btn-secondary:hover {
  background: var(--lx-bg-hover);
  color: var(--lx-text-main);
  border-color: var(--lx-border-strong);
}

.lx-btn-success {
  background: var(--lx-success);
  color: #ffffff;
}

.lx-btn-success:hover {
  background: var(--lx-success-hover);
}

.lx-btn-danger {
  background: var(--lx-danger);
  color: #ffffff;
}

.lx-btn-danger:hover {
  background: var(--lx-danger-hover);
}

.lx-btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
}

/* ---------------- BADGES ---------------- */
.lx-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: var(--lx-radius-sm);
  line-height: 1.2;
}

.lx-badge-primary {
  background: var(--lx-primary-light);
  color: var(--lx-primary);
}

.lx-badge-success {
  background: var(--lx-success-bg);
  color: var(--lx-success);
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.lx-badge-warning {
  background: var(--lx-warning-bg);
  color: var(--lx-warning);
  border: 1px solid rgba(217, 119, 6, 0.2);
}

.lx-badge-danger {
  background: var(--lx-danger-bg);
  color: var(--lx-danger);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.lx-badge-info {
  background: var(--lx-info-light);
  color: var(--lx-info);
  border: 1px solid rgba(2, 132, 199, 0.2);
}

.lx-badge-pill {
  border-radius: var(--lx-radius-pill);
}

/* ---------------- TABLES ---------------- */
.lx-table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.lx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  text-align: left;
}

.lx-table thead th {
  background: #f8fafc;
  color: var(--lx-text-secondary);
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--lx-border-color);
  white-space: nowrap;
}

.lx-table tbody td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--lx-border-subtle);
  color: var(--lx-text-main);
  vertical-align: middle;
}

.lx-table tbody tr:hover {
  background-color: #f8fafc;
}

/* ---------------- FORMS ---------------- */
.lx-form-group {
  margin-bottom: 1rem;
}

.lx-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--lx-text-secondary);
  margin-bottom: 0.35rem;
}

.lx-input,
.lx-select,
.lx-textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  border: 1px solid var(--lx-border-color);
  border-radius: var(--lx-radius-md);
  background-color: var(--lx-bg-surface);
  color: var(--lx-text-main);
  transition: all var(--lx-transition-fast);
}

.lx-input:focus,
.lx-select:focus,
.lx-textarea:focus {
  outline: none;
  border-color: var(--lx-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ---------------- DROPDOWNS ---------------- */
.lx-dropdown {
  position: relative;
  display: inline-block;
}

.lx-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: var(--lx-bg-surface);
  border: 1px solid var(--lx-border-color);
  border-radius: var(--lx-radius-lg);
  box-shadow: var(--lx-shadow-dropdown);
  padding: 0.5rem 0;
  z-index: 1050;
  display: none !important;
  animation: lxFadeIn 0.12s ease-out;
}

.lx-dropdown.show>.lx-dropdown-menu,
.dropdown.show>.lx-dropdown-menu,
.dropdown.show>.dropdown-menu,
.dropdown-menu.show {
  display: block !important;
}

.lx-dropdown.show>.lx-dropdown-menu.lx-noti-panel,
.lx-dropdown.show>.noti-dropdown-panel,
.dropdown.show>.noti-dropdown-panel,
.noti-dropdown-panel.show {
  display: flex !important;
}

.lx-icon-btn.dropdown-toggle::after,
#page-header-user-dropdown::after,
#page-header-notifications-dropdown::after {
  display: none !important;
}

.lx-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  color: var(--lx-text-secondary);
  transition: all var(--lx-transition-fast);
  cursor: pointer;
}

.lx-dropdown-item:hover {
  background: var(--lx-bg-hover);
  color: var(--lx-text-main);
}

.lx-dropdown-divider {
  height: 1px;
  background: var(--lx-border-color);
  margin: 0.35rem 0;
}

/* ---------------- NOTIFICATION PANEL ---------------- */
.lx-noti-panel {
  width: 340px;
  max-height: 440px;
  display: none !important;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.lx-noti-header {
  padding: 0.75rem 1rem;
  background: var(--lx-primary-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top-left-radius: calc(var(--lx-radius-lg) - 1px);
  border-top-right-radius: calc(var(--lx-radius-lg) - 1px);
}

.lx-noti-list {
  overflow-y: auto;
  max-height: 280px;
}

.lx-noti-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--lx-border-subtle);
  display: flex;
  gap: 0.75rem;
  transition: background var(--lx-transition-fast);
}

.lx-noti-item:hover {
  background: var(--lx-bg-muted);
}

.lx-noti-unread {
  background: #f0f7ff;
}

.lx-noti-content h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--lx-text-main);
}

.lx-noti-content p {
  font-size: 0.75rem;
  color: var(--lx-text-muted);
  margin-top: 2px;
}

.lx-noti-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--lx-danger);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------------- BACKDROP FOR MOBILE & MODALS ---------------- */
.lx-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  z-index: 1015;
  opacity: 0;
  visibility: hidden;
  display: none;
  pointer-events: none;
  transition: all var(--lx-transition-normal);
}

.lx-backdrop.show {
  opacity: 1;
  visibility: visible;
  display: block;
  pointer-events: auto;
}

@keyframes lxFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ==========================================================================
   DATATABLES - MODERN THEME INTEGRATION
   ========================================================================== */
.dataTables_wrapper {
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 0.8125rem;
  color: var(--lx-text-main);
}

.dataTables_wrapper .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

/* Top Controls (PageSize & Search Filter) */
div.dataTables_wrapper>.row:first-child,
div.dataTables_wrapper>div.dataTables_length,
div.dataTables_wrapper>div.dataTables_filter,
div.dt-container .dt-layout-row:first-child {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-top: 0 !important;
  margin-bottom: 1.15rem !important;
  /* Generous clearance from table header */
  padding-bottom: 0.35rem !important;
}

.dataTables_length,
div.dataTables_wrapper div.dataTables_length,
div.dt-container .dt-length {
  display: inline-flex !important;
  align-items: center !important;
  float: none !important;
  margin-bottom: 0.25rem !important;
}

.dataTables_length label,
div.dataTables_wrapper div.dataTables_length label,
div.dt-container .dt-length label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  color: var(--lx-text-secondary) !important;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  margin-bottom: 0 !important;
  white-space: nowrap !important;
  width: auto !important;
}

/* Standardize PageSize Dropdown Width & Position */
.dataTables_length select,
.dataTables_length select.form-select,
.dataTables_length select.custom-select,
.dataTables_length select.form-control,
div.dataTables_wrapper div.dataTables_length select,
div.dt-container .dt-length select {
  display: inline-block !important;
  width: 76px !important;
  min-width: 76px !important;
  max-width: 82px !important;
  height: 33px !important;
  padding: 0.25rem 1.6rem 0.25rem 0.65rem !important;
  margin: 0 0.35rem !important;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  border: 1px solid var(--lx-border-color) !important;
  border-radius: var(--lx-radius-md) !important;
  background-color: var(--lx-bg-surface) !important;
  color: var(--lx-text-main) !important;
  outline: none !important;
  vertical-align: middle !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  flex: 0 0 76px !important;
}

/* Clearance above table header so controls NEVER touch table */
div.dataTables_wrapper .dataTables_scroll,
div.dataTables_wrapper>table.dataTable,
div.dataTables_wrapper>.table-responsive,
div.dt-container .dt-layout-table {
  margin-top: 0.85rem !important;
}

/* Prevent Bootstrap .table-responsive from creating competing scroll contexts around DataTables scroll */
.table-responsive:has(.dataTables_scroll),
.table-responsive:has(.dt-scroll),
.table-responsive>.dataTables_wrapper {
  overflow: visible !important;
}

/* DataTables Scroll Alignment, Fluid Sizing & Zoom Responsiveness */
div.dataTables_wrapper,
div.dt-container,
div.dataTables_scroll,
div.dt-scroll,
div.dataTables_scrollHead,
div.dt-scroll-head,
div.dataTables_scrollBody,
div.dt-scroll-body {
  width: 100% !important;
  max-width: 100%;
  clear: both;
}

div.dataTables_scrollHeadInner,
div.dt-scroll-headInner {
  box-sizing: content-box !important;
  min-width: 100%;
}

div.dataTables_scrollHeadInner>table.dataTable,
div.dt-scroll-headInner>table.dataTable,
div.dataTables_scrollBody>table.dataTable,
div.dt-scroll-body>table.dataTable {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  min-width: 100%;
}

div.dataTables_scrollHeadInner table.dataTable {
  border-bottom: none !important;
}

div.dataTables_scrollBody table.dataTable {
  border-top: none !important;
}

/* The dummy measurement thead in dt-scroll-body MUST participate in layout for column sizing, but be visually zero-height and invisible */
div.dataTables_scrollBody table.dataTable>thead,
div.dt-scroll-body table.dataTable>thead,
div.dataTables_scrollBody>table>thead,
div.dt-scroll-body>table>thead {
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  border: none !important;
  background: transparent !important;
}

div.dataTables_scrollBody table.dataTable>thead>tr,
div.dt-scroll-body table.dataTable>thead>tr,
div.dataTables_scrollBody>table>thead>tr,
div.dt-scroll-body>table>thead>tr {
  height: 0 !important;
  max-height: 0 !important;
  border: none !important;
  background: transparent !important;
}

div.dataTables_scrollBody table.dataTable>thead>tr>th,
div.dataTables_scrollBody table.dataTable>thead>tr>td,
div.dt-scroll-body table.dataTable>thead>tr>th,
div.dt-scroll-body table.dataTable>thead>tr>td,
div.dataTables_scrollBody>table>thead>tr>th,
div.dataTables_scrollBody>table>thead>tr>td,
div.dt-scroll-body>table>thead>tr>th,
div.dt-scroll-body>table>thead>tr>td {
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-top-width: 0 !important;
  border-bottom-width: 0 !important;
  border-top-style: none !important;
  border-bottom-style: none !important;
  background-color: transparent !important;
  background: transparent !important;
  color: transparent !important;
  line-height: 0 !important;
  font-size: 0 !important;
  visibility: hidden !important;
}

div.dataTables_scrollBody table.dataTable>thead>tr>th div.dataTables_sizing,
div.dataTables_scrollBody table.dataTable>thead>tr>td div.dataTables_sizing,
div.dt-scroll-body table.dataTable>thead>tr>th div.dt-scroll-sizing,
div.dt-scroll-body table.dataTable>thead>tr>td div.dt-scroll-sizing {
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  visibility: hidden !important;
}

/* Minimal, compact ERP table cell padding & clean borders */
table.dataTable tbody td,
table.dataTable tbody th,
.table tbody td,
.table tbody th {
  padding: 0px 8px !important;
  font-size: 12px;
  line-height: 1.4;
  vertical-align: middle !important;
}

table.dataTable,
table.table {
  border-collapse: collapse !important;
}

table.dataTable>tbody>tr>td,
table.dataTable>tbody>tr>th,
div.dataTables_scrollBody table.dataTable>tbody>tr>td,
div.dataTables_scrollBody table.dataTable>tbody>tr>th,
div.dt-scroll-body table.dataTable>tbody>tr>td,
div.dt-scroll-body table.dataTable>tbody>tr>th {
  border: 1px solid #e2e8f0 !important;
}

div.dataTables_scrollHead table.dataTable>thead>tr>th,
div.dataTables_scrollHead table.dataTable>thead>tr>td,
div.dataTables_scrollHeadInner table.dataTable>thead>tr>th,
div.dt-scroll-head table.dataTable>thead>tr>th,
div.dt-scroll-headInner table.dataTable>thead>tr>th,
table.dataTable:not(.dataTables_scrollBody table):not(.dt-scroll-body table)>thead>tr>th,
table.dataTable:not(.dataTables_scrollBody table):not(.dt-scroll-body table)>thead>tr>td {
  border: 1px solid #556781 !important;
  background-color: #455771 !important;
  color: #f9f9f9 !important;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px !important;
  vertical-align: middle !important;
}

.dataTables_filter {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 0 !important;
}

.dataTables_filter label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--lx-text-secondary);
  font-weight: 500;
  margin-bottom: 0;
}

.dataTables_filter input {
  padding: 0.35rem 0.75rem;
  height: 33px;
  font-size: 0.8125rem;
  border: 1px solid var(--lx-border-color);
  border-radius: var(--lx-radius-md);
  background: var(--lx-bg-surface);
  color: var(--lx-text-main);
  outline: none;
  min-width: 200px;
  transition: all var(--lx-transition-fast);
}

.dataTables_filter input:focus {
  border-color: var(--lx-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ==========================================================================
   DATATABLES NUMERIC OVERRIDE
   Disable automatic right-alignment for dt-type-numeric / dt-type-date / dt-right.
   Only explicit .text-end / .text-right will align to right.
   ========================================================================== */
table.dataTable th.dt-type-numeric:not(.text-end):not(.text-right):not(.dt-head-right),
table.dataTable td.dt-type-numeric:not(.text-end):not(.text-right):not(.dt-body-right),
table.dataTable th.dt-type-date:not(.text-end):not(.text-right):not(.dt-head-right),
table.dataTable td.dt-type-date:not(.text-end):not(.text-right):not(.dt-body-right),
table.dataTable th.dt-right:not(.text-end):not(.text-right):not(.dt-head-right),
table.dataTable td.dt-right:not(.text-end):not(.text-right):not(.dt-body-right) {
  text-align: left !important;
}

table.dataTable th.text-end,
table.dataTable th.text-right,
table.dataTable td.text-end,
table.dataTable td.text-right,
table.dataTable th.dt-head-right,
table.dataTable td.dt-body-right {
  text-align: right !important;
}

table.dataTable th.text-center,
table.dataTable td.text-center,
table.dataTable th.dt-head-center,
table.dataTable td.dt-body-center {
  text-align: center !important;
}

/* ==========================================================================
   DATATABLES BOTTOM CONTROLS (INFO & PAGINATION)
   Vertically middle-aligned with info on left, pagination on right, and no button gaps.
   ========================================================================== */
div.dataTables_wrapper>.row:last-child,
div.dataTables_wrapper>.row:last-of-type,
div.dt-container .dt-layout-row:last-child {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 0.75rem !important;
  margin-top: 0.85rem !important;
  margin-bottom: 0 !important;
  padding-top: 0.65rem !important;
  border-top: 1px solid var(--lx-border-color) !important;
}

div.dataTables_wrapper .row:last-child>[class*="col-"],
div.dt-container .dt-layout-row:last-child>[class*="dt-layout-"] {
  display: flex !important;
  align-items: center !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.dataTables_info,
div.dataTables_wrapper div.dataTables_info,
div.dt-container .dt-info {
  color: var(--lx-text-muted) !important;
  font-size: 0.8125rem !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

.dataTables_paginate,
div.dataTables_wrapper div.dataTables_paginate,
.dataTables_wrapper .dataTables_paginate,
div.dt-container .dt-paging {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  text-align: right !important;
  float: right !important;
  margin: 0 !important;
  margin-left: auto !important;
  padding: 0 !important;
  line-height: 1 !important;
}

/* Pagination List - NO gaps between buttons, joined contiguous group */
.dataTables_paginate .pagination,
div.dataTables_wrapper div.dataTables_paginate ul.pagination,
.dataTables_wrapper .dataTables_paginate .pagination,
div.dt-container .dt-paging ul.pagination {
  display: inline-flex !important;
  align-items: center !important;
  list-style: none !important;
  gap: 0 !important;
  /* NO gap between buttons */
  margin: 0 !important;
  margin-left: auto !important;
  padding: 0 !important;
  border-radius: var(--lx-radius-md) !important;
}

/* Ensure parent grid columns align pagination to the right */
div.dataTables_wrapper .row>[class*="col-"]:has(.dataTables_paginate),
div.dataTables_wrapper .row>div:nth-child(2):has(.dataTables_paginate),
div.dataTables_wrapper .row>.col-md-7:has(.dataTables_paginate),
div.dataTables_wrapper .row>.col-sm-12:has(.dataTables_paginate) {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  text-align: right !important;
}

.dataTables_paginate .page-item,
div.dataTables_wrapper div.dataTables_paginate .page-item,
div.dt-container .dt-paging .page-item {
  margin: 0 !important;
  padding: 0 !important;
}

.dataTables_paginate .page-item .page-link,
div.dataTables_wrapper div.dataTables_paginate .page-item .page-link,
div.dt-container .dt-paging .page-item .page-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 32px !important;
  height: 32px !important;
  padding: 0 0.65rem !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  border-radius: 0 !important;
  /* Connected edges */
  border: 1px solid var(--lx-border-color) !important;
  margin-left: -1px !important;
  /* Shared border line */
  background: var(--lx-bg-surface) !important;
  color: var(--lx-text-secondary) !important;
  text-decoration: none !important;
  transition: all var(--lx-transition-fast) !important;
  line-height: 1 !important;
}

/* Rounded outer corners for first and last pagination buttons */
div.dataTables_wrapper div.dataTables_paginate .page-item:first-child .page-link,
div.dt-container .dt-paging .page-item:first-child .page-link {
  margin-left: 0 !important;
  border-top-left-radius: var(--lx-radius-md) !important;
  border-bottom-left-radius: var(--lx-radius-md) !important;
}

div.dataTables_wrapper div.dataTables_paginate .page-item:last-child .page-link,
div.dt-container .dt-paging .page-item:last-child .page-link {
  border-top-right-radius: var(--lx-radius-md) !important;
  border-bottom-right-radius: var(--lx-radius-md) !important;
}

.dataTables_paginate .page-item .page-link:hover,
div.dataTables_wrapper div.dataTables_paginate .page-item:hover:not(.active):not(.disabled) .page-link {
  background: var(--lx-bg-hover) !important;
  color: var(--lx-text-main) !important;
  border-color: var(--lx-border-strong) !important;
  z-index: 2 !important;
}

/* Active / Selected Pagination Button Highlight */
.dataTables_paginate .page-item.active .page-link,
div.dataTables_wrapper div.dataTables_paginate .page-item.active .page-link,
div.dataTables_wrapper div.dataTables_paginate .paginate_button.active .page-link,
div.dataTables_wrapper div.dataTables_paginate .paginate_button.active a,
div.dataTables_wrapper div.dataTables_paginate li.active a,
div.dataTables_wrapper div.dataTables_paginate li.active .page-link,
div.dataTables_wrapper div.dataTables_paginate .paginate_button.current,
div.dataTables_wrapper div.dataTables_paginate a.current,
.dataTables_paginate .paginate_button.current,
.paginate_button.current,
div.dt-container .dt-paging .page-item.active .page-link,
.pagination .page-item.active .page-link,
.pagination .active>.page-link,
.pagination .active>a {
  background-color: #2563eb !important;
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4) !important;
  z-index: 5 !important;
}

.dataTables_paginate .page-item.disabled .page-link,
div.dataTables_wrapper div.dataTables_paginate .page-item.disabled .page-link {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* DataTables Sorting Arrows */
table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
  cursor: pointer;
  position: relative;
  padding-right: 1.5rem !important;
}

table.dataTable thead th.sorting::after {
  content: "↕";
  position: absolute;
  right: 0.6rem;
  opacity: 0.35;
  font-size: 0.75rem;
}

table.dataTable thead th.sorting_asc::after {
  content: "▲";
  position: absolute;
  right: 0.6rem;
  opacity: 0.9;
  color: var(--lx-accent);
  font-size: 0.65rem;
}

table.dataTable thead th.sorting_desc::after {
  content: "▼";
  position: absolute;
  right: 0.6rem;
  opacity: 0.9;
  color: var(--lx-accent);
  font-size: 0.65rem;
}

/* DataTables Export Buttons */
.dt-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.dt-buttons .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--lx-radius-md);
  border: 1px solid var(--lx-border-color);
  background: var(--lx-bg-surface);
  color: var(--lx-text-secondary);
  cursor: pointer;
  transition: all var(--lx-transition-fast);
}

.dt-buttons .btn:hover {
  background: var(--lx-bg-hover);
  color: var(--lx-text-main);
  border-color: var(--lx-border-strong);
}

/* ---------------- STICKY ERP FOOTER (AUTO-ALIGNED WITH SIDEBAR) ---------------- */
footer.footer,
.lx-footer {
  position: fixed !important;
  bottom: 0 !important;
  right: 0 !important;
  left: var(--lx-sidebar-width);
  height: var(--lx-footer-height);
  background: #ffffff !important;
  border-top: 1px solid var(--lx-border-color);
  z-index: 99 !important;
  display: flex;
  align-items: center;
  transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: left;
  font-size: var(--lx-font-size-xs);
  color: var(--lx-text-muted);
  box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.04);
}

body.sidebar-collapsed footer.footer,
body.sidebar-collapsed .lx-footer {
  left: var(--lx-sidebar-collapsed-width);
}

@media (max-width: 768px) {

  footer.footer,
  .lx-footer {
    left: 0 !important;
  }
}

footer.footer .container-fluid,
.lx-footer .container-fluid {
  width: 100%;
  padding: 0 1.25rem;
}

footer.footer .row,
.lx-footer .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
}

footer.footer .text-sm-right,
footer.footer .text-sm-end,
.lx-footer .text-sm-right,
.lx-footer .text-sm-end {
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Ensure content body does not get obscured by sticky fixed footer */
.lx-content {
  padding-bottom: calc(var(--lx-footer-height) + 1.5rem) !important;
}

/* ---------------- COLLAPSED SIDEBAR BRAND ADAPTATION ---------------- */
body.sidebar-collapsed .lx-sidebar-brand {
  justify-content: center !important;
  padding: 0 !important;
}

body.sidebar-collapsed .lx-brand-logo {
  justify-content: center !important;
  width: auto !important;
}

body.sidebar-collapsed .lx-brand-img-full,
body.sidebar-collapsed .lx-brand-img {
  display: none !important;
}

body.sidebar-collapsed .lx-brand-icon-mini {
  display: flex !important;
}

/* ==========================================================================
   ERP ENTERPRISE COMPATIBILITY & DESIGN BRIDGE (BS4 -> BS5)
   ========================================================================== */

/* ---------------- 1. CARDS & DASHBOARD WIDGETS ---------------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: var(--lx-bg-surface, #ffffff);
  background-clip: border-box;
  border: 1px solid var(--lx-border-color, #e2e8f0);
  border-radius: var(--lx-radius-lg, 10px);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  margin-bottom: 1.25rem;
  transition: box-shadow var(--lx-transition-fast), border-color var(--lx-transition-fast);
}

.card:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.card-body {
  flex: 1 1 auto;
  padding: 1.15rem 1.25rem;
}

.card-title {
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--lx-text-main, #0f172a);
}

.card-header {
  padding: 0.875rem 1.25rem;
  margin-bottom: 0;
  background-color: transparent;
  border-bottom: 1px solid var(--lx-border-color, #e2e8f0);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--lx-text-main, #0f172a);
}

.card-footer {
  padding: 0.75rem 1.25rem;
  background-color: var(--lx-bg-muted, #f8fafc);
  border-top: 1px solid var(--lx-border-color, #e2e8f0);
  border-bottom-right-radius: calc(var(--lx-radius-lg, 10px) - 1px);
  border-bottom-left-radius: calc(var(--lx-radius-lg, 10px) - 1px);
}

/* Media Object (BS4 Flex Alignment) */
.media {
  display: flex;
  align-items: flex-start;
}

.media-body {
  flex: 1;
}

/* Dashboard Icon Sizing & Avatars */
.iconfontsize {
  font-size: 32px;
  line-height: 1;
}

.avatar-xs {
  height: 1.5rem;
  width: 1.5rem;
}

.avatar-sm {
  height: 2rem;
  width: 2rem;
}

.avatar-md {
  height: 3rem;
  width: 3rem;
}

.avatar-lg {
  height: 4.5rem;
  width: 4.5rem;
}

.avatar-xl {
  height: 6rem;
  width: 6rem;
}

.avatar-title {
  align-items: center;
  background-color: var(--lx-primary, #0b2545);
  color: #ffffff;
  display: flex;
  font-weight: 600;
  height: 100%;
  justify-content: center;
  width: 100%;
  border-radius: inherit;
}

/* ---------------- 2. PAGE TITLE & BREADCRUMBS STANDARDIZATION (Home/Index Aesthetic) ---------------- */
.page-title-box {
  padding: 0.6rem 0 0.85rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.page-title-box .page-title-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}

.page-title-box h4,
.page-title-box .page-title,
#global-page-title {
  display: flex !important;
  align-items: center !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  text-transform: none !important;
  margin: 0 !important;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

/* Home/Index style vertical accent pill bar */
.page-title-box h4::before,
.page-title-box .page-title::before,
#global-page-title::before {
  content: "" !important;
  display: inline-block !important;
  width: 4px !important;
  height: 22px !important;
  background: var(--lx-accent, #0099e5) !important;
  border-radius: 2px !important;
  margin-right: 8px !important;
  flex-shrink: 0 !important;
}

/* Align breadcrumb cleanly under title text (indented 12px past the 4px bar + 8px gap) */
.page-title-box .breadcrumb,
.dynamic-breadcrumb-list,
#global-breadcrumb {
  background-color: transparent !important;
  background: transparent !important;
  padding: 0 !important;
  padding-left: 12px !important;
  margin: 0 !important;
  margin-top: 3px !important;
  font-size: 0.78125rem !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 0.15rem;
  list-style: none;
}

.page-title-box .breadcrumb-item,
.dynamic-breadcrumb-list .breadcrumb-item,
#global-breadcrumb .breadcrumb-item {
  font-size: 0.78125rem !important;
  font-weight: 500 !important;
  color: var(--lx-text-muted, #64748b) !important;
  display: inline-flex !important;
  align-items: center !important;
}

.page-title-box .breadcrumb-item a,
.dynamic-breadcrumb-list .breadcrumb-item a,
#global-breadcrumb .breadcrumb-item a {
  color: var(--lx-primary, #0099e5) !important;
  text-decoration: none !important;
  transition: color 0.15s ease;
  display: inline-flex;
  align-items: center;
}

.page-title-box .breadcrumb-item a:hover,
.dynamic-breadcrumb-list .breadcrumb-item a:hover,
#global-breadcrumb .breadcrumb-item a:hover {
  color: #0077b6 !important;
  text-decoration: underline !important;
}

.page-title-box .breadcrumb-item.active,
.dynamic-breadcrumb-list .breadcrumb-item.active,
#global-breadcrumb .breadcrumb-item.active {
  color: var(--lx-text-main, #334155) !important;
  font-weight: 600 !important;
}

.page-title-box .breadcrumb-item+.breadcrumb-item::before,
.dynamic-breadcrumb-list .breadcrumb-item+.breadcrumb-item::before,
#global-breadcrumb .breadcrumb-item+.breadcrumb-item::before {
  content: "›" !important;
  font-size: 0.95rem !important;
  line-height: 1;
  color: #94a3b8 !important;
  padding: 0 0.35rem !important;
  float: none !important;
}

#global-breadcrumb-wrapper {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0.35rem 0.25rem 0.5rem 0.25rem !important;
  margin-bottom: 0.5rem !important;
  box-shadow: none !important;
}

/* ---------------- 3. FORM CONTROLS & SELECT STYLES ---------------- */
.form-control,
input.form-control,
textarea.form-control {
  font-size: 0.8125rem;
  height: auto;
  min-height: 34px;
  padding: 0.38rem 0.65rem;
  border: 1px solid var(--lx-border-color, #cbd5e1);  
  background-color: #ffffff;
  color: var(--lx-text-main, #0f172a);
  transition: border-color var(--lx-transition-fast), box-shadow var(--lx-transition-fast);
}

.form-control:focus {
  border-color: var(--lx-accent, #0099e5);
  box-shadow: 0 0 0 3px rgba(0, 153, 229, 0.15);
  outline: 0;
  background-color: #ffffff;
  color: var(--lx-text-main, #0f172a);
}

.form-control-sm,
select.form-control-sm,
.custom-select-sm,
select.custom-select-sm {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0.18rem 0.5rem !important;
  font-size: 0.75rem !important;
  border-radius: 4px !important;
}

.form-control-lg {
  min-height: 42px;
  font-size: 0.95rem;
  border-radius: 8px;
}

/* Custom-Select & Form-Select Full Compatibility */
select.form-control,
.custom-select,
select.custom-select,
.form-select {
  display: block;
  width: 100%;
  min-height: 34px;
  padding: 0.38rem 2rem 0.38rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--lx-text-main, #0f172a);
  vertical-align: middle;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 14px 10px;
  border: 1px solid var(--lx-border-color, #cbd5e1);
  border-radius: var(--lx-radius-md, 6px);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

select.form-control:focus,
.custom-select:focus,
select.custom-select:focus,
.form-select:focus {
  border-color: var(--lx-accent, #0099e5);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(0, 153, 229, 0.15);
}

select[multiple].form-control,
select[multiple].custom-select {
  padding-right: 0.65rem;
  background-image: none;
}

/* Form Group & Grid */
.form-group {
  margin-bottom: 0.875rem;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -5px;
  margin-left: -5px;
}

.form-row>.col,
.form-row>[class*="col-"] {
  padding-right: 5px;
  padding-left: 5px;
}

.col-form-label {
  padding-top: calc(0.375rem + 1px);
  padding-bottom: calc(0.375rem + 1px);
  margin-bottom: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--lx-text-secondary, #475569);
}

.col-form-label-sm {
  padding-top: calc(0.25rem + 1px);
  padding-bottom: calc(0.25rem + 1px);
  font-size: 0.75rem;
}

/* Input group addon styles */
.input-group {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
}

.input-group-append,
.input-group-prepend {
  display: flex;
}

.input-group-append .btn,
.input-group-prepend .btn,
.input-group-text {
  display: flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--lx-text-secondary, #475569);
  text-align: center;
  white-space: nowrap;
  background-color: var(--lx-bg-muted, #f1f5f9);
  border: 1px solid var(--lx-border-color, #cbd5e1);
}

.input-group-prepend .btn,
.input-group-prepend .input-group-text {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-group-append .btn,
.input-group-append .input-group-text {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* ---------------- 4. UTILITIES & BS4 CLASS PARITY ---------------- */
.font-size-10 {
  font-size: 10px !important;
}

.font-size-11 {
  font-size: 11px !important;
}

.font-size-12 {
  font-size: 12px !important;
}

.font-size-13 {
  font-size: 13px !important;
}

.font-size-14 {
  font-size: 14px !important;
}

.font-size-15 {
  font-size: 15px !important;
}

.font-size-16 {
  font-size: 16px !important;
}

.font-size-18 {
  font-size: 18px !important;
}

.font-size-20 {
  font-size: 20px !important;
}

.font-size-22 {
  font-size: 22px !important;
}

.font-size-24 {
  font-size: 24px !important;
}

.font-size-32 {
  font-size: 32px !important;
}

.mr-0 {
  margin-right: 0 !important;
}

.mr-1 {
  margin-right: 0.25rem !important;
}

.mr-2 {
  margin-right: 0.5rem !important;
}

.mr-3 {
  margin-right: 1rem !important;
}

.mr-4 {
  margin-right: 1.5rem !important;
}

.mr-5 {
  margin-right: 3rem !important;
}

.ml-0 {
  margin-left: 0 !important;
}

.ml-1 {
  margin-left: 0.25rem !important;
}

.ml-2 {
  margin-left: 0.5rem !important;
}

.ml-3 {
  margin-left: 1rem !important;
}

.ml-4 {
  margin-left: 1.5rem !important;
}

.ml-5 {
  margin-left: 3rem !important;
}

.pr-0 {
  padding-right: 0 !important;
}

.pr-1 {
  padding-right: 0.25rem !important;
}

.pr-2 {
  padding-right: 0.5rem !important;
}

.pr-3 {
  padding-right: 1rem !important;
}

.pr-4 {
  padding-right: 1.5rem !important;
}

.pr-5 {
  padding-right: 3rem !important;
}

.pl-0 {
  padding-left: 0 !important;
}

.pl-1 {
  padding-left: 0.25rem !important;
}

.pl-2 {
  padding-left: 0.5rem !important;
}

.pl-3 {
  padding-left: 1rem !important;
}

.pl-4 {
  padding-left: 1.5rem !important;
}

.pl-5 {
  padding-left: 3rem !important;
}

.float-right {
  float: right !important;
}

.float-left {
  float: left !important;
}

.text-right,
.text-sm-right {
  text-align: right !important;
}

.bg-soft-primary {
  background-color: rgba(11, 37, 69, 0.12) !important;
  color: #0b2545 !important;
}

.bg-soft-success {
  background-color: rgba(5, 150, 105, 0.12) !important;
  color: #059669 !important;
}

.bg-soft-danger {
  background-color: rgba(225, 29, 72, 0.12) !important;
  color: #e11d48 !important;
}

.bg-soft-warning {
  background-color: rgba(217, 119, 6, 0.12) !important;
  color: #d97706 !important;
}

.bg-soft-info {
  background-color: rgba(0, 153, 229, 0.12) !important;
  color: #0099e5 !important;
}

.badge-pill {
  border-radius: 9999px !important;
}

.badge-warning {
  background-color: #f59e0b;
  color: #1e293b;
}

.badge-danger {
  background-color: #ef4444;
  color: #ffffff;
}

.badge-success {
  background-color: #10b981;
  color: #ffffff;
}

.badge-info {
  background-color: #0099e5;
  color: #ffffff;
}

.badge-primary {
  background-color: #0b2545;
  color: #ffffff;
}

/* ---------------- 5. TABS & TAB-PANES COMPATIBILITY ---------------- */
.nav-tabs-custom {
  border-bottom: 2px solid var(--lx-border-color, #e2e8f0);
}

.nav-tabs-custom .nav-item {
  position: relative;
  color: var(--lx-text-secondary, #64748b);
}

.nav-tabs-custom .nav-item .nav-link {
  border: none;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--lx-text-secondary, #64748b);
  padding: 0.625rem 1.25rem;
  background: transparent;
  border-radius: 0;
  transition: all var(--lx-transition-fast);
  cursor: pointer;
}

.nav-tabs-custom .nav-item .nav-link.active {
  color: var(--lx-accent, #0099e5) !important;
  border-bottom: 2px solid var(--lx-accent, #0099e5) !important;
  background: transparent !important;
}

.nav-tabs-custom .nav-item .nav-link:hover:not(.active):not(.disablelinks) {
  color: var(--lx-text-main, #0f172a);
}

.tab-content>.tab-pane {
  display: none;
}

.tab-content>.tab-pane.active,
.tab-content>.tab-pane.show.active {
  display: block !important;
}

/* ---------------- 6. MODAL & BACKDROP COMPATIBILITY (BS5 & LEGACY) ---------------- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1055 !important;
  display: none;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
}

.modal.show {
  display: block !important;
  z-index: 1060 !important;
}

.modal-dialog {
  position: relative;
  width: auto;
  margin: 1.75rem auto;
  pointer-events: none;
  z-index: 1061 !important;
}

.modal.fade .modal-dialog {
  transition: transform .3s ease-out;
  transform: translate(0, -50px);
}

.modal.show .modal-dialog {
  transform: none;
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, .15);
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, .15);
  outline: 0;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050 !important;
  width: 100vw;
  height: 100vh;
  background-color: #000;
}

.modal-backdrop.fade {
  opacity: 0;
  transition: opacity .15s linear;
}

.modal-backdrop.show {
  opacity: 0.5 !important;
}

/* Modal header legacy .close button styling */
.modal-header .close {
  background: transparent;
  border: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: #000;
  text-shadow: 0 1px 0 #fff;
  opacity: .5;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.modal-header .close:hover {
  color: #000;
  text-decoration: none;
  opacity: .75;
}

/* jQuery UI Datepicker Styling */
.ui-datepicker {
  z-index: 99999 !important;
  background: #ffffff !important;
  border: 1px solid #d1d5db !important;
  border-radius: 6px !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
  padding: 8px !important;
  font-family: inherit !important;
}

/* ---------------- 7. MANDATORY ERP TABLE HEADER THEME ---------------- */
thead {
  background-color: #455771;
  color: #f9f9f9;
}

thead,
thead th,
thead td,
.table thead,
.table thead th,
.table thead td,
.table>thead,
.table>thead>tr>th,
.table>thead>tr>td,
.tableHead,
.tableHead th,
.tableHead td,
table.dataTable thead,
table.dataTable thead th,
table.dataTable thead td,
.dataTables_scrollHead thead,
.dataTables_scrollHead thead th {
  background-color: #455771 !important;
  color: #f9f9f9 !important;
  --bs-table-bg: #455771 !important;
  --bs-table-color: #f9f9f9 !important;
  --bs-table-color-state: #f9f9f9 !important;
  --bs-table-bg-state: #455771 !important;
  box-shadow: none !important;
}

.tableHead {
  font-weight: bold;
  background-color: #455771 !important;
  color: #f9f9f9 !important;
  font-size: 11px;
}

thead th a,
thead th i,
table.dataTable thead th a,
.table thead th a {
  color: #f9f9f9 !important;
}

/* Ensure dummy measurement thead in scrollBody is NEVER colored or styled by the mandatory header rules */
div.dataTables_scrollBody thead,
div.dt-scroll-body thead,
div.dataTables_scrollBody thead tr,
div.dt-scroll-body thead tr,
div.dataTables_scrollBody thead th,
div.dt-scroll-body thead th,
div.dataTables_scrollBody thead td,
div.dt-scroll-body thead td {
  background-color: transparent !important;
  background: transparent !important;
  color: transparent !important;
  --bs-table-bg: transparent !important;
  --bs-table-color: transparent !important;
  border: none !important;
  height: 0 !important;
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: 0 !important;
  font-size: 0 !important;
  visibility: hidden !important;
}

/* ---------------- 7. ERP DROPDOWN COMPONENT (BS4 & BS5 COMPATIBILITY) ---------------- */
.dropdown {
  position: relative !important;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1050 !important;
  display: none;
  min-width: 10rem;
  padding: 0.35rem 0;
  margin: 0.125rem 0 0;
  font-size: 0.8125rem;
  color: var(--lx-text-main, #334155);
  text-align: left;
  list-style: none;
  background-color: #ffffff !important;
  background-clip: padding-box;
  border: 1px solid var(--lx-border-color, #e2e8f0) !important;
  border-radius: var(--lx-radius-md, 8px) !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
}

.dropdown-menu.show,
.dropdown.show>.dropdown-menu {
  display: block !important;
}

.dropdown-menu-right,
.dropdown-menu-end {
  right: 0 !important;
  left: auto !important;
}

.dropdown-item {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  width: 100%;
  padding: 0.45rem 1rem !important;
  clear: both;
  font-weight: 500;
  color: var(--lx-text-main, #334155) !important;
  text-align: inherit;
  text-decoration: none !important;
  white-space: nowrap;
  background-color: transparent;
  border: 0;
  cursor: pointer;
  transition: all var(--lx-transition-fast, 0.15s ease);
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: rgba(37, 99, 235, 0.08) !important;
  color: var(--lx-accent, #2563eb) !important;
}

.dropdown-item i {
  font-size: 1rem !important;
  line-height: 1;
}

/* ==========================================================================
   BADGES & SOFT BADGES (COMPREHENSIVE SUITE)
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.25rem 0.55rem;
  font-size: 78%;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 4px;
}

.badge-pill,
.rounded-pill {
  border-radius: 9999px !important;
  padding-left: 0.65rem !important;
  padding-right: 0.65rem !important;
}

/* Solid Badges */
.badge-primary {
  color: #ffffff !important;
  background-color: #2563eb !important;
}

.badge-secondary {
  color: #ffffff !important;
  background-color: #64748b !important;
}

.badge-success {
  color: #ffffff !important;
  background-color: #10b981 !important;
}

.badge-info {
  color: #ffffff !important;
  background-color: #0ea5e9 !important;
}

.badge-warning {
  color: #ffffff !important;
  background-color: #f59e0b !important;
}

.badge-danger {
  color: #ffffff !important;
  background-color: #ef4444 !important;
}

.badge-dark {
  color: #ffffff !important;
  background-color: #1e293b !important;
}

.badge-light {
  color: #334155 !important;
  background-color: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
}

/* Soft Badges */
.badge-soft-primary {
  color: #2563eb !important;
  background-color: rgba(37, 99, 235, 0.12) !important;
  border: 1px solid rgba(37, 99, 235, 0.22) !important;
}

.badge-soft-secondary {
  color: #64748b !important;
  background-color: rgba(100, 116, 139, 0.12) !important;
  border: 1px solid rgba(100, 116, 139, 0.22) !important;
}

.badge-soft-success {
  color: #059669 !important;
  background-color: rgba(16, 185, 129, 0.14) !important;
  border: 1px solid rgba(16, 185, 129, 0.24) !important;
}

.badge-soft-info {
  color: #0284c7 !important;
  background-color: rgba(14, 165, 233, 0.14) !important;
  border: 1px solid rgba(14, 165, 233, 0.24) !important;
}

.badge-soft-warning {
  color: #b45309 !important;
  background-color: rgba(245, 158, 11, 0.15) !important;
  border: 1px solid rgba(245, 158, 11, 0.28) !important;
}

.badge-soft-danger {
  color: #dc2626 !important;
  background-color: rgba(239, 68, 68, 0.14) !important;
  border: 1px solid rgba(239, 68, 68, 0.24) !important;
}

.badge-soft-dark {
  color: #1e293b !important;
  background-color: rgba(30, 41, 59, 0.12) !important;
  border: 1px solid rgba(30, 41, 59, 0.22) !important;
}

.badge-soft-light {
  color: #475569 !important;
  background-color: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

/* Soft Background Utility Classes */
.bg-soft-primary {
  background-color: rgba(37, 99, 235, 0.12) !important;
  color: #2563eb !important;
}

.bg-soft-secondary {
  background-color: rgba(100, 116, 139, 0.12) !important;
  color: #64748b !important;
}

.bg-soft-success {
  background-color: rgba(16, 185, 129, 0.14) !important;
  color: #059669 !important;
}

.bg-soft-info {
  background-color: rgba(14, 165, 233, 0.14) !important;
  color: #0284c7 !important;
}

.bg-soft-warning {
  background-color: rgba(245, 158, 11, 0.15) !important;
  color: #b45309 !important;
}

.bg-soft-danger {
  background-color: rgba(239, 68, 68, 0.14) !important;
  color: #dc2626 !important;
}

.bg-soft-dark {
  background-color: rgba(30, 41, 59, 0.12) !important;
  color: #1e293b !important;
}

.bg-soft-light {
  background-color: #f8fafc !important;
  color: #475569 !important;
}

/* Notification Dropdown Panel & Scrollbar */
.noti-dropdown-panel {
  width: 380px !important;
  max-width: 90vw !important;
  border-radius: 8px !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15) !important;
  overflow: hidden !important;
  display: none !important;
  flex-direction: column !important;
  max-height: 480px !important;
  padding: 0 !important;
}

.noti-dropdown-panel.show,
.dropdown.show>.noti-dropdown-panel,
.lx-dropdown.show>.noti-dropdown-panel {
  display: flex !important;
}

#notiScrollPanel {
  flex: 1 1 auto !important;
  max-height: 340px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
}

#notiScrollPanel::-webkit-scrollbar {
  width: 6px !important;
}

#notiScrollPanel::-webkit-scrollbar-track {
  background: #f1f5f9 !important;
}

#notiScrollPanel::-webkit-scrollbar-thumb {
  background: #cbd5e1 !important;
  border-radius: 3px !important;
}

#notiScrollPanel::-webkit-scrollbar-thumb:hover {
  background: #94a3b8 !important;
}

/* Dashboard Metric Cards */
.lx-stat-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.lx-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08) !important;
  border-color: #cbd5e1 !important;
}