/* Laundry In - Kasir Master Barang UI hotfix (safe external override). */
@media (max-width: 768px) {
  body.mobile-items-page .cashier-items-table-native .p-datatable-wrapper,
  body.mobile-items-page .cashier-items-table-source .p-datatable-wrapper {
    overflow-x: hidden !important;
  }
  body.mobile-items-page .cashier-items-table-native table,
  body.mobile-items-page .cashier-items-table-native .p-datatable-table,
  body.mobile-items-page .cashier-items-table-source table,
  body.mobile-items-page .cashier-items-table-source .p-datatable-table {
    table-layout: fixed !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  body.mobile-items-page .cashier-items-table-native thead th,
  body.mobile-items-page .cashier-items-table-source thead th {
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    line-height: 1 !important;
    font-size: .67rem !important;
    padding: 10px 3px !important;
  }
  body.mobile-items-page .cashier-items-table-native thead th:nth-child(1),
  body.mobile-items-page .cashier-items-table-native tbody td:nth-child(1),
  body.mobile-items-page .cashier-items-table-source thead th:nth-child(1),
  body.mobile-items-page .cashier-items-table-source tbody td:nth-child(1) { width: 9% !important; }
  body.mobile-items-page .cashier-items-table-native thead th:nth-child(2),
  body.mobile-items-page .cashier-items-table-native tbody td:nth-child(2),
  body.mobile-items-page .cashier-items-table-source thead th:nth-child(2),
  body.mobile-items-page .cashier-items-table-source tbody td:nth-child(2) {
    width: 48% !important;
    text-align: left !important;
  }
  body.mobile-items-page .cashier-items-table-native thead th:nth-child(2) .p-datatable-column-header-content,
  body.mobile-items-page .cashier-items-table-native thead th:nth-child(2) .p-column-header-content,
  body.mobile-items-page .cashier-items-table-source thead th:nth-child(2) .p-datatable-column-header-content,
  body.mobile-items-page .cashier-items-table-source thead th:nth-child(2) .p-column-header-content { justify-content: flex-start !important; }
  body.mobile-items-page .cashier-items-table-native thead th:nth-child(3),
  body.mobile-items-page .cashier-items-table-native tbody td:nth-child(3),
  body.mobile-items-page .cashier-items-table-source thead th:nth-child(3),
  body.mobile-items-page .cashier-items-table-source tbody td:nth-child(3) { width: 14% !important; text-align: center !important; }
  body.mobile-items-page .cashier-items-table-native thead th:nth-child(4),
  body.mobile-items-page .cashier-items-table-native tbody td:nth-child(4),
  body.mobile-items-page .cashier-items-table-source thead th:nth-child(4),
  body.mobile-items-page .cashier-items-table-source tbody td:nth-child(4) { width: 29% !important; text-align: center !important; }

  body.mobile-items-page .cashier-items-table-native tbody td:nth-child(4),
  body.mobile-items-page .cashier-items-table-source tbody td:nth-child(4) {
    padding: 6px !important;
    overflow: visible !important;
  }
  body.mobile-items-page .cashier-items-table-native .cashier-use-action,
  body.mobile-items-page .cashier-items-table-source .cashier-use-action {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 34px !important;
    height: 34px !important;
    padding: 0 8px !important;
    gap: 5px !important;
    white-space: nowrap !important;
    overflow: visible !important;
    border-radius: 9px !important;
  }
  body.mobile-items-page .cashier-items-table-native .cashier-use-action .p-button-label,
  body.mobile-items-page .cashier-items-table-source .cashier-use-action .p-button-label {
    display: inline !important;
    width: auto !important;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    font-size: .65rem !important;
    line-height: 1 !important;
  }

  /* Override the older nth-child(3) rule with higher specificity. */
  body.mobile-items-page .inventory-history-dialog-source .cashier-history-filter-source > .field.cashier-history-scope-source:nth-child(3),
  body.mobile-items-page .inventory-history-dialog-source .cashier-history-filter-source > .cashier-history-scope-force {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }
  body.mobile-items-page .inventory-history-dialog-source .cashier-history-scope-row-source,
  body.mobile-items-page .inventory-history-dialog-source .cashier-history-scope-force-row {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 8px !important;
  }
  body.mobile-items-page .inventory-history-dialog-source .cashier-history-scope-row-source > .p-button,
  body.mobile-items-page .inventory-history-dialog-source .cashier-history-scope-force-row > .p-button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    justify-content: center !important;
    white-space: nowrap !important;
  }

  body.mobile-items-page .cashier-usage-history-table-source table { table-layout: fixed !important; width:100% !important; }
  body.mobile-items-page .cashier-usage-history-table-source thead th,
  body.mobile-items-page .cashier-usage-history-table-source thead th * {
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }
  body.mobile-items-page .cashier-usage-history-table-source thead th {
    font-size: .56rem !important;
    line-height: 1 !important;
    padding: 7px 2px !important;
  }
  body.mobile-items-page .cashier-usage-history-table-source thead th:nth-child(1) { width: 8% !important; }
  body.mobile-items-page .cashier-usage-history-table-source thead th:nth-child(2) { width: 24% !important; }
  body.mobile-items-page .cashier-usage-history-table-source thead th:nth-child(3) { width: 28% !important; }
  body.mobile-items-page .cashier-usage-history-table-source thead th:nth-child(4) { width: 18% !important; }
  body.mobile-items-page .cashier-usage-history-table-source thead th:nth-child(5) { width: 22% !important; }
}


/* r2 - Kasir action icon-only square, no text wrapping. */
@media (max-width: 768px) {
  body.mobile-items-page .cashier-items-table-native thead th:nth-child(1),
  body.mobile-items-page .cashier-items-table-native tbody td:nth-child(1),
  body.mobile-items-page .cashier-items-table-source thead th:nth-child(1),
  body.mobile-items-page .cashier-items-table-source tbody td:nth-child(1) { width: 10% !important; }

  body.mobile-items-page .cashier-items-table-native thead th:nth-child(2),
  body.mobile-items-page .cashier-items-table-native tbody td:nth-child(2),
  body.mobile-items-page .cashier-items-table-source thead th:nth-child(2),
  body.mobile-items-page .cashier-items-table-source tbody td:nth-child(2) { width: 60% !important; }

  body.mobile-items-page .cashier-items-table-native thead th:nth-child(3),
  body.mobile-items-page .cashier-items-table-native tbody td:nth-child(3),
  body.mobile-items-page .cashier-items-table-source thead th:nth-child(3),
  body.mobile-items-page .cashier-items-table-source tbody td:nth-child(3) { width: 15% !important; }

  body.mobile-items-page .cashier-items-table-native thead th:nth-child(4),
  body.mobile-items-page .cashier-items-table-native tbody td:nth-child(4),
  body.mobile-items-page .cashier-items-table-source thead th:nth-child(4),
  body.mobile-items-page .cashier-items-table-source tbody td:nth-child(4) { width: 15% !important; }

  body.mobile-items-page .cashier-items-table-native tbody td:nth-child(4),
  body.mobile-items-page .cashier-items-table-source tbody td:nth-child(4) {
    padding: 5px 2px !important;
    text-align: center !important;
  }

  body.mobile-items-page .cashier-items-table-native .cashier-use-action,
  body.mobile-items-page .cashier-items-table-source .cashier-use-action {
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    border-radius: 9px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    overflow: hidden !important;
  }

  body.mobile-items-page .cashier-items-table-native .cashier-use-action .p-button-label,
  body.mobile-items-page .cashier-items-table-source .cashier-use-action .p-button-label {
    display: none !important;
  }

  body.mobile-items-page .cashier-items-table-native .cashier-use-action .p-button-icon,
  body.mobile-items-page .cashier-items-table-source .cashier-use-action .p-button-icon {
    margin: 0 !important;
    font-size: .9rem !important;
  }
}
