.receipt-stats-card { padding: 15px 18px; margin-bottom: 12px; min-width: 0; }
.receipt-stats-note, .receipt-stats-status { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.receipt-stats-status { margin: 9px 0 0; }
.receipt-stats-status.is-error { color: #ffb4a8; }
.receipt-stats-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.receipt-stats-filter label { font-size: 14px; font-weight: 600; }
.receipt-stats-filter label span { margin-left: 4px; font-size: 13px; color: var(--muted); font-weight: normal; }
.receipt-stats-filter input {
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2, var(--surface));
  color: var(--text);
  color-scheme: dark;
  font: inherit;
}
.receipt-stats-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.receipt-stats-summary span { display: block; color: var(--muted); font-size: 14px; }
.receipt-stats-summary strong { display: block; margin-top: 4px; font-size: clamp(18px, 4vw, 26px); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.receipt-stats-table { max-width: 100%; overflow-x: auto; }
.receipt-stats-table table { width: 100%; min-width: 510px; border-collapse: collapse; text-align: left; }
.receipt-stats-table th, .receipt-stats-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
.receipt-stats-table th { color: var(--muted); white-space: nowrap; }
.receipt-stats-table td small { display: block; margin-top: 3px; color: var(--muted); }
.receipt-stats-table td:nth-child(1), .receipt-stats-table td:nth-child(2) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.receipt-stats-confirmed { color: #9de0b7; }
.receipt-stats-voided { color: var(--muted); }
.receipt-stats-conversation { white-space: nowrap; }
.receipt-stats-card #receiptStatsMore { margin-top: 12px; }
.receipt-stats-detail > button { margin-bottom: 9px; }
#receiptStatsMount [hidden], #receiptStatsReport [hidden] { display: none !important; }

.receipt-workflow [hidden], .receipt-fields[hidden], .payment-config-view [hidden] { display: none !important; }
.receipt-workflow-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.receipt-workflow-tabs [aria-pressed="true"] { color: var(--background, #0f172a); background: var(--accent); border-color: var(--accent); }
.receipt-workflow-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 138px), 1fr));
  gap: 9px 12px;
  align-items: end;
}
.receipt-workflow-form label { display: grid; gap: 5px; min-width: 0; color: var(--muted); font-size: 13px; }
.receipt-workflow-form input, .receipt-workflow-form select {
  width: 100%; min-width: 0; padding: 9px 8px; border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); background: var(--input-bg, var(--background)); font: inherit;
}
.receipt-workflow-form input[type="date"] { color-scheme: dark; }
.receipt-workflow-form button { min-height: 36px; justify-self: start; }
.receipt-report-note { margin: 10px 0 0; font-size: 13px; }
.receipt-overview-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.receipt-overview-summary small { display: block; margin-top: 3px; font-size: 12px; }
[data-report-results] h3 { margin: 12px 0 8px; }
[data-report-results] h3:first-child { margin-top: 0; }
[data-report-results] .receipt-stats-table { margin-bottom: 12px; }
[data-report-results] td { overflow-wrap: anywhere; }
.receipt-inline-actions { display: flex; align-items: flex-start; flex-direction: column; gap: 6px; white-space: nowrap; }
.receipt-inline-actions a { color: var(--accent); }
.receipt-workflow [data-report-more] { margin-bottom: 16px; }
.receipt-refund-dialog {
  width: min(680px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: auto;
  margin: auto; color: var(--text); background: var(--surface, var(--panel));
}
.receipt-refund-dialog::backdrop { background: rgb(8 12 22 / 75%); }
.receipt-refund-dialog h3 { margin: 0 0 12px; }
.receipt-refund-dialog > .row-actions { margin-top: 12px; }
.receipt-refund-dialog .receipt-stats-table { margin: 8px 0; }
.receipt-refund-form { margin-top: 14px; }
.receipt-refund-form p { grid-column: 1 / -1; }
.receipt-message-target { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 8px; }
.receipt-wrapped { white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 430px) {
  .receipt-overview-summary { grid-template-columns: 1fr; gap: 0; }
}
