/* Sale returns: pick an invoice, then set what comes back. Same sizing as the POS: 44px targets, readable amounts. */
.returns { min-height: 100vh; background: #f3f6f8; color: #102235; }
.returns button { font: inherit; cursor: pointer; }
.returns button:disabled { opacity: .55; cursor: not-allowed; }
.returns-header { min-height: 66px; display: flex; align-items: center; gap: 16px; background: #fff; border-bottom: 1px solid #e1e9ee; padding: 10px 24px; }
.returns-header h1 { font-size: 20px; line-height: 1.4; margin: 0; }
.returns-header p { font-size: 13px; color: #778c9a; margin: 2px 0 0; }
.returns-back, .returns-more, .returns-discard, .returns-clear-search { min-height: 44px; padding: 0 16px; border: 1px solid #d4e1e8; border-radius: 8px; background: #fff; color: #28485a; font-size: 14px; }
.returns-layout { max-width: 1400px; margin: auto; padding: 18px 22px; display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
.returns-card { background: #fff; border: 1px solid #e1e9ee; border-radius: 10px; padding: 18px; min-width: 0; }
.returns-card h2 { font-size: 16px; margin: 0 0 14px; color: #173542; }

.returns-search { height: 52px; display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #d6e1e7; border-radius: 8px; padding-inline: 13px; margin-bottom: 14px; }
.returns-search:focus-within { border-color: #087e91; box-shadow: 0 0 0 3px #087e911a; }
.returns-search svg { width: 18px; height: 18px; stroke: #7e929f; stroke-width: 1.8; stroke-linecap: round; fill: none; flex: none; }
.returns-search input { flex: 1; min-width: 0; height: 50px; border: 0; outline: 0; background: transparent; color: #102235; font: inherit; font-size: 15px; text-align: right; padding: 0; }
.returns-list-state { display: grid; justify-items: start; gap: 10px; }
.returns-list-message { margin: 0 0 10px; font-size: 14px; color: #607985; line-height: 1.7; }
.returns-list-message:empty { display: none; }
.returns-clear-search { margin-bottom: 10px; }
.returns-clear-search[hidden], .returns-more[hidden], .returns-all[hidden] { display: none; }
.returns-list { display: grid; gap: 8px; }
.returns-invoice { display: flex; justify-content: space-between; align-items: center; text-align: right; gap: 12px; min-height: 64px; padding: 10px 14px; border: 1px solid #e2eaef; border-radius: 8px; background: #fff; color: #102235; }
.returns-invoice:hover { border-color: #78bac5; background: #f7fbfc; }
.returns-invoice[aria-pressed="true"] { border-color: #087e91; background: #e8f5f6; box-shadow: inset 3px 0 0 #087e91; }
.returns-invoice strong, .returns-invoice small { display: block; }
.returns-invoice strong { font-size: 14px; direction: ltr; text-align: right; }
.returns-invoice small { font-size: 12px; color: #718794; margin-top: 4px; }
.returns-invoice-total { font-size: 15px; font-weight: 700; white-space: nowrap; }
.returns-more { margin-top: 12px; width: 100%; }

.returns-status { margin: 0 0 14px; padding: 12px 14px; border-radius: 8px; font-size: 14px; line-height: 1.7; }
.returns-status[hidden] { display: none; }
.returns-status-error { background: #fbeceb; color: #a0473f; }
.returns-status-success { background: #e5f5ee; color: #1f6b4a; font-weight: 600; }
.returns-status-info { background: #f3f8fa; color: #526f79; }
.returns-empty { display: grid; justify-items: center; gap: 10px; padding: 48px 20px; text-align: center; color: #607985; font-size: 14px; line-height: 1.8; }
.returns-empty[hidden], .returns-form-area[hidden], .returns-confirm[hidden] { display: none; }
.returns-empty p { margin: 0; max-width: 340px; }
.returns-empty-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 14px; background: #e8f5f6; color: #087e91; font-size: 26px; }
.returns-sale-info { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #f3f8fa; padding: 12px 14px; border-radius: 8px; }
.returns-sale-info strong { display: block; font-size: 15px; }
.returns-sale-info div strong { direction: ltr; text-align: right; }
.returns-sale-info span { display: block; color: #718995; font-size: 13px; margin-top: 3px; }
.returns-sale-total { white-space: nowrap; }
.returns-lines-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 4px; color: #607985; font-size: 13px; font-weight: 600; }
.returns-all { min-height: 44px; padding: 0 14px; border: 1px solid #d4e1e8; border-radius: 8px; background: #fff; color: #087e91; font-size: 14px; font-weight: 600; }
.returns-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px 18px; border-bottom: 1px solid #edf1f4; padding: 12px 0; }
.returns-line-done { opacity: .6; }
.returns-line-title strong, .returns-line-title small { display: block; }
.returns-line-title strong { font-size: 15px; overflow-wrap: anywhere; }
.returns-line-title small { font-size: 12px; color: #718995; margin-top: 4px; }
.returns-quantity { display: flex; align-items: center; border: 1px solid #dce7ec; border-radius: 8px; overflow: hidden; height: 46px; direction: ltr; }
.returns-quantity button { width: 44px; height: 44px; border: 0; background: #f6f9fa; color: #416477; font-size: 22px; }
.returns-quantity input { width: 60px; height: 44px; border: 0; padding: 0; background: #fff; color: #102235; font: inherit; font-size: 15px; font-weight: 700; text-align: center; }
.returns-restock { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; color: #415e68; font-size: 13px; cursor: pointer; white-space: nowrap; }
.returns-restock input { width: 20px; height: 20px; accent-color: #087e91; }
.returns-option { display: grid; gap: 6px; margin-top: 16px; }
.returns-option-label { display: block; color: #647f8e; font-size: 13px; font-weight: 500; margin: 0; }
.returns-option-label span { color: #8b9ca5; font-size: 12px; font-weight: 400; }
.returns-form-area > label.returns-option-label { margin: 16px 0 6px; }
.returns-method { display: grid; grid-template-columns: repeat(2, minmax(0, 160px)); gap: 8px; }
.returns-method button { min-height: 44px; border: 1px solid #d6e1e7; border-radius: 8px; background: #fff; color: #3f5c6e; font-size: 14px; }
.returns-method button[aria-pressed="true"] { background: #e8f5f6; border-color: #087e91; color: #087e91; font-weight: 700; }
.returns-card textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #d4e1e8; border-radius: 8px; background: #fff; color: #102235; font: inherit; font-size: 14px; text-align: right; resize: vertical; }
.returns-summary { margin-top: 16px; padding-top: 14px; border-top: 1px solid #e9eff2; }
.returns-summary-row, .returns-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.returns-summary-row { font-size: 13px; color: #6c8490; margin-bottom: 8px; }
.returns-summary-row strong { color: #102235; font-weight: 500; }
.returns-total { background: #e8f5f6; border-radius: 8px; padding: 12px 14px; color: #087e91; }
.returns-total span, .returns-total small { display: block; }
.returns-total span { font-size: 15px; font-weight: 700; }
.returns-total small { font-size: 11px; color: #668e97; margin-top: 4px; }
.returns-total strong { font-size: 26px; line-height: 1.2; white-space: nowrap; }
.returns-submit, .returns-resume { width: 100%; height: 56px; margin-top: 12px; border: 0; border-radius: 8px; background: #087e91; color: #fff; font-size: 17px; font-weight: 700; }
.returns-discard { width: 100%; margin-top: 12px; }
.returns-resume[hidden], .returns-discard[hidden] { display: none; }
.returns-confirm { margin-top: 12px; padding: 14px; border: 1px solid #f0d9a8; border-radius: 8px; background: #fff8e9; color: #6b4d12; }
.returns-confirm p { margin: 0 0 12px; font-size: 14px; line-height: 1.8; }
.returns-confirm div { display: flex; flex-wrap: wrap; gap: 8px; }
.returns-confirm button { min-height: 44px; padding: 0 18px; border-radius: 8px; font-size: 14px; font-weight: 700; }
.returns-confirm-yes { border: 0; background: #087e91; color: #fff; }
.returns-confirm-no { border: 1px solid #d4e1e8; background: #fff; color: #28485a; }
.returns-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
@media (max-width: 860px) { .returns-layout { grid-template-columns: 1fr; padding: 14px; } .returns-header { padding-inline: 16px; } }
@media (max-width: 560px) { .returns-line { grid-template-columns: minmax(0, 1fr) auto; } .returns-restock { grid-column: 1 / -1; } }
