/* ===============================
   MODAL PERSONALIZADO (ALERTA)
   =============================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px); /* Toque moderno de desenfoque */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #faeaea; /* Fondo rosado suave de la imagen */
    padding: 40px 30px;
    border-radius: 20px; /* Bordes más redondeados */
    border: 3px solid #e8cdcd;
    text-align: center;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background-color: #BE1119; /* Tu rojo principal */
    color: white;
    box-shadow: 0 8px 15px rgba(190, 17, 25, 0.4);
}

.modal-icon svg {
    width: 45px;
    height: 45px;
}

/* Variantes de color para el ícono según el estado */
.modal-icon.icon-error { background-color: #e74c3c; box-shadow: 0 8px 15px rgba(231, 76, 60, 0.4); }
.modal-icon.icon-success { background-color: #2ecc71; box-shadow: 0 8px 15px rgba(46, 204, 113, 0.4); }

.modal-title {
    font-size: 20px;
    color: #000;
    margin-bottom: 5px;
    font-weight: 600;
}

.modal-message {
    font-size: 14px;
    color: #555;
    margin-bottom: 25px;
    display: none; /* Oculto por defecto si no hay mensaje extra */
}
.modal-message.active { display: block; }

.modal-actions {
    display: flex;
    flex-direction: column; /* Botones apilados como en la imagen */
    gap: 15px;
    align-items: center;
}

.btn-modal {
    width: 100%;
    max-width: 180px;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-modal:active { transform: scale(0.96); }
.btn-modal:hover { filter: brightness(0.95); }

/* Colores de botones basados en la referencia */
.btn-confirm { background-color: #a7eebc; color: #000; } /* Verde suave */
.btn-cancel { background-color: #ffaaaa; color: #000; } /* Rojo suave */
.btn-ok { background-color: #BE1119; color: #fff; } /* Para alertas simples */