.app-notifications {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    width: min(380px, calc(100vw - 30px));
    pointer-events: none;
}

.app-toast {
    --toast-accent: #5f5b6e;
    --toast-soft: rgba(95, 91, 110, 0.12);
    position: relative;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 11px;
    min-height: 70px;
    padding: 11px 12px;
    overflow: hidden;
    direction: rtl;
    color: var(--text-color, #24212b);
    background: var(--surface-bg, #fff);
    border: 1px solid var(--line-color, #e8e4ef);
    border-inline-start: 4px solid var(--toast-accent);
    border-radius: 14px;
    box-shadow: 0 14px 38px rgba(35, 27, 53, 0.18);
    pointer-events: auto;
    animation: nex1-toast-in 280ms cubic-bezier(0.2, 0.85, 0.25, 1.15) both;
}

.app-toast::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: var(--toast-accent);
    transform-origin: right;
    animation: nex1-toast-progress var(--toast-duration, 3800ms) linear forwards;
}

.app-toast.is-leaving {
    animation: nex1-toast-out 220ms ease-in both;
}

.app-toast.is-success {
    --toast-accent: #169b62;
    --toast-soft: rgba(22, 155, 98, 0.13);
}

.app-toast.is-warning {
    --toast-accent: #d98b08;
    --toast-soft: rgba(217, 139, 8, 0.14);
}

.app-toast.is-error {
    --toast-accent: #dc3e52;
    --toast-soft: rgba(220, 62, 82, 0.13);
}

.app-toast.is-info {
    --toast-accent: #7548ef;
    --toast-soft: rgba(117, 72, 239, 0.13);
}

.app-toast--icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--toast-accent);
    background: var(--toast-soft);
    border-radius: 12px;
    font-family: Arial, sans-serif;
    font-size: 21px;
    font-weight: 800;
    line-height: 1;
}

.app-toast--content {
    min-width: 0;
}

.app-toast--title,
.app-toast--message {
    display: block;
}

.app-toast--title {
    margin-bottom: 3px;
    color: var(--heading-color, #1f1c25);
    font-size: 14px;
    font-weight: 800;
}

.app-toast--message {
    color: var(--muted-color, #777282);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.7;
}

.app-toast--close {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    color: var(--muted-color, #777282);
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.app-toast--close:hover {
    color: var(--heading-color, #1f1c25);
    background: var(--surface-hover-bg, #f4f1fb);
}

.app-toast--close:focus-visible {
    outline: 2px solid var(--toast-accent) !important;
    outline-offset: 2px !important;
}

@keyframes nex1-toast-in {
    from {
        opacity: 0;
        transform: translate3d(28px, 12px, 0) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes nex1-toast-out {
    to {
        opacity: 0;
        transform: translate3d(24px, 8px, 0) scale(0.97);
    }
}

@keyframes nex1-toast-progress {
    to {
        transform: scaleX(0);
    }
}

@media (max-width: 560px) {
    .app-notifications {
        right: 15px;
        bottom: 15px;
        left: 15px;
        width: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-toast,
    .app-toast.is-leaving,
    .app-toast::after {
        animation-duration: 1ms;
    }
}
