/* =============================================================================
   MODALS.CSS - Estilos centralizados para todos los modales del sistema
   ============================================================================= */

/* --- UTILIDADES GENERALES --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    width: 500px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scale-in {
    animation: scaleIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes popIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Tamaños Estandarizados */
.modal-sm {
    width: 350px !important;
}

.modal-md {
    width: 500px !important;
}

.modal-lg {
    width: 700px !important;
    max-width: 95%;
}

.modal-xl {
    width: 950px !important;
    max-width: 95%;
}

.pdf-viewer-content {
    width: 90vw !important;
    height: 90vh !important;
    max-width: 1400px !important;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Headers */
.modal-header-dark {
    background: #333;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.modal-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 10px 20px;
}

.modal-title-vino {
    margin: 0;
    color: var(--vino);
    font-size: 20px;
    font-weight: 800;
}

.modal-title-white {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: white;
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    transition:
        transform 0.3s ease,
        color 0.3s ease;
}

.btn-close-modal:hover {
    transform: rotate(90deg);
    color: #c0392b;
}

.btn-close-white {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* Botones */
.btn-main-action {
    background: var(--vino);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-secondary {
    background: white;
    border: 1px solid #ddd;
    color: #555;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.flex-row-gap {
    display: flex;
    gap: 10px;
    align-items: center;
}

.flex-1 {
    flex: 1;
}

/* --- MODAL: customConfirmModal --- */
#customConfirmModal {
    z-index: 20000;
}

.confirm-icon {
    font-size: 50px;
    color: var(--vino);
    margin-bottom: 15px;
    animation: bounce 2s infinite;
}

.confirm-title {
    color: #333;
    margin: 0 0 10px 0;
    font-weight: 800;
}

.confirm-text {
    color: #666;
    font-size: 14px;
    margin-bottom: 25px;
    line-height: 1.5;
}

.confirm-btn {
    border-radius: 50px;
}

/* --- MODAL: modalAddEmployee --- */
#modalAddEmployee {
    z-index: 10005;
}

.emp-modal-content {
    display: flex;
    flex-direction: column;
    max-height: 92vh;
    overflow: hidden;
    padding: 0;
    border-radius: 24px;
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.emp-header {
    flex-shrink: 0;
    padding: 30px 40px;
    background: linear-gradient(135deg, #5e1c26 0%, #4a151e 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.emp-title-icon {
    margin-right: 12px;
    opacity: 0.9;
}

.emp-subtitle {
    font-size: 13px;
    opacity: 0.7;
    margin-top: 6px;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: white;
}

.emp-body {
    padding: 40px;
    overflow-y: auto;
    flex: 1;
    background: #fdfdfd;
}

.emp-footer {
    padding: 25px 40px;
    background: #fff;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    flex-shrink: 0;
    box-shadow: 0 -10px 25px -5px rgba(0, 0, 0, 0.05);
}

.emp-btn-cancel {
    padding: 0 30px;
    height: 48px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    background: #f1f5f9;
    color: #64748b;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.emp-btn-save {
    padding: 0 40px;
    height: 48px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    background: #5e1c26;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 20px -5px rgba(94, 28, 38, 0.3);
    transition: 0.2s;
}

/* --- ESTILOS INTERNOS DEL FORMULARIO DE EMPLEADO (EXPEDIENTE) --- */
.exp-section-card {
    background: white;
    border-radius: 16px;
    /* Bordes redondeados agradables */
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.01);
    border: 1px solid #f1f5f9;
}

.exp-title {
    font-size: 14px;
    font-weight: 800;
    color: #2d3748;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #edf2f7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.exp-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.exp-input {
    width: 100%;
    padding: 10px 15px;
    border-radius: 10px;
    /* Redondeado consistente */
    border: 1px solid #e2e8f0;
    font-size: 13px;
    color: #334155;
    background: #f8fafc;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.exp-input:focus {
    background: white;
    border-color: #5e1c26;
    box-shadow: 0 0 0 3px rgba(94, 28, 38, 0.05);
    outline: none;
}

.exp-input::placeholder {
    color: #cbd5e1;
}

.job-entry {
    background: white;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 15px;
    transition: border-color 0.2s;
}

.job-entry:hover {
    border-color: #cbd5e0;
}

/* --- MODAL: modalAttendanceExport --- */
#modalAttendanceExport {
    z-index: 10060;
}

.att-icon {
    font-size: 40px;
    color: #e74c3c;
    margin-bottom: 15px;
}

.att-title {
    margin: 0 0 10px 0;
    color: #2d3748;
}

.att-text {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 25px;
}

.att-info-box {
    background: #f8fafc;
    border-color: #e2e8f0;
    display: block;
    text-align: left;
}

.att-input {
    font-weight: bold;
    color: #333;
}

/* --- MODAL: modalAudit --- */
#modalInventoryAudit {
    z-index: 10080;
}

.ia-content {
    width: 750px;
    padding: 0;
    overflow: hidden;
    background: white;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.ia-header {
    background: var(--vino);
    padding: 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ia-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.ia-subtitle {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 4px;
}

.ia-impact {
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.ia-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    background: #f8f9fa;
}

.ia-thead {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.ia-th {
    color: #7f8c8d;
    text-transform: uppercase;
    font-size: 11px;
}

.ia-footer {
    padding: 20px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.ia-btn-save {
    background: #27ae60;
    border-color: #27ae60;
}

/* --- MODAL: modalAuditExport --- */
#modalAuditExport {
    z-index: 10065;
}

.audit-exp-icon {
    font-size: 40px;
    color: #27ae60;
    margin-bottom: 15px;
}

/* --- MODAL: modalBatchPrint --- */
#modalBatchPrint {
    z-index: 10060;
}

.batch-preview-container {
    flex: 1;
    overflow-y: auto;
    background: #555;
    padding: 30px;
    display: flex;
    justify-content: center;
}

.batch-statusbar {
    padding: 20px;
    background: white;
}

.batch-info-text {
    font-weight: bold;
    color: #555;
}

.batch-btn-print {
    padding: 10px 40px;
}

/* --- MODAL: modalBenefits --- */
#modalBenefits {
    z-index: 10002;
}

.ben-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.ben-header {
    background: #5e1c26;
}

.ben-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.ben-card {
    background: #f4f6f8;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
}

.ben-label-sm {
    font-size: 11px;
    color: #5e1c26;
    font-weight: bold;
    text-transform: uppercase;
}

.ben-val-lg {
    font-size: 18px;
    font-weight: 800;
    color: #2d3748;
}

.ben-date-input {
    border: none;
    background: transparent;
    font-weight: bold;
    color: #5e1c26;
    font-family: inherit;
    cursor: pointer;
    text-align: right;
}

.ben-section-title {
    margin: 20px 0 10px 0;
    color: #5e1c26;
    font-size: 14px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.ben-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    align-items: center;
}

.ben-row-title {
    font-weight: 700;
    font-size: 13px;
    color: #2d3748;
}

.ben-row-desc {
    font-size: 11px;
    color: #718096;
}

.ben-row-val {
    font-weight: 800;
    color: #27ae60;
    font-size: 15px;
}

.ben-extra-box {
    background: #f8fafc;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 15px;
}

.ben-alert {
    background: #fff3cd;
    color: #856404;
    padding: 10px;
    border-radius: 8px;
    font-size: 12px;
    margin-bottom: 15px;
    border: 1px solid #ffeeba;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ben-footer {
    padding: 15px;
    background: #f7fafc;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.ben-btn-close {
    width: 100%;
}

/* --- MODAL: modalCheesyCard --- */
#modalCheesyCard {
    z-index: 10050;
}

.card-print-area {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.card-btn-print {
    width: 100%;
}

/* --- MODAL: modalClockKiosk --- */
.kiosk-overlay {
    z-index: 10050;
    align-items: center;
    justify-content: center;
    background: rgba(44, 62, 80, 0.95);
    backdrop-filter: blur(8px);
}

.kiosk-content {
    background: transparent;
    box-shadow: none;
    width: 100%;
    max-width: 1100px;
    padding: 0;
    border: none;
    display: flex;
    flex-direction: column;
    height: 90vh;
}

.kiosk-header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
    flex-shrink: 0;
}

.kiosk-clock {
    font-size: 70px;
    font-weight: 200;
    letter-spacing: -2px;
    font-variant-numeric: tabular-nums;
}

.kiosk-subtitle {
    font-size: 16px;
    opacity: 0.7;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.kiosk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    align-content: start;
}

.kiosk-footer {
    text-align: center;
    margin-top: 20px;
    flex-shrink: 0;
}

.btn-kiosk-exit {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 40px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-kiosk-exit:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* --- MODAL: modalCloseRegister --- */
#modalCloseRegister {
    z-index: 10000;
}

.close-reg-content {
    max-width: 500px;
    padding: 0 !important;
    overflow: hidden;
}

.close-reg-title {
    margin: 0;
    color: #c0392b;
    display: flex;
    align-items: center;
}

.close-reg-body {
    padding: 10px 30px 35px 30px;
}

.close-reg-kpi-container {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 25px;
    border: 1px solid #eee;
}

.close-reg-kpi-main {
    text-align: center;
    margin-bottom: 15px;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 10px;
}

.close-reg-kpi-row {
    display: flex;
    justify-content: space-around;
}

.kpi-item {
    text-align: center;
}

.kpi-label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    font-weight: 700;
    display: block;
    margin-bottom: 2px;
}

.kpi-value-lg {
    font-size: 24px;
    color: #333;
    font-weight: 800;
}

.kpi-value-sm {
    font-size: 16px;
    font-weight: 700;
}

.close-reg-expected-box {
    background: #fff5f5;
    color: #c0392b;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #feb2b2;
    margin-bottom: 25px;
}

.close-reg-expected-box strong {
    font-size: 18px;
}

.close-reg-input {
    font-size: 28px;
    text-align: center;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 30px;
    border: 2px solid #eee;
    border-radius: 12px;
    padding: 10px;
    margin-top: 10px;
}

.close-reg-input:focus {
    border-color: #27ae60;
    outline: none;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.close-reg-btn-exp {
    border: 1px solid #e74c3c;
    color: #e74c3c;
    background: #fff;
    transition: all 0.2s;
}

.close-reg-btn-exp:hover {
    background: #fff5f5;
    transform: translateY(-2px);
}

.close-reg-btn-close {
    background: #c0392b;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(192, 57, 43, 0.3);
}

.close-reg-btn-close:hover {
    background: #a93226;
    transform: translateY(-2px);
}

.close-reg-panel-exp {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 0;
    padding-top: 0;
    border-top: 1px dashed transparent;
}

.close-reg-panel-exp.active {
    max-height: 300px;
    opacity: 1;
    margin-top: 15px;
    padding-top: 15px;
    border-top-color: #ccc;
}

.close-reg-btn-confirm-exp {
    width: 100%;
    background: #e67e22;
    transition: 0.2s;
}

.close-reg-btn-confirm-exp:hover {
    background: #d35400;
    transform: translateY(-2px);
}

/* --- MODAL: modalEditCost --- */
.edit-cost-input {
    font-weight: bold;
    font-size: 18px;
    color: #2c3e50;
}

.edit-cost-btn {
    padding: 0 20px;
}

.edit-cost-warn {
    font-size: 10px;
    color: #e67e22;
    margin-top: 5px;
}

.edit-cost-history {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.edit-cost-list {
    max-height: 150px;
    overflow-y: auto;
    margin-top: 10px;
    background: #f9f9f9;
    border-radius: 8px;
    padding: 10px;
}

/* --- MODAL: ModalExpense --- */
#modalExpense {
    z-index: 10060;
}

.expense-modal-content {
    background: white;
    width: 95%;
    max-width: 600px;
    border-radius: 16px;
    padding: 35px;
    /* Espacio interno restaurado */
    box-sizing: border-box;
}

.expense-modal-title {
    margin: 0 0 25px 0;
    color: var(--vino);
    font-size: 22px;
    font-weight: 800;
}

.expense-modal-label {
    font-size: 11px;
    font-weight: 800;
    color: #777;
    display: block;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.expense-modal-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    height: 48px;
    font-size: 14px;
    color: #333;
    margin-bottom: 0;
    font-family: 'Montserrat', sans-serif;
}

.expense-modal-input:focus {
    border-color: var(--vino);
    outline: none;
    background: #fffdf5;
}

/* Estructura de Filas */
.expense-modal-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.expense-modal-check-container {
    display: flex;
    gap: 20px;
    margin-bottom: 0;
    align-items: center;
}

.expense-modal-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
    color: #555;
}

.expense-modal-check {
    width: 20px;
    height: 20px;
    accent-color: var(--vino);
    cursor: pointer;
}

.expense-modal-btn-cancel {
    flex: 1;
    padding: 14px;
    background: #f4f6f8;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    color: #666;
    transition: 0.2s;
}

.expense-modal-btn-cancel:hover {
    background: #e9ecef;
}

.expense-modal-btn-save {
    flex: 1;
    padding: 14px;
    background: var(--vino);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(94, 28, 38, 0.2);
    transition: 0.2s;
}

.expense-modal-btn-save:hover {
    background: #4a151e;
    transform: translateY(-2px);
}

/* --- MODAL: modalExplorer --- */
#modalExplorer {
    z-index: 10020;
}

.exp-modal-content {
    display: flex;
    flex-direction: column;
    height: 85vh;
    max-height: 800px;
    overflow: hidden;
    padding: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.exp-toolbar {
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.exp-btn-icon {
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
}

.exp-divider {
    width: 1px;
    height: 24px;
    background: #ddd;
    margin: 0 5px;
}

.exp-btn-primary {
    background: #27ae60;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.exp-btn-secondary {
    background: white;
    border: 1px solid #ddd;
    color: #333;
    padding: 8px 15px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.exp-context-actions {
    margin-left: 10px;
    opacity: 0.4;
    pointer-events: none;
    display: flex;
    gap: 5px;
}

.exp-btn-danger {
    border: 1px solid #ffcccc;
    background: #fff5f5;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    color: #c0392b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.exp-search-wrapper {
    position: relative;
}

.exp-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 14px;
}

.exp-search-input {
    padding: 8px 10px 8px 30px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    width: 200px;
    font-size: 13px;
}

.exp-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.exp-breadcrumbs {
    padding: 10px 15px;
    background: white;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #555;
    flex-shrink: 0;
}

.exp-root-icon {
    color: #f39c12;
}

.exp-grid-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #fcfcfc;
    position: relative;
}

.exp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    align-content: start;
}

.exp-selection-box {
    position: absolute;
    border: 1px solid #3498db;
    background: rgba(52, 152, 219, 0.2);
    display: none;
    pointer-events: none;
    z-index: 100;
}

.exp-statusbar {
    padding: 10px 15px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    font-size: 11px;
    color: #777;
    display: flex;
    justify-content: space-between;
    flex-shrink: 0;
}

.exp-selection-count {
    color: #5e1c26;
    font-weight: bold;
}

/* --- MODAL: modalFiscalData --- */
#modalFiscalData {
    z-index: 10060;
}

.fiscal-rfc {
    text-transform: uppercase;
}

/* --- MODAL: modalLayaway --- */
#modalLayaway {
    z-index: 10010;
    background: rgba(0, 0, 0, 0.85);
}

.lay-content {
    background: white;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.lay-header {
    background: #5e1c26;
    padding: 20px;
    text-align: center;
    color: white;
}

.lay-icon {
    font-size: 40px;
    margin-bottom: 5px;
}

.lay-title {
    margin: 0;
    font-size: 22px;
}

.lay-subtitle {
    opacity: 0.8;
    font-size: 14px;
    margin: 5px 0;
}

.lay-body {
    padding: 25px;
}

.lay-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 16px;
    border-bottom: 1px dashed #eee;
    padding-bottom: 15px;
}

.lay-total-val {
    color: #333;
    font-size: 20px;
}

.lay-input-section {
    margin-bottom: 20px;
}

.lay-label {
    font-size: 12px;
    font-weight: 800;
    color: #5e1c26;
    display: block;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.lay-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lay-symbol {
    font-size: 24px;
    color: #27ae60;
    font-weight: bold;
}

.lay-input {
    width: 100%;
    font-size: 28px;
    font-weight: 800;
    color: #333;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    outline: none;
    transition: 0.3s;
}

.lay-percent-btns {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 8px;
}

.lay-pill-btn {
    border: 1px solid #ccc;
    background: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    font-weight: bold;
    color: #555;
}

.lay-balance-box {
    background: #fff3e0;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    border: 1px solid #ffe0b2;
}

.lay-balance-label {
    font-size: 12px;
    color: #e67e22;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lay-balance-val {
    font-size: 32px;
    font-weight: 900;
    color: #d35400;
    margin-top: 5px;
}

.lay-footer {
    padding: 20px;
    background: #f9f9f9;
    display: flex;
    gap: 10px;
    border-top: 1px solid #eee;
}

.lay-btn-cancel {
    flex: 1;
    padding: 15px;
    border: none;
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-weight: bold;
    color: #555;
    cursor: pointer;
}

.lay-btn-confirm {
    flex: 2;
    padding: 15px;
    background: #e67e22;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3);
}

/* --- MODAL: modalLiabilitiesControl --- */
#modalLiabilitiesControl {
    z-index: 10060;
}

.liab-content {
    background: #f4f6f8;
}

.liab-header {
    padding: 20px 30px;
    background: white;
    border-bottom: 1px solid #ddd;
    margin: 0;
}

.liab-subtitle {
    font-size: 13px;
    color: #7f8c8d;
    margin-top: 5px;
}

.liab-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.liab-kpi-container {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.liab-kpi-card {
    flex: 1;
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid #eee;
    border-left: 5px solid;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.liab-kpi-label {
    font-size: 11px;
    font-weight: 800;
    color: #999;
    text-transform: uppercase;
}

.liab-kpi-val {
    font-size: 24px;
    font-weight: 900;
    margin-top: 5px;
}

.liab-toolbar {
    margin-bottom: 15px;
}

.liab-title {
    font-size: 14px;
    font-weight: bold;
    color: #555;
}

.liab-btn-add {
    padding: 10px 20px;
    font-size: 13px;
    height: auto;
}

.liab-table-container {
    background: white;
    border-radius: 12px;
    border: 1px solid #eee;
    overflow: hidden;
}

.liab-table {
    margin: 0;
}

.liab-thead {
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

/* --- MODAL: modalLiquidation --- */
#modalLiquidation {
    z-index: 10010;
}

.liq-content {
    width: 650px;
    font-family: 'Montserrat', sans-serif;
}

.liq-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.liq-title {
    margin: 0;
    color: #c0392b;
}

.liq-close {
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
}

.liq-info-box {
    background: #f4f6f8;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
}

.liq-form-box {
    background: #fff5f5;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid #fed7d7;
}

.liq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.liq-label {
    font-size: 11px;
    font-weight: bold;
    color: #c0392b;
}

.liq-input {
    width: 100%;
    margin-top: 5px;
    padding: 6px;
}

.liq-table {
    width: 100%;
    font-size: 13px;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.liq-thead-row {
    background: #f7fafc;
}

.liq-th {
    text-align: left;
    padding: 8px;
}

.liq-th-right {
    text-align: right;
    padding: 8px;
}

.liq-td {
    padding: 5px;
}

.liq-td-right {
    text-align: right;
}

.liq-total-row {
    border-top: 2px solid #333;
    font-weight: bold;
    font-size: 16px;
}

.liq-total-cell {
    padding: 15px 5px;
}

.liq-total-val {
    text-align: right;
    padding: 15px 5px;
    color: #c0392b;
}

.liq-footer {
    display: flex;
    gap: 10px;
}

.liq-btn-print {
    flex: 1;
    padding: 12px;
    border-radius: 6px;
    border: none;
    background: #2d3436;
    color: white;
    cursor: pointer;
}

.liq-btn-confirm {
    flex: 1;
    padding: 12px;
    border-radius: 6px;
    border: none;
    background: #c0392b;
    color: white;
    cursor: pointer;
}

/* --- MODAL: modalManualLiability --- */
#modalManualLiability {
    z-index: 10070;
}

.man-liab-amount {
    font-weight: bold;
    font-size: 22px;
    color: #333;
}

.man-liab-info {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.man-liab-check {
    width: 20px;
    height: 20px;
    accent-color: var(--verde);
    cursor: pointer;
}

.man-liab-label {
    margin-left: 10px;
    font-weight: bold;
    color: #166534;
    cursor: pointer;
}

.man-liab-btn {
    width: 100%;
}

/* --- MODAL: modalNewClient --- */
.new-client-body {
    font-size: 12px;
    color: #666;
    margin-bottom: 20px;
}

.new-client-footer {
    margin-top: 20px;
}

/* --- MODAL: modalOpenRegister --- */
#modalOpenRegister {
    z-index: 10000;
}

.open-reg-content {
    max-width: 350px;
    text-align: center;
}

.open-reg-title {
    color: #5e1c26;
}

.open-reg-box {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.open-reg-label {
    font-weight: bold;
    color: #777;
}

.open-reg-input {
    font-size: 28px;
    text-align: center;
    font-weight: bold;
    color: #27ae60;
}

.open-reg-btn-main {
    width: 100%;
}

.open-reg-btn-sec {
    margin-top: 10px;
    width: 100%;
}

/* --- MODAL: modalOrderDetails --- */
#modalOrderDetails {
    z-index: 10050;
}

.order-details-content {
    width: 500px;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.order-details-header {
    position: relative;
    text-align: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: white;
    flex-shrink: 0;
}

.order-details-title {
    margin: 0;
    color: var(--vino);
    font-size: 20px;
    font-weight: 800;
}

.order-details-id {
    color: #999;
    font-size: 12px;
    margin-top: 4px;
    font-weight: 700;
    letter-spacing: 1px;
}

.order-details-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
    background: #fff;
}

.order-details-actions {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #f9f9f9;
    flex-shrink: 0;
}

.order-det-loading {
    text-align: center;
    padding: 40px;
    color: #ccc;
}

/* --- MODAL: modalPayDue --- */
#modalPayDue {
    z-index: 10060;
    background: rgba(0, 0, 0, 0.85);
}

.pay-due-content {
    background: white;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.pay-due-header {
    background: #2980b9;
    padding: 20px;
    text-align: center;
    color: white;
}

.pay-due-icon {
    font-size: 35px;
    margin-bottom: 5px;
}

.pay-due-title {
    margin: 0;
    font-size: 20px;
}

.pay-due-subtitle {
    opacity: 0.8;
    font-size: 13px;
    margin: 5px 0;
}

.pay-due-amount {
    font-weight: 800;
}

.pay-due-body {
    padding: 25px;
}

.pay-due-label {
    font-size: 11px;
    font-weight: 800;
    color: #7f8c8d;
    display: block;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.pay-due-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.pay-due-symbol {
    font-size: 24px;
    color: #2980b9;
    font-weight: bold;
}

.pay-due-input {
    width: 100%;
    font-size: 28px;
    font-weight: 800;
    color: #333;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    outline: none;
    transition: 0.3s;
}

.pay-due-btns {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.pay-due-pill {
    padding: 5px 10px;
    border-radius: 15px;
    border: 1px solid #ccc;
    background: white;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    color: #555;
}

.pay-due-pill:hover {
    background: #eee;
}

.pay-due-pill-blue {
    background: #eaf2f8;
    color: #2980b9;
    border: 1px solid #aed6f1;
}

.pay-due-feedback {
    margin-top: 15px;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
    color: #27ae60;
}

.pay-due-footer {
    padding: 20px;
    background: #f9f9f9;
    display: flex;
    gap: 10px;
    border-top: 1px solid #eee;
}

.pay-due-btn-cancel {
    flex: 1;
    padding: 15px;
    border: none;
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-weight: bold;
    color: #555;
    cursor: pointer;
}

.pay-due-btn-confirm {
    flex: 2;
    padding: 15px;
    background: #2980b9;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(41, 128, 185, 0.3);
}

/* --- MODAL: modalPayment --- */
#modalPayment {
    z-index: 10000;
}

/* Header Nuevo */
.payment-header-new {
    background: white;
    padding: 20px 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.pay-title {
    margin: 0;
    font-size: 14px;
    color: #999;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

/* KPI Cliente */
.pay-client-kpi {
    background: #e3f2fd;
    color: #1565c0;
    padding: 10px 35px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #bbdefb;
}

/* Galería Vendedores */
.seller-section {
    padding: 20px 35px 10px 35px;
    background: white;
}

.pay-label {
    font-size: 11px;
    font-weight: 800;
    color: #aaa;
    text-transform: uppercase;
    display: block;
    margin-bottom: 10px;
}

.seller-gallery-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.seller-list-container {
    flex: 1;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 5px 5px 15px 5px;
    scrollbar-width: none;
    margin-top: 5px;
}

.seller-list-container::-webkit-scrollbar {
    display: none;
}

.seller-card {
    min-width: 100px;
    height: 110px;
    border: 2px solid #eee;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    position: relative;
}

.seller-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.seller-card.selected {
    border-color: var(--vino);
    background: #fff5f5;
}

.seller-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 5px;
}

.seller-name {
    font-size: 11px;
    font-weight: 700;
    color: #555;
    text-align: center;
    line-height: 1.2;
}

.seller-role {
    font-size: 9px;
    color: #999;
    text-transform: uppercase;
    margin-top: 2px;
}

.seller-nav-btn {
    background: #f0f0f0;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    color: #555;
    font-weight: bold;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.seller-nav-btn:hover {
    background: #e0e0e0;
}

/* Totales Centrados */
.pay-centered-totals {
    text-align: center;
    padding: 20px 0 25px 0;
    background: white;
}

.pay-total-label {
    font-size: 11px;
    font-weight: 800;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.pay-total-amount-large {
    font-size: 48px;
    font-weight: 900;
    color: var(--vino);
    line-height: 1;
    margin-bottom: 8px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pay-change-kpi {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 800;
    background: #f4f6f8;
    color: #ccc;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    min-width: 120px;
    opacity: 0;
    transform: translateY(-10px);
}

.pay-change-kpi.show {
    opacity: 1;
    transform: translateY(0);
}

/* Switch Método Pago */
.pay-method-switch-container {
    display: flex;
    background: #e0e0e0;
    padding: 5px;
    border-radius: 14px;
    margin: 20px 35px;
}

.pay-method-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px;
    border-radius: 10px;
    font-weight: 700;
    color: #777;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pay-method-btn.active {
    background: var(--vino);
    color: white;
    box-shadow: 0 4px 10px rgba(94, 28, 38, 0.3);
}

.pay-method-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
}

/* Wallet */
.wallet-container-new {
    padding: 0 35px 20px 35px;
}

.wallet-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    background: #fff;
    padding: 10px 15px;
    border-radius: 10px;
    border: 1px solid #eee;
}

.wallet-toggle input {
    display: none;
}

.slider-round {
    width: 40px;
    height: 22px;
    background: #ccc;
    border-radius: 20px;
    position: relative;
    transition: 0.3s;
}

.slider-round::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: 0.3s;
}

input:checked+.slider-round {
    background: #27ae60;
}

input:checked+.slider-round::before {
    transform: translateX(18px);
}

.wallet-label-text {
    font-weight: 700;
    color: #555;
    font-size: 13px;
}

/* Inputs */
.pay-input-section {
    padding: 0 35px;
}

.pay-input-wrapper {
    position: relative;
    width: 97%;
    margin-bottom: 15px;
}

.pay-input-symbol {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    font-weight: 800;
    color: #aaa;
    pointer-events: none;
}

.pay-input-big {
    width: 100%;
    height: 50px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 22px;
    font-weight: 800;
    text-align: center;
    color: #333;
    margin-bottom: 0;
    outline: none;
    transition: all 0.3s ease;
    background: #fcfcfc;
    padding-left: 10px;
}

.pay-input-big:focus {
    border-color: var(--vino);
    background: white;
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.quick-cash-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 15px;
    padding: 0 35px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    max-height: 300px;
    opacity: 1;
    transform: translateY(0);
}

.quick-cash-grid.hidden {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

/* Botones Calculadora */
.btn-money {
    padding: 16px 10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 12px;
    color: #555;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.btn-money:hover {
    background: #f9f9f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.btn-money:active {
    transform: scale(0.95);
}

.btn-money.exact {
    background: #e8f5e9;
    color: #27ae60;
    border-color: #c8e6c9;
}

/* Footer */
.pay-footer-actions {
    padding: 25px 35px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.btn-pay-big {
    width: 100%;
    padding: 16px;
    background: var(--vino);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(94, 28, 38, 0.3);
    transition: 0.2s;
}

.btn-pay-big:hover {
    transform: translateY(-2px);
    background: #4a151e;
}

.btn-layaway-small {
    width: 100%;
    padding: 14px;
    background: #fff8e1;
    color: #d35400;
    border: 1px solid #ffe0b2;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.btn-layaway-small:hover {
    background: #ffe0b2;
}

/* --- MODAL: modalPayrollConfig --- */
#modalPayrollConfig {
    z-index: 99999;
}

.payroll-content {
    width: 90%;
    max-width: 350px;
}

.payroll-title {
    margin-top: 0;
}

.payroll-divider {
    border-top: 1px dashed #eee;
    margin: 15px 0;
    padding-top: 10px;
}

.payroll-subtitle {
    margin: 0 0 10px 0;
    font-size: 12px;
    color: #5e1c26;
}

.payroll-grid {
    margin-top: 10px;
}

.payroll-btn-save {
    background: #27ae60;
}

/* --- MODAL: modalPayslip --- */
#modalPayslipNew {
    z-index: 10000;
}

.payslip-content {
    width: 700px;
    background: white;
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.payslip-header {
    background: #5e1c26;
    padding: 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payslip-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
}

.payslip-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.payslip-body {
    padding: 0;
    max-height: 75vh;
    overflow-y: auto;
    background: #f4f4f4;
}

.payslip-loading {
    text-align: center;
    color: #999;
}

.payslip-footer {
    padding: 20px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.payslip-btn-print {
    flex: 1;
    border: 1px solid #ddd;
    background: white;
    color: #555;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

.payslip-btn-stamp {
    flex: 1;
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

/* --- MODAL: modalPDFViewer --- */
#modalPDFViewer {
    z-index: 10030;
    background: rgba(0, 0, 0, 0.85);
}

.pdf-content {
    width: 95%;
    height: 95vh;
    max-width: 1200px;
    padding: 0;
    display: flex;
    flex-direction: column;
    background: #333;
    overflow: hidden;
}

.pdf-toolbar {
    background: #222;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.pdf-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pdf-title {
    margin: 0;
    font-size: 16px;
    color: #fff;
}

.pdf-page {
    font-size: 12px;
    color: #aaa;
}

.pdf-controls {
    display: flex;
    gap: 10px;
}

.pdf-divider {
    width: 1px;
    background: #555;
    margin: 0 5px;
}

.pdf-btn-save {
    background: #27ae60;
    border-color: #27ae60;
    font-weight: bold;
}

.pdf-btn-close {
    border: none;
    background: transparent;
    font-size: 20px;
}

.pdf-canvas-container {
    flex: 1;
    overflow: auto;
    position: relative;
    display: flex;
    justify-content: center;
    background: #555;
    padding: 20px;
}

.pdf-canvas-wrapper {
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.pdf-canvas {
    display: block;
    background: white;
}

.pdf-draw-canvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    cursor: crosshair;
}

.pdf-tool-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #eee;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pdf-tool-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.pdf-tool-btn.active {
    background: #e67e22;
    border-color: #d35400;
    color: white;
}

/* --- MODAL: modalPinPad --- */
#modalPinPad {
    z-index: 10060;
}

.pin-title {
    margin-bottom: 20px;
}

.pin-text {
    font-size: 12px;
    color: #666;
    margin-bottom: 20px;
}

.pin-action {
    font-weight: bold;
}

.pin-input-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.pin-btn-del {
    background: #ffebee;
    color: #c0392b;
}

.pin-btn-submit {
    background: #e8f5e9;
    color: #27ae60;
}

.pin-btn-cancel {
    background: none;
    border: none;
    color: #777;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
}

/* --- MODAL: modalPosOptions --- */
#modalPosOptions {
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.pos-opt-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.pos-opt-header {
    padding: 15px;
    background: white;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pos-opt-title {
    margin: 0;
    color: #5e1c26;
    font-size: 1.2rem;
}

.pos-opt-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #ccc;
    padding: 0 10px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pos-opt-close:hover {
    transform: rotate(90deg) scale(1.1);
    color: #c0392b;
}

.pos-opt-body {
    padding: 15px;
    overflow-y: auto;
    flex: 1;
    background: #fff;
}

.pos-opt-footer {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fdfdfd;
}

.pos-opt-total {
    font-weight: 800;
    font-size: 1.4rem;
    color: #d35400;
}

.pos-opt-btn-confirm {
    padding: 12px 30px;
    border-radius: 8px;
    background: #27ae60;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 4px 6px rgba(39, 174, 96, 0.2);
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.pos-opt-btn-confirm:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 15px rgba(39, 174, 96, 0.3);
}

.pos-opt-btn-confirm:active {
    transform: scale(0.95);
}

.pulse-modal-price {
    animation: pulseModalPrice 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
}

@keyframes pulseModalPrice {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
        color: #e67e22;
        text-shadow: 0 0 5px rgba(230, 126, 34, 0.2);
    }

    100% {
        transform: scale(1);
    }
}

/* Tarjetas de Opciones (Hover) */
.pos-option-card {
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.pos-option-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* Transiciones de Contenido (Cash Control) */
.modal-content-transition {
    transition:
        opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- MODAL: modalPriceHistory --- */
#modalPriceHistory {
    z-index: 10070;
}

.hist-content {
    width: 500px;
    padding: 0;
    overflow: hidden;
    background: white;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.hist-header {
    background: var(--vino);
    padding: 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hist-title {
    margin: 0;
    font-size: 18px;
}

.hist-subtitle {
    font-size: 13px;
    opacity: 0.8;
    margin-top: 4px;
}

.hist-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.hist-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.hist-chart {
    height: 200px;
    width: 100%;
    position: relative;
    margin-bottom: 20px;
}

.hist-list-title {
    margin: 0 0 10px 0;
    color: #555;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.hist-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hist-loading {
    text-align: center;
    padding: 20px;
    color: #ccc;
}

.hist-footer {
    padding: 15px;
    background: #f9f9f9;
    text-align: center;
    border-top: 1px solid #eee;
    font-size: 11px;
    color: #999;
}

/* --- MODAL: ModalProductEditor --- */
#modalProductEditor {
    z-index: 10050;
}

.prod-ed-content {
    width: 95%;
    max-width: 950px;
    height: 90vh;
    height: 90dvh;
    /* Use dynamic viewport height */
    display: flex;
    flex-direction: column;
    padding: 0;
    background: #f4f6f8;
    overflow: hidden;
    /* Header/Footer stay fixed */
}

.prod-ed-header {
    padding: 15px 25px;
    background: white;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.prod-ed-title {
    margin: 0;
    color: var(--vino);
    font-size: 20px;
    font-weight: 800;
}

.prod-ed-subtitle {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.prod-ed-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.prod-ed-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #ccc;
    cursor: pointer;
}

.prod-ed-tabs-wrapper {
    background: white;
    border-bottom: 1px solid #ddd;
    padding: 0 10px;
}

.prod-ed-tabs {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 0;
}

.prod-ed-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Smooth touch scroll */
    padding: 10px 20px;
    position: relative;
    background: #fdfdfd;
}

.prod-ed-tab-content {
    padding: 0;
    height: auto;
    /* Allow auto height for basic info/prices */
    min-height: 100%;
}

.prod-ed-cost-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    height: 100%;
    min-height: 500px;
    /* Ensure enough height for side-by-side */
    gap: 15px;
}

.prod-ed-left-col {
    padding: 10px 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-right: 1px solid #eee;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    min-height: 0;
    /* Allow inner flex scrolling */
}

.prod-ed-scrollable-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 0;
    /* Critical for nested scrolling */
}

.prod-ed-table-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}

.prod-ed-table-header {
    padding: 10px 15px;
    background: #f0f4f8;
    border-bottom: 1px solid #dceefb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.prod-ed-table-title {
    margin: 0;
    color: #2980b9;
    font-size: 13px;
    font-weight: 700;
}

.prod-ed-table-subtitle {
    font-size: 10px;
    color: #2980b9;
}

.prod-ed-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.prod-ed-thead {
    background: #fff;
}

.prod-ed-tr {
    color: #999;
    font-size: 10px;
    text-transform: uppercase;
}

.prod-ed-th-left {
    padding: 8px 15px;
    text-align: left;
}

.prod-ed-th-center {
    padding: 8px 10px;
    text-align: center;
}

.prod-ed-th-right {
    padding: 8px 15px;
    text-align: right;
}

.prod-ed-th-action {
    width: 40px;
}

.prod-ed-recipe-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.prod-ed-recipe-header {
    padding: 10px 15px;
    background: #fff8e1;
    border-bottom: 1px solid #ffe0b2;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.prod-ed-recipe-title {
    margin: 0;
    color: #e67e22;
    font-size: 13px;
    font-weight: 700;
}

.prod-ed-recipe-subtitle {
    font-size: 10px;
    color: #e67e22;
}

.prod-ed-recipe-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 150px;
}

.prod-ed-sticky-thead {
    background: #fff;
    position: sticky;
    top: 0;
    border-bottom: 1px solid #eee;
}

.prod-ed-add-bar {
    background: white;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    position: sticky;
    bottom: 0;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
}

.prod-ed-select {
    flex: 2;
}

.prod-ed-qty {
    flex: 1;
}

.prod-ed-add-btn {
    height: 40px;
    width: 40px;
    border-radius: 8px;
    background: var(--vino);
    color: white;
    border: none;
    cursor: pointer;
}

.prod-ed-right-col {
    background: #f8fafc;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-left: 1px solid #eee;
}

.prod-ed-analysis-title {
    margin: 0;
    color: #333;
    font-size: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.prod-ed-label {
    font-size: 11px;
    font-weight: 800;
    color: #555;
    text-transform: uppercase;
}

.prod-ed-slices {
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.prod-ed-note {
    color: #999;
    font-size: 11px;
    display: block;
    margin-top: 5px;
}

.prod-ed-cost-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 15px;
    margin-top: 20px;
}

.prod-ed-cost-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 8px;
    color: #666;
}

.prod-ed-divider {
    border-top: 1px dashed #ddd;
    margin: 10px 0;
}

.prod-ed-total-cost {
    text-align: center;
}

.prod-ed-total-val {
    font-size: 24px;
    font-weight: 800;
    color: #5e1c26;
}

.prod-ed-options-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.prod-ed-options-title {
    margin: 0;
    color: #555;
}

.prod-ed-options-actions {
    display: flex;
    gap: 8px;
}

.prod-ed-toggles {
    margin-top: 10px;
    background: white;
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid #ddd;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.prod-ed-footer {
    padding: 10px 25px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.prod-ed-delete-btn {
    display: none;
}

.prod-ed-save-actions {
    display: flex;
    gap: 15px;
}

.prod-ed-submodal-ing {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10060;
    align-items: center;
    justify-content: center;
}

.prod-ed-submodal-content {
    width: 380px;
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.prod-ed-submodal-header {
    text-align: center;
    margin-bottom: 20px;
}

.prod-ed-submodal-icon {
    font-size: 30px;
    margin-bottom: 5px;
}

.prod-ed-submodal-title {
    margin: 0;
    color: var(--vino);
}

.prod-ed-submodal-subtitle {
    color: #777;
    font-size: 13px;
    margin: 5px 0;
}

.prod-ed-submodal-form {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.prod-ed-submodal-label {
    font-size: 11px;
    font-weight: 800;
    color: #555;
    display: block;
    margin-bottom: 5px;
}

.prod-ed-submodal-select {
    margin-bottom: 15px;
}

.prod-ed-submodal-row {
    display: flex;
    gap: 10px;
}

.prod-ed-submodal-cost {
    text-align: right;
}

.prod-ed-submodal-cost-val {
    font-size: 16px;
    font-weight: 800;
    color: #27ae60;
}

.prod-ed-submodal-btns {
    display: flex;
    gap: 10px;
}

.prod-ed-submodal-cloud {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10080;
    align-items: center;
    justify-content: center;
}

.prod-ed-cloud-content {
    width: 450px;
    background: white;
    padding: 0;
    border-radius: 16px;
    box-shadow: 0 15px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.prod-ed-cloud-header {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.prod-ed-cloud-title {
    margin: 0;
    font-size: 16px;
    color: #5e1c26;
}

.prod-ed-cloud-close {
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
}

.prod-ed-cloud-list {
    padding: 10px;
    overflow-y: auto;
    background: #fff;
    min-height: 200px;
}

.prod-ed-cloud-loading {
    text-align: center;
    padding: 40px;
    color: #ccc;
}

.btn-qty-mini {
    width: 30px;
    height: 38px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
}

.btn-qty-mini:first-child {
    border-radius: 8px 0 0 8px;
    border-right: none;
}

.btn-qty-mini:last-child {
    border-radius: 0 8px 8px 0;
    border-left: none;
}

.inp-qty-mini {
    flex: 1;
    height: 38px;
    text-align: center;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
}

/* --- MODAL: modalProduction --- */
#modalProduction {
    z-index: 10060;
}

.prod-content {
    width: 350px;
    padding: 0;
    overflow: hidden;
    background: white;
    border-radius: 16px;
    text-align: center;
}

.prod-header {
    background: var(--vino);
    padding: 20px;
    color: white;
}

.prod-title {
    margin: 0;
    font-size: 22px;
}

.prod-subtitle {
    color: rgba(255, 255, 255, 0.8);
    margin: 5px 0 0 0;
    font-size: 14px;
}

.prod-body {
    padding: 30px 20px;
}

.prod-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.prod-btn-qty {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    font-size: 24px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prod-input {
    font-size: 24px;
    text-align: center;
    font-weight: bold;
    width: 70px;
    height: 65px;
    border: 2px solid var(--vino);
    color: var(--vino);
    border-radius: 12px;
    padding: 0;
}

/* Quitar spinners del input number */
.prod-input::-webkit-outer-spin-button,
.prod-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.prod-input {
    -moz-appearance: textfield;
}

.prod-label {
    font-size: 14px;
    font-weight: bold;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.prod-note {
    margin-top: 20px;
    font-size: 12px;
    color: #999;
}

.prod-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

/* --- MODAL: modalReconciliation --- */
#modalReconciliation {
    z-index: 10060;
}

.rec-content {
    width: 90%;
    max-width: 600px;
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    background: white;
}

.rec-header {
    padding: 20px;
    background: white;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rec-title {
    margin: 0;
}

.rec-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #ccc;
    cursor: pointer;
}

.rec-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.rec-loading {
    text-align: center;
    padding: 40px;
}

/* --- MODAL: modalRefund --- */
#modalRefund {
    z-index: 10060;
    background: rgba(0, 0, 0, 0.85);
}

.ref-content {
    background: white;
    width: 90%;
    max-width: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.ref-header {
    padding: 20px;
    background: #c0392b;
    color: white;
    text-align: center;
}

.ref-icon {
    font-size: 30px;
    margin-bottom: 5px;
}

.ref-title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
}

.ref-subtitle {
    margin: 5px 0 0 0;
    font-size: 12px;
    opacity: 0.9;
}

.ref-body {
    padding: 25px;
}

.ref-user-box {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #555;
    border: 1px solid #eee;
}

.ref-label {
    display: block;
    font-size: 12px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.ref-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: none;
    font-family: inherit;
}

.ref-footer {
    padding: 20px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.ref-btn-cancel {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    color: #555;
}

.ref-btn-confirm {
    flex: 1;
    padding: 12px;
    border: none;
    background: #c0392b;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    color: white;
}

/* --- MODAL: modalRestock --- */
#modalRestock {
    z-index: 10060;
}

.res-content {
    width: 400px;
    padding: 0;
    overflow: hidden;
    background: white;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.res-header {
    background: var(--vino);
    padding: 20px;
    text-align: center;
    color: white;
}

.res-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.res-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.res-subtitle {
    opacity: 0.9;
    font-size: 13px;
    margin-top: 5px;
}

.res-stock-badge {
    margin-top: 10px;
}

.res-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.res-form {
    padding: 20px;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
}

.res-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.res-label {
    font-size: 10px;
    font-weight: 800;
    color: #999;
    display: block;
    margin-bottom: 5px;
}

.res-qty-input {
    border: 2px solid #27ae60;
    color: #27ae60;
    font-weight: bold;
    font-size: 18px;
    text-align: center;
}

.res-code-container {
    margin-bottom: 20px;
}

.res-btns {
    display: flex;
    gap: 10px;
}

.res-btn-save {
    flex: 1.5;
    background: #27ae60;
    border-color: #27ae60;
}

.res-list-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    min-height: 200px;
    overflow: hidden;
}

.res-list-header {
    padding: 10px 20px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.res-list-title {
    font-size: 11px;
    font-weight: 800;
    color: #aaa;
    text-transform: uppercase;
}

.res-list-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.res-loading {
    padding: 30px;
    text-align: center;
    color: #ccc;
}

.batch-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #f9f9f9;
    transition: background 0.2s;
}

.batch-item:hover {
    background: #fdfdfd;
}

.batch-code {
    font-size: 13px;
    font-weight: 700;
    color: #333;
}

.batch-meta {
    font-size: 11px;
    margin-top: 2px;
}

.batch-val {
    font-size: 16px;
    font-weight: 800;
    color: #333;
}

/* --- FIX: PAYMENT MODAL UI REFINEMENTS --- */

/* 1. Seller Cards (Wider and Shorter) */
.seller-card {
    width: 90px;
    height: 70px;
    border: 1px solid #eee;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    padding: 5px;
    flex-shrink: 0;
    /* Prevent squishing */
}

.seller-card:hover {
    background: #f8f9fa;
    border-color: #ddd;
}

.seller-card.selected {
    border-color: var(--vino);
    background: #fdf2f4;
    box-shadow: 0 4px 10px rgba(94, 28, 38, 0.1);
}

.seller-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-bottom: 4px;
    object-fit: cover;
    border: 1px solid #eee;
}

.seller-name {
    font-size: 11px;
    font-weight: 700;
    color: #444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.seller-role {
    font-size: 9px;
    color: #999;
    margin-top: 1px;
}

/* 2. Payment Modal Spacing Reductions */
/* Reducir espacio en el header del modal de pago - MAXIMIZAR BORDES */
#modalPayment .modal-content {
    padding: 15px 15px !important;
    /* Menos padding para usar bordes */
    max-height: 98vh;
    border-radius: 16px;
    /* Bordes un poco menos redondeados para ganar area */
}

/* Nuevo botón de Apartar en Header */
.btn-icon-payment-header {
    background: transparent;
    border: none;
    color: #e67e22;
    /* Color naranja para destacar apartado */
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.btn-icon-payment-header:hover {
    background: #fff8e1;
    transform: scale(1.1);
}

.payment-header-new {
    margin-bottom: 5px;
    /* Minimal margin */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 5px;
    border-bottom: 1px solid #f0f0f0;
    /* Separador sutil */
}

.pay-title {
    font-size: 18px !important;
    /* Un poco mas grande */
    font-weight: 800 !important;
}

.pay-client-kpi {
    margin-bottom: 8px;
    padding: 6px 10px;
    background: #e3f2fd;
    border-radius: 8px;
    color: #1565c0;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.seller-section {
    margin-bottom: 10px;
    /* Reducido */
}

.seller-gallery-wrapper {
    display: flex;
    align-items: center;
    gap: 2px;
    background: white;
    padding: 2px;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
}

.seller-list-container {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding: 2px;
    width: 100%;
    scrollbar-width: none;
}

.seller-list-container::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome */
}

.pay-centered-totals {
    margin-bottom: 15px;
    text-align: center;
    background: #fafafa;
    border-radius: 12px;
    padding: 10px;
    /* Enmarcado para resaltar */
}

.pay-total-amount-large {
    font-size: 48px;
    /* Mas grande aun */
    font-weight: 900;
    color: var(--vino);
    line-height: 1;
    margin: 0;
}

/* Estabilizar altura del total para evitar saltos */
#payModalTotal {
    min-height: 42px;
}

.pay-change-kpi {
    font-size: 18px;
    font-weight: 700;
    margin-top: 5px;
}

/* Contenedor botones pago */
.pay-method-switch-container {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.pay-method-btn {
    flex: 1;
    padding: 12px 5px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    font-weight: 700;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: 0.2s;
    font-size: 14px;
}

.pay-method-btn.active {
    background: var(--vino);
    color: white;
    border-color: var(--vino);
}

/* Wallet container */
.wallet-container-new {
    margin-top: auto;
    margin-bottom: 10px;
    padding: 10px;
    background: #fff8e1;
    border-radius: 10px;
    border: 1px solid #ffe0b2;
}

/* Footer Actions */
.pay-footer-actions {
    display: flex;
    margin-top: 0;
    width: 100%;
}

.btn-pay-big {
    width: 100%;
    /* Boton completo */
    padding: 16px;
    background: var(--vino);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 900;
    font-size: 20px;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
    box-shadow: 0 5px 15px rgba(94, 28, 38, 0.3);
}

.btn-pay-big:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(94, 28, 38, 0.4);
}

.btn-layaway-small {
    flex: 1;
    background: white;
    border: 2px solid #e67e22;
    color: #e67e22;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    white-space: nowrap;
}

/* Botones de Apps (Uber, Rappi, Didi) */
.pay-app-btn {
    flex: 1;
    height: 50px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    background: #f8f9fa;
    /* Gris por defecto */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 6px;
    /* Reduced from 10px to make logo bigger */
}

.pay-app-btn .app-logo-svg {
    height: 100%;
    width: auto;
    max-width: 100%;
    /* Allow full usage of content box */
    fill: #999;
    /* Logo gris oscuro por defecto */
    transition: all 0.2s;
}

.pay-app-btn:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.pay-app-btn.active {
    transform: translateY(-2px);
    border-color: transparent;
}

/* UBER: Fondo Negro, Logo Blanco + GLOW */
.pay-app-uber.active {
    background: black !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    /* Glow effect */
}

.pay-app-uber.active .app-logo-svg {
    fill: white !important;
}

/* RAPPI: Fondo Naranja Brillante, Logo Blanco + GLOW */
.pay-app-rappi.active {
    background: #FF441F !important;
    box-shadow: 0 4px 15px rgba(255, 68, 31, 0.5);
    /* Glow effect */
}

/* Forzar override del fill inline si existe */
.pay-app-rappi .app-logo-svg path {
    fill: inherit;
}

.pay-app-rappi.active .app-logo-svg {
    fill: white !important;
}

/* DIDI: Fondo Naranja Pálido, Logo Blanco (Stroke) + GLOW */
.pay-app-didi .app-logo-svg {
    fill: none !important;
    stroke: #999;
    /* Default gray stroke */
    transition: stroke 0.2s;
}

.pay-app-didi.active {
    background: #FF7D00 !important;
    /* Didi Orange */
    box-shadow: 0 4px 15px rgba(255, 125, 0, 0.5);
    /* Glow effect */
}

.pay-app-didi.active .app-logo-svg {
    stroke: white !important;
}

.btn-discard {
    background: #fff;
    border: 1px solid #fee;
    color: #e74c3c;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-discard:hover {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
    transform: scale(1.1);
}

.text-green {
    color: #27ae60;
}

.text-orange {
    color: #e67e22;
}

.text-red {
    color: #e74c3c;
}

/* --- MODAL: ModalService --- */
#modalService {
    z-index: 10060;
}

.svc-content {
    background: white;
    width: 95%;
    max-width: 650px;
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    box-sizing: border-box;
}

.svc-header {
    padding: 25px 35px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.svc-title {
    margin: 0;
    color: var(--vino);
    font-size: 22px;
    font-weight: 800;
}

.svc-close {
    border: none;
    background: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.svc-list-view {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.svc-new-btn {
    width: 100%;
    padding: 12px;
    border: 2px dashed #ddd;
    background: white;
    color: #2980b9;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 15px;
    transition: 0.2s;
}

.svc-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.svc-form-view {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 35px;
}

/* Estilos de Formulario (Homologados con Expense) */
.svc-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.svc-label {
    font-size: 11px;
    font-weight: 800;
    color: #777;
    display: block;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.svc-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    height: 48px;
    font-size: 14px;
    color: #333;
    font-family: 'Montserrat', sans-serif;
}

.svc-input:focus {
    border-color: var(--vino);
    outline: none;
    background: #fffdf5;
}

.svc-type-btns {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.svc-type-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.svc-type-fixed {
    background: #e8f5e9;
    border-color: #27ae60;
}

.svc-type-bill {
    background: white;
}

.svc-amount-container {
    display: flex;
    gap: 10px;
}

.svc-amount-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    height: 48px;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

.svc-history-btn {
    padding: 0 15px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    color: #555;
}

.btn-float-action {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--vino);
    color: white;
    border: none;
    font-size: 24px;
    box-shadow: 0 4px 10px rgba(94, 28, 38, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        transform 0.2s,
        background 0.2s;
    z-index: 10;
}

.btn-float-action:hover {
    transform: scale(1.1);
    background: #7a2b36;
}

.svc-bill-container {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    padding: 0 20px;
    /* Padding vertical 0 para ocultar bien */
    background: #f0f9ff;
    border-radius: 12px;
    border: 1px solid transparent;
    /* Ocultar borde cuando cerrado */
    transition:
        max-height 0.4s ease-out,
        opacity 0.3s ease,
        margin-top 0.3s ease,
        padding 0.3s ease;
}

.svc-bill-container.open {
    max-height: 500px;
    /* Valor suficiente */
    opacity: 1;
    margin-top: 25px;
    padding: 20px;
    border-color: #b3e5fc;
}

.svc-bill-label {
    font-size: 11px;
    font-weight: 800;
    color: #0277bd;
    margin-bottom: 15px;
    display: block;
    letter-spacing: 1px;
}

.svc-date-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.svc-date-input {
    font-size: 13px;
    height: 42px;
}

.svc-bill-amount {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-weight: bold;
    font-family: 'Montserrat', sans-serif;
}

.svc-add-bill-btn {
    width: 100%;
    margin-top: 15px;
    background: #0288d1;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(2, 136, 209, 0.2);
}

.svc-add-bill-btn:hover {
    background: #0277bd;
    transform: translateY(-1px);
}

.svc-delete-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.svc-delete-btn {
    color: #c0392b;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.svc-footer {
    padding: 20px 35px;
    border-top: 1px solid #eee;
    background: white;
    display: flex;
    gap: 15px;
}

.svc-back-btn {
    flex: 1;
    padding: 14px;
    background: #f4f6f8;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    display: none;
    font-weight: 700;
    color: #555;
}

.svc-save-btn {
    flex: 1;
    padding: 14px;
    background: var(--vino);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    display: none;
    box-shadow: 0 4px 10px rgba(94, 28, 38, 0.2);
}

.svc-close-btn {
    flex: 1;
    padding: 14px;
    background: #f4f6f8;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    color: #555;
}

/* --- MODAL: modalShoppingList --- */
#modalShoppingList {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10050;
    align-items: center;
    justify-content: center;
}

.shop-content {
    background: white;
    width: 90%;
    max-width: 600px;
    height: 80vh;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.shop-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9f9f9;
}

.shop-title {
    margin: 0;
    color: var(--vino);
}

.shop-close {
    border: none;
    background: none;
    font-size: 24px;
    cursor: pointer;
}

.shop-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.shop-footer {
    padding: 15px;
    border-top: 1px solid #eee;
    text-align: right;
    background: white;
}

.shop-copy-btn {
    padding: 10px 20px;
    background: #333;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

/* --- MODAL: modalSupplier --- */
#modalSupplier {
    z-index: 10070;
}

.supp-content {
    width: 400px;
    padding: 0;
    overflow: hidden;
    background: white;
    border-radius: 16px;
}

.supp-header {
    background: var(--vino);
    padding: 20px;
    color: white;
    text-align: center;
}

.supp-icon {
    font-size: 28px;
    margin-bottom: 5px;
}

/* --- TABLET/RESPONSIVE ADJUSTMENTS FOR PAYMENT MODAL --- */
@media (max-width: 1024px) {
    #modalPayment .modal-content {
        max-height: 90vh !important;
        /* Leave room for OS bars */
        overflow-y: auto !important;
        /* Enable scroll */
        -webkit-overflow-scrolling: touch;
        /* Smooth scroll iOS */
        padding-bottom: 20px !important;
        /* Extra bottom padding */
    }
}

.supp-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.supp-subtitle {
    opacity: 0.9;
    font-size: 13px;
    margin-top: 5px;
}

.supp-body {
    padding: 25px;
}

.supp-group {
    margin-bottom: 15px;
}

.supp-label {
    font-size: 11px;
    font-weight: bold;
    color: #666;
}

.supp-link-container {
    display: flex;
    gap: 10px;
}

.supp-test-link {
    display: none;
    align-items: center;
    justify-content: center;
    width: 45px;
    text-decoration: none;
}

.supp-footer {
    padding: 15px 25px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

/* --- MODAL: modalTax --- */
#modalTax {
    z-index: 10060;
}

.tax-content {
    width: 90%;
    max-width: 800px;
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    background: white;
}

.tax-header {
    padding: 20px;
    background: white;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tax-title {
    margin: 0;
}

.tax-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tax-sat-link {
    background: #f8f9fa;
    border: 1px solid #ddd;
    color: #555;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 12px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.tax-declare-btn {
    background: #5e1c26;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tax-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #ccc;
    cursor: pointer;
    margin-left: 5px;
}

.tax-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.tax-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.tax-card-blue {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #bbdefb;
}

.tax-card-title-blue {
    margin: 0 0 10px 0;
    color: #1565c0;
    font-size: 14px;
    font-weight: 800;
}

.tax-card-val-blue {
    color: #0d47a1;
    font-size: 32px;
    font-weight: 900;
}

.tax-card-details {
    font-size: 12px;
    color: #555;
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 8px;
}

.tax-card-orange {
    background: #fff3e0;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #ffe0b2;
}

.tax-card-title-orange {
    margin: 0 0 10px 0;
    color: #ef6c00;
    font-size: 14px;
    font-weight: 800;
}

.tax-card-val-orange {
    color: #e65100;
    font-size: 32px;
    font-weight: 900;
}

.tax-card-purple {
    background: #f3e5f5;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e1bee7;
}

.tax-card-title-purple {
    margin: 0 0 10px 0;
    color: #8e44ad;
    font-size: 14px;
    font-weight: 800;
}

.tax-card-val-purple {
    color: #6a1b9a;
    font-size: 32px;
    font-weight: 900;
}

.tax-info-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    font-size: 12px;
    color: #555;
    margin-bottom: 25px;
    border-left: 4px solid #2980b9;
    line-height: 1.5;
}

.tax-new-tag {
    color: #27ae60;
    font-weight: bold;
}

.tax-table-title {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.tax-table-container {
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
}

.tax-table {
    width: 100%;
    border-collapse: collapse;
}

.tax-thead {
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
}

.tax-th {
    padding: 12px 15px;
    text-align: left;
    font-size: 11px;
    color: #777;
    text-transform: uppercase;
}

/* --- MODAL: modalWasteReport --- */
#modalWasteReport {
    display: none;
}

.waste-content {}

.waste-header {}

.waste-title {
    margin: 0;
    color: #c0392b;
}

.waste-stats {
    margin-bottom: 20px;
}

.waste-list-title {
    margin: 0 0 10px 0;
    color: #555;
}

.waste-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 12px;
}

/* --- MODAL: open_register --- */
#modalOpenRegister {
    display: flex;
    z-index: 10002;
    align-items: center;
    justify-content: center;
}

.open-reg-content {
    max-width: 350px;
    text-align: center;
}

.open-reg-title {
    color: #5e1c26;
}

.open-reg-box {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.open-reg-label {
    font-weight: bold;
    color: #777;
}

.open-reg-input {
    font-size: 28px;
    text-align: center;
    font-weight: bold;
    color: #27ae60;
}

.open-reg-btn-main {
    width: 100%;
}

.open-reg-btn-sec {
    margin-top: 10px;
    width: 100%;
}

/* --- MODAL: ReconciliationModal --- */
#modalReconciliation {
    z-index: 10060;
}

.rec-content {
    width: 90%;
    max-width: 600px;
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    background: white;
}

.rec-header {
    padding: 20px;
    background: white;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rec-title {
    margin: 0;
}

.rec-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #ccc;
    cursor: pointer;
}

.rec-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.rec-loading {
    text-align: center;
    padding: 40px;
}