.headerBg{
  padding: 5px;
  background-color: #f7f7f7 !important;
}
.break-span {
  display: block;
}
.colWidth20{
  width:20px
}
.colWidth40{
  width:40px
}
.colWidth50{
  width:50px
}
.colWidth60{
  width:60px
}
.colWidth80{
  width:80px
}
.colWidth100{
  width:100px
}
.colWidth120{
  width:120px
}

.colWidth140{
  width:140px
}

/* Standard column widths */
.col-id {
  min-width: 40px;
  width: 40px;
  white-space: nowrap;
  text-align: center;
}
.col-docno {
  width: 1%;
  padding-right: 20px;
  white-space: nowrap;
}
.col-date {
  min-width: 60px;
  width: 60px;
  white-space: nowrap;
}
.col-amount {
  min-width: 80px;
  width: 80px;
  white-space: nowrap;

}
.col-qty {
  min-width: 80px;
  width: 80px;
  white-space: nowrap;
}
.col-status {
  min-width: 110px;
  width: 110px;
  white-space: nowrap;
}
.col-salesman {
  min-width: 140px;
  width: 140px;
  white-space: nowrap;
}


.DTwidth{
  width:60px; 
}
.DTwidth110{
  max-width:110px; white-space:nowrap;
}
.DTwidth90{
  max-width:90px; white-space:nowrap;
}
.DTwidth80{
  max-width:80px; white-space:nowrap;
}
.DTwidth60{
  max-width:60px; white-space:nowrap !important;
}
.DTwidth50{
  max-width:50px; white-space:nowrap;
}
.DTwidth15{
  max-width:15px; white-space:nowrap;
}
.DTwidth10{
  max-width:10px; white-space:nowrap;
}

/* Item master list: add breathing room for right-aligned numeric columns */
#itemsTable th.text-end,
#itemsTable td.text-end {
  padding-right: 20px;
}

/* Item master list: highlight Retail Price and Current Stock */
#itemsTable td:nth-child(10),
#itemsTable td:nth-child(11) {
  color: #840084;
}

/* Item master list: stock column background */
#itemsTable td:nth-child(10) {
  background-color: #F0FAFF;
}
/* Item master list: retail price column background */
#itemsTable td:nth-child(11) {
  background-color: #f9efeee3;
}
/* PO list: total column background */
#poTable td.po-total-col {
  background-color: #f9efeee3 !important;
}
.pi-total-col {
  background-color: #f9efeee3 !important;
}
.pi-invoice-col {
  background-color: #F0FAFF !important;
}
.po-total-col{
  width:1% !important;
  max-width:1% !important;
  white-space:nowrap;
}
#poTable th:nth-child(5),
#poTable td:nth-child(5){
  width:1%;
  white-space:nowrap;
}
.po-table-fixed{
  table-layout: fixed;
}
.po-select-col{
  width:36px;
  min-width:36px;
  max-width:36px;
}
.po-id-col{
  width:1% !important;
  white-space:nowrap;
}
.po-date-col{
  width:1% !important;
  white-space:nowrap;
}
.po-status-col{
  width:1% !important;
  white-space:nowrap;
}
.po-action-col{
  width:1% !important;
  white-space:nowrap;
}

/* Procurement module: small pagination */
.procurement-page .pagination {
  --bs-pagination-padding-x: 0.5rem;
  --bs-pagination-padding-y: 0.25rem;
  --bs-pagination-font-size: 0.875rem;
}

/* Inventory module: small pagination */
.inventory-page .pagination {
  --bs-pagination-padding-x: 0.5rem;
  --bs-pagination-padding-y: 0.25rem;
  --bs-pagination-font-size: 0.875rem;
}
.sr-input-120{
  width:120px;
  max-width:120px;
}
.DTwidthMin{
  width:1% !important;
  white-space:nowrap;
}
.po-table-min-col{
  width:1%;
  white-space:nowrap;
}
#poTable th:nth-child(3),
#poTable td:nth-child(3){
  width:1%;
  white-space:nowrap;
}
.po-no-col{
  width:1% !important;
  max-width:1% !important;
  white-space:nowrap;
}
#poTable{
  table-layout:auto;
}


.borderHomePO {
  border: var(--tb-border-width) var(--tb-border-style) #f0f1f3d9 !important;
}

.dashboard-summary > [class*="col-"] {
  display: flex;
}

.dashboard-summary .card {
  height: 100%;
  width: 100%;
}

.dashboard-summary {
  margin-bottom: 1rem;
}

.dashboard-summary .card-body {
  padding: 0.5rem 1rem;
}




/* ================================
   PR ITEMS – COMPACT ERP STYLE
================================ */

/* Table spacing */
#prItems.table-sm td,
#prItems.table-sm th {
  padding: 0.35rem 0.5rem;
  vertical-align: middle;
}

/* Compact inputs inside PR items */
#prItems .form-control-sm {
  padding: 0.15rem 0.4rem;
  font-size: 0.8rem;
  height: 20px;
}

/* Number input alignment */
#prItems input[type="number"] {
  text-align: right;
}

/* Date input */
#prItems input[type="text"],
#prItems input[type="date"] {
  min-width: 130px;
}

/* Remove button compact */
#prItems .btn-sm {
  padding: 0.2rem 0.4rem;
  line-height: 1;
}

/* Hover highlight like ERP systems */
#prItems tbody tr:hover {
  background-color: #f8f9fa;
}

/* Remove extra bottom margin */
#prItems {
  margin-bottom: 0;
}

/* Tighter grid feel for item tables */
.erp-items-table th,
.erp-items-table td {
  padding: 0;
}

.erp-items-table {
  border-collapse: collapse;
  border-spacing: 0;
}

.erp-items-table .form-control-sm {
  padding: 0.1rem 0.2rem;
  height: 22px;
  margin: 0;
  border-radius: 0;
}

.erp-items-table td {
  padding-left: 0;
  padding-right: 0;
}

@media (min-width: 768px) {
  .erp-items-table td:not(:last-child) .form-control-sm,
  .erp-items-table td:not(:last-child) .form-select,
  .erp-items-table td:not(:last-child) textarea.form-control {
    border-right: 0;
  }

  .erp-items-table td:last-child .form-control-sm,
  .erp-items-table td:last-child .form-select,
  .erp-items-table td:last-child textarea.form-control {
    border-right: 1px solid #ced4da;
  }
}

.erp-items-table td .lineTotal {
  border-right: 1px solid #ced4da !important;
}

.erp-items-table .poQty {
  text-align: right;
}

.erp-items-table tbody tr:first-child td {
  padding-top: 4px;
}

/* PR items: remove visual gaps between inputs */
#prItems td {
  padding-left: 0;
  padding-right: 0;
}

#prItems .form-control-sm {
  width: 100%;
  margin: 0;
}

/* Remove inter-cell spacing for PR items */
#prItems.table {
  border-collapse: collapse;
  border-spacing: 0;
}

#prItems td,
#prItems th,
#prItems.table > :not(caption) > * > * {
  padding: 0;
}

#prItems .form-control-sm {
  border-radius: 0;
  display: block;
}

#prItems td:not(:last-child) .form-control-sm {
  border-right: 0;
}

#prItems td:last-child .form-control-sm {
  border-right: 1px solid #ced4da;
}

@media (min-width: 768px) {
  #prItems tbody tr + tr .form-control-sm {
    border-top: 0;
  }
}

#prItems .qty {
  width: 100%;
}

/* PO VIEW HEADER LABELS */
.po-form-header .label-value {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 0.25rem;
  font-size: inherit;
  padding-bottom: 0.1rem;
}
.po-form-header .label-value + .label-value {
  margin-top: 0.25rem;
}
.po-form-header .label-value.align-items-start {
  align-items: flex-start;
}
.po-form-header .detail-line {
  font-size: inherit;
}
.po-form-header .detail-space {
  height: 0.5rem;
}
.po-form-header .label-text {
  color: #6c757d;
  min-width: 120px;
}
.po-form-header .label-text::after {
  content: ":";
  margin-left: 0.15rem;
}
.po-form-header .value-text {
  flex: 1;
  text-align: left;
}

.po-view-header {
  padding-right: 0;
}

.po-print-box .label-value {
  gap: 0.5rem;
  flex-wrap: wrap;
}

.po-print-box .label-text {
  min-width: 110px;
  flex: 0 0 auto;
}

.po-print-box .value-text {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.pi-header-row .pi-header-group {
  width: 100%;
}

.po-print-box {
  border: 1px solid #ced4da;
  padding: 6px 12px;
  border-radius: 4px;
  margin-bottom: 6px;
  background: #fff;
}

.po-print-box-row {
  align-items: stretch;
}

@media (min-width: 992px) {
  .po-print-box-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
  }

  .po-print-col-left {
    flex: 0 0 30% !important;
    max-width: 30% !important;
    width: 30% !important;
  }

  .po-print-col-right {
    flex: 0 0 68% !important;
    max-width: 68% !important;
    width: 68% !important;
  }
}

.po-print-box-row {
  width: 100%;
}

.po-print-col-left,
.po-print-col-right {
  flex-grow: 1;
}

@media print {
  .po-print-box-row {
    display: block;
    gap: 0;
  }
  .po-print-col-left,
  .po-print-col-right {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }
}

/* ================================
   FORM VALIDATION (ERP STYLE)
================================ */
.is-invalid {
  border-color: #dc3545 !important;
  background-image: none !important;
}

.invalid-feedback {
  font-size: 0.75rem;
}

/* Remove row separators in ERP item tables */
.erp-items-table > :not(caption) > * > * {
  border-top: 0;
  border-bottom: 0;
}

/* Bottom line for PI items list */
.pi-items-table tbody tr:last-child > * {
  border-bottom: 1px solid #dee2e6 !important;
}

@media (max-width: 767.98px) {
  .pi-items-table tbody tr:last-child {
    border-bottom: 1px solid #dee2e6;
  }
}

.dataTables_wrapper .dataTable thead th,
.dataTables_wrapper .dataTable thead td {
  background-color: #f7f7f7 !important;
}

/* ===============================
   GLOBAL SMALL BUTTON COMPACTING
   =============================== */

   .btn-sm,
   .btn-group-sm > .btn {
     --tb-btn-padding-y: 0.01rem;
     --tb-btn-padding-x: 0.5rem;
     --tb-btn-font-size: 0.7rem;
     --tb-btn-border-radius: 0.15rem;
   }

   /* ==============================
   ERP ITEM TABLE – MOBILE VIEW
   Applies to PR, PO, Invoice, GRN
============================== */

@media (max-width: 767px) {

  /* Table becomes card layout */
  .erp-items-table,
  .erp-items-table thead,
  .erp-items-table tbody,
  .erp-items-table th,
  .erp-items-table tr {
    display: block;
    width: 100%;
  }

  .erp-items-table thead {
    display: none;
  }

  .erp-items-table tr {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
  }

  /* Each cell = label + input stacked */
  .erp-items-table td {
    display: block;                 /* 🔴 FIX: no flex */
    padding: 0.35rem 0;
    border: none;
    font-size: 0.875rem;
    text-align: left;
  }

  /* Label */
  .erp-items-table td::before {
    content: attr(data-label);
    display: block;                 /* 🔴 FIX */
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.25rem;
    white-space: normal;
  }

  /* Inputs full width */
  .erp-items-table td input,
  .erp-items-table td select,
  .erp-items-table td textarea {
    width: 100%;
    text-align: left;
    border-right: 1px solid #ced4da;
  }

  .erp-items-table td input,
  .erp-items-table td select,
  .erp-items-table td textarea {
    border-right: 1px solid #ced4da !important;
  }

  /* Action column (delete button) */
  .erp-items-table td:last-child {
    text-align: right;
  }
}
body {
    font-size: 0.75rem;
}

.pr-item-dropdown {
  width: 600px;
  max-width: 100%;
  position: fixed;
  z-index: 1050;
}

.po-item-dropdown {
  width: 600px;
  max-width: 100%;
  position: fixed;
  z-index: 1050;
  margin-top: -2px;
  font-size: 0.7rem;
}

.si-item-dropdown {
  width: 600px;
  max-width: 100%;
  position: fixed;
  z-index: 1050;
  margin-top: -2px;
  font-size: 0.7rem;
}

.po-item-dropdown table,
.po-item-dropdown th,
.po-item-dropdown td {
  font-size: inherit;
}

.si-item-dropdown table,
.si-item-dropdown th,
.si-item-dropdown td {
  font-size: inherit;
}

.poItemCode {
  padding-right: 20px;
  font-size: inherit;
}

.stock-movement-dropdown {
  width: 600px;
  max-width: 100%;
  position: fixed;
  z-index: 1050;
}

.pr-item-dropdown tr:hover,
.pr-item-dropdown .autocomplete-active {
  background-color: #007BFF;
  color: #fff;
}

.po-item-dropdown tr:hover,
.po-item-dropdown .autocomplete-active {
  background-color: #007BFF;
  color: #fff;
}

.si-item-dropdown tr:hover,
.si-item-dropdown .autocomplete-active {
  background-color: #007BFF;
  color: #fff;
}

.stock-movement-dropdown tr:hover,
.stock-movement-dropdown .autocomplete-active {
  background-color: #007BFF;
  color: #fff;
}

.pr-item-dropdown tr:hover td,
.pr-item-dropdown .autocomplete-active td {
  color: #fff;
}

.po-item-dropdown tr:hover td,
.po-item-dropdown .autocomplete-active td {
  color: #fff;
}

.si-item-dropdown tr:hover td,
.si-item-dropdown .autocomplete-active td {
  color: #fff;
}

.stock-movement-dropdown tr:hover td,
.stock-movement-dropdown .autocomplete-active td {
  color: #fff;
}

.po-item-dropdown thead th {
  font-weight: 400;
}

.pr-item-dropdown table,
.pr-item-dropdown th,
.pr-item-dropdown td {
  text-align: left;
}

.po-item-dropdown table,
.po-item-dropdown th,
.po-item-dropdown td {
  text-align: left;
}

.si-item-dropdown table,
.si-item-dropdown th,
.si-item-dropdown td {
  text-align: left;
}

.stock-movement-dropdown table,
.stock-movement-dropdown th,
.stock-movement-dropdown td {
  text-align: left;
}

.pr-items-wrap {
  overflow: visible;
}

@media (max-width: 768px) {
  .pr-item-dropdown {
    width: 100%;
  }
  .po-item-dropdown {
    width: 100%;
  }
  .si-item-dropdown {
    width: 100%;
  }
  .stock-movement-dropdown {
    width: 100%;
  }
}

#branchSwitcherWrap .form-select {
  min-width: 200px;
}

#sidebarSettings .settings-active {
  color: rgba(123, 255, 0, 0.904) !important;
  font-weight: 600;
}

#sidebarSettings .settings-active i {
  color: rgba(123, 255, 0, 0.904) !important;
}

.settings-config-card .table-responsive {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.menu-active {
  color: rgba(123, 255, 0, 0.904) !important;
  font-weight: 600;
}

.menu-active i,
.menu-active span {
  color: rgba(123, 255, 0, 0.904) !important;
}

/* SweetAlert2 sizing to match app UI */
.swal2-popup {
  font-size: 0.7rem;
}

.swal2-title {
  font-size: 0.8rem;
}

.swal2-html-container {
  font-size: 0.7rem;
}

.swal2-actions .swal2-styled {
  font-size: 0.7rem;
  padding: 0.3rem 0.7rem;
}

/* ===============================
   PRINT STYLES (GLOBAL)
=============================== */
.print-letterhead {
  display: none;
  margin-bottom: 1rem;
}

.print-letterhead-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.print-company-name {
  font-size: 1.1rem;
  font-weight: 600;
}

.print-company-meta {
  font-size: 0.8rem;
  color: #495057;
}

.print-doc-title {
  font-size: 1rem;
  font-weight: 600;
}

.print-doc-meta {
  font-size: 0.8rem;
}

.stock-movement-summary {
  background-color: #fbfbfb;
}

table.dataTable tfoot tr {
  background-color: #fbfbfb;
}

table.dataTable tfoot th,
table.dataTable tfoot td {
  padding: 0.35rem 0.5rem;
  font-weight: 600;
}

/* Item master input-group label width */
.item-master-label {
  min-width: 112px;
  justify-content: left;
}
.item-master-label-small {
  min-width: 90px;
  justify-content: left;
}
.item-master-label-xsmall {
  min-width: 60px;
  justify-content: left;
}

.po-form-header .form-check-input + .form-check-label {
  margin-left: 0.2rem;
}


.support-inline {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

table.dataTable tr.support-child td {
  padding: 0;
  border: 0;
  background: #f9fafb;
}

table.dataTable tr.support-child .table-sm td {
  padding: 0.25rem 0.5rem;
}

#topbar-item-results .topbar-item-result.active,
#topbar-item-results .topbar-item-result:hover {
  background-color: #0d6efd;
  color: #fff;
  cursor: pointer;
}

#topbar-item-results .topbar-item-result.active .text-muted,
#topbar-item-results .topbar-item-result:hover .text-muted {
  color: #e9f2ff !important;
}

#topbar-item-results .topbar-item-result.active h6,
#topbar-item-results .topbar-item-result:hover h6 {
  color: #fff;
}

/* Slow menu expansion */
.app-menu .menu-dropdown {
  overflow: hidden;
  transition: height 0.45s ease;
}

.app-menu .menu-dropdown.collapsing {
  transition: height 0.45s ease;
}

.po-print-action {
  display: inline-flex;
  align-items: center;
}

.po-print-icon {
  font-size: 16px;
  line-height: 1;
  color: #2d2f36;
}
.blink-warning {
  animation: blink-warning 2.5s step-start infinite;
}
@keyframes blink-warning {
  50% {
    opacity: 0.8;
  }
}
