/* ========================================
   МОДАЛЬНОЕ ОКНО АВТОРИЗАЦИИ
   ======================================== */

.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.auth-modal-container {
    position: relative;
    width: 90%;
    max-width: 450px;
    background: white;
    border-radius: 28px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease;
}

.auth-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.auth-modal-close:hover {
    background: #fee2e2;
    color: #ef4444;
    transform: rotate(90deg);
}

.auth-modal-close i {
    font-size: 16px;
}

/* Вкладки */
.auth-tabs {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    border-bottom: 2px solid #e2e8f0;
}

.auth-tab {
    background: none;
    border: none;
    padding: 12px 0;
    font-size: 18px;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.auth-tab.active {
    color: #f97316;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #f97316;
    border-radius: 2px;
}

/* Форма */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    width: 100%;
}

.input-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon i {
    position: absolute;
    left: 16px;
    color: #94a3b8;
    font-size: 18px;
}

.input-icon input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    font-size: 15px;
    transition: all 0.2s;
    background: #f8fafc;
}

.input-icon input:focus {
    outline: none;
    border-color: #f97316;
    background: white;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.input-icon input.error {
    border-color: #dc2626 !important;
}

/* Ошибки */
.error-message {
    color: #dc2626;
    font-size: 12px;
    margin-top: 6px;
    display: none;
}

/* Чекбокс и опции */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox input {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #f97316;
}

.checkbox span {
    color: #64748b;
}

.checkbox a {
    color: #f97316;
    text-decoration: none;
}

.checkbox a:hover {
    text-decoration: underline;
}

.forgot-link {
    color: #f97316;
    text-decoration: none;
    font-size: 13px;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Кнопка отправки */
.auth-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(249, 115, 22, 0.3);
}

.auth-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Разделитель */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 24px 0 20px;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}

.auth-divider span {
    position: relative;
    background: white;
    padding: 0 16px;
    color: #94a3b8;
    font-size: 13px;
}

/* Социальные кнопки */
.social-login {
    display: flex;
    gap: 12px;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.social-btn.google {
    color: #ea4335;
}

.social-btn.google:hover {
    background: #fef2f2;
    border-color: #ea4335;
}

.social-btn.github {
    color: #333;
}

.social-btn.github:hover {
    background: #f1f5f9;
    border-color: #333;
}

.social-btn i {
    font-size: 18px;
}

/* Уведомления */
.notification {
    position: fixed;
    top: 90px;
    right: 20px;
    padding: 14px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    font-weight: 500;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #059669;
    border-left: 4px solid #059669;
}

.notification-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
    border-left: 4px solid #dc2626;
}

.notification i {
    font-size: 20px;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность */
@media (max-width: 640px) {
    .auth-modal-container {
        padding: 24px;
        border-radius: 24px;
    }

    .auth-tab {
        font-size: 16px;
    }

    .input-icon input {
        padding: 12px 16px 12px 44px;
    }

    .social-btn {
        padding: 10px;
        font-size: 13px;
    }
}
