.toast-stack {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: min(22rem, calc(100vw - 2rem));
    pointer-events: none;
}

.toast {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 0.875rem 0.875rem 1rem;
    border-radius: 0.85rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    opacity: 0;
    transform: translateX(1.25rem);
    transition: opacity 0.28s ease, transform 0.28s ease;
    pointer-events: auto;
}

html.dark .toast {
    background: #171717;
    border-color: #2a2a2a;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.toast.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.toast.is-leaving {
    opacity: 0;
    transform: translateX(1.25rem);
}

.toast__indicator {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.toast--success .toast__indicator {
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.toast--error .toast__indicator {
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.toast__message {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #1f2937;
}

html.dark .toast__message {
    color: #f4f0e8;
}

.toast__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: none;
    border-radius: 0.5rem;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
}

.toast__close svg {
    width: 1rem;
    height: 1rem;
}

.toast__close:hover {
    background: #f3f4f6;
    color: #111827;
}

html.dark .toast__close:hover {
    background: #262626;
    color: #f4f0e8;
}
