/* Recibo de venta: verde = efectivo, amarillo = transferencia, rojo = cuenta corriente. */
dialog.rc-overlay { border: 0; background: transparent; padding: 14px 12px calc(14px + env(safe-area-inset-bottom)); margin: 0; width: 100%; max-width: none; height: 100%; max-height: none; overflow-y: auto; color: inherit; }
dialog.rc-overlay[open] { display: flex; justify-content: center; align-items: flex-start; }
dialog.rc-overlay::backdrop { background: rgba(0, 0, 0, .6); }
.rc-sheet { width: min(420px, 100%); display: grid; gap: 12px; margin: 0 auto; }

.rc { --rc: #15803d; --rc-tint: #e7f6ec; --rc-ink: #fff; position: relative; overflow: hidden; border-radius: 16px; border: 3px solid var(--rc); background: var(--rc-tint); color: #1b1b1b; box-shadow: 0 14px 40px rgba(0, 0, 0, .35); font: 15px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.rc b, .rc strong, .rc span, .rc div, .rc td, .rc th { color: inherit; }  /* las hojas de estilo de la app no pintan el recibo */
.rc-top { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--rc); color: var(--rc-ink); }
.rc-logobox { flex: none; width: 46px; height: 46px; border-radius: 12px; background: #fff; display: grid; place-items: center; overflow: hidden; }
.rc-logo { width: 34px; height: 34px; object-fit: contain; }
.rc-co { flex: 1; min-width: 0; line-height: 1.2; }
.rc-co b { display: block; font-size: 17px; overflow-wrap: anywhere; }
.rc-co span { font-size: 12.5px; opacity: .9; letter-spacing: .04em; text-transform: uppercase; }
.rc-num { text-align: right; line-height: 1.15; }
.rc-num span { display: block; font-size: 11px; opacity: .85; }
.rc-num b { font-size: 17px; letter-spacing: .06em; font-variant-numeric: tabular-nums; }

.rc-stamp { margin: 0; padding: 9px 16px; background: color-mix(in srgb, var(--rc) 18%, #fff); color: #1b1b1b; border-bottom: 2px dashed var(--rc); text-align: center; font-weight: 800; font-size: 18px; letter-spacing: .08em; text-transform: uppercase; }
.rc-body { padding: 14px 16px 6px; display: grid; gap: 12px; }
.rc-meta { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 2px 8px; align-items: baseline; font-size: 14px; }
.rc .rc-meta div { color: #5d5d5d; }
.rc-meta b { font-variant-numeric: tabular-nums; }
.rc .rc-k { display: block; font-size: 12px; color: #5d5d5d; text-transform: uppercase; letter-spacing: .05em; }
.rc-cust { display: grid; gap: 1px; }
.rc-cust b { font-size: 17px; }
.rc .rc-sub { font-size: 13.5px; color: #4a4a4a; }

.rc-items { width: 100%; border-collapse: collapse; font-size: 14px; background: rgba(255, 255, 255, .7); border-radius: 10px; overflow: hidden; }
.rc .rc-items th { text-align: left; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: #5d5d5d; padding: 7px 8px; border-bottom: 2px solid var(--rc); }
.rc-items td { padding: 7px 8px; border-bottom: 1px solid rgba(0, 0, 0, .08); vertical-align: top; }
.rc-items tr:last-child td { border-bottom: 0; }
.rc-q, td.rc-q { width: 3em; font-weight: 700; font-variant-numeric: tabular-nums; }
.rc-p, .rc-t { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
th.rc-p, th.rc-t { text-align: right; }
td.rc-t { font-weight: 600; }

.rc-total { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 14px; border-radius: 12px; background: var(--rc); color: var(--rc-ink); }
.rc-total span { font-weight: 700; letter-spacing: .08em; }
.rc-total b { font-size: 26px; font-variant-numeric: tabular-nums; }
.rc-pay { display: flex; justify-content: space-between; align-items: baseline; padding: 0 2px; }
.rc-pay b { font-size: 17px; }
.rc .rc-concept { font-size: 14px; color: #3a3a3a; padding: 8px 10px; background: rgba(255, 255, 255, .7); border-radius: 10px; }
.rc .rc-credit .rc-paid { color: #15803d; }
.rc-credit {font-size: 14px; padding: 9px 12px; border-radius: 10px; border: 2px solid var(--rc); background: #fff; display: grid; gap: 3px; }
.rc .rc-credit b { color: #b3261e; }
.rc .rc-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 16px 14px; font-size: 12.5px; color: #4a4a4a; }
.rc .rc-foot span { color: #4a4a4a; }
.rc { color: #1b1b1b; }
.rc .rc-top, .rc .rc-top * , .rc .rc-total, .rc .rc-total * { color: var(--rc-ink); }
.rc .rc-stamp { color: #1b1b1b; }
.rc-void { position: absolute; inset: 0; display: grid; place-items: center; font-size: 64px; font-weight: 900; letter-spacing: .12em; color: rgba(179, 38, 30, .5); transform: rotate(-18deg); pointer-events: none; border: 0; text-shadow: 0 0 0 #fff; }

.rc-ask { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: #fff; color: #1b1b1b; }
.rc-ask[hidden] { display: none; }
.rc-ask-l { font-size: 14px; line-height: 1.35; color: #1b1b1b; }
.rc-ask-in { width: 100%; min-height: 46px; padding: 0 12px; border: 2px solid #c9c9c9; border-radius: 10px; font: 18px/1 system-ui, sans-serif; color: #111; background: #fff; }
.rc-ask-in:focus { outline: 3px solid #1fa855; border-color: #1fa855; }
.rc-ask-msg { margin: 0; font-size: 13.5px; color: #b3261e; }
.rc-ask .rc-btn { border-color: #1fa855; }
.rc-ask-skip { justify-self: center; font-size: 13.5px; color: #4a4a4a; text-decoration: underline; padding: 6px; background: none; border: 0; cursor: pointer; }
.rc-sheet > .rc-ask-msg { padding: 8px 12px; border-radius: 10px; background: #fff; }
.rc-review { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: #fff6d1; border: 2px solid #f5b800; color: #3b2c00; font-size: 14px; line-height: 1.35; }
.rc-review b { font-size: 17px; color: #3b2c00; }
.rc-review span { color: #3b2c00; }
.rc-warns { list-style: none; margin: 0; padding: 10px 14px; border-radius: 14px; background: #fff; border: 2px solid #d32f2f; display: grid; gap: 4px; font-size: 14px; color: #8a1c14; }
.rc-warns li::before { content: "⚠ "; }
.rc .rc-draft, .rc-draft { color: rgba(60, 60, 60, .28); font-size: 56px; }
.rc-ok { background: #1fa855; border-color: #1fa855; color: #fff; }
.rc-ok:hover { background: #178a45; }
.rc-ok[disabled] { opacity: .6; }
.rc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rc-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 2px solid #fff; background: transparent; color: #fff; font: 700 16px/1 system-ui, sans-serif; text-decoration: none; cursor: pointer; }
.rc-btn:hover { background: rgba(255, 255, 255, .14); }
.rc-wa { background: #1fa855; border-color: #1fa855; }
.rc-wa:hover { background: #178a45; }
.rc-done { grid-column: 1 / -1; background: #fff; color: #111; }
.rc-done:hover { background: #ececec; }

@media print {
  body.rc-printing > *:not(.rc-overlay) { display: none !important; }
  body.rc-printing dialog.rc-overlay { position: static; background: none; padding: 0; overflow: visible; display: block; width: 100%; height: auto; }
  body.rc-printing .rc-sheet { width: 100%; max-width: 420px; margin: 0 auto; }
  body.rc-printing .rc-actions { display: none !important; }
  body.rc-printing .rc { box-shadow: none; }
}
