/* Scoped to the broker's submission history; existing upload screens stay intact. */
.broker-history { max-width: 1440px; min-width: 0; }
.broker-history .workspace-heading { align-items: flex-start; }
.broker-history-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--card-radius); padding: 1.5rem; min-width: 0; box-shadow: var(--shadow); }
.broker-history-filters { margin-bottom: 1.5rem; }
.broker-history-filter-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: end; }
.broker-history-filter-grid > div { min-width: 0; }
.broker-history input, .broker-history select { width: 100%; min-width: 0; max-width: 100%; min-height: 2.875rem; margin: 0; border: 1px solid var(--line-strong); border-radius: var(--control-radius); padding: .625rem .75rem; background: #fff; color: var(--navy); font-size: .8125rem; }
.broker-history-filters .text-btn { margin-top: .375rem; }
.broker-history-list-heading { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; flex-wrap: wrap; }
.broker-history-list-heading h2 { margin-bottom: .5rem; }
.broker-history-list-heading p, .broker-history-guidance { font-size: .75rem; color: var(--muted); }
.broker-history-list-heading p { margin-bottom: .5rem; }
.broker-history-guidance { max-width: 54rem; margin-bottom: 1.5rem; }
.broker-history-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.broker-history-table th { text-align: left; font-size: .6875rem; font-weight: 600; color: var(--muted); background: var(--surface-soft); padding: .75rem .625rem; border-top: 1px solid var(--line); }
.broker-history-table th:nth-child(1) { width: 29%; }
.broker-history-table th:nth-child(2) { width: 13%; }
.broker-history-table th:nth-child(3) { width: 16%; }
.broker-history-table th:nth-child(4) { width: 42%; }
.broker-history-table td { vertical-align: top; border-top: 1px solid var(--line); padding: 1rem .625rem; color: var(--navy); font-size: .8125rem; overflow-wrap: anywhere; }
.broker-history-table td > strong { display: block; font-weight: 500; }
.broker-history-table time { font-size: .75rem; }
.broker-history-reference { display: block; font-size: .6875rem; color: var(--muted); margin-top: .375rem; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.broker-history-status { display: inline-block; border-radius: 2rem; padding: .4rem .75rem; max-width: 100%; font-size: .75rem; font-weight: 500; }
.broker-history-pending { color: #596273; background: #edf0f4; }
.broker-history-approved { color: #07578d; background: #e7f4fc; }
.broker-history-funded { color: #056338; background: #e3f4ea; }
.broker-history-declined { color: #a32932; background: #fbeaec; }
.broker-history-request-buttons { display: grid; gap: .75rem; }
.broker-history-request-item { min-width: 0; }
.broker-history-request-item + .broker-history-request-item { border-top: 1px solid var(--line); padding-top: .75rem; }
.broker-history-request-buttons .secondary, .broker-history-reconcile .secondary { min-height: 2.5rem; padding: .5rem .75rem; font-size: .6875rem; white-space: normal; text-align: left; max-width: 100%; overflow-wrap: anywhere; }
.broker-history-request-feedback { color: var(--muted); font-size: .6875rem; margin-top: .625rem; }
.broker-history-request-feedback:empty { display: none; }
.broker-history-request-feedback p { margin: 0 0 .375rem; }
.broker-history-reconcile { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.broker-history-reconcile .text-btn { font-size: .75rem; }
.broker-history-pagination { display: flex; justify-content: space-between; align-items: center; gap: .75rem; border-top: 1px solid var(--line); padding-top: 1.25rem; color: var(--muted); font-size: .75rem; }
.broker-history-pagination > div { display: flex; gap: .5rem; }
.broker-history-pagination .secondary { min-height: 2.5rem; padding: .5rem .75rem; font-size: .75rem; }
.broker-history-empty { padding: 2.5rem 1rem; text-align: center; color: var(--navy); }
.broker-history-empty p { margin: .5rem 0 0; color: var(--muted); font-size: .8125rem; }
.broker-history-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 760px) {
  .broker-history-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .broker-history-filter-grid > div:first-child { grid-column: 1 / -1; }
  .broker-history-table, .broker-history-table tbody, .broker-history-table tr, .broker-history-table td { display: block; width: 100%; }
  .broker-history-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .broker-history-table tr { border-top: 1px solid var(--line); padding: 1rem 0; }
  .broker-history-table td { padding: .375rem 0 .375rem 6rem; position: relative; min-height: 2.25rem; border: 0; }
  .broker-history-table td::before { content: attr(data-label); position: absolute; top: .5rem; left: 0; width: 5.5rem; font-size: .6875rem; color: var(--muted); font-weight: 500; }
  .broker-history-table td.broker-history-requests { padding: .75rem 0 0; }
  .broker-history-table td.broker-history-requests::before { position: static; display: block; margin-bottom: .5rem; }
  .broker-history-request-buttons .secondary { font-size: .75rem; }
  .broker-history-request-feedback { font-size: .75rem; }
}
@media (max-width: 390px) {
  .broker-history { padding: 0 .75rem; }
  .broker-history-panel { padding: 1rem .875rem; }
  .broker-history-filter-grid { gap: .75rem; grid-template-columns: minmax(0, 1fr); }
  .broker-history-table td { padding-left: 5rem; }
  .broker-history-table td::before { width: 4.5rem; }
  .broker-history-request-buttons { display: grid; grid-template-columns: minmax(0, 1fr); }
  .broker-history-request-buttons .secondary { width: 100%; }
  .broker-history-pagination { font-size: .625rem; gap: .5rem; }
  .broker-history-pagination .secondary { padding: .5rem .625rem; font-size: .6875rem; }
}
