.qr-scan-page {
    background: #f8fafc;
}

.qr-scan-shell {
    min-height: calc(100vh - 7rem);
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
    background:
        radial-gradient(circle at 15% 12%, rgba(14, 143, 102, 0.12), transparent 22rem),
        linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.qr-scan-card {
    width: min(100%, 760px);
    display: grid;
    gap: 1.1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.1);
    padding: clamp(1rem, 3vw, 1.6rem);
}

.qr-scan-kicker {
    margin: 0 0 0.4rem;
    color: #068C61;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.qr-scan-copy h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.85rem, 5vw, 2.6rem);
    line-height: 1.05;
    font-weight: 900;
}

.qr-scan-copy p {
    max-width: 38rem;
    margin: 0.65rem 0 0;
    color: #475569;
    line-height: 1.6;
}

.qr-scan-help {
    font-size: 0.9rem;
}

.qr-scanner {
    display: grid;
    gap: 0.75rem;
}

.qr-scanner-frame {
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 10;
    border-radius: 18px;
    background: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

.qr-scanner-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qr-scanner-frame::after {
    content: "";
    position: absolute;
    inset: 14%;
    border: 2px solid rgba(14, 143, 102, 0.92);
    border-radius: 18px;
    box-shadow: 0 0 0 999px rgba(15, 23, 42, 0.28);
    pointer-events: none;
}

.qr-scanner-placeholder {
    display: grid;
    place-items: center;
    gap: 0.4rem;
    color: #e2e8f0;
    text-align: center;
    padding: 1rem;
}

.qr-scanner-placeholder span {
    width: 4rem;
    height: 4rem;
    border-radius: 18px;
    background:
        linear-gradient(#0E8F66, #0E8F66) 25% 25% / 18px 3px no-repeat,
        linear-gradient(#0E8F66, #0E8F66) 25% 25% / 3px 18px no-repeat,
        linear-gradient(#0E8F66, #0E8F66) 75% 25% / 18px 3px no-repeat,
        linear-gradient(#0E8F66, #0E8F66) 75% 25% / 3px 18px no-repeat,
        linear-gradient(#0E8F66, #0E8F66) 25% 75% / 18px 3px no-repeat,
        linear-gradient(#0E8F66, #0E8F66) 25% 75% / 3px 18px no-repeat,
        linear-gradient(#0E8F66, #0E8F66) 75% 75% / 18px 3px no-repeat,
        linear-gradient(#0E8F66, #0E8F66) 75% 75% / 3px 18px no-repeat,
        rgba(14, 143, 102, 0.12);
}

.qr-scanner-placeholder small,
.qr-scan-status {
    color: #94a3b8;
    font-size: 0.86rem;
}

.qr-scan-primary,
.qr-scan-secondary {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 900;
    min-height: 2.75rem;
    padding: 0.75rem 1rem;
}

.qr-scan-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.qr-scan-primary {
    background: #068C61;
    color: #fff;
}

.qr-scan-secondary {
    background: #eef6f0;
    color: #166534;
}

.qr-scan-primary:hover {
    background: #056947;
}

.qr-scan-secondary:hover {
    background: #E9FFF7;
}

.qr-scan-error {
    margin: 0;
    border-radius: 12px;
    background: #fef2f2;
    color: #b91c1c;
    padding: 0.75rem 0.9rem;
    font-weight: 700;
}

.qr-scan-back {
    justify-self: start;
    color: #475569;
    font-weight: 800;
    text-decoration: none;
}

.qr-scan-back:hover {
    color: #068C61;
}

@media (max-width: 640px) {
    .qr-scan-shell {
        align-items: start;
        padding: 0.65rem 0.55rem 1rem;
    }

    .qr-scan-card {
        border-radius: 16px;
        padding: 0.9rem;
        box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
    }

    .qr-scanner-frame {
        aspect-ratio: 3 / 4;
        border-radius: 14px;
    }

    .qr-scanner-frame::after {
        inset: 11%;
        border-radius: 14px;
    }

    .qr-scan-primary,
    .qr-scan-secondary {
        width: 100%;
    }
}
