/* === MODAL POPUP === */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    animation: fadeInOverlay 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-box {
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    animation: slideInUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    border: 1px solid var(--gray-300);
}

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

.modal-box.error { border-color: var(--gray-500); }
.modal-box.success { border-color: var(--gray-500); }

.modal-icon { font-size: 3rem; margin-bottom: 1rem; animation: bounce 0.6s ease; }

@keyframes bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.modal-title {
    font-size: 1.5rem;
    color: var(--gray-800);
    margin-bottom: 0.8rem;
    font-family: var(--font-display);
    font-weight: 700;
}

.modal-message { color: var(--gray-600); margin-bottom: 1.5rem; line-height: 1.6; font-size: 0.95rem; }

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--trans-normal);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.modal-btn-confirm { background: var(--gray-800); color: var(--text-light); flex: 1; }
.modal-btn-confirm:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); }

.modal-btn-cancel { background: var(--gray-200); color: var(--gray-800); flex: 1; }
.modal-btn-cancel:hover { background: var(--gray-300); transform: translateY(-2px); }

.modal-btn.btn-success { background: var(--gray-700); color: var(--text-light); }
.modal-btn.btn-success:hover { background: var(--gray-600); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.06); }
.modal-btn.btn-secondary { background: var(--gray-200); color: var(--gray-800); }
.modal-btn.btn-secondary:hover { background: var(--gray-300); transform: translateY(-2px); }

.modal-btn-solo {
    flex: 1;
    min-width: 150px;
}

/* === TOAST NOTIFICATION === */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--gray-100);
    padding: 1.2rem 1.8rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 10000;
    animation: slideInRight 0.4s ease;
    border-left: 4px solid var(--gray-500);
    max-width: 350px;
}

.toast.error { border-left-color: var(--gray-600); }
.toast.warning { border-left-color: var(--gray-400); }

@keyframes slideInRight {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(400px); opacity: 0; }
}

.toast i { font-size: 1.3rem; color: var(--gray-600); }
.toast.error i { color: var(--gray-600); }

.toast.warning i { color: var(--gray-500); }
.toast-message { color: var(--gray-700); font-weight: 500; flex: 1; }

.toast-close { background: none; border: none; color: var(--gray-400); cursor: pointer; font-size: 1.2rem; transition: all 0.2s ease; }
.toast-close:hover { color: var(--gray-700); }

/* === RESPONSIVE === */
@media (max-width: 600px) {
    .modal-box {
        padding: 1.5rem;
        max-width: 95%;
    }

    .modal-title {
        font-size: 1.2rem;
    }

    .modal-actions {
        flex-direction: column;
    }

    .toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}
