/* ============================================
   Nexora EDS v2 — Auth Page (Midnight Aurora)
   Split-screen premium layout
   ============================================ */

.auth-page {
    display: flex;
    min-height: 100vh;
    overflow: hidden;
}

/* ══════════════════════════════════════════════
   ЛЕВАЯ ПАНЕЛЬ — БРЕНД
   ══════════════════════════════════════════════ */
.auth-brand {
    position: relative;
    width: 45%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-3xl);
    overflow: hidden;
    /* Фоновый цвет, поверх которого будут aurora-элементы */
    background-color: #050510;
}

/* Aurora gradient blobs */
.auth-brand::before,
.auth-brand::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: aurora 15s ease-in-out infinite;
}

.auth-brand::before {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #7C3AED 0%, transparent 70%);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.auth-brand::after {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #06B6D4 0%, transparent 70%);
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
}

/* Третий blob через дополнительный элемент */
.aurora-blob {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, #2563EB 0%, transparent 70%);
    filter: blur(80px);
    opacity: 0.4;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: aurora 18s ease-in-out infinite;
    animation-delay: -8s;
}

/* Геометрический паттерн */
.auth-brand-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.02) 1px, transparent 1px),
        radial-gradient(circle at 60% 70%, rgba(255,255,255,0.02) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px, 80px 80px, 40px 40px;
}

/* Floating geometric shapes */
.auth-shape {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    animation: float 8s ease-in-out infinite;
}

.auth-shape--1 {
    width: 60px;
    height: 60px;
    top: 15%;
    right: 20%;
    animation-delay: 0s;
    transform: rotate(15deg);
}

.auth-shape--2 {
    width: 40px;
    height: 40px;
    bottom: 25%;
    left: 15%;
    animation-delay: -3s;
    transform: rotate(-10deg);
    border-radius: 50%;
}

.auth-shape--3 {
    width: 80px;
    height: 80px;
    top: 60%;
    right: 10%;
    animation-delay: -6s;
    transform: rotate(45deg);
    border-radius: var(--radius-2xl);
}

/* Контент бренда */
.auth-brand-content {
    position: relative;
    z-index: 2;
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

.auth-brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-xl);
}

.auth-brand-logo .logo-img {
    width: 240px;
    height: auto;
    display: block;
    filter: drop-shadow(0 8px 32px rgba(106, 168, 255, 0.25));
}

/* \u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u043e \u043f\u043e \u0442\u0435\u043c\u0435 */
.auth-brand-logo .logo-dark { display: none; }
.auth-brand-logo .logo-light { display: block; }
[data-theme="dark"] .auth-brand-logo .logo-light { display: none; }
[data-theme="dark"] .auth-brand-logo .logo-dark { display: block; }

.auth-brand-subtitle {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    max-width: 320px;
    line-height: 1.6;
}

/* Фичи внизу бренда */
.auth-brand-features {
    position: absolute;
    bottom: var(--spacing-2xl);
    left: var(--spacing-2xl);
    right: var(--spacing-2xl);
    z-index: 2;
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: rgba(255, 255, 255, 0.4);
    font-size: var(--text-xs);
    font-weight: 500;
}

.auth-feature svg {
    width: 16px;
    height: 16px;
    color: rgba(124, 58, 237, 0.8);
}

/* ══════════════════════════════════════════════
   ПРАВАЯ ПАНЕЛЬ — ФОРМА
   ══════════════════════════════════════════════ */
.auth-form-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl);
    background-color: var(--bg-body);
    position: relative;
}

/* Тема-переключатель */
.auth-theme-toggle {
    position: absolute;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    z-index: 10;
}

/* Контейнер формы */
.auth-container {
    width: 100%;
    max-width: 380px;
    animation: fadeInUp 0.6s ease-out;
    animation-delay: 0.15s;
    animation-fill-mode: both;
}

/* Заголовок формы */
.auth-header {
    margin-bottom: var(--spacing-xl);
}

.auth-welcome {
    font-size: var(--text-sm);
    color: var(--accent-primary);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: var(--spacing-sm);
}

.auth-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    letter-spacing: -0.02em;
}

.auth-subtitle {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

/* Форма */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Опции */
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-forgot {
    font-size: var(--text-sm);
    color: var(--accent-primary);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.auth-forgot:hover {
    color: var(--accent-hover);
}

/* Кнопка входа */
.auth-submit {
    margin-top: var(--spacing-xs);
}

/* Алерт ошибки */
.auth-alert {
    display: none;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 12px var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    background-color: var(--color-error-soft);
    color: var(--color-error);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.auth-alert.visible {
    display: flex;
}

.auth-alert svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Футер */
.auth-footer {
    margin-top: var(--spacing-2xl);
    text-align: center;
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

/* ══════════════════════════════════════════════
   АДАПТИВ
   ══════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .auth-brand {
        width: 40%;
        padding: var(--spacing-2xl);
    }

    .auth-brand-features {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-sm);
    }
}

@media (max-width: 768px) {
    .auth-page {
        flex-direction: column;
    }

    .auth-brand {
        width: 100%;
        min-height: auto;
        padding: var(--spacing-2xl) var(--spacing-lg);
    }

    .auth-brand-content {
        display: flex;
        align-items: center;
        gap: var(--spacing-md);
    }

    .auth-brand-logo {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .auth-brand-logo .logo-img {
        width: 160px;
    }

    .auth-brand-subtitle,
    .auth-brand-features,
    .auth-shape,
    .auth-brand-pattern {
        display: none;
    }

    .auth-brand::before,
    .auth-brand::after {
        width: 200px;
        height: 200px;
        filter: blur(50px);
    }

    .auth-form-side {
        padding: var(--spacing-lg);
        justify-content: flex-start;
        padding-top: var(--spacing-xl);
    }

    .auth-theme-toggle {
        top: var(--spacing-md);
        right: var(--spacing-md);
    }
}

@media (max-width: 400px) {
    .auth-container {
        max-width: 100%;
    }

    .auth-form-side {
        padding: var(--spacing-md);
    }
}
