/* Auth restyle for /phone. Scope to .pen-auth — do not set * / body font-family. */

body:has(.pen-auth) .pen-header,
body:has(.pen-auth) .pen-footer {
    display: none !important;
}

body:has(.pen-auth) .log-reg-v3 {
    margin: 0;
    padding: 0;
    background: transparent;
}

body:has(.pen-auth) .log-reg-v3 > .container {
    width: 100%;
    max-width: none;
    padding: 0;
}

.pen-auth {
    min-height: calc(100vh - 20px);
    background: var(--pen-bg-soft);
    font-family: var(--pen-font-body);
    color: var(--pen-text);
}

.pen-auth__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 72px;
    padding: 12px 32px;
    background: var(--pen-bg);
    border-bottom: 1px solid var(--pen-line);
}

.pen-auth__logo img {
    display: block;
    height: 40px;
    width: auto;
}

.pen-auth__back {
    font-family: var(--pen-font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--pen-brand);
    text-decoration: none;
}

.pen-auth__back:hover,
.pen-auth__back:focus {
    color: var(--pen-brand-deep);
    text-decoration: none;
}

.pen-auth__mid {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 16px 64px;
    background:
        radial-gradient(circle at 50% 0%, var(--pen-sky-50), var(--pen-bg-soft) 70%);
}

.pen-auth__flash {
    width: 100%;
    max-width: 440px;
    margin-bottom: 16px;
}

.pen-auth__card {
    width: 100%;
    max-width: 440px;
    padding: 40px;
    border-radius: 24px;
    background: var(--pen-bg);
    box-shadow: 0 12px 40px rgba(18, 57, 71, 0.08);
}

.pen-auth__card.log-reg-block {
    margin: 0;
    border: none;
}

.pen-auth .sky-form {
    border: none;
    box-shadow: none;
}

.pen-auth__brand {
    margin-bottom: 8px;
}

.pen-auth__brand img {
    height: 40px;
    width: auto;
}

.pen-auth__hd {
    margin-bottom: 8px;
}

.pen-auth__title {
    margin: 0 0 8px;
    font-family: var(--pen-font-head);
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--pen-ink-navy);
    text-transform: none;
}

.pen-auth__lead {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.4;
    color: var(--pen-text-muted);
}

.pen-auth__change {
    margin: 0 0 16px;
}

.pen-auth__change a {
    font-family: var(--pen-font-head);
    font-size: 14px;
    font-weight: 700;
    color: var(--pen-brand);
}

.pen-auth__tabs {
    margin-bottom: 16px;
}

.pen-auth .otp-method-switch {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 5px;
    width: 100%;
    margin: 0;
    padding: 5px;
    border-radius: 12px;
    background: var(--pen-bg-soft);
}

.pen-auth .otp-method-segment {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 10px 14px;
    min-height: 40px;
    cursor: pointer;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--pen-text-muted);
    font-weight: normal;
}

.pen-auth .otp-method-segment:has(.otp-method-radio-input:checked) {
    background: var(--pen-bg);
    color: var(--pen-ink-navy);
    box-shadow: 0 1px 4px rgba(18, 57, 71, 0.08);
}

.pen-auth .otp-method-radio-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.pen-auth .otp-method-segment-label {
    font-family: var(--pen-font-head);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    user-select: none;
}

.pen-auth__field {
    margin-bottom: 16px;
}

.pen-auth__label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--pen-font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--pen-text);
}

.pen-auth__phone {
    display: block;
    border: 1px solid var(--pen-line);
    border-radius: 12px;
    background: var(--pen-bg);
    overflow: hidden;
}

.pen-auth__phone .form-group {
    margin: 0;
}

.pen-auth .pen-auth__phone .form-control {
    height: 48px;
    border: none;
    box-shadow: none;
    font-family: var(--pen-font-head);
    font-size: 16px;
    font-weight: 700;
    color: var(--pen-ink-navy);
    padding: 12px 14px;
}

.pen-auth .pen-auth__input {
    display: block;
    width: 100%;
    height: 48px;
    border: 1px solid var(--pen-line);
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: none;
    font-family: var(--pen-font-body);
    font-size: 16px;
    color: var(--pen-text);
}

.pen-auth .pen-auth__phone .pen-auth__input {
    border: none;
    border-radius: 0;
    width: 100%;
}

.pen-auth .pen-auth__code {
    text-align: center;
    letter-spacing: 0.35em;
    font-family: var(--pen-font-head);
    font-size: 28px;
    font-weight: 800;
}

.pen-auth__captcha {
    margin: 8px 0 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pen-auth .otp-consent {
    max-width: none;
    width: 100%;
    margin: 0 0 16px;
    text-align: left;
}

.pen-auth .otp-consent label {
    font-weight: normal;
    font-size: 13px;
    color: var(--pen-text-muted);
    cursor: pointer;
}

.pen-auth .otp-consent .checkbox {
    padding-left: 0;
    overflow: visible;
}

.pen-auth .otp-consent .checkbox input[type="checkbox"] {
    position: static;
    left: auto;
    display: inline-block;
    width: 16px;
    height: 16px;
    margin: 0 8px 0 0;
    vertical-align: middle;
}

.pen-auth .otp-consent a {
    color: var(--pen-brand);
}

.pen-auth__submit,
.pen-auth .pen-auth__submit.btn-u {
    display: block;
    width: 100%;
    margin: 0;
    padding: 14px 16px;
    border: none;
    border-radius: 12px;
    background: var(--pen-brand);
    color: #ffffff;
    font-family: var(--pen-font-head);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
}

.pen-auth .pen-auth__submit.btn-u:hover,
.pen-auth .pen-auth__submit.btn-u:focus {
    background: var(--pen-brand-deep);
    color: #ffffff;
}

#otp-get-code:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.pen-auth__sec,
.pen-auth__resend {
    margin: 16px 0 0;
    text-align: center;
    font-size: 12px;
    color: var(--pen-text-muted);
}

.pen-auth__resend {
    font-size: 13px;
}

.pen-auth__resend-link {
    display: block;
    margin-top: 8px;
    text-align: center;
    font-family: var(--pen-font-head);
    font-size: 14px;
    font-weight: 700;
    color: var(--pen-brand);
}

@media (max-width: 767px) {
    .pen-auth__top {
        min-height: 50px;
        padding: 12px 16px;
    }

    .pen-auth__logo {
        display: none;
    }

    .pen-auth__mid {
        align-items: stretch;
        padding: 28px 20px 40px;
        background: var(--pen-bg);
    }

    .pen-auth__card {
        max-width: none;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .pen-auth__title {
        font-size: 22px;
    }
}
