/* ===== AUTH BACKGROUND & SHELL ===== */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 12px;
    background: radial-gradient(circle at top left, #e0f2fe 0, #bfdbfe 30%, #e9d5ff 70%, #f5f3ff 100%);
    background-attachment: fixed;
}

.auth-shell {
    width: 100%;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

/* ===== ОБЩАЯ КАРТОЧКА АВТОРИЗАЦИИ (GLASS) ===== */

.auth-form {
    width: 350px;
    position: relative;
    background: radial-gradient(circle at 0% 0%, rgba(129, 140, 248, 0.14), transparent 55%),
    radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.14), transparent 55%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.90), rgba(255, 255, 255, 0.82));
    padding: 26px 26px 24px;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.22),
    0 0 0 1px rgba(148, 163, 184, 0.35);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    text-align: left;
    color: #0f172a;
    overflow: hidden;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* лёгкий внутренний отблеск по краю карточки */
.auth-form::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.55);
    mix-blend-mode: screen;
    pointer-events: none;
}

.auth-form h3 {
    margin-bottom: 20px;
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
    color: #0f172a;
}

.auth-form .error-message,
.auth-error-text {
    color: #b91c1c;
    margin-top: 6px;
    font-size: 0.9rem;
}

/* ===== ХЕДЕР ЛОГИН-СТРАНИЦ (Relive Space + подпись) ===== */

.auth-form-brand {
    text-align: center;
    margin-bottom: 18px;
}

.auth-form-brand-main {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: #111827;
}

.auth-form-brand-sub {
    margin-top: 6px;
    font-size: 1.02rem;
    font-weight: 600;
    color: #4b5563;
}

/* ===== ИНПУТЫ / ПАРОЛЬ ===== */

.input-group {
    margin-bottom: 14px;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #111827;
}

.form-control {
    width: 100%;
}

.input-group-password {
    position: relative;
}

.password-toggle {
    position: absolute;
    top: 34px;
    right: 10px;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
}

.password-icon {
    width: 20px;
    height: 20px;
}

/* ===== КНОПКИ НА ЛОГИН-СТРАНИЦАХ ===== */

.auth-form-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.auth-form-actions .rz-button {
    width: 100%;
    justify-content: center;
}

/* маленькие ссылки-кнопки “Забыли пароль?” / “О платформе” на логинах */
.auth-form-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin: 10px auto 0;
}

/* ===== WHOAMI / ВЫБОР РОЛИ ===== */

.whoami-shell {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* логотип снаружи карточки + glow */
.whoami-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.whoami-hero::after {
    content: "";
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    max-width: 260px;
    height: 80px;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.45) 0, rgba(129, 140, 248, 0) 65%);
    pointer-events: none;
    z-index: -1;
}

/* размер логотипа — как на десктопе, без мобильных оверрайдов */
.whoami-logo {
    height: 300px;
    max-width: 100%;
    object-fit: contain;
}

/* карточка выбора роли */

.whoami-card {
    text-align: center;
    padding-top: 24px;
}

/* подпись бренда внутри карточки */

.whoami-card-brand {
    position: relative;
    margin-bottom: 18px;
    z-index: 1;
}

/* Relive Space — более выразительный градиентный капс */
.whoami-brand-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: .32em;
    text-transform: uppercase;
    background: linear-gradient(90deg, #111827, #4f46e5);
    -webkit-background-clip: text;
    color: transparent;
}

.whoami-brand-sub {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-top: 4px;
}

/* мягкий glow под шапкой карточки */

.whoami-card-brand::before {
    content: "";
    position: absolute;
    inset: -14px 20px 4px;
    border-radius: 999px;
    background: radial-gradient(circle at 50% 0,
    rgba(129, 140, 248, 0.18),
    transparent 72%);
    opacity: 0.9;
    z-index: -1;
}

/* заголовок выбора роли */

.auth-selection-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 16px 0 12px;
    color: #111827;
}

/* ===== КНОПКИ ВЫБОРА РОЛИ НА WHOAMI ===== */

.auth-selection-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

/* общий базовый стиль только для кнопок выбора роли */

.auth-selection-buttons .rz-button {
    width: 100%;
    border-radius: 999px;
    min-height: 44px;
    font-weight: 600;
    font-size: 0.95rem;
}

/* первая кнопка "Я клиент" — главная */

.auth-selection-buttons .rz-button:first-child {
    background: linear-gradient(90deg, #3b4bb8, #3949a0);
    color: #ffffff;
    border: none;
    box-shadow: 0 10px 25px rgba(37, 56, 148, 0.35);
}

.auth-selection-buttons .rz-button:first-child:hover {
    background: linear-gradient(90deg, #343fa4, #323b8f);
}

/* вторая кнопка "Я терапевт" — светлая */

.auth-selection-buttons .rz-button + .rz-button {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(148, 163, 184, 0.65);
    color: #111827;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.auth-selection-buttons .rz-button + .rz-button:hover {
    background: rgba(248, 250, 252, 0.98);
}

/* "О платформе" на whoami — чип-стиль */

.auth-selection-about {
    margin-top: 14px;
    border-radius: 999px !important;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(14, 165, 233, 0.7);
    color: #0369a1;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.16);
}

/* ===== PUBLIC LAYOUT (общий стиль для PublicLayout) ===== */

.public-layout-root {
    min-height: 100vh;
    background: radial-gradient(circle at top left, #e0f2fe 0, #bfdbfe 30%, #e9d5ff 70%, #f5f3ff 100%);
    background-size: 220% 220%;
    animation: rlvGradientShift 26s ease infinite;
}

@keyframes rlvGradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.public-header {
    background: transparent;
    box-shadow: none;
    border: none;
    padding-top: 16px;
    padding-bottom: 4px;
}

.public-header-inner {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
}

.public-logo {
    height: 32px;
    border-radius: 12px;
}

.public-brand-name {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #0f172a;
}

.public-brand-tagline {
    font-size: .85rem;
    color: #4b5563;
}

.public-body {
    padding: 0 0 24px;
}

.public-body-inner {
    max-width: 1040px;
    margin: 16px auto 32px;
    padding: 0 16px;
}

.public-card-glass {
    border-radius: 24px;
    padding: 20px 22px 22px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.45);
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.public-footer {
    background: transparent;
    border: none;
    padding-bottom: 18px;
}

.public-footer-inner {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 16px;
    font-size: .85rem;
    color: #4b5563;
}

/* ===== MOBILE ===== */

@media (max-width: 600px) {
    .auth-container {
        padding: 16px 10px;
    }

    .auth-shell {
        max-width: 100%;
        gap: 10px;
    }

    .auth-form {
        padding: 18px 18px 18px;
        border-radius: 22px;
        box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
    }

    .auth-selection-title {
        font-size: 1.1rem;
        margin: 12px 0 10px;
    }
}

/* мобилка для публичного лейаута */

@media (max-width: 640px) {
    .public-header-inner {
        justify-content: center;
    }

    .public-logo {
        height: 28px;
    }

    .public-brand-name {
        font-size: 0.95rem;
    }

    .public-brand-tagline {
        display: none;
    }

    .public-card-glass {
        border-radius: 18px;
        padding: 16px 14px 18px;
        box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
    }

    .public-body-inner {
        margin: 12px auto 24px;
        padding: 0 12px;
    }
}

/* низкие экраны в landscape */

@media (max-height: 600px) and (orientation: landscape) {
    .auth-container {
        align-items: flex-start;
        padding-top: 12px;
    }

    .auth-form {
        padding-top: 16px;
    }
}

@media (max-width: 400px) {
    .auth-container {
        padding: 12px 8px;
    }

    .auth-form {
        padding-inline: 14px;
    }
}
