/* ============================================================
   Pago mixto + Desglose de billetes — UI para crearVenta
   ============================================================
   Panel que se expande cuando el facturador elige "Pago mixto" en
   el select de método de pago. Cada row es una combinación de
   método + monto + referencia opcional.
   ============================================================ */

.mixed-pay-panel {
    background: var(--bg-surface, #fff);
    border: 2px solid #4f46e5;
    border-radius: 12px;
    padding: 14px 16px;
    margin: 12px 0;
    box-shadow: 0 4px 14px rgba(79, 70, 229, .08);
    animation: mixedFadeIn .18s ease;
}
@keyframes mixedFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.mixed-pay-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px; padding-bottom: 10px;
    border-bottom: 1px solid var(--divider, #e6eaf0);
}
.mixed-pay-header strong { color: #4f46e5; font-size: 14px; }
.mixed-pay-header strong i { margin-right: 6px; }

.mixed-pay-rows {
    display: flex; flex-direction: column; gap: 8px;
    margin-bottom: 12px;
}
.mixed-pay-row {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 36px;
    gap: 8px;
    align-items: end;
    padding: 8px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.mixed-pay-row label {
    display: block; font-size: 11px; font-weight: 600;
    color: var(--fg-3, #7a8698); text-transform: uppercase;
    letter-spacing: .03em; margin-bottom: 4px;
}
.mixed-pay-row select,
.mixed-pay-row input {
    width: 100%; padding: 7px 9px;
    border: 1px solid var(--border-strong, #d0d7e1);
    border-radius: 6px; background: #fff;
    font-size: 13px; color: var(--fg-1, #0a0e27);
    box-sizing: border-box;
}
.mixed-pay-row__remove {
    align-self: end;
    height: 32px; width: 32px;
    background: #fef2f2; color: #b91c1c;
    border: 1px solid #fca5a5; border-radius: 6px;
    cursor: pointer; font-size: 13px;
    transition: background .12s;
}
.mixed-pay-row__remove:hover { background: #fee2e2; }
.mixed-pay-row--single .mixed-pay-row__remove { visibility: hidden; }

@media (max-width: 720px) {
    .mixed-pay-row { grid-template-columns: 1fr 1fr; }
    .mixed-pay-row__remove { grid-column: span 2; width: 100%; }
}

#btnAddMixedRow { margin-bottom: 12px; }

.mixed-pay-summary {
    border-top: 1px solid var(--divider, #e6eaf0);
    padding-top: 10px; margin-top: 6px;
    background: #fafbfc; border-radius: 6px; padding: 10px 12px;
}
.mixed-pay-summary__row {
    display: flex; justify-content: space-between;
    padding: 3px 0; font-size: 13px;
}
.mixed-pay-summary__row span { color: var(--fg-3, #7a8698); }
.mixed-pay-summary__row strong { color: var(--fg-1, #0a0e27); font-weight: 600; }
.mixed-pay-summary__diff { font-weight: 700; padding-top: 6px;
    border-top: 1px dashed var(--divider, #e6eaf0); margin-top: 4px; }
.mixed-pay-summary__diff--ok      { color: #059669; }   /* exacto */
.mixed-pay-summary__diff--missing { color: #b45309; }   /* falta */
.mixed-pay-summary__diff--over    { color: #b91c1c; }   /* sobrepasó */

/* ============================================================
   Desglose de billetes y monedas (commit 4 lo activa)
   ============================================================ */
.cash-breakdown {
    background: #fffbeb; border: 1px solid #fcd34d; border-radius: 10px;
    padding: 12px 14px; margin-top: 10px;
}
.cash-breakdown__title {
    font-size: 13px; font-weight: 600; color: #92400e;
    margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.cash-breakdown__group {
    margin-bottom: 10px;
}
.cash-breakdown__group h5 {
    font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
    color: #78716c; font-weight: 600; margin: 6px 0;
}
.cash-breakdown__grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}
.cash-breakdown__item {
    display: flex; align-items: center; gap: 6px;
    background: #fff; border: 1px solid #f3e8d4; border-radius: 6px;
    padding: 6px 8px;
}
.cash-breakdown__item label {
    flex: 1 1 auto; font-size: 12px; font-weight: 600; color: #44403c;
    margin: 0;
}
.cash-breakdown__item input {
    width: 50px; padding: 4px 6px;
    border: 1px solid #d6d3d1; border-radius: 4px;
    text-align: center; font-size: 13px;
    box-sizing: border-box;
}
.cash-breakdown__item input:focus { border-color: #f59e0b; outline: none; }
.cash-breakdown__total {
    margin-top: 8px; padding: 8px 10px;
    background: #fef3c7; border-radius: 6px;
    display: flex; justify-content: space-between;
    font-size: 13px; font-weight: 600;
}
.cash-breakdown__total--ok       { background: #d1fae5; color: #065f46; }
.cash-breakdown__total--missing  { background: #fef3c7; color: #92400e; }
.cash-breakdown__total--over     { background: #dbeafe; color: #1e3a8a; } /* hay vuelto */

/* ============================================================
   Payment Box widget (modales CxC / CxP) — reutiliza el look de
   .mixed-pay-* pero en un formato más compacto para caber en
   modales de Bootstrap sin overflow.
   ============================================================ */
.payment-box { margin-top: 8px; }
.payment-box .pb-method {
    width: 100%; padding: 8px 10px;
    border: 1px solid var(--border-strong, #d0d7e1); border-radius: 6px;
    background: #fff; font-size: 13px;
}
.payment-box .pb-mixed-panel {
    margin-top: 10px; padding: 10px 12px;
    border: 1.5px solid #4f46e5; border-radius: 10px;
    background: #fafbfc;
}
.payment-box .pb-mixed-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.payment-box .pb-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.2fr 32px;
    gap: 6px; align-items: center;
    padding: 6px;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 6px;
}
.payment-box .pb-row select,
.payment-box .pb-row input {
    width: 100%; padding: 5px 7px;
    border: 1px solid var(--border-strong, #d0d7e1); border-radius: 4px;
    font-size: 12.5px; box-sizing: border-box;
}
.payment-box .pb-row-remove {
    height: 28px; width: 28px;
    background: #fef2f2; color: #b91c1c; border: 1px solid #fca5a5;
    border-radius: 4px; cursor: pointer; font-size: 11px;
}
.payment-box .pb-row-remove:hover { background: #fee2e2; }
.payment-box .pb-add-row { margin-bottom: 8px; }
.payment-box .pb-mixed-summary {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 10px; background: #fff;
    border-radius: 4px; font-size: 12.5px;
}
.payment-box .pb-mixed-diff { font-weight: 700; }
