.logout-btn {
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    padding: 0;
}
.logout-btn:hover,
.mws-menu-action-btn:hover {
    text-decoration: none;
}
.mws-menu-action-btn {
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}
.remove-item:hover {
  color: red;
  cursor: pointer;
}
.cf-area{
  display: none;
}
.base-unit-area{
    display: none;
}
#RandomCode i:hover, .random-code i:hover{
  color: black;
  cursor: pointer;
}

.min-h-50 {
  min-height: 50px !important;
}

/*begain:Sales*/

.flatpickr-day.today:not(.selected) {
  border: 1px solid #cccccc !important;
  background: none !important;
  color: inherit !important;
}
.flatpickr-confirm svg {
    border: 1px solid green !important;
    border-radius: 50%;
    padding: 2px;
}
.flatpickr-confirm svg:hover {
    cursor: pointer !important;
    background-color: green !important;
}
.flatpickr .input-group-text {
    cursor: pointer; /* make icons clickable */
}
.select2-selection__rendered {
    padding-right: 18px !important; /* leave room for clear icon */
}
.file-input-label{
  cursor: pointer;
}
.view-modal:hover{
  cursor: pointer;
  /*color: green !important;*/
}
.view-modal i:hover{
  cursor: pointer;
  /*color: green !important;*/
}

/*end:Sales*/

/*begain:Barcode Print*/

/*@page {
    size: 8.45in 10.3in;
    margin: 0;
}*/
.barcode-sheet {
      display: grid;
      gap: 5px 5px; /* row-gap col-gap */
      padding: 0;
      box-sizing: border-box;
      border: 1px solid #eeeeee;
      padding: 5px;
      margin-bottom: 5px;
  }
  
  .barcode-sheet:last-child {
    page-break-after: auto; /* no extra break after last page */
}
  .barcode-sheet-40 {
      grid-template-columns: repeat(auto-fit, 1.799in);
      /*grid-template-columns: repeat(auto-fit, minmax(1.799in, 1fr));*/
      grid-auto-rows: 1.003in;
      width: 8.27in; /* A4 width */
      height: 11.69in; /* A4 height */
  }
  .barcode-sheet-30 {
      grid-template-columns: repeat(auto-fit, 2.625in);
      grid-auto-rows: 1in;
      width: 8.45in;
      height: 10.9in;/*10.3in*/
  }
  .barcode-sheet-24 {
      grid-template-columns: repeat(auto-fit, 2.48in);
      grid-auto-rows: 1.334in;
      width: 8.27in; /* A4 width */
      height: 11.69in; /* A4 height */
  }
  .barcode-sheet-20 {
      grid-template-columns: repeat(auto-fit, 4in);
      grid-auto-rows: 1in;
      width: 8.45in;
      height: 10.9in;/*10.3in*/
  }
  .barcode-sheet-18 {
      grid-template-columns: repeat(auto-fit, 2.5in);
      grid-auto-rows: 1.835in;
      width: 8.27in; /* A4 width */
      height: 11.69in; /* A4 height */
  }
  .barcode-sheet-14 {
      grid-template-columns: repeat(auto-fit, 4in);
      grid-auto-rows: 1.33in;
      width: 8.45in;
      height: 10.3in;
  }
  .barcode-sheet-12 {
      grid-template-columns: repeat(auto-fit, 2.5in);
      grid-auto-rows: 2.834in;
      width: 8.27in; /* A4 width */
      height: 11.69in; /* A4 height */
  }
  .barcode-sheet-10 {
      grid-template-columns: repeat(auto-fit, 4in);
      grid-auto-rows: 2in;
      width: 8.27in;
      height: 10.5in;/*10.3in*/
  }
  .bc-label-area {
    border: 0.5px dashed #ccc; /* preview only */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    text-align: center;
    box-sizing: border-box;
    overflow: hidden;
  }
  .bc-label-area-40 {
    width: 1.799in;
    height: 1.003in;
  }
  .bc-label-area-30 {
    width: 2.625in;
    height: 1in;
  }
  .bc-label-area-24 {
    width: 2.48in;
    height: 1.334in;
  }
  .bc-label-area-20 {
    width: 4in;
    height: 1in;
  }
  .bc-label-area-18 {
    width: 2.5in;
    height: 1.835in;
  }
  .bc-label-area-14 {
    width: 4in;
    height: 1.33in;
  }
  .bc-label-area-12 {
    width: 2.5in;
    height: 2.834in;
  }
  .bc-label-area-10 {
    width: 4in;
    height: 2in;
  }
  @media print {
      .barcode-sheet {
          border: none !important; /* No borders in print */
          padding: none !important;
          margin-bottom: none;
          page-break-after: always;
      }
      .barcode-sheet:last-child {
        page-break-after: auto;
      }
  }

 /* Continuous feed*/

 .cf-label-body {
  display: flex;
  justify-content: center; /* horizontally center */
}

/*.cf-label-container {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 0;
    width: 100%; Roll width is flexible
}*/

.cf-label-container {
    display: grid;
    /*grid-template-columns: repeat(1, 1.5in);*/
    grid-auto-rows: 1in;
    gap: 0;
    width: fit-content;
}
.cf-label-area {
    /*width: 1.5in;
    height: 1in;*/
    padding: 4px; /* padding inside label */
    box-sizing: border-box;
    border: 0.5px dashed #ccc; /* for screen preview, remove for print */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    text-align: center;
    overflow: hidden;
    page-break-inside: avoid; /* avoid breaking label when printing */
    break-inside: avoid;
}
.cf-barcode-area {
    display: inline-block;
    max-width: 100%;
    max-height: 60%;
}
@media print {
    .cf-label-area {
        border: none !important;
    }
}

/*end:Barcode Print*/

/* --- Admin: Zoho-style light sidebar (see body.admin-sidebar-zoho) --- */
body.admin-sidebar-zoho {
  --bs-app-sidebar-width: 280px;
  --bs-app-sidebar-width-actual: 280px;
  --admin-sidebar-bg: #eef1f5;
  --admin-sidebar-accent: #1e88e5;
  --admin-sidebar-accent-dark: #1565c0;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar {
  background-color: var(--admin-sidebar-bg) !important;
  border-right: 1px solid #e2e6ed !important;
  box-shadow: none !important;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .app-sidebar-logo {
  border-bottom: 1px solid #e2e6ed;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .admin-sidebar-section-heading {
  color: #9aa0ac !important;
  letter-spacing: 0.08em;
  font-size: 0.7rem !important;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .menu.admin-sidebar-menu .menu-link,
body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .menu.admin-sidebar-menu .menu-link .menu-title,
body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .menu.admin-sidebar-menu .menu-link .menu-icon,
body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .menu.admin-sidebar-menu .menu-link .menu-icon i {
  color: #25314f !important;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .menu.admin-sidebar-menu .menu-link {
  border-radius: 0 10px 10px 0;
  margin-right: 0.35rem;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

/* Top-level active item: solid accent bar (Zoho “Home” style) */
body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]
  .app-sidebar
  .menu.admin-sidebar-menu
  > .menu-item:not(.menu-accordion)
  > .menu-link.active {
  background-color: var(--admin-sidebar-accent) !important;
  color: #fff !important;
  box-shadow: none !important;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]
  .app-sidebar
  .menu.admin-sidebar-menu
  > .menu-item:not(.menu-accordion)
  > .menu-link.active
  .menu-title,
body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]
  .app-sidebar
  .menu.admin-sidebar-menu
  > .menu-item:not(.menu-accordion)
  > .menu-link.active
  .menu-icon,
body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]
  .app-sidebar
  .menu.admin-sidebar-menu
  > .menu-item:not(.menu-accordion)
  > .menu-link.active
  .menu-icon
  i {
  color: #fff !important;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]
  .app-sidebar
  .menu.admin-sidebar-menu
  > .menu-item:not(.menu-accordion)
  > .menu-link.active
  .menu-bullet
  .bullet {
  background-color: #fff !important;
}

/* Nested menu: softer active state (default submenus) */
body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .menu-sub:not(.admin-sidebar-items-submenu) .menu-link.active {
  background-color: rgba(30, 136, 229, 0.12) !important;
  color: var(--admin-sidebar-accent-dark) !important;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .menu-sub:not(.admin-sidebar-items-submenu) .menu-link.active .menu-title {
  color: var(--admin-sidebar-accent-dark) !important;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .menu-sub:not(.admin-sidebar-items-submenu) .menu-link.active .menu-bullet .bullet {
  background-color: var(--admin-sidebar-accent) !important;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .menu-sub:not(.admin-sidebar-items-submenu) .menu-link.active .menu-icon,
body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .menu-sub:not(.admin-sidebar-items-submenu) .menu-link.active .menu-icon i {
  color: var(--admin-sidebar-accent) !important;
}

/* Items submenu: light lavender panel + text-only rows (reference UI) */
body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .admin-sidebar-items-submenu {
  background: linear-gradient(180deg, #eef2ff 0%, #f5f0ff 100%);
  border-radius: 0 10px 10px 0;
  margin: 0.2rem 0.35rem 0.45rem 0;
  padding: 0.35rem 0 0.45rem;
  border: 1px solid rgba(99, 102, 241, 0.12);
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]:not([data-kt-app-sidebar-minimize="on"])
  .app-sidebar
  .admin-sidebar-items-submenu {
  max-width: 100%;
  overflow-x: hidden;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]:not([data-kt-app-sidebar-minimize="on"])
  .app-sidebar
  .admin-sidebar-items-submenu
  .menu-link {
  align-items: flex-start;
  padding-left: 1rem;
  padding-right: 0.85rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  color: #25314f !important;
  min-height: auto;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .admin-sidebar-items-submenu .menu-link.active {
  background-color: rgba(58, 134, 255, 0.18) !important;
  color: #1e4d9b !important;
  font-weight: 600;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .admin-sidebar-items-submenu .menu-link.active .menu-title {
  color: #1e4d9b !important;
}

/* Submenu rows: dot bullet (same pattern as Expense / Reports) */
body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .admin-sidebar-items-submenu .menu-bullet .bullet {
  background-color: rgba(37, 49, 79, 0.42);
}
body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .admin-sidebar-items-submenu .menu-link.active .menu-bullet .bullet {
  background-color: var(--admin-sidebar-accent) !important;
}

/* Expanded accordion row: subtle highlight */
body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .menu-item.menu-accordion.show > .menu-link {
  background-color: rgba(30, 136, 229, 0.06);
  border-radius: 0 10px 10px 0;
  margin-right: 0.35rem;
}

/* Full-width sidebar: keep submenus visible when section is open or active */
body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]:not([data-kt-app-sidebar-minimize="on"])
  .app-sidebar
  .menu.admin-sidebar-menu
  > .menu-item.menu-accordion.show
  > .menu-sub.menu-sub-accordion,
body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]:not([data-kt-app-sidebar-minimize="on"])
  .app-sidebar
  .menu.admin-sidebar-menu
  > .menu-item.menu-accordion.here
  > .menu-sub.menu-sub-accordion {
  display: flex !important;
  flex-direction: column;
  height: auto !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  visibility: visible !important;
}

/* Reports, Settings, System User: same submenu panel as Items/Inventory/Sales */
body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .menu-sub.menu-sub-accordion.admin-sidebar-submenu-panel {
  background: linear-gradient(180deg, #eef2ff 0%, #f5f0ff 100%);
  border-radius: 0 10px 10px 0;
  margin: 0.2rem 0.35rem 0.45rem 0;
  padding: 0.35rem 0 0.45rem;
  border: 1px solid rgba(99, 102, 241, 0.12);
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]:not([data-kt-app-sidebar-minimize="on"])
  .app-sidebar
  .menu-sub.menu-sub-accordion.admin-sidebar-submenu-panel {
  max-width: 100%;
  overflow-x: hidden;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]:not([data-kt-app-sidebar-minimize="on"])
  .app-sidebar
  .admin-sidebar-submenu-panel
  .menu-link {
  align-items: flex-start;
  padding-left: 1rem;
  padding-right: 0.85rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  color: #25314f !important;
  min-height: auto;
}

/* Expanded sidebar only: long labels wrap inside the panel */
body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]:not([data-kt-app-sidebar-minimize="on"])
  .app-sidebar
  .admin-sidebar-submenu-panel
  .menu-link
  .menu-title,
body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]:not([data-kt-app-sidebar-minimize="on"])
  .app-sidebar
  .admin-sidebar-items-submenu
  .menu-link
  .menu-title,
body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]:not([data-kt-app-sidebar-minimize="on"])
  .app-sidebar
  .menu-sub.menu-sub-accordion:not(.admin-sidebar-items-submenu)
  .menu-link
  .menu-title {
  display: block !important;
  flex: 1 1 0% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  white-space: normal !important;
  line-height: 1.35 !important;
  overflow: hidden !important;
  text-overflow: unset !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]:not([data-kt-app-sidebar-minimize="on"])
  .app-sidebar
  .admin-sidebar-submenu-panel
  .menu-link
  .menu-bullet,
body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]:not([data-kt-app-sidebar-minimize="on"])
  .app-sidebar
  .menu-sub.menu-sub-accordion:not(.admin-sidebar-items-submenu)
  .menu-link
  .menu-bullet {
  margin-top: 0.3rem;
  flex-shrink: 0;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]:not([data-kt-app-sidebar-minimize="on"])
  .app-sidebar
  .menu-sub.menu-sub-accordion:not(.admin-sidebar-items-submenu)
  .menu-link {
  align-items: flex-start;
  padding-right: 0.85rem;
  min-height: auto;
}

/* Sidebar menu: clear hover (Metronic hover was overridden by menu link colors) */
body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]
  .app-sidebar
  .menu.admin-sidebar-menu
  > .menu-item
  > .menu-link:hover:not(.active) {
  background-color: rgba(30, 136, 229, 0.12) !important;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]
  .app-sidebar
  .menu.admin-sidebar-menu
  > .menu-item.menu-accordion
  > .menu-link:hover:not(.active) {
  background-color: rgba(30, 136, 229, 0.12) !important;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]
  .app-sidebar
  .menu.admin-sidebar-menu
  > .menu-item.menu-accordion.show
  > .menu-link:hover {
  background-color: rgba(30, 136, 229, 0.14) !important;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]
  .app-sidebar
  .menu-sub:not(.admin-sidebar-items-submenu)
  .menu-link:hover:not(.active) {
  background-color: rgba(30, 136, 229, 0.14) !important;
  color: var(--admin-sidebar-accent-dark) !important;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]
  .app-sidebar
  .menu-sub:not(.admin-sidebar-items-submenu)
  .menu-link:hover:not(.active)
  .menu-title,
body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]
  .app-sidebar
  .menu-sub:not(.admin-sidebar-items-submenu)
  .menu-link:hover:not(.active)
  .menu-icon,
body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]
  .app-sidebar
  .menu-sub:not(.admin-sidebar-items-submenu)
  .menu-link:hover:not(.active)
  .menu-icon
  i {
  color: var(--admin-sidebar-accent-dark) !important;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .admin-sidebar-items-submenu .menu-link:hover:not(.active) {
  background-color: rgba(99, 102, 241, 0.16) !important;
  color: #153f8f !important;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]
  .app-sidebar
  .admin-sidebar-items-submenu
  .menu-link:hover:not(.active)
  .menu-title {
  color: #153f8f !important;
}

/* Top navigation — light bar aligned with sidebar & content */
body.admin-sidebar-zoho .app-header {
  background-color: #ffffff !important;
  border-bottom: 1px solid #e4e6ef !important;
  box-shadow: 0 1px 3px rgba(76, 87, 125, 0.06) !important;
}

body.admin-sidebar-zoho .app-header .menu .menu-link .menu-title,
body.admin-sidebar-zoho .app-header .app-navbar .btn,
body.admin-sidebar-zoho .app-header .app-navbar .btn i,
body.admin-sidebar-zoho .app-header .app-navbar .ki-duotone,
body.admin-sidebar-zoho .app-header .app-navbar .ki-duotone i,
body.admin-sidebar-zoho .app-header #kt_app_sidebar_mobile_toggle,
body.admin-sidebar-zoho .app-header #kt_app_sidebar_mobile_toggle i {
  color: #3f4254 !important;
}

body.admin-sidebar-zoho .app-header .btn.btn-custom {
  background-color: #f5f8fa !important;
  border: 1px solid #e4e6ef !important;
}

/* User profile dropdown: solid panel above page content */
body.admin-sidebar-zoho #kt_header_user_menu_toggle .menu.menu-sub-dropdown {
  background-color: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 0.75rem 2rem rgba(15, 23, 42, 0.12) !important;
}

body.admin-sidebar-zoho #kt_header_user_menu_toggle .menu.menu-sub-dropdown .menu-link,
body.admin-sidebar-zoho #kt_header_user_menu_toggle .menu.menu-sub-dropdown button.menu-link {
  border-radius: 0.475rem;
}

/* Zoho-style top bar: hide Metronic demo mega-menu on desktop (sidebar is primary nav) */
@media (min-width: 992px) {
  body.admin-sidebar-zoho .app-header .app-header-menu.app-header-mobile-drawer {
    display: none !important;
  }
}

/*
 * Mobile: header menu drawer opens from the right — global white menu-title rule made
 * labels invisible on the light drawer; restore contrast + hover feedback.
 */
@media (max-width: 991.98px) {
  body.admin-sidebar-zoho .app-header-menu .menu .menu-link .menu-title,
  body.admin-sidebar-zoho .app-header-menu .menu .menu-link .menu-icon,
  body.admin-sidebar-zoho .app-header-menu .menu .menu-link .menu-icon i {
    color: #3f4254 !important;
  }

  body.admin-sidebar-zoho .app-header-menu .menu .menu-item:not(.here) .menu-link:hover:not(.disabled):not(.active):not(.here),
  body.admin-sidebar-zoho .app-header-menu .menu .menu-item.hover:not(.here) > .menu-link:not(.disabled):not(.active):not(.here) {
    background-color: rgba(30, 136, 229, 0.14) !important;
  }

  body.admin-sidebar-zoho .app-header-menu .menu .menu-item:not(.here) .menu-link:hover:not(.disabled):not(.active):not(.here) .menu-title,
  body.admin-sidebar-zoho .app-header-menu .menu .menu-item:not(.here) .menu-link:hover:not(.disabled):not(.active):not(.here) .menu-icon,
  body.admin-sidebar-zoho .app-header-menu .menu .menu-item:not(.here) .menu-link:hover:not(.disabled):not(.active):not(.here) .menu-icon i {
    color: #1565c0 !important;
  }
}

/* Center omnibar (search) */
body.admin-sidebar-zoho .admin-header-omnibar-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

body.admin-sidebar-zoho .admin-header-omnibar {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 8px;
  border: 1px solid #e4e6ef !important;
  background-color: #f5f8fa !important;
  box-shadow: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

body.admin-sidebar-zoho .admin-header-omnibar:hover {
  background-color: #eef3f7 !important;
  border-color: #d8dee9 !important;
}

body.admin-sidebar-zoho .admin-header-omnibar .ki-duotone,
body.admin-sidebar-zoho .admin-header-omnibar .ki-duotone .path1,
body.admin-sidebar-zoho .admin-header-omnibar .ki-duotone .path2,
body.admin-sidebar-zoho .admin-header-omnibar span {
  color: #7e8299 !important;
}

body.admin-sidebar-zoho .app-sidebar .admin-sidebar-footer-label {
  letter-spacing: 0.06em;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar {
  overflow-x: hidden;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .app-sidebar-logo {
  min-height: 62px;
  padding-left: 0.9rem !important;
  padding-right: 0.9rem !important;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .app-sidebar-logo-default {
  height: 34px !important;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .app-sidebar-wrapper {
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]:not([data-kt-app-sidebar-minimize="on"])
  .app-sidebar
  #kt_app_sidebar_menu_scroll {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  margin-left: 0.35rem !important;
  margin-right: 0.35rem !important;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]:not([data-kt-app-sidebar-minimize="on"])
  .app-sidebar
  .menu.admin-sidebar-menu.menu-sub-indention
  .admin-sidebar-submenu-panel.menu-sub:not([data-popper-placement]) {
  margin-left: 0.35rem !important;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .menu.admin-sidebar-menu .menu-link {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .menu.admin-sidebar-menu .menu-link .menu-title {
  font-size: 0.9rem;
  font-weight: 500;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .menu.admin-sidebar-menu .menu-link .menu-icon {
  width: 1.55rem;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .menu.admin-sidebar-menu .menu-link .menu-icon i {
  font-size: 1.05rem !important;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]:not([data-kt-app-sidebar-minimize="on"])
  .app-sidebar
  .admin-sidebar-items-submenu
  .menu-link
  .menu-title {
  font-size: 0.82rem;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]:not([data-kt-app-sidebar-minimize="on"])
  .app-sidebar
  .admin-sidebar-items-submenu
  .menu-link
  .menu-bullet {
  margin-top: 0.3rem;
  flex-shrink: 0;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .menu .menu-item .menu-heading,
body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .admin-sidebar-section-heading {
  font-size: 0.66rem !important;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .app-sidebar-footer {
  padding-left: 0.9rem !important;
  padding-right: 0.9rem !important;
}

body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"] .app-sidebar .app-sidebar-footer .btn {
  height: 36px !important;
  font-size: 0.7rem;
}

/* --- Collapsed sidebar: narrow “rail” with icon above label (reference UI) --- */
@media (min-width: 992px) {
  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"] {
    --bs-app-sidebar-width: 88px !important;
    --bs-app-sidebar-width-actual: 88px !important;
  }

  /* Do not grow the sidebar on hover — keep the rail width */
  body.admin-sidebar-zoho[data-kt-app-sidebar-hoverable="true"][data-kt-app-sidebar-minimize="on"]
    .app-sidebar:hover:not(.animating) {
    width: var(--bs-app-sidebar-width) !important;
  }

  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"] .app-sidebar .app-sidebar-wrapper {
    width: 100% !important;
    max-width: 100%;
  }

  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"] .app-sidebar .app-sidebar-menu {
    flex: 1 1 auto !important;
    min-height: 0 !important;
  }

  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"] .app-sidebar #kt_app_sidebar_menu_scroll {
    max-height: calc(100vh - 11rem);
  }

  /* Metronic hides titles when collapsed — show truncated labels */
  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"] .app-sidebar .app-sidebar-menu .menu-content,
  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"] .app-sidebar .app-sidebar-menu .menu-title,
  body.admin-sidebar-zoho[data-kt-app-sidebar-hoverable="true"][data-kt-app-sidebar-minimize="on"]
    .app-sidebar:not(:hover)
    .app-sidebar-menu
    .menu-title {
    opacity: 1 !important;
  }

  /* Allow accordion sections to open while collapsed */
  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"] .app-sidebar .app-sidebar-menu .menu-item.show > .menu-sub {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  /* Top-level rail cells: icon over label */
  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"]
    .app-sidebar
    .menu.admin-sidebar-menu
    > .menu-item
    > .menu-link {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    margin-left: 0 !important;
    margin-right: 0.2rem !important;
    padding: 0.45rem 0.2rem !important;
    min-height: 4.25rem;
    position: relative;
  }

  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"]
    .app-sidebar
    .menu.admin-sidebar-menu
    > .menu-item
    > .menu-link
    .menu-icon {
    margin-right: 0 !important;
    margin-bottom: 0.15rem;
  }

  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"]
    .app-sidebar
    .menu.admin-sidebar-menu
    > .menu-item
    > .menu-link
    .menu-icon
    i {
    font-size: 1.25rem !important;
  }

  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"]
    .app-sidebar
    .menu.admin-sidebar-menu
    > .menu-item
    > .menu-link
    .menu-title {
    font-size: 0.62rem !important;
    font-weight: 600 !important;
    line-height: 1.15 !important;
    max-width: 100%;
    padding: 0 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Submenu chevron: hint that panel opens to the side */
  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"]
    .app-sidebar
    .menu.admin-sidebar-menu
    > .menu-item.menu-accordion
    > .menu-link
    .menu-arrow {
    position: absolute !important;
    right: 1px;
    bottom: 2px;
    margin: 0 !important;
    opacity: 0.45;
    transform: scale(0.65) rotate(-90deg);
  }

  /* Collapsed rail: flyout submenus to the RIGHT (not stacked below in the rail) */
  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"] #kt_app_sidebar {
    overflow: visible !important;
  }

  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"] .app-sidebar .app-sidebar-menu.overflow-hidden {
    overflow: visible !important;
  }

  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"] .app-sidebar #kt_app_sidebar_menu_scroll {
    overflow-x: visible !important;
    overflow-y: auto !important;
  }

  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"]
    .app-sidebar
    .menu.admin-sidebar-menu
    > .menu-item.menu-accordion {
    position: relative;
    z-index: 1;
  }

  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"]
    .app-sidebar
    .menu.admin-sidebar-menu
    > .menu-item.menu-accordion.show {
    z-index: 1080;
  }

  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"]
    .app-sidebar
    .menu.admin-sidebar-menu
    > .menu-item.menu-accordion
    > .menu-sub.menu-sub-accordion,
  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"]
    .app-sidebar
    .menu.admin-sidebar-menu
    > .menu-item.menu-accordion
    > .menu-sub.menu-sub-accordion.admin-sidebar-items-submenu,
  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"]
    .app-sidebar
    .menu.admin-sidebar-menu
    > .menu-item.menu-accordion
    > .menu-sub.menu-sub-accordion.admin-sidebar-submenu-panel {
    position: absolute !important;
    left: calc(100% + 2px) !important;
    right: auto !important;
    top: 0 !important;
    width: min(280px, calc(100vw - var(--bs-app-sidebar-width, 88px) - 1rem)) !important;
    min-width: 240px !important;
    max-width: min(280px, calc(100vw - var(--bs-app-sidebar-width, 88px) - 1rem)) !important;
    max-height: min(70vh, 520px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    margin: 0 !important;
    padding: 0.4rem 0 !important;
    border-radius: 0 12px 12px 0 !important;
    border: 1px solid rgba(99, 102, 241, 0.18) !important;
    box-shadow: 0 0.75rem 2rem rgba(15, 23, 42, 0.14) !important;
    background: linear-gradient(180deg, #eef2ff 0%, #f5f0ff 100%) !important;
    height: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"]
    .app-sidebar
    .menu.admin-sidebar-menu
    > .menu-item.menu-accordion
    .menu-sub.menu-sub-accordion
    .menu-item {
    width: 100% !important;
  }

  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"]
    .app-sidebar
    .menu.admin-sidebar-menu
    > .menu-item.menu-accordion
    .menu-sub.menu-sub-accordion
    .menu-item
    .menu-link {
    justify-content: flex-start !important;
    align-items: center !important;
    text-align: left !important;
    padding: 0.5rem 0.85rem !important;
    flex-direction: row !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
  }

  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"]
    .app-sidebar
    .menu.admin-sidebar-menu
    > .menu-item.menu-accordion
    .menu-sub.menu-sub-accordion
    .menu-link
    .menu-title,
  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"]
    .app-sidebar
    .menu.admin-sidebar-menu
    > .menu-item.menu-accordion
    .admin-sidebar-items-submenu
    .menu-link
    .menu-title {
    display: block !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
    font-size: 0.82rem !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
  }

  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"]
    .app-sidebar
    .menu.admin-sidebar-menu
    > .menu-item.menu-accordion
    .menu-sub.menu-sub-accordion
    .menu-link
    .menu-bullet {
    margin-top: 0 !important;
    flex-shrink: 0 !important;
  }

  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"]
    .app-sidebar
    .menu.admin-sidebar-menu.menu-sub-indention
    .menu-sub.menu-sub-accordion:not([data-popper-placement]) {
    margin-left: 0 !important;
  }

  /* When a flyout is open, avoid clipping the panel */
  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"]
    .app-sidebar
    #kt_app_sidebar_menu_scroll:has(.menu-accordion.show) {
    overflow: visible !important;
  }

  /* Logo row centered when collapsed */
  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"] .app-sidebar .app-sidebar-logo {
    justify-content: center !important;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
  }

  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"] .app-sidebar .app-sidebar-logo-default,
  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"] .app-sidebar .app-sidebar-logo-minimize {
    max-width: 52px;
    height: auto !important;
    object-fit: contain;
  }

  /* Collapsed rail: never show the large logo on sidebar hover (Metronic swaps default/minimize on :hover) */
  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"] .app-sidebar .app-sidebar-logo .app-sidebar-logo-default {
    display: none !important;
  }
  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"] .app-sidebar .app-sidebar-logo .app-sidebar-logo-minimize {
    display: inline-block !important;
  }

  /* Footer strip + icon-only MAS link */
  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"] .app-sidebar .app-sidebar-footer {
    padding: 0.5rem 0.3rem 0.65rem !important;
    margin-top: auto;
    background: linear-gradient(180deg, #f5f0ff 0%, #ede9fe 100%);
    border-top: 1px solid rgba(99, 102, 241, 0.18);
  }

  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"] .app-sidebar .app-sidebar-footer .btn {
    flex-direction: column !important;
    justify-content: center !important;
    gap: 0 !important;
    height: auto !important;
    min-height: 3rem;
    padding: 0.35rem 0.2rem !important;
    border-radius: 0.5rem !important;
  }

  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"] .app-sidebar .app-sidebar-footer .admin-sidebar-footer-label,
  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"] .app-sidebar .app-sidebar-footer .bullet {
    display: none !important;
  }

  body.admin-sidebar-zoho[data-kt-app-sidebar-minimize="on"] .app-sidebar .app-sidebar-footer .ki-duotone {
    margin: 0 !important;
    font-size: 1.35rem !important;
  }
}

/* --- Vendors / suppliers: Zoho-style list + new vendor form --- */
body.admin-sidebar-zoho .mws-page-vendors .mws-vendors-page-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--bs-gray-900);
  letter-spacing: -0.02em;
}

body.admin-sidebar-zoho .mws-vendor-form .mws-vendor-row {
  margin-bottom: 2rem;
}

/* Vertical gap between stacked controls in the field column (input, help text, nested rows) */
body.admin-sidebar-zoho .mws-vendor-form .mws-vendor-row > div[class*="col-md"],
body.admin-sidebar-zoho .mws-vendor-form .mws-vendor-row > div[class*="col-lg"] {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

body.admin-sidebar-zoho .mws-vendor-form .mws-vendor-row > label.col-form-label,
body.admin-sidebar-zoho .mws-vendor-form .mws-vendor-row > .col-auto:first-child.col-form-label {
  padding-top: 0.65rem;
  font-weight: 500;
  color: var(--bs-gray-700);
}

/* Extra space between side-by-side fields (salutation / first / last, country + phone) */
body.admin-sidebar-zoho .mws-vendor-form .mws-vendor-row .row.g-3,
body.admin-sidebar-zoho .mws-vendor-form .mws-vendor-row .row.g-4 {
  --bs-gutter-x: 1.25rem;
  --bs-gutter-y: 1rem;
}

body.admin-sidebar-zoho .mws-vendor-form .mws-vendor-row .row.g-4 {
  --bs-gutter-x: 1.5rem;
  --bs-gutter-y: 1.25rem;
}

body.admin-sidebar-zoho .mws-vendor-form .form-text,
body.admin-sidebar-zoho .mws-vendor-form .text-muted.fs-7 {
  margin-top: 0.125rem;
}

body.admin-sidebar-zoho .mws-vendor-form #mws_tab_remarks > .form-label {
  display: block;
  margin-bottom: 0.75rem;
}

body.admin-sidebar-zoho .mws-vendor-form #mws_tab_remarks .min-h-150px {
  margin-top: 0.25rem;
}

/* Other details tab: extra vertical space between each field row */
body.admin-sidebar-zoho .mws-vendor-form .mws-vendor-tab-other .mws-vendor-row {
  margin-bottom: 2.5rem;
}

/* Vendor detail page shell (no Bootstrap modal — Zoho-style) */
body.admin-sidebar-zoho .mws-vd-page--standalone {
  max-width: min(1120px, 100%);
}
body.admin-sidebar-zoho #kt_app_content_container .mws-vd-page--standalone {
  margin-left: auto;
  margin-right: auto;
}

body.admin-sidebar-zoho .mws-vd-zoho {
  background: #ffffff;
  border: 1px solid #ebebeb !important;
}

body.admin-sidebar-zoho .mws-vd-zoho-header {
  background: #ffffff;
  border-color: #ebebeb !important;
}

body.admin-sidebar-zoho .mws-vd-title {
  letter-spacing: -0.02em;
}

body.admin-sidebar-zoho .mws-vd-btn-muted {
  color: var(--bs-gray-800);
}

body.admin-sidebar-zoho .mws-vd-tabs {
  background: #fafafa;
  border-color: #ebebeb !important;
}

body.admin-sidebar-zoho .mws-vd-tabs .nav-link {
  border-radius: 0;
  border-bottom: 2px solid transparent;
  color: #5e6278;
  font-weight: 500;
  padding: 0.65rem 0.85rem;
}

body.admin-sidebar-zoho .mws-vd-tabs .nav-link:hover {
  color: var(--bs-primary);
}

body.admin-sidebar-zoho .mws-vd-tabs .nav-link.active {
  color: var(--bs-primary);
  border-bottom-color: var(--bs-primary);
  background: transparent;
}

body.admin-sidebar-zoho .mws-vd-tab-content {
  background: #ffffff;
}

body.admin-sidebar-zoho .mws-vd-zoho-col .mws-vd-panel-line {
  border-bottom: 1px solid #ebebeb;
}

body.admin-sidebar-zoho .mws-vd-alert {
  background: #e8f4fc;
  border: 1px solid #b8daf8;
  color: #1b2e4b;
}

body.admin-sidebar-zoho .mws-vd-panel {
  background: #f9f9f9;
  border-color: #ebebeb !important;
}

body.admin-sidebar-zoho .mws-vd-muted-label {
  color: #7e8299;
  letter-spacing: 0.04em;
}

body.admin-sidebar-zoho .mws-vd-section-title {
  letter-spacing: 0.06em;
}

body.admin-sidebar-zoho .mws-vd-kv {
  display: flex;
  flex-direction: column;
  gap: 0;
}

body.admin-sidebar-zoho .mws-vd-kv-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid #ebebeb;
}

body.admin-sidebar-zoho .mws-vd-kv-row:last-child {
  border-bottom: none;
}

body.admin-sidebar-zoho .mws-vd-kv-label {
  color: #5e6278;
  font-size: 0.875rem;
  flex: 0 0 42%;
  max-width: 260px;
}

body.admin-sidebar-zoho .mws-vd-kv-value {
  text-align: right;
  font-size: 0.875rem;
  color: #181c32;
  flex: 1;
  min-width: 0;
}

/* Payables table — grey header, minimal grid */
body.admin-sidebar-zoho .mws-vd-payables-wrap {
  border: 1px solid #ebebeb;
  background: #ffffff;
}

body.admin-sidebar-zoho .mws-vd-payables-table thead tr {
  background: #f5f8fa;
}

body.admin-sidebar-zoho .mws-vd-payables-table thead th {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7e8299 !important;
  border-bottom: 1px solid #ebebeb !important;
}

body.admin-sidebar-zoho .mws-vd-payables-table tbody td {
  border-bottom: none !important;
  vertical-align: middle;
}

/* Stats summary bar */
body.admin-sidebar-zoho .mws-vd-stats-bar {
  background: #f0f4f8;
  border: 1px solid #e4e6ef;
}

/* Activity timeline — vertical spine + nodes */
body.admin-sidebar-zoho .mws-vd-timeline-zoho {
  position: relative;
  padding-left: 0;
  min-height: 2rem;
}

body.admin-sidebar-zoho .mws-vd-timeline-zoho::before {
  content: "";
  position: absolute;
  left: 127px;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: #e4e6ef;
  border-radius: 1px;
}

body.admin-sidebar-zoho .mws-vd-tl-row {
  position: relative;
  padding-bottom: 1.35rem;
  min-height: 3.5rem;
}

body.admin-sidebar-zoho .mws-vd-tl-row:last-child {
  padding-bottom: 0;
}

body.admin-sidebar-zoho .mws-vd-tl-date {
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 118px;
  text-align: right;
  padding-right: 0.5rem;
  line-height: 1.35;
}

body.admin-sidebar-zoho .mws-vd-tl-rail {
  position: absolute;
  left: 118px;
  top: 0;
  width: 24px;
  height: 100%;
  pointer-events: none;
}

body.admin-sidebar-zoho .mws-vd-tl-dot {
  position: absolute;
  left: 50%;
  top: 0.35rem;
  transform: translateX(-50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #b5b5c3;
  z-index: 2;
  box-shadow: 0 0 0 2px #ffffff;
}

body.admin-sidebar-zoho .mws-vd-tl-card {
  margin-left: 152px;
  border-color: #ebebeb !important;
  box-shadow: 0 1px 3px rgba(24, 28, 50, 0.04);
}

body.admin-sidebar-zoho .mws-vendor-form .nav-line-tabs .nav-link {
  border-radius: 0;
  border-bottom: 2px solid transparent;
  color: var(--bs-gray-600);
  font-weight: 500;
  padding: 0.65rem 1rem;
}

body.admin-sidebar-zoho .mws-vendor-form .nav-line-tabs .nav-link:hover {
  color: var(--bs-primary);
}

body.admin-sidebar-zoho .mws-vendor-form .nav-line-tabs .nav-link.active {
  color: var(--bs-primary);
  border-bottom-color: var(--bs-primary);
  background: transparent;
}

body.admin-sidebar-zoho .mws-vendor-form .form-control,
body.admin-sidebar-zoho .mws-vendor-form .form-select {
  border-radius: 0.35rem;
}

body.admin-sidebar-zoho .mws-vendor-form .mws-vendor-footer {
  border-top: 1px solid var(--bs-gray-200);
  padding-top: 1.5rem;
  margin-top: 2rem;
}

/* Vendors list: breathing room around search + toolbar */
body.admin-sidebar-zoho .mws-page-vendors .card-header .card-title {
  row-gap: 0.75rem;
}

/* Vendors master–detail (list + inline detail, no modal) */
body.admin-sidebar-zoho .mws-vendor-md {
  min-height: min(70vh, 820px);
}
body.admin-sidebar-zoho .mws-vendor-md-list {
  max-height: min(70vh, 820px);
}
body.admin-sidebar-zoho .mws-vendor-md-scroll {
  max-height: calc(min(70vh, 820px) - 57px);
}
body.admin-sidebar-zoho .mws-vd-vendor-row {
  color: inherit;
}
body.admin-sidebar-zoho .mws-vd-vendor-row:hover {
  background-color: rgba(var(--bs-gray-500-rgb), 0.06);
}
body.admin-sidebar-zoho .mws-vd-master-table tbody tr.table-active {
  --bs-table-active-bg: rgba(var(--bs-primary-rgb), 0.1);
  box-shadow: inset 3px 0 0 var(--bs-primary);
}
body.admin-sidebar-zoho .mws-vd-detail-shell {
  min-height: min(70vh, 820px);
}
body.admin-sidebar-zoho .mws-vd-page--embed .mws-vd-zoho {
  box-shadow: none;
}
body.admin-sidebar-zoho .mws-vd-page-header {
  background: #ffffff;
}
body.admin-sidebar-zoho .mws-vd-page-main {
  min-height: 0;
}

/* Picklist details — same shell classes as vendor detail */
#kt_app_content .mws-pl-detail-shell.mws-vd-page--standalone {
  max-width: 100%;
}
#kt_app_content .mws-pl-detail-shell .mws-vd-zoho {
  background: #ffffff;
  border-color: #ebebeb !important;
}
/* Picklist master list — Zoho-style rail (matches vendor master strip intent) */
/* Picklist details: CSS Grid master–detail (avoids Bootstrap row/col stacking issues) */
#kt_app_content .mws-picklist-detail-grid {
  display: grid;
  width: 100%;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}
/* md+: same proportion as Bootstrap col-md-3 + col-md-8 (3fr : 8fr) */
@media (min-width: 768px) {
  #kt_app_content .mws-picklist-detail-grid {
    grid-template-columns: minmax(200px, 3fr) minmax(0, 8fr);
    gap: 1.5rem;
  }
}
@media (min-width: 1400px) {
  #kt_app_content .mws-picklist-detail-grid {
    grid-template-columns: minmax(240px, 3fr) minmax(0, 8fr);
    gap: 1.75rem;
  }
}
#kt_app_content .mws-picklist-detail-aside,
#kt_app_content .mws-picklist-detail-main {
  min-width: 0;
}

/* Vendor details: master list (3fr) + detail pane (8fr), fills width — no centered narrow card */
#kt_app_content .mws-vendor-detail-grid {
  display: grid;
  width: 100%;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}
@media (min-width: 768px) {
  #kt_app_content .mws-vendor-detail-grid {
    grid-template-columns: minmax(200px, 3fr) minmax(0, 8fr);
    gap: 1.5rem;
  }
}
@media (min-width: 1400px) {
  #kt_app_content .mws-vendor-detail-grid {
    grid-template-columns: minmax(240px, 3fr) minmax(0, 8fr);
    gap: 1.75rem;
  }
}
#kt_app_content .mws-vendor-detail-aside,
#kt_app_content .mws-vendor-detail-main {
  min-width: 0;
}
body.admin-sidebar-zoho .mws-vendor-detail-main .mws-vd-page--standalone {
  max-width: 100%;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
#kt_app_content .mws-vendor-master-list.mws-pl-master-col {
  min-height: min(70vh, 820px);
}
#kt_app_content .mws-vendor-master-list .mws-pl-master-body {
  max-height: calc(min(70vh, 820px) - 52px);
}

#kt_app_content .mws-pl-master-col {
  min-height: min(70vh, 820px);
}
#kt_app_content .mws-pl-master-body {
  max-height: calc(min(70vh, 820px) - 52px);
}
#kt_app_content .mws-pl-master-item {
  border-bottom: 1px solid #ebebeb !important;
  color: inherit;
  text-decoration: none;
}
#kt_app_content .mws-pl-master-item:hover {
  background-color: rgba(var(--bs-gray-500-rgb), 0.06);
}
#kt_app_content .mws-pl-master-item.is-active {
  background-color: rgba(var(--bs-primary-rgb), 0.08);
  box-shadow: inset 3px 0 0 var(--bs-primary);
}

/* Picklists index: whole row opens details (see handlePicklistRowNavigate in picklists.php) */
#kt_app_content .mws-picklist-list-table tbody tr[data-picklist-detail-href] {
  cursor: pointer;
}

#kt_app_content .mws-supplier-list-table tbody tr[data-supplier-detail-href] {
  cursor: pointer;
}
/* Picklist detail tabs — mirror vendor `.mws-vd-tabs` when body class differs */
#kt_app_content .mws-pl-detail-shell .mws-vd-tabs {
  background: #fafafa;
  border-color: #ebebeb !important;
}
#kt_app_content .mws-pl-detail-shell .mws-vd-tabs .nav-link {
  border-radius: 0;
  border-bottom: 2px solid transparent;
  color: #5e6278;
  font-weight: 500;
  padding: 0.65rem 0.85rem;
}
#kt_app_content .mws-pl-detail-shell .mws-vd-tabs .nav-link:hover {
  color: var(--bs-primary);
}
#kt_app_content .mws-pl-detail-shell .mws-vd-tabs .nav-link.active {
  color: var(--bs-primary);
  border-bottom-color: var(--bs-primary);
  background: transparent;
}
#kt_app_content .mws-pl-detail-shell .mws-vd-tab-content {
  background: #ffffff;
}
body.admin-sidebar-zoho .mws-pl-items-table-wrap {
  border-color: #ebebeb !important;
}
body.admin-sidebar-zoho .mws-pl-items-table thead th {
  background: #fafafa;
  border-bottom: 1px solid #ebebeb !important;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  vertical-align: middle;
}
body.admin-sidebar-zoho .mws-pl-items-table tbody td {
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}
body.admin-sidebar-zoho .mws-pl-items-table tbody tr:last-child td {
  border-bottom: none;
}
body.admin-sidebar-zoho .mws-vd-tx-accordion .accordion-button {
  font-weight: 600;
  font-size: 0.95rem;
}

/* Vendor detail — Transactions tab (Zoho-style accordions + flat tables) */
body.admin-sidebar-zoho .mws-vd-header-actions .btn-primary {
  min-height: 2.25rem;
}
body.admin-sidebar-zoho .mws-vd-tx-acc-head .accordion-button {
  box-shadow: none !important;
  font-weight: 600;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}
body.admin-sidebar-zoho .mws-vd-tx-acc-head .accordion-button:not(.collapsed) {
  background-color: #ffffff;
  color: var(--bs-gray-900);
}
body.admin-sidebar-zoho .mws-vd-tx-acc-head .accordion-button::after {
  margin-left: auto;
}
body.admin-sidebar-zoho .mws-vd-tx-table-wrap {
  border-top: 1px solid #ebebeb;
}
body.admin-sidebar-zoho .mws-vd-tx-table thead th {
  background: #fafafa;
  border-bottom: 1px solid #ebebeb !important;
  color: #7e8299;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  vertical-align: middle;
}
body.admin-sidebar-zoho .mws-vd-tx-table tbody td {
  border-bottom: 1px solid #f0f0f0;
  color: #3f4254;
  vertical-align: middle;
}
body.admin-sidebar-zoho .mws-vd-tx-table tbody tr:last-child td {
  border-bottom: none;
}
body.admin-sidebar-zoho .mws-vd-tx-new {
  white-space: nowrap;
}

/* Vendor master list: Zoho-style wide table (scroll inside pane) */
body.admin-sidebar-zoho .mws-vd-master-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
body.admin-sidebar-zoho .mws-vd-master-table {
  min-width: 880px;
}
body.admin-sidebar-zoho .mws-vd-master-table thead th {
  background: var(--bs-body-bg);
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 1px 0 var(--bs-gray-200);
  border-left: none !important;
  border-right: none !important;
}
body.admin-sidebar-zoho .mws-vd-master-table tbody td,
body.admin-sidebar-zoho .mws-vd-master-table thead th {
  border-left: none !important;
  border-right: none !important;
}
body.admin-sidebar-zoho .mws-vd-master-table tbody tr {
  border-bottom: 1px solid var(--bs-gray-200);
}
body.admin-sidebar-zoho .mws-vd-list-num {
  font-variant-numeric: tabular-nums;
}
body.admin-sidebar-zoho .mws-vd-master-table .link-primary {
  font-weight: 600;
}
body.admin-sidebar-zoho .mws-vd-overview-hero {
  background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
}
body.admin-sidebar-zoho .mws-vd-header-meta a.link-primary {
  word-break: break-word;
}

/* New purchase order page */
.mws-purchase-zoho #productTable thead th {
  letter-spacing: 0.02em;
  font-size: 0.7rem !important;
}
.mws-po-footer {
  position: sticky;
  bottom: 0;
  z-index: 55;
  background: var(--bs-body-bg, #fff);
}
.mws-purchase-zoho .ui-autocomplete {
  z-index: 1100 !important;
  max-height: 280px;
  overflow-y: auto;
}
.mws-purchase-zoho .input-group .select2-container {
  flex: 1 1 auto;
  min-width: 0;
}
.mws-purchase-zoho .input-group .select2-container .select2-selection--single {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.mws-purchase-zoho .mws-item-details-zone {
  min-height: 175px;
}
.mws-purchase-zoho #productTable .lineTaxSelect {
  min-width: 7rem;
}
.mws-purchase-zoho #productTable .po-line-account,
.mws-purchase-zoho #productTable .po-line-currency {
  min-width: 6.5rem;
}
.mws-purchase-zoho .mws-po-header-card .input-group > .select2-container {
  flex: 1 1 auto;
  min-width: 0;
}
.mws-purchase-zoho .mws-po-table-settings .form-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--bs-gray-600);
}
.mws-purchase-zoho .mws-po-item-table thead th {
  font-size: 0.7rem;
  vertical-align: middle;
}
.mws-purchase-zoho .mws-po-totals-zoho {
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.05);
}
.mws-purchase-zoho .remove-item {
  cursor: pointer;
}
.mws-purchase-zoho .mws-shipment-pref-row .mws-shipment-gear-btn {
  position: relative;
  z-index: 5;
  pointer-events: auto;
}
.mws-purchase-zoho .mws-shipment-pref-row .select2-container {
  z-index: 1;
}
.mws-purchase-zoho .mws-payterm-pref-row .mws-payterm-gear-btn {
  position: relative;
  z-index: 5;
  pointer-events: auto;
}
.mws-purchase-zoho .mws-payterm-pref-row .select2-container {
  z-index: 1;
}
.mws-purchase-zoho .mws-po-discount-compact,
.mws-purchase-zoho .mws-po-adjust-compact {
  max-width: 420px;
}

/* --- Bills: All Bills list + New Bill (Zoho-style reference) --- */
/* Full width without negative margins (those caused horizontal crop in flex layout). */
#kt_app_content.mws-bills-page {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: visible;
}
/* Let main content shrink inside flex row without clipping children */
.app-main > .d-flex.flex-column-fluid {
  min-width: 0;
}
.mws-bills-page .mws-bills-fullwidth {
  max-width: none !important;
  width: 100%;
  box-sizing: border-box;
}
.mws-bill-form-zoho#kt_app_content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: visible;
}
.mws-bill-fullwidth {
  max-width: none !important;
  width: 100%;
  box-sizing: border-box;
}
.mws-bills-kpi .mws-bills-kpi-card {
  border: 1px solid #ebebeb;
  border-radius: 6px;
  background: #fff;
}
.mws-bills-table-card .table thead th {
  background: #f5f6f8;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: #7e8299;
  border-bottom: 1px solid #ebedf3;
}
.mws-bills-table-card .table tbody td {
  border-color: #f0f0f0;
}
.mws-status-paid {
  color: #198754;
  font-weight: 600;
  font-size: 0.75rem;
}
.mws-status-overdue {
  color: #dc3545;
  font-weight: 600;
  font-size: 0.75rem;
}
.mws-status-open {
  color: #3f4254;
  font-weight: 600;
  font-size: 0.75rem;
}
.mws-bill-num {
  font-weight: 600;
  color: #007bff;
}
.mws-bill-form-zoho .btn-primary,
.mws-bills-page .btn-primary {
  --bs-btn-bg: #007bff;
  --bs-btn-border-color: #007bff;
  --bs-btn-hover-bg: #0069d9;
  --bs-btn-hover-border-color: #0062cc;
  --bs-btn-active-bg: #0062cc;
  --bs-btn-active-border-color: #005cbf;
}
.mws-bill-form-zoho .btn.btn-primary:focus-visible {
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.35);
}

/* New Bill: Zoho-like header (vendor left, bill meta + subject right) */
.mws-bill-header-zoho {
  background: #fff;
  border-color: #e4e6ef !important;
}
.mws-bill-header-zoho .form-label {
  color: #3f4254;
}
.mws-bill-notes-attach .form-label {
  color: #181c32;
}

.mws-bill-meta-banner {
  background: #fff;
  border-color: #e4e6ef !important;
}
.mws-bill-meta-banner .border-bottom {
  border-color: #ebedf3 !important;
}

/* Purchase detail: rich-text notes from Quill */
.mws-po-notes-body p:last-child {
  margin-bottom: 0;
}
.mws-po-notes-body p {
  margin-bottom: 0.35rem;
}

/* Purchase / bill detail: Zoho-style top strip (credits, next steps, related POs) */
.mws-po-detail-top-strip__card {
  background: #fafbfc;
  border-color: #e4e6ef !important;
  border-radius: 0.5rem;
}
.mws-po-detail-top-strip__row--credits {
  background: #fff;
}
.mws-po-detail-top-strip__sparkle {
  color: #6f42c1;
  line-height: 1;
}
.mws-po-detail-top-strip .letter-spacing-sm {
  letter-spacing: 0.04em;
}
.mws-po-related-toggle {
  color: inherit;
  background: #fff;
}
.mws-po-related-toggle:hover,
.mws-po-related-toggle:focus {
  background: #f9f9f9;
  color: inherit;
}
.mws-po-related-chevron {
  transition: transform 0.2s ease;
}
.mws-po-related-toggle[aria-expanded="true"] .mws-po-related-chevron {
  transform: rotate(-180deg);
}

/* Purchases submenu: Bills row with quick-add */
body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]
  .app-sidebar
  .admin-sidebar-purchase-submenu
  .menu-item.d-flex
  > a.menu-link:last-child {
  min-width: 2.5rem;
  justify-content: center;
}
body.admin-sidebar-zoho[data-kt-app-layout="light-sidebar"]
  .app-sidebar
  .admin-sidebar-purchase-submenu
  .menu-item.d-flex
  > a.menu-link.active
  + a.menu-link {
  background-color: rgba(58, 134, 255, 0.18) !important;
  border-color: rgba(37, 49, 79, 0.12) !important;
}

/* Payments Made: master–detail voucher */
.mws-pm-detail-app {
  min-height: calc(100vh - 12rem);
}
.mws-pm-voucher {
  border-radius: 0.5rem;
}
.mws-pm-voucher__ribbon {
  position: absolute;
  top: 0;
  left: 0;
  width: 9rem;
  height: 9rem;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}
.mws-pm-voucher__ribbon span {
  position: absolute;
  display: block;
  width: 12rem;
  padding: 0.35rem 0;
  background: #28a745;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transform: rotate(-45deg);
  left: -2.75rem;
  top: 1.25rem;
}
.mws-pm-voucher__amountbox {
  background: #28a745;
  min-height: 7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.mws-payments-made-page .bg-light-primary {
  background-color: rgba(58, 134, 255, 0.08) !important;
}
.mws-payments-made-page .mws-pm-summary-box {
  background: #fdf6f0;
  border-color: #f0e4d8 !important;
}

/* Invoices: master–detail (invoice-details.php) */
.mws-inv-detail-app .mws-inv-detail-wrap {
  min-height: calc(100vh - 10rem);
}
.mws-inv-detail-app .mws-pm-detail-aside {
  width: 300px;
  max-width: 300px;
}
.mws-inv-detail-app .mws-invoice-preview-pane iframe {
  min-height: 82vh !important;
}
@media (max-width: 1199.98px) {
  .mws-inv-detail-app .mws-pm-detail-aside {
    width: 100%;
    max-width: 100%;
  }
  .mws-inv-detail-app .mws-invoice-preview-pane iframe {
    min-height: 70vh !important;
  }
}

/* Vendor Credits: master–detail + voucher */
.mws-vc-detail-app {
  min-height: calc(100vh - 12rem);
}

@media print {
  .mws-vc-detail-app .mws-pm-detail-aside {
    display: none !important;
  }
  .mws-vc-detail-app .mws-vc-voucher {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

.mws-vendor-credits-page .bg-light-primary {
  background-color: rgba(58, 134, 255, 0.08) !important;
}

/* New Vendor Credit: Zoho-style form (reference layout) */
.mws-vendor-credit-form .mws-vc-form-card {
  border-color: #e4e6ef !important;
}
.mws-vendor-credit-form .form-label.required::after,
.mws-vendor-credit-form label.required::after {
  content: " *";
  color: #f1416c;
}
.mws-vendor-credit-form .mws-vc-items-table thead th {
  background: #f5f6f8;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: #7e8299;
  border-bottom: 1px solid #ebedf3;
  vertical-align: middle;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.mws-vendor-credit-form .mws-vc-items-table tbody td {
  border-color: #f0f0f0;
  vertical-align: middle;
}
.mws-vendor-credit-form .mws-vc-items-wrap {
  background: #fff;
}
.mws-vendor-credit-form .mws-vc-toolbar-field {
  min-width: 10rem;
}
.mws-vendor-credit-form .mws-vc-toolbar-field--wide {
  min-width: 13rem;
}
.mws-vendor-credit-form .mws-vc-totals-box {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
/* PO Select2 opens under body; keep above modals/sidebar */
body > .select2-container--open {
  z-index: 11050;
}

/* --- Professional admin shell (site-wide) --- */
body.admin-sidebar-zoho .app-main {
  background-color: #f5f8fa;
}

body.admin-sidebar-zoho .app-content {
  padding: 1.25rem max(1rem, env(safe-area-inset-right, 0px)) 2rem max(1rem, env(safe-area-inset-left, 0px));
  overflow-x: hidden;
  max-width: 100%;
}

body.admin-sidebar-zoho #kt_app_content_container > .card,
body.admin-sidebar-zoho .app-container > .card {
  border: 1px solid #e9ecef;
  border-radius: 0.625rem;
  box-shadow: 0 0 20px 0 rgba(76, 87, 125, 0.04);
}

body.admin-sidebar-zoho #kt_app_content_container .card .card-header,
body.admin-sidebar-zoho .app-container .card .card-header {
  border-bottom: 1px solid #eff2f5;
}

body.admin-sidebar-zoho #kt_app_content_container .card > .text-center.mt-4 h1,
body.admin-sidebar-zoho #kt_app_content_container .card > .text-center.mt-4 h2 {
  font-size: 1.35rem;
  font-weight: 600;
  color: #181c32;
  letter-spacing: -0.02em;
}

body.admin-sidebar-zoho .table thead th {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7e8299 !important;
}

body.admin-sidebar-zoho .table.table-striped > tbody > tr:nth-of-type(odd) {
  --bs-table-accent-bg: rgba(245, 248, 250, 0.65);
}

body.admin-sidebar-zoho .btn {
  border-radius: 0.475rem;
  font-weight: 500;
}

body.admin-sidebar-zoho .form-control,
body.admin-sidebar-zoho .form-select {
  border-color: #e4e6ef;
}

body.admin-sidebar-zoho .form-control:focus,
body.admin-sidebar-zoho .form-select:focus {
  border-color: #b5d4f0;
  box-shadow: 0 0 0 0.2rem rgba(30, 136, 229, 0.12);
}

/* Dashboard: modern home layout */
.mws-dashboard {
  --mws-dash-bg: #f4f6fa;
  --mws-dash-surface: #ffffff;
  --mws-dash-border: #e8edf3;
  --mws-dash-text: #181c32;
  --mws-dash-muted: #7e8299;
  padding: 0.5rem max(1rem, env(safe-area-inset-right, 0px)) 1.75rem max(1rem, env(safe-area-inset-left, 0px));
  max-width: 100%;
  overflow-x: hidden;
}

body.admin-sidebar-zoho .mws-dashboard-wrap {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

body.admin-sidebar-zoho #kt_app_content.mws-dashboard-wrap,
body.admin-sidebar-zoho .mws-dashboard {
  background: transparent;
}

.mws-dashboard .mws-dash-hero {
  padding: 0.5rem 0.15rem 0;
}

.mws-dashboard .mws-dash-hero__eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}

.mws-dashboard .mws-dash-hero__title {
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--mws-dash-text);
  margin: 0 0 0.35rem;
  line-height: 1.2;
}

.mws-dashboard .mws-dash-hero__sub {
  margin: 0;
  color: var(--mws-dash-muted);
  font-size: 0.92rem;
  max-width: 36rem;
}

.mws-dashboard .mws-dash-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--mws-dash-text);
}

.mws-dashboard .mws-dash-section-sub {
  font-size: 0.82rem;
  color: var(--mws-dash-muted);
}

.mws-dashboard .mws-dash-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  padding: 1.25rem 1.35rem;
  margin-bottom: 0.25rem;
  background: var(--mws-dash-surface);
  border: 1px solid var(--mws-dash-border);
  border-radius: 1rem;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.04);
}

.mws-dashboard .mws-dash-toolbar__actions {
  justify-content: flex-end;
  width: 100%;
  max-width: 100%;
}

@media (min-width: 768px) {
  .mws-dashboard .mws-dash-toolbar__actions {
    width: auto;
  }
}

.mws-dashboard .mws-dash-quick-btn {
  border-radius: 0.65rem !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mws-dashboard .mws-dash-quick-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

/* Dashboard: transaction stats & boards */
.mws-transaction-stats .card {
  border: none;
  border-radius: 0.875rem;
  box-shadow: none;
}

.mws-stat-card {
  background: #ffffff;
  color: #181c32;
  border: 1px solid #e8edf3;
  border-radius: 0.875rem;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
  padding: 1.25rem 1.35rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.mws-stat-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #009ef7;
  border-radius: 4px 0 0 4px;
}

.mws-stat-card--income::before { background: linear-gradient(180deg, #f59e0b, #d97706); }
.mws-stat-card--receivable::before { background: linear-gradient(180deg, #fb923c, #ea580c); }
.mws-stat-card--sales::before { background: linear-gradient(180deg, #34d399, #059669); }
.mws-stat-card--credit::before { background: linear-gradient(180deg, #60a5fa, #2563eb); }
.mws-stat-card--today::before { background: linear-gradient(180deg, #a78bfa, #7c3aed); }

.mws-stat-card .mws-stat-label {
  color: #64748b;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

.mws-stat-card .mws-stat-value {
  font-weight: 800;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.15;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.mws-stat-card .mws-stat-note {
  color: #94a3b8;
  font-size: 0.78rem;
  line-height: 1.35;
}

.mws-stat-chip {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  background: #f1f5f9;
  color: #475569;
}

.mws-stat-chip--amber { background: #fef3c7; color: #d97706; }
.mws-stat-chip--orange { background: #ffedd5; color: #ea580c; }
.mws-stat-chip--green { background: #dcfce7; color: #059669; }
.mws-stat-chip--blue { background: #dbeafe; color: #2563eb; }
.mws-stat-chip--violet { background: #ede9fe; color: #7c3aed; }

a.mws-stat-card-link {
  color: inherit;
  text-decoration: none;
  display: block;
  height: 100%;
}

a.mws-stat-card-link:hover .mws-stat-card,
a.mws-stat-card-link:focus-visible .mws-stat-card {
  border-color: #cbd5e1;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

a.mws-stat-card-link:focus-visible {
  outline: 2px solid #009ef7;
  outline-offset: 2px;
  border-radius: 0.875rem;
}

.mws-dashboard .mws-dash-kpi-card {
  border: 1px solid var(--mws-dash-border);
  border-radius: 0.875rem;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
  background: var(--mws-dash-surface);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.mws-dashboard .mws-dash-kpi-card:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
  transform: translateY(-1px);
}

.mws-dashboard .mws-dash-kpi-card .card-body {
  padding: 1.15rem 1.2rem;
}

.mws-dashboard .mws-dash-kpi-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}

.mws-dashboard .mws-dash-kpi-value {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  line-height: 1.15;
}

.mws-dashboard .mws-dash-kpi-value--sm {
  font-size: 1rem;
  font-weight: 700;
}

.mws-dashboard .mws-dash-kpi-meta {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 0.15rem;
}

.mws-dashboard .mws-dash-kpi-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: #009ef7;
  text-decoration: none;
}

.mws-dashboard .mws-dash-kpi-link:hover {
  text-decoration: underline;
}

.mws-dashboard .mws-dash-panel {
  border: 1px solid var(--mws-dash-border);
  border-radius: 0.875rem;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
  background: var(--mws-dash-surface);
  overflow: hidden;
}

.mws-dashboard .mws-dash-panel--warning {
  border-color: #fde68a;
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 3rem);
}

.mws-dashboard .mws-dash-panel-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--mws-dash-text);
  letter-spacing: -0.01em;
}

.mws-board-card {
  background: #ffffff;
  border: 1px solid #e8edf3;
  border-radius: 0.875rem;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
  color: #334155;
  transition: box-shadow 0.18s ease;
}

.mws-dashboard .mws-board-card:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.mws-board-card .mws-board-title {
  color: #181c32;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 0.8rem;
}

.mws-board-card .mws-board-sub {
  color: #7e8299;
  font-size: 12px;
}

.mws-board-table {
  width: 100%;
  font-size: 12px;
}

.mws-board-table th {
  color: #7e8299;
  font-weight: 600;
  padding: 8px 6px;
  border-bottom: 1px solid #eff2f5;
}

.mws-board-table td {
  color: #3f4254;
  padding: 8px 6px;
  border-bottom: 1px solid #eff2f5;
}

.mws-board-pill {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
}

.mws-transaction-stats h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #181c32;
  letter-spacing: -0.02em;
}

.mws-dash-tc-wrap {
  flex-wrap: wrap;
}

.mws-dash-tc-timer-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 0.65rem;
  background: #fff5f8;
  border: 1px solid #fecdd3;
  line-height: 1.1;
}

.mws-dash-tc-timer-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #991b1b;
}

.mws-dash-tc-timer {
  font-size: 1.15rem;
  color: #dc2626;
  letter-spacing: 0.03em;
}

.mws-dash-expiry-notice {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding: 1rem 1.25rem;
  margin-left: 0.15rem;
  margin-right: 0.15rem;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  border-left-width: 4px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.mws-dash-expiry-notice--danger {
  background: #fff5f8;
  border-color: #fecdd3;
  border-left-color: #f1416c;
}

.mws-dash-expiry-notice--warning {
  background: #fffbeb;
  border-color: #fde68a;
  border-left-color: #f59e0b;
}

.mws-dash-expiry-notice__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.mws-dash-expiry-notice--danger .mws-dash-expiry-notice__icon {
  background: #fee2e2;
  color: #dc2626;
}

.mws-dash-expiry-notice--warning .mws-dash-expiry-notice__icon {
  background: #fef3c7;
  color: #d97706;
}

.mws-dash-expiry-notice__title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #181c32;
  line-height: 1.3;
}

.mws-dash-expiry-notice__text {
  font-size: 0.85rem;
  color: #5e6278;
  line-height: 1.4;
}

.mws-dash-expiry-notice__count {
  font-weight: 600;
  color: #181c32;
}

.mws-dash-expiry-notice--danger .mws-dash-expiry-notice__count {
  color: #b42318;
}

.mws-dash-expiry-notice__link {
  font-weight: 600;
  text-decoration: none;
}

.mws-dash-expiry-notice--danger .mws-dash-expiry-notice__link {
  color: #dc2626;
}

.mws-dash-expiry-notice--warning .mws-dash-expiry-notice__link {
  color: #b45309;
}

.mws-dash-expiry-notice__action {
  flex-shrink: 0;
  font-weight: 600;
}

.mws-dash-expiry-notice__close {
  flex-shrink: 0;
  margin-left: 0.25rem;
}

@media (max-width: 575.98px) {
  .mws-dash-expiry-notice__action {
    width: 100%;
  }

  .mws-dashboard .mws-dash-toolbar {
    padding: 1.1rem 1rem;
  }

  .mws-dashboard .mws-dash-quick-btn {
    width: 100%;
    justify-content: center;
  }

  .mws-dash-tc-wrap {
    width: 100%;
  }

  .mws-dash-tc-wrap form {
    width: 100%;
  }

  .mws-dash-tc-wrap form .btn {
    width: 100%;
  }
}

/* Admin session lock screen overlay */
.mws-screen-lock {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1.25rem, env(safe-area-inset-top, 0px)) max(1.25rem, env(safe-area-inset-right, 0px)) max(1.25rem, env(safe-area-inset-bottom, 0px)) max(1.25rem, env(safe-area-inset-left, 0px));
  overflow-x: hidden;
  overflow-y: auto;
}

.mws-screen-lock__backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.72) 0%, rgba(30, 64, 175, 0.55) 100%);
  backdrop-filter: blur(12px);
}

.mws-screen-lock__panel {
  position: relative;
  width: min(100%, 420px);
  max-height: calc(100dvh - 2.5rem);
  overflow-y: auto;
  padding: clamp(1.5rem, 5vw, 2rem);
  margin: auto 0;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
  text-align: center;
}

.mws-screen-lock__brand {
  margin-bottom: 1rem;
}

.mws-screen-lock__logo {
  max-height: 42px;
  max-width: min(100%, 220px);
  object-fit: contain;
}

.mws-screen-lock__clock {
  font-size: clamp(2.5rem, 8vw, 3.25rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  color: #0f172a;
  line-height: 1;
}

.mws-screen-lock__date {
  font-size: 0.95rem;
  color: #64748b;
  margin: 0.35rem 0 1.25rem;
}

.mws-screen-lock__user {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.mws-screen-lock__avatar {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
}

.mws-screen-lock__name {
  font-weight: 700;
  color: #0f172a;
  font-size: 1rem;
}

.mws-screen-lock__hint {
  font-size: 0.78rem;
  color: #64748b;
}

.mws-screen-lock__form {
  text-align: left;
}

body.admin-sidebar-zoho .card .card-title h1,
body.admin-sidebar-zoho .card .card-title h2,
body.admin-sidebar-zoho .card .card-title h3,
body.admin-sidebar-zoho .card .card-title h4 {
  color: #181c32;
  letter-spacing: -0.02em;
}

body.admin-sidebar-zoho .nav-line-tabs {
  border-bottom-color: #eff2f5;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}

body.admin-sidebar-zoho .nav-line-tabs .nav-link {
  color: #7e8299;
  font-weight: 500;
  white-space: nowrap;
  border-bottom-width: 2px;
  padding-bottom: 0.85rem;
}

body.admin-sidebar-zoho .nav-line-tabs .nav-link:hover {
  color: #009ef7;
}

body.admin-sidebar-zoho .nav-line-tabs .nav-link.active {
  color: #009ef7;
  border-bottom-color: #009ef7;
}

body.admin-sidebar-zoho div.dataTables_wrapper .dataTables_length,
body.admin-sidebar-zoho div.dataTables_wrapper .dataTables_filter {
  margin-bottom: 0.75rem;
}

body.admin-sidebar-zoho div.dataTables_wrapper .dataTables_info {
  color: #7e8299;
  font-size: 0.85rem;
}

body.admin-sidebar-zoho .badge {
  font-weight: 600;
  letter-spacing: 0.01em;
}

body.admin-sidebar-zoho .card-toolbar .btn-sm {
  font-size: 0.8rem;
}

/* Sign-in page (lock/index.php) */
.mws-lock-page {
  box-sizing: border-box;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1.25rem, env(safe-area-inset-top, 0px)) max(1.25rem, env(safe-area-inset-right, 0px)) max(1.25rem, env(safe-area-inset-bottom, 0px)) max(1.25rem, env(safe-area-inset-left, 0px));
  background: linear-gradient(145deg, #0f172a 0%, #1e3a8a 42%, #0284c7 100%);
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: Inter, system-ui, -apple-system, sans-serif;
}

.mws-lock-page *,
.mws-lock-page *::before,
.mws-lock-page *::after {
  box-sizing: border-box;
}

.mws-lock-page__orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(64px);
  pointer-events: none;
}

.mws-lock-page__orb--1 {
  width: min(52vw, 420px);
  height: min(52vw, 420px);
  top: -8%;
  right: -6%;
  background: rgba(56, 189, 248, 0.35);
}

.mws-lock-page__orb--2 {
  width: min(44vw, 360px);
  height: min(44vw, 360px);
  bottom: -10%;
  left: -8%;
  background: rgba(99, 102, 241, 0.32);
}

.mws-lock-page__shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  width: min(100%, 980px);
  max-width: 100%;
  align-items: stretch;
  margin: auto;
}

.mws-lock-page__hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #f8fafc;
  padding: clamp(1rem, 3vw, 2rem) clamp(0.5rem, 2vw, 1.5rem);
}

.mws-lock-page__hero-logo {
  max-height: 52px;
  max-width: min(100%, 260px);
  object-fit: contain;
  margin-bottom: 1.75rem;
  filter: drop-shadow(0 8px 24px rgba(15, 23, 42, 0.25));
}

.mws-lock-page__hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.75);
  margin-bottom: 0.65rem;
}

.mws-lock-page__hero-title {
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0 0 0.75rem;
  color: #ffffff;
}

.mws-lock-page__hero-sub {
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  line-height: 1.55;
  color: rgba(226, 232, 240, 0.82);
  max-width: 34ch;
  margin: 0 0 1.75rem;
}

.mws-lock-page__hero-time {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #ffffff;
}

.mws-lock-page__hero-date {
  margin-top: 0.4rem;
  font-size: 0.95rem;
  color: rgba(226, 232, 240, 0.72);
}

.mws-lock-page__card {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 1.25rem;
  box-shadow: 0 28px 72px rgba(15, 23, 42, 0.28);
  padding: clamp(1.75rem, 5vw, 2.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.mws-lock-page__card-head {
  margin-bottom: 1.5rem;
}

.mws-lock-page__card-title {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin: 0 0 0.35rem;
}

.mws-lock-page__card-sub {
  font-size: 0.92rem;
  color: #64748b;
  margin: 0;
}

.mws-lock-page__field {
  margin-bottom: 1rem;
}

.mws-lock-page__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.45rem;
}

.mws-lock-page__input-wrap {
  position: relative;
}

.mws-lock-page__input-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  font-size: 1.05rem;
}

.mws-lock-page__input {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.82rem 1rem 0.82rem 2.75rem;
  font-size: 0.95rem;
  color: #0f172a;
  background: #f8fafc;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.mws-lock-page__input:focus {
  outline: none;
  border-color: #38bdf8;
  background: #ffffff;
  box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.15);
}

.mws-lock-page__submit {
  width: 100%;
  margin-top: 0.35rem;
  border: none;
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mws-lock-page__submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(2, 132, 199, 0.4);
}

.mws-lock-page__submit:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.mws-lock-page__footer {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.78rem;
  color: #94a3b8;
  text-align: center;
  line-height: 1.45;
}

@media (max-width: 991.98px) {
  .mws-lock-page__shell {
    grid-template-columns: minmax(0, 1fr);
    max-width: min(100%, 440px);
    width: 100%;
  }

  .mws-lock-page__hero {
    display: none;
  }

  .mws-lock-page__card {
    padding: clamp(1.5rem, 6vw, 2rem);
  }

  .mws-lock-page__card-head .mws-lock-page__mobile-logo {
    display: block;
    max-height: 40px;
    max-width: min(100%, 200px);
    object-fit: contain;
    margin-bottom: 1rem;
  }
}

@media (min-width: 992px) {
  .mws-lock-page__card-head .mws-lock-page__mobile-logo {
    display: none;
  }
}