/* Auth-страницы: компактная карточка на фирменном фоне */

html:has(body.body_guest.body_auth) {
    min-height: 100%;
    background: linear-gradient(135deg, var(--greeny, #07c0a1) 0%, #00796b 50%, #005a4a 100%);
    background-attachment: fixed;
}

body.body_guest.body_auth {
    display: block;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    background-attachment: fixed;
    color: var(--maintext, #22272a);
    font-weight: 400;
}

body.body_guest.body_auth .auth-container.reg-shell {
    max-width: 620px;
    margin: 0 auto;
    padding: 2.75rem 1.25rem 3rem;
}

body.body_guest.body_auth .reg-card {
    max-width: 580px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 40px 36px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

@media (max-width: 768px) {
    body.body_guest.body_auth .auth-container.reg-shell {
        padding: 1.5rem 0.85rem 2.25rem;
    }

    body.body_guest.body_auth .reg-card {
        padding: 28px 24px 28px;
    }
}

/* Логотип: только #222222, без смены цвета ссылкой/hover */
body.body_guest.body_auth a.logo,
body.body_guest.body_auth a.reg-card__logo,
body.body_guest.body_auth a.logo.reg-card__logo,
body.body_guest.body_auth a.logo:hover,
body.body_guest.body_auth a.reg-card__logo:hover,
body.body_guest.body_auth a.logo:focus,
body.body_guest.body_auth a.reg-card__logo:focus,
body.body_guest.body_auth a.logo:active,
body.body_guest.body_auth a.reg-card__logo:active,
body.body_guest.body_auth a.logo:visited,
body.body_guest.body_auth a.reg-card__logo:visited {
    color: #222222;
    opacity: 1;
}

.reg-card__logo {
    display: inline-block;
    text-decoration: none;
    font-weight: 600;
    font-size: 28px;
    line-height: 1.2;
    color: #222222;
}

.reg-card__top {
    margin-bottom: 28px;
}

.reg-card__top .text-center {
    margin-bottom: 12px !important;
}

.reg-login-hint {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: #6b7280;
}

.reg-login-hint + .reg-login-hint {
    margin-top: 10px;
}

.reg-login-hint--before-btn {
    margin-bottom: 20px;
}

.reg-login-hint a {
    color: var(--greeny, #07c0a1);
    font-weight: 600;
    text-decoration: none;
}

.reg-login-hint a:hover {
    color: #06ad91;
    text-decoration: underline;
}

.reg-card__footer {
    margin-top: 28px;
    padding-top: 4px;
}

body.body_guest.body_auth .form-control {
    background-color: #ffffff;
    border: 1px solid #c5cdd5;
    border-radius: 8px;
    color: #1a2332;
    font-size: 1rem;
    min-height: 48px;
    padding: 0.65rem 0.9rem;
    box-shadow: none;
}

body.body_guest.body_auth .form-control:hover:not(:focus):not(:disabled) {
    border-color: #9aa7b2;
}

body.body_guest.body_auth .form-control:focus {
    border-color: var(--greeny, #07c0a1);
    background-color: #ffffff;
    color: #111827;
    box-shadow: 0 0 0 2px rgba(7, 192, 161, 0.16);
    outline: 0;
}

body.body_guest.body_auth .form-control::placeholder {
    color: #8a97a3;
    opacity: 1;
}

body.body_guest.body_auth .form-check-input {
    border: 1px solid #b0bec5;
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
}

body.body_guest.body_auth .form-check-input:checked {
    background-color: var(--greeny, #07c0a1);
    border-color: var(--greeny, #07c0a1);
}

body.body_guest.body_auth .form-check-input:focus {
    border-color: var(--greeny, #07c0a1);
    box-shadow: 0 0 0 2px rgba(7, 192, 161, 0.16);
}

body.body_guest.body_auth .form-check-label {
    color: #374151;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
}

body.body_guest.body_auth .form-check-label a {
    color: var(--greeny, #07c0a1);
    text-decoration: underline;
    text-underline-offset: 2px;
}

body.body_guest.body_auth .btn-primary,
body.body_guest.body_auth .reg-btn.btn-primary {
    background-color: var(--greeny, #07c0a1);
    border-color: var(--greeny, #07c0a1);
    font-weight: 600;
    min-height: 48px;
    border-radius: 8px;
    box-shadow: none;
}

body.body_guest.body_auth .btn-primary:hover:not(:disabled),
body.body_guest.body_auth .reg-btn.btn-primary:hover:not(:disabled) {
    background-color: #06ad91;
    border-color: #06ad91;
}

body.body_guest.body_auth .btn-primary:disabled,
body.body_guest.body_auth .reg-btn:disabled {
    opacity: 1;
    cursor: not-allowed;
    background-color: #d7dde2;
    border-color: #d7dde2;
    color: #6b7280;
}

.reg-panel {
    width: 100%;
}

.reg-step[hidden] {
    display: none !important;
}

.reg-progress {
    margin-bottom: 20px;
}

.reg-progress__label {
    display: block;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.reg-progress__bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.reg-progress__fill {
    display: block;
    height: 100%;
    background: var(--greeny, #07c0a1);
    border-radius: 999px;
}

.reg-title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    color: #1a2332;
}

.reg-subtitle {
    margin: 0 0 24px;
    font-size: 14px;
    line-height: 1.45;
    color: #6b7280;
}

.reg-role-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reg-role {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    width: 100%;
    min-height: 88px;
    text-align: left;
    padding: 16px 18px;
    border: 1.5px solid #d0d7de;
    border-radius: 12px;
    background: #fafbfc;
    cursor: pointer;
    color: inherit;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.reg-role:hover {
    border-color: rgba(7, 192, 161, 0.45);
    background: #f4fbf9;
}

.reg-role:focus-visible {
    outline: 2px solid rgba(7, 192, 161, 0.45);
    outline-offset: 2px;
}

.reg-role.is-selected {
    border-color: var(--greeny, #07c0a1);
    background: #eef9f6;
    box-shadow: 0 0 0 1px rgba(7, 192, 161, 0.2);
}

.reg-role__icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #e8eef1;
    color: #3d4a54;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.reg-role.is-selected .reg-role__icon {
    background: rgba(7, 192, 161, 0.16);
    color: #077c63;
}

.reg-role__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

/* Тип аккаунта — главный акцент */
.reg-role__label {
    font-size: 17px;
    color: #111827;
    font-weight: 600;
    line-height: 1.25;
}

.reg-role__main {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    line-height: 1.35;
}

.reg-role__desc {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.35;
}

.reg-role__radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #c5cdd5;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    background: #fff;
}

.reg-role.is-selected .reg-role__radio {
    border-color: var(--greeny, #07c0a1);
}

.reg-role.is-selected .reg-role__radio::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--greeny, #07c0a1);
}

.reg-role-note {
    margin: 16px 0 24px;
    font-size: 13px;
    line-height: 1.45;
    color: #8a97a3;
}

.reg-role-summary {
    margin: 12px 0 24px;
}

.reg-role-summary__title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.reg-role--summary {
    cursor: default;
    pointer-events: none;
}

.reg-role--summary:hover {
    border-color: var(--greeny, #07c0a1);
    background: #eef9f6;
}

.reg-role__change {
    pointer-events: auto;
    align-self: center;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    color: var(--greeny, #07c0a1);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
    cursor: pointer;
}

.reg-role__change:hover {
    opacity: 0.85;
}

.reg-role__change:focus-visible {
    outline: 2px solid rgba(7, 192, 161, 0.45);
    outline-offset: 2px;
    border-radius: 2px;
}

.reg-link-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--greeny, #07c0a1);
    font-weight: 600;
    font-size: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.reg-link-btn:hover {
    opacity: 0.85;
}

.reg-link-btn:focus-visible {
    outline: 2px solid rgba(7, 192, 161, 0.45);
    outline-offset: 2px;
    border-radius: 2px;
}

.reg-field {
    margin-bottom: 20px;
}

.reg-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.reg-input-wrap {
    position: relative;
}

.reg-checks {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 8px 0 24px;
}

.reg-field-error {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.4;
    color: #c62828;
}

.reg-field-error[hidden] {
    display: none !important;
}

.reg-field-error:not([hidden]) {
    margin-bottom: 16px;
}

.reg-btn {
    width: 100%;
    margin-top: 4px;
}

.reg-btn--secondary {
    background: #e8ecef;
    border: 1px solid #e8ecef;
    color: #4b5563;
    font-weight: 600;
    min-height: 48px;
    border-radius: 8px;
}

.reg-btn--secondary:not(:disabled) {
    background-color: var(--greeny, #07c0a1);
    border-color: var(--greeny, #07c0a1);
    color: #fff;
}

.reg-btn--secondary:not(:disabled):hover {
    background-color: #06ad91;
    border-color: #06ad91;
    color: #fff;
}

.reg-btn.is-loading:disabled {
    background-color: var(--greeny, #07c0a1);
    border-color: var(--greeny, #07c0a1);
    color: #fff;
    opacity: 0.85;
}

.reg-btn.is-loading .reg-btn__loading {
    display: inline !important;
}

.reg-btn.is-loading .reg-btn__label {
    display: none;
}

.reg-verify {
    text-align: center;
}

.reg-verify-lead {
    margin: 0 0 20px;
    font-size: 16px;
    line-height: 1.4;
    color: #374151;
}

.reg-verify-masked {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.45;
    color: #6b7280;
}

.reg-verify-hint {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.45;
    color: #6b7280;
}

.reg-call-timer {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 8px auto 24px;
}

.reg-verify[data-mode="sms"] .reg-call-timer {
    display: none;
}

.reg-call-timer__ring {
    width: 100%;
    height: 100%;
    display: block;
}

.reg-call-timer__track {
    stroke: #e5e7eb;
}

.reg-call-timer__progress {
    stroke: var(--greeny, #07c0a1);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.2s linear;
}

.reg-call-timer__num {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    font-weight: 600;
    color: #1a2332;
}

.reg-otp {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}

.reg-otp__cell {
    width: 46px;
    height: 50px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    border: 1px solid #c5cdd5;
    border-radius: 8px;
    background: #fff;
    color: #1a2332;
    caret-color: var(--greeny, #07c0a1);
}

.reg-otp__cell:focus {
    border-color: var(--greeny, #07c0a1);
    outline: 0;
    box-shadow: 0 0 0 2px rgba(7, 192, 161, 0.16);
}

.reg-verify-fallback {
    margin-top: 24px;
}

.reg-verify-fallback__q {
    margin: 0 0 12px;
    font-size: 14px;
    color: #6b7280;
}

.reg-verify-fallback__timer {
    margin: 0 0 12px;
    font-size: 14px;
    color: #6b7280;
}

.reg-success {
    margin-top: 20px;
    color: #077c63;
    font-size: 14px;
    line-height: 1.45;
    text-align: center;
}

.reg-success[hidden] {
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .reg-role,
    .reg-call-timer__progress,
    body.body_guest.body_auth .form-control {
        transition: none !important;
    }
}

@media (max-width: 400px) {
    .reg-otp__cell {
        width: 40px;
        height: 46px;
        font-size: 1.05rem;
    }

    .reg-role {
        padding: 14px 14px;
        gap: 12px;
        min-height: 84px;
    }

    .reg-role__label {
        font-size: 16px;
    }

    .reg-role__main {
        font-size: 13px;
    }

    .reg-title {
        font-size: 22px;
    }
}
