/* файл: auth.css */

/* auth.css – единое модальное окно авторизации */
.auth-modal .modal-content {
    width: 500px;
    max-width: 90vw;
    background: white;
    border-radius: var(--radius-lg);
    /* box-shadow: 0 25px 50px -12px rgba(255, 255, 255, 0.25); */
    overflow: hidden;
    /* animation: slideIn 0.2s ease-out; */
}

.auth-modal .modal-header {
    display: flex;
    justify-content: flex-end;
    padding: 1.5rem 1.5rem 0 1.5rem;
    border-bottom: none;
}

.auth-modal .modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.auth-modal .btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
    transition: color 0.2s;
}

.auth-modal .btn-close:hover {
    color: #1e293b;
}

.auth-modal .modal-form {
    padding: 1.5rem;
}

/* Вкладки */
.auth-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    background: #f7fafc;
    padding: 0.5rem;
    border-radius: var(--radius-lg);
}

.auth-tab {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-tab.active {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #0066cc;
}

/* Панели (вкладки и восстановление) */
.auth-panel {
    display: none;
    animation: fadeIn 0.2s ease;
}

.auth-panel.active {
    display: block;
}

.auth-panel .form-group {
    margin-bottom: 1.25rem;
}

/* Логотип и приветствие */
.auth-logo {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-logo .logo-title {
    font-size: 2rem;
    text-transform: uppercase;
    font-weight: 800;
    color: #1a62ff;
    letter-spacing: 0.05em;
}

.auth-logo .tagline {
    font-size: 0.8rem;
    color: #64748b;
}

.auth-welcome {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-welcome h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.auth-welcome p {
    font-size: 0.85rem;
    color: #64748b;
}

/* Формы */
.auth-form .form-group {
    margin-bottom: 1.25rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

.auth-form input {
    width: 100%;
    /* padding: 0.75rem 1rem; */
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    transition: all 0.2s;
    /* background: #f8fafc; */
}

.auth-form input:focus {
    outline: none;
    border-color: #0066cc;
    /* background: white; */
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.auth-form input.error {
    border-color: #ef4444;
}

.auth-form .error-message {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: none;
}

.auth-form .success-message {
    color: #10b981;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: none;
    text-align: center;
}

.auth-form .submit-btn {
    width: 100%;
    padding: 0.75rem;
    /* background: #0066cc; */
    background: linear-gradient(135deg, var(--primary), #587fff);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;

    /* Равномерная чёрная тень */
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.2), 0 0 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1),
        box-shadow 0.25s ease,
        background 0.2s ease;
    will-change: transform;
    backface-visibility: hidden;
}

.auth-form .submit-btn:hover {
    transform: scale(1.01);
    background: linear-gradient(135deg, var(--primary-dark), #3b6eff);
    /* Усиленная чёрная тень при наведении */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.25), 0 0 8px rgba(0, 0, 0, 0.1);
}

.auth-form .submit-btn:disabled {
    transform: scale(1.02);
    transition: transform 0.05s ease;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.15);
}

.auth-links {
    text-align: center;
    margin-top: 1rem;
}

.auth-links a {
    color: #0066cc;
    text-decoration: none;
    font-size: 0.85rem;
    cursor: pointer;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Дополнительные элементы для регистрации (шаги, капча) */
.step-indicator {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: all 0.2s;
}

.step-dot.active {
    background: #0066cc;
    width: 24px;
    border-radius: var(--radius-lg);
}

.form-step {
    transition: opacity 0.2s;
}

.verification-section {
    background: #eff6ff;
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1rem;
}

.password-requirements {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 0.5rem;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.requirement.met {
    color: #10b981;
}

.captcha-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f1f5f9;
    border-radius: var(--radius-lg);
}

.captcha-code {
    font-family: monospace;
    font-size: 1.25rem;
    font-weight: bold;
    letter-spacing: 3px;
    padding: 0.5rem 1rem;
    background: #e2e8f0;
    border-radius: var(--radius-lg);
    user-select: none;
}

.refresh-captcha {
    background: none;
    border: none;
    color: #0066cc;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.hint-message {
    font-size: 0.75rem;
    padding: 0.25rem 0;
    transition: all 0.2s;
    display: none;
    margin-top: 0.25rem;
    border-radius: 20px;
}

.hint-message.success-message {
    color: #10b981;
    display: block;
}

.hint-message.error-message {
    color: #ef4444;
    display: block;
}

.hint-message.visible {
    display: block;
}

.auth-language-switcher .lang-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-top: 1rem;
    padding: 0.25rem 0.75rem;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.auth-language-switcher .lang-btn:hover {
    background: var(--background-alt);
}

.auth-language-switcher .lang-btn.active {
    background: var(--primary);
    border-color: var(--primary);
}

.lang-btn.active {
    /* background: #709eff !important; */
    border-color: var(--primary) !important;
}

.logo-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.7rem;
    font-weight: 800;
    line-height: 1;
    color: white;
    background-color: #1a62ff;
    padding: 0.2rem 0.7rem;
    border-radius: var(--radius);
}

.legal-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.legal-links a {
    color: #718096;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

.legal-links a:hover {
    color: #0066cc;
}

/* Анимации */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Адаптивность */
@media (max-width: 560px) {
    .auth-modal .modal-content {
        width: 95vw;
        margin: 0.5rem;
    }

    .auth-tabs {
        gap: 1rem;
    }
}