.nc-toast-stack {
    position: fixed;
    z-index: 100000;
    top: 20px;
    right: 20px;
    width: min(400px, calc(100vw - 40px));
    padding: 0;
    pointer-events: none;
}

.nc-toast-stack .nc-toast {
    --toast-accent-start: #6c54ff;
    --toast-accent-end: #0972ce;
    --toast-surface: #f7f9ff;
    --toast-border: #cfdbf2;
    display: block;
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0;
    overflow: hidden;
    color: var(--color-text, #053660);
    background: linear-gradient(112deg, var(--toast-surface) 0%, #fff 72%);
    border: 1px solid var(--toast-border);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(5, 54, 96, 0.09), 0 2px 6px rgba(5, 54, 96, 0.04);
    opacity: 0;
    transform: translate3d(0, -10px, 0) scale(0.98);
    transform-origin: top right;
    pointer-events: auto;
}

.nc-toast-stack .nc-toast.fade {
    transition: opacity 180ms ease, transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.nc-toast-stack .nc-toast.showing,
.nc-toast-stack .nc-toast.show {
    display: block;
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

.nc-toast-stack .nc-toast.hide {
    display: none;
}

.nc-toast-stack .nc-toast--error {
    --toast-accent-start: #f07b6a;
    --toast-accent-end: #cf4f4f;
    --toast-surface: #fff8f7;
    --toast-border: #f2c2bc;
}

.nc-toast-stack .nc-toast--success {
    --toast-accent-start: #3bc6a3;
    --toast-accent-end: #159778;
    --toast-surface: #f5fbf9;
    --toast-border: #b8ddd2;
}

.nc-toast-stack .nc-toast--warning {
    --toast-accent-start: #ffc45e;
    --toast-accent-end: #e49316;
    --toast-surface: #fffbf3;
    --toast-border: #ead4a9;
}

.nc-toast-stack .nc-toast--info {
    --toast-accent-start: #6c54ff;
    --toast-accent-end: #0972ce;
    --toast-surface: #f7f8ff;
    --toast-border: #c9d2f1;
}

.nc-toast-stack .nc-toast .toast-body {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 24px;
    gap: 11px;
    align-items: center;
    min-width: 0;
    min-height: 60px;
    padding: 13px 12px 13px 14px !important;
    color: var(--color-text, #053660) !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: inherit;
    box-shadow: none !important;
}

.nc-toast__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #fff;
    background: linear-gradient(135deg, var(--toast-accent-start), var(--toast-accent-end));
    border-radius: 9px;
}

.nc-toast__icon svg {
    width: 18px;
    height: 18px;
}

.nc-toast__icon path {
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nc-toast__content {
    min-width: 0;
}

.nc-toast__message {
    overflow-wrap: anywhere;
}

.nc-toast-stack .toast-close {
    align-self: start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin: 0;
    padding: 0;
    color: var(--color-text, #053660);
    background: transparent;
    border: 0;
    border-radius: 50%;
    opacity: 0.48;
    cursor: pointer;
    transition: color 160ms ease, background-color 160ms ease, opacity 160ms ease;
}

.nc-toast-stack .toast-close:hover,
.nc-toast-stack .toast-close:focus-visible {
    color: var(--toast-accent-end);
    background: rgba(5, 54, 96, 0.08);
    opacity: 1;
    outline: 0;
}

.nc-toast__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.nc-toast__action {
    min-height: 34px;
    padding: 7px 15px;
    color: var(--color-text, #053660);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    background: #fff;
    border: 1px solid rgba(5, 54, 96, 0.16);
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.nc-toast__action:hover {
    border-color: rgba(5, 54, 96, 0.34);
    box-shadow: 0 5px 12px rgba(5, 54, 96, 0.1);
    transform: translateY(-1px);
}

.nc-toast__action--primary {
    color: #fff;
    background: linear-gradient(93deg, #6c54ff -16%, #0972ce 100%);
    border-color: transparent;
}

.nc-toast__action:focus-visible {
    outline: 3px solid rgba(9, 114, 206, 0.2);
    outline-offset: 2px;
}

@media (max-width: 575.98px) {
    .nc-toast-stack {
        top: 12px;
        right: 12px;
        left: 12px;
        width: auto;
    }

    .nc-toast-stack .nc-toast .toast-body {
        grid-template-columns: 30px minmax(0, 1fr) 24px;
        gap: 10px;
        min-height: 58px;
        padding: 12px 10px 12px 12px !important;
    }

    .nc-toast__icon {
        width: 30px;
        height: 30px;
    }

    .nc-toast__icon svg {
        width: 17px;
        height: 17px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nc-toast-stack .nc-toast,
    .nc-toast-stack .toast-close,
    .nc-toast__action {
        transition: none;
    }
}
