/* Страница входа — дизайн из test.html */

:root {
    --brand: #005a9b;
    --logo-height: 40px;
    --brand-gradient: linear-gradient(135deg, #005a9b 0%, #007cdb 100%);
    --text-main: #0f172a;
    --text-secondary: #475569;
    --border-light: rgba(226, 232, 240, 0.8);
    --radius-input: 10px;
    --transition-fluid: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

body.login-page {
    background-color: #f8fafc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px 50px;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    margin: 0;
}

/* Шапка */
.login-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    display: block;
    height: var(--logo-height);
    width: auto;
    max-width: 200px;
    flex-shrink: 0;
    object-fit: contain;
}

.top-docs-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--brand);
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-fluid);
}

.top-docs-btn:hover {
    background: #f1f5f9;
    border-color: var(--brand);
    color: var(--brand);
}

/* Основной блок */
.main-content-layout {
    display: flex;
    width: 100%;
    align-items: flex-start;
    justify-content: center;
    gap: 80px;
    flex: 1;
    margin: 40px auto;
    max-width: 1100px;
}

.auth-card-zone {
    flex: 0 0 auto;
    width: 100%;
    max-width: 440px;
}

.login-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 40px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-light);
    transition: var(--transition-fluid);
}

.login-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 90, 155, 0.04);
}

.card-title {
    font-size: 26px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

.input-group {
    margin-bottom: 18px;
}

.field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.input-field-relative {
    position: relative;
}

.custom-input {
    width: 100%;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-input);
    font-size: 14.5px;
    color: var(--text-main);
    transition: var(--transition-fluid);
    box-sizing: border-box;
}

.custom-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(0, 90, 155, 0.1);
}

.password-eye {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    padding: 0;
}

.password-eye:hover {
    color: var(--brand);
}

.form-utility-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 16px 0 24px 0;
    font-size: 13.5px;
}

.checkbox-modern {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    margin: 0;
}

.checkbox-modern input {
    accent-color: var(--brand);
    width: 15px;
    height: 15px;
}

.form-actions-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.submit-btn {
    background: #0072bc;
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    border-radius: var(--radius-input);
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fluid);
}

.submit-btn:hover {
    background: var(--brand);
    color: #ffffff;
}

.reset-link {
    color: #0072bc;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.reset-link:hover {
    text-decoration: underline;
    color: var(--brand);
}

.card-hint-text {
    font-size: 11.5px;
    color: #94a3b8;
    line-height: 1.5;
    margin-top: 20px;
    margin-bottom: 0;
}

/* Алерты */
.login-alert {
    padding: 12px 14px;
    border-radius: var(--radius-input);
    font-size: 13.5px;
    line-height: 1.45;
    margin-bottom: 18px;
}

.login-alert strong {
    font-weight: 600;
    word-break: break-word;
}

.login-alert--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.login-alert--success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}

.login-alert--info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: var(--brand);
}

/* Демо-аккаунты */
.demo-accounts {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.demo-accounts h6 {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.demo-accounts > p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.account-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--transition-fluid);
    font-size: 13px;
}

.account-card:hover {
    border-color: #cbd5e1;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 90, 155, 0.04);
}

.account-card--disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: #f1f5f9;
    pointer-events: none;
}

.account-card--disabled:hover {
    border-color: var(--border-light);
    transform: none;
    box-shadow: none;
}

.account-card--disabled strong {
    color: var(--text-secondary);
}

.account-unavailable {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-top: 4px;
}

.account-card:last-child {
    margin-bottom: 0;
}

.account-role {
    font-size: 11px;
    color: var(--text-secondary);
    margin-left: 8px;
}

.quick-fill-btn {
    background: none;
    border: none;
    color: var(--brand);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.quick-fill-btn:hover {
    text-decoration: underline;
}

.quick-fill-btn:disabled {
    color: #94a3b8;
    cursor: not-allowed;
    text-decoration: none;
}

/* Правая колонка — карусель по верхнему краю */
.promo-info-zone {
    flex: 1;
    min-width: 0;
    max-width: 520px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    align-self: flex-start;
}

.promo-carousel {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    text-align: center;
}

.promo-carousel__slides {
    position: relative;
    min-height: 280px;
}

.promo-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1),
                transform 0.6s cubic-bezier(0.25, 1, 0.5, 1),
                visibility 0.6s;
    padding: 0 12px;
    margin: 0;
}

.promo-slide.is-active {
    z-index: 1;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.promo-slide__title {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.25;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.promo-slide__subtitle {
    font-size: 13px;
    font-weight: 700;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.promo-slide__text {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0 0 14px;
    max-width: 420px;
}

.promo-slide__text:last-child {
    margin-bottom: 0;
}

/* Цитаты */
.promo-slide--quote {
    border: none;
    padding: 24px 20px;
    max-width: 440px;
    margin: 0 auto;
}

.promo-slide--quote::before {
    content: '«';
    display: block;
    font-size: 48px;
    line-height: 1;
    color: rgba(0, 90, 155, 0.15);
    font-family: Georgia, serif;
    margin-bottom: -8px;
}

.promo-quote__text {
    font-size: 17px;
    font-weight: 500;
    color: #1e293b;
    line-height: 1.55;
    font-style: italic;
    margin: 0 0 20px;
}

.promo-quote__author {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.promo-quote__author strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--brand);
    font-style: normal;
}

.promo-quote__author span {
    font-size: 12px;
    color: var(--text-secondary);
    font-style: normal;
}

/* Блок возможностей */
.promo-facts {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
    max-width: 380px;
    width: 100%;
}

.promo-facts li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    transition: var(--transition-fluid);
}

.promo-facts li:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(0, 90, 155, 0.04);
}

.promo-facts__icon {
    flex-shrink: 0;
    color: var(--brand);
    margin-top: 1px;
}

/* Навигация карусели */
.promo-carousel__nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
}

.promo-carousel__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: #cbd5e1;
    cursor: pointer;
    transition: var(--transition-fluid);
}

.promo-carousel__dot:hover {
    background: #94a3b8;
}

.promo-carousel__dot.is-active {
    background: var(--brand);
    width: 24px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .promo-slide {
        transition: opacity 0.2s ease, visibility 0.2s;
        transform: none;
    }
}

/* Футер */
.login-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border-top: 1px solid var(--border-light);
    padding-top: 20px;
    font-size: 11px;
    color: #94a3b8;
}

.login-footer a {
    color: var(--brand);
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

.chat-widget-badge {
    background: #0072bc;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 114, 188, 0.15);
    flex-shrink: 0;
}

@media (max-width: 960px) {
    .main-content-layout {
        flex-direction: column;
        gap: 40px;
        max-width: 440px;
    }

    .promo-info-zone {
        max-width: 100%;
        padding-top: 0;
        min-height: 280px;
    }

    body.login-page {
        padding: 20px;
    }

    .login-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

@media (max-width: 576px) {
    .auth-card-zone {
        max-width: 100%;
    }

    .login-card {
        padding: 28px 22px;
    }

    .form-actions-line {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .submit-btn {
        width: 100%;
    }

    .login-footer {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}
