.global-toast-container {
    position: fixed;
    top: max(18px, env(safe-area-inset-top));
    right: max(18px, env(safe-area-inset-right));
    z-index: 2147483000;
    display: flex;
    width: min(390px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.global-toast {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 14px 14px 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
    color: #0f172a;
    font-family: "Manrope", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    opacity: 0;
    pointer-events: auto;
    transform: translate3d(28px, -14px, 0);
    transition: opacity 220ms ease, transform 260ms ease;
}

.global-toast.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.global-toast.is-hiding {
    opacity: 0;
    transform: translate3d(28px, -14px, 0);
}

.global-toast > i {
    color: #2563eb;
    font-size: 22px;
}

.global-toast span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.global-toast button {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.06);
    color: #475569;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease;
}

.global-toast button:hover,
.global-toast button:focus-visible {
    background: rgba(15, 23, 42, 0.12);
    color: #0f172a;
    outline: none;
}

.global-toast--success {
    border-left-color: #16a34a;
}

.global-toast--success > i {
    color: #16a34a;
}

.global-toast--error {
    border-left-color: #dc2626;
}

.global-toast--error > i {
    color: #dc2626;
}

.global-toast--warning {
    border-left-color: #d97706;
}

.global-toast--warning > i {
    color: #d97706;
}

.global-toast--info {
    border-left-color: #2563eb;
}

.global-toast--info > i {
    color: #2563eb;
}

.dark .global-toast {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.36);
    color: #f8fafc;
}

.dark .global-toast button {
    background: rgba(248, 250, 252, 0.1);
    color: #cbd5e1;
}

.dark .global-toast button:hover,
.dark .global-toast button:focus-visible {
    background: rgba(248, 250, 252, 0.18);
    color: #ffffff;
}

@media (max-width: 640px) {
    .global-toast-container {
        top: max(12px, env(safe-area-inset-top));
        right: 12px;
        left: 12px;
        width: auto;
    }

    .global-toast {
        transform: translate3d(0, -18px, 0);
    }

    .global-toast.is-hiding {
        transform: translate3d(0, -18px, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .global-toast {
        transition: none;
    }
}
