* { margin: 0; padding: 0; box-sizing: border-box; }

body.auth-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
    background: #fbfaf7;
    color: #0a0a0a;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

.auth-header {
    padding: 20px 40px;
    border-bottom: 1px solid rgba(10, 10, 10, 0.06);
}

.auth-logo {
    font-size: 22px;
    font-weight: 900;
    color: #0a0a0a;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-container { width: 100%; max-width: 440px; }

.auth-title {
    font-size: 42px;
    font-weight: 900;
    font-style: italic;
    text-align: center;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.auth-subtitle {
    text-align: center;
    font-size: 15px;
    color: #6b6b6b;
    margin-bottom: 32px;
    line-height: 1.5;
}

.auth-socials {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 238px;
    max-width: 100%;
    margin: 0 auto;
}

.auth-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 238px;
    height: 40px;
    padding: 0 12px;
    border: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    color: #fff;
}

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

.auth-social-telegram { background: #2AABEE; }
.auth-social-telegram:hover { background: #1e96d3; transform: translateY(-1px); }

.auth-social-vk { background: #0077FF; }
.auth-social-vk:hover { background: #0066dd; transform: translateY(-1px); }

.auth-social-yandex { background: #0a0a0a; }
.auth-social-yandex:hover { background: #2a2a2a; transform: translateY(-1px); }

.auth-social-google {
    background: #fff;
    color: #0a0a0a;
    border: 2px solid #c9ff4a;
}
.auth-social-google:hover { border-color: #a8e030; transform: translateY(-1px); }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: #9a9a9a;
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(10, 10, 10, 0.08);
}

.auth-form { display: flex; flex-direction: column; gap: 12px; }

.auth-field { position: relative; }

.auth-input {
    width: 100%;
    height: 54px;
    padding: 0 20px;
    border: 1px solid rgba(10, 10, 10, 0.12);
    border-radius: 100px;
    background: #fff;
    color: #0a0a0a;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.15s;
}

.auth-input:focus {
    outline: none;
    border-color: #0a0a0a;
    box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.06);
}

.auth-input::placeholder { color: #b5b5b5; }

.auth-submit {
    width: 100%;
    height: 54px;
    padding: 0 24px;
    border: none;
    border-radius: 100px;
    background: #0a0a0a;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    margin-top: 4px;
}

.auth-submit:hover { background: #2a2a2a; transform: translateY(-1px); }
.auth-submit:disabled { opacity: 0.5; cursor: wait; }

.auth-error {
    text-align: center;
    color: #e04b4b;
    font-size: 13px;
    min-height: 18px;
    margin-top: 4px;
}

.auth-switch {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #6b6b6b;
}

.auth-switch a { color: #0a0a0a; font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

.auth-terms {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: #9a9a9a;
    line-height: 1.6;
}

.auth-terms a { color: #6b6b6b; text-decoration: underline; }
.auth-terms a:hover { color: #0a0a0a; }

@media (max-width: 500px) {
    .auth-title { font-size: 32px; }
    .auth-header { padding: 16px 20px; }
    .auth-social, .auth-input, .auth-submit { height: 50px; font-size: 14px; }
}

/* ============ ГЛАЗ ДЛЯ ПАРОЛЯ ============ */
.auth-field-password { position: relative; }

.auth-field-password .auth-input {
    padding-right: 52px;
}

.auth-eye {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #b5b5b5;
    transition: color 0.15s;
    border-radius: 50%;
}

.auth-eye:hover { color: #0a0a0a; }
.auth-eye:focus { outline: none; color: #0a0a0a; }

.auth-eye-icon {
    width: 20px;
    height: 20px;
    display: block;
}

.auth-eye-closed { display: none; }
.auth-eye.is-visible .auth-eye-open { display: none; }
.auth-eye.is-visible .auth-eye-closed { display: block; }

/* ============ TELEGRAM WIDGET (старый) ============ */
.auth-social-telegram-widget {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 238px !important;
    min-height: 40px !important;
    height: auto !important;
    margin: 0 auto;
    box-sizing: border-box;
}

.auth-social-telegram-widget iframe {
    width: 238px !important;
    height: 40px !important;
    border: none !important;
    border-radius: 12px !important;
}

/* Подсказка о email */
.auth-email-hint {
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(201, 255, 74, 0.15);
    border: 1px solid rgba(201, 255, 74, 0.4);
    border-radius: 10px;
    font-size: 13px;
    color: #4a4a4a;
    line-height: 1.5;
}

.auth-email-hint a {
    color: #0a0a0a;
    font-weight: 700;
    text-decoration: underline;
}

/* === Баннер технических работ === */
.maintenance-auth-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #fff8e0, #ffeaa7);
    border-bottom: 2px solid #ffb800;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    box-shadow: 0 2px 12px rgba(255, 184, 0, 0.3);
    animation: mntBannerSlide 0.4s ease;
}
@keyframes mntBannerSlide {
    from { transform: translateY(-100%); }
    to   { transform: translateY(0); }
}
.maintenance-auth-banner-icon { font-size: 22px; line-height: 1; }
.maintenance-auth-banner-text {
    display: flex; flex-direction: column; gap: 2px;
    font-size: 13px; color: #5a4500; line-height: 1.3;
}
.maintenance-auth-banner-text strong {
    font-weight: 800; font-size: 14px; color: #3e2c00;
}
/* Сдвигаем форму вниз, если баннер есть */
.maintenance-auth-banner ~ .auth-header,
.maintenance-auth-banner ~ .auth-main {
    margin-top: 50px;
}
@media (max-width: 640px) {
    .maintenance-auth-banner { padding: 10px 14px; gap: 10px; }
    .maintenance-auth-banner-text { font-size: 12px; }
    .maintenance-auth-banner-text strong { font-size: 13px; }
}

/* ============================================================
   TELEGRAM WIDGET — предупреждение без VPN (2026-10-07)
   ============================================================ */

.auth-telegram-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    font-size: 14px;
    color: #6b6b6b;
    font-weight: 500;
}

.auth-telegram-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(107, 107, 107, 0.2);
    border-top-color: #6b6b6b;
    border-radius: 50%;
    animation: auth-telegram-spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes auth-telegram-spin {
    to { transform: rotate(360deg); }
}

.auth-telegram-fallback {
    margin-bottom: 8px;
}

.auth-telegram-warning {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 12px;
    padding: 12px 14px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.auth-telegram-fallback {
    width: 100%;
    box-sizing: border-box;
}

.auth-telegram-warning-title {
    font-size: 14px;
    font-weight: 800;
    color: #78350f;
    margin-bottom: 6px;
}

.auth-telegram-warning-text {
    font-size: 12px;
    line-height: 1.55;
    color: #92400e;
}

.auth-telegram-warning-text b {
    font-weight: 800;
    color: #78350f;
}

@media (prefers-reduced-motion: reduce) {
    .auth-telegram-spinner {
        animation: none;
    }
}
