/* [TFH-322:TFH_HOTEL_INVOICE_INDEX:CSS-START] */
.tfh-hotel-invoice-index-list {
  min-width: 1180px;
  display: block;
}

.tfh-hotel-invoice-index-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-family: "Segoe UI",Arial,sans-serif;
  font-size: 12px;
}

.tfh-hotel-invoice-index-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 42px;
  padding: 8px 7px;
  color: #fff;
  background: linear-gradient(#6f879b,#334d63);
  text-align: center;
}

.tfh-hotel-invoice-index-table td {
  height: 39px;
  padding: 7px 8px;
  overflow: hidden;
  border-right: 1px solid #dce3ea;
  border-bottom: 1px solid #dce3ea;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tfh-hotel-invoice-index-table tbody tr {
  cursor: pointer;
}

.tfh-hotel-invoice-index-table tbody tr:nth-child(even) {
  background: #f4f7fa;
}

.tfh-hotel-invoice-index-table tbody tr:hover {
  background: #eaf3fb;
}

.tfh-hotel-invoice-index-table tbody tr.is-selected {
  background: #dcecf8;
  box-shadow: inset 4px 0 0 var(--tfh-blue-600);
}

.tfh-hotel-invoice-index-table td.is-financial {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tfh-hotel-invoice-index-table td.is-net {
  color: #765700;
  background: #fff8d8;
  font-weight: 850;
}

.tfh-hotel-invoice-index-table th:nth-child(1) { width: 105px; }
.tfh-hotel-invoice-index-table th:nth-child(2) { width: 95px; }
.tfh-hotel-invoice-index-table th:nth-child(3) { width: 190px; }
.tfh-hotel-invoice-index-table th:nth-child(4) { width: 130px; }
.tfh-hotel-invoice-index-table th:nth-child(5) { width: 210px; }
.tfh-hotel-invoice-index-table th:nth-child(6) { width: 120px; }
.tfh-hotel-invoice-index-table th:nth-child(7) { width: 115px; }
.tfh-hotel-invoice-index-table th:nth-child(8) { width: 110px; }
.tfh-hotel-invoice-index-table th:nth-child(9) { width: 105px; }
.tfh-hotel-invoice-index-table th:nth-child(10) { width: 90px; }

@media (max-width: 900px) {
  .tfh-hotel-invoice-header-grid,
  .tfh-hotel-invoice-party-grid,
  .tfh-hotel-invoice-bottom-grid {
    grid-template-columns: 1fr;
  }

  .tfh-hotel-invoice-grid {
    min-width: 1180px;
  }
}
/* [TFH-322:TFH_HOTEL_INVOICE_INDEX:CSS-END] */
/* [TFH-322:TFH_HOTEL_INVOICE_INDEX:CSS-GRID-SPACE-START] */
/*
  Hotel Invoice Index - more rows on screen (2026-09-25)
  - Accumulate moved into the filter row; the separate summary strip is gone
    (record count is in the header badge; summary + selection text moved to the footer).
  - Compact filters (38px controls).
  - Single-line rows (~34px): no wrapping, long text truncated with "…" (full text on hover).
  - Column widths tuned so all 14 columns fit a 1366px screen without sideways scrolling.
  - Sortable headers: ⇅ shows every column can be sorted; ▲ / ▼ on the active column.
  Scoped to #tfhHotelInvoiceIndexScreen: other screens are not affected.
*/
#tfhHotelInvoiceIndexScreen .tfh-invoice-index-body {
  padding: 10px 10px;
}

#tfhHotelInvoiceIndexScreen .tfh-invoice-index-panel {
  width: 100%;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 12px;
}

/* ---- Filters: one row, Accumulate at the end ---- */
#tfhHotelInvoiceIndexScreen .tfh-invoice-index-filters {
  grid-template-columns:
    repeat(2, minmax(128px, .72fr))
    minmax(150px, .85fr)
    minmax(180px, 1.15fr)
    repeat(3, minmax(130px, .78fr))
    auto;
  align-items: end;
  gap: 9px;
  padding: 10px 12px 11px;
}

#tfhHotelInvoiceIndexScreen .tfh-invoice-index-filters .tfh-form-field {
  gap: 4px;
  min-width: 0;
}

#tfhHotelInvoiceIndexScreen .tfh-invoice-index-filters .tfh-form-field > span {
  color: #3b5167;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.2;
  text-transform: uppercase;
}

#tfhHotelInvoiceIndexScreen .tfh-invoice-index-filters input,
#tfhHotelInvoiceIndexScreen .tfh-invoice-index-filters select {
  width: 100%;
  height: 38px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: .86rem;
  font-weight: 600;
}

#tfhHotelInvoiceIndexScreen .tfh-invoice-index-accumulate {
  height: 38px;
  min-height: 38px;
  padding: 0 22px;
  border-radius: 7px;
  font-size: .88rem;
  white-space: nowrap;
}

/* ---- Grid ----
   2026-09-25 refinement 2 (as requested):
   Invoice No. 120px | Date 100px (01-JAN-2025) | Client 300px, word-wrapped |
   all text columns word-wrap with flexible row height |
   the remaining width is shared equally by the five financial columns. */
#tfhHotelInvoiceIndexScreen .tfh-invoice-index-scroll {
  padding: 0;
}

#tfhHotelInvoiceIndexScreen .tfh-hotel-invoice-index-list {
  min-width: 1326px;
}

#tfhHotelInvoiceIndexScreen .tfh-hotel-invoice-index-table {
  width: 100%;
  min-width: 1326px;
  table-layout: fixed;
  font-size: .8rem;
}

#tfhHotelInvoiceIndexScreen .tfh-hotel-invoice-index-table thead th {
  height: auto;
  min-height: 38px;
  padding: 0;
  vertical-align: middle;
}

#tfhHotelInvoiceIndexScreen .tfh-invoice-sort-button {
  min-height: 38px;
  height: 100%;
  gap: 5px;
  padding: 3px 8px;
  font-size: .72rem;
  line-height: 1.15;
  white-space: normal;
}

#tfhHotelInvoiceIndexScreen .tfh-invoice-sort-label {
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: normal;
}

/* Rows grow with their content; everything top-aligned */
#tfhHotelInvoiceIndexScreen .tfh-hotel-invoice-index-table td {
  height: auto;
  min-height: 34px;
  padding: 8px 8px 7px;
  vertical-align: top;
  line-height: 1.3;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
}

/* Financial values stay on one line, right-aligned */
#tfhHotelInvoiceIndexScreen .tfh-hotel-invoice-index-table td.is-financial {
  white-space: nowrap;
  overflow-wrap: normal;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Invoice number and date on one line */
#tfhHotelInvoiceIndexScreen .tfh-hotel-invoice-index-table td:nth-child(1),
#tfhHotelInvoiceIndexScreen .tfh-hotel-invoice-index-table td:nth-child(2) {
  white-space: nowrap;
  overflow-wrap: normal;
  font-variant-numeric: tabular-nums;
}

/* Column widths: Invoice No. | Date | Client | Wing | Guest / Detail | Guest Phone | Amount | Invoice Status | Receipt No. | Status
   Hotel has a single money column, so Amount is fixed at 140px and the word-wrapped Guest / Detail column takes the spare width (minimum 160px). */
#tfhHotelInvoiceIndexScreen .tfh-hotel-invoice-index-table th:nth-child(1) { width: 120px; }
#tfhHotelInvoiceIndexScreen .tfh-hotel-invoice-index-table th:nth-child(2) { width: 100px; }
#tfhHotelInvoiceIndexScreen .tfh-hotel-invoice-index-table th:nth-child(3) { width: 300px; }
#tfhHotelInvoiceIndexScreen .tfh-hotel-invoice-index-table th:nth-child(4) { width: 120px; }
#tfhHotelInvoiceIndexScreen .tfh-hotel-invoice-index-table th:nth-child(5) { width: auto; }
#tfhHotelInvoiceIndexScreen .tfh-hotel-invoice-index-table th:nth-child(6) { width: 120px; }
#tfhHotelInvoiceIndexScreen .tfh-hotel-invoice-index-table th:nth-child(7) { width: 140px; }
#tfhHotelInvoiceIndexScreen .tfh-hotel-invoice-index-table th:nth-child(8) { width: 96px; }
#tfhHotelInvoiceIndexScreen .tfh-hotel-invoice-index-table th:nth-child(9) { width: 90px; }
#tfhHotelInvoiceIndexScreen .tfh-hotel-invoice-index-table th:nth-child(10) { width: 80px; }

/* ---- Footer: message + summary stacked in the centre ---- */
#tfhHotelInvoiceIndexScreen .tfh-invoice-index-footer-status {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 2px;
  text-align: center;
}

#tfhHotelInvoiceIndexScreen .tfh-invoice-index-footer-summary {
  min-height: 0;
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: #6a7a8b;
  font-size: .7rem;
}

@media (max-width: 1180px) {
  #tfhHotelInvoiceIndexScreen .tfh-invoice-index-filters {
    grid-template-columns: repeat(4, minmax(130px, 1fr));
  }

  #tfhHotelInvoiceIndexScreen .tfh-invoice-index-accumulate {
    width: 100%;
  }
}

@media (max-width: 720px) {
  #tfhHotelInvoiceIndexScreen .tfh-invoice-index-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #tfhHotelInvoiceIndexScreen .tfh-invoice-index-accumulate {
    grid-column: 1 / -1;
  }

  #tfhHotelInvoiceIndexScreen .tfh-invoice-index-footer-summary {
    display: none;
  }
}
/* [TFH-322:TFH_HOTEL_INVOICE_INDEX:CSS-GRID-SPACE-END] */
