:root {
    --cb-register-blue: #09527e;
    --cb-register-blue-dark: #074063;
    --cb-register-text: #1f2937;
    --cb-register-muted: #6b7280;
    --cb-register-border: #cfd8e3;
    --cb-register-bg: #f5f8fb;
    --cb-register-white: #ffffff;
    --cb-register-danger: #b42318;
    --cb-register-danger-bg: #fef3f2;
    --cb-register-success: #166534;
    --cb-register-success-bg: #ecfdf3;
    --cb-register-shadow: 0 20px 45px rgba(9, 82, 126, 0.12);
}

body.page-template-custom-register,
body.page-template-custom-login,
body.cb-auth-body {
    background: #ffffff;
}

body.page-template-custom-register #page,
body.page-template-custom-login #page,
body.cb-auth-body #page {
    min-height: 100vh;
}

.cb-auth-topbar {
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem clamp(1rem, 4vw, 3rem);
    border-bottom: 1px solid var(--cb-register-border);
    background: #fff;
}

.cb-auth-topbar__brand,
.cb-auth-topbar__back {
    color: #1f3b73;
    font-weight: 800;
    text-decoration: none;
}

.cb-auth-topbar__brand { font-size: 1.2rem; }
.cb-auth-topbar__back { min-height: 44px; display: inline-flex; align-items: center; padding: 0 0.75rem; border-radius: 0.65rem; }
.cb-auth-topbar__brand:focus-visible,
.cb-auth-topbar__back:focus-visible { outline: 3px solid rgba(47, 97, 232, 0.35); outline-offset: 3px; }

.cb-auth-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

.cb-auth-branding,
.cb-auth-panel {
    width: 100%;
}

.cb-auth-branding {
    position: relative;
    display: flex;
    flex: 1 1 50%;
    overflow: hidden;
    background-color: var(--cb-register-blue);
    color: var(--cb-register-white);
    background-image: linear-gradient(180deg, rgba(7, 64, 99, 0.45), rgba(9, 82, 126, 0.82)), var(--cb-auth-bg-image);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.cb-auth-branding::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(9, 82, 126, 0.92) 0%, rgba(7, 64, 99, 0.86) 100%);
    mix-blend-mode: multiply;
}

.cb-auth-branding-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    padding: 2rem;
    gap: 2rem;
}

.cb-auth-logo {
    display: inline-flex;
    align-items: center;
    max-width: 220px;
}

.cb-auth-logo img,
.cb-auth-logo svg {
    width: auto;
    max-width: 100%;
    height: auto;
}

.cb-auth-site-name {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--cb-register-white);
    text-decoration: none;
}

.cb-auth-copy {
    max-width: 34rem;
}

.cb-auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cb-auth-title {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.05;
    color: var(--cb-register-white);
}

.cb-auth-description {
    margin: 0;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.88);
}

.cb-auth-footer-copy {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
}

.cb-auth-panel {
    display: flex;
    flex: 1 1 50%;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: var(--cb-register-white);
}

.cb-auth-card {
    width: 100%;
    max-width: 26rem;
}

.cb-auth-heading {
    margin: 0 0 0.75rem;
    color: var(--cb-register-text);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.15;
}

.cb-auth-intro {
    margin: 0 0 1.75rem;
    color: var(--cb-register-muted);
    font-size: 1rem;
    line-height: 1.65;
}

.cb-auth-alert {
    margin-bottom: 1.25rem;
    padding: 1rem 1rem 1rem 1.125rem;
    border-radius: 1rem;
    border: 1px solid transparent;
    font-size: 0.95rem;
    line-height: 1.6;
}

.cb-auth-alert--error {
    color: var(--cb-register-danger);
    background: var(--cb-register-danger-bg);
    border-color: rgba(180, 35, 24, 0.18);
}

.cb-auth-alert--success {
    color: var(--cb-register-success);
    background: var(--cb-register-success-bg);
    border-color: rgba(22, 101, 52, 0.15);
}

.cb-auth-alert ul {
    margin: 0.5rem 0 0;
    padding-left: 1.125rem;
}

.cb-auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.cb-auth-oauth {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-bottom: 1.25rem;
}

.cb-auth-oauth.is-loading {
    opacity: 0.72;
    pointer-events: none;
}

.cb-auth-oauth-copy {
    margin: 0;
    color: var(--cb-register-muted);
    font-size: 0.92rem;
    line-height: 1.6;
    text-align: center;
}

.cb-auth-oauth-button {
    display: flex;
    justify-content: center;
    width: 100%;
    min-height: 44px;
}

.cb-auth-oauth-button > div,
.cb-auth-oauth-button iframe {
    max-width: 100%;
}

.cb-auth-oauth-feedback {
    min-height: 1px;
}

.cb-auth-oauth-feedback .cb-auth-alert {
    margin-bottom: 0;
}

.cb-auth-alert--inline-status {
    border-style: dashed;
}

.cb-auth-divider {
    position: relative;
    margin: 0 0 1.35rem;
    text-align: center;
}

.cb-auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(26, 26, 26, 0.12);
}

.cb-auth-divider span {
    position: relative;
    display: inline-block;
    padding: 0 0.85rem;
    background: #ffffff;
    color: var(--cb-register-muted);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
}

.cb-auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cb-auth-label {
    color: #1a1a1a;
    font-size: 0.95rem;
    font-weight: 700;
}

.cb-auth-input,
.cb-auth-input:focus,
.cb-auth-input:hover {
    width: 100%;
    min-height: 3rem;
    padding: 0.75rem 1rem;
    border: 1px solid #b3b3b3;
    border-radius: 0.5rem;
    background: #ffffff;
    color: var(--cb-register-text);
    box-shadow: none;
    outline: none;
}

.cb-auth-input:focus {
    border-color: var(--cb-register-blue);
    box-shadow: 0 0 0 3px rgba(9, 82, 126, 0.15);
}

.cb-auth-input::placeholder {
    color: #97a3b6;
}

.cb-auth-phone-wrap{display:flex;align-items:stretch;border:1px solid #cbd5e1;border-radius:12px;background:#fff;overflow:hidden;transition:border-color .2s ease,box-shadow .2s ease}.cb-auth-phone-wrap:focus-within{border-color:#1f4487;box-shadow:0 0 0 3px rgba(31,68,135,.13)}.cb-auth-phone-wrap>span{display:flex;align-items:center;padding:0 14px;border-right:1px solid #dbe3ed;background:#f4f7fb;color:#10213d;font-weight:800}.cb-auth-phone-wrap .cb-auth-input{border:0!important;border-radius:0!important;box-shadow:none!important}

.cb-auth-password-wrap {
    position: relative;
}

.cb-auth-password-wrap .cb-auth-input {
    padding-right: 3.5rem;
}

.cb-auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--cb-register-blue);
    transform: translateY(-50%);
    cursor: pointer;
}

.cb-auth-password-toggle:hover,
.cb-auth-password-toggle:focus {
    color: var(--cb-register-blue-dark);
    outline: none;
}

.cb-auth-password-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
}

.cb-auth-password-toggle .cb-auth-icon-eye-off {
    display: none;
}

.cb-auth-password-toggle.is-visible .cb-auth-icon-eye {
    display: none;
}

.cb-auth-password-toggle.is-visible .cb-auth-icon-eye-off {
    display: block;
}

.cb-auth-password-hint {
    margin: -0.15rem 0 0;
    color: var(--cb-register-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.cb-auth-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1.75rem;
}

.cb-auth-link,
.cb-auth-links a {
    color: var(--cb-register-blue);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
}

.cb-auth-link:hover,
.cb-auth-links a:hover,
.cb-auth-link:focus,
.cb-auth-links a:focus {
    color: var(--cb-register-blue-dark);
    text-decoration: none;
}

.cb-auth-link--muted {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.cb-auth-logged {
    padding: 1.25rem;
    border: 1px solid rgba(9, 82, 126, 0.16);
    border-radius: 1rem;
    background: var(--cb-register-bg);
    box-shadow: var(--cb-register-shadow);
}

.cb-auth-logged p:last-child {
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .cb-auth-layout {
        flex-direction: row;
    }

    .cb-auth-branding-inner {
        padding: 3rem 4rem;
    }

    .cb-auth-panel {
        padding: 3rem 2rem;
    }
}

@media (min-width: 1200px) {
    .cb-auth-branding-inner {
        padding: 3.5rem 5rem;
    }

    .cb-auth-panel {
        padding: 4rem 3rem;
    }
}

@media (max-width: 767px) {
    .cb-auth-branding {
        min-height: 40vh;
    }

    .cb-auth-branding-inner {
        padding: 1.75rem 1.5rem;
    }

    .cb-auth-heading {
        font-size: 1.75rem;
    }

    .cb-auth-card {
        max-width: 100%;
    }
}
