/* ============================================
   СТРАНИЦА ВХОДА - СОВРЕМЕННЫЙ ДИЗАЙН
   ============================================ */

:root {
    --color-primary: #4169E1;
    --color-success: #28a745;
    --color-secondary: #6c757d;
}

/* Основной контейнер */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

/* Анимированный фон */
.login-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.login-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: white;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: white;
    top: 60%;
    right: 15%;
    animation-delay: 5s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: white;
    bottom: 10%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-30px) scale(1.1);
    }
}

/* Контейнер входа */
.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    padding: 2rem;
}

/* Карточка входа */
.login-card {
    background: white;
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.6s ease;
}

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

/* Заголовок */
.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo {
    margin-bottom: 1.5rem;
}

.login-logo img {
    height: 60px;
    width: auto;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.login-title i {
    font-size: 1.5rem;
    color: var(--color-primary);
}

.login-subtitle {
    font-size: 1rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* Шаги */
.login-step {
    animation: fadeIn 0.4s ease;
}

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

/* Форма */
.form-group-modern {
    margin-bottom: 1.75rem;
}

.form-label-modern {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.form-label-modern i {
    font-size: 1rem;
    color: var(--color-primary);
}

.form-input-modern {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-input-modern:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(65, 105, 225, 0.12);
    background: white;
}

.form-input-modern::placeholder {
    color: #999;
    font-weight: 400;
}

.form-input-code {
    text-align: center;
    font-size: 1.75rem;
    letter-spacing: 0.5rem;
    font-weight: 700;
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #666;
}

/* Кнопки */
.btn-login-primary,
.btn-login-success,
.btn-login-secondary {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0.75rem;
}

.btn-login-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, #5a7fd8 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(65, 105, 225, 0.3);
}

.btn-login-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(65, 105, 225, 0.4);
}

.btn-login-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-login-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-login-secondary {
    background: white;
    color: #666;
    border: 2px solid #e0e0e0;
    box-shadow: none;
}

.btn-login-secondary:hover {
    background: #f8f9fa;
    border-color: #666;
    color: #333;
}

.btn-login-primary:disabled,
.btn-login-success:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-login-primary i,
.btn-login-success i,
.btn-login-secondary i {
    font-size: 1.2rem;
}

/* Футер */
.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(0, 0, 0, 0.05);
}

.login-footer-text {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
}

.login-link {
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.login-link:hover {
    color: #5a7fd8;
    text-decoration: underline;
}

/* Алерты */
#alert-container {
    margin-bottom: 1.5rem;
}

#alert-container .alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.25rem;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.12) 0%, rgba(40, 167, 69, 0.08) 100%);
    color: #28a745;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.12) 0%, rgba(220, 53, 69, 0.08) 100%);
    color: #dc3545;
    border-left: 4px solid #dc3545;
}

/* Адаптивность */
@media (max-width: 768px) {
    .login-container {
        padding: 1.5rem;
    }
    
    .login-card {
        padding: 2.5rem 2rem;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .login-subtitle {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 1rem;
    }
    
    .login-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }
    
    .login-title {
        font-size: 1.35rem;
    }
    
    .login-logo img {
        height: 50px;
    }
    
    .form-input-code {
        font-size: 1.5rem;
        letter-spacing: 0.4rem;
    }
}
