/* TAMCA — notificaciones SweetAlert2 */
.swal2-container.tamca-swal-container {
    z-index: 20000 !important;
}
.tamca-swal-popup.swal2-popup {
    border-radius: 12px !important;
    box-shadow: 0 12px 40px rgba(26, 34, 36, 0.14) !important;
    padding: 0.85rem 1.1rem !important;
    font-family: inherit;
    border: 1px solid rgba(26, 34, 36, 0.08);
}
.tamca-swal-popup.swal2-toast {
    margin-top: 0.75rem;
    margin-right: 0.75rem;
}
.tamca-swal-title.swal2-title {
    font-size: 0.9375rem !important;
    font-weight: 500 !important;
    color: #1a2224 !important;
    line-height: 1.45 !important;
    margin: 0.15rem 0 0 !important;
    padding: 0 !important;
}
.tamca-swal-popup .swal2-icon {
    scale: 0.75;
    margin: 0 0.65rem 0 0 !important;
}
.tamca-swal-popup .swal2-timer-progress-bar {
    background: #ffcc21 !important;
}
.tamca-swal-success .swal2-timer-progress-bar { background: #28a745 !important; }
.tamca-swal-error .swal2-timer-progress-bar { background: #dc3545 !important; }
.tamca-swal-warning .swal2-timer-progress-bar { background: #ffc107 !important; }
.tamca-swal-info .swal2-timer-progress-bar { background: #17a2b8 !important; }
.tamca-swal-success { border-left: 4px solid #28a745 !important; }
.tamca-swal-error { border-left: 4px solid #dc3545 !important; }
.tamca-swal-warning { border-left: 4px solid #ffc107 !important; }
.tamca-swal-info { border-left: 4px solid #17a2b8 !important; }
.tamca-swal-success .swal2-icon.swal2-success { border-color: #28a745 !important; color: #28a745 !important; }
.tamca-swal-error .swal2-icon.swal2-error { border-color: #dc3545 !important; }
.tamca-swal-warning .swal2-icon.swal2-warning { border-color: #ffc107 !important; color: #ffc107 !important; }
.tamca-swal-info .swal2-icon.swal2-info { border-color: #17a2b8 !important; color: #17a2b8 !important; }
.tamca-swal-close.swal2-close {
    font-size: 1.35rem;
    color: #989ba7;
}
.tamca-swal-close.swal2-close:hover { color: #1a2224; }
.tamca-swal-confirm.swal2-confirm {
    background: #ffcc21 !important;
    color: #1a2224 !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}
.tamca-swal-cancel.swal2-cancel {
    background: #f3f4f6 !important;
    color: #1a2224 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}
.tamca-swal-confirm-danger.swal2-confirm {
    background: #dc2626 !important;
    color: #fff !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}
.tamca-swal-confirm-danger.swal2-confirm:hover {
    background: #b91c1c !important;
}

/* --- Aviso stock cotización (SweetAlert) --- */
.tamca-swal-stock.swal2-popup {
    padding: 0 !important;
    overflow: hidden;
    max-width: 40rem;
}
.tamca-swal-stock .swal2-icon {
    display: none !important;
}
.tamca-swal-stock-title.swal2-title {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
}
.tamca-swal-stock-html.swal2-html-container {
    margin: 0 !important;
    padding: 0 !important;
    text-align: left;
    max-height: none;
    overflow: visible;
}
.tamca-swal-stock-actions.swal2-actions {
    width: 100%;
    margin: 0 !important;
    padding: 0.85rem 1.15rem 1.1rem !important;
    gap: 0.55rem !important;
    flex-wrap: wrap;
    justify-content: stretch;
    border-top: 1px solid rgba(26, 34, 36, 0.08);
    background: #fafbfc;
}
.tamca-swal-stock-actions .swal2-confirm,
.tamca-swal-stock-actions .swal2-cancel {
    flex: 1 1 9.5rem;
    margin: 0 !important;
    padding: 0.62rem 0.85rem !important;
    font-size: 0.875rem !important;
}
.tamca-swal-stock .tamca-swal-close {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    z-index: 2;
}

.tamca-cot-stock-swal {
    color: #1a2224;
}
.tamca-cot-stock-swal__hero {
    padding: 1.35rem 1.25rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(26, 34, 36, 0.06);
}
.tamca-cot-stock-swal--critico .tamca-cot-stock-swal__hero {
    background: linear-gradient(180deg, #fef2f2 0%, #fff 100%);
}
.tamca-cot-stock-swal--advertencia .tamca-cot-stock-swal__hero {
    background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
}
.tamca-cot-stock-swal__icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 0.65rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}
.tamca-cot-stock-swal--critico .tamca-cot-stock-swal__icon {
    animation: tamca-pulse-danger 1.4s ease-in-out infinite;
}
@keyframes tamca-pulse-danger {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.3); }
    50% { box-shadow: 0 0 0 0.6rem rgba(220, 38, 38, 0); }
}
.tamca-cot-stock-swal--critico .tamca-cot-stock-swal__icon {
    background: #fee2e2;
    color: #dc2626;
}
.tamca-cot-stock-swal--advertencia .tamca-cot-stock-swal__icon {
    background: #fef3c7;
    color: #d97706;
}
.tamca-cot-stock-swal__title {
    margin: 0 0 0.35rem;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1a2224;
}
.tamca-cot-stock-swal__msg {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #5c6370;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}

.tamca-cot-stock-list {
    list-style: none;
    margin: 0;
    padding: 0.75rem 1rem 0.85rem;
    max-height: min(16.5rem, 42vh);
    overflow-y: auto;
}
.tamca-cot-stock-item {
    padding: 0.7rem 0.8rem;
    margin-bottom: 0.5rem;
    border-radius: 10px;
    border: 1px solid rgba(26, 34, 36, 0.08);
    background: #fff;
    box-shadow: 0 1px 2px rgba(26, 34, 36, 0.04);
}
.tamca-cot-stock-item:last-child {
    margin-bottom: 0;
}
.tamca-cot-stock-item--cero {
    border-color: #fecaca;
    background: #fffafa;
}
.tamca-cot-stock-item--bajo {
    border-color: #fde68a;
    background: #fffdf5;
}
.tamca-cot-stock-item__head {
    margin-bottom: 0.2rem;
}
.tamca-cot-stock-item__cod {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.78rem;
    font-weight: 700;
    color: #1a2224;
    letter-spacing: 0.02em;
}
.tamca-cot-stock-item__desc {
    margin: 0 0 0.55rem;
    font-size: 0.8rem;
    line-height: 1.35;
    color: #4b5563;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
.tamca-cot-stock-item__metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
}
.tamca-cot-stock-metric {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.4rem 0.5rem;
    border-radius: 8px;
    background: #f3f4f6;
    min-width: 0;
}
.tamca-cot-stock-metric--disp.is-zero {
    background: #fee2e2;
}
.tamca-cot-stock-metric--disp.is-zero .tamca-cot-stock-metric__val {
    color: #dc2626;
}
.tamca-cot-stock-metric__lbl {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    white-space: nowrap;
}
.tamca-cot-stock-metric__val {
    font-size: 1rem;
    font-weight: 700;
    color: #1a2224;
    line-height: 1.1;
}
.tamca-cot-stock-item__sedes {
    margin-top: 0.45rem;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(26, 34, 36, 0.06);
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.6rem;
    font-size: 0.72rem;
    color: #6b7280;
    align-items: center;
}
.tamca-cot-stock-item__sedes-lbl {
    font-weight: 600;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.65rem;
    width: 100%;
    margin-bottom: 0.1rem;
}
.tamca-cot-stock-item__sedes-item {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    background: #f9fafb;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    white-space: nowrap;
}
.tamca-cot-stock-item__sedes-item strong {
    color: #1a2224;
}
.tamca-cot-stock-item__sedes-item--muted {
    opacity: 0.7;
}
.tamca-cot-stock-more {
    margin: 0;
    padding: 0 1rem 0.85rem;
    font-size: 0.78rem;
    color: #6b7280;
    text-align: center;
}

/* --- Eliminar cotización (SweetAlert + motivo baja) --- */
.tamca-swal-baja.swal2-popup {
    padding: 0 !important;
    overflow: hidden;
    max-width: 36rem;
}
.tamca-swal-baja .swal2-icon {
    display: none !important;
}
.tamca-swal-baja-title.swal2-title {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
}
.tamca-swal-baja-html.swal2-html-container {
    margin: 0 !important;
    padding: 0 !important;
    text-align: left;
    overflow: visible;
}
.tamca-swal-baja-actions.swal2-actions {
    width: 100%;
    margin: 0 !important;
    padding: 0.85rem 1.15rem 1.1rem !important;
    gap: 0.55rem !important;
    flex-wrap: wrap;
    justify-content: stretch;
    border-top: 1px solid rgba(26, 34, 36, 0.08);
    background: #fafbfc;
}
.tamca-swal-baja-actions .swal2-confirm,
.tamca-swal-baja-actions .swal2-cancel {
    flex: 1 1 9rem;
    margin: 0 !important;
    padding: 0.62rem 0.85rem !important;
    font-size: 0.875rem !important;
}
.tamca-swal-baja .tamca-swal-close {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    z-index: 2;
}
.tamca-swal-baja-validation.swal2-validation-message {
    margin: 0 1rem 0.75rem !important;
    width: calc(100% - 2rem);
    background: #fef2f2 !important;
    color: #991b1b !important;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.tamca-cot-baja-swal {
    color: #1a2224;
}
.tamca-cot-baja-swal__hero {
    padding: 1.35rem 1.25rem 1rem;
    text-align: center;
    background: linear-gradient(180deg, #fff7ed 0%, #fff 100%);
    border-bottom: 1px solid rgba(26, 34, 36, 0.06);
}
.tamca-cot-baja-swal__icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 0.65rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background: #ffedd5;
    color: #ea580c;
}
.tamca-cot-baja-swal__title {
    margin: 0 0 0.4rem;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
}
.tamca-cot-baja-swal__badge {
    display: inline-block;
    margin-bottom: 0.5rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: #1a2224;
    color: #ffcc21;
}
.tamca-cot-baja-swal__msg {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #5c6370;
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}
.tamca-cot-baja-swal__msg strong {
    color: #1a2224;
    font-weight: 600;
}
.tamca-cot-baja-swal__form {
    padding: 1rem 1.15rem 0.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.tamca-cot-baja-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.tamca-cot-baja-field__lbl {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #4b5563;
}
.tamca-cot-baja-swal .form-control {
    font-size: 0.9rem !important;
    border-radius: 8px !important;
    border: 1px solid #d1d5db !important;
    padding: 0.5rem 0.65rem !important;
    min-height: 2.5rem;
}
.tamca-cot-baja-swal textarea.form-control {
    min-height: 5.5rem;
    resize: vertical;
}
.tamca-cot-baja-swal .form-control:focus {
    border-color: #ffcc21 !important;
    box-shadow: 0 0 0 3px rgba(255, 204, 33, 0.25) !important;
}
.tamca-cot-baja-field__hint {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.35;
}
/* Select2 dentro del modal baja */
.tamca-swal-baja .select2-container--bootstrap-5 {
    width: 100% !important;
}
.tamca-swal-baja .select2-container--bootstrap-5 .select2-selection {
    min-height: 2.5rem;
    border-radius: 8px !important;
    border-color: #d1d5db !important;
    font-size: 0.9rem;
}
.tamca-swal-baja .select2-container--bootstrap-5.select2-container--focus .select2-selection,
.tamca-swal-baja .select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: #ffcc21 !important;
    box-shadow: 0 0 0 3px rgba(255, 204, 33, 0.25) !important;
}
