.toast-stack {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: var(--ui-z-toast, 12000);
    display: grid;
    gap: 10px;
    pointer-events: none;
}

.toast-item {
    min-width: 220px;
    max-width: 380px;
    position: relative;
    overflow: hidden;
    border-radius: var(--ui-toast-radius, 14px);
    border: 1px solid var(--ui-color-line, #e5e1d6);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(252, 250, 245, 0.95));
    box-shadow: var(--ui-toast-shadow, 0 14px 32px rgba(20, 35, 57, 0.14));
    padding: 10px 12px;
    color: var(--ui-color-ink, #151515);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    align-items: start;
    animation: toastIn var(--ui-motion-base, 180ms cubic-bezier(0.22, 1, 0.36, 1)) both;
    transition: opacity var(--ui-motion-fast, 140ms ease), transform var(--ui-motion-fast, 140ms ease);
}

.toast-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--ui-color-info, #6a9bcc);
}

.toast-item.toast-success {
    border-color: rgba(120, 140, 93, 0.3);
}

.toast-item.toast-warning {
    border-color: rgba(217, 119, 87, 0.34);
}

.toast-item.toast-danger {
    border-color: rgba(184, 90, 71, 0.38);
}

.toast-item.toast-success::before {
    background: var(--ui-color-success, #788c5d);
}

.toast-item.toast-warning::before {
    background: var(--ui-color-warning, #d97757);
}

.toast-item.toast-danger::before {
    background: var(--ui-color-danger, #b85a47);
}

.toast-item.is-leaving {
    opacity: 0;
    transform: translateX(12px);
}

.toast-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    background: var(--ui-color-brand, #1455d9);
}

.toast-item.toast-success .toast-dot {
    background: var(--ui-color-success, #2c8a52);
}

.toast-item.toast-warning .toast-dot {
    background: var(--ui-color-warning, #c77a18);
}

.toast-item.toast-danger .toast-dot {
    background: var(--ui-color-danger, #c34532);
}

.toast-message {
    font-size: 13px;
    line-height: 1.45;
    white-space: pre-wrap;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(12px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .toast-item {
        animation: none !important;
        transition: none !important;
    }
}
