/* Identidad común de las modales actuales y futuras del sistema. */
.modal .modal-header {
	background:#000020!important;
	color:#fff!important;
	border-bottom:0;
}
.modal .modal-header .modal-title,
.modal .modal-header h1,
.modal .modal-header h2,
.modal .modal-header h3,
.modal .modal-header h4,
.modal .modal-header h5,
.modal .modal-header h6,
.modal .modal-header p,
.modal .modal-header small,
.modal .modal-header span,
.modal .modal-header i {
	color:#fff!important;
}
.modal .modal-header .btn-close {
	filter:none!important;
	background-color:transparent!important;
	background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 3 10 10M13 3 3 13' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E")!important;
	background-repeat:no-repeat;
	background-position:center;
	background-size:14px;
	opacity:.85;
}
.modal .modal-header .btn-close:hover { opacity:1; }
.modal .modal-header .btn-close:focus-visible { outline:2px solid #fff; outline-offset:3px; }
.modal .modal-header .btn-close { position:static!important; transform:none!important; margin:0 0 0 auto!important; flex-shrink:0; }

/* Las alertas siempre superan modales, fondos y menús flotantes. */
.swal2-container{z-index:2147483000!important}
.alertify,.alertify-notifier{z-index:2147482000!important}
.modal-backdrop{z-index:2000!important}
.modal{z-index:2010!important}
/* Alertify necesita una capa posicionada para superar el fondo de Bootstrap. */
.alertify{position:fixed!important;inset:0!important}
.alertify .ajs-dialog{background:#fff;color:#000020;border-radius:12px;overflow:hidden;box-shadow:0 16px 48px #00002033}
.alertify .ajs-header{background:#000020;color:#fff;border-bottom:0}
.alertify .ajs-footer{background:#fff;border-top:1px solid #e9ebf1}
.alertify .ajs-input{width:100%;box-sizing:border-box;border:1px solid #d9dee3;border-radius:6px;padding:10px 12px;color:#000020;background:#fff}
.alertify .ajs-buttons .ajs-button{border-radius:6px;border:1px solid #d9dee3;padding:8px 18px}
.alertify .ajs-buttons .ajs-ok{background:#ff641f;border-color:#ff641f;color:#fff}
.alertify .ajs-buttons .ajs-cancel{background:#fff;color:#566a7f}
/* Supera la regla más específica incluida por la hoja externa de AlertifyJS. */
.alertify .ajs-dialog .ajs-header{background:#000020!important;color:#fff!important}
.alertify .ajs-dialog .ajs-footer{background:#fff!important}
.alertify .ajs-dialog .ajs-commands button{filter:brightness(0) invert(1)}
