/* Compact warehouse checkout. All rules are scoped to the new sales section. */
.retail-page { color: var(--fg, #0a0a0a); }
.retail-page-head, .retail-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.retail-page h1 { margin: 0; font-size: 26px; font-weight: 750; letter-spacing: -.6px; }
.retail-page-head p { margin: 5px 0 20px; color: var(--fg-3, #73736f); font-size: 13px; }
.retail-button { min-height: 36px; padding: 7px 12px; border: 1px solid var(--line, #e5e5e2); border-radius: 8px; background: var(--bg-elev, white); color: var(--fg, #0a0a0a); cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; white-space: nowrap; }
.retail-button:hover:not(:disabled) { background: var(--bg-hover, #f1f1ef); }
.retail-button.primary { background: #0a0a0a; color: white; border-color: #0a0a0a; }
.retail-button.danger { background: #fff6f5; color: #b42318; border-color: #eab6b2; }
.retail-button:disabled { opacity: .5; cursor: not-allowed; }
.retail-page :focus-visible, .retail-dialog :focus-visible { outline: 2px solid #343431; outline-offset: 3px; }
.retail-report { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line, #e5e5e2); border-radius: 10px; overflow: hidden; margin: 16px 0 20px; background: var(--line, #e5e5e2); }
.retail-report > div { padding: 16px 20px; background: var(--bg-elev, white); }
.retail-report small { display: block; color: var(--fg-3, #73736f); font-size: 12px; margin-bottom: 8px; }
.retail-report strong { font-size: 23px; font-variant-numeric: tabular-nums; }
.retail-filters { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.retail-filters > .retail-field:first-child { flex: 1; min-width: 240px; }
.retail-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; font-size: 12px; font-weight: 600; }
.retail-field > input, .retail-field > select, .retail-field > textarea, .retail-cart-row > input { width: 100%; box-sizing: border-box; min-height: 36px; padding: 8px 10px; border: 1px solid var(--line, #e5e5e2); border-radius: 8px; background: var(--bg-elev, white); color: var(--fg, #0a0a0a); font: inherit; font-weight: 400; }
.retail-field > textarea { min-height: 85px; resize: vertical; }
.retail-field small, .retail-note { color: var(--fg-3, #73736f); font-size: 12px; line-height: 1.5; font-weight: 400; }
.retail-note { margin: 12px 0; }
.retail-ledger { border: 1px solid var(--line, #e5e5e2); border-radius: 10px; overflow: hidden; background: var(--bg-elev, white); margin-top: 16px; }
.retail-table-wrap { overflow-x: auto; }
.retail-page table, .retail-dialog table { width: 100%; border-collapse: collapse; font-size: 12px; }
.retail-page th, .retail-dialog th { text-align: left; padding: 13px 14px; color: var(--fg-3, #73736f); background: var(--bg, #fafaf9); font-size: 11px; font-weight: 600; white-space: nowrap; }
.retail-page td, .retail-dialog td { padding: 13px 14px; border-top: 1px solid var(--line, #e5e5e2); }
.retail-page td small, .retail-dialog td small { display: block; margin-top: 4px; color: var(--fg-3, #73736f); }
.retail-money { font-variant-numeric: tabular-nums; font-family: 'JetBrains Mono', monospace; white-space: nowrap; }
.retail-status { border-radius: 5px; padding: 4px 7px; background: #f1f1ef; white-space: nowrap; }
.retail-status.paid { color: #167545; background: #ecf7f0; }
.retail-status.partial_return { color: #9a5b11; background: #fff7e8; }
.retail-status.returned { color: #73736f; }
.retail-empty { padding: 35px 20px; text-align: center; color: var(--fg-3, #73736f); font-size: 13px; }
.retail-pagination { padding: 12px 14px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line, #e5e5e2); font-size: 12px; }
.retail-pagination span { margin-right: auto; color: var(--fg-3, #73736f); }
.retail-dialog { width: min(620px, calc(100vw - 24px)); max-height: calc(100dvh - 40px); margin: auto; padding: 0; border: 1px solid var(--line, #e5e5e2); border-radius: 14px; background: var(--bg-elev, white); color: var(--fg, #0a0a0a); box-shadow: 0 24px 90px #0003; overflow: auto; font-family: 'Inter Tight', Arial, sans-serif; }
.retail-dialog.wide { width: min(1020px, calc(100vw - 24px)); }
.retail-dialog::backdrop { background: #0006; }
.retail-dialog > header { display: flex; align-items: start; justify-content: space-between; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--line, #e5e5e2); }
.retail-dialog h2 { font-size: 20px; margin: 0; }
.retail-dialog header p { font-size: 12px; margin: 7px 0 0; color: var(--fg-3, #73736f); }
.retail-dialog h3 { margin: 0 0 14px; font-size: 15px; }
.retail-sale-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, 1fr); }
.retail-cart, .retail-checkout, .retail-modal-body { padding: 20px 22px; }
.retail-checkout { background: var(--bg, #fafaf9); border-left: 1px solid var(--line, #e5e5e2); display: flex; flex-direction: column; gap: 16px; }
.retail-matches { max-height: 220px; overflow-y: auto; margin: 8px 0; border: 1px solid var(--line, #e5e5e2); border-radius: 8px; }
.retail-matches button { width: 100%; text-align: left; display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; padding: 12px; border: 0; border-bottom: 1px solid var(--line, #e5e5e2); background: var(--bg-elev, white); color: inherit; cursor: pointer; }
.retail-matches button:hover { background: var(--bg, #fafaf9); }
.retail-matches small { grid-column: 1; color: var(--fg-3, #73736f); font-size: 11px; }
.retail-matches button span { grid-column: 2; grid-row: 1 / 3; align-self: center; }
.retail-cart-row { display: flex; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line, #e5e5e2); }
.retail-cart-row > div { flex: 1; min-width: 0; }
.retail-cart-row strong { font-size: 13px; display: block; overflow-wrap: anywhere; }
.retail-cart-row small { display: block; font-size: 11px; margin-top: 5px; color: var(--fg-3, #73736f); }
.retail-cart-row > input { width: 76px; flex: 0 0 76px; text-align: center; }
.retail-discount { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.retail-totals { display: grid; grid-template-columns: 1fr auto; gap: 12px; font-size: 13px; margin: 0; }
.retail-totals dt { color: var(--fg-3, #73736f); }
.retail-totals dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }
.retail-totals .total { padding-top: 12px; border-top: 1px solid var(--line, #e5e5e2); font-size: 20px; font-weight: 700; color: inherit; }
.retail-confirm { display: flex; gap: 10px; align-items: start; font-size: 13px; line-height: 1.5; }
.retail-confirm input { width: 17px; height: 17px; flex: 0 0 17px; margin: 1px 0; accent-color: #0a0a0a; }
.retail-error { color: #b42318; background: #fff5f4; padding: 12px; border-radius: 8px; font-size: 12px; line-height: 1.5; }
.retail-modal-body { display: grid; gap: 18px; }
.retail-detail-info { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; }
.retail-detail-info p { margin: 0; }
.retail-return-history { border-top: 1px solid var(--line, #e5e5e2); padding-top: 18px; font-size: 12px; }
.retail-return-history > div { padding: 10px 0; border-bottom: 1px solid var(--line, #e5e5e2); }
.retail-return-history p { white-space: pre-wrap; overflow-wrap: anywhere; }
.retail-refund-total { margin: 0; font-size: 15px; }
@media (max-width: 720px) {
  .retail-report { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .retail-report > div { padding: 14px; }
  .retail-report strong { font-size: 19px; }
  .retail-sale-grid { grid-template-columns: 1fr; }
  .retail-checkout { border-left: 0; border-top: 1px solid var(--line, #e5e5e2); }
  .retail-dialog { max-height: calc(100dvh - 24px); }
  .retail-cart, .retail-checkout, .retail-modal-body, .retail-dialog > header { padding: 16px; }
  .retail-filters > .retail-field { flex: 1 1 140px; }
}
