/* [TFH-401:TFH_RECEIPT_ENTRY:CSS-START] */
.tfh-receipt-screen {
  width: 100vw;
  height: 100dvh;
  position: fixed;
  inset: 0;
  z-index: 49;
  display: grid;
  grid-template-rows: auto minmax(0,1fr) auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 84% 0%,rgba(47,127,196,.13),transparent 29%),
    linear-gradient(135deg,#eaf1f7,#f8fafc 48%,#e7eef5);
}

.tfh-receipt-body {
  min-height: 0;
  overflow: auto;
  padding: 14px 16px 18px;
}

.tfh-receipt-form {
  width: min(1680px,100%);
  min-height: 100%;
  margin: auto;
  display: grid;
  grid-template-rows: auto minmax(440px,1fr);
  gap: 13px;
}

.tfh-receipt-header-card,
.tfh-receipt-panel {
  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-receipt-header-card {
  padding: 13px;
}

.tfh-receipt-header-grid {
  display: grid;
  grid-template-columns:
    minmax(145px,.65fr)
    minmax(250px,1.25fr)
    minmax(225px,1fr)
    minmax(150px,.7fr)
    minmax(145px,.65fr)
    minmax(245px,1.15fr)
    minmax(135px,.6fr)
    minmax(145px,.65fr);
  gap: 10px;
  align-items: end;
}

.tfh-receipt-header-grid .tfh-form-field {
  min-width: 0;
}

.tfh-receipt-header-grid input,
.tfh-receipt-header-grid select {
  min-height: 42px;
}

.tfh-receipt-wing-clear {
  min-width: 66px;
  height: 42px;
}

.tfh-receipt-remarks-field {
  margin-top: 10px;
}

.tfh-receipt-remarks-field textarea {
  min-height: 58px;
  resize: vertical;
}

.tfh-receipt-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(560px,.92fr) minmax(650px,1.08fr);
  gap: 13px;
}

.tfh-receipt-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0,1fr) auto;
  overflow: hidden;
}

.tfh-receipt-allocation-panel {
  border-top: 4px solid var(--tfh-gold-500);
}

.tfh-receipt-outstanding-panel {
  border-top: 4px solid var(--tfh-blue-500);
}

.tfh-receipt-panel-head {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--tfh-line);
}

.tfh-receipt-panel-head span {
  display: block;
  color: var(--tfh-blue-600);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.tfh-receipt-panel-head h2 {
  margin: 3px 0 0;
  font-size: 1.08rem;
}

.tfh-receipt-grid-scroll {
  min-height: 0;
  overflow: auto;
  scrollbar-gutter: stable;
}

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

.tfh-receipt-outstanding-table {
  min-width: 820px;
}

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

.tfh-receipt-allocation-table td,
.tfh-receipt-outstanding-table td {
  height: 40px;
  padding: 6px 7px;
  border-right: 1px solid #dde5ec;
  border-bottom: 1px solid #dde5ec;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tfh-receipt-outstanding-table tbody tr {
  cursor: pointer;
}

.tfh-receipt-outstanding-table tbody tr:nth-child(even),
.tfh-receipt-allocation-table tbody tr:nth-child(even) {
  background: #f5f8fa;
}

.tfh-receipt-outstanding-table tbody tr:hover {
  background: #eaf3fb;
}

.tfh-receipt-outstanding-table tr.is-included {
  cursor: default;
  background: #e7f7ee;
}

.tfh-receipt-outstanding-table .is-included-cell {
  color: #fff;
  background: #18794e;
  font-weight: 850;
  text-align: center;
}

.tfh-receipt-add-cell {
  color: var(--tfh-blue-600);
  font-weight: 850;
  text-align: center;
}

.tfh-receipt-allocation-table tr.is-selected td {
  background: #eaf4fc;
}

.tfh-receipt-allocation-table tr.is-adjustment td:first-child {
  color: #765700;
  background: #fff5ca;
  font-weight: 850;
}

.tfh-receipt-allocation-table input {
  width: 100%;
  min-height: 31px;
  padding: 4px 6px;
  border: 1px solid #ccd8e3;
  border-radius: 6px;
  text-align: right;
  font: inherit;
}

.tfh-receipt-allocation-table .is-financial,
.tfh-receipt-outstanding-table .is-financial {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tfh-receipt-line-remove {
  width: 29px;
  height: 29px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--tfh-danger);
  font-size: 19px;
  cursor: pointer;
}

.tfh-receipt-panel-summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  padding: 9px 13px;
  border-top: 1px solid var(--tfh-line);
  background: #f8fafc;
}

.tfh-receipt-panel-summary > div {
  display: grid;
  gap: 2px;
  text-align: right;
}

.tfh-receipt-panel-summary span {
  color: var(--tfh-ink-600);
  font-size: .72rem;
}

.tfh-receipt-panel-summary strong {
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.tfh-receipt-difference-badge {
  min-width: 96px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #fff !important;
  background: var(--tfh-success);
  font-size: .7rem !important;
  font-weight: 850;
  text-align: center;
}

.tfh-receipt-difference-badge.is-different {
  background: #b7791f;
}

.tfh-receipt-attachment-count {
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  margin-left: 7px;
  border-radius: 999px;
  color: #fff;
  background: var(--tfh-blue-600);
  font-size: .72rem;
  font-weight: 850;
}

.tfh-receipt-confirm-dialog {
  max-width: 520px;
}

.tfh-receipt-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

[data-tfh-receipt-clairvoyance] {
  position: relative;
}

[data-tfh-receipt-clairvoyance] .tfh-suggestion-list {
  z-index: 96;
}
/* [TFH-401:TFH_RECEIPT_ENTRY:CSS-END] */
/* [TFH-401:TFH_RECEIPT_ENTRY:ATTACHMENT-BUTTON-CSS-START] */
.tfh-receipt-attachments-button {
  min-height: 48px;
  display: inline-grid;
  grid-template-columns: 34px auto 26px;
  align-items: center;
  gap: 9px;
  padding: 6px 9px 6px 8px;
  border-color: rgba(47,127,196,.28);
  color: #12345c;
  background:
    linear-gradient(180deg,#ffffff,#edf5fb);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    0 6px 16px rgba(18,52,92,.1);
}

.tfh-receipt-attachments-button:hover {
  border-color: rgba(47,127,196,.52);
  background:
    linear-gradient(180deg,#ffffff,#e2f0fb);
}

.tfh-receipt-repository-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background:
    linear-gradient(145deg,#1d5f9f,#12345c);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 5px 12px rgba(18,52,92,.2);
}

.tfh-receipt-repository-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tfh-receipt-attachments-label {
  min-width: 108px;
  display: grid;
  gap: 1px;
  text-align: left;
  line-height: 1.05;
}

.tfh-receipt-attachments-label small {
  color: #6b7e91;
  font-size: .62rem;
  font-weight: 750;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.tfh-receipt-attachments-label strong {
  color: #12345c;
  font-size: .84rem;
  font-weight: 850;
}

.tfh-receipt-attachments-button .tfh-receipt-attachment-count {
  margin-left: 0;
}

@media (max-width: 720px) {
  .tfh-receipt-attachments-label small {
    display: none;
  }

  .tfh-receipt-attachments-label {
    min-width: auto;
  }
}
/* [TFH-401:TFH_RECEIPT_ENTRY:ATTACHMENT-BUTTON-CSS-END] */
/* [TFH-401:TFH_RECEIPT_ENTRY:CSS-DUAL-GRID-REFINEMENT-START] */

/*
  Receipt Entry uses the same fixed dual-grid workspace behavior as
  the Cover Note screen. The page itself remains fixed; only each
  table body area scrolls.
*/
.tfh-receipt-body {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tfh-receipt-form {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  grid-template-rows: auto minmax(0,1fr);
}

.tfh-receipt-workspace {
  min-height: 0;
  height: 100%;
  align-items: stretch;
}

.tfh-receipt-panel {
  min-height: 0;
  height: 100%;
  grid-template-rows: 54px minmax(0,1fr) 58px;
}

.tfh-receipt-panel-head {
  min-height: 54px;
  height: 54px;
  padding: 7px 12px;
}

.tfh-receipt-panel-head span {
  font-size: .63rem;
}

.tfh-receipt-panel-head h2 {
  margin-top: 1px;
  font-size: .97rem;
}

.tfh-receipt-panel-head .tfh-secondary-button {
  min-height: 34px;
  padding: 7px 11px;
}

.tfh-receipt-grid-scroll {
  min-height: 0;
  height: 100%;
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.tfh-receipt-allocation-table th,
.tfh-receipt-outstanding-table th {
  height: 34px;
  padding-top: 5px;
  padding-bottom: 5px;
}

.tfh-receipt-panel-summary {
  min-height: 58px;
  height: 58px;
  flex: 0 0 58px;
  overflow: hidden;
  position: relative;
  z-index: 4;
  box-shadow: 0 -5px 14px rgba(18,52,92,.06);
}

.tfh-receipt-outstanding-summary {
  justify-content: space-between;
}

.tfh-receipt-summary-left {
  margin-right: auto;
  text-align: left !important;
}

.tfh-receipt-summary-left strong {
  color: var(--tfh-navy-850);
}

@media (max-width: 1180px) {
  .tfh-receipt-body {
    overflow: auto;
  }

  .tfh-receipt-form {
    height: auto;
  }

  .tfh-receipt-workspace {
    height: auto;
  }

  .tfh-receipt-panel {
    height: 430px;
    min-height: 430px;
  }
}

/* [TFH-401:TFH_RECEIPT_ENTRY:CSS-DUAL-GRID-REFINEMENT-END] */
