/* Toast уведомления */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 350px;
}

.toast {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #007bff;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

.toast.success {
    border-left-color: #28a745;
}

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

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

.toast.info {
    border-left-color: #17a2b8;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin: 0 0 4px 0;
    font-size: 14px;
    color: var(--dark);
}

.toast-message {
    margin: 0;
    font-size: 13px;
    color: var(--gray);
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--gray);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--dark);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    width: 100%;
    transform-origin: left;
}

.toast-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: currentColor;
    width: 100%;
    transform: scaleX(0);
    transform-origin: left;
    animation: toast-progress 5s linear forwards;
}

.toast.success .toast-progress::after {
    background: #28a745;
}

.toast.error .toast-progress::after {
    background: #dc3545;
}

.toast.warning .toast-progress::after {
    background: #ffc107;
}

.toast.info .toast-progress::after {
    background: #17a2b8;
}

@keyframes toast-progress {
    to {
        transform: scaleX(0);
    }
}

/* Темная тема */
.dark-theme .toast {
    background: var(--card-bg);
    color: var(--text-light);
}

.dark-theme .toast-title {
    color: var(--text-light);
}

.dark-theme .toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

/* Адаптивность */
@media (max-width: 768px) {
    .toast-container {
        left: 20px;
        right: 20px;
        max-width: none;
    }

    .toast {
        transform: translateY(-100px);
    }

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