.toast-stack {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    pointer-events: all;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    max-width: 380px;
    padding: 13px 14px;
    border-radius: 14px;
    background: var(--deep-green);
    color: var(--pure-white);
    box-shadow: 0 8px 28px rgba(17, 17, 17, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
    overflow: hidden;
    animation: toast-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.toast.toast--dismissing {
    animation: toast-out 0.25s ease forwards;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(16px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateY(0)   scale(1);    }
    to   { opacity: 0; transform: translateY(8px) scale(0.95); }
}

/* Error variant */
.toast--error {
    background: #2d1010;
    border-color: rgba(229, 62, 62, 0.35);
}

/* Icon */
.toast__icon {
    display: flex;
    flex-shrink: 0;
    color: var(--fresh-green);
}

.toast--error .toast__icon {
    color: #fc8181;
}

/* Message text */
.toast__msg {
    flex: 1;
    font-family: var(--font-body), sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
}

/* Close button */
.toast__close {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    padding: 2px;
    display: flex;
    flex-shrink: 0;
    transition: color 0.15s;
}

.toast__close:hover {
    color: rgba(255, 255, 255, 0.9);
}

.toast__close:focus-visible {
    outline: 2px solid var(--fresh-green);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Progress bar */
.toast__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(255, 255, 255, 0.25);
    transform-origin: left;
    animation: toast-progress 5s linear forwards;
}

.toast--error .toast__progress {
    background: rgba(252, 129, 129, 0.45);
}

@keyframes toast-progress {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

/* Responsive */
@media (max-width: 480px) {
    .toast-stack {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }

    .toast {
        max-width: 100%;
        min-width: unset;
    }
}