/* =========================
   MODAL SYSTEM (FIXED)
========================= */

.ai-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

.ai-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* MODAL BOX */
.ai-modal {
    background: #fff;
    width: 90%;
    max-width: 480px;
    padding: 28px;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    font-family: "DM Sans", sans-serif;
    animation: modalPop 0.2s ease;
    box-sizing: border-box;
}

@keyframes modalPop {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* INPUTS */
.ai-modal label {
    display: block;
    margin-bottom: 12px;
    font-size: 14px;
}

.ai-modal input {
    width: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    border: 1px solid #d5dfff;
    border-radius: 6px;
    font-size: 14px;
    font-family: "DM Sans", sans-serif;
    outline: none;
	box-sizing: border-box;
}

.ai-modal input:focus {
    border-color: #5025D1;
}

/* BUTTONS */
.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.modal-actions button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-family: "DM Sans", sans-serif;
}

.modal-save {
    background: #673DE6;
    color: #fff;
}

.modal-save:hover {
    background: #5025D1;
}

.modal-cancel {
    background: #eee;
}