/* ==================== RESET & BASE ==================== */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0; padding: 0; border: 0;
  font-size: 100%; font: inherit; vertical-align: baseline;
}
.clear { clear:both; display:block; overflow:hidden; visibility:hidden; width:0; height:0; }
.clear:after { clear:both; content:' '; display:block; font-size:0; line-height:0; visibility:hidden; width:0; height:0; }
* html .clear { height:1%; }
* { box-sizing: border-box; }
strong, b {font-weight: bold;}

/* ==================== CONTAINER (FIGMA WIDTH) ==================== */
.container {
    width: 100%;
    max-width: 100%; /* По Figma */
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 2;
}

/* ==================== TYPOGRAPHY ==================== */
.section-title {
    font-size: 64px;
    line-height: 75px;
    font-weight: 300;
    margin-bottom: 40px;
    color: #2A438A;
    text-transform: uppercase;
}
.section-title.white { color: #fff; }

.text-body { font-size: 24px; line-height: 28px; font-weight: 300; }
.text-small { font-size: 20px; line-height: 28px; font-weight: 300; }

/* ==================== БАЗОВЫЕ СТИЛИ ==================== */
:root {
    --text-muted: #888888;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {font-family: 'MoscowSans-Light', arial, sans-serif;
    background: #fff;
    color: #2A438A;
    min-height: 100vh; line-height: 1.6;
    overflow: hidden;
}

/* ==================== СТРАНИЦА АВТОРИЗАЦИИ ==================== */
.auth-page {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* ЛЕВАЯ ЧАСТЬ */
.auth-left {
    width: 50%;
    padding: 30px 5% 30px 5%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
    overflow-y: auto;
}

/* Логотип внутри контента (над заголовком) - ЦЕНТРИРОВАН */
.auth-left .auth-logo-inline {margin-bottom: 20px; text-align: center;}
.auth-left .auth-logo-inline img {height: 73px; width: auto; display: inline-block;}
.auth-left .auth-title {font-size: 32px; color: #161616; text-align: center;}
.auth-left .auth-subtitle {color: #161616; opacity: 0.5;    font-size: 20px;
    margin-bottom: 40px;
    text-align: center;}

/* Табы - ЦЕНТРИРОВАНЫ */
.auth-tabs {
    display: flex;
    gap: 40px;
    margin-bottom: 20px;

    justify-content: center; /* Центрируем табы */
}
.auth-tab {
    background: none;
    border: none;
    padding: 0 5px 20px 5px;

    font-size: 16px;
    color: #161616;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}
.auth-tab.active {
   color: #2A438A;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #2A438A;
}

/* Поля ввода */
.input-group {
    position: relative;
    margin-bottom: 20px;
}
.input-group label {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
}
.input-group input {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid #E0E0E0;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
    background: transparent;
}
.input-group input:focus {
    border-bottom-color: #2A438A;
}
.input-group input::placeholder { color: #ccc; }

.toggle-password {
    position: absolute;
    right: 0;
    bottom: 12px;
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    padding: 0;
}


/* Кнопка */
.btn-submit {
    font-family: 'MoscowSans', arial, sans-serif;
    width: 100%;
    padding: 30px 10px;
    background: #2A438A;
    color: #fff;
    border: none;
    border-radius: 80px;
    font-size: 16px;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

/* Чекбокс */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
}
.checkbox-group input { width: auto; accent-color: #2A438A; }

/* Ссылки */
.auth-links {text-align: center; margin-top: 40px;}
.auth-links span {display: block; color: rgba(188, 186, 168, 1); font-size: 16px;}
.auth-links p {font-size: 20px; line-height: 1.4; color: #161616;}
.auth-links p a {color: #2A438A;text-decoration: none;}
.auth-links p a:hover { text-decoration: underline; }

.auth-links .link-small {
    display: block;
    font-size: 16px;
    color: rgba(79, 173, 80, 1);
    text-decoration: none;
}

.form-error {
    background: #fff2f2;
    color: #d32f2f;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 15px;
    text-align: center;
}

/* ПРАВАЯ ЧАСТЬ */
.auth-right {
    width: 50%;
    position: relative;
    overflow: hidden;
}
.slideshow {
    width: 100%;
    height: 100%;
}
.slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease;
}
.slide.active { opacity: 1; }

/* Точки навигации - ИСПРАВЛЕНО */
.slide-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid rgba(255, 255, 255, 0.8);
}
.dot.active {
    background: #fff;
    width: 30px;
    border-radius: 5px;
    border-color: #fff;
}
.dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Адаптив */
@media (max-width: 1024px) {
    .auth-page { flex-direction: column; }
    .auth-left, .auth-right { width: 100%; height: auto; }
    .auth-left { padding: 100px 20px 40px; }
    .auth-right { height: 40vh; order: -1; }
    .auth-logo-inline { margin-bottom: 30px; }
}

/* ==================== МОДАЛЬНОЕ ОКНО ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}
.modal-close:hover {
    background: #e0e0e0;
    color: #000;
}

.modal-title {
    font-size: 24px;
    margin-bottom: 15px;
    text-align: center;
}

.modal-text {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 25px;
    text-align: center;
}

.restore-steps {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
}
.restore-steps h3 {
    font-size: 14px;
    margin-bottom: 12px;
}
.restore-steps ol {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    line-height: 1.8;
}
.restore-steps li {
    margin-bottom: 8px;
}

.modal-step {
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Ссылка для переключения табов */
.tab-trigger {
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
    color: #2A4389;
    font-size: 20px;
    margin-bottom: 40px;
}
/* ==================== СТРАНИЦА ВОССТАНОВЛЕНИЯ ПАРОЛЯ ==================== */
.restore-form {
    max-width: 400px;
    margin: 0 auto;
}

.restore-error,
.restore-success {
    text-align: center;
    padding: 40px 20px;
}

.restore-error .auth-title,
.restore-success .auth-title {
    margin-bottom: 20px;
}

.restore-error .auth-subtitle {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* Иконка успеха */
.success-icon {
    margin-bottom: 30px;
}
.success-icon svg {
    filter: drop-shadow(0 4px 12px rgba(76, 175, 80, 0.3));
}

/* === GMAIL-KILLER СТИЛИ === */

.gmail-error-msg {
    color: #d32f2f;
    font-size: 13px;
    margin-top: 6px;
    line-height: 1.4;
    display: none;
}

.input-group--email input.input-error {
    border-color: #d32f2f !important;
    background-color: #fff5f5;
}

.btn-submit--register.btn-disabled,
.btn-submit--register:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* --- Переключатель пароля --- */
.input-group--password {
    position: relative;
}

.input-group--password input {
    padding-right: 45px; /* Отступ для кнопки */
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 33px;
    height: 29px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.password-toggle svg {
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.password-toggle:hover svg path {
    stroke-opacity: 0.6;
}

/* Состояние "видимый пароль" — меняем иконку на "глаз открыт" (опционально) */
.password-toggle--visible svg path {
    stroke-opacity: 0.8;
    stroke: #2A438A;
}



/* Адаптив для восстановления */
@media (max-width: 1024px) {
    .restore-form {
        max-width: 100%;
    }
}