@import url("../base/variables.css");
@import url("../base/reset.css");
@import url("../base/utilities.css");
@import url("../base/buttons.css");
@import url("../base/global.css");

/* ─── LAYOUT ──────────────────────────────────────────────── */
.page-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.panel-left {
    background: var(--grad-main);
    background-size: 300% 300%;
    animation: gradShift 14s ease infinite;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem;
}

/* Brand */
.panel-brand {
    position: relative;
    z-index: 2;
    animation: fadeDown .8s ease both;
}

.brand-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--grad-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 168, 150, .4);
    margin-bottom: 1.2rem;
}

.panel-brand h2 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
}

.panel-brand p {
    font-size: .8rem;
    color: rgba(255, 255, 255, .55);
    margin-top: .2rem;
}

.panel-right {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2.5rem;
    position: relative;
    overflow-y: auto;
}

/* Centro */
.panel-center {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: fadeIn 1s ease .3s both;
}

.panel-center .headline {
    font-size: clamp(1.6rem, 2.5vw, 2.4rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.22;
    margin-bottom: 1rem;
}

.panel-center .headline em {
    color: var(--amber);
    font-style: normal;
}

.panel-center .lead-text {
    font-size: .9rem;
    color: rgba(255, 255, 255, .65);
    line-height: 1.75;
    max-width: 380px;
}

/* Steps list no painel */
.panel-steps {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.panel-step {
    display: flex;
    align-items: center;
    gap: .85rem;
    animation: fadeUp .6s ease both;
}

.panel-step:nth-child(1) { animation-delay: .5s; }
.panel-step:nth-child(2) { animation-delay: .65s; }
.panel-step:nth-child(3) { animation-delay: .8s; }

.panel-step span {
    font-size: .85rem;
    color: rgba(255, 255, 255, .65);
}

.panel-step span strong {
    color: #fff;
}

/* Rodapé */
.panel-footer {
    position: relative;
    z-index: 2;
    font-size: .73rem;
    color: rgba(255, 255, 255, .3);
    animation: fadeIn 1s ease .9s both;
}

/* ─── PAINEL ESQUERDO ─────────────────────────────────────── */
.deco-circle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.deco-c1 {
    width: 420px;
    height: 420px;
    top: -100px;
    right: -140px;
    border: 1px solid rgba(255, 255, 255, .07);
}

.deco-c2 {
    width: 260px;
    height: 260px;
    bottom: -60px;
    left: -60px;
    border: 1px solid rgba(0, 168, 150, .18);
}

.deco-c3 {
    width: 150px;
    height: 150px;
    top: 42%;
    right: 10%;
    border: 1px solid rgba(244, 162, 97, .22);
    animation: float 7s ease-in-out infinite;
}

.deco-blob {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 168, 150, .18) 0%, transparent 65%);
    width: 500px;
    height: 500px;
    top: 10%;
    right: -120px;
    pointer-events: none;
}

/* ─── PAINEL DIREITO ──────────────────────────────────────── */
.confirm-card {
    width: 100%;
    max-width: 420px;
    animation: scaleIn .55s cubic-bezier(.22, .68, 0, 1.2) .1s both;
    text-align: center;
}

.form-card {
    width: 100%;
    max-width: 420px;
    min-width: 0;
    animation: scaleIn .55s cubic-bezier(.22, .68, 0, 1.2) .1s both;
}

/* Topo */
.form-top {
    margin-bottom: 1.8rem;
}

/* ─── LINK VOLTAR ───────────────────────────────── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    color: var(--muted);
    font-weight: 500;
    transition: color .2s, gap .2s;
    margin-bottom: 1.6rem;
    animation: fadeIn .7s ease .85s both;
}

.back-link:hover {
    color: var(--teal);
    gap: .65rem;
}

/* ─── BADGE STATUS ────────────────────────────────────────── */
.form-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(0, 168, 150, .08);
    border: 1px solid rgba(0, 168, 150, .2);
    color: var(--teal);
    border-radius: 50px;
    padding: .3rem 1rem;
    font-size: .73rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    animation: fadeDown .7s ease .5s both;
}

.form-top h1 {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.18;
}

.form-top p {
    font-size: .88rem;
    color: var(--muted);
    margin-top: .4rem;
    line-height: 1.6;
}

/* Labels */
.field-label {
    font-size: .82rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: .4rem;
    display: flex;
    align-items: center;
    gap: .3rem;
}

.field-label .req {
    color: #e74c3c;
    font-size: .7rem;
}

/* Inputs */
.field-wrap {
    position: relative;
}

.field-icon {
    position: absolute;
    left: .9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: .95rem;
    pointer-events: none;
    transition: color .25s;
}

/* Feedback inline */
.field-msg {
    font-size: .74rem;
    margin-top: .35rem;
    min-height: 1rem;
    display: flex;
    align-items: center;
    gap: .3rem;
    animation: slideUp .2s ease;
}

.field-msg.ok {
    color: var(--green);
}

.field-msg.warn {
    color: var(--amber);
}

.field-msg.error {
    color: #e74c3c;
}

.form-input {
    width: 100%;
    border: 1.5px solid rgba(11, 30, 61, .14);
    border-radius: 12px;
    padding: .82rem .9rem .82rem 2.5rem;
    font-family: var(--font-body);
    font-size: .92rem;
    color: var(--navy);
    background: #fff;
    outline: none;
    transition: border-color .25s, box-shadow .25s;
}

.form-input::placeholder {
    color: rgba(107, 127, 163, .5);
}

.form-input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(0, 168, 150, .12);
}

.form-input.input-ok {
    border-color: var(--teal);
}

.form-input.input-ok~.field-icon {
    color: var(--green);
}

.form-input:focus~.field-icon {
    color: var(--teal);
}

.form-input.input-error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, .1);
}

.form-input.input-error~.field-icon {
    color: #e74c3c;
}

.form-input:focus~.field-icon,
.form-input.input-ok~.field-icon {
    color: var(--teal);
}

/* Toggle senhas */
.toggle-pwd-btn {
    background: rgba(0, 168, 150, .08);
    border: 1px solid rgba(0, 168, 150, .2);
    color: var(--teal);
    font-size: .78rem;
    font-weight: 600;
    font-family: var(--font-head);
    cursor: pointer;
    border-radius: 50px;
    padding: .3rem .9rem;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    transition: background .2s, box-shadow .2s;
}

.toggle-pwd-btn:hover {
    background: rgba(0, 168, 150, .15);
    box-shadow: 0 2px 10px rgba(0, 168, 150, .2);
}

/* Eye btn */
.eye-btn {
    position: absolute;
    right: .8rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--muted);
    font-size: .95rem;
    cursor: pointer;
    padding: .2rem;
    line-height: 1;
    transition: color .2s;
}

.eye-btn:hover {
    color: var(--teal);
}

/* Links inferiores */
.form-links {
    border-top: 1px solid rgba(11, 30, 61, .07);
    margin-top: 1.3rem;
    padding-top: 1.1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .55rem;
}

/* Info box */
.info-box {
    background: rgba(11, 30, 61, .03);
    border-radius: 12px;
    border: 1px solid rgba(11, 30, 61, .07);
    padding: .9rem 1.1rem;
    margin-bottom: 1.3rem;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    font-size: .82rem;
    color: var(--muted);
    line-height: 1.65;
}

.info-box .info-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex-shrink: 0;
    background: rgba(0, 168, 150, .1);
    color: var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
}

.link-register {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-family: var(--font-head);
    font-size: .84rem;
    font-weight: 700;
    color: var(--navy);
    background: var(--light);
    border: 1.5px solid rgba(11, 30, 61, .1);
    border-radius: 50px;
    padding: .55rem 1.3rem;
    transition: background .2s, border-color .2s, color .2s;
}

.link-register:hover {
    background: rgba(0, 168, 150, .08);
    border-color: var(--teal);
    color: var(--teal);
}

.link-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-head);
    font-size: .84rem;
    font-weight: 700;
    color: var(--teal);
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    transition: gap .2s, color .2s;
    padding: 0;
}

.link-btn:hover {
    gap: .6rem;
    color: var(--teal2);
}

.link-muted {
    font-size: .8rem;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    transition: color .2s;
}

.link-muted:hover {
    color: var(--navy);
}

.link-back {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-family: var(--font-head);
    font-size: .84rem;
    font-weight: 700;
    color: var(--muted);
    transition: color .2s, gap .2s;
}

.link-back:hover {
    color: var(--navy);
    gap: .65rem;
}

.link-back-login {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-family: var(--font-head);
    font-size: .84rem;
    font-weight: 700;
    color: var(--muted);
    transition: color .2s, gap .2s;
}

.link-back-login:hover {
    color: var(--navy);
    gap: .65rem;
}

.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    font-weight: 700;
    font-family: var(--font-head);
    border: 1.5px solid rgba(255, 255, 255, .2);
    color: rgba(255, 255, 255, .45);
}

.step-dot.done {
    background: var(--grad-teal);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 168, 150, .4);
}

/* Barra de força */
.strength-wrap {
    margin-top: .55rem;
}

.strength-track {
    height: 5px;
    background: rgba(11, 30, 61, .08);
    border-radius: 3px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0;
    border-radius: 3px;
    transition: width .4s ease, background .4s ease;
}

.strength-label {
    font-size: .73rem;
    color: var(--muted);
    display: block;
    margin-top: .3rem;
    min-height: 1rem;
    transition: color .3s;
}

/* Regras checklist */
.rules-box {
    background: rgba(11, 30, 61, .03);
    border-radius: 12px;
    border: 1px solid rgba(11, 30, 61, .07);
    padding: .85rem 1rem;
}

.rules-note {
    font-size: .78rem;
    color: var(--muted);
    line-height: 1.65;
    border-left: 3px solid var(--amber);
    padding-left: .75rem;
    margin-bottom: .85rem;
}

.rules-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .35rem .6rem;
}

.rule-chip {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .77rem;
    color: var(--muted);
    font-weight: 500;
    transition: color .3s;
}

.rule-chip .ri {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid rgba(11, 30, 61, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .6rem;
    flex-shrink: 0;
    transition: background .3s, border-color .3s, transform .3s;
}

.rule-chip.valid {
    color: var(--teal2);
}

.rule-chip.valid .ri {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
    transform: scale(1.15);
    animation: checkPop .3s cubic-bezier(.22, .68, 0, 1.3);
}

.email-preview {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--light);
    border: 1px solid rgba(11, 30, 61, .1);
    border-radius: 50px;
    padding: .4rem 1.1rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--navy);
    margin: 1rem auto .1rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Barra de progresso do timer */
.resend-area {
    margin-top: 1.5rem;
}

.resend-label {
    font-size: .8rem;
    color: var(--muted);
    margin-bottom: .5rem;
}

.timer-bar-track {
    height: 4px;
    background: rgba(11, 30, 61, .08);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: .7rem;
}

.timer-bar-fill {
    height: 100%;
    background: var(--grad-teal);
    border-radius: 2px;
    width: 100%;
    animation: progressFill 60s linear reverse forwards;
}

/* ─── ESTADO DE SUCESSO ───────────────────────────────────── */
.view {
    transition: opacity .4s ease, transform .4s ease;
}

.view.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    position: absolute;
    width: calc(100% - 5rem);
}

/* ─── ÍCONE DE SUCESSO ────────────────────────────────────── */
.success-ring,
.success-ring-wrap {
position: relative;
    width: 96px;
    height: 96px;
    animation: checkPop .6s cubic-bezier(.22, .68, 0, 1.2) .2s both;
}

.success-ring {
    z-index: 1;
}

.success-ring-wrap {
    margin: 0 auto 1.8rem;
}

.ripple-ring {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid rgba(0, 168, 150, .4);
    animation: ripple 2s ease-out infinite;
}

.ripple-ring:nth-child(2) {
    animation-delay: .7s;
}

.success-card {
    text-align: center;
    animation: scaleIn .5s cubic-bezier(.22, .68, 0, 1.2) both;
}

.success-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--grad-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    margin: 0 auto 1.4rem;
    box-shadow: 0 8px 28px rgba(0, 168, 150, .35);
    animation: pulse 2.5s ease-in-out 3;
}

.success-card h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: .5rem;
}

.success-card p {
    font-size: .87rem;
    color: var(--muted);
    line-height: 1.7;
    max-width: 300px;
    margin: 0 auto;
}

/* Overlay sucesso */
.success-overlay {
    position: absolute;
    inset: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s ease;
    z-index: 10;
}

.success-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--grad-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    box-shadow: 0 8px 28px rgba(0, 168, 150, .35);
    animation: scaleIn .5s cubic-bezier(.22, .68, 0, 1.2);
}

.success-overlay h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--navy);
}

.success-overlay p {
    font-size: .88rem;
    color: var(--muted);
    line-height: 1.7;
    max-width: 280px;
}

/* ─── RESPONSIVO ──────────────────────────────────────────── */
@media(max-width:900px) {
    .page-wrapper {
        grid-template-columns: 1fr;
    }

    .panel-left {
        display: none;
    }

    .panel-right {
        padding: 2.5rem 1.5rem;
        min-width: 0;
        min-height: 100vh;
        align-items: flex-start;
    }

    .form-card {
        padding-top: 1rem;
    }

    .view.hidden {
        width: calc(100% - 3rem);
    }
}

@media(max-width:480px) {
    .panel-right {
        padding: 2rem 1.2rem;
    }

    .view.hidden {
        width: calc(100% - 2.4rem);
    }
}