* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    background-image: url("../img/login-background.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Хедер */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 40px;
    position: relative;
    z-index: 10;
}

.logo-placeholder {
    display: inline-flex;
    align-items: center;
    width: 150px;
    text-decoration: none;
}

.logo-placeholder img,
.logo-placeholder svg {
    display: block;
    width: 100%;
    height: auto;
}

.logo-placeholder--white img {
    filter: brightness(0) invert(1);
}

.auth-logo__word {
    fill: #ffffff;
    font-family: "Onest", Arial, Helvetica, sans-serif;
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -0.06em;
}

.auth-logo__badge {
    fill: rgba(255, 255, 255, 0.06);
    stroke: #ffffff;
    stroke-width: 1.5;
}

.auth-logo__badge-text {
    fill: #ffffff;
    font-family: "Onest", Arial, Helvetica, sans-serif;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: -0.02em;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.no-account-text {
    color: #ffffff;
    font-size: 14px;
    font-weight: 400;
}

.btn-register {
    background: #ffffff;
    color: #1a1a1a;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-register:hover {
    background: #f5f5f5;
    transform: translateY(-1px);
}

/* Основной контент */
.main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 100px);
    padding: 20px 20px 32px;
}

/* Карточка логина / регистрации */
.login-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 40px 38px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.28), 0 4px 16px rgba(0, 0, 0, 0.08);
}

.welcome-title {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    text-align: center;
    letter-spacing: -0.02em;
}

.welcome-subtitle {
    font-size: 14.5px;
    color: #6b7280;
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.45;
}

/* Форма */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-error,
.field-error {
    font-size: 13px;
    color: #d32f2f;
    line-height: 1.4;
}

.form-error {
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(211, 47, 47, 0.08);
}

.form-error p,
.field-error p {
    margin: 0;
}

.auth-note {
    display: flex;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(255, 107, 53, 0.22);
    border-radius: 14px;
    background: rgba(255, 107, 53, 0.08);
    color: #3a2a22;
    font-size: 13px;
    line-height: 1.45;
}

.auth-note__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #ffffff;
    color: #ff6b35;
}

.auth-note__icon svg {
    width: 18px;
    height: 18px;
}

.auth-note__title {
    display: block;
    margin-bottom: 2px;
    color: #1a1a1a;
    font-weight: 700;
}

.auth-status-actions {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}

.btn-login.btn-secondary {
    margin-top: 0;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    color: #1a1a1a;
}

.btn-login.btn-secondary:hover {
    background: #fafafa;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid #e5e7eb;
    border-radius: 11px;
    font-size: 15px;
    color: #1a1a1a;
    background: #fafafa;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-input:focus {
    outline: none;
    border-color: #f76505;
    box-shadow: 0 0 0 3px rgba(247, 101, 5, 0.14);
    background: #ffffff;
}

/* Поле пароля */
.password-wrapper {
    position: relative;
}

.password-wrapper .form-input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999999;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #666666;
}

/* Кнопка входа / регистрации */
.btn-login {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    margin-top: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.btn-login:hover {
    background: #2b2b2b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-login:focus-visible {
    outline: 2px solid #f76505;
    outline-offset: 2px;
}

/* Забыли пароль / Переход на вход */
.forgot-password {
    display: inline-block;
    width: 100%;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 4px 0;
}

.forgot-password:hover {
    color: #1a1a1a;
}

.auth-accent {
    color: #f76505;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s ease;
}

.forgot-password:hover .auth-accent {
    color: #d85400;
}

/* Информация о поддержке */
.support-info {
    margin-top: 24px;
    text-align: center;
}

.support-info p {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.support-email {
    color: #f76505;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease, text-decoration 0.15s ease;
}

.support-email:hover {
    color: #d85400;
    text-decoration: underline;
}

/* reCAPTCHA уведомление */
.recaptcha-notice {
    margin-top: 20px;
    text-align: center;
}

.recaptcha-notice p {
    font-size: 12px;
    color: #999999;
}

/* Yandex SmartCaptcha & VPN подсказка */
.captcha-wrapper {
    width: 100%;
    margin-bottom: 16px;
}

.captcha-wrapper .smart-captcha {
    min-height: 100px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.captcha-hint {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.45;
    color: #666666;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.captcha-hint__icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: #6c757d;
    margin-top: 1px;
}

.captcha-hint--failed {
    background: #fff8e6;
    border-color: #ffd166;
    color: #855b00;
}

.captcha-hint--failed .captcha-hint__icon {
    color: #d97706;
}

/* Кнопка чата */
.chat-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 10000;
}

.chat-fab:hover {
    background: #333333;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.chat-fab:active {
    transform: scale(0.98);
}

.contact-popover.contact-chat {
    position: fixed;
    right: 24px;
    bottom: 92px;
    z-index: 10001;
    width: min(410px, calc(100vw - 32px));
    height: min(580px, calc(100vh - 120px));
    min-height: 460px;
    display: flex;
    flex-direction: column;
    padding: 0;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #ffffff;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.22), 0 6px 18px rgba(0, 0, 0, 0.08);
    color: #171411;
    font-family: "Onest", "Inter", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    opacity: 0;
    transform: translateY(14px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1), transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.contact-popover.contact-chat.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Шапка чата */
.contact-chat__header {
    background: linear-gradient(135deg, #1d1916 0%, #2a231e 100%);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ffffff;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-chat__header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-chat__avatar-wrap {
    position: relative;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
}

.contact-chat__avatar-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    background: #ffffff;
    display: block;
}

.contact-chat__online-dot {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10b981;
    border: 2px solid #1d1916;
}

.contact-chat__header-title {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.contact-chat__header-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.70);
    margin-top: 2px;
}

.contact-chat__status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
}

.contact-chat__close {
    position: relative;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.15s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.contact-chat__close:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.05);
}

.contact-chat__close::before,
.contact-chat__close::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 2px;
    border-radius: 2px;
    background: #ffffff;
}

.contact-chat__close::before {
    transform: rotate(45deg);
}

.contact-chat__close::after {
    transform: rotate(-45deg);
}

/* Содержимое / Сообщения чата */
.contact-chat__messages {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f7f6f4;
}

.contact-chat__messages::-webkit-scrollbar {
    width: 5px;
}

.contact-chat__messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

.chat-msg {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    animation: chat-fade-in 0.2s ease;
}

.chat-msg--bot {
    align-self: flex-start;
    max-width: 95%;
}

.chat-msg--user {
    align-self: flex-end;
    max-width: 88%;
    flex-direction: row-reverse;
}

.chat-msg__avatar {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.10);
    margin-bottom: 2px;
}

.chat-msg__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.chat-msg__bubble {
    padding: 11px 14px;
    border-radius: 18px 18px 18px 4px;
    background: #ffffff;
    color: #171411;
    font-size: 13px;
    line-height: 1.45;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.chat-msg__bubble--user {
    border-radius: 18px 18px 4px 18px;
    background: #f76505;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(247, 101, 5, 0.25);
    border: 0;
}

.chat-msg__text {
    margin: 0 0 6px;
}

.chat-msg__text:last-child {
    margin-bottom: 0;
}

.chat-msg__text--muted {
    font-size: 11px;
    color: #716a65;
    font-weight: 500;
    margin-bottom: 8px;
}

.chat-msg__user-email {
    font-size: 11px;
    opacity: 0.85;
    margin-bottom: 3px;
    font-weight: 500;
}

.chat-msg__user-text {
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
}

.chat-msg__tg-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.chat-tg-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 8px;
    background: #eef6fc;
    color: #1783cf;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.15s ease;
}

.chat-tg-chip:hover {
    background: #dff0fc;
    transform: translateY(-1px);
}

/* Нижняя плашка чата с контактами */
.contact-chat__footer {
    flex-shrink: 0;
    padding: 10px 16px 12px;
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contact-chat__footer-title {
    font-size: 11px;
    color: #716a65;
    font-weight: 500;
}

.contact-chat__footer-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chat-msg__action-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid #f76505;
    background: #ffffff;
    color: #f76505;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.chat-msg__action-btn:hover {
    background: #f76505;
    color: #ffffff;
}

/* Встроенная форма ввода Email в виде облачка */
.chat-email-step {
    display: flex;
    flex-direction: column;
    animation: chat-fade-in 0.25s ease;
}

.chat-email-step[hidden] {
    display: none !important;
}

.chat-msg__bubble--form {
    max-width: 320px;
    background: #ffffff;
    border-radius: 18px 18px 18px 4px;
    border: 1px solid rgba(34, 28, 24, 0.10);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    padding: 12px 14px;
}

.chat-email-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.chat-email-field {
    display: flex;
    flex-direction: column;
}

.chat-email-input {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 11px;
    border: 1px solid rgba(34, 28, 24, 0.16);
    border-radius: 9px;
    background: #faf8f6;
    font-family: inherit;
    font-size: 12.5px;
    color: #171411;
    outline: none;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.chat-email-input:focus {
    border-color: #f76505;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(247, 101, 5, 0.14);
}

.chat-email-input--sub {
    font-size: 11.5px;
    background: #fdfdfd;
}

.chat-email-consent {
    margin-top: 2px;
}

.chat-email-consent__label {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 10.5px;
    line-height: 1.35;
    color: #716a65;
    cursor: pointer;
}

.chat-email-consent__cb {
    margin: 1px 0 0;
    accent-color: #f76505;
    flex-shrink: 0;
}

.chat-email-consent__label a {
    color: #f76505;
    text-decoration: underline;
}

.chat-email-error {
    padding: 6px 10px;
    border-radius: 7px;
    background: #fdeced;
    color: #c5221f;
    font-size: 11px;
    line-height: 1.35;
    border: 1px solid rgba(197, 34, 31, 0.2);
}

.chat-email-error[hidden] {
    display: none !important;
}

.chat-email-submit {
    width: 100%;
    min-height: 34px;
    border: 0;
    border-radius: 9px;
    background: #f76505;
    color: #ffffff;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(247, 101, 5, 0.22);
    transition: background 0.15s ease, transform 0.15s ease;
    margin-top: 2px;
}

.chat-email-submit:hover {
    background: #e05800;
    transform: translateY(-1px);
}

/* Плашка сохранённого email */
.chat-email-badge-wrap {
    display: flex;
    justify-content: center;
    margin: 2px 0 6px;
    animation: chat-fade-in 0.2s ease;
}

.chat-email-badge-wrap[hidden] {
    display: none !important;
}

.chat-email-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #716a65;
    background: rgba(34, 28, 24, 0.05);
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid rgba(34, 28, 24, 0.06);
}

.chat-email-badge strong {
    color: #171411;
}

.chat-email-change-btn {
    background: transparent;
    border: 0;
    color: #f76505;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    margin-left: 2px;
}

.chat-email-change-btn:hover {
    color: #c44e00;
}

/* Динамические сообщения */
.chat-flow-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-msg__time {
    font-size: 9.5px;
    opacity: 0.75;
    margin-top: 4px;
    display: block;
    text-align: right;
}

.chat-msg--bot .chat-msg__time {
    text-align: left;
}

/* Индикатор набора сообщения */
.chat-msg__bubble--typing {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 14px;
    min-width: 48px;
}

.chat-typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #9c958f;
    animation: chat-typing 1.3s infinite ease-in-out;
}

.chat-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.chat-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes chat-typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.35;
    }
    30% {
        transform: translateY(-5px);
        opacity: 1;
        background: #f76505;
    }
}

/* Нижняя строка ввода сообщения (Composer) */
.contact-chat__input-bar {
    flex-shrink: 0;
    padding: 10px 14px 10px;
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.contact-chat__composer-form {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.contact-chat__textarea {
    flex: 1;
    min-height: 38px;
    max-height: 110px;
    padding: 9px 12px;
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 19px;
    background: #faf8f6;
    font-family: inherit;
    font-size: 13px;
    color: #171411;
    outline: none;
    resize: none;
    line-height: 1.35;
    box-sizing: border-box;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.contact-chat__textarea:focus {
    border-color: #f76505;
    background: #ffffff;
    box-shadow: 0 0 0 2.5px rgba(247, 101, 5, 0.14);
}

.contact-chat__send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 0;
    background: #f76505;
    color: #ffffff;
    display: grid;
    place-items: center;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(247, 101, 5, 0.28);
    transition: background 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.contact-chat__send-btn:hover {
    background: #e05800;
    transform: scale(1.06);
}

.contact-chat__send-btn:active {
    transform: scale(0.96);
}

.contact-chat__send-btn:disabled {
    background: #d1cbc7;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
    opacity: 0.6;
}


/* --- Вход / Регистрация через соцсети (Яндекс ID / Google) ------------ */

.form-hint {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.4;
    color: #6b7280;
}

.social-auth {
    margin-top: 20px;
    width: 100%;
}

.social-auth__divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
}

.social-auth__divider::before,
.social-auth__divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.social-auth__grid {
    display: flex;
    gap: 12px;
    width: 100%;
}

.social-auth__form {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
}

.social-auth__btn {
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    background: #ffffff;
    color: #1a1a1a;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    white-space: nowrap;
}

.social-auth__btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

.social-auth__btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.social-auth__btn:focus-visible {
    outline: 2px solid #f76505;
    outline-offset: 2px;
}

/* Яндекс брендовый стиль при наведении */
.social-auth__btn--yandex:hover {
    border-color: rgba(252, 63, 29, 0.4);
    background: #fffcfb;
    box-shadow: 0 3px 10px rgba(252, 63, 29, 0.08);
}

/* Google брендовый стиль при наведении */
.social-auth__btn--google:hover {
    border-color: rgba(66, 133, 244, 0.4);
    background: #fafcff;
    box-shadow: 0 3px 10px rgba(66, 133, 244, 0.08);
}

.social-auth__icon {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
}

.social-auth__label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.social-auth__action {
    display: none; /* Скрываем длинный префикс при 2 кнопках */
}

/* Если осталась только одна соцсеть — показываем полный текст */
.social-auth__form:only-child .social-auth__action {
    display: inline;
}


/* ==========================================================================
   Адаптивность для экранов с компактной высотой (MacBook 13", 14", 16")
   Устраняет вертикальный скролл формы регистрации на компактных экранах ноутов
   ========================================================================== */
@media (min-width: 641px) and (max-height: 980px) {
    .header {
        padding: 16px 32px;
    }

    .main-content {
        padding: 16px 24px 28px;
        min-height: calc(100vh - 72px);
    }

    .login-card {
        padding: 30px 36px 24px;
        border-radius: 20px;
    }

    .welcome-title {
        font-size: 24px;
        margin-bottom: 6px;
    }

    .welcome-subtitle {
        font-size: 13px;
        margin-bottom: 18px;
    }

    .form-group {
        margin-bottom: 13px;
    }

    .form-label {
        font-size: 13px;
        margin-bottom: 5px;
    }

    .form-input {
        padding: 11px 14px;
        font-size: 14px;
    }

    .btn-login {
        min-height: 44px;
        padding: 12px 18px;
        font-size: 14px;
        margin-top: 6px;
    }

    .forgot-password {
        font-size: 13px;
        margin-top: 4px;
    }

    .social-auth {
        margin-top: 16px;
    }

    .social-auth__divider {
        margin-bottom: 12px;
        font-size: 12px;
    }

    .social-auth__btn {
        min-height: 42px;
        padding: 10px 14px;
        font-size: 13.5px;
    }

    .support-info {
        margin-top: 16px;
    }

    .support-info p {
        font-size: 12px;
    }
}

@media (min-width: 641px) and (max-height: 840px) {
    .header {
        padding: 10px 24px;
    }

    .main-content {
        padding: 8px 16px 16px;
        min-height: calc(100vh - 54px);
    }

    .login-card {
        padding: 20px 28px 16px;
        border-radius: 18px;
    }

    .welcome-title {
        font-size: 21px;
        margin-bottom: 4px;
    }

    .welcome-subtitle {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .form-group {
        margin-bottom: 9px;
    }

    .form-label {
        font-size: 12px;
        margin-bottom: 3px;
    }

    .form-input {
        padding: 9px 12px;
        font-size: 13px;
        border-radius: 10px;
    }

    .captcha-wrapper {
        margin-bottom: 8px;
    }

    .btn-login {
        min-height: 40px;
        padding: 10px 16px;
        font-size: 13.5px;
        margin-top: 4px;
    }

    .forgot-password {
        font-size: 12.5px;
        padding: 2px 0;
        margin-top: 2px;
    }

    .social-auth {
        margin-top: 12px;
    }

    .social-auth__divider {
        margin-bottom: 8px;
        font-size: 11.5px;
    }

    .social-auth__btn {
        min-height: 38px;
        padding: 7px 12px;
        font-size: 12.5px;
        border-radius: 10px;
    }

    .support-info {
        margin-top: 12px;
    }

    .support-info p {
        font-size: 11.5px;
    }
}


/* ==========================================================================
   Мобильная адаптивность (смартфоны, iPhone, Android)
   ========================================================================== */
@media (max-width: 640px) {
    body {
        background-attachment: scroll;
    }

    .header {
        padding: 12px 16px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }

    .logo-placeholder img {
        max-height: 28px;
        width: auto;
    }

    .header-right {
        width: auto;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .no-account-text {
        display: none;
    }

    .btn-register {
        padding: 8px 14px;
        font-size: 13px;
        border-radius: 8px;
    }

    .main-content {
        min-height: calc(100vh - 60px);
        padding: 16px 16px 96px; /* Защитный отступ снизу от плавающей кнопки .chat-fab */
    }

    .login-card {
        width: 100%;
        max-width: 440px;
        padding: 28px 20px;
        border-radius: 20px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    }

    .welcome-title {
        font-size: 23px;
        letter-spacing: -0.02em;
    }

    .welcome-subtitle {
        font-size: 13px;
        margin-bottom: 22px;
    }

    .form-group {
        margin-bottom: 14px;
    }

    .form-label {
        font-size: 13px;
    }

    .form-input {
        padding: 12px 14px;
        font-size: 15px;
        border-radius: 10px;
    }

    .btn-login {
        min-height: 48px;
        padding: 14px 18px;
        font-size: 15px;
        border-radius: 10px;
    }

    .forgot-password {
        font-size: 13px;
        padding: 6px 0;
    }

    .social-auth {
        margin-top: 18px;
    }

    .social-auth__divider {
        font-size: 12px;
        margin-bottom: 14px;
    }

    .social-auth__grid {
        gap: 10px;
    }

    .social-auth__btn {
        min-height: 46px;
        padding: 11px 12px;
        font-size: 13.5px;
        border-radius: 10px;
    }

    .social-auth__icon {
        width: 19px;
        height: 19px;
    }

    .support-info {
        margin-top: 22px;
    }

    .support-info p {
        font-size: 12.5px;
    }

    .chat-fab {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
    }

    .contact-popover {
        right: 12px;
        left: 12px;
        bottom: 74px;
        width: auto;
        height: min(560px, calc(100vh - 90px));
        min-height: 380px;
    }
}

/* Маленькие смартфоны (экран 320-380px) */
@media (max-width: 380px) {
    .login-card {
        padding: 22px 16px;
        border-radius: 16px;
    }

    .welcome-title {
        font-size: 20px;
    }

    .welcome-subtitle {
        font-size: 12px;
        margin-bottom: 18px;
    }

    .form-input {
        padding: 11px 12px;
        font-size: 14px;
    }

    .btn-login {
        min-height: 44px;
        padding: 12px 14px;
        font-size: 14px;
    }

    .social-auth__grid {
        gap: 8px;
    }

    .social-auth__btn {
        min-height: 42px;
        padding: 9px 8px;
        font-size: 12.5px;
        gap: 6px;
    }

    .social-auth__icon {
        width: 17px;
        height: 17px;
    }
}
