/* === COMPONENTES DE DISEÑO — BY-LOLA BOUTIQUE === */

/* === CARDS DE LUJO CON GLASSMORPHISM === */
.boutique-card {
    background: var(--bg-dark-card);
    border: 1px solid var(--border-gold-subtle);
    border-radius: 16px;
    box-shadow: 0 12px 35px -5px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card-header-boutique {
    padding: 1.15rem 1.4rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.card-title-boutique {
    font-family: var(--font-title);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gold-light);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 1px;
}

.card-body-boutique {
    padding: 1.4rem;
}

/* === BOTONES DE LUJO === */
.btn-gold {
    background: var(--gold-gradient);
    color: #050505;
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.8px;
    border: none;
    border-radius: 9px;
    padding: 0.6rem 1.25rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.28);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(212, 175, 55, 0.45);
    background: var(--gold-gradient-hover);
    color: #000;
}

.btn-outline-gold {
    background: transparent;
    color: var(--gold-light);
    border: 1px solid var(--gold-primary);
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.82rem;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-outline-gold:hover {
    background: rgba(212, 175, 55, 0.15);
    color: #fff;
    border-color: var(--gold-light);
}

.btn-sm-action {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-edit-prod {
    background: rgba(212, 175, 55, 0.05);
    color: var(--gold-light);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.btn-edit-prod:hover {
    background: rgba(212, 175, 55, 0.16);
    color: #ffffff;
    border-color: var(--gold-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.btn-edit-prod svg {
    color: var(--gold-primary);
}

.btn-outline-info {
    background: rgba(56, 189, 248, 0.05);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.btn-outline-info:hover {
    background: rgba(56, 189, 248, 0.16);
    color: #ffffff;
    border-color: #38bdf8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

.btn-danger-luxury {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 0.45rem 0.85rem;
    cursor: pointer;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.btn-danger-luxury:hover {
    background: rgba(239, 68, 68, 0.28);
    color: #fff;
    border-color: rgba(239, 68, 68, 0.5);
}

/* === TABLAS BOUTIQUE === */
.table-responsive-boutique {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-dark);
    background: rgba(14, 14, 19, 0.5);
}

.table-boutique {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-primary);
    font-size: 0.88rem;
    margin: 0;
}

.table-boutique thead {
    background: #0d0d12;
    border-bottom: 2px solid var(--border-gold-subtle);
}

.table-boutique th {
    padding: 0.95rem 1rem;
    font-family: var(--font-title);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.9px;
    color: var(--gold-light);
    text-align: left;
    white-space: nowrap;
}

.table-boutique td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-dark);
    vertical-align: middle;
}

.table-boutique tbody tr {
    transition: background 0.15s ease;
}

.table-boutique tbody tr:hover {
    background: rgba(212, 175, 55, 0.04);
}

/* === INPUTS Y SELECTS BOUTIQUE === */
.form-control-boutique, .form-select-boutique {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-dark);
    color: var(--text-primary);
    border-radius: 9px;
    padding: 0.65rem 0.9rem;
    font-size: 0.9rem;
    font-family: var(--font-body);
    transition: all 0.2s ease;
    width: 100%;
}

.form-control-boutique:focus, .form-select-boutique:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.07);
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.16);
    color: #fff;
}

.form-select-boutique option {
    background-color: #0e0e13;
    color: #fff;
}

.form-label-boutique {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gold-light);
    margin-bottom: 0.35rem;
    display: block;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

/* === BARRA DE HERRAMIENTAS Y BÚSQUEDA ELEGANTE === */
.toolbar-boutique {
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
}

.search-box-boutique {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box-boutique .search-icon {
    position: absolute;
    left: 14px;
    color: var(--gold-primary);
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    opacity: 0.75;
}

.search-box-boutique .form-control-boutique.with-icon {
    padding-left: 2.6rem;
}

.filter-box-boutique {
    display: flex;
    align-items: center;
}

.header-subtitle-boutique {
    font-size: 0.82rem;
    color: #cbd5e1 !important;
    letter-spacing: 0.3px;
    margin-top: 4px;
    font-weight: 400;
}

.report-subtitle {
    color: #cbd5e1 !important;
    font-weight: 500;
    font-size: 0.83rem;
    letter-spacing: 0.2px;
    line-height: 1.4;
}

.report-kpi-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.report-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.text-muted {
    color: #94a3b8 !important;
}

/* Modal Categorías Espacioso y Limpio */
#modalCategorias .modal-body-boutique {
    padding: 1.5rem;
}

#listaCategoriasModal {
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--border-dark) !important;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}

#listaCategoriasModal .list-group-item {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.02) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    font-size: 0.88rem;
    transition: background 0.15s ease;
}

#listaCategoriasModal .list-group-item:hover {
    background: rgba(255, 255, 255, 0.06) !important;
}

/* === SELECTOR REACTIVO DE PRENDAS PARA POS === */
.pos-product-picker {
    position: relative;
    width: 100%;
}

.selected-product-card {
    background: rgba(212, 175, 55, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 9px;
    padding: 0.55rem 0.75rem;
    transition: all 0.2s ease;
}

.product-picker-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 290px;
    overflow-y: auto;
    background: #111116;
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 9px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.85), 0 0 15px rgba(212, 175, 55, 0.12);
    z-index: 1050;
    padding: 0.35rem 0;
}

.product-picker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.6rem 0.85rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s ease;
}

.product-picker-item:last-child {
    border-bottom: none;
}

.product-picker-item:hover,
.product-picker-item.active {
    background: rgba(212, 175, 55, 0.12);
}

.product-picker-thumb {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 10px;
    color: var(--text-muted);
}

/* === BADGES DE ESTADO OFICIALES — EJECUTIVO & SOBRIO === */
.badge-boutique {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.28rem 0.65rem;
    border-radius: 6px;
    font-size: 0.73rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    white-space: nowrap;
    text-transform: capitalize;
    line-height: 1.2;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
    display: inline-block;
    flex-shrink: 0;
    box-shadow: 0 0 6px currentColor;
}

.title-icon-luxury {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-primary);
    margin-right: 4px;
}

.code-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.74rem;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.talla-tag {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gold-light);
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.22);
    border-radius: 4px;
}

/* Estado: Disponible / Activo / Pagado / Contado */
.badge-status-active, .badge-paid, .badge-cash {
    background: rgba(16, 185, 129, 0.08);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

/* Estado: Stock normal (sobrio, gris pizarra y punto azul sutil) */
.badge-stock-high {
    background: rgba(255, 255, 255, 0.035);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.badge-stock-high .badge-dot {
    color: #38bdf8;
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.5);
}

/* Estado: Bajo Stock / Crédito / Pendiente */
.badge-stock-low, .badge-pending, .badge-credit {
    background: rgba(245, 158, 11, 0.08);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

/* Estado: Agotado / Inactivo / Anulado */
.badge-stock-out, .badge-status-inactive, .badge-voided, .badge-error {
    background: rgba(239, 68, 68, 0.08);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

/* Severidad Auditoría */
.badge-sev-info {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.35);
}

.badge-sev-warning {
    background: var(--status-pending-bg);
    color: var(--status-pending-text);
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-sev-danger {
    background: var(--status-void-bg);
    color: var(--status-void-text);
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.badge-sev-critical {
    background: rgba(220, 38, 38, 0.28);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.6);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
}

/* === IDENTIFICACIÓN INTELIGENTE DE CÉDULA (POS) === */
.cedula-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.cedula-input-group .form-control-boutique {
    padding-right: 38px;
    font-family: var(--font-mono);
}

.btn-clear-cedula {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}

.btn-clear-cedula:hover {
    color: #fff;
}

/* Tarjeta reactiva de cliente identificado */
.pos-client-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    margin-top: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: all 0.25s ease;
}

.pos-client-card.verified {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.06);
}

.pos-client-card.not-registered {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.06);
}

.pos-client-info {
    overflow: hidden;
}

.pos-client-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.pos-client-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.btn-quick-register {
    padding: 0.35rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 8px;
    background: var(--gold-gradient);
    color: #050505;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s;
}

.btn-quick-register:hover {
    transform: scale(1.05);
}

/* === BARRA DE PROGRESO DE PAGO (CARTERA) === */
.progress-boutique-wrapper {
    margin-top: 6px;
}

.progress-boutique {
    height: 7px;
    background-color: #22222a;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-boutique-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #d4af37 100%);
    border-radius: 10px;
    transition: width 0.4s ease;
}

/* === MODALES DE LUJO === */
.modal-content-boutique {
    background: #0e0e13;
    border: 1px solid var(--border-gold-subtle);
    border-radius: 18px;
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.9);
    color: var(--text-primary);
}

.modal-header-boutique {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title-boutique {
    font-family: var(--font-title);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gold-light);
    margin: 0;
    letter-spacing: 0.8px;
}

.btn-close-boutique {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    min-width: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close-boutique:hover {
    color: var(--gold-light);
}

.modal-body-boutique {
    padding: 1.5rem;
    max-height: calc(85vh - 120px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-footer-boutique {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-dark);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

/* === COMPROBANTE / FACTURA DE VENTA BOUTIQUE === */
.receipt-luxury-box {
    background: #ffffff;
    color: #0f172a;
    border-radius: 14px;
    padding: 2rem;
    font-family: 'Montserrat', sans-serif;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.receipt-header {
    text-align: center;
    border-bottom: 2px dashed #cbd5e1;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
}

.receipt-logo {
    max-height: 60px;
    margin-bottom: 0.5rem;
}

.receipt-brand-title {
    font-family: var(--font-title);
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: #0f172a;
    margin: 0;
}

.receipt-tagline {
    font-size: 0.8rem;
    color: #64748b;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.receipt-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 0.82rem;
    margin-bottom: 1.2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.receipt-table {
    width: 100%;
    font-size: 0.84rem;
    border-collapse: collapse;
    margin-bottom: 1.25rem;
}

.receipt-table th {
    border-bottom: 2px solid #0f172a;
    padding: 7px 4px;
    text-align: left;
    font-size: 0.78rem;
    text-transform: uppercase;
    font-weight: 700;
}

.receipt-table td {
    padding: 8px 4px;
    border-bottom: 1px solid #f1f5f9;
}

.receipt-total-row {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    border-top: 2px solid #0f172a;
    padding-top: 8px;
}

.receipt-credit-box {
    background: #f8fafc;
    border-left: 4px solid var(--gold-primary);
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 1.2rem;
    font-size: 0.82rem;
}

.receipt-footer-thanks {
    text-align: center;
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 1.5rem;
    border-top: 1px dashed #e2e8f0;
    padding-top: 1rem;
}

/* === ESTADOS VACÍOS === */
.empty-state-boutique {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 2.6rem;
    color: var(--gold-primary);
    opacity: 0.7;
    margin-bottom: 0.75rem;
}

.empty-state-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    font-family: var(--font-title);
}

.empty-state-desc {
    font-size: 0.84rem;
    max-width: 340px;
    margin: 0 auto;
}

/* === SISTEMA DE TOASTS BOUTIQUE === */
#toast-container-root {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1099;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: auto;
    max-width: 100vw;
    pointer-events: none;
}

.custom-toast {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-width: 0;
    max-width: min(390px, calc(100vw - 24px));
    background: rgba(14, 14, 19, 0.96);
    border: 1px solid var(--border-gold-subtle);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 14px;
    color: var(--text-primary);
    margin-bottom: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8);
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}

.custom-toast.show-toast {
    transform: translateX(0);
}

.custom-toast.hide-toast {
    transform: translateX(120%);
}

.toast-content-wrapper {
    padding: 14px 16px;
}

.toast-header-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.toast-icon-badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.toast-type-success .toast-icon-badge { background: #059669; color: white; }
.toast-type-danger .toast-icon-badge { background: #dc2626; color: white; }
.toast-type-warning .toast-icon-badge { background: #d97706; color: white; }
.toast-type-info .toast-icon-badge { background: var(--gold-dark); color: #fff; }

.toast-title {
    font-size: 0.88rem;
    color: var(--gold-light);
    font-family: var(--font-title);
    flex-grow: 1;
}

.toast-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
}

.toast-close-btn:hover {
    color: #fff;
}

.toast-body-custom {
    font-size: 0.83rem;
    color: #cbd5e1;
    line-height: 1.4;
    padding-left: 30px;
}

.toast-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: var(--gold-gradient);
    animation: progressLinear linear forwards;
}

@keyframes progressLinear {
    from { width: 100%; }
    to { width: 0%; }
}

/* === REGLAS PARA IMPRESIÓN DIRECTA (window.print()) === */
@media print {
    body * {
        visibility: hidden !important;
    }
    .receipt-print-area, .receipt-print-area * {
        visibility: visible !important;
    }
    .receipt-print-area {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        background: #fff !important;
        color: #000 !important;
        padding: 20px !important;
        box-shadow: none !important;
    }
    .no-print {
        display: none !important;
    }
}

/* ======================================================== */
/* OPTIMIZACIÓN TABLA PRENDAS & STOCK (ESCRITORIO / PC)     */
/* Elimina espacios vacíos excesivos y previene scroll      */
/* ======================================================== */
@media (min-width: 769px) {
    .table-productos-responsive {
        width: 100%;
        table-layout: auto;
    }

    .table-productos-responsive th,
    .table-productos-responsive td {
        padding: 0.62rem 0.5rem;
        font-size: 0.82rem;
    }

    /* Columna Foto: compacta y fija */
    .table-productos-responsive .col-prod-img {
        width: 48px;
        min-width: 48px;
        max-width: 52px;
        padding-left: 0.75rem;
        padding-right: 0.25rem;
        text-align: center;
    }

    .table-productos-responsive .col-prod-img img,
    .table-productos-responsive .col-prod-img div {
        width: 38px !important;
        height: 38px !important;
        margin: 0 auto;
    }

    /* Columna Código: ancho justo para badge como R001, elimina el espacio muerto */
    .table-productos-responsive .col-prod-codigo {
        width: 72px;
        min-width: 68px;
        max-width: 78px;
        padding-left: 0.25rem;
        padding-right: 0.35rem;
        white-space: nowrap;
    }

    /* Columna Prenda / Nombre: toma el espacio natural sin desbordar */
    .table-productos-responsive .col-prod-nombre {
        min-width: 140px;
        padding-left: 0.4rem;
        padding-right: 0.55rem;
    }

    .table-productos-responsive .col-prod-nombre .prod-name-title {
        font-size: 0.86rem;
        font-weight: 600;
        line-height: 1.3;
    }

    /* Columna Categoría: concisa */
    .table-productos-responsive .col-prod-cat {
        width: 105px;
        min-width: 90px;
        max-width: 120px;
        padding-left: 0.35rem;
        padding-right: 0.35rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Columna Talla: etiqueta concisa centrada */
    .table-productos-responsive .col-prod-talla {
        width: 50px;
        min-width: 46px;
        max-width: 54px;
        padding-left: 0.2rem;
        padding-right: 0.2rem;
        text-align: center;
        white-space: nowrap;
    }

    /* Columna Marca: ancho justo */
    .table-productos-responsive .col-prod-marca {
        width: 85px;
        min-width: 75px;
        max-width: 95px;
        padding-left: 0.35rem;
        padding-right: 0.35rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Columna Precio (COP): formato numérico limpio */
    .table-productos-responsive .col-prod-precio {
        width: 110px;
        min-width: 100px;
        max-width: 120px;
        padding-left: 0.35rem;
        padding-right: 0.35rem;
        font-size: 0.86rem !important;
        white-space: nowrap;
    }

    /* Columna Stock: badge compacto */
    .table-productos-responsive .col-prod-stock {
        width: 115px;
        min-width: 105px;
        max-width: 125px;
        padding-left: 0.35rem;
        padding-right: 0.35rem;
        white-space: nowrap;
    }

    /* Columna Estado: badge compacto */
    .table-productos-responsive .col-prod-estado {
        width: 100px;
        min-width: 90px;
        max-width: 110px;
        padding-left: 0.35rem;
        padding-right: 0.35rem;
        white-space: nowrap;
    }

    /* Columna Acciones: botón de edición compacto alineado a la derecha sin desborde */
    .table-productos-responsive .col-prod-accion {
        width: 85px;
        min-width: 80px;
        max-width: 90px;
        padding-left: 0.35rem;
        padding-right: 0.75rem;
        text-align: right;
        white-space: nowrap;
    }

    .table-productos-responsive .col-prod-accion .btn-sm-action {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* === SISTEMA RESPONSIVE AVANZADO DE COMPONENTES (320px - 1920px) === */

/* Pantallas Medianas (<= 991px) */
@media (max-width: 991px) {
    .boutique-card {
        border-radius: 14px;
        margin-bottom: 1.25rem;
    }

    .card-body-boutique {
        padding: 1.2rem;
    }

    /* POS en tablets: columnas ordenadas y carrito adaptado */
    #ventas .row.g-4 {
        --bs-gutter-y: 1.25rem;
    }
}

/* Tablets en Vertical y Celulares Grandes (<= 768px) */
@media (max-width: 768px) {
    .card-header-boutique {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 1rem 1.1rem;
    }

    .card-title-boutique {
        font-size: 1.05rem;
        justify-content: flex-start;
    }

    .card-header-boutique .d-flex {
        flex-direction: column;
        align-items: stretch !important;
        width: 100%;
        gap: 8px !important;
    }

    .card-header-boutique .form-control-boutique,
    .card-header-boutique .form-select-boutique,
    .card-header-boutique .btn {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 44px;
    }

    .form-control-boutique,
    .form-select-boutique {
        font-size: 16px; /* Previene auto-zoom molesto en iOS Safari */
        min-height: 44px;
    }

    .table-boutique th {
        padding: 0.75rem 0.65rem;
        font-size: 0.74rem;
        white-space: nowrap;
    }

    .table-boutique td {
        padding: 0.75rem 0.65rem;
        font-size: 0.82rem;
    }

    .btn-sm-action {
        padding: 0.45rem 0.75rem;
        font-size: 0.78rem;
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* =================================================== */
    /* REORGANIZACIÓN RESPONSIVE DE CARTERA PARA MÓVILES    */
    /* =================================================== */
    .table-responsive-cartera {
        border: none !important;
        background: transparent !important;
        overflow: visible !important;
        border-radius: 0 !important;
    }

    .table-cartera-responsive {
        display: block !important;
        width: 100% !important;
    }

    .table-cartera-responsive thead {
        display: none !important;
    }

    .table-cartera-responsive tbody {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
        padding: 0 !important;
    }

    .table-cartera-responsive tr.cartera-row {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        grid-template-areas:
            "cliente deuda"
            "creditos acciones" !important;
        gap: 8px 12px !important;
        align-items: center !important;
        background: rgba(18, 18, 26, 0.85) !important;
        border: 1px solid var(--border-dark) !important;
        border-radius: 12px !important;
        padding: 12px 14px !important;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28) !important;
        transition: border-color 0.2s ease, background-color 0.2s ease !important;
    }

    .table-cartera-responsive tr.cartera-row:hover {
        border-color: rgba(212, 175, 55, 0.35) !important;
        background: rgba(24, 24, 34, 0.95) !important;
    }

    .table-cartera-responsive tr.cartera-row td {
        display: block !important;
        padding: 0 !important;
        border: none !important;
        background: transparent !important;
    }

    .table-cartera-responsive tr.cartera-row td.col-cartera-cliente {
        grid-area: cliente !important;
        min-width: 0 !important;
    }

    .table-cartera-responsive tr.cartera-row td.col-cartera-cliente .client-title {
        font-size: 0.95rem !important;
        line-height: 1.25 !important;
        margin-bottom: 2px !important;
        word-break: break-word !important;
    }

    .table-cartera-responsive tr.cartera-row td.col-cartera-cliente .client-id {
        font-size: 0.76rem !important;
    }

    .table-cartera-responsive tr.cartera-row td.col-cartera-deuda {
        grid-area: deuda !important;
        text-align: right !important;
        white-space: nowrap !important;
    }

    .table-cartera-responsive tr.cartera-row td.col-cartera-deuda .deuda-monto {
        font-size: 1.05rem !important;
        font-weight: 700 !important;
        letter-spacing: 0.3px !important;
        display: block !important;
    }

    .table-cartera-responsive tr.cartera-row td.col-cartera-creditos {
        grid-area: creditos !important;
        display: flex !important;
        align-items: center !important;
    }

    .table-cartera-responsive tr.cartera-row td.col-cartera-creditos .badge-credit {
        font-size: 0.72rem !important;
        padding: 0.25rem 0.6rem !important;
    }

    .table-cartera-responsive tr.cartera-row td.col-cartera-acciones {
        grid-area: acciones !important;
        text-align: right !important;
    }

    .table-cartera-responsive tr.cartera-row td.col-cartera-acciones .btn-view-credits {
        width: auto !important;
        padding: 0.4rem 0.85rem !important;
        font-size: 0.75rem !important;
        letter-spacing: 0.4px !important;
        white-space: nowrap !important;
        min-height: 34px !important;
    }

    /* Modal Detalle de Cartera en Pantallas Móviles */
    .table-responsive-detalle-cartera {
        border: none !important;
        background: transparent !important;
        overflow: visible !important;
    }

    .table-detalle-cartera-responsive thead {
        display: none !important;
    }

    .table-detalle-cartera-responsive,
    .table-detalle-cartera-responsive tbody {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
        padding: 8px !important;
    }

    .table-detalle-cartera-responsive tr.detalle-cartera-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        background: rgba(18, 18, 26, 0.85) !important;
        border: 1px solid var(--border-dark) !important;
        border-radius: 12px !important;
        padding: 12px 14px !important;
    }

    .table-detalle-cartera-responsive tr.detalle-cartera-row td {
        display: block !important;
        padding: 0 !important;
        border: none !important;
    }

    .table-detalle-cartera-responsive tr.detalle-cartera-row td.col-det-accion .btn {
        width: 100% !important;
        min-height: 38px !important;
    }

    /* =================================================== */
    /* ADAPTACIÓN MÓVIL: CATÁLOGO DE PRENDAS & STOCK        */
    /* =================================================== */
    .table-responsive-productos {
        border: none !important;
        background: transparent !important;
        overflow: visible !important;
        border-radius: 0 !important;
    }

    .table-productos-responsive {
        display: block !important;
        width: 100% !important;
    }

    .table-productos-responsive thead {
        display: none !important;
    }

    .table-productos-responsive tbody {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
        padding: 0 !important;
    }

    .table-productos-responsive tr.producto-row {
        display: grid !important;
        grid-template-columns: 48px 1fr auto !important;
        grid-template-areas:
            "img info precio"
            "img stock accion" !important;
        gap: 6px 12px !important;
        align-items: center !important;
        background: rgba(18, 18, 26, 0.85) !important;
        border: 1px solid var(--border-dark) !important;
        border-radius: 12px !important;
        padding: 12px 14px !important;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28) !important;
        transition: border-color 0.2s ease !important;
    }

    .table-productos-responsive tr.producto-row:hover {
        border-color: rgba(212, 175, 55, 0.35) !important;
    }

    .table-productos-responsive tr.producto-row td {
        display: block !important;
        padding: 0 !important;
        border: none !important;
        background: transparent !important;
    }

    .table-productos-responsive tr.producto-row td.col-prod-img {
        grid-area: img !important;
    }

    .table-productos-responsive tr.producto-row td.col-prod-img img,
    .table-productos-responsive tr.producto-row td.col-prod-img div {
        width: 48px !important;
        height: 48px !important;
    }

    .table-productos-responsive tr.producto-row td.col-prod-codigo,
    .table-productos-responsive tr.producto-row td.col-prod-cat,
    .table-productos-responsive tr.producto-row td.col-prod-talla,
    .table-productos-responsive tr.producto-row td.col-prod-marca,
    .table-productos-responsive tr.producto-row td.col-prod-estado {
        display: none !important;
    }

    .table-productos-responsive tr.producto-row td.col-prod-nombre {
        grid-area: info !important;
        min-width: 0 !important;
    }

    .table-productos-responsive tr.producto-row td.col-prod-nombre .prod-name-title {
        font-size: 0.95rem !important;
        line-height: 1.25 !important;
        display: block !important;
        word-break: break-word !important;
    }

    .table-productos-responsive tr.producto-row td.col-prod-precio {
        grid-area: precio !important;
        text-align: right !important;
        white-space: nowrap !important;
        font-size: 1.05rem !important;
    }

    .table-productos-responsive tr.producto-row td.col-prod-stock {
        grid-area: stock !important;
        display: flex !important;
        align-items: center !important;
    }

    .table-productos-responsive tr.producto-row td.col-prod-accion {
        grid-area: accion !important;
        text-align: right !important;
    }

    .table-productos-responsive tr.producto-row td.col-prod-accion .btn {
        padding: 0.38rem 0.85rem !important;
        font-size: 0.74rem !important;
        min-height: 32px !important;
    }

    /* =================================================== */
    /* ADAPTACIÓN MÓVIL: DIRECTORIO DE CLIENTES             */
    /* =================================================== */
    .table-responsive-clientes {
        border: none !important;
        background: transparent !important;
        overflow: visible !important;
        border-radius: 0 !important;
    }

    .table-clientes-responsive {
        display: block !important;
        width: 100% !important;
    }

    .table-clientes-responsive thead {
        display: none !important;
    }

    .table-clientes-responsive tbody {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
        padding: 0 !important;
    }

    .table-clientes-responsive tr.cliente-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        background: rgba(18, 18, 26, 0.85) !important;
        border: 1px solid var(--border-dark) !important;
        border-radius: 12px !important;
        padding: 12px 14px !important;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28) !important;
    }

    .table-clientes-responsive tr.cliente-row td {
        display: block !important;
        padding: 0 !important;
        border: none !important;
    }

    .table-clientes-responsive tr.cliente-row td.col-cli-cedula {
        display: inline-block !important;
        width: auto !important;
    }

    .table-clientes-responsive tr.cliente-row td.col-cli-nombre {
        font-size: 0.98rem !important;
    }

    .table-clientes-responsive tr.cliente-row td.col-cli-telefono,
    .table-clientes-responsive tr.cliente-row td.col-cli-direccion {
        font-size: 0.82rem !important;
        display: flex !important;
        align-items: center !important;
    }

    .table-clientes-responsive tr.cliente-row td.col-cli-acciones {
        margin-top: 4px !important;
        padding-top: 8px !important;
        border-top: 1px solid var(--border-dark) !important;
    }

    .table-clientes-responsive tr.cliente-row td.col-cli-acciones .cli-actions-wrapper {
        display: flex !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .table-clientes-responsive tr.cliente-row td.col-cli-acciones .btn {
        flex: 1 !important;
        justify-content: center !important;
        min-height: 36px !important;
        font-size: 0.78rem !important;
    }

    /* =================================================== */
    /* ADAPTACIÓN MÓVIL: CARRITO DE VENTA (POS)             */
    /* =================================================== */
    .table-responsive-carrito {
        border: none !important;
        background: transparent !important;
        overflow: visible !important;
        border-radius: 0 !important;
    }

    .table-carrito-responsive {
        display: block !important;
        width: 100% !important;
    }

    .table-carrito-responsive thead {
        display: none !important;
    }

    .table-carrito-responsive tbody {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
        padding: 0 !important;
    }

    .table-carrito-responsive tr.carrito-row {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        grid-template-areas:
            "prenda subtotal"
            "controles quitar" !important;
        gap: 8px 12px !important;
        align-items: center !important;
        background: rgba(18, 18, 26, 0.85) !important;
        border: 1px solid var(--border-dark) !important;
        border-radius: 12px !important;
        padding: 12px 14px !important;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28) !important;
    }

    .table-carrito-responsive tr.carrito-row td {
        display: block !important;
        padding: 0 !important;
        border: none !important;
    }

    .table-carrito-responsive tr.carrito-row td.col-cart-prenda {
        grid-area: prenda !important;
        min-width: 0 !important;
    }

    .table-carrito-responsive tr.carrito-row td.col-cart-precio {
        display: none !important;
    }

    .table-carrito-responsive tr.carrito-row td.col-cart-subtotal {
        grid-area: subtotal !important;
        text-align: right !important;
        white-space: nowrap !important;
        font-size: 1.05rem !important;
    }

    .table-carrito-responsive tr.carrito-row td.col-cart-cantidad {
        grid-area: controles !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: 130px !important;
    }

    .table-carrito-responsive tr.carrito-row td.col-cart-quitar {
        grid-area: quitar !important;
        text-align: right !important;
    }

    /* =================================================== */
    /* ADAPTACIÓN MÓVIL: HISTORIAL DE VENTAS               */
    /* =================================================== */
    .table-responsive-historial {
        border: none !important;
        background: transparent !important;
        overflow: visible !important;
        border-radius: 0 !important;
    }

    .table-historial-responsive {
        display: block !important;
        width: 100% !important;
    }

    .table-historial-responsive thead {
        display: none !important;
    }

    .table-historial-responsive tbody {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
        padding: 0 !important;
    }

    .table-historial-responsive tr.historial-row {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        grid-template-areas:
            "cliente total"
            "meta badges"
            "accion accion" !important;
        gap: 8px 12px !important;
        align-items: center !important;
        background: rgba(18, 18, 26, 0.85) !important;
        border: 1px solid var(--border-dark) !important;
        border-radius: 12px !important;
        padding: 12px 14px !important;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28) !important;
    }

    .table-historial-responsive tr.historial-row td {
        display: block !important;
        padding: 0 !important;
        border: none !important;
    }

    .table-historial-responsive tr.historial-row td.col-hist-cliente {
        grid-area: cliente !important;
        min-width: 0 !important;
        font-size: 0.96rem !important;
    }

    .table-historial-responsive tr.historial-row td.col-hist-total {
        grid-area: total !important;
        text-align: right !important;
        font-size: 1.05rem !important;
        white-space: nowrap !important;
    }

    .table-historial-responsive tr.historial-row td.col-hist-id {
        display: none !important;
    }

    .table-historial-responsive tr.historial-row td.col-hist-fecha {
        grid-area: meta !important;
        font-size: 0.78rem !important;
    }

    .table-historial-responsive tr.historial-row td.col-hist-modalidad {
        grid-area: badges !important;
        text-align: right !important;
        display: flex !important;
        gap: 4px !important;
        justify-content: flex-end !important;
    }

    .table-historial-responsive tr.historial-row td.col-hist-estado {
        display: none !important;
    }

    .table-historial-responsive tr.historial-row td.col-hist-accion {
        grid-area: accion !important;
        padding-top: 6px !important;
        border-top: 1px solid var(--border-dark) !important;
        margin-top: 4px !important;
    }

    .table-historial-responsive tr.historial-row td.col-hist-accion .btn {
        width: 100% !important;
        justify-content: center !important;
        min-height: 36px !important;
    }

    /* Toasts adaptados a pantallas móviles */
    #toast-container-root {
        top: 12px;
        left: 12px;
        right: 12px;
        align-items: center;
    }

    .custom-toast {
        max-width: 100%;
    }
}

/* Celulares Móviles (<= 576px) */
@media (max-width: 576px) {
    .boutique-card {
        border-radius: 12px;
        margin-bottom: 1rem;
    }

    .card-body-boutique {
        padding: 1rem 0.85rem;
    }

    /* Formularios en columna única dentro de modales */
    form .row.g-2 > [class*="col-"],
    form .row.g-3 > [class*="col-"] {
        width: 100% !important;
        margin-bottom: 0.6rem;
    }

    /* Modales a ancho de pantalla segura */
    .modal-dialog {
        margin: 0.5rem auto;
        max-width: calc(100vw - 1rem);
    }

    .modal-content-boutique {
        border-radius: 14px;
    }

    .modal-header-boutique {
        padding: 0.95rem 1.15rem;
    }

    .modal-title-boutique {
        font-size: 1.05rem;
    }

    .modal-body-boutique {
        padding: 1.1rem 1rem;
        max-height: calc(82vh - 110px);
    }

    .modal-footer-boutique {
        padding: 0.85rem 1rem;
        flex-direction: column-reverse;
        gap: 8px;
    }

    .modal-footer-boutique .btn {
        width: 100%;
        margin: 0;
        min-height: 44px;
    }

    /* POS: Tarjeta reactiva de cliente */
    .pos-client-card {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        text-align: left;
    }

    .pos-client-card .d-flex {
        justify-content: space-between;
        width: 100%;
    }

    .btn-quick-register {
        min-height: 36px;
        padding: 0.4rem 1rem;
    }

    /* Botón de facturación principal */
    #btnFacturarVenta {
        font-size: 1rem;
        min-height: 48px;
        padding: 0.75rem 1rem !important;
    }

    /* Comprobante / Recibo de Venta */
    .receipt-luxury-box {
        padding: 1.25rem 0.85rem;
        border-radius: 12px;
    }

    .receipt-brand-title {
        font-size: 1.25rem;
        letter-spacing: 2px;
    }

    .receipt-meta-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .receipt-meta-grid > div:last-child {
        text-align: left !important;
    }

    .receipt-table th,
    .receipt-table td {
        padding: 6px 4px;
        font-size: 0.8rem;
    }

    .receipt-total-row {
        font-size: 1rem;
    }
}

/* Celulares Ultra Pequeños (<= 375px y 320px) */
@media (max-width: 375px) {
    .card-body-boutique {
        padding: 0.85rem 0.65rem;
    }

    .card-title-boutique {
        font-size: 0.98rem;
        letter-spacing: 0.5px;
    }

    .badge-boutique {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }

    .btn-gold {
        font-size: 0.8rem;
        padding: 0.55rem 1rem;
    }

    .btn-outline-gold {
        font-size: 0.78rem;
        padding: 0.45rem 0.85rem;
    }

    .receipt-brand-title {
        font-size: 1.1rem;
        letter-spacing: 1px;
    }

    .receipt-luxury-box {
        padding: 1rem 0.65rem;
    }
}
