#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 500;
    min-width: 280px;
    max-width: 380px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(12px);
    pointer-events: all;
    position: relative;
    overflow: hidden;
    transform: translateX(calc(100% + 32px));
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(calc(100% + 32px));
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast-success {
    background: linear-gradient(135deg, rgba(240, 253, 244, 0.97) 0%, rgba(209, 250, 229, 0.97) 100%);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #065f46;
}

.toast-error {
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.97) 0%, rgba(254, 226, 226, 0.97) 100%);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #7f1d1d;
}

.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast-text { flex: 1; line-height: 1.4; }

.toast-close {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    opacity: 0.5;
    color: inherit;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    transition: opacity 0.2s;
}
.toast-close:hover { opacity: 1; }

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 14px 14px;
    animation: toast-shrink linear forwards;
}
.toast-success .toast-progress { background: #10b981; }
.toast-error   .toast-progress { background: #ef4444; }

@keyframes toast-shrink {
    from { width: 100%; }
    to   { width: 0%; }
}
