/* Стили для страницы авторизации */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem;
}

.auth-card {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.auth-header {
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.logo h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: -0.025em;
}

.subtitle {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 400;
}

/* Табы */
.auth-tabs {
    display: flex;
    background-color: #f3f4f6;
    border-radius: 0.5rem;
    padding: 0.25rem;
    margin-bottom: 2rem;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: #374151;
}

.tab-btn.active {
    background-color: white;
    color: #6366f1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Формы */
.auth-form {
    display: none;
    text-align: left;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #374151;
    font-weight: 500;
    font-size: 0.875rem;
}

.form-group input {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background-color: #f9fafb;
}

.form-group input:focus {
    outline: none;
    border-color: #6366f1;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group input:invalid {
    border-color: #ef4444;
}

.form-group input:valid {
    border-color: #10b981;
}

.auth-form .btn {
    width: 100%;
    margin-top: 0.5rem;
}

.auth-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.auth-footer p {
    color: #9ca3af;
    font-size: 0.75rem;
}

/* Анимации */
.auth-card {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Состояния загрузки */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Ошибки валидации */
.form-group.error input {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.form-group.error .error-message {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Успешная валидация */
.form-group.success input {
    border-color: #10b981;
    background-color: #f0fdf4;
}

/* Адаптивность */
@media (max-width: 480px) {
    .auth-card {
        padding: 2rem 1.5rem;
        margin: 0.5rem;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 0.8rem;
    }
    
    .form-group input {
        padding: 0.75rem;
    }
}

/* Темная тема (опционально) */
@media (prefers-color-scheme: dark) {
    .auth-card {
        background-color: #1f2937;
        color: #f9fafb;
    }
    
    .logo h1 {
        color: #f9fafb;
    }
    
    .subtitle {
        color: #9ca3af;
    }
    
    .form-group label {
        color: #d1d5db;
    }
    
    .form-group input {
        background-color: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .form-group input:focus {
        background-color: #4b5563;
    }
    
    .auth-tabs {
        background-color: #374151;
    }
    
    .tab-btn {
        color: #9ca3af;
    }
    
    .tab-btn:hover {
        color: #d1d5db;
    }
    
    .tab-btn.active {
        background-color: #6366f1;
        color: white;
    }
} 