.pv {
    --pv-ink: #161A1D;
    --pv-slate: #5A646E;
    --pv-paper: #EEF1F5;
    --pv-card: #FFFFFF;
    --pv-signal: #0FB5C9;
    --pv-signal-bright: #3FE0F0;
    --pv-signal-deep: #0A7E8C;
    --pv-whats: #25D366;
    --pv-whats-deep: #1EB858;
    --pv-line: rgba(22, 26, 29, .08);
    --pv-radius: 22px;
    --pv-radius-btn: 13px;
    --pv-ease: cubic-bezier(.2, .7, .2, 1);
    --pv-shadow: 0 1px 2px rgba(22, 26, 29, .05), 0 24px 60px -24px rgba(22, 26, 29, .30);

    margin: 0;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 20px;
    box-sizing: border-box;
    background:
        radial-gradient(58% 46% at 50% -4%, rgba(15, 181, 201, .12), transparent 70%),
        radial-gradient(70% 56% at 50% 116%, rgba(22, 26, 29, .07), transparent 72%),
        var(--pv-paper);
    color: var(--pv-ink);
    font-family: "Space Grotesk", "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Fundo escuro fixo: o gradient tingido pela cor da marca sumia em hotspot com
   primary preto (color-mix de preto sobre #0B0E13 = o proprio fundo). */
.pv-brand {
    background: #0B0E13;
}

.pv-hotspot-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.pv-brand-logo {
    position: absolute;
    top: 46%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 44vw;
    max-height: 32vh;
    object-fit: contain;
    opacity: .12;
    filter: grayscale(.15);
}

.pv-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: radial-gradient(120% 92% at 50% 26%, rgba(8, 10, 14, .34), rgba(5, 7, 10, .64));
    -webkit-backdrop-filter: blur(7px) saturate(106%);
    backdrop-filter: blur(7px) saturate(106%);
}

.pv-plain .pv-backdrop {
    display: none;
}

.pv *,
.pv *::before,
.pv *::after {
    box-sizing: border-box;
}

.pv [hidden] {
    display: none !important;
}

.pv .ti {
    width: 1.15em;
    height: 1.15em;
    flex-shrink: 0;
    vertical-align: middle;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pv-shell {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 432px;
}

.pv-card {
    background: var(--pv-card);
    border: 1px solid var(--pv-line);
    border-radius: var(--pv-radius);
    box-shadow: var(--pv-shadow);
    padding: 30px 28px;
    text-align: center;
}

.pv-card > * {
    animation: pv-rise .55s var(--pv-ease) both;
}

.pv-logo {
    margin-bottom: 18px;
    animation-delay: .05s;
}

.pv-logo img {
    max-height: 50px;
    max-width: 190px;
    object-fit: contain;
}

.pv-head {
    margin-bottom: 16px;
    animation-delay: .12s;
}

.pv-title {
    margin: 0 0 6px;
    font-size: clamp(1.5rem, 5.2vw, 1.9rem);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.12;
}

.pv-subtitle {
    margin: 0;
    color: var(--pv-slate);
    font-size: .97rem;
}

.pv-microlabel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .65em;
    margin: 0 0 18px;
    font-family: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Roboto Mono", monospace;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--pv-signal-deep);
    animation-delay: .19s;
}

.pv-microlabel::before,
.pv-microlabel::after {
    content: "";
    width: 22px;
    height: 1px;
    background: currentColor;
    opacity: .4;
}

.pv-scanner {
    position: relative;
    width: fit-content;
    margin: 0 auto 24px;
    padding: 20px;
    border-radius: 20px;
    background: linear-gradient(155deg, #232B31 0%, var(--pv-ink) 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05), 0 20px 44px -22px rgba(22, 26, 29, .55);
    transition: box-shadow .55s var(--pv-ease);
    animation-delay: .26s;
}

.pv-scanner[data-state="ready"] {
    box-shadow:
        inset 0 0 0 1px rgba(15, 181, 201, .28),
        0 0 0 1px rgba(15, 181, 201, .12),
        0 22px 48px -20px rgba(10, 126, 140, .45);
}

.pv-bracket {
    position: absolute;
    width: 24px;
    height: 24px;
    border: 3px solid var(--pv-signal);
    border-radius: 4px;
    filter: drop-shadow(0 0 5px rgba(15, 181, 201, .5));
    transition: border-color .4s ease, filter .4s ease;
}

.pv-bracket--tl {
    top: 12px;
    left: 12px;
    border-right: 0;
    border-bottom: 0;
    transform-origin: top left;
}

.pv-bracket--tr {
    top: 12px;
    right: 12px;
    border-left: 0;
    border-bottom: 0;
    transform-origin: top right;
}

.pv-bracket--bl {
    bottom: 12px;
    left: 12px;
    border-right: 0;
    border-top: 0;
    transform-origin: bottom left;
}

.pv-bracket--br {
    bottom: 12px;
    right: 12px;
    border-left: 0;
    border-top: 0;
    transform-origin: bottom right;
}

.pv-scanner[data-state="ready"] .pv-bracket {
    border-color: var(--pv-signal-bright);
    filter: drop-shadow(0 0 8px rgba(63, 224, 240, .75));
    animation: pv-lock .6s var(--pv-ease);
}

.pv-qr {
    position: relative;
    width: clamp(196px, 62vw, 224px);
    aspect-ratio: 1;
    margin: 0 auto;
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
}

.pv-qr-skeleton,
.pv-qr-img {
    position: absolute;
    inset: 11px;
    border-radius: 6px;
}

.pv-qr-img {
    object-fit: contain;
    opacity: 0;
    transform: scale(.94);
    transition: opacity .6s ease, transform .6s var(--pv-ease);
}

.pv-scanner[data-state="ready"] .pv-qr-img {
    opacity: 1;
    transform: none;
}

.pv-qr-skeleton {
    background: linear-gradient(100deg, #E4E7EB 28%, #F5F7F9 50%, #E4E7EB 72%);
    background-size: 220% 100%;
    animation: pv-shimmer 1.25s linear infinite;
    transition: opacity .4s ease, visibility 0s linear .4s;
}

.pv-scanner[data-state="ready"] .pv-qr-skeleton,
.pv-scanner[data-state="error"] .pv-qr-skeleton {
    opacity: 0;
    visibility: hidden;
    animation: none;
}

.pv-scanline {
    position: absolute;
    left: 9px;
    right: 9px;
    top: 4%;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--pv-signal-bright), transparent);
    box-shadow: 0 0 12px var(--pv-signal);
    opacity: 0;
    z-index: 2;
    pointer-events: none;
    animation: pv-scan 3.8s ease-in-out infinite;
    transition: opacity .4s ease;
}

.pv-scanner[data-state="ready"] .pv-scanline,
.pv-scanner[data-state="error"] .pv-scanline {
    opacity: 0;
    animation: none;
}

.pv-actions {
    display: flex;
    flex-direction: column;
    gap: 11px;
    animation-delay: .34s;
}

.pv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: .82rem 1.2rem;
    border: 0;
    border-radius: var(--pv-radius-btn);
    font-size: .95rem;
    font-weight: 600;
    line-height: 1;
    color: #FFFFFF;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s ease, box-shadow .25s ease, transform .12s var(--pv-ease);
}

.pv-btn--primary {
    background: linear-gradient(135deg, var(--pv-signal-deep), #0b6f7c);
    box-shadow: 0 6px 16px -6px rgba(10, 126, 140, .55);
}

.pv-btn--primary:hover,
.pv-btn--primary:focus-visible {
    box-shadow: 0 10px 24px -6px rgba(10, 126, 140, .6), 0 0 0 4px rgba(15, 181, 201, .18);
    transform: translateY(-2px);
}

.pv-btn--whats {
    background: linear-gradient(135deg, var(--pv-whats), #20bd5b);
    box-shadow: 0 6px 16px -6px rgba(37, 211, 102, .55);
}

.pv-btn--whats:hover,
.pv-btn--whats:focus-visible {
    box-shadow: 0 10px 24px -6px rgba(37, 211, 102, .6), 0 0 0 4px rgba(37, 211, 102, .22);
    transform: translateY(-2px);
}

.pv-btn:active {
    transform: translateY(0);
}

.pv-btn:focus-visible {
    outline: 2px solid var(--pv-signal);
    outline-offset: 2px;
}

.pv-error {
    margin: 14px 0 0;
    color: #B42318;
    font-size: .85rem;
}

.pv-footer {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--pv-line);
    color: var(--pv-slate);
    font-size: .83rem;
    line-height: 1.55;
    animation-delay: .42s;
}

.pv-footer-label {
    font-weight: 700;
    color: var(--pv-ink);
    margin-bottom: 2px;
}

@keyframes pv-rise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes pv-shimmer {
    0% {
        background-position: 220% 0;
    }

    100% {
        background-position: -220% 0;
    }
}

@keyframes pv-scan {
    0% {
        top: 8%;
        opacity: 0;
    }

    12% {
        opacity: .85;
    }

    46% {
        top: 88%;
        opacity: .85;
    }

    56% {
        top: 88%;
        opacity: 0;
    }

    100% {
        top: 8%;
        opacity: 0;
    }
}

@keyframes pv-lock {
    0% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.14);
    }

    100% {
        transform: scale(1);
    }
}

@media (max-width: 380px) {
    .pv-card {
        padding: 24px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .pv-card > * {
        animation: none;
    }

    .pv-qr-img {
        transition: opacity .2s ease;
        transform: none;
    }

    .pv-qr-skeleton,
    .pv-scanline {
        animation: none;
    }

    .pv-scanner[data-state="ready"] .pv-bracket {
        animation: none;
    }

    .pv-scanline {
        top: 50%;
        opacity: .5;
    }

    .pv-btn {
        transition: none;
    }

    .pv-btn--primary:hover,
    .pv-btn--whats:hover {
        transform: none;
    }
}
