/* [TFH-502:TFH_PAYMENT_INDEX:CSS-START] */
.tfh-payment-index-body {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0,1fr);
  gap: 13px;
  padding: 14px 16px;
  overflow: hidden;
}

.tfh-payment-index-filter-card,
.tfh-payment-index-grid-card {
  border: 1px solid rgba(17,49,84,.13);
  border-radius: 15px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 10px 30px rgba(18,52,92,.08);
}

.tfh-payment-index-filter-card {
  padding: 12px;
}

.tfh-payment-index-filters {
  display: grid;
  grid-template-columns:
    minmax(135px,.65fr)
    minmax(135px,.65fr)
    minmax(160px,.74fr)
    minmax(230px,1.1fr)
    minmax(230px,1.1fr)
    minmax(145px,.65fr)
    auto;
  gap: 10px;
  align-items: end;
}

.tfh-payment-index-filters .tfh-form-field {
  min-width: 0;
}

.tfh-payment-index-filters input,
.tfh-payment-index-filters select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
}

.tfh-payment-index-find {
  min-height: 42px;
  white-space: nowrap;
}

.tfh-payment-index-grid-card {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0,1fr) auto;
  overflow: hidden;
  border-top: 4px solid var(--tfh-blue-500);
}

.tfh-payment-index-grid-scroll {
  min-height: 0;
  overflow: auto;
}

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

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

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

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

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

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

.tfh-payment-index-table tbody tr.is-selected td {
  background: #dbeffc;
}

.tfh-payment-index-table tbody tr.is-cancelled td:first-child,
.tfh-payment-index-table tbody tr.is-cancelled td:last-child {
  color: #fff;
  background: #b42318;
}

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

.tfh-payment-index-table .is-cancelled-status,
.tfh-payment-index-table .is-valid-status {
  color: #fff;
  font-weight: 850;
  text-align: center;
}

.tfh-payment-index-table .is-cancelled-status {
  background: #b42318;
}

.tfh-payment-index-table .is-valid-status {
  background: #18794e;
}

.tfh-payment-index-summary {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 9px 14px;
  border-top: 1px solid var(--tfh-line);
  background: #f8fafc;
}

.tfh-payment-index-summary strong {
  font-size: 1.08rem;
  font-variant-numeric: tabular-nums;
}
/* [TFH-502:TFH_PAYMENT_INDEX:CSS-END] */
/* Payment Index filter breakpoints (moved from shared TFH-501 media queries) */
@media (max-width: 1180px) {
  .tfh-payment-index-filters {
    grid-template-columns: repeat(3,minmax(170px,1fr));
  }
}

@media (max-width: 720px) {
  .tfh-payment-index-filters {
    grid-template-columns: 1fr;
  }
}

/* Payment Index column distribution */
.tfh-payment-index-table {
  min-width: 1180px;
}

.tfh-payment-index-table col.tfh-payment-col-voucher { width: 95px; }
.tfh-payment-index-table col.tfh-payment-col-date { width: 100px; }
.tfh-payment-index-table col.tfh-payment-col-account { width: 380px; }
.tfh-payment-index-table col.tfh-payment-col-bank { width: 175px; }
.tfh-payment-index-table col.tfh-payment-col-check { width: 85px; }
.tfh-payment-index-table col.tfh-payment-col-amount { width: 80px; }
.tfh-payment-index-table col.tfh-payment-col-remarks { width: auto; }
.tfh-payment-index-table col.tfh-payment-col-status { width: 105px; }

.tfh-payment-index-table td.is-remarks-cell {
  overflow: visible;
  white-space: normal;
  padding: 5px 7px;
}

.tfh-payment-remarks-frame {
  min-height: 27px;
  max-height: 150px;
  padding: 5px 7px;
  overflow: auto;
  resize: vertical;
  border: 1px solid transparent;
  border-radius: 6px;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
  background: rgba(255,255,255,.45);
}

.tfh-payment-remarks-frame:hover,
.tfh-payment-remarks-frame:focus {
  border-color: rgba(47,127,196,.28);
  background: #fff;
}

.tfh-payment-index-summary {
  display: grid;
  grid-template-columns: 95px 100px 380px 175px 85px 80px minmax(0,1fr) 105px;
  align-items: center;
  gap: 0;
  padding: 9px 0;
}

.tfh-payment-index-summary > span {
  grid-column: 1 / 6;
  padding-left: 14px;
}

.tfh-payment-index-summary > strong {
  grid-column: 6;
  width: 100%;
  padding: 0 8px;
  text-align: right;
}
