.receipt-header {
  display: flex !important;
  justify-content: space-between;
  padding: 3px 8px 8px 70px !important;
  gap: 35px;
}
.receipt-header > div:first-child {
  width: 51%;
}
.receipt-header > div:last-child {
  width: 34%;
}
.receipt-header .field {
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
}
.receipt-header label {
  text-align: left;
}
.receipt-header > div:last-child .field {
  grid-template-columns: 125px minmax(0, 1fr);
}
.receipt-header .field:has(input[name='chequeAmount']) {
  max-width: 500px;
}
.receipt-card {
  padding: 10px;
  min-height: calc(100vh - 355px);
}
.receipt-card .grid-controls {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 0 14px;
}
.receipt-find {
  width: 32%;
  text-align: left;
  background: #fff;
  border: 1px solid #b7bbc3;
  color: #848890;
}
.receipt-card h2 {
  font-size: 23px;
  font-weight: 400;
  margin: 0 0 0 auto;
}
.receipt-totals .total-box {
  grid-template-columns: 1fr 1fr;
  min-width: 420px;
}
.receipt-detail-dialog .invoice-information {
  padding: 10px;
  grid-template-columns: 1fr;
}
.receipt-card .data-grid input {
  width: 100%;
  min-width: 60px;
}
.receipt-card .field {
  margin: 0;
}
@media (max-width: 850px) {
  .receipt-header {
    flex-direction: column;
    padding-left: 15px !important;
  }
  .receipt-header > div:first-child,
  .receipt-header > div:last-child {
    width: 100%;
  }
  .receipt-header .field {
    grid-template-columns: 100px minmax(0, 1fr);
  }
}
.receipt-amount-tools {
  display: flex;
  gap: 5px;
  align-items: center;
}
.receipt-amount-tools input {
  width: 210px;
}
.receipt-amount-tools button {
  min-width: 39px;
  padding: 6px;
}
.receipt-header .field:has(input[name='chequeAmount']) {
  max-width: none;
}
.receipt-header .field:has(input[name='bank']) {
  max-width: 560px;
}
.receipt-card .receipt-search {
  margin-left: auto;
}
.receipt-card h2 {
  margin-left: 0;
}
.receipt-card th:nth-child(1) {
  width: 17%;
}
.receipt-card th:nth-child(2) {
  width: 15%;
}
.receipt-card th:nth-child(3) {
  width: 28%;
}
.receipt-card th:nth-child(4),
.receipt-card th:nth-child(5),
.receipt-card th:nth-child(6) {
  width: 5%;
}
.receipt-card th:nth-child(7) {
  width: 25%;
}
.report-paper .report-group-row td{font-weight:600;background:#f3f5f9;border-bottom:1px solid #b7bbc3;text-align:left}

/* Additional Info facts (Purchase Payment / Receive Payment). */
.receipt-info-title { margin: 18px 0 8px; font-size: 15px; font-weight: 600; color: #222c3f; }
.receipt-fact { display: inline-block; min-height: 30px; line-height: 30px; color: #31405a; }
.receipt-fact.italic { font-style: italic; color: #858991; }
.receipt-fact.boxed { padding: 0 10px; border: 1px solid #d6dae2; border-radius: 6px; background: #f7f9fc; }

/* Invoice amounts keep enough room for full currency values; narrow screens scroll the grid. */
.receipt-card .receipt-invoice-grid { overflow-x: auto; width: 100%; min-width: 0; }
.receipt-card .receipt-invoice-grid .data-grid { min-width: 1176px; table-layout: fixed; }
.receipt-card .receipt-invoice-grid .data-grid th { width: auto; background: #f3f5fa; color: #4b5570; font-weight: 600; }
.receipt-card .receipt-invoice-grid .data-grid td.num { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.receipt-card .receipt-invoice-grid .receipt-line-pay input { flex: 1; width: 0; }
.receipt-detail-dialog { min-height: 340px; }
.receipt-detail-dialog output { display: block; padding: 6px 10px; min-height: 32px; font-weight: 600; border: 1px solid #d6dae6; border-radius: 8px; background: #f5f7fb; text-align: right; white-space: nowrap; }
.receipt-detail-dialog .receipt-detail-fact:nth-child(2) output { text-align: left; }
.receipt-dialog-money { display: flex; align-items: center; min-width: 0; border: 1px solid #c4c8d0; border-radius: 8px; background: #fff; overflow: hidden; }
.receipt-dialog-money > span { flex: none; padding: 0 10px; color: #848890; }
.receipt-dialog-money > input { min-width: 0; width: 100%; border: 0; box-shadow: none; text-align: right; }
.receipt-detail-dialog .receipt-discount-row { border-bottom: 1px solid #e6e9f2; padding-bottom: 8px; margin-bottom: 12px; }
@media(max-width:520px) {
  .receipt-detail-dialog .field { grid-template-columns: 108px minmax(0, 1fr); gap: 8px; }
  .receipt-detail-dialog .document-reference { white-space: normal; overflow-wrap: anywhere; }
}
