/* Alertas premium (SweetAlert2 y alert()) para todo el sistema. Se carga despues de sweetalert2.min.css */
.swal2-container { z-index: 20000 !important; font-family: inherit; }
.swal2-container.swal2-backdrop-show, .swal2-container.swal2-noanimation { background: rgba(15, 23, 42, .5) !important; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.swal2-container.swal2-top-end, .swal2-container.swal2-top-right, .swal2-container.swal2-top-start, .swal2-container.swal2-bottom-end { background: transparent !important; backdrop-filter: none; }

.swal2-popup.ap-popup { width: 27rem; max-width: calc(100vw - 32px); padding: 30px 28px 24px; border: 1px solid rgba(226, 232, 240, .9); border-radius: 22px; background: #fff; color: #334155; box-shadow: 0 30px 70px rgba(15, 23, 42, .28); font-family: inherit; }
.swal2-popup.ap-popup.swal2-toast { width: auto; max-width: min(92vw, 26rem); padding: 12px 16px; border-radius: 14px; box-shadow: 0 14px 34px rgba(15, 23, 42, .2); border-left: 4px solid #2563eb; align-items: center; }
.swal2-popup.ap-popup.swal2-toast .swal2-title { font-size: 14px; font-weight: 700; margin: 0 8px; text-align: left; }
.swal2-popup.ap-popup.swal2-toast .swal2-icon { width: 1.8em; height: 1.8em; margin: 0 4px 0 0; min-width: 0; }
.swal2-popup.ap-popup .swal2-title.ap-title { display: block; margin: 0 0 6px; padding: 0; font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; color: #0f172a; text-align: center; }
.swal2-popup.ap-popup .swal2-html-container.ap-html { margin: 6px 0 0; padding: 0; font-size: 14.5px; line-height: 1.55; color: #475569; text-align: center; overflow-wrap: anywhere; }
.swal2-popup.ap-popup .swal2-html-container.ap-html:has(table, form, .caja-modal) { text-align: left; }
.swal2-popup.ap-popup .swal2-close { color: #94a3b8; font-size: 28px; border-radius: 12px; transition: background .15s, color .15s; }
.swal2-popup.ap-popup .swal2-close:hover { background: #f1f5f9; color: #0f172a; }

/* iconos: aro suave con color de estado */
.swal2-popup.ap-popup .swal2-icon { width: 4.6rem; height: 4.6rem; margin: 0 auto 14px; border-width: 0; border-radius: 50%; }
.swal2-popup.ap-popup .swal2-icon .swal2-icon-content { font-size: 2.4rem; font-weight: 800; }
.swal2-popup.ap-popup .swal2-icon.swal2-success { background: rgba(22, 163, 74, .12); color: #16a34a; }
.swal2-popup.ap-popup .swal2-icon.swal2-success [class^=swal2-success-line] { background: #16a34a; }
.swal2-popup.ap-popup .swal2-icon.swal2-success .swal2-success-ring { border-color: rgba(22, 163, 74, .25); }
.swal2-popup.ap-popup .swal2-icon.swal2-success [class^=swal2-success-circular-line] { display: none; }
.swal2-popup.ap-popup .swal2-icon.swal2-success .swal2-success-fix { display: none; }
.swal2-popup.ap-popup .swal2-icon.swal2-error { background: rgba(220, 38, 38, .1); color: #dc2626; }
.swal2-popup.ap-popup .swal2-icon.swal2-error [class^=swal2-x-mark-line] { background: #dc2626; }
.swal2-popup.ap-popup .swal2-icon.swal2-warning { background: rgba(245, 158, 11, .14); color: #d97706; }
.swal2-popup.ap-popup .swal2-icon.swal2-info { background: rgba(37, 99, 235, .1); color: #2563eb; }
.swal2-popup.ap-popup .swal2-icon.swal2-question { background: rgba(124, 58, 237, .1); color: #7c3aed; }
.swal2-popup.ap-popup.swal2-toast.swal2-icon-success { border-left-color: #16a34a; }
.swal2-popup.ap-popup.swal2-toast.swal2-icon-error { border-left-color: #dc2626; }
.swal2-popup.ap-popup.swal2-toast.swal2-icon-warning { border-left-color: #f59e0b; }

/* botones */
.swal2-popup.ap-popup .swal2-actions { gap: 10px; margin: 22px 0 0; width: 100%; flex-wrap: wrap; }
.swal2-popup.ap-popup .swal2-actions button.ap-btn { flex: 1 1 0; min-width: 120px; margin: 0; padding: 12px 20px; border: 1px solid transparent; border-radius: 12px; font-size: 14.5px; font-weight: 700; line-height: 1.2; cursor: pointer; transition: transform .1s, box-shadow .15s, background .15s; box-shadow: none; }
.swal2-popup.ap-popup .swal2-actions button.ap-btn:active { transform: translateY(1px); }
.swal2-popup.ap-popup .swal2-actions button.ap-btn:focus-visible { outline: 0; box-shadow: 0 0 0 4px rgba(37, 99, 235, .25); }
.swal2-popup.ap-popup .swal2-actions button.ap-btn-primary { color: #fff; background: linear-gradient(135deg, #1e3a6e, #2563eb); box-shadow: 0 8px 18px rgba(37, 99, 235, .28); }
.swal2-popup.ap-popup .swal2-actions button.ap-btn-primary:hover { background: linear-gradient(135deg, #1b3463, #1d4ed8); box-shadow: 0 10px 22px rgba(37, 99, 235, .34); }
.swal2-popup.ap-popup .swal2-actions button.ap-btn-sec { color: #475569; background: #f1f5f9; border-color: #e2e8f0; }
.swal2-popup.ap-popup .swal2-actions button.ap-btn-sec:hover { background: #e2e8f0; color: #0f172a; }
.swal2-popup.ap-popup .swal2-actions button.ap-btn-danger { color: #fff; background: #dc2626; box-shadow: 0 8px 18px rgba(220, 38, 38, .25); }
.swal2-popup.ap-popup .swal2-actions button.ap-btn-danger:hover { background: #b91c1c; }
.swal2-popup.ap-popup.ap-peligro .swal2-actions button.ap-btn-primary { background: #dc2626; box-shadow: 0 8px 18px rgba(220, 38, 38, .25); }
.swal2-popup.ap-popup .swal2-loader { border-color: #2563eb transparent #2563eb transparent; }

/* campos dentro de la alerta */
.swal2-popup.ap-popup .swal2-input, .swal2-popup.ap-popup .swal2-textarea, .swal2-popup.ap-popup .swal2-select { width: 100%; margin: 14px 0 0; padding: 11px 14px; border: 1px solid #dbe3ef; border-radius: 12px; background: #fff; color: #0f172a; font-size: 15px; box-shadow: none; box-sizing: border-box; }
.swal2-popup.ap-popup .swal2-input { height: 46px; }
.swal2-popup.ap-popup .swal2-input:focus, .swal2-popup.ap-popup .swal2-textarea:focus, .swal2-popup.ap-popup .swal2-select:focus { border-color: #3b82f6; box-shadow: 0 0 0 4px rgba(59, 130, 246, .16); outline: 0; }
.swal2-popup.ap-popup .swal2-validation-message { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; background: #fef2f2; color: #b91c1c; font-size: 13px; font-weight: 600; }
.swal2-popup.ap-popup .swal2-validation-message::before { background: #dc2626; }
.swal2-popup.ap-popup .swal2-footer { margin-top: 18px; padding-top: 14px; border-top: 1px solid #eef2f7; color: #64748b; font-size: 13px; }
.swal2-popup.ap-popup .swal2-timer-progress-bar { background: #2563eb; }
@media (max-width: 480px) { .swal2-popup.ap-popup .swal2-actions button.ap-btn { flex-basis: 100%; } }
