#toast-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2147483646;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: min(24rem, calc(100vw - 2rem));
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 0.9rem;
    border-radius: 0.75rem;
    color: #fff;
    box-shadow: 0 10px 25px rgb(0 0 0 / 0.18);
    border-left: 4px solid rgb(255 255 255 / 0.45);
    animation: toast-in 0.22s ease-out;
}

.toast-out { animation: toast-out 0.18s ease-in forwards; }

.toast-success { background: #059669; }
.toast-error   { background: #dc2626; }
.toast-warning { background: #d97706; }
.toast-info    { background: #0369a1; }

.toast-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.toast-body {
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.35;
    font-weight: 500;
}

.toast-close {
    flex-shrink: 0;
    margin: -0.2rem -0.15rem 0 0;
    padding: 0 0.25rem;
    font-size: 1.25rem;
    line-height: 1;
    color: rgb(255 255 255 / 0.8);
    background: none;
    border: 0;
    cursor: pointer;
}
.toast-close:hover { color: #fff; }

@keyframes toast-in {
    from { opacity: 0; transform: translateX(0.8rem); }
    to   { opacity: 1; transform: none; }
}
@keyframes toast-out {
    to { opacity: 0; transform: translateX(0.8rem); }
}