.app-flash-stack {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1300;
    display: grid;
    gap: 12px;
    width: min(420px, calc(100vw - 32px));
    pointer-events: none;
}

.app-flash {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 16px 16px 15px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.09);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #10201b;
    pointer-events: auto;
    animation: appFlashEnter 220ms cubic-bezier(0.25, 1, 0.5, 1) both;
}

.app-flash.is-leaving {
    animation: appFlashExit 180ms ease both;
}

.app-flash__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 1rem;
    flex: 0 0 auto;
}

.app-flash__content {
    min-width: 0;
}

.app-flash__content strong {
    display: block;
    margin: 0 0 4px;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.3;
}

.app-flash__content p {
    margin: 0;
    color: #5f6f67;
    font-size: 0.9rem;
    line-height: 1.5;
}

.app-flash__list {
    margin: 6px 0 0;
    padding-left: 18px;
    color: #5f6f67;
    font-size: 0.9rem;
    line-height: 1.5;
}

.app-flash__close {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: transparent;
    color: #64748b;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.app-flash__close:hover {
    background: rgba(15, 23, 42, 0.06);
    color: #10201b;
}

.app-flash__close:focus-visible {
    outline: 3px solid rgba(18, 184, 134, 0.18);
    outline-offset: 2px;
}

.app-flash--success {
    border-color: rgba(18, 184, 134, 0.22);
}

.app-flash--success .app-flash__icon {
    background: rgba(18, 184, 134, 0.12);
    color: #087f5b;
}

.app-flash--error {
    border-color: rgba(250, 82, 82, 0.22);
}

.app-flash--error .app-flash__icon {
    background: rgba(250, 82, 82, 0.12);
    color: #e03131;
}

.app-flash--warning {
    border-color: rgba(245, 159, 0, 0.22);
}

.app-flash--warning .app-flash__icon {
    background: rgba(245, 159, 0, 0.14);
    color: #c77700;
}

.app-flash--info {
    border-color: rgba(59, 130, 246, 0.18);
}

.app-flash--info .app-flash__icon {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

@keyframes appFlashEnter {
    0% {
        opacity: 0;
        transform: translate3d(0, -10px, 0) scale(0.98);
    }

    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes appFlashExit {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate3d(0, -8px, 0) scale(0.98);
    }
}

@media (max-width: 640px) {
    .app-flash-stack {
        top: auto;
        right: 16px;
        left: 16px;
        bottom: 16px;
        width: auto;
    }

    .app-flash {
        grid-template-columns: auto minmax(0, 1fr) auto;
        padding: 15px;
        border-radius: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-flash,
    .app-flash.is-leaving {
        animation: none;
    }

    .app-flash__close {
        transition: none;
    }
}
