:root {
    --gh-auth-blue: #0689ca;
    --gh-auth-blue-strong: #006ea9;
    --gh-auth-ink: #10243a;
    --gh-auth-muted: #60758d;
    --gh-auth-line: #d9e4ed;
    --gh-auth-soft: #f4f8fb;
    --gh-auth-white: #ffffff;
    --gh-auth-danger: #c83c4d;
    --gh-auth-success: #139465;
}

.gh-modern-login,
.gh-modern-login *,
.gh-modern-auth-card,
.gh-modern-auth-card * {
    box-sizing: border-box;
}

html.gh-modern-auth,
body.gh-modern-auth {
    min-height: 100%;
    background: var(--gh-auth-soft) !important;
}

body.gh-modern-auth {
    color: var(--gh-auth-ink) !important;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

body.gh-modern-auth > header,
body.gh-modern-auth > nav,
body.gh-modern-auth > footer,
body.gh-modern-auth .gh-site-header,
body.gh-modern-auth .gh-site-footer,
body.gh-modern-auth .main-navbar-wrapper,
body.gh-modern-auth .pre-footer,
body.gh-modern-auth .gh-auth-shell__bg,
body.gh-modern-auth .gh-auth-shell__foot {
    display: none !important;
}

body.gh-modern-auth #main-body,
body.gh-modern-auth #main-body > .container,
body.gh-modern-auth #main-body > .container > .row,
body.gh-modern-auth .primary-content {
    width: 100% !important;
    max-width: none !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.gh-modern-auth .gh-auth-shell {
    min-height: 100vh !important;
    background: var(--gh-auth-soft) !important;
    color: var(--gh-auth-ink) !important;
}

body.gh-modern-auth .gh-auth-shell__topbar {
    position: relative !important;
    z-index: 2;
    display: flex !important;
    min-height: 82px;
    padding: 20px clamp(24px, 5vw, 72px) !important;
    background: #fff !important;
    border-bottom: 1px solid var(--gh-auth-line) !important;
}

body.gh-modern-auth .gh-auth-shell__logo img { height: 34px !important; }
body.gh-modern-auth .gh-auth-shell__back { color: var(--gh-auth-ink) !important; }

body.gh-modern-auth .gh-auth-shell__main {
    position: relative !important;
    z-index: 1;
    display: grid !important;
    place-items: center;
    min-height: calc(100vh - 82px) !important;
    padding: 48px 24px !important;
}

body.gh-modern-auth .gh-auth-shell__main > .gh-auth-card {
    width: min(100%, 500px) !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

body.gh-modern-auth .gh-auth-inner,
body.gh-modern-auth .gh-auth-inner .row,
body.gh-modern-auth .gh-auth-inner .primary-content {
    min-height: 0 !important;
}

.gh-modern-login {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    grid-template-columns: minmax(380px, 0.86fr) minmax(540px, 1.14fr);
    overflow: hidden;
    background: #fff;
}

.gh-modern-login__brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    padding: clamp(38px, 5vw, 72px);
    overflow: hidden;
    color: #fff;
    background: linear-gradient(145deg, #0797d7 0%, #007bbd 58%, #00689f 100%);
}

.gh-modern-login__brand::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .2;
    background-image: radial-gradient(circle, rgba(255,255,255,.9) 1.2px, transparent 1.4px);
    background-size: 24px 24px;
    mask-image: linear-gradient(to bottom right, transparent 8%, #000 48%, transparent 90%);
}

.gh-modern-login__brand::after {
    content: "";
    position: absolute;
    width: 460px;
    height: 460px;
    right: -220px;
    bottom: -220px;
    border: 1px solid rgba(255,255,255,.26);
    border-radius: 50%;
    box-shadow: 0 0 0 80px rgba(255,255,255,.04), 0 0 0 160px rgba(255,255,255,.035);
}

.gh-modern-login__logo,
.gh-modern-login__brand-copy,
.gh-modern-login__brand > small,
.gh-modern-login__signal { position: relative; z-index: 1; }

.gh-modern-login__logo img {
    display: block;
    width: auto;
    max-width: 210px;
    height: 42px;
    object-fit: contain;
    object-position: left center;
    filter: brightness(0) invert(1);
}

.gh-modern-login__brand-copy { max-width: 520px; }
.gh-modern-login__eyebrow,
.gh-modern-card__kicker,
.gh-modern-auth-card__heading > span {
    display: block;
    margin-bottom: 16px;
    color: inherit;
    font-size: 13px;
    font-weight: 750;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.gh-modern-login__brand-copy h1 {
    margin: 0 0 28px;
    color: #fff;
    font-size: clamp(38px, 4vw, 62px);
    font-weight: 720;
    letter-spacing: -.045em;
    line-height: 1.04;
}

.gh-modern-login__status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 999px;
    background: rgba(255,255,255,.1);
    font-size: 14px;
    font-weight: 650;
}

.gh-modern-login__status i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #79f0c0;
    box-shadow: 0 0 0 5px rgba(121,240,192,.12);
}

.gh-modern-login__brand > small {
    max-width: 440px;
    color: rgba(255,255,255,.76);
    font-size: 14px;
    line-height: 1.55;
}

.gh-modern-login__signal {
    position: absolute;
    top: 22%;
    right: 9%;
    display: flex;
    align-items: end;
    gap: 6px;
    height: 48px;
    opacity: .7;
}

.gh-modern-login__signal span { width: 4px; border-radius: 8px; background: #fff; }
.gh-modern-login__signal span:nth-child(1) { height: 14px; }
.gh-modern-login__signal span:nth-child(2) { height: 26px; }
.gh-modern-login__signal span:nth-child(3) { height: 38px; }
.gh-modern-login__signal span:nth-child(4) { height: 48px; }

.gh-modern-login__main {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
    min-height: 0;
    padding: 86px clamp(32px, 8vw, 120px) 64px;
    background: #fff;
}

.gh-modern-login__back {
    position: absolute;
    top: 34px;
    right: 42px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--gh-auth-muted);
    font-size: 14px;
    font-weight: 650;
}

.gh-modern-login__back:hover { color: var(--gh-auth-blue-strong); text-decoration: none; }

.gh-modern-card,
.gh-modern-auth-card {
    width: min(100%, 460px);
    margin: auto 0;
}

.gh-modern-card__header,
.gh-modern-auth-card__heading { margin-bottom: 34px; }
.gh-modern-card__kicker,
.gh-modern-auth-card__heading > span { margin-bottom: 12px; color: var(--gh-auth-blue-strong); }

.gh-modern-card__header h2,
.gh-modern-auth-card__heading h1 {
    margin: 0 0 10px;
    color: var(--gh-auth-ink);
    font-size: clamp(31px, 3vw, 42px);
    font-weight: 720;
    letter-spacing: -.035em;
    line-height: 1.08;
}

.gh-modern-card__header p,
.gh-modern-auth-card__heading p {
    margin: 0;
    color: var(--gh-auth-muted);
    font-size: 16px;
    line-height: 1.55;
}

.gh-modern-form { display: grid; gap: 21px; }
.gh-modern-field { display: grid; gap: 9px; margin: 0 !important; }
.gh-modern-field__row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.gh-modern-field label,
.gh-modern-strength > label { margin: 0; color: var(--gh-auth-ink); font-size: 14px; font-weight: 700; }
.gh-modern-field__row a { color: var(--gh-auth-blue-strong); font-size: 13px; font-weight: 650; }

.gh-modern-field input,
.gh-modern-field select,
.gh-modern-field textarea,
.gh-modern-password input {
    width: 100%;
    height: 54px;
    padding: 0 16px;
    color: var(--gh-auth-ink);
    font-size: 16px;
    border: 1px solid var(--gh-auth-line);
    border-radius: 10px;
    background: #fff;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.gh-modern-field input:focus,
.gh-modern-password input:focus {
    border-color: var(--gh-auth-blue);
    box-shadow: 0 0 0 4px rgba(6,137,202,.11);
}

.gh-modern-password { position: relative; }
.gh-modern-password input { padding-right: 52px; }
.gh-modern-password button {
    position: absolute;
    top: 50%;
    right: 9px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    color: var(--gh-auth-muted);
    border: 0;
    border-radius: 8px;
    background: transparent;
    transform: translateY(-50%);
}

.gh-modern-check { display: inline-flex; align-items: center; gap: 10px; margin: -2px 0 0; color: var(--gh-auth-muted); font-size: 14px; cursor: pointer; }
.gh-modern-check input { width: 17px; height: 17px; accent-color: var(--gh-auth-blue); }

.gh-modern-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 54px;
    padding: 0 24px;
    color: #fff !important;
    font-size: 15px;
    font-weight: 750;
    border: 0;
    border-radius: 999px;
    background: var(--gh-auth-blue);
    box-shadow: 0 10px 24px rgba(6,137,202,.18);
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.gh-modern-button:hover { color: #fff; text-decoration: none; background: var(--gh-auth-blue-strong); transform: translateY(-1px); box-shadow: 0 13px 28px rgba(6,137,202,.23); }
.gh-modern-button--link { margin-top: 4px; }

.gh-modern-card__footer { margin: 30px 0 0; color: var(--gh-auth-muted); font-size: 14px; text-align: center; }
.gh-modern-card__footer a { color: var(--gh-auth-blue-strong); font-weight: 700; }
.gh-modern-secondary-link { display: inline-flex; justify-content: center; align-items: center; gap: 8px; color: var(--gh-auth-muted); font-size: 14px; font-weight: 650; }
.gh-modern-secondary-link:hover { color: var(--gh-auth-blue-strong); text-decoration: none; }

.gh-modern-alert {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin: 0 0 24px;
    padding: 14px 16px;
    color: #78323a;
    font-size: 14px;
    line-height: 1.45;
    border: 1px solid #f0cbd0;
    border-radius: 10px;
    background: #fff5f6;
}
.gh-modern-alert ul { margin: 0; padding: 0; list-style: none; }
.gh-modern-alert ul,
.gh-modern-alert ol,
.gh-modern-alert li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}
.gh-modern-alert li {
    margin-bottom: 4px !important;
    line-height: 1.45 !important;
}
.gh-modern-alert li:last-child { margin-bottom: 0 !important; }
.gh-modern-alert p { margin: 0; padding: 0; }

.gh-modern-alert--warning { color: #775518; border-color: #eeddb9; background: #fffaf0; }
.gh-modern-alert--success { color: #176845; border-color: #bfe6d6; background: #effaf6; }
.gh-modern-card > .alert,
.gh-modern-auth-card > .alert {
    margin: 0 0 24px !important;
    padding: 14px 16px !important;
    color: #78323a !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
    border: 1px solid #f0cbd0 !important;
    border-radius: 10px !important;
    background: #fff5f6 !important;
    box-shadow: none !important;
}
.gh-modern-captcha { display: flex; justify-content: center; overflow: hidden; }

.gh-modern-auth-card {
    margin: auto;
    padding: clamp(30px, 5vw, 52px);
    border: 1px solid var(--gh-auth-line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 22px 55px rgba(20,56,83,.09);
}

.gh-modern-auth-brand {
    position: fixed;
    top: 28px;
    left: 36px;
    z-index: 4;
    display: inline-flex;
}

.gh-modern-auth-brand img {
    width: auto;
    height: 38px;
}

.gh-modern-auth-card__icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 28px;
    color: var(--gh-auth-blue-strong);
    font-size: 20px;
    border-radius: 15px;
    background: #e8f6fc;
}

.gh-modern-auth-card__icon--success { color: var(--gh-auth-success); background: #e9f8f2; }
.gh-modern-auth-card__icon--warning { color: #a56a08; background: #fff6e4; }
.gh-modern-auth-card__icon--error { color: var(--gh-auth-danger); background: #fff0f2; }
.gh-modern-strength { display: grid; gap: 8px; }
.gh-modern-challenge { text-align: center; }
.gh-modern-challenge input { width: 100% !important; height: 56px !important; border: 1px solid var(--gh-auth-line) !important; border-radius: 10px !important; }

/* Cadastro: reaproveita a logica existente, mas remove a aparencia escura anterior. */
body.gh-modern-auth .gh-panel.gh-register-page {
    position: fixed !important;
    inset: 0 !important;
    z-index: 10000;
    min-height: 100vh !important;
    overflow: auto;
    color: var(--gh-auth-ink) !important;
    background: var(--gh-auth-soft) !important;
}

body.gh-modern-auth .gh-register-page > .container { max-width: 1060px !important; padding: 0 28px 56px !important; }
body.gh-modern-auth .gh-register-page::before,
body.gh-modern-auth .gh-register-page::after { display: none !important; content: none !important; }
body.gh-modern-auth .gh-register-page .gh-auth-shell__topbar {
    display: flex !important;
    margin: 0 0 42px !important;
    padding: 20px 0 !important;
    background: transparent !important;
    border-bottom: none !important;
}
body.gh-modern-auth .gh-register-page .gh-auth-shell__logo img { width: auto !important; height: 40px !important; max-width: 170px !important; filter: none !important; }
body.gh-modern-auth .gh-register-page .gh-home-auth { display: block !important; min-height: 0 !important; }
body.gh-modern-auth .gh-register-page .gh-home-auth__card-wrap { width: 100% !important; max-width: none !important; }
body.gh-modern-auth .gh-register-page .gh-auth-card--register {
    max-width: none !important;
    padding: clamp(30px, 5vw, 56px) !important;
    color: var(--gh-auth-ink) !important;
    border: 0 !important;
    border-radius: 24px !important;
    background: #fff !important;
    box-shadow: 0 18px 46px rgba(20,56,83,.08) !important;
}
body.gh-modern-auth .gh-register-page .gh-login-card__header h2,
body.gh-modern-auth .gh-register-page .gh-step__title { color: var(--gh-auth-ink) !important; }
body.gh-modern-auth .gh-register-page .gh-login-card__header p,
body.gh-modern-auth .gh-register-page .gh-field__hint,
body.gh-modern-auth .gh-register-page .gh-field__opt { color: var(--gh-auth-muted) !important; }

/* Modern Tech Stepper (Segmented Bars) */
body.gh-modern-auth .gh-register-page .gh-stepper {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    margin: 0 0 38px !important;
    padding: 0 !important;
}
body.gh-modern-auth .gh-register-page .gh-stepper__item {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    flex: 1 !important;
    text-align: left !important;
}
body.gh-modern-auth .gh-register-page .gh-stepper__line { display: none !important; }
body.gh-modern-auth .gh-register-page .gh-stepper__dot {
    display: block !important;
    width: 100% !important;
    height: 4px !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 4px !important;
    background: #edf3f7 !important;
    color: transparent !important;
    box-shadow: none !important;
    overflow: hidden !important;
}
body.gh-modern-auth .gh-register-page .gh-stepper__dot::before,
body.gh-modern-auth .gh-register-page .gh-stepper__dot::after { display: none !important; }
body.gh-modern-auth .gh-register-page .gh-stepper__label {
    display: block !important;
    color: var(--gh-auth-muted) !important;
    font-size: 11px !important;
    font-weight: 750 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
}
body.gh-modern-auth .gh-register-page .gh-stepper__item.is-done .gh-stepper__dot,
body.gh-modern-auth .gh-register-page .gh-stepper__item.is-active .gh-stepper__dot { background: var(--gh-auth-blue) !important; }
body.gh-modern-auth .gh-register-page .gh-stepper__item.is-active .gh-stepper__label { color: var(--gh-auth-ink) !important; }
body.gh-modern-auth .gh-register-page .gh-stepper__item.is-done .gh-stepper__label { color: var(--gh-auth-blue-strong) !important; }
body.gh-modern-auth .gh-register-page .gh-btn--primary { color: #fff !important; border-radius: 999px !important; background: var(--gh-auth-blue) !important; }
body.gh-modern-auth .gh-register-page .gh-btn--ghost { color: var(--gh-auth-ink) !important; border-color: var(--gh-auth-line) !important; border-radius: 999px !important; background: #fff !important; }
body.gh-modern-auth .gh-register-page button.gh-btn.gh-btn--primary[data-step-next],
body.gh-modern-auth .gh-register-page button.gh-btn.gh-btn--primary[data-step-submit] {
    color: #fff !important;
    background-color: var(--gh-auth-blue) !important;
    background-image: none !important;
    box-shadow: 0 10px 24px rgba(6,137,202,.16) !important;
}
/* Force custom fields (CPF/CNPJ) to use modern styling */
body.gh-modern-auth .gh-register-page .gh-field__custom input,
body.gh-modern-auth .gh-register-page .gh-field__custom select,
body.gh-modern-auth .gh-register-page .gh-field__custom textarea {
    width: 100% !important;
    height: 54px !important;
    padding: 0 16px !important;
    color: var(--gh-auth-ink) !important;
    font-size: 16px !important;
    border: 1px solid var(--gh-auth-line) !important;
    border-radius: 10px !important;
    background: #fff !important;
    outline: none !important;
    box-shadow: none !important;
}
body.gh-modern-auth .gh-register-page .gh-field__custom input:focus,
body.gh-modern-auth .gh-register-page .gh-field__custom select:focus,
body.gh-modern-auth .gh-register-page .gh-field__custom textarea:focus {
    border-color: var(--gh-auth-blue) !important;
    box-shadow: 0 0 0 4px rgba(6,137,202,.11) !important;
}
body.gh-modern-auth .gh-register-page .gh-pw-strength__label {
    color: var(--gh-auth-muted) !important;
    opacity: 1 !important;
}
body.gh-modern-auth .gh-register-page #default-captcha-domainchecker {
    align-items: center;
    max-width: 520px;
    margin: 4px auto 0;
    color: var(--gh-auth-muted) !important;
}
body.gh-modern-auth .gh-register-page #default-captcha-domainchecker > p {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 14px;
    color: var(--gh-auth-muted) !important;
    font-size: 14px;
}
body.gh-modern-auth .gh-register-page #inputCaptcha {
    height: 42px;
    border-color: var(--gh-auth-line) !important;
    border-radius: 9px;
}
body.gh-modern-auth .gh-register-page .gh-login-card__signup {
    color: var(--gh-auth-muted) !important;
    opacity: 1 !important;
}
body.gh-modern-auth .gh-register-page .gh-login-card__signup a {
    color: var(--gh-auth-blue-strong) !important;
}

@media (max-width: 900px) {
    .gh-modern-login { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
    .gh-modern-login__brand {
        min-height: 210px;
        padding: 28px;
    }
    .gh-modern-login__brand-copy h1 { max-width: 520px; margin: 0; font-size: 34px; }
    .gh-modern-login__eyebrow,
    .gh-modern-login__status,
    .gh-modern-login__brand > small,
    .gh-modern-login__signal { display: none; }
    .gh-modern-login__main { height: 100%; min-height: 0; padding: 70px 28px 52px; }
    .gh-modern-login__back { top: 22px; right: 28px; }
}

@media (max-width: 560px) {
    html.gh-modern-auth,
    body.gh-modern-auth { overflow-x: hidden !important; }
    .gh-modern-login { width: 100vw !important; min-width: 0 !important; max-width: 100vw !important; overflow-x: hidden !important; }
    .gh-modern-login__brand,
    .gh-modern-login__main { width: 100vw !important; min-width: 0 !important; max-width: 100vw !important; overflow-x: hidden !important; }
    .gh-modern-card { width: calc(100vw - 44px) !important; min-width: 0 !important; max-width: calc(100vw - 44px) !important; }
    .gh-modern-login__brand { min-height: 156px; padding: 24px 22px; }
    .gh-modern-login__logo img { height: 34px; }
    .gh-modern-login__brand-copy h1 { max-width: calc(100vw - 44px); font-size: 27px; overflow-wrap: anywhere; }
    .gh-modern-login__main { height: 100%; min-height: 0; padding: 66px 22px 42px !important; }
    .gh-modern-login__back { top: 20px; right: 22px; }
    .gh-modern-field__row { gap: 8px; }
    .gh-modern-field__row a { max-width: 48%; text-align: right; }
    .gh-modern-field input,
    .gh-modern-password,
    .gh-modern-password input,
    .gh-modern-button { width: 100% !important; min-width: 0 !important; max-width: 100% !important; }
    .gh-modern-card__header h2,
    .gh-modern-auth-card__heading h1 { font-size: 30px; }
    .gh-modern-auth-card { padding: 30px 22px; border-radius: 18px; }
    .gh-modern-auth-brand { position: absolute; top: 22px; left: 22px; }
    .gh-modern-auth-brand img { height: 32px; }
    body.gh-modern-auth .gh-auth-shell__topbar { padding: 18px 22px !important; }
    body.gh-modern-auth .gh-auth-shell__main { padding: 32px 16px !important; }
    body.gh-modern-auth .gh-register-page > .container { padding: 0 16px 32px !important; }
    body.gh-modern-auth .gh-register-page .gh-auth-card--register { padding: 26px 20px !important; border-radius: 18px !important; }
}

@media (prefers-reduced-motion: reduce) {
    .gh-modern-button,
    .gh-modern-field input,
    .gh-modern-password input { transition: none !important; }
}
