/* v83 — Data density layer. Visual-only: tables/forms/actions become tighter without changing system behavior. */
@media (min-width:901px){
  /* General data areas: compact but readable. */
  .content .table-wrap table{
    font-size:12.25px!important;
    line-height:1.13!important;
    font-weight:500!important;
  }
  .content .table-wrap th{
    padding:5px 8px!important;
    min-height:28px!important;
    line-height:1.08!important;
    font-size:11.25px!important;
    font-weight:800!important;
    letter-spacing:.012em!important;
    vertical-align:middle!important;
    white-space:nowrap!important;
  }
  .content .table-wrap td{
    padding:5px 8px!important;
    line-height:1.14!important;
    vertical-align:middle!important;
    font-style:normal!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
  .content .table-wrap td small{
    display:block!important;
    margin-top:1px!important;
    font-size:10px!important;
    line-height:1.05!important;
  }
  .content .table-wrap .btn,
  .content .table-wrap button{
    min-height:28px!important;
    height:28px!important;
    padding:4px 8px!important;
    border-radius:8px!important;
    font-size:11.5px!important;
    line-height:1!important;
    font-weight:700!important;
    white-space:nowrap!important;
    margin:0!important;
  }
  .content .form-grid{gap:8px 10px!important;margin-bottom:8px!important}
  .content .form-grid label{margin:4px 0 4px!important;font-size:11.5px!important;line-height:1.08!important}
  .content .form-grid input,.content .form-grid select{
    min-height:34px!important;
    height:34px!important;
    padding:5px 9px!important;
    font-size:12.5px!important;
  }
  .content .pagination{margin-top:8px!important;padding-top:8px!important}

  /* Riwayat Penjualan: give invoice/NOTA enough width, shrink short fields. */
  .sales-history-card{padding:10px 12px!important}
  .sales-history-wrap{overflow-x:auto!important}
  .sales-history-table{table-layout:fixed!important;min-width:900px!important;width:100%!important}
  .sales-history-table th:nth-child(1),.sales-history-table td:nth-child(1){width:16%;white-space:nowrap!important}
  .sales-history-table th:nth-child(2),.sales-history-table td:nth-child(2){width:25%;white-space:nowrap!important;overflow-wrap:normal!important}
  .sales-history-table th:nth-child(3),.sales-history-table td:nth-child(3){width:12%;white-space:nowrap!important}
  .sales-history-table th:nth-child(4),.sales-history-table td:nth-child(4){width:13%;white-space:nowrap!important}
  .sales-history-table th:nth-child(5),.sales-history-table td:nth-child(5){width:10%;white-space:nowrap!important}
  .sales-history-table th:nth-child(6),.sales-history-table td:nth-child(6){width:12%;white-space:nowrap!important}
  .sales-history-table th:nth-child(7),.sales-history-table td:nth-child(7){width:12%;white-space:nowrap!important}

  /* Riwayat Pembelian: purchase number gets room, actions stay in one row. */
  .purchase-history-wrap{overflow-x:auto!important}
  .purchase-history-table{table-layout:fixed!important;min-width:980px!important;width:100%!important}
  .purchase-history-table th:nth-child(1),.purchase-history-table td:nth-child(1){width:10%;white-space:nowrap!important}
  .purchase-history-table th:nth-child(2),.purchase-history-table td:nth-child(2){width:18%;white-space:normal!important;overflow-wrap:anywhere!important}
  .purchase-history-table th:nth-child(3),.purchase-history-table td:nth-child(3){width:14%}
  .purchase-history-table th:nth-child(4),.purchase-history-table td:nth-child(4){width:8%;white-space:nowrap!important}
  .purchase-history-table th:nth-child(5),.purchase-history-table td:nth-child(5),
  .purchase-history-table th:nth-child(6),.purchase-history-table td:nth-child(6),
  .purchase-history-table th:nth-child(7),.purchase-history-table td:nth-child(7){width:11%;white-space:nowrap!important}
  .purchase-history-table th:nth-child(8),.purchase-history-table td:nth-child(8){width:17%;white-space:nowrap!important}
  .purchase-action-row{display:flex!important;align-items:center!important;gap:4px!important;flex-wrap:nowrap!important}
  .purchase-action-row .btn{min-width:0!important;padding-left:7px!important;padding-right:7px!important}

  /* Supplier debt: dense table + input/button aligned horizontally. */
  #supplierPaymentCard{padding:11px 13px!important}
  #supplierPaymentCard>h3{margin:0 0 5px!important}
  #supplierPaymentCard>p.muted{margin:0 0 8px!important;line-height:1.25!important}
  #supplierPaymentCard label{margin:4px 0 4px!important}
  #supplierDebtPrompt{margin-top:8px!important}
  #supplierDebtSelected{margin-top:8px!important;padding:8px 10px!important}
  .supplier-debt-wrap{margin-top:8px!important;overflow-x:auto!important}
  .supplier-debt-table{table-layout:fixed!important;min-width:900px!important;width:100%!important}
  .supplier-debt-table th:nth-child(1),.supplier-debt-table td:nth-child(1){width:15%;white-space:nowrap!important}
  .supplier-debt-table th:nth-child(2),.supplier-debt-table td:nth-child(2){width:31%;white-space:normal!important;overflow-wrap:anywhere!important}
  .supplier-debt-table th:nth-child(3),.supplier-debt-table td:nth-child(3){width:13%;white-space:nowrap!important}
  .supplier-debt-table th:nth-child(4),.supplier-debt-table td:nth-child(4){width:14%;white-space:nowrap!important}
  .supplier-debt-table th:nth-child(5),.supplier-debt-table td:nth-child(5){width:12%;white-space:nowrap!important}
  .supplier-debt-table th:nth-child(6),.supplier-debt-table td:nth-child(6){width:15%;white-space:nowrap!important}
  #supplierPaymentCard .supplier-debt-table form.row{
    display:grid!important;
    grid-template-columns:minmax(94px,1fr) auto!important;
    align-items:center!important;
    gap:5px!important;
    flex-wrap:nowrap!important;
    margin:0!important;
    width:100%!important;
  }
  #supplierPaymentCard .supplier-debt-table form.row .money-input{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:28px!important;
    min-height:28px!important;
    margin:0!important;
    padding:4px 7px!important;
    font-size:11.5px!important;
    line-height:1!important;
    border-radius:8px!important;
  }
  #supplierPaymentCard .supplier-debt-table form.row button{
    height:28px!important;
    min-height:28px!important;
    margin:0!important;
    padding:4px 9px!important;
    font-size:11.5px!important;
  }

  /* Product/master tables: denser actions without collision. */
  .content .table-wrap td:last-child .btn,
  .content .table-wrap td:last-child button{margin:0!important}
  .content .table-wrap td:last-child{vertical-align:middle!important}
}

@media (max-width:900px){
  .content .table-wrap table{font-size:12px!important;line-height:1.15!important}
  .content .table-wrap th,.content .table-wrap td{padding:5px 7px!important}
  .content .table-wrap .btn,.content .table-wrap button{min-height:29px!important;padding:4px 8px!important;font-size:11.5px!important}
  .sales-history-table{min-width:820px!important}
  .purchase-history-table{min-width:900px!important}
  .supplier-debt-table{min-width:850px!important}
  #supplierPaymentCard .supplier-debt-table form.row{display:grid!important;grid-template-columns:minmax(90px,1fr) auto!important;gap:5px!important;align-items:center!important}
  #supplierPaymentCard .supplier-debt-table form.row .money-input{min-width:0!important;width:100%!important;height:29px!important;min-height:29px!important;padding:4px 7px!important}
  #supplierPaymentCard .supplier-debt-table form.row button{height:29px!important;min-height:29px!important;padding:4px 8px!important}
}
