.toast-container {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(380px, calc(100vw - 24px));
    pointer-events: none;
}

.toast-item {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(7, 21, 40, 0.16);
    border: 1px solid rgba(138, 148, 163, 0.3);
    border-left: 3px solid #2563EB;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

.toast-item.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-item.hiding {
    transform: translateX(110%);
    opacity: 0;
}

.toast-success {
    border-left-color: #2F6B4F;
}

.toast-error {
    border-left-color: #9B2C2C;
}

.toast-warning {
    border-left-color: #8A6A1F;
}

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

.toast-icon {
    font-size: 1.2rem;
    line-height: 1;
    margin-top: 2px;
}

.toast-success .toast-icon {
    color: #2F6B4F;
}

.toast-error .toast-icon {
    color: #9B2C2C;
}

.toast-warning .toast-icon {
    color: #8A6A1F;
}

.toast-info .toast-icon {
    color: #2563EB;
}

.toast-body {
    flex: 1;
    min-width: 0;
}

.toast-text {
    margin: 0;
    color: #1F2430;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.45;
    word-break: break-word;
}

.toast-close {
    border: none;
    background: transparent;
    color: #8A94A3;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    min-width: 28px;
    min-height: 28px;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
}

.toast-close:hover {
    color: #1F2430;
    background: #F3F5F8;
}

.toast-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 21, 40, 0.58);
    backdrop-filter: blur(4px);
    z-index: 100001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.toast-confirm-overlay.active {
    display: flex;
}

.toast-confirm-box {
    background: #fff;
    border-radius: 14px;
    padding: 28px 24px;
    width: min(420px, 100%);
    box-shadow: 0 20px 50px rgba(7, 21, 40, 0.24);
    border: 1px solid rgba(138, 148, 163, 0.3);
    animation: toastPop 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes toastPop {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.toast-confirm-msg {
    margin: 0 0 22px;
    color: #1F2430;
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
}

.toast-confirm-actions {
    display: flex;
    gap: 10px;
}

.toast-confirm-cancel,
.toast-confirm-ok {
    flex: 1;
    min-height: 48px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.toast-confirm-cancel {
    background: #F3F5F8;
    color: #2C3340;
    border: 1px solid rgba(138, 148, 163, 0.35);
}

.toast-confirm-ok {
    background: linear-gradient(135deg, #1D4ED8 0%, #2563EB 55%, #F59E0B 160%);
    color: #fff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.toast-confirm-cancel:hover,
.toast-confirm-ok:hover {
    transform: translateY(-1px);
}

body.toast-lock {
    overflow: hidden;
}

@media (max-width: 640px) {
    .toast-container {
        top: auto;
        bottom: 18px;
        right: 12px;
        left: 12px;
        width: auto;
    }

    .toast-item {
        transform: translateY(120%);
    }

    .toast-item.show {
        transform: translateY(0);
    }

    .toast-item.hiding {
        transform: translateY(110%);
    }
}
