.toast-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: min(360px, calc(100vw - 2rem));
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: var(--space-4) var(--space-5);
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: var(--text-sm);
    animation: toastIn 0.3s ease;
    border-left: 3px solid var(--color-primary);
}

.toast.is-leaving {
    animation: toastOut 0.25s ease forwards;
}

.toast-success {
    border-left-color: var(--color-success);
}

.toast-error {
    border-left-color: var(--color-danger);
}

.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.toast-success .toast-icon {
    background: var(--color-success-soft);
    color: var(--color-success);
}

.toast-error .toast-icon {
    background: var(--color-danger-soft);
    color: var(--color-danger);
}

.toast-body {
    flex: 1;
    line-height: 1.4;
    color: var(--color-text);
}

.toast-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
}

.toast-close:hover {
    color: var(--color-text);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}
