/* ===== Страница авторизации ===== */
.main.auth-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}
.main.auth-page .top-bar { margin-bottom: 16px; }
.auth-fullpage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex: 1;
    min-height: 0;
    gap: 0;
    background: var(--bg-main);
}
.auth-welcome,
.auth-right-panel {
    min-height: 0;
    overflow-y: auto;
}

/* Левая часть — приветствие */
.auth-welcome {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: linear-gradient(145deg, rgba(20, 20, 30, 0.3), var(--bg-main));
    border-right: 1px solid var(--border-light);
    transition: all 0.3s;
}
.auth-welcome-content {
    max-width: 380px;
    width: 100%;
    text-align: center;
}
.auth-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    background: linear-gradient(145deg, #D63384, #E91E63);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    box-shadow: 0 16px 32px rgba(214, 51, 132, 0.3);
    animation: float 4s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.auth-welcome h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.auth-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}
.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
}
.social-btn i { font-size: 22px; }
.social-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(0,0,0,0.12); }
.social-btn:active { transform: translateY(0); }
.social-btn.yandex:hover { background: #fc3f1d; border-color: #fc3f1d; color: white; }
.social-btn.google:hover { background: #4285F4; border-color: #4285F4; color: white; }
.social-btn.telegram:hover { background: #27A7E7; border-color: #27A7E7; color: white; }

.auth-separator {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin: 14px 0;
}
.auth-separator::before,
.auth-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-light);
}
.auth-separator span { padding: 0 16px; }

.email-trigger-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    background: transparent;
    border: 1.5px solid var(--accent);
    color: var(--accent);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 16px;
}
.email-trigger-btn:hover { background: rgba(214, 51, 132, 0.1); }

.auth-footer-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}
.auth-footer-text a { color: var(--accent); text-decoration: none; }
.auth-footer-text a:hover { text-decoration: underline; }

/* Правая часть */
.auth-right-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 28px;
    background: var(--bg-sidebar);
}

/* Призыв к регистрации */
.auth-cta { max-width: 400px; width: 100%; text-align: center; }
.cta-content { padding: 12px; }
.cta-icon {
    width: 56px; height: 56px;
    margin: 0 auto 14px;
    background: rgba(214, 51, 132, 0.1);
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    color: var(--accent);
    border: 1px solid rgba(214, 51, 132, 0.2);
}
.cta-content h2 { font-size: 22px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.cta-content p { font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.4; }

/* Пункты списка — теперь каждый на новой строке */
.cta-features {
    list-style: none;
    text-align: left;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.cta-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    color: var(--text-primary);
    font-size: 14px;
    border-bottom: 1px solid rgba(214, 51, 132, 0.06);
}
.cta-features li:last-child {
    border-bottom: none;
}
.cta-features li i { color: var(--accent); font-size: 16px; }

.cta-register-btn {
    width: 100%;
    background: linear-gradient(135deg, #D63384, #E91E63);
    border: none;
    color: white;
    padding: 14px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 8px 20px rgba(214, 51, 132, 0.3);
}
.cta-register-btn:hover { background: linear-gradient(135deg, #C12A74, #D63384); }

/* Форма */
.auth-form-panel { max-width: 420px; width: 100%; }
.auth-form-panel.hidden,
.auth-cta.hidden { display: none; }
.auth-form-container { width: 100%; }

.back-to-socials {
    display: inline-flex; align-items: center; gap: 8px;
    background: none; border: none;
    color: var(--text-secondary);
    font-size: 14px; cursor: pointer; padding: 4px 0; margin-bottom: 8px;
    transition: 0.2s;
}
.back-to-socials:hover { color: var(--accent); }

.auth-tabs {
    display: flex; gap: 8px; margin-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}
.auth-tab {
    background: none; border: none;
    padding: 10px 22px; font-size: 16px; font-weight: 500;
    color: var(--text-secondary); cursor: pointer;
    position: relative; transition: 0.2s;
}
.auth-tab.active { color: var(--accent); }
.auth-tab.active::after {
    content: '';
    position: absolute; bottom: -1px; left: 0; right: 0; height: 3px;
    background: var(--accent); border-radius: 3px 3px 0 0;
}

.auth-message {
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    text-align: center;
}
.auth-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.auth-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.auth-message.hidden { display: none; }

.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-form.hidden { display: none; }

.form-group label {
    display: block; font-size: 13px; font-weight: 500;
    color: var(--text-primary); margin-bottom: 4px;
}
.field {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 14px;
    padding: 10px 16px;
    color: var(--text-primary);
    font-size: 15px; outline: none;
    transition: border-color 0.2s;
}
.field:focus { border-color: var(--accent); }

.form-options {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 14px;
}
.checkbox-label {
    display: flex; align-items: center; gap: 8px;
    cursor: pointer; color: var(--text-primary);
}
.checkbox-label input { accent-color: var(--accent); width: 18px; height: 18px; }
.checkbox-label a { color: var(--accent); text-decoration: none; }
.checkbox-label a:hover { text-decoration: underline; }
.text-link {
    background: none; border: none; color: var(--accent);
    font-size: 14px; cursor: pointer; text-decoration: none;
}
.text-link:hover { text-decoration: underline; }

.auth-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #D63384, #E91E63);
    border: none;
    color: white;
    padding: 13px 20px;
    border-radius: 50px;
    font-weight: 700; font-size: 16px;
    cursor: pointer; transition: 0.2s;
    box-shadow: 0 8px 20px rgba(214, 51, 132, 0.3);
    margin-top: 4px;
}
.auth-submit-btn:hover { background: linear-gradient(135deg, #C12A74, #D63384); }

.reset-hint { color: var(--text-secondary); font-size: 14px; margin: 8px 0; }
.back-to-login { display: block; text-align: center; margin-top: 16px; }

/* Адаптив */
@media (max-width: 1100px) {
    .auth-fullpage { grid-template-columns: 1fr; overflow-y: auto; }
    .auth-welcome {
        border-right: none;
        border-bottom: 1px solid var(--border-light);
        flex-shrink: 0;
    }
    .auth-welcome.hidden { display: none; }
    .auth-right-panel { padding: 20px; flex-shrink: 0; }
}
/* телефоны/планшеты: страница прокручивается целиком, ничего не прячется под нижним меню */
@media (max-width: 1100px) {
    .main.auth-page { height: auto; min-height: 100vh; overflow: visible; padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
    .main.auth-page .auth-fullpage, .main.auth-page .auth-welcome, .main.auth-page .auth-right-panel { overflow: visible; min-height: auto; }
}
@media (max-width: 1100px) {
    .main.auth-page .auth-fullpage { grid-template-columns: minmax(0, 1fr); }
    .main.auth-page .auth-welcome, .main.auth-page .auth-right-panel { min-width: 0; max-width: 100%; box-sizing: border-box; }
}
.auth-footer-text a { display: inline-block; padding: 6px 0; }

/* 01.10: окно ожидания входа через Telegram */
.tgwait { position: fixed; inset: 0; z-index: 10050; background: rgba(10, 8, 14, .72); display: flex; align-items: center; justify-content: center; padding: 16px; }
.tgwait-card { width: 100%; max-width: 380px; background: var(--card-bg, #1e1b22); color: var(--text-primary, #fff); border-radius: 24px; padding: 26px 22px; text-align: center;
    border: 1px solid var(--border-light, rgba(255,255,255,.08)); box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.tgwait-ico { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, #37aee2, #1e96c8); }
.tgwait-ico svg { width: 34px; height: 34px; }
.tgwait-card h3 { margin: 0 0 8px; font-size: 1.25rem; font-weight: 800; }
.tgwait-card p { margin: 0 0 16px; color: var(--text-secondary, #aaa); line-height: 1.5; }
.tgwait-spin { width: 34px; height: 34px; margin: 0 auto 18px; border-radius: 50%; border: 3px solid rgba(55, 174, 226, .25); border-top-color: #37aee2; animation: tgspin 1s linear infinite; }
@keyframes tgspin { to { transform: rotate(360deg); } }
.tgwait-btn { display: block; padding: 13px; border-radius: 14px; font-weight: 800; color: #fff !important; text-decoration: none; background: linear-gradient(135deg, #37aee2, #1e96c8); margin-bottom: 8px; }
.tgwait-cancel { background: none; border: 0; color: var(--text-secondary, #aaa); font-family: inherit; font-size: .95rem; cursor: pointer; padding: 8px; }

/* 01.10: подарки новичку и анонимность на странице входа */
.auth-perks { list-style: none; padding: 0; margin: -6px auto 18px; display: grid; gap: 8px; max-width: 320px; text-align: left; }
.auth-perks li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-primary); }
.auth-perks i { width: 28px; height: 28px; flex: 0 0 28px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 9px; font-size: 13px; color: #fff; background: linear-gradient(135deg, #e91e63, #9c27b0); }
.auth-private { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12.5px; line-height: 1.4;
    color: var(--text-secondary); margin: 12px auto 0; max-width: 340px; text-align: left; }
.auth-private i { color: var(--accent, #D63384); font-size: 15px; flex: 0 0 auto; }

/* 01.10: на ПК с невысоким экраном (1366x768) содержимое выше панели — центрирование через auto-поля:
   при нехватке места верх не срезается, панель прокручивается */
.auth-welcome { align-items: flex-start; }
.auth-welcome-content { margin: auto 0; }
@media (min-width: 1101px) and (max-height: 860px) {
    .auth-welcome { padding: 18px 28px; }
    .auth-icon { width: 48px; height: 48px; font-size: 22px; margin-bottom: 10px; border-radius: 16px; }
    .auth-welcome h1 { font-size: 22px; }
    .auth-subtitle { margin-bottom: 14px; }
    .auth-perks { margin-bottom: 14px; gap: 6px; }
}
/* светлая тема: вместо серой заливки — лёгкий розовый тон; тёмная как была */
html:not(.dark-theme) .auth-welcome { background: linear-gradient(145deg, rgba(214, 51, 132, .07), var(--bg-main)); }
.email-domain-warn { margin-top: 8px; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.4; text-align: left;
    color: var(--text-primary); background: rgba(245, 196, 81, .14); border: 1px solid rgba(245, 196, 81, .45); }
.email-domain-warn i { color: #e0901e; margin-right: 4px; }
.edw-btns { display: flex; gap: 8px; margin-top: 8px; }
.edw-btns button { flex: 1; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--border-light, rgba(255,255,255,.15)); cursor: pointer;
    background: var(--card-bg, rgba(255,255,255,.06)); color: var(--text-primary); font: inherit; font-weight: 700; font-size: 13px; }
