:root {
    --reg-green-950: #032d19;
    --reg-green-900: #063f24;
    --reg-green-800: #0b5932;
    --reg-green-700: #237044;
    --reg-lime: #a9cf3c;
    --reg-lime-soft: #edf5d5;
    --reg-cream: #f6f4ec;
    --reg-paper: #fffef9;
    --reg-ink: #17231c;
    --reg-muted: #647169;
    --reg-line: #dce5dc;
    --reg-error: #a52d2d;
}

html,
body.mdp-registration { margin: 0; background: var(--reg-paper) !important; color: var(--reg-ink); }

body.mdp-registration {
    min-height: 100vh;
    font-family: "Hind", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body.mdp-registration *,
body.mdp-registration *::before,
body.mdp-registration *::after { box-sizing: border-box; }

body.mdp-registration .page-container,
body.mdp-registration .page-content,
body.mdp-registration .page-content > .col-md-12,
body.mdp-registration .page-content .content {
    min-height: 0;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible;
    background: transparent !important;
}

body.mdp-registration a { color: inherit; }
body.mdp-registration img { display: block; max-width: 100%; }

.mdp-registration-shell { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }

.mdp-registration-header {
    position: relative;
    z-index: 20;
    border-bottom: 1px solid rgba(3, 45, 25, .1);
    background: #fff;
}

.mdp-registration-header__inner {
    min-height: 78px;
    display: grid;
    grid-template-columns: 180px 1fr 180px;
    align-items: center;
    gap: 24px;
}

.mdp-registration-brand { width: 154px; display: inline-flex; }
.mdp-registration-brand img { width: 100%; }

.mdp-registration-progress { display: flex; align-items: center; justify-content: center; gap: 13px; color: #87928b; font-size: 13px; font-weight: 600; }
.mdp-registration-progress span { display: inline-flex; align-items: center; gap: 7px; }
.mdp-registration-progress b { width: 27px; height: 27px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--reg-line); border-radius: 50%; font-size: 12px; }
.mdp-registration-progress .is-active { color: var(--reg-green-900); }
.mdp-registration-progress .is-active b { border-color: var(--reg-green-900); background: var(--reg-green-900); color: #fff; }
.mdp-registration-progress i { width: 42px; height: 1px; background: var(--reg-line); }

.mdp-registration-back { justify-self: end; color: var(--reg-green-900) !important; font-size: 14px; font-weight: 700; text-decoration: none; }
.mdp-registration-back:hover { text-decoration: underline; text-underline-offset: 4px; }

.mdp-registration-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--reg-line);
    background: linear-gradient(105deg, rgba(237, 245, 213, .82), rgba(246, 244, 236, .35) 60%), var(--reg-cream);
}
.mdp-registration-hero::after { position: absolute; width: 360px; height: 360px; right: -130px; top: -210px; border: 62px solid rgba(169, 207, 60, .2); border-radius: 50%; content: ""; }
.mdp-registration-hero__grid { position: relative; z-index: 1; min-height: 310px; display: grid; grid-template-columns: 1fr 420px; align-items: center; gap: 72px; padding-block: 52px; }
.mdp-registration-eyebrow { margin: 0 0 8px; color: var(--reg-green-700); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.mdp-registration-hero h1,
.mdp-registration-section h2,
.mdp-registration-finish h2,
.mdp-contract-modal h2 { font-family: "Oswald", "Arial Narrow", sans-serif; font-weight: 600; letter-spacing: -.02em; }
.mdp-registration-hero h1 { margin: 0 0 15px; color: var(--reg-green-950); font-size: clamp(42px, 5vw, 62px); line-height: 1.03; }
.mdp-registration-hero__copy > p:last-child { max-width: 610px; margin: 0; color: #536158; font-size: 18px; }

.mdp-registration-sponsor { display: grid; grid-template-columns: 72px minmax(0, 1fr) 44px; align-items: center; gap: 14px; border-top: 4px solid var(--reg-lime); padding: 21px; background: #fff; box-shadow: 0 22px 50px rgba(3, 45, 25, .1); }
.mdp-registration-sponsor > img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--reg-cream); }
.mdp-registration-sponsor > div { min-width: 0; }
.mdp-registration-sponsor span,
.mdp-registration-sponsor small { display: block; color: var(--reg-muted); font-size: 12px; }
.mdp-registration-sponsor strong { display: block; overflow: hidden; color: var(--reg-green-950); font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.mdp-registration-sponsor > a { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--reg-line); border-radius: 50%; color: var(--reg-green-800) !important; font-size: 21px; text-decoration: none; }
.mdp-registration-sponsor > a:hover { border-color: var(--reg-lime); background: var(--reg-lime-soft); }

.mdp-registration-content { padding-block: 34px 90px; }
.mdp-registration-assurance { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 22px; border-left: 3px solid var(--reg-lime); padding: 13px 16px; background: #f5f8ed; }
.mdp-registration-assurance i { margin-top: 4px; color: var(--reg-green-700); }
.mdp-registration-assurance p { margin: 0; color: var(--reg-muted); font-size: 14px; }
.mdp-registration-assurance strong { color: var(--reg-ink); }

.mdp-registration-section { margin-bottom: 22px; border: 1px solid var(--reg-line); background: #fff; }
.mdp-registration-section__heading { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 16px; border-bottom: 1px solid var(--reg-line); padding: 22px 26px; background: #fbfcf8; }
.mdp-registration-section__heading > span { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; background: var(--reg-green-900); color: #fff; font-family: "Oswald", sans-serif; font-size: 15px; }
.mdp-registration-section__heading p { margin: 0 0 2px; color: var(--reg-green-700); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.mdp-registration-section__heading h2 { margin: 0; color: var(--reg-green-950); font-size: 28px; line-height: 1.1; }
.mdp-registration-section__heading > small { color: #7c8880; font-size: 12px; }

.mdp-registration-fields { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 22px 18px; padding: 28px 26px 32px; }
.mdp-field { min-width: 0; grid-column: span 12; }
.mdp-field--2 { grid-column: span 2; }
.mdp-field--3 { grid-column: span 3; }
.mdp-field--4 { grid-column: span 4; }
.mdp-field--5 { grid-column: span 5; }
.mdp-field--6 { grid-column: span 6; }
.mdp-field--7 { grid-column: span 7; }
.mdp-field--8 { grid-column: span 8; }
.mdp-field[hidden] { display: none !important; }

.mdp-field label { display: block; margin: 0 0 7px; color: var(--reg-ink) !important; font-size: 14px; font-weight: 700; }
.mdp-field > small,
.mdp-cep-status { min-height: 17px; display: block; margin-top: 5px; color: #7a867e !important; font-size: 12px; }

body.mdp-registration .mdp-field .form-control {
    width: 100%;
    height: 48px;
    border: 1px solid #cbd6cc !important;
    border-radius: 5px;
    padding: 10px 13px;
    background: #fff !important;
    box-shadow: none !important;
    color: var(--reg-ink) !important;
    font-family: "Hind", sans-serif;
    font-size: 16px;
    line-height: 1.2;
    transition: border-color .16s, box-shadow .16s;
}
body.mdp-registration .mdp-field select.form-control { appearance: auto; }
body.mdp-registration .mdp-field .form-control::placeholder { color: #97a19b; }
body.mdp-registration .mdp-field .form-control:focus { border-color: var(--reg-green-700) !important; box-shadow: 0 0 0 3px rgba(35, 112, 68, .12) !important; outline: 0; }
body.mdp-registration .mdp-field .form-control:invalid:not(:placeholder-shown):focus { border-color: var(--reg-error) !important; }

.mdp-password-field { position: relative; }
.mdp-password-field .form-control { padding-right: 48px !important; }
.mdp-password-field button { position: absolute; width: 44px; height: 44px; right: 2px; top: 2px; border: 0; background: transparent; color: #68756d; cursor: pointer; }

.mdp-field-feedback { min-height: 38px; display: flex; align-items: center; gap: 7px; margin-top: 7px; border: 1px solid var(--reg-line); padding: 7px 10px; background: #f7f9f5; color: var(--reg-muted); font-size: 13px; }
.mdp-field-feedback.is-success { border-color: #9bc5a6; background: #eff8f0; color: #20623a; }
.mdp-field-feedback.is-error { border-color: #d8a2a2; background: #fff2f2; color: var(--reg-error); }

.mdp-registration-finish { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 40px; padding: 34px; background: var(--reg-green-900); color: #fff; }
.mdp-registration-finish .mdp-registration-eyebrow { color: #cae780; }
.mdp-registration-finish h2 { margin: 0 0 8px; font-size: 32px; line-height: 1.08; }
.mdp-registration-finish > div > p:not(.mdp-registration-eyebrow) { margin: 0; color: #c8d8ce; }
.mdp-registration-finish__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.mdp-registration-button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid var(--reg-lime);
    border-radius: 5px;
    padding: 11px 18px;
    background: var(--reg-lime);
    color: var(--reg-green-950) !important;
    cursor: pointer;
    font-family: "Hind", sans-serif;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    transition: transform .16s, background .16s, border-color .16s;
}
.mdp-registration-button:hover { border-color: #bbe052; background: #bbe052; transform: translateY(-2px); }
.mdp-registration-button--secondary { border-color: rgba(255, 255, 255, .45); background: transparent; color: #fff !important; }
.mdp-registration-button--secondary:hover,
.mdp-registration-button--secondary.is-accepted { border-color: #fff; background: rgba(255, 255, 255, .1); }
.mdp-registration-button:disabled { opacity: .7; cursor: wait; transform: none; }
.mdp-contract-accepted { margin-top: 11px; color: #d8eda0; font-size: 13px; font-weight: 700; }

.mdp-registration-button:focus-visible,
.mdp-registration-back:focus-visible,
.mdp-registration-brand:focus-visible,
.mdp-registration-sponsor a:focus-visible,
.mdp-password-field button:focus-visible { outline: 3px solid #f2c94c; outline-offset: 3px; }

.mdp-registration-footer { border-top: 1px solid var(--reg-line); background: #fff; }
.mdp-registration-footer > div { min-height: 130px; display: grid; grid-template-columns: 160px 1fr auto; align-items: center; gap: 35px; }
.mdp-registration-footer img { width: 145px; }
.mdp-registration-footer p { margin: 0; color: var(--reg-muted); }
.mdp-registration-footer small { color: #88938c; }

#alert-field { position: fixed; z-index: 1000; top: 88px; right: 20px; width: min(430px, calc(100% - 40px)) !important; }
body.mdp-registration #alert-field .alert { border: 1px solid #d7e1d7; border-radius: 4px; background: #fff; box-shadow: 0 16px 40px rgba(3, 45, 25, .14); color: var(--reg-ink); }

.mdp-contract-modal .modal-dialog { width: min(920px, calc(100% - 32px)); margin: 35px auto; }
.mdp-contract-modal .modal-content { overflow: hidden; border: 0; border-radius: 0; background: #fff; box-shadow: 0 28px 80px rgba(3, 45, 25, .25); }
.mdp-contract-modal .modal-header { position: relative; border-bottom: 1px solid var(--reg-line); padding: 22px 26px; background: var(--reg-cream); }
.mdp-contract-modal .modal-header > p { margin: 0 0 3px; color: var(--reg-green-700); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.mdp-contract-modal .modal-title { margin: 0; color: var(--reg-green-950); font-size: 28px; }
.mdp-contract-modal .close { position: absolute; right: 20px; top: 18px; color: var(--reg-green-950); font-size: 32px; opacity: .7; }
.mdp-contract-modal .modal-body { padding: 0; }
.mdp-contract-modal iframe { width: 100%; height: min(62vh, 620px); display: block; border: 0; background: #f3f3f3; }
.mdp-contract-modal .modal-footer { display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--reg-line); padding: 16px 20px; background: #fff; }
.mdp-contract-modal .modal-footer .mdp-registration-button--secondary { border-color: var(--reg-line); color: var(--reg-green-900) !important; }
.mdp-contract-modal .modal-footer .mdp-registration-button--secondary:hover { border-color: #b8c8b8; background: #f4f7f1; }
.modal-backdrop.in { opacity: .55; }

@media (max-width: 900px) {
    .mdp-registration-header__inner { grid-template-columns: 150px 1fr; }
    .mdp-registration-back { display: none; }
    .mdp-registration-hero__grid { grid-template-columns: 1fr; gap: 32px; padding-block: 48px; }
    .mdp-registration-sponsor { max-width: 520px; }
    .mdp-registration-finish { grid-template-columns: 1fr; }
    .mdp-registration-finish__actions { width: 100%; }
    .mdp-registration-footer > div { grid-template-columns: 150px 1fr; padding-block: 30px; }
    .mdp-registration-footer small { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
    .mdp-registration-shell { width: calc(100% - 28px); }
    .mdp-registration-header__inner { min-height: 68px; grid-template-columns: 128px 1fr; gap: 12px; }
    .mdp-registration-brand { width: 126px; }
    .mdp-registration-progress { justify-content: flex-end; gap: 7px; font-size: 11px; }
    .mdp-registration-progress i { width: 18px; }
    .mdp-registration-progress b { width: 24px; height: 24px; }
    .mdp-registration-progress span:last-child { display: none; }
    .mdp-registration-progress i { display: none; }

    .mdp-registration-hero::after { display: none; }
    .mdp-registration-hero__grid { padding-block: 40px; }
    .mdp-registration-hero h1 { font-size: 42px; }
    .mdp-registration-hero__copy > p:last-child { font-size: 16px; }
    .mdp-registration-sponsor { grid-template-columns: 58px minmax(0, 1fr) 42px; padding: 16px; }
    .mdp-registration-sponsor > img { width: 58px; height: 58px; }

    .mdp-registration-content { padding-block: 20px 58px; }
    .mdp-registration-assurance { font-size: 13px; }
    .mdp-registration-section__heading { grid-template-columns: 42px 1fr; gap: 12px; padding: 18px 16px; }
    .mdp-registration-section__heading > span { width: 38px; height: 38px; }
    .mdp-registration-section__heading h2 { font-size: 24px; }
    .mdp-registration-section__heading > small { grid-column: 1 / -1; }
    .mdp-registration-fields { grid-template-columns: 1fr; gap: 18px; padding: 22px 16px 26px; }
    .mdp-field,
    .mdp-field--2,
    .mdp-field--3,
    .mdp-field--4,
    .mdp-field--5,
    .mdp-field--6,
    .mdp-field--7,
    .mdp-field--8 { grid-column: 1; }

    .mdp-registration-finish { width: calc(100% + 28px); margin-left: -14px; gap: 24px; padding: 28px 18px; }
    .mdp-registration-finish h2 { font-size: 29px; }
    .mdp-registration-finish__actions { grid-template-columns: 1fr; }
    .mdp-registration-button { min-height: 50px; font-size: 15px; }
    .mdp-registration-footer > div { grid-template-columns: 1fr; gap: 16px; }
    .mdp-registration-footer small { grid-column: auto; }

    .mdp-contract-modal .modal-dialog { width: calc(100% - 18px); margin: 10px auto; }
    .mdp-contract-modal .modal-header { padding: 18px; }
    .mdp-contract-modal .modal-title { padding-right: 34px; font-size: 24px; }
    .mdp-contract-modal iframe { height: 62vh; }
    .mdp-contract-modal .modal-footer { align-items: stretch; flex-direction: column-reverse; }
}

@media (prefers-reduced-motion: reduce) {
    body.mdp-registration * { transition-duration: .01ms !important; }
}

/* ==========================================================================
   /cadastro/novo — "Quem te convidou?"
   Porta de entrada de quem chega sem link de indicação (e destino de link
   errado ou consultor inativo). Card único, centrado, sem o funil de passos.
   ========================================================================== */
body.mdp-registration .mdp-convite{
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px 20px;
    background:
        radial-gradient(120% 90% at 50% 0%, var(--reg-lime-soft) 0%, transparent 60%),
        var(--reg-paper);
}

body.mdp-registration .mdp-convite__card{
    width: 100%;
    max-width: 520px;
    padding: 40px 36px 32px;
    border: 1px solid var(--reg-line);
    border-radius: 20px;
    background: var(--reg-paper);
    box-shadow: 0 18px 48px rgba(3, 45, 25, .10);
    text-align: center;
}

body.mdp-registration .mdp-convite__logo{ width: 168px; max-width: 60%; margin-bottom: 26px; }

body.mdp-registration .mdp-convite__eyebrow{
    display: block;
    font-family: "Oswald", sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--reg-green-700);
}

body.mdp-registration .mdp-convite__titulo{
    margin: 8px 0 12px;
    font-family: "Oswald", sans-serif;
    font-size: 30px;
    font-weight: 600;
    color: var(--reg-green-900);
}

body.mdp-registration .mdp-convite__texto{
    margin: 0 0 24px;
    font-size: 15px;
    line-height: 1.65;
    color: var(--reg-muted);
}
body.mdp-registration .mdp-convite__texto strong{ color: var(--reg-ink); }

body.mdp-registration .mdp-convite__erro{
    display: flex;
    gap: 10px;
    margin: 0 0 22px;
    padding: 14px 16px;
    border-radius: 12px;
    border-left: 3px solid var(--reg-error);
    background: rgba(165, 45, 45, .08);
    color: #7d2222;
    font-size: 14px;
    line-height: 1.6;
    text-align: left;
}
body.mdp-registration .mdp-convite__erro .fa{ margin-top: 3px; }

body.mdp-registration .mdp-convite__form{ text-align: left; }
body.mdp-registration .mdp-convite__form label{
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--reg-ink);
}
body.mdp-registration .mdp-convite__form input{
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1px solid var(--reg-line);
    border-radius: 12px;
    background: #fff;
    color: var(--reg-ink);
    font-family: inherit;
    font-size: 16px;
}
body.mdp-registration .mdp-convite__form input:focus{
    outline: none;
    border-color: var(--reg-green-700);
    box-shadow: 0 0 0 4px var(--reg-lime-soft);
}
body.mdp-registration .mdp-convite__form small{
    display: block;
    margin-top: 8px;
    font-size: 12.5px;
    color: var(--reg-muted);
}

body.mdp-registration .mdp-convite__botao{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 54px;
    margin-top: 20px;
    border: 0;
    border-radius: 12px;
    background: var(--reg-green-800);
    color: #fff;
    font-family: "Oswald", sans-serif;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease;
}
body.mdp-registration .mdp-convite__botao:hover{ background: var(--reg-green-900); transform: translateY(-1px); }

body.mdp-registration .mdp-convite__divisor{
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 30px 0 20px;
    color: var(--reg-muted);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
body.mdp-registration .mdp-convite__divisor::before,
body.mdp-registration .mdp-convite__divisor::after{
    content: "";
    flex: 1;
    height: 1px;
    background: var(--reg-line);
}

body.mdp-registration .mdp-convite__ajuda p{
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--reg-muted);
}

body.mdp-registration .mdp-convite__canais{ display: grid; gap: 10px; }
body.mdp-registration .mdp-convite__canal{
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border: 1px solid var(--reg-line);
    border-radius: 12px;
    background: var(--reg-cream);
    color: var(--reg-ink) !important;
    text-align: left;
    text-decoration: none !important;
    transition: border-color .18s ease, background .18s ease;
}
body.mdp-registration .mdp-convite__canal:hover{ border-color: var(--reg-green-700); background: #fff; }
body.mdp-registration .mdp-convite__canal .fa{ font-size: 20px; color: var(--reg-green-700); width: 24px; text-align: center; }
body.mdp-registration .mdp-convite__canal span{ display: flex; flex-direction: column; }
body.mdp-registration .mdp-convite__canal strong{ font-size: 14px; }
body.mdp-registration .mdp-convite__canal small{ font-size: 12.5px; color: var(--reg-muted); }

body.mdp-registration .mdp-convite__rodape{
    margin: 26px 0 0;
    font-size: 13.5px;
    color: var(--reg-muted);
}
body.mdp-registration .mdp-convite__rodape a{ color: var(--reg-green-700); font-weight: 600; }

@media (max-width: 520px){
    body.mdp-registration .mdp-convite{ padding: 20px 14px; }
    body.mdp-registration .mdp-convite__card{ padding: 30px 22px 26px; border-radius: 16px; }
    body.mdp-registration .mdp-convite__titulo{ font-size: 26px; }
}
