:root {
    --ui-radius-xs: 8px;
    --ui-radius-sm: 10px;
    --ui-radius-md: 12px;
    --ui-radius-lg: 16px;

    --ui-gap-1: 6px;
    --ui-gap-2: 8px;
    --ui-gap-3: 12px;
    --ui-gap-4: 16px;

    --ui-shadow-soft: 0 10px 24px rgba(22, 40, 82, 0.12);
    --ui-shadow-pop: 0 18px 38px rgba(16, 33, 73, 0.22);

    --ui-border: #d6e0f4;
    --ui-border-strong: #c3d2f1;
    --ui-surface: #ffffff;
    --ui-surface-muted: #f5f8ff;

    --ui-text: #1c2c50;
    --ui-text-muted: #5f6f96;
    --ui-accent: #1968ff;
    --ui-accent-strong: #0f49c6;
    --ui-success: #137142;
    --ui-warning: #8a6200;
    --ui-danger: #a13a1f;
    --ui-danger-bg: #ffede8;
}

.app-toast-stack {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none;
}

.app-toast {
    min-width: 220px;
    max-width: min(420px, calc(100vw - 32px));
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    box-shadow: var(--ui-shadow-pop);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.45;
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    transition: opacity 0.22s ease, transform 0.22s ease;
    pointer-events: none;
    backdrop-filter: blur(10px);
}

.app-toast.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.app-toast.is-leaving {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
}

.app-toast-success {
    background: linear-gradient(135deg, rgba(19, 113, 66, 0.96) 0%, rgba(11, 86, 50, 0.96) 100%);
}

.app-toast-error {
    background: linear-gradient(135deg, rgba(161, 58, 31, 0.96) 0%, rgba(122, 35, 16, 0.96) 100%);
}

.app-toast-warning {
    background: linear-gradient(135deg, rgba(138, 98, 0, 0.96) 0%, rgba(110, 78, 0, 0.96) 100%);
}

.app-toast-info {
    background: linear-gradient(135deg, rgba(25, 104, 255, 0.96) 0%, rgba(15, 73, 198, 0.96) 100%);
}

@media (max-width: 768px) {
    .app-toast-stack {
        top: auto;
        right: 10px;
        left: 10px;
        bottom: 10px;
        align-items: stretch;
        gap: 8px;
    }

    .app-toast {
        max-width: 100%;
        min-width: 0;
        padding: 10px 12px;
        border-radius: 12px;
        font-size: 0.84rem;
        line-height: 1.35;
    }
}
