/* Базовые сбросы и настройки */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

:root {
    --primary-color: #0E3E6C;       /* Темно-синий бренд */
    --accent-color: #00B6C0;        /* Бирюзовый */
    --orange-color: #FF7F11;        /* Оранжевый */
    --bg-light: #F8FAFC;            /* Светлый фон */
    --text-main: #1E293B;           /* Основной текст */
    --text-muted: #64748B;          /* Вспомогательный текст */
    --border-color: #E2E8F0;        /* Границы */
    --input-bg: #F1F5F9;            /* Фон инпутов по умолчанию */
    --input-active-bg: #EBF4FF;     /* Голубоватый фон для активного Email */
    --btn-partner-bg: #A0B0C5;      /* Фон кнопок платежных модулей */
}

body {
    background: url('assets/bg.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    color: var(--text-main);
    overflow-x: hidden;
}

/* Обертка страницы */
.page-wrapper {
    width: 100%;
    max-width: 1440px;
    padding: 24px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
}

/* Шапка сайта */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.logo-img-crop {
    width: 44px;
    height: 44px;
    object-fit: cover;
    object-position: 0px center;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.logo-brand {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

.logo-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.2px;
}

.header-contacts {
    display: flex;
    gap: 32px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.contact-number {
    font-size: 15px;
    font-weight: 600;
    color: #121C2B;
}

.contact-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Основной контент */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    gap: 48px;
    width: 100%;
}

/* Центральный контейнер формы входа */
.login-container {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    display: flex;
    width: 100%;
    max-width: 960px;
    min-height: 520px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.login-column {
    flex: 1;
    padding: 44px 50px;
    display: flex;
    flex-direction: column;
}

/* Табы / Верхние плашки разделов */
.tab-header {
    margin-bottom: 32px;
    display: flex;
}

.tab-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 8px;
    background-color: #FFFFFF;
    white-space: nowrap;
}

.tab-title.active-tab {
    border-color: transparent;
    border-bottom: 2px solid var(--primary-color);
    border-radius: 0;
    padding-left: 0;
    padding-right: 0;
    font-weight: 600;
    color: var(--primary-color);
}

/* Содержимое колонок */
.column-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.login-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: #121C2B;
    margin-bottom: 24px;
}

/* Форма входа */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group {
    position: relative;
    width: 100%;
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    background-color: var(--input-bg);
    font-size: 14px;
    color: var(--text-main);
    outline: none;
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: #A0C3FF;
    background-color: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
}

/* Особый стиль для заполненного логина */
.input-group.active-input .form-input {
    background-color: var(--input-active-bg);
    border-color: rgba(66, 153, 225, 0.2);
    color: #1A365D;
    font-weight: 500;
}

/* Группа пароля с экшенами внутри */
.password-group {
    display: flex;
    align-items: center;
}

.password-group .form-input {
    padding-right: 140px; /* Чтобы текст не заезжал на ссылки справа */
    font-family: monospace; /* Для красивых точек пароля */
    font-size: 16px;
    letter-spacing: 2px;
}

.password-actions {
    position: absolute;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.restore-link {
    font-size: 12px;
    color: var(--accent-color);
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
}

.restore-link:hover {
    color: #008E96;
}

.toggle-password {
    background: none;
    border: none;
    cursor: pointer;
    color: #4A5568;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.toggle-password:hover {
    background-color: rgba(14, 62, 108, 0.05);
}

/* Кнопка Войти */
.submit-btn {
    width: 100%;
    height: 48px;
    background-color: var(--primary-color);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    margin-top: 8px;
}

.submit-btn:hover {
    background-color: #0B3054;
}

.submit-btn:active {
    transform: scale(0.99);
}

/* Разделитель "или" */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 11px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider:not(:empty)::before {
    margin-right: 12px;
}

.divider:not(:empty)::after {
    margin-left: 12px;
}

/* Госуслуги */
.gosuslugi-btn {
    width: fit-content;
    min-width: 260px;
    height: 44px;
    background-color: #FFFFFF;
    border: 1px solid #D2D6E2;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 500;
    color: #778995;
    padding: 0 24px;
    margin: 16px auto 0 auto; /* центрирование */
    transition: background-color 0.2s, border-color 0.2s;
    font-family: 'Inter', sans-serif;
}

.gosuslugi-btn:hover {
    background-color: #F8FAFC;
    border-color: #CBD5E1;
}

.gosuslugi-icon {
    display: inline-block;
    flex-shrink: 0;
}

/* Ссылки в самом низу левой колонки */
.bottom-links {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    padding-top: 32px;
}

.bottom-link {
    font-size: 11px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.bottom-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.registration-link {
    color: var(--accent-color);
    font-weight: 500;
}

.registration-link:hover {
    color: #008E96;
}

/* Вертикальный разделитель */
.vertical-divider {
    width: 1px;
    background-color: var(--border-color);
    align-self: stretch;
}

/* Правая колонка: платежные модули */
.secondary-column {
    background-color: rgba(250, 251, 253, 0.4);
}

.partner-info {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.partner-system {
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.partner-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.partner-btn {
    height: 44px;
    background-color: var(--btn-partner-bg);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    width: 180px;
}

.partner-btn:hover {
    background-color: #8C9CAE;
}

.partner-btn:active {
    transform: scale(0.98);
}

/* Нижний блок с карточками */
.cards-wrapper {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
}

/* Информационная карточка */
.info-card {
    background: #FFFFFF;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    padding: 40px 32px 32px 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 400px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
    overflow: hidden;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.card-text {
    z-index: 2;
}

.card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 21px;
    font-weight: 500;
    color: #3C4858;
    margin-bottom: 24px;
    line-height: 1.35;
}

.card-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-list li {
    font-size: 13.5px;
    line-height: 1.45;
    color: #828E9E;
    position: relative;
    padding-left: 18px;
    font-family: 'Inter', sans-serif;
}

.card-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 4px;
    height: 4px;
    background-color: #6C7A89;
    border-radius: 50%; /* Серые круглые буллеты */
}

/* Картинка внизу карточки */
.card-image-container {
    width: 100%;
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    z-index: 1;
}

.card-image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.info-card:hover .card-image {
    transform: scale(1.05);
}

/* Пагинация */
.pagination-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.dot {
    width: 24px;
    height: 6px;
    border-radius: 3px;
    background-color: rgba(14, 62, 108, 0.2);
    cursor: pointer;
    transition: background-color 0.3s, width 0.3s;
}

.dot.active {
    background-color: var(--primary-color);
}

.dot:hover:not(.active) {
    background-color: rgba(14, 62, 108, 0.4);
}


/* --- Адаптивность --- */

@media (max-width: 1024px) {
    .page-wrapper {
        padding: 20px;
    }
    
    .login-container {
        flex-direction: column;
        min-height: auto;
    }
    
    .vertical-divider {
        width: 100%;
        height: 1px;
    }
    
    .secondary-column {
        background-color: rgba(250, 251, 253, 0.8);
    }
    
    .cards-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .info-card {
        min-height: auto;
        flex-direction: row;
        align-items: center;
        gap: 20px;
        padding: 24px;
    }
    
    .card-image-container {
        width: 120px;
        height: 120px;
        margin-top: 0;
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .header-contacts {
        width: 100%;
        justify-content: space-between;
        gap: 16px;
    }
    
    .contact-item {
        text-align: left;
    }
    
    .login-column {
        padding: 28px 24px;
    }
    
    .bottom-links {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}
