/* Settlement dialogs share the current workspace theme and contain their own scroll. */
#settlementBatchesButton { width: auto; min-width: 0; min-height: 38px; flex: 0 0 auto; padding-inline: 11px; border: 1px solid color-mix(in srgb, var(--blue-700) 42%, transparent); border-radius: 10px; color: var(--blue-800); background: var(--surface-control); font: inherit; font-size: 12px; font-weight: 650; white-space: nowrap; }
.archive-records-card .archive-tools { min-width: 0; max-width: 100%; flex: 0 1 auto; flex-wrap: wrap; }
.archive-records-card .today-actions { min-width: 0; max-width: 100%; }
#settlementBatchesButton:hover, #settlementBatchesButton:focus-visible { border-color: var(--blue-700); background: var(--ice-strong); }
#settlementBatchesButton:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 2px; }
.en-dialog.sb-dialog { width: min(880px, 100%); height: min(820px, calc(100dvh - 48px)); min-height: 0; }
.sb-dialog .en-dialog-head { flex-shrink: 0; }
.sb-dialog > .en-dialog-body { min-height: 0; padding: 0; overflow: hidden; }
.sb-dialog .en-dialog-body > #settlementBatchesPanel { flex: 1 1 auto; }
#settlementBatchesPanel { display: flex; min-width: 0; min-height: 0; flex-direction: column; overflow: hidden; margin: 0; color: var(--blue-800); }
#settlementBatchesPanel [hidden] { display: none !important; }
#settlementBatchesPanel *, #settlementBatchesPanel *::before, #settlementBatchesPanel *::after { box-sizing: border-box; }
#settlementBatchesPanel .en-button { min-height: 38px; max-width: 100%; white-space: normal; overflow-wrap: anywhere; font-size: 12px; }
.sb-toolbar { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--en-line); }
.sb-toolbar > div:first-child { display: grid; min-width: 0; gap: 5px; }
#settlementBatchesHeading { font-size: 14px; overflow-wrap: anywhere; }
#settlementBatchesScope { color: var(--en-muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.sb-toolbar-actions { display: flex; flex: 0 0 auto; gap: 6px; }
.sb-toolbar-actions .en-button { padding-inline: 10px; }
#settlementBatchesScopes { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 8px; padding: 12px 22px 0; }
#settlementBatchesScopes .en-button { flex: 0 1 auto; border: 1px solid var(--en-line); border-radius: 10px; }
#settlementBatchesScopes .en-button[aria-pressed="true"] { color: var(--blue-700); background: var(--ice-strong); border-color: var(--blue-400); }
.sb-card-owner { color: var(--en-muted); font-size: 12px; overflow-wrap: anywhere; }
.sb-readonly { flex: 0 0 auto; margin: 12px 22px 0; padding: 10px 12px; border: 1px solid var(--en-line); border-radius: 12px; color: var(--en-warning); background: var(--surface-tint); font-size: 12px; line-height: 1.6; }
#settlementBatchesContent { flex: 1 1 auto; min-height: 0; min-width: 0; padding: 18px 22px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--blue-300) transparent; }
.sb-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.sb-list > li { min-width: 0; }
.sb-card { display: grid; width: 100%; min-width: 0; gap: 12px; padding: 15px; border: 1px solid var(--en-line); border-radius: 16px; background: var(--surface-control); color: var(--blue-800); text-align: left; font: inherit; }
.sb-card:hover, .sb-card:focus-visible { border-color: var(--blue-400); background: var(--ice-strong); }
.sb-card:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 2px; }
.sb-card-head, .sb-card-total, .sb-card-hint, .sb-detail-head, .sb-orders-heading, .sb-totals { display: flex; min-width: 0; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; }
.sb-card-head time, .sb-detail-head time { color: var(--en-muted); font-size: 12px; overflow-wrap: anywhere; }
.sb-card-total strong { font-size: 23px; line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sb-card-total > span, .sb-card-hint { font-size: 12px; }
.sb-card-hint { color: var(--blue-600); }
.sb-pill { padding: 4px 8px; border: 1px solid var(--en-line); border-radius: 9px; color: var(--blue-700); background: var(--surface-tint); font-size: 11px; line-height: 1.5; }
.sb-pill[data-status="reversal_pending"] { color: var(--en-warning); }
.sb-pill[data-status="reversed"] { color: var(--en-muted); }
.sb-pill[data-status="data_deleted"] { color: #a63249; background: #fdecef; border-color: #efc2cc; }
.sb-empty { margin: 0; padding: 32px 12px; border: 1px dashed var(--en-line); border-radius: 15px; color: var(--en-muted); text-align: center; font-size: 13px; line-height: 1.8; }
.sb-detail, .sb-create, .sb-confirm { display: grid; min-width: 0; gap: 16px; }
.sb-detail-head { align-items: flex-start; }
.sb-detail-head > div { display: grid; min-width: 0; gap: 8px; }
.sb-detail-head strong { font-size: 25px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sb-detail-head small { color: var(--en-muted); font-size: 13px; font-weight: 500; }
.sb-request { display: grid; min-width: 0; gap: 7px; padding: 12px 14px; border: 1px solid var(--en-line); border-radius: 13px; background: var(--surface-control); }
.sb-request strong, .sb-orders-heading h3, .sb-confirm h3 { margin: 0; font-size: 14px; }
.sb-request p, .sb-info, .sb-create p, .sb-confirm p { margin: 0; font-size: 12px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.sb-request p, .sb-info { color: var(--en-muted); }
#settlementBatchOrders { min-width: 0; margin: 0; padding: 14px; border: 1px solid var(--en-line); border-radius: 13px; background: var(--surface-control); color: var(--blue-800); font: inherit; font-size: 12px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; }
#settlementBatchOrders:focus-visible { outline: 2px solid var(--blue-400); outline-offset: 2px; }
.sb-order-text { display: block; }
.sb-totals { padding: 16px; border: 1px solid var(--en-line); border-radius: 15px; background: var(--surface-control); font-size: 13px; }
.sb-totals strong { font-size: 23px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#settlementBatchReason { width: 100%; min-width: 0; min-height: 90px; max-height: 180px; resize: vertical; }
#settlementBatchesStatus { flex: 0 0 auto; max-height: 90px; overflow: auto; margin: 0; padding: 10px 22px; color: var(--blue-700); font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
#settlementBatchesStatus:empty { display: none; }
#settlementBatchesStatus.is-error { color: var(--en-danger); }
#settlementBatchesActions { display: flex; flex: 0 0 auto; max-height: 35dvh; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; overflow: auto; padding: 13px 22px 16px; border-top: 1px solid var(--en-line); background: var(--surface-sheet); }
.sb-pagination { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; }
.sb-pagination > span { font-size: 12px; white-space: nowrap; }
@media (max-width: 600px) {
  .en-dialog.sb-dialog { height: calc(100dvh - 35px - env(safe-area-inset-bottom)); }
  .sb-toolbar { align-items: flex-start; gap: 9px; padding: 12px 14px; }
  .sb-toolbar-actions { gap: 4px; }
  .sb-toolbar-actions .en-button { padding-inline: 8px; }
  #settlementBatchesScopes { padding: 10px 14px 0; gap: 6px; }
  #settlementBatchesContent { padding: 14px; }
  #settlementBatchesPanel .en-button { min-height: 44px; }
  #settlementBatchesActions { padding: 11px 14px 14px; gap: 7px; }
  #settlementBatchesActions > .en-button { flex: 1 1 115px; }
  #settlementBatchesStatus { padding: 8px 14px; }
  .sb-readonly { margin: 10px 14px 0; font-size: 11px; }
  .sb-card { padding: 13px; }
  .sb-detail-head strong, .sb-totals strong { font-size: 22px; }
}
