#app-toast-stack {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 5000;
    width: min(92vw, 380px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.app-toast {
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid #1f2937;
    background: #0f172a;
    color: #f8fafc;
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.4);
    padding: 12px 42px 14px 12px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.app-toast-message {
    font-size: 0.92rem;
    line-height: 1.45;
    word-break: break-word;
}

.app-toast-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    opacity: 0.76;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.app-toast-close:hover {
    opacity: 1;
}

.app-toast-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    transform-origin: left center;
    animation: app-toast-progress linear forwards;
    animation-duration: var(--toast-duration, 5000ms);
}

.app-toast-success {
    border-left: 4px solid #22c55e;
}

.app-toast-success .app-toast-progress {
    background: #22c55e;
}

.app-toast-error {
    border-left: 4px solid #ef4444;
}

.app-toast-error .app-toast-progress {
    background: #ef4444;
}

.app-toast-warning {
    border-left: 4px solid #f59e0b;
}

.app-toast-warning .app-toast-progress {
    background: #f59e0b;
}

.app-toast-info {
    border-left: 4px solid #3b82f6;
}

.app-toast-info .app-toast-progress {
    background: #3b82f6;
}

@keyframes app-toast-progress {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}
