.toast-region {
    position: fixed;
    z-index: 3000;
    bottom: 24px;
    left: 24px;
    display: flex;
    flex-direction: column;
    width: min(400px, calc(100vw - 32px));
    gap: 10px;
    pointer-events: none;
}

.admin-shell .toast-region {
    left: 296px;
}

.toast {
    --toast-accent: #2d6a4f;
    --toast-soft: #e9f5ef;
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 32px;
    align-items: start;
    min-height: 82px;
    padding: 17px 14px 18px 16px;
    gap: 12px;
    overflow: hidden;
    color: #1a241f;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(27, 55, 42, 0.13);
    border-radius: 15px;
    box-shadow: 0 18px 48px rgba(16, 43, 32, 0.2), 0 3px 10px rgba(16, 43, 32, 0.08);
    pointer-events: auto;
    animation: toast-slide-in 280ms cubic-bezier(0.22, 0.78, 0.3, 1) both;
    transition: opacity 200ms ease, transform 200ms ease, margin 200ms ease;
}

.toast-error {
    --toast-accent: #a33e3e;
    --toast-soft: #fdecec;
}

.toast-info {
    --toast-accent: #8a641d;
    --toast-soft: #fff4d9;
}

.toast-icon {
    display: grid;
    width: 42px;
    height: 42px;
    color: var(--toast-accent);
    background: var(--toast-soft);
    border-radius: 50%;
    place-items: center;
}

.toast-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
}

.toast-copy {
    display: flex;
    align-self: center;
    align-items: center;
    min-width: 0;
}

.toast-copy > span {
    display: block;
    color: #526159;
    font-size: 0.83rem;
    font-weight: 650;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.toast-close {
    display: grid;
    width: 32px;
    height: 32px;
    padding: 0;
    color: #77847d;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    place-items: center;
}

.toast-close:hover,
.toast-close:focus-visible {
    color: #27332d;
    background: #f1f5f3;
}

.toast-close svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.9;
}

.toast-progress {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--toast-accent);
    opacity: 0.75;
    transform-origin: left;
    animation: toast-progress var(--toast-duration, 6000ms) linear forwards;
}

.toast.is-paused .toast-progress {
    animation-play-state: paused;
}

.toast.is-leaving {
    opacity: 0;
    transform: translateX(-35px) scale(0.98);
}

@keyframes toast-slide-in {
    from {
        opacity: 0;
        transform: translateX(calc(-100% - 28px));
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toast-progress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

@media (max-width: 540px) {
    .toast-region {
        right: 16px;
        bottom: 16px;
        left: 16px;
        width: auto;
    }

    .toast {
        grid-template-columns: 38px minmax(0, 1fr) 30px;
        min-height: 76px;
        padding: 15px 12px 17px 14px;
        gap: 10px;
        border-radius: 13px;
    }

    .toast-icon {
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 980px) {
    .admin-shell .toast-region {
        right: 16px;
        left: 16px;
        width: min(400px, calc(100vw - 32px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .toast,
    .toast-progress {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
