:root {
    color-scheme: light;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: var(--font-texto);
    color: var(--ink);
    background: var(--surface);
    overflow-x: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

a {
    color: var(--link);
}

img {
    max-width: 100%;
    display: block;
}

input,
select,
button,
textarea {
    font: inherit;
}

input:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 3px solid var(--anel-foco);
    outline-offset: 2px;
}

.btn-brand {
    border: 0;
    border-radius: var(--raio-pilula);
    padding: 0.82rem 1.3rem;
    font-family: var(--font-titulo);
    font-size: var(--texto-base);
    font-weight: var(--peso-bold);
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 180ms ease, filter 180ms ease, background-color 180ms ease;
}

.btn-brand--primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-texto);
    box-shadow: var(--sombra-md);
}

/* Override inherited .hero { color: white } — CTA precisa Teal Escuro no Verde Algar */
.hero .btn-brand--primary,
.hero .btn-brand--primary:visited {
    color: var(--cor-teal-escuro);
    background: var(--cor-verde-algar);
    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.55),
        var(--sombra-md);
}

.btn-brand--primary:hover {
    background: var(--btn-primary-bg-hover);
    color: var(--cor-teal-escuro);
}

.hero .btn-brand--primary:hover {
    background: var(--cor-teal-claro);
    color: var(--cor-teal-escuro);
}

.btn-brand--ghost {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--ink-a20);
}

.btn-brand--ghost:hover {
    background: var(--surface-suave);
}

.hero .btn-brand--ghost {
    background: rgba(255, 255, 255, 0.94);
    color: var(--cor-teal-escuro);
    border-color: transparent;
}

.hero .btn-brand--ghost:hover {
    background: var(--cor-branco);
    color: var(--cor-teal-escuro);
}

.cta-hover:hover {
    transform: scale(1.02);
}

.cta-hover:active {
    transform: scale(0.99);
}

/* Public shell */
.public-shell {
    min-height: 100dvh;
    width: 100%;
    display: flex;
    flex-direction: column;
    background: var(--surface);
}

.public-main {
    flex: 1;
}

.public-header {
    width: 100%;
    padding: 1rem clamp(1rem, 3vw, 2rem);
}

.public-header--plain {
    background: var(--surface);
    border-bottom: 1px solid var(--ink-a12);
}

.public-header--hero {
    padding: 0;
    background: transparent;
    border: 0;
}

.public-header__brand {
    width: min(1080px, 100%);
    margin: 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: var(--ink);
    font-family: var(--font-titulo);
    font-weight: var(--peso-bold);
    font-size: var(--texto-md);
}

.public-header__logo {
    width: clamp(88px, 12vw, 120px);
    height: auto;
}

.public-footer {
    padding: 1rem 1.25rem 1.5rem;
    text-align: center;
    color: var(--ink-suave);
    font-size: var(--texto-sm);
}

.public-shell--landing .public-footer {
    padding-top: 0;
}

/* Hero — grad-verde-azul + --hero-ink-mesh (teal-escuro) for white logo/H1 contrast */
.hero {
    width: 100%;
    background: var(--hero-surface);
    color: var(--cor-branco);
    position: relative;
    isolation: isolate;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, var(--ink-a48) 0%, transparent 42%),
        linear-gradient(180deg, transparent 35%, var(--ink-a72) 100%);
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero--home {
    min-height: min(72vh, 620px);
}

.hero--landing {
    min-height: 100dvh;
    min-height: 100svh;
    width: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* /c/{code}: lockup + CTA filled, not empty full-viewport void */
.hero--consultant {
    min-height: min(78vh, 640px);
    width: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero__inner {
    width: min(1080px, 100%);
    margin: 0 auto;
    padding: clamp(1rem, 3.5vw, 2.5rem) clamp(1rem, 4vw, 2.5rem) clamp(2rem, 8vw, 5rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
}

.hero--consultant .hero__inner {
    gap: 1.15rem;
    padding-block: clamp(2.4rem, 9vw, 5.5rem);
}

.hero__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--cor-branco);
    text-decoration: none;
    font-family: var(--font-titulo);
    font-size: clamp(1rem, 2.2vw, 1.3rem);
    font-weight: var(--peso-bold);
}

.hero__brand--lockup {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
}

.hero__product {
    font-family: var(--font-titulo);
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    font-weight: var(--peso-semibold);
    letter-spacing: 0.02em;
    opacity: 0.92;
}

.public-header--hero .hero__brand {
    color: var(--cor-branco);
}

.hero__logo {
    width: clamp(96px, 14vw, 132px);
}

/* Brand-first: logo dominates first viewport */
.hero__logo--home {
    width: clamp(168px, 28vw, 248px);
}

.hero__logo--landing {
    width: clamp(160px, 24vw, 236px);
    margin-bottom: 0.35rem;
}

.hero__eyebrow {
    margin: 0;
    font-family: var(--font-titulo);
    font-size: var(--texto-sm);
    font-weight: var(--peso-semibold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hero__chip {
    margin: 0;
    width: fit-content;
    padding: 0.28rem 0.7rem;
    border-radius: var(--raio-sm);
    background: rgba(255, 255, 255, 0.18);
    color: var(--cor-branco);
    font-family: var(--font-texto);
    font-size: var(--texto-sm);
    font-weight: var(--peso-medio);
    letter-spacing: 0.01em;
}

.hero h1,
.hero__title {
    margin: 0;
    max-width: 22ch;
    font-family: var(--font-titulo);
    font-size: clamp(1.85rem, 5vw, 2.85rem);
    line-height: var(--linha-compacta);
    font-weight: var(--peso-bold);
}

/* Decorative H1 must not show browser black focus ring (FocusOnNavigate / tabindex) */
.hero h1:focus,
.hero__title:focus {
    outline: none;
}

.hero h1:focus-visible,
.hero__title:focus-visible {
    outline: 3px solid var(--anel-foco);
    outline-offset: 4px;
}

/* Headline must not overpower brand lockup */
.hero__title--home {
    max-width: 18ch;
    font-size: clamp(1.55rem, 4.2vw, 2.35rem);
    font-weight: var(--peso-semibold);
}

.hero__title--consultant {
    max-width: 20ch;
    font-size: clamp(1.55rem, 4vw, 2.25rem);
}

.hero__lead {
    margin: 0;
    max-width: 56ch;
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: var(--linha-normal);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.hero__microcopy {
    margin: 0.25rem 0 0;
    font-size: var(--texto-sm);
}

.hero__arrow-wrap {
    margin: 0.6rem 0 0.2rem;
}

.hero__cta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.6rem;
}

.hero__cta .hero__arrow-wrap {
    margin: 0;
    animation: arrowNudge 1.8s ease-in-out 0.6s infinite;
}

/* PNG oficiais (wwwroot/images/setas/) — sem stroke SVG */
.algar-arrow {
    width: clamp(52px, 9vw, 78px);
    height: auto;
    display: block;
    object-fit: contain;
}

.algar-arrow--ink {
    width: clamp(28px, 5vw, 36px);
}

.algar-arrow--ladder {
    width: clamp(22px, 4vw, 28px);
}

.public-shell:not(.public-shell--landing) .public-main {
    display: flex;
    flex-direction: column;
}

.public-home {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Promo strip — official --grad-limao (#7DFF37 -> #4BFF32), ink teal-escuro */
.promo-strip {
    width: 100%;
    min-height: 4.25rem;
    isolation: isolate;
    position: relative;
    /* Solid fallback + exact brand hex so nested var() cannot wash the strip */
    background-color: #7DFF37;
    /* Exact brand stop colors (MCP mkt_brand_get_gradients / --grad-limao) */
    background-image: linear-gradient(135deg, #7DFF37, #4BFF32);
    color: var(--cor-teal-escuro, #0A645A);
}

.promo-strip__inner {
    width: min(1080px, 100%);
    margin: 0 auto;
    min-height: 4.25rem;
    padding: clamp(1.2rem, 3.4vw, 1.75rem) clamp(1.1rem, 4vw, 2.5rem);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1.35rem;
}

.promo-strip__kicker {
    margin: 0;
    font-family: var(--font-titulo);
    font-size: clamp(0.95rem, 1.8vw, 1.125rem);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.15;
}

.promo-strip__text {
    margin: 0;
    font-family: var(--font-texto);
    font-size: clamp(1rem, 2.1vw, 1.2rem);
    font-weight: var(--peso-semibold);
    line-height: var(--linha-normal);
    max-width: 52ch;
}

.affiliate-how {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    padding: clamp(2.4rem, 7vw, 4.8rem) clamp(1rem, 4vw, 2.5rem) clamp(2.8rem, 8vw, 5rem);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--cor-verde-algar) 10%, transparent) 0%, transparent 28%),
        var(--surface);
}

.affiliate-how__inner {
    width: min(1080px, 100%);
    margin: 0 auto;
    animation: heroEnter 740ms cubic-bezier(0.2, 0.65, 0.2, 1) 120ms both;
}

.affiliate-how__eyebrow {
    margin: 0 0 0.55rem;
    font-family: var(--font-titulo);
    font-size: var(--texto-sm);
    font-weight: var(--peso-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink);
}

.affiliate-how h2 {
    margin: 0 0 0.7rem;
    font-family: var(--font-titulo);
    font-size: clamp(1.45rem, 3.4vw, 2.1rem);
    line-height: var(--linha-compacta);
    color: var(--ink);
}

.affiliate-how__lead {
    margin: 0;
    max-width: 46ch;
    color: var(--cor-grafite);
    font-size: var(--texto-md);
    line-height: var(--linha-normal);
}

.affiliate-how__steps {
    list-style: none;
    margin: 1.8rem 0 0;
    padding: 0;
    display: grid;
    gap: 1.4rem;
}

.affiliate-how__steps li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: start;
}

.affiliate-how__index {
    display: block;
    margin-bottom: 0.2rem;
    font-family: var(--font-titulo);
    font-size: var(--texto-sm);
    font-weight: var(--peso-bold);
    letter-spacing: 0.08em;
    color: var(--cor-teal);
}

.affiliate-how__steps strong {
    display: block;
    font-family: var(--font-titulo);
    font-size: var(--texto-md);
    color: var(--ink);
}

.affiliate-how__steps span:last-child {
    display: block;
    margin-top: 0.25rem;
    color: var(--cor-grafite);
    font-size: var(--texto-base);
    line-height: var(--linha-normal);
}

.affiliate-how__cta {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

@media (min-width: 800px) {
    .affiliate-how__steps {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

.public-landing {
    width: 100%;
    display: grid;
    gap: 0;
    padding-bottom: 2.5rem;
    background: var(--surface);
}

.public-loading {
    width: min(760px, calc(100% - 2rem));
    margin: 2rem auto;
    padding: 1rem 1.1rem;
    border-radius: var(--raio-lg);
    background: var(--surface-suave);
    color: var(--ink);
}

.invalid-link {
    width: min(760px, calc(100% - 2rem));
    margin: 2rem auto;
    padding: clamp(1.2rem, 4vw, 2rem);
    border-radius: var(--raio-lg);
    background: var(--surface);
    border: 1px solid var(--ink-a12);
    display: grid;
    gap: 0.9rem;
}

.invalid-link h1 {
    margin: 0;
    font-family: var(--font-titulo);
    font-size: clamp(1.5rem, 3.8vw, 2rem);
    line-height: var(--linha-compacta);
}

.invalid-link p {
    margin: 0;
    color: var(--ink-suave);
    line-height: var(--linha-normal);
}

/* /i/{code} sections — open layout, not card shells */
.landing-section,
.why-algar,
.fiber-benefit {
    width: min(720px, calc(100% - 2rem));
    margin: 0 auto;
    padding: clamp(2.2rem, 5.5vw, 3.6rem) 0.2rem 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
}

.why-algar h2,
.fiber-benefit h2 {
    margin: 0 0 0.7rem;
    font-family: var(--font-titulo);
    font-size: clamp(1.4rem, 3.2vw, 2rem);
    color: var(--ink);
}

.why-algar p,
.fiber-benefit p,
.fiber-benefit__lead {
    margin: 0 0 0.8rem;
    color: var(--cor-grafite);
    font-size: var(--texto-md);
    line-height: var(--linha-normal);
}

.fiber-benefit__list {
    list-style: none;
    margin: 1.2rem 0 0;
    padding: 0;
    display: grid;
    gap: 1.1rem;
}

.fiber-benefit__list li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: start;
}

.fiber-benefit__list strong {
    display: block;
    font-family: var(--font-titulo);
    font-size: var(--texto-md);
    color: var(--ink);
}

.fiber-benefit__list span {
    display: block;
    margin-top: 0.2rem;
    color: var(--cor-grafite);
    font-size: var(--texto-base);
    line-height: var(--linha-normal);
}

/* Form keeps interaction container (card OK here) */
.form-panel {
    width: min(440px, calc(100% - 2rem));
    margin: clamp(2.4rem, 6vw, 4rem) auto 0;
    padding: 1.2rem 1.1rem 1.4rem;
    border-radius: var(--raio-xl);
    background: var(--surface);
    box-shadow: var(--sombra-md);
    border: 1px solid var(--ink-a12);
}

.form-panel h2 {
    margin: 0;
    font-family: var(--font-titulo);
    font-size: clamp(1.3rem, 3.2vw, 1.7rem);
}

.form-panel__lead {
    margin: 0.45rem 0 0.9rem;
    color: var(--ink-suave);
    font-size: var(--texto-sm);
}

.public-form {
    display: grid;
    gap: 0.85rem;
}

.public-form__field {
    display: grid;
    gap: 0.35rem;
}

.public-form__field label {
    font-size: var(--texto-sm);
    font-weight: var(--peso-semibold);
    color: var(--ink);
}

.public-form__field input {
    width: 100%;
    border: 1px solid var(--ink-a20);
    border-radius: var(--raio-md);
    padding: 0.72rem 0.8rem;
    font-size: 1rem; /* 16px: evita zoom iOS no foco */
    color: var(--ink);
    background: var(--cor-branco);
}

.public-form button {
    width: 100%;
    min-height: 2.85rem;
}

.public-form__field input::placeholder {
    color: var(--ink-suave);
}

.public-form__address {
    border: 1px solid var(--ink-a15);
    border-radius: var(--raio-md);
    background: var(--surface-suave);
    padding: 0.72rem 0.84rem;
}

.public-form__address p {
    margin: 0.2rem 0;
    color: var(--ink-suave);
    font-size: var(--texto-sm);
}

.public-form__address-title {
    margin: 0;
    color: var(--ink);
    font-weight: var(--peso-semibold);
}

.public-form__consent {
    display: grid;
    gap: 0.55rem;
    color: var(--ink-suave);
    font-size: var(--texto-sm);
}

.public-form__consent label {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
}

.public-form__consent p {
    margin: 0;
}

.public-form__consent a {
    color: var(--link);
}

.public-form__feedback {
    margin: 0;
    font-size: var(--texto-sm);
}

.public-form__feedback--soft {
    color: var(--ink);
}

.success-panel {
    width: min(760px, calc(100% - 2rem));
    margin: 0 auto 0.75rem;
    padding: 1rem 1.1rem;
    border-radius: var(--raio-xl);
    background: var(--surface);
    border: 1px solid var(--ink-a14);
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

.success-panel h2 {
    margin: 0;
    font-family: var(--font-titulo);
    font-size: clamp(1.2rem, 3.2vw, 1.7rem);
}

.success-panel p {
    margin: 0.4rem 0 0;
    color: var(--ink);
}

.success-panel .btn-brand {
    margin-top: 0.9rem;
}

/* Customer */
.customer-shell {
    width: min(1160px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1rem 0 2rem;
}

.customer-shell__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.customer-shell__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    color: var(--ink);
    font-family: var(--font-titulo);
    font-size: var(--texto-md);
    font-weight: var(--peso-bold);
}

.customer-shell__logo {
    width: 92px;
}

.customer-shell__title {
    color: var(--ink-suave);
    font-size: var(--texto-sm);
}

.customer-shell__main {
    width: 100%;
}

.customer-dashboard {
    display: grid;
    gap: 0.9rem;
}

.customer-banner,
.customer-auth,
.customer-share,
.customer-ladder,
.customer-section {
    border-radius: var(--raio-lg);
    border: 1px solid rgba(10, 100, 90, 0.13);
    background: var(--cor-branco);
    box-shadow: var(--sombra-sm);
    padding: 1rem;
}

.customer-banner--warning {
    background: linear-gradient(135deg, rgba(255, 210, 45, 0.2), rgba(255, 195, 0, 0.12));
}

.customer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
}

.customer-header h1 {
    margin: 0;
    font-family: var(--font-titulo);
    font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.customer-header p {
    margin: 0.4rem 0 0;
    color: var(--ink-suave);
}

.customer-auth--gate {
    width: min(26.5rem, 100%);
    margin: 0 auto;
    padding: 1.2rem 1.1rem 1.5rem;
}

.customer-auth__brand-mark {
    margin-bottom: 0.55rem;
}

.customer-auth__eyebrow {
    margin: 0 0 0.75rem;
    font-family: var(--font-titulo);
    font-size: var(--texto-sm);
    font-weight: var(--peso-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-suave);
}

.customer-auth__modes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    margin: 0 0 1rem;
    padding: 0.28rem;
    border-radius: var(--raio-md);
    background: var(--surface-suave);
}

.customer-auth__mode {
    border: 0;
    border-radius: var(--raio-sm);
    padding: 0.68rem 0.45rem;
    min-height: 2.75rem;
    font-family: var(--font-titulo);
    font-size: var(--texto-sm);
    font-weight: var(--peso-semibold);
    color: var(--ink);
    background: transparent;
    cursor: pointer;
}

.customer-auth__mode.is-active {
    background: var(--cor-verde-algar);
    color: var(--cor-teal-escuro);
}

.customer-auth__mode[disabled] {
    cursor: not-allowed;
    opacity: 0.7;
}

.customer-auth--gate h1 {
    margin: 0;
    font-family: var(--font-titulo);
    font-size: clamp(1.4rem, 5.4vw, 1.85rem);
    line-height: var(--linha-compacta);
    color: var(--ink);
}

.customer-auth__lead {
    margin: 0.45rem 0 1rem;
    color: var(--ink-suave);
    font-size: var(--texto-base);
    line-height: var(--linha-normal);
}

.customer-auth__field {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 0.8rem;
}

.customer-auth__field label {
    font-weight: var(--peso-semibold);
    color: var(--ink);
}

.customer-auth__field input {
    width: 100%;
    border: 1px solid rgba(10, 100, 90, 0.2);
    border-radius: var(--raio-md);
    padding: 0.78rem 0.8rem;
    font-size: 1rem;
    color: var(--ink);
    background: var(--cor-branco);
}

.customer-auth--gate .customer-button {
    width: 100%;
    min-height: 2.85rem;
    margin-top: 0.15rem;
}

.customer-auth--gate .customer-button + .customer-button {
    margin-top: 0.55rem;
}

.customer-auth__otp {
    display: grid;
    gap: 0.15rem;
}

.customer-auth__otp-status {
    margin: 0 0 0.65rem;
    font-family: var(--font-titulo);
    font-size: var(--texto-sm);
    font-weight: var(--peso-semibold);
    color: var(--ink);
}

.customer-auth__back {
    margin-top: 0.7rem;
    border: 0;
    padding: 0.35rem 0;
    background: transparent;
    color: var(--ink);
    font-family: var(--font-texto);
    font-size: var(--texto-sm);
    font-weight: var(--peso-semibold);
    text-decoration: underline;
    text-underline-offset: 0.18em;
    cursor: pointer;
}

.customer-auth__back[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
}

.customer-share h2,
.customer-section h2,
.customer-ladder h2,
.customer-earnings h2,
.customer-funnel h2 {
    margin: 0 0 0.7rem;
    font-family: var(--font-titulo);
    font-size: clamp(1.06rem, 2vw, 1.22rem);
    color: var(--ink);
}

.customer-share__eyebrow {
    margin: 0 0 0.35rem;
    font-family: var(--font-titulo);
    font-size: var(--texto-sm);
    font-weight: var(--peso-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cor-teal);
}

.customer-share__edu,
.customer-ladder__lead,
.customer-earnings__lead,
.customer-funnel__lead {
    margin: 0 0 1rem;
    max-width: 52ch;
    color: var(--cor-grafite);
    font-size: var(--texto-base);
    line-height: var(--linha-normal);
}

.customer-share__link {
    margin: 0;
    word-break: break-word;
    color: var(--ink-suave);
}

.customer-share__actions {
    margin-top: 0.8rem;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.customer-ladder__status {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin: 0 0 0.85rem;
    color: var(--ink);
    font-size: var(--texto-base);
    line-height: var(--linha-normal);
}

.customer-ladder__badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.85rem;
    padding: 0.2rem 0.7rem;
    border-radius: var(--raio-md);
    font-family: var(--font-titulo);
    font-size: var(--texto-sm);
    font-weight: var(--peso-bold);
    color: var(--ink);
    background: var(--surface-suave);
}

.customer-ladder__badge--starter {
    background: rgba(40, 190, 165, 0.16);
}

.customer-ladder__badge--bronze {
    background: rgba(255, 145, 0, 0.22);
}

.customer-ladder__badge--silver {
    background: rgba(40, 190, 165, 0.22);
}

.customer-ladder__badge--gold {
    background: rgba(255, 195, 0, 0.28);
}

.customer-ladder__track {
    height: 0.7rem;
    border-radius: var(--raio-pilula);
    background: rgba(10, 100, 90, 0.1);
    overflow: hidden;
}

.customer-ladder__fill {
    height: 100%;
    width: var(--ladder-width, 0%);
    border-radius: inherit;
    background: linear-gradient(90deg, var(--cor-teal-escuro), var(--cor-verde-algar));
    transition: width 480ms cubic-bezier(0.2, 0.65, 0.2, 1);
}

.customer-ladder__steps {
    list-style: none;
    margin: 1.05rem 0 0;
    padding: 0;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.customer-ladder__step {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex: 1 1 5.5rem;
    min-width: 5.2rem;
}

.customer-ladder__step-card {
    flex: 1;
    display: grid;
    gap: 0.15rem;
    border: 1px solid rgba(10, 100, 90, 0.14);
    border-radius: var(--raio-md);
    background: var(--surface-suave);
    padding: 0.65rem 0.55rem;
    text-align: center;
}

.customer-ladder__step-card strong {
    font-family: var(--font-titulo);
    font-size: var(--texto-sm);
    font-weight: var(--peso-bold);
    color: var(--ink);
}

.customer-ladder__step-card span {
    font-size: var(--texto-xs);
    color: var(--ink-suave);
}

.customer-ladder__step--starter.is-current .customer-ladder__step-card,
.customer-ladder__step--starter.is-reached .customer-ladder__step-card {
    background: rgba(40, 190, 165, 0.12);
}

.customer-ladder__step--bronze.is-current .customer-ladder__step-card,
.customer-ladder__step--bronze.is-reached .customer-ladder__step-card {
    background: rgba(255, 145, 0, 0.16);
}

.customer-ladder__step--silver.is-current .customer-ladder__step-card,
.customer-ladder__step--silver.is-reached .customer-ladder__step-card {
    background: rgba(40, 190, 165, 0.16);
}

.customer-ladder__step--gold.is-current .customer-ladder__step-card,
.customer-ladder__step--gold.is-reached .customer-ladder__step-card {
    background: rgba(255, 195, 0, 0.22);
}

.customer-ladder__step.is-current .customer-ladder__step-card {
    border-color: rgba(10, 100, 90, 0.35);
    box-shadow: var(--sombra-sm);
}

.customer-ladder__step.is-next .customer-ladder__step-card {
    opacity: 0.72;
}

.customer-ladder__arrow {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

@media (prefers-reduced-motion: reduce) {
    .customer-ladder__fill {
        transition: none;
    }
}

.customer-earnings__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.customer-earnings__card {
    border: 1px solid rgba(10, 100, 90, 0.14);
    border-radius: var(--raio-lg);
    background: var(--surface-suave);
    padding: 0.95rem 1rem;
}

.customer-earnings__card h3 {
    margin: 0 0 0.4rem;
    font-family: var(--font-titulo);
    font-size: var(--texto-sm);
    font-weight: var(--peso-semibold);
    color: var(--ink-suave);
}

.customer-earnings__card p {
    margin: 0;
    font-family: var(--font-titulo);
    font-size: clamp(1.35rem, 3vw, 1.7rem);
    font-weight: var(--peso-bold);
    line-height: 1.1;
    color: var(--ink);
}

.customer-earnings__card--eligible {
    background: linear-gradient(135deg, rgba(0, 235, 176, 0.18), var(--surface-suave) 70%);
}

.customer-earnings__card--approved {
    background: linear-gradient(135deg, rgba(10, 100, 90, 0.1), var(--surface-suave) 70%);
}

.customer-earnings__card--paid {
    border-color: rgba(0, 235, 176, 0.45);
}

.customer-funnel__bars {
    list-style: none;
    margin: 1.1rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.85rem;
}

.customer-funnel__meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.customer-funnel__label {
    font-family: var(--font-titulo);
    font-weight: var(--peso-semibold);
    color: var(--ink);
}

.customer-funnel__count {
    font-family: var(--font-titulo);
    font-weight: var(--peso-bold);
    color: var(--cor-teal);
}

.customer-funnel__track {
    height: 0.7rem;
    border-radius: var(--raio-pilula);
    background: rgba(10, 100, 90, 0.1);
    overflow: hidden;
}

.customer-funnel__fill {
    height: 100%;
    width: var(--funnel-width, 0%);
    border-radius: inherit;
    background: linear-gradient(90deg, var(--cor-teal-escuro), var(--cor-verde-algar));
    transition: width 480ms cubic-bezier(0.2, 0.65, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
    .customer-funnel__fill {
        transition: none;
    }
}

.customer-journey__empty {
    margin: 0;
    color: var(--cor-grafite);
}

.customer-journey__list {
    list-style: none;
    margin: 0.9rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.7rem;
}

.customer-journey__card {
    border: 1px solid rgba(10, 100, 90, 0.12);
    border-radius: var(--raio-lg);
    background: var(--cor-branco);
    padding: 0.85rem 1rem;
}

.customer-journey__head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: baseline;
    flex-wrap: wrap;
}

.customer-journey__head strong {
    font-family: var(--font-titulo);
    color: var(--ink);
}

.customer-journey__status {
    font-size: var(--texto-sm);
    font-weight: var(--peso-semibold);
    color: var(--cor-teal-escuro);
    background: rgba(0, 235, 176, 0.16);
    border-radius: var(--raio-pilula);
    padding: 0.2rem 0.55rem;
}

.customer-journey__card time {
    display: block;
    margin-top: 0.35rem;
    font-size: var(--texto-sm);
    color: var(--cor-grafite);
}

.customer-journey__actions {
    margin-top: 0.55rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.customer-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.7rem;
}

.customer-kpis article {
    border: 1px solid rgba(10, 100, 90, 0.12);
    border-radius: var(--raio-lg);
    background: var(--surface-suave);
    padding: 0.8rem;
}

.customer-kpis h2 {
    margin: 0 0 0.35rem;
    font-size: var(--texto-sm);
    color: var(--ink-suave);
}

.customer-kpis p {
    margin: 0;
    font-family: var(--font-titulo);
    font-size: 1.55rem;
    line-height: 1.1;
    font-weight: var(--peso-bold);
}

.customer-table-wrap {
    overflow-x: auto;
}

.customer-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
}

.customer-table th,
.customer-table td {
    border-bottom: 1px solid rgba(10, 100, 90, 0.13);
    padding: 0.55rem;
    text-align: left;
    font-size: 0.92rem;
    vertical-align: top;
}

.customer-table th {
    color: var(--ink-suave);
    font-weight: var(--peso-semibold);
}

.customer-select {
    width: 100%;
    border: 1px solid rgba(10, 100, 90, 0.2);
    border-radius: var(--raio-md);
    padding: 0.45rem 0.5rem;
    background: var(--cor-branco);
    color: var(--ink);
}

.customer-button {
    border: 0;
    border-radius: var(--raio-pilula);
    padding: 0.58rem 0.92rem;
    color: var(--btn-primary-texto);
    background: var(--btn-primary-bg);
    font-family: var(--font-titulo);
    font-weight: var(--peso-semibold);
    cursor: pointer;
    transition: transform 160ms ease, filter 160ms ease;
}

.customer-button:hover {
    background: var(--btn-primary-bg-hover);
}

.customer-button[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
}

.customer-button--ghost {
    background: var(--surface-suave);
    color: var(--ink);
    border: 1px solid rgba(10, 100, 90, 0.2);
}

.customer-button--small {
    padding: 0.45rem 0.75rem;
    font-size: 0.86rem;
}

.customer-feedback {
    margin: 0.6rem 0 0;
    font-size: 0.9rem;
}

.customer-feedback--error,
.customer-feedback--success,
.customer-feedback--hint {
    color: var(--ink);
}

/* Admin retokenized */
.admin-shell {
    margin: 0 auto;
    width: min(100%, 1200px);
    padding: 1rem 1rem 2rem;
}

.admin-shell__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-shell__header a {
    text-decoration: none;
    font-family: var(--font-titulo);
    font-weight: var(--peso-bold);
    color: var(--ink);
}

.admin-shell__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.admin-shell__logo {
    width: 92px;
    height: auto;
}

.admin-shell__header nav {
    display: flex;
    gap: 0.75rem;
}

.admin-dashboard {
    display: grid;
    gap: 1rem;
}

.admin-section-map {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-section-map__link {
    display: inline-flex;
    align-items: center;
    min-height: 1.9rem;
    padding: 0.3rem 0.72rem;
    border-radius: var(--raio-pilula);
    border: 1px solid rgba(10, 100, 90, 0.22);
    background: var(--cor-branco);
    color: var(--ink);
    font-family: var(--font-titulo);
    font-size: var(--texto-sm);
    font-weight: var(--peso-semibold);
    text-decoration: none;
}

.admin-section-map__link--cta {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-texto);
    border-color: transparent;
}

.admin-runbook {
    margin: 0.15rem 0 0;
    color: var(--ink-suave);
    font-size: var(--texto-sm);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.admin-header h1 {
    margin: 0;
    font-family: var(--font-titulo);
    font-size: clamp(1.45rem, 3vw, 1.9rem);
    color: var(--ink);
}

.admin-header__lead,
.admin-section__lead {
    margin: 0.4rem 0 0;
    max-width: 52ch;
    color: var(--cor-grafite);
    font-size: var(--texto-base);
    line-height: var(--linha-normal);
}

.admin-section__eyebrow {
    margin: 0 0 0.35rem;
    font-family: var(--font-titulo);
    font-size: var(--texto-sm);
    font-weight: var(--peso-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cor-teal);
}

.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.admin-kpi-card,
.admin-funnel-card,
.admin-section,
.admin-banner {
    border: 1px solid rgba(10, 100, 90, 0.13);
    border-radius: var(--raio-lg);
    background: var(--cor-branco);
    padding: 0.9rem;
}

.admin-header,
.admin-section,
.admin-create-grid[id^="section-"] {
    scroll-margin-top: 1.1rem;
}

.admin-kpi-card h2,
.admin-funnel-card h2 {
    margin: 0 0 0.45rem;
    font-size: var(--texto-sm);
    color: var(--ink-suave);
    font-weight: var(--peso-semibold);
}

.admin-section h2 {
    margin: 0 0 0.45rem;
    font-family: var(--font-titulo);
    font-size: clamp(1.06rem, 2vw, 1.22rem);
    color: var(--ink);
    font-weight: var(--peso-semibold);
}

.admin-kpi-card p,
.admin-funnel-card p {
    margin: 0;
    font-family: var(--font-titulo);
    font-size: 1.5rem;
    font-weight: var(--peso-bold);
}

.admin-funnel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.75rem;
}

.admin-funnel__bars {
    list-style: none;
    margin: 1.1rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.85rem;
}

.admin-funnel__meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.admin-funnel__label {
    font-family: var(--font-titulo);
    font-weight: var(--peso-semibold);
    color: var(--ink);
}

.admin-funnel__count {
    font-family: var(--font-titulo);
    font-weight: var(--peso-bold);
    color: var(--cor-teal);
}

.admin-funnel__track {
    height: 0.7rem;
    border-radius: var(--raio-pilula);
    background: rgba(10, 100, 90, 0.1);
    overflow: hidden;
}

.admin-funnel__fill {
    height: 100%;
    width: var(--funnel-width, 0%);
    border-radius: inherit;
    background: linear-gradient(90deg, var(--cor-teal-escuro), var(--cor-verde-algar));
    transition: width 480ms cubic-bezier(0.2, 0.65, 0.2, 1);
}

.admin-level-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.7rem;
    padding: 0.16rem 0.6rem;
    border-radius: var(--raio-md);
    font-family: var(--font-titulo);
    font-size: var(--texto-sm);
    font-weight: var(--peso-bold);
    color: var(--ink);
    background: var(--surface-suave);
}

.admin-level-badge--starter {
    background: rgba(40, 190, 165, 0.16);
}

.admin-level-badge--bronze {
    background: rgba(255, 145, 0, 0.22);
}

.admin-level-badge--silver {
    background: rgba(40, 190, 165, 0.22);
}

.admin-level-badge--gold {
    background: rgba(255, 195, 0, 0.28);
}

@media (prefers-reduced-motion: reduce) {
    .admin-funnel__fill {
        transition: none;
    }
}

.admin-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.admin-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid rgba(10, 100, 90, 0.13);
    padding: 0.55rem;
    text-align: left;
    vertical-align: top;
    font-size: 0.92rem;
}

.admin-table th {
    color: var(--ink-suave);
    font-weight: var(--peso-semibold);
}

.admin-status-editor {
    display: grid;
    grid-template-columns: 1fr 1.2fr auto;
    gap: 0.45rem;
    min-width: 420px;
}

.admin-create-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.45rem;
    margin-bottom: 0.75rem;
    align-items: center;
}

.admin-create-grid .admin-button {
    justify-self: start;
}

.admin-create-grid--lead {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.admin-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--ink);
    font-size: var(--texto-sm);
}

.admin-select,
.admin-input {
    border: 1px solid rgba(10, 100, 90, 0.2);
    border-radius: var(--raio-md);
    padding: 0.45rem 0.55rem;
    background: var(--cor-branco);
    color: var(--ink);
}

.admin-button {
    border: 0;
    border-radius: var(--raio-pilula);
    padding: 0.55rem 0.8rem;
    color: var(--btn-primary-texto);
    background: var(--btn-primary-bg);
    font-family: var(--font-titulo);
    font-weight: var(--peso-semibold);
    cursor: pointer;
}

.admin-button:hover {
    background: var(--btn-primary-bg-hover);
}

.admin-button[disabled] {
    cursor: not-allowed;
    opacity: 0.65;
}

.admin-button--small {
    padding: 0.45rem 0.7rem;
    font-size: 0.87rem;
}

.admin-button--ghost {
    background: transparent;
    color: var(--ink);
    box-shadow: inset 0 0 0 1px rgba(10, 100, 90, 0.28);
}

.admin-button--ghost:hover {
    background: rgba(0, 235, 176, 0.12);
}

.admin-button--danger {
    background: #b3261e;
    color: #ffffff;
}

.admin-button--danger:hover {
    background: #8f1f19;
}

.admin-login {
    display: grid;
    gap: 0.85rem;
    max-width: 26rem;
    margin: 2rem auto;
    padding: 1.4rem 1.2rem 1.6rem;
    border: 1px solid rgba(10, 100, 90, 0.13);
    border-radius: var(--raio-lg);
    background: var(--cor-branco);
}

.admin-login__logo {
    width: min(9rem, 50%);
    height: auto;
}

.admin-login h1 {
    margin: 0;
    font-family: var(--font-titulo);
    color: var(--ink);
}

.admin-login p {
    margin: 0;
    color: var(--ink-suave);
}

.admin-login__field {
    display: grid;
    gap: 0.35rem;
}

.admin-login__field label {
    font-family: var(--font-titulo);
    font-size: var(--texto-sm);
    font-weight: var(--peso-semibold);
    color: var(--ink);
}

.admin-login__field input {
    border: 1px solid rgba(10, 100, 90, 0.2);
    border-radius: var(--raio-md);
    padding: 0.55rem 0.65rem;
    background: var(--cor-branco);
    color: var(--ink);
}

.admin-banner h1 {
    margin: 0 0 0.35rem;
    font-size: 1.2rem;
    font-family: var(--font-titulo);
}

.admin-banner p {
    margin: 0;
}

.admin-banner--warning {
    background: linear-gradient(135deg, rgba(255, 210, 45, 0.2), rgba(255, 195, 0, 0.12));
}

.admin-banner--error {
    background: linear-gradient(135deg, rgba(255, 145, 0, 0.18), rgba(255, 195, 0, 0.12));
}

.admin-feedback {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
}

.admin-feedback--success,
.admin-feedback--error {
    color: var(--ink);
}

/* Utility motion */
.hero-animate {
    animation: heroEnter 740ms cubic-bezier(0.2, 0.65, 0.2, 1) both;
}

.reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: opacity 520ms ease, transform 520ms ease;
}

/* Progressive enhancement: only hide while waiting for observer */
html.js-reveal .reveal-on-scroll:not(.is-visible) {
    opacity: 0;
    transform: translateY(14px);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.success-panel.is-celebrating {
    animation: pulseCelebrate 680ms ease;
}

.public-toast-host {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    display: grid;
    gap: 0.5rem;
    z-index: 999;
}

.public-toast {
    background: var(--ink);
    color: var(--cor-branco);
    border-radius: var(--raio-pilula);
    padding: 0.55rem 0.85rem;
    box-shadow: var(--sombra-md);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 240ms ease, transform 240ms ease;
    font-size: var(--texto-sm);
}

.public-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.public-confetti-dot {
    position: absolute;
    top: 0.4rem;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--cor-verde-algar);
    animation: confettiFall 1200ms ease forwards;
}

.public-confetti-dot:nth-child(2n) {
    background: var(--cor-azul);
}

.public-confetti-dot:nth-child(3n) {
    background: var(--cor-amarelo);
}

/* Blazor runtime error bar */
#blazor-error-ui {
    background: var(--surface-suave);
    border-top: 1px solid rgba(10, 100, 90, 0.18);
    bottom: 0;
    color: var(--ink);
    display: none;
    left: 0;
    padding: 0.65rem 1.25rem 0.75rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

@keyframes arrowNudge {
    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(8px);
    }
}

@keyframes heroEnter {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) scale(0.8);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    100% {
        transform: translateY(42px) scale(1.05);
        opacity: 0;
    }
}

@keyframes pulseCelebrate {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.015);
    }

    100% {
        transform: scale(1);
    }
}

@media (max-width: 980px) {
    .form-panel {
        position: static;
    }

    .customer-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .customer-table {
        min-width: 0;
    }

    .admin-shell__header,
    .admin-section__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-status-editor {
        grid-template-columns: 1fr;
        min-width: 0;
    }
}

@media (max-width: 680px) {
    .hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .affiliate-how__cta .btn-brand {
        width: 100%;
    }

    .customer-shell__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .customer-auth__modes {
        grid-template-columns: 1fr;
    }

    .customer-auth__mode,
    .customer-auth__back {
        min-height: 2.75rem;
    }

    .customer-auth__field input,
    .public-form__field input {
        font-size: 16px;
    }

    .admin-section-map {
        gap: 0.4rem;
    }

    .admin-section-map__link {
        min-height: 2.4rem;
        padding: 0.45rem 0.78rem;
    }

    .admin-create-grid,
    .admin-create-grid--lead {
        grid-template-columns: 1fr;
    }

    .admin-create-grid .admin-button {
        width: 100%;
        justify-self: stretch;
        min-height: 2.6rem;
    }

    .admin-controls {
        flex-wrap: wrap;
    }

    .admin-table {
        min-width: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal-on-scroll {
        opacity: 1;
        transform: none;
    }
}
