/* [TFH-302:TFH_TRANSPORT_INVOICE_INDEX:CSS-START] */
.tfh-header-index-button {
  min-height: 38px;
  padding: 7px 13px;
  font-size: .68rem;
}

.tfh-invoice-index-screen {
  width: 100vw;
  height: 100dvh;
  position: fixed;
  inset: 0;
  z-index: 47;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 0%, rgba(47,127,196,.14), transparent 30%),
    linear-gradient(135deg,#e9f0f6,#f8fafc 48%,#e9f1f7);
}

.tfh-invoice-index-body {
  min-height: 0;
  overflow: hidden;
  padding: 16px;
}

.tfh-invoice-index-panel {
  width: min(1500px, 100%);
  height: 100%;
  margin: auto;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(17,49,84,.13);
  border-radius: 16px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 14px 38px rgba(18,52,92,.10);
}

.tfh-invoice-index-filters {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(135px, .75fr))
    minmax(165px, .9fr)
    minmax(210px, 1.2fr)
    repeat(3, minmax(145px, .8fr));
  gap: 10px;
  padding: 13px;
  border-bottom: 1px solid var(--tfh-line);
  background: linear-gradient(#fbfcfd,#f3f6f9);
}

.tfh-invoice-index-scroll {
  min-height: 0;
  overflow: auto;
  padding: 11px;
  scrollbar-gutter: stable;
}

.tfh-invoice-index-list {
  display: grid;
  gap: 9px;
}

.tfh-invoice-index-row {
  width: 100%;
  display: grid;
  grid-template-columns:
    minmax(220px,.9fr)
    minmax(360px,1.55fr)
    minmax(430px,1.65fr)
    minmax(125px,.55fr);
  gap: 12px;
  align-items: stretch;
  padding: 11px 13px;
  border: 1px solid rgba(17,49,84,.12);
  border-radius: 12px;
  color: var(--tfh-ink-900);
  background: #fff;
  box-shadow: 0 5px 15px rgba(18,52,92,.05);
  text-align: left;
  cursor: pointer;
}

.tfh-invoice-index-row:hover {
  border-color: rgba(47,127,196,.35);
  background: #fbfdff;
}

.tfh-invoice-index-row.is-selected {
  border-color: var(--tfh-blue-500);
  background: #eef6fd;
  box-shadow: 0 0 0 3px rgba(47,127,196,.10);
}

.tfh-invoice-index-identity,
.tfh-invoice-index-party,
.tfh-invoice-index-financial {
  display: grid;
  gap: 7px;
}

.tfh-invoice-index-identity {
  grid-template-columns: 1fr 1fr;
}

.tfh-invoice-index-identity > span:first-child {
  grid-column: 1 / -1;
}

.tfh-invoice-index-party {
  grid-template-columns: 1.15fr 1fr .75fr;
}

.tfh-invoice-index-financial {
  grid-template-columns: repeat(5, minmax(72px,1fr));
}

.tfh-invoice-index-identity > span,
.tfh-invoice-index-party > span,
.tfh-invoice-index-financial > span {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 7px 8px;
  border: 1px solid rgba(17,49,84,.07);
  border-radius: 8px;
  background: #f8fafc;
}

.tfh-invoice-index-row small {
  color: var(--tfh-blue-600);
  font-size: .54rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tfh-invoice-index-row strong,
.tfh-invoice-index-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tfh-invoice-index-row strong {
  font-size: .71rem;
}

.tfh-invoice-index-row em {
  color: #6b7888;
  font-size: .6rem;
  font-style: normal;
}

.tfh-invoice-index-financial strong {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tfh-invoice-index-financial .is-net {
  background: #fff8d8;
}

.tfh-invoice-index-financial .is-net strong {
  color: #765700;
}

.tfh-invoice-index-financial .is-driver {
  background: #e9f7ef;
}

.tfh-invoice-index-financial .is-driver strong {
  color: #11683f;
}

.tfh-invoice-index-statuses {
  display: grid;
  align-content: center;
  gap: 7px;
}

.tfh-invoice-state,
.tfh-invoice-general-status {
  display: grid;
  place-items: center;
  min-height: 31px;
  padding: 6px;
  border-radius: 999px;
  font-size: .61rem;
  font-weight: 850;
  text-align: center;
}

.tfh-invoice-state.is-finalized {
  color: #11683f;
  background: #dff5e9;
}

.tfh-invoice-state.is-decide {
  color: #765700;
  background: #fff1b8;
}

.tfh-invoice-general-status {
  color: #27445f;
  background: #edf2f7;
}

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

  .tfh-invoice-index-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .tfh-invoice-index-body {
    padding: 8px;
  }

  .tfh-invoice-index-filters,
  .tfh-invoice-index-row {
    grid-template-columns: 1fr;
  }

  .tfh-invoice-index-party,
  .tfh-invoice-index-financial {
    grid-template-columns: 1fr 1fr;
  }
}
/* [TFH-302:TFH_TRANSPORT_INVOICE_INDEX:CSS-END] */
/* [TFH-302:TFH_TRANSPORT_INVOICE_INDEX:V028-CSS-START] */
.tfh-invoice-index-scroll {
  padding: 0;
  border-top: 1px solid rgba(17,49,84,.12);
  background: #fff;
}

.tfh-invoice-index-list {
  min-width: 1380px;
  display: block;
}

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

.tfh-invoice-index-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 42px;
  padding: 8px 7px;
  border-right: 1px solid rgba(255,255,255,.18);
  border-bottom: 1px solid #233d55;
  color: #fff;
  background: linear-gradient(#6f879b,#334d63);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}

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

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

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

.tfh-invoice-index-table tbody tr.is-selected {
  background: #dcecf8;
  box-shadow:
    inset 4px 0 0 var(--tfh-blue-600),
    inset 0 1px 0 rgba(47,127,196,.35),
    inset 0 -1px 0 rgba(47,127,196,.35);
}

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

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

.tfh-invoice-index-table td.is-net {
  color: #765700;
  background: rgba(255,248,216,.72);
  font-weight: 850;
}

.tfh-invoice-index-table td.is-driver-pay {
  color: #11683f;
  background: rgba(233,247,239,.78);
  font-weight: 800;
}

.tfh-invoice-index-table td.is-finalized,
.tfh-invoice-index-table td.is-to-decide {
  text-align: center;
  font-weight: 800;
}

.tfh-invoice-index-table td.is-finalized {
  color: #11683f;
}

.tfh-invoice-index-table td.is-to-decide {
  color: #765700;
}

.tfh-invoice-index-table th:nth-child(1) { width: 104px; }
.tfh-invoice-index-table th:nth-child(2) { width: 96px; }
.tfh-invoice-index-table th:nth-child(3) { width: 190px; }
.tfh-invoice-index-table th:nth-child(4) { width: 128px; }
.tfh-invoice-index-table th:nth-child(5) { width: 150px; }
.tfh-invoice-index-table th:nth-child(6) { width: 110px; }
.tfh-invoice-index-table th:nth-child(7),
.tfh-invoice-index-table th:nth-child(8),
.tfh-invoice-index-table th:nth-child(9),
.tfh-invoice-index-table th:nth-child(10),
.tfh-invoice-index-table th:nth-child(11) { width: 98px; }
.tfh-invoice-index-table th:nth-child(12) { width: 106px; }
.tfh-invoice-index-table th:nth-child(13) { width: 104px; }
.tfh-invoice-index-table th:nth-child(14) { width: 90px; }
/* [TFH-302:TFH_TRANSPORT_INVOICE_INDEX:V028-CSS-END] */
/* [TFH-302:TFH_TRANSPORT_INVOICE_INDEX:V031-CSS-START] */
/* [TFH-302:TFH_TRANSPORT_INVOICE_INDEX:V031-CSS-END] */
/* [TFH-302:TFH_TRANSPORT_INVOICE_INDEX:CSS-GRID-SPACE-START] */
/*
  Transport 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 #tfhTransportInvoiceIndexScreen: Flight / Hotel indexes are not affected.
*/
#tfhTransportInvoiceIndexScreen .tfh-invoice-index-body {
  padding: 10px 10px;
}

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

/* ---- Filters: one row, Accumulate at the end ---- */
#tfhTransportInvoiceIndexScreen .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;
}

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

#tfhTransportInvoiceIndexScreen .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;
}

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

#tfhTransportInvoiceIndexScreen .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. */
#tfhTransportInvoiceIndexScreen .tfh-invoice-index-scroll {
  padding: 0;
}

#tfhTransportInvoiceIndexScreen .tfh-invoice-index-list {
  min-width: 1610px;
}

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

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

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

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

/* Rows grow with their content; everything top-aligned */
#tfhTransportInvoiceIndexScreen .tfh-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 */
#tfhTransportInvoiceIndexScreen .tfh-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 */
#tfhTransportInvoiceIndexScreen .tfh-invoice-index-table td:nth-child(1),
#tfhTransportInvoiceIndexScreen .tfh-invoice-index-table td:nth-child(2) {
  white-space: nowrap;
  overflow-wrap: normal;
  font-variant-numeric: tabular-nums;
}

/* Column widths: No. | Date | Client | Wing | Guest | Phone | Service | Tax | Misc | Net | Driver | Inv.Status | Receipt | Status
   Fixed text columns = 1,140px; the five financial columns (auto) share the rest, minimum 94px each. */
#tfhTransportInvoiceIndexScreen .tfh-invoice-index-table th:nth-child(1)  { width: 120px; }
#tfhTransportInvoiceIndexScreen .tfh-invoice-index-table th:nth-child(2)  { width: 100px; }
#tfhTransportInvoiceIndexScreen .tfh-invoice-index-table th:nth-child(3)  { width: 300px; }
#tfhTransportInvoiceIndexScreen .tfh-invoice-index-table th:nth-child(4)  { width: 110px; }
#tfhTransportInvoiceIndexScreen .tfh-invoice-index-table th:nth-child(5)  { width: 140px; }
#tfhTransportInvoiceIndexScreen .tfh-invoice-index-table th:nth-child(6)  { width: 110px; }
#tfhTransportInvoiceIndexScreen .tfh-invoice-index-table th:nth-child(7),
#tfhTransportInvoiceIndexScreen .tfh-invoice-index-table th:nth-child(8),
#tfhTransportInvoiceIndexScreen .tfh-invoice-index-table th:nth-child(9),
#tfhTransportInvoiceIndexScreen .tfh-invoice-index-table th:nth-child(10),
#tfhTransportInvoiceIndexScreen .tfh-invoice-index-table th:nth-child(11) { width: auto; }
#tfhTransportInvoiceIndexScreen .tfh-invoice-index-table th:nth-child(12) { width: 96px; }
#tfhTransportInvoiceIndexScreen .tfh-invoice-index-table th:nth-child(13) { width: 88px; }
#tfhTransportInvoiceIndexScreen .tfh-invoice-index-table th:nth-child(14) { width: 76px; }

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

#tfhTransportInvoiceIndexScreen .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) {
  #tfhTransportInvoiceIndexScreen .tfh-invoice-index-filters {
    grid-template-columns: repeat(4, minmax(130px, 1fr));
  }

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

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

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

  #tfhTransportInvoiceIndexScreen .tfh-invoice-index-footer-summary {
    display: none;
  }
}
/* [TFH-302:TFH_TRANSPORT_INVOICE_INDEX:CSS-GRID-SPACE-END] */
