/* Recuperação de senha — visual alinhado ao login, chrome nativo no mobile */
:root {
    --ink: #0f172a;
    --ink-soft: #1e293b;
    --slate: #475569;
    --muted: #64748b;
    --line: #e2e8f0;
    --surface: #ffffff;
    --page: #f1f5f9;
    --accent: #c9a227;
    --accent-soft: rgba(201, 162, 39, 0.15);
    --focus: #2563eb;
    --ok: #059669;
    --ok-bg: #ecfdf5;
    --ok-line: #a7f3d0;
    --ok-ink: #065f46;
    --warn: #d97706;
    --warn-bg: #fffbeb;
    --warn-line: #fde68a;
    --warn-ink: #92400e;
    --err: #dc2626;
    --err-bg: #fef2f2;
    --err-line: #fecaca;
    --err-ink: #991b1b;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --shadow-card: 0 25px 50px -12px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.04);
    --font: 'DM Sans', system-ui, sans-serif;
    --font-display: 'Instrument Serif', Georgia, serif;
    --nav-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html {
    height: 100%;
    -webkit-text-size-adjust: 100%;
}
body.pr-body {
    margin: 0;
    min-height: 100%;
    min-height: 100dvh;
    font-family: var(--font);
    color: var(--ink);
    background: var(--page);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.pr-shell {
    display: flex;
    min-height: 100dvh;
}

@media (min-width: 992px) {
    .pr-shell {
        height: 100dvh;
        max-height: 100dvh;
        overflow: hidden;
    }
    .pr-brand {
        align-self: stretch;
        min-height: 0;
        overflow-y: auto;
    }
    .pr-main {
        min-height: 0;
    }
}

/* —— Brand / painel esquerdo —— */
.pr-brand {
    flex: 0 0 min(40%, 440px);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: clamp(1.25rem, 3vh, 2.5rem) clamp(1.25rem, 2.5vw, 2.5rem);
    background:
        radial-gradient(ellipse 90% 70% at 20% 20%, rgba(201,162,39,.12) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 80% 80%, rgba(37,99,235,.08) 0%, transparent 50%),
        linear-gradient(165deg, #0f172a 0%, #1e293b 45%, #0f172a 100%);
    color: #f8fafc;
    overflow: hidden;
}
.pr-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.pr-brand-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 360px;
    text-align: left;
}
.pr-brand-mark {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.pr-brand-mark img {
    width: 48px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,.3));
}
.pr-brand-name {
    font-family: var(--font-display);
    font-size: 2rem;
    line-height: 1;
    margin: 0;
    font-weight: 400;
    color: #f8fafc;
}
.pr-brand-tagline {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(248,250,252,.5);
    margin: 0.3rem 0 0;
}
.pr-brand-lead {
    font-size: 0.95rem;
    line-height: 1.55;
    color: rgba(248,250,252,.75);
    margin: 0 0 1.5rem;
}
.pr-brand-lead strong { color: #f8fafc; font-weight: 600; }
.pr-brand-flow {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.pr-brand-flow li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.86rem;
    color: rgba(248,250,252,.7);
    line-height: 1.4;
}
.pr-brand-flow .flow-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(201,162,39,.15);
    border: 1px solid rgba(201,162,39,.35);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pr-brand-flow li.is-current .flow-num {
    background: var(--accent);
    color: #0f172a;
    border-color: var(--accent);
}
.pr-brand-flow li.is-done .flow-num {
    background: #059669;
    border-color: #34d399;
    color: #fff;
}
.pr-brand-quote {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,.1);
    font-size: 0.85rem;
    font-style: italic;
    color: rgba(248,250,252,.45);
    line-height: 1.6;
}

.pr-back-desktop { display: none; }

/* —— Conteúdo —— */
.pr-main {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
    padding: clamp(1rem, 2.5vh, 2rem) clamp(1rem, 2vw, 1.5rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    background:
        radial-gradient(circle at 100% 0%, rgba(37,99,235,.04) 0%, transparent 40%),
        var(--page);
}
.pr-card {
    width: 100%;
    max-width: 440px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: clamp(1.35rem, 2.8vh, 2rem) clamp(1.2rem, 2.5vw, 1.85rem) clamp(1.25rem, 2.5vh, 1.75rem);
    display: flex;
    flex-direction: column;
    margin-top: auto;
    margin-bottom: auto;
}

/* —— Stepper —— */
.pr-steps {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0 0 1.35rem;
    padding: 0;
}
.pr-steps li {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--muted);
    text-transform: uppercase;
}
.pr-steps li:last-child { flex: 0 0 auto; }
.pr-steps .dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--line);
    background: #fff;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    flex-shrink: 0;
}
.pr-steps .label {
    margin-left: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pr-steps .rail {
    flex: 1;
    height: 2px;
    background: var(--line);
    margin: 0 0.45rem;
    min-width: 12px;
}
.pr-steps li.is-current { color: var(--ink); }
.pr-steps li.is-current .dot {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}
.pr-steps li.is-done { color: var(--ok); }
.pr-steps li.is-done .dot {
    border-color: var(--ok);
    background: var(--ok);
    color: #fff;
}
.pr-steps li.is-done .rail { background: #6ee7b7; }

.pr-header { margin-bottom: 1.15rem; }
.pr-header h1,
.pr-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
    color: var(--ink);
    letter-spacing: -0.02em;
    line-height: 1.25;
}
.pr-header p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--slate);
    line-height: 1.5;
}

/* —— Como funciona —— */
.pr-howto {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.45rem;
    margin-bottom: 1.15rem;
}
.pr-howto-item {
    padding: 0.7rem 0.5rem;
    border-radius: var(--radius-sm);
    background: #f8fafc;
    border: 1px solid var(--line);
    text-align: center;
}
.pr-howto-item .n {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--ink);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}
.pr-howto-item p {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--slate);
    line-height: 1.3;
}

/* —— Campos —— */
.pr-field { margin-bottom: 1rem; }
.pr-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--slate);
    margin-bottom: 0.4rem;
    letter-spacing: 0.02em;
}
.pr-wrap { position: relative; }
.pr-wrap .pr-icon {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 0.95rem;
    pointer-events: none;
    z-index: 2;
}
.pr-wrap .form-control,
.pr-wrap input[type="text"],
.pr-wrap input[type="password"] {
    width: 100%;
    height: 3rem;
    padding: 0.55rem 0.9rem 0.55rem 2.55rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 16px; /* evita zoom iOS */
    color: var(--ink);
    background: #fafbfc;
    transition: border-color .2s, box-shadow .2s, background .2s;
    font-family: var(--font);
}
.pr-wrap .form-control:focus,
.pr-wrap input:focus {
    border-color: var(--focus);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    outline: none;
}
.pr-wrap .form-control.is-invalid,
.pr-wrap input.is-invalid {
    border-color: var(--err);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}
.pr-wrap.has-reveal .form-control,
.pr-wrap.has-reveal input { padding-right: 3rem; }
.pr-reveal {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 3rem;
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    z-index: 3;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    -webkit-tap-highlight-color: transparent;
}
.pr-reveal:hover { color: var(--ink); }
.pr-hint {
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 0.45rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 1.2em;
    line-height: 1.4;
}
.pr-hint.is-ok { color: var(--ok-ink); }
.pr-hint.is-err { color: var(--err-ink); }
.pr-hint.is-warn { color: var(--warn-ink); }
.invalid-feedback {
    font-size: 0.78rem;
    margin-top: 0.35rem;
    color: var(--err-ink);
    font-weight: 500;
    display: block;
}

.pr-alert {
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    padding: 0.75rem 0.9rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    line-height: 1.45;
    color: var(--ink);
}
.pr-alert.alert-danger, .pr-alert.is-error {
    background: var(--err-bg);
    border-color: var(--err-line);
    color: var(--err-ink);
}
.pr-alert.alert-warning, .pr-alert.is-warn {
    background: var(--warn-bg);
    border-color: var(--warn-line);
    color: var(--warn-ink);
}
.pr-alert.alert-success, .pr-alert.is-ok {
    background: var(--ok-bg);
    border-color: var(--ok-line);
    color: var(--ok-ink);
}
.pr-alert.alert-info {
    background: #f8fafc;
    border-color: var(--line);
    color: var(--slate);
}

/* —— Botões —— */
.pr-btn {
    width: 100%;
    min-height: 3rem;
    height: 3rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font);
    color: #fff;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
    transition: transform .15s, box-shadow .15s, opacity .15s;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.pr-btn:hover:not(:disabled) {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.3);
}
.pr-btn:active:not(:disabled) { transform: translateY(0); }
.pr-btn:disabled { opacity: 0.65; cursor: not-allowed; }
.pr-btn .pr-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: pr-spin .7s linear infinite;
    position: absolute;
}
.pr-btn.is-loading .pr-btn-label { visibility: hidden; }
.pr-btn.is-loading .pr-spinner { display: block; }
.pr-btn-ghost {
    background: #fff;
    color: var(--ink);
    box-shadow: none;
    border: 1px solid var(--line);
}
.pr-btn-ghost:hover:not(:disabled) {
    color: var(--ink);
    background: #f8fafc;
    box-shadow: none;
}
.pr-btn-mail {
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}
.pr-btn-mail:hover:not(:disabled) { color: #fff; }

@keyframes pr-spin { to { transform: rotate(360deg); } }

.pr-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.35rem;
}

/* —— Card CIM —— */
.pr-cim {
    display: none;
    margin-bottom: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #fff;
}
.pr-cim.is-visible {
    display: block;
    animation: pr-fade-up .35s cubic-bezier(.22,1,.36,1);
}
.pr-cim-head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 0.9rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--line);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ink);
}
.pr-cim-head i { color: var(--muted); }
.pr-badge {
    margin-left: auto;
    padding: 0.18rem 0.5rem;
    border-radius: 99px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: #e2e8f0;
    color: var(--slate);
}
.pr-badge.is-ok { background: #d1fae5; color: #065f46; }
.pr-badge.is-error { background: #fee2e2; color: #991b1b; }
.pr-badge.is-warning { background: #fef3c7; color: #92400e; }
.pr-cim-body { padding: 0.85rem 0.9rem 0.95rem; }
.pr-cim-row {
    display: flex;
    gap: 0.75rem;
    align-items: baseline;
    font-size: 0.875rem;
    padding: 0.4rem 0;
}
.pr-cim-row + .pr-cim-row { border-top: 1px dashed var(--line); }
.pr-cim-row .label {
    color: var(--muted);
    text-transform: uppercase;
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    font-weight: 700;
    min-width: 92px;
    flex-shrink: 0;
}
.pr-cim-row .value { color: var(--ink); font-weight: 500; word-break: break-word; }
.pr-cim-row .value code {
    background: #f1f5f9;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.82rem;
    color: var(--ink);
    border: 1px solid var(--line);
}
.pr-note {
    margin-top: 0.65rem;
    padding: 0.7rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    line-height: 1.45;
}
.pr-note.is-error {
    background: var(--err-bg);
    border: 1px solid var(--err-line);
    color: var(--err-ink);
}
.pr-note.is-warn {
    background: var(--warn-bg);
    border: 1px solid var(--warn-line);
    color: var(--warn-ink);
}
.pr-sec-list { margin-top: 0.55rem; }
.pr-sec-item {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.8rem;
    margin-top: 0.5rem;
}
.pr-sec-item .nome { font-weight: 700; font-size: 0.9rem; color: var(--ink); }
.pr-sec-item .cargo {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin: 0.15rem 0 0.4rem;
    font-weight: 600;
}
.pr-sec-item .contato {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.85rem;
    font-size: 0.8rem;
    color: var(--ink);
}
.pr-sec-item .contato span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.pr-sec-item .contato i { color: var(--muted); }
.pr-details {
    margin-top: 0.65rem;
    font-size: 0.82rem;
}
.pr-details summary {
    cursor: pointer;
    color: var(--slate);
    font-weight: 600;
    font-size: 0.78rem;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.pr-details summary::-webkit-details-marker { display: none; }
.pr-details summary::before {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(-45deg);
    transition: transform .2s;
}
.pr-details[open] summary::before { transform: rotate(45deg); }

/* —— Painéis / passos —— */
.pr-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #f8fafc;
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--slate);
}
.pr-panel-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--ink);
    margin-bottom: 0.45rem;
}
.pr-panel.is-warn {
    background: var(--warn-bg);
    border-color: var(--warn-line);
    color: var(--warn-ink);
}
.pr-panel.is-error {
    background: var(--err-bg);
    border-color: var(--err-line);
    color: var(--err-ink);
}
.pr-panel.is-ok {
    background: var(--ok-bg);
    border-color: var(--ok-line);
    color: var(--ok-ink);
}

.pr-next {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
    counter-reset: prstep;
}
.pr-next li {
    counter-increment: prstep;
    position: relative;
    display: flex;
    gap: 0.75rem;
    padding: 0.7rem 0;
    border-bottom: 1px dashed var(--line);
    font-size: 0.875rem;
    color: var(--ink);
    line-height: 1.4;
    align-items: flex-start;
}
.pr-next li:last-child { border-bottom: none; padding-bottom: 0.15rem; }
.pr-next li::before {
    content: counter(prstep);
    flex-shrink: 0;
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.72rem;
    margin-top: 0.05rem;
}

/* —— Checklist senha —— */
.pr-rules {
    list-style: none;
    margin: 0 0 1.1rem;
    padding: 0.15rem 0 0;
    display: grid;
    gap: 0.4rem;
}
.pr-rules li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 500;
}
.pr-rules .tick {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.55rem;
    color: transparent;
    transition: background .2s, border-color .2s, color .2s;
}
.pr-rules li.is-met { color: var(--ok-ink); }
.pr-rules li.is-met .tick {
    background: var(--ok);
    border-color: var(--ok);
    color: #fff;
}

.pr-strength {
    display: flex;
    gap: 0.3rem;
    margin-top: 0.5rem;
}
.pr-strength span {
    flex: 1;
    height: 4px;
    border-radius: 99px;
    background: #e2e8f0;
    transition: background .2s;
}
.pr-strength[data-score="1"] span:nth-child(1) { background: #ef4444; }
.pr-strength[data-score="2"] span:nth-child(-n+2) { background: #f59e0b; }
.pr-strength[data-score="3"] span:nth-child(-n+3) { background: #3b82f6; }
.pr-strength[data-score="4"] span { background: #059669; }

.pr-match {
    font-size: 0.78rem;
    margin-top: 0.4rem;
    font-weight: 600;
    min-height: 1.1em;
}
.pr-match.is-ok { color: var(--ok-ink); }
.pr-match.is-err { color: var(--err-ink); }

/* —— Rodapé —— */
.pr-footer {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    text-align: center;
}
.pr-footer-links {
    display: flex;
    justify-content: center;
    gap: 1.1rem;
    flex-wrap: wrap;
    margin-bottom: 0.55rem;
}
.pr-footer-links a {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--slate);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 44px;
    padding: 0.25rem 0;
}
.pr-footer-links a:hover { color: var(--focus); }
.pr-copy {
    font-size: 0.72rem;
    color: #94a3b8;
    margin: 0;
}
.pr-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
    font-size: 0.68rem;
    color: #94a3b8;
}
.pr-secure i { color: #22c55e; font-size: 0.7rem; }

/* —— Sucesso (hero animado) —— */
.pr-success {
    text-align: center;
    margin: 0.15rem 0 1.35rem;
    position: relative;
}
.pr-success-scene {
    position: relative;
    width: 132px;
    height: 132px;
    margin: 0 auto 1.1rem;
}
.pr-success-burst {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.pr-success-burst i {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 7px;
    height: 7px;
    margin: -3.5px 0 0 -3.5px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0;
    animation: pr-burst 0.9s 0.45s cubic-bezier(.22,1,.36,1) forwards;
}
.pr-success-burst i:nth-child(odd) { background: #34d399; width: 5px; height: 5px; }
.pr-success-burst i:nth-child(1) { --dx: 0px; --dy: -58px; }
.pr-success-burst i:nth-child(2) { --dx: 42px; --dy: -42px; animation-delay: .5s; }
.pr-success-burst i:nth-child(3) { --dx: 58px; --dy: 0px; animation-delay: .52s; }
.pr-success-burst i:nth-child(4) { --dx: 42px; --dy: 42px; animation-delay: .54s; }
.pr-success-burst i:nth-child(5) { --dx: 0px; --dy: 58px; animation-delay: .48s; }
.pr-success-burst i:nth-child(6) { --dx: -42px; --dy: 42px; animation-delay: .56s; }
.pr-success-burst i:nth-child(7) { --dx: -58px; --dy: 0px; animation-delay: .5s; }
.pr-success-burst i:nth-child(8) { --dx: -42px; --dy: -42px; animation-delay: .58s; }
.pr-success-burst i:nth-child(9) { --dx: 22px; --dy: -54px; width: 4px; height: 4px; background: #60a5fa; animation-delay: .62s; }
.pr-success-burst i:nth-child(10) { --dx: -22px; --dy: 54px; width: 4px; height: 4px; background: #fbbf24; animation-delay: .64s; }

.pr-success-rings span {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 2px solid rgba(5, 150, 105, 0.28);
    animation: pr-ring 1.6s 0.2s ease-out both;
}
.pr-success-rings span:nth-child(2) {
    inset: 0;
    border-color: rgba(201, 162, 39, 0.28);
    animation-delay: 0.38s;
}

.pr-success-badge {
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pr-pop 0.55s cubic-bezier(.22,1,.36,1) both;
}
.pr-success-svg {
    width: 72px;
    height: 72px;
    overflow: visible;
}
.pr-success-circle {
    fill: none;
    stroke: rgba(255,255,255,.18);
    stroke-width: 3;
}
.pr-success-circle-draw {
    fill: none;
    stroke: #34d399;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 264;
    stroke-dashoffset: 264;
    animation: pr-draw 0.7s 0.15s ease forwards;
}
.pr-success-check {
    fill: none;
    stroke: #fbbf24;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 72;
    stroke-dashoffset: 72;
    animation: pr-draw 0.45s 0.55s cubic-bezier(.22,1,.36,1) forwards;
}
.pr-success-mini {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #e2e8f0;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(15,23,42,.12);
    animation: pr-pop 0.4s 0.85s cubic-bezier(.22,1,.36,1) both;
}
.pr-success[data-kind="lock"] .pr-success-mini { color: var(--ok); }

.pr-success-title {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 0.35rem;
    color: var(--ink);
    animation: pr-fade-up 0.5s 0.7s cubic-bezier(.22,1,.36,1) both;
}
.pr-success-sub {
    margin: 0 auto;
    max-width: 22rem;
    font-size: 0.95rem;
    color: var(--slate);
    line-height: 1.5;
    animation: pr-fade-up 0.5s 0.85s cubic-bezier(.22,1,.36,1) both;
}

.pr-success-rest {
    animation: pr-fade-up 0.55s 1s cubic-bezier(.22,1,.36,1) both;
}

/* Envelope voando (página de e-mail enviado) */
.pr-mail-fly {
    position: absolute;
    left: 50%;
    top: 18px;
    width: 28px;
    height: 20px;
    margin-left: -14px;
    opacity: 0;
    animation: pr-mail-fly 1.1s 0.15s ease-out both;
    pointer-events: none;
    z-index: 2;
}
.pr-mail-fly .env {
    width: 100%;
    height: 100%;
    background: #fff;
    border: 2px solid #1e293b;
    border-radius: 3px;
    position: relative;
    box-shadow: 0 4px 10px rgba(15,23,42,.2);
}
.pr-mail-fly .env::before {
    content: '';
    position: absolute;
    left: -2px;
    right: -2px;
    top: -2px;
    height: 12px;
    background: linear-gradient(135deg, transparent 49%, #1e293b 50%, #1e293b 51%, transparent 52%),
                linear-gradient(225deg, transparent 49%, #1e293b 50%, #1e293b 51%, transparent 52%);
    background-size: 50% 100%;
    background-repeat: no-repeat;
    background-position: left, right;
}

@keyframes pr-draw {
    to { stroke-dashoffset: 0; }
}
@keyframes pr-pop {
    from { opacity: 0; transform: scale(0.6); }
    70% { transform: scale(1.08); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes pr-ring {
    from { transform: scale(0.7); opacity: 0.7; }
    to { transform: scale(1.35); opacity: 0; }
}
@keyframes pr-burst {
    0% { opacity: 0; transform: translate(0, 0) scale(0.4); }
    30% { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1); }
}
@keyframes pr-fade-up {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pr-mail-fly {
    0% { opacity: 0; transform: translate(-40px, 28px) rotate(-18deg) scale(0.6); }
    35% { opacity: 1; }
    100% { opacity: 0; transform: translate(8px, -8px) rotate(12deg) scale(0.85); }
}

/* Overlay de celebração em tela cheia */
.pr-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: max(1.5rem, env(safe-area-inset-top)) 1.5rem max(1.5rem, env(safe-area-inset-bottom));
    background:
        radial-gradient(ellipse 80% 55% at 50% 35%, #1e3a5f 0%, #0f172a 58%, #020617 100%);
    color: #f8fafc;
    text-align: center;
    animation: pr-overlay-out 0.6s 1.65s cubic-bezier(.22,1,.36,1) forwards;
}
body.pr-body:has(#pr-overlay:not(.is-gone)) {
    overflow: hidden;
}
.pr-overlay .pr-success-scene { margin-bottom: 0.35rem; }
.pr-overlay-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(248,250,252,.5);
    font-weight: 700;
    animation: pr-fade-up 0.45s 0.7s both;
}
.pr-overlay-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 6vw, 2.4rem);
    margin: 0;
    font-weight: 400;
    color: #f8fafc;
    animation: pr-fade-up 0.5s 0.8s both;
}
.pr-overlay-sub {
    margin: 0;
    max-width: 22rem;
    font-size: 0.95rem;
    color: rgba(248,250,252,.7);
    line-height: 1.5;
    animation: pr-fade-up 0.5s 0.95s both;
}
.pr-overlay.is-gone {
    display: none !important;
    pointer-events: none;
}
@keyframes pr-overlay-out {
    to { opacity: 0; visibility: hidden; transform: scale(1.03); pointer-events: none; }
}

/* Overlay de celebração no carregamento */
.pr-celebrate {
    pointer-events: none;
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
}
.pr-celebrate span {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 2px;
    opacity: 0;
    animation: pr-confetti 1.2s ease-out forwards;
}
.pr-celebrate span:nth-child(1) { left: 12%; top: 8%; background: #fbbf24; animation-delay: .2s; }
.pr-celebrate span:nth-child(2) { left: 28%; top: 4%; background: #34d399; animation-delay: .28s; }
.pr-celebrate span:nth-child(3) { left: 55%; top: 6%; background: #60a5fa; animation-delay: .22s; }
.pr-celebrate span:nth-child(4) { left: 78%; top: 10%; background: #f472b6; animation-delay: .35s; }
.pr-celebrate span:nth-child(5) { left: 88%; top: 18%; background: #fbbf24; animation-delay: .4s; }
.pr-celebrate span:nth-child(6) { left: 8%; top: 22%; background: #34d399; animation-delay: .45s; }

@keyframes pr-confetti {
    0% { opacity: 0; transform: translateY(0) rotate(0); }
    20% { opacity: 1; }
    100% { opacity: 0; transform: translateY(48px) rotate(120deg); }
}

/* Nav mobile (app-like) */
.pr-nav {
    display: none;
}

/* —— Mobile: chrome de app nativo —— */
@media (max-width: 991px) {
    body.pr-body {
        background: var(--surface);
    }
    .pr-shell {
        flex-direction: column;
        min-height: 100dvh;
        min-height: 100svh;
    }
    .pr-brand {
        display: none;
    }
    .pr-nav {
        display: flex;
        align-items: center;
        gap: 0.65rem;
        position: sticky;
        top: 0;
        z-index: 30;
        min-height: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
        padding: env(safe-area-inset-top, 0px) 0.85rem 0.55rem;
        background: linear-gradient(165deg, #0f172a 0%, #1e293b 100%);
        color: #f8fafc;
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
    }
    .pr-nav-back {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        border: 1px solid rgba(255,255,255,.12);
        background: rgba(255,255,255,.08);
        color: #f8fafc;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        flex-shrink: 0;
        -webkit-tap-highlight-color: transparent;
    }
    .pr-nav-back:hover { color: #fff; background: rgba(255,255,255,.14); }
    .pr-nav-brand {
        display: flex;
        align-items: center;
        gap: 0.55rem;
        min-width: 0;
    }
    .pr-nav-brand img { width: 28px; height: auto; }
    .pr-nav-brand strong {
        font-family: var(--font-display);
        font-size: 1.25rem;
        font-weight: 400;
        display: block;
        line-height: 1.1;
    }
    .pr-nav-brand small {
        display: block;
        font-size: 0.65rem;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: rgba(248,250,252,.5);
    }
    .pr-main {
        flex: 1;
        align-items: stretch;
        justify-content: flex-start;
        padding: 0;
        background: var(--surface);
        overflow: visible;
    }
    .pr-card {
        max-width: none;
        border-radius: 0;
        box-shadow: none;
        padding: 1.15rem 1.15rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
        min-height: calc(100dvh - var(--nav-h) - env(safe-area-inset-top, 0px));
        display: flex;
        flex-direction: column;
    }
    .pr-card > form,
    .pr-success-rest { flex: 1; display: flex; flex-direction: column; }
    .pr-dock {
        margin-top: auto;
        padding-top: 1rem;
        position: sticky;
        bottom: 0;
        background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #fff 28%);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    .pr-steps .label { font-size: 0.62rem; }
    .pr-header h1, .pr-header h2 { font-size: 1.45rem; }
    .pr-howto { gap: 0.4rem; }
    .pr-footer { margin-top: auto; padding-top: 1.25rem; }
}

@media (max-width: 576px) {
    .pr-card { padding-left: 1rem; padding-right: 1rem; }
    .pr-steps .label { display: none; }
    .pr-steps li { justify-content: center; }
    .pr-steps .rail { margin: 0 0.35rem; }
    .pr-howto-item { padding: 0.6rem 0.35rem; }
    .pr-howto-item p { font-size: 0.68rem; }
    .pr-cim-row { flex-direction: column; gap: 0.15rem; }
    .pr-cim-row .label { min-width: 0; }
    .pr-success-title { font-size: 1.4rem; }
    .pr-success-scene { width: 120px; height: 120px; }
}

@media (min-width: 992px) {
    .pr-nav { display: none; }
    .pr-back-desktop { display: inline-flex; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
