
        

        body {
            margin: 0;
            font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
            background: #f3f6fb;
            color: #07152f;
        }

        .public-topbar {
            background: #ffffff;
            border-bottom: 1px solid #dbe3ef;
            min-height: 74px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 18px;
            padding: 16px 28px;
        }

        .public-brand {
            color: #0b426a;
            font-weight: 900;
            font-size: 24px;
            text-decoration: none;
            white-space: nowrap;
        }

        .public-pill {
            background: #e8eef6;
            color: #334155;
            padding: 9px 13px;
            border-radius: 999px;
            font-weight: 800;
            font-size: 13px;
        }

        main {
            min-height: calc(100vh - 136px);
        }

        footer {
            text-align: center;
            color: #64748b;
            padding: 22px 16px;
            border-top: 1px solid #dbe3ef;
            background: #ffffff;
            font-size: 14px;
        }

        @media (max-width: 760px) {
            .public-topbar {
                padding: 14px 16px;
                align-items: flex-start;
                flex-direction: column;
            }
        }

/* ==========================================================================
   AutoDoc 360 - Public QR Mobile-First R1
   Consulta critica: documentos primero, una sola columna, sin scroll lateral.
   ========================================================================== */

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

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

.ad-qr-public {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.ad-qr-public .ad-qr-documents-page,
.ad-qr-public .ad-qr-viewer-page {
    width: min(100%, 980px);
    max-width: 980px;
    min-width: 0;
    margin: 0 auto;
    padding: 22px 18px 34px;
}

.ad-qr-documents-header,
.ad-qr-viewer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    margin-bottom: 18px;
}

.ad-qr-documents-heading,
.ad-qr-viewer-header > div {
    min-width: 0;
}

.ad-qr-lead {
    margin: 8px 0 0;
    color: #475569;
    font-size: 1rem;
    line-height: 1.55;
}

.ad-qr-access-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.ad-qr-access-actions form {
    margin: 0;
}

.ad-qr-close-access {
    min-height: 44px;
}

.ad-qr-documents-priority,
.ad-qr-secondary-information,
.ad-qr-document-frame-shell {
    width: 100%;
    min-width: 0;
    border: 1px solid #dbe3ef;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.ad-qr-documents-priority {
    padding: 20px;
}

.ad-qr-section-heading {
    margin-bottom: 16px;
}

.ad-qr-section-heading h2 {
    margin: 4px 0 6px;
    color: #07152f;
    font-size: 1.35rem;
    line-height: 1.25;
}

.ad-qr-section-heading p:last-child {
    margin: 0;
    color: #52627a;
    font-size: 1rem;
    line-height: 1.5;
}

.ad-qr-document-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    width: 100%;
    min-width: 0;
}

.ad-qr-document-card {
    width: 100%;
    min-width: 0;
    padding: 18px;
    border: 1px solid #d6e0ee;
    border-radius: 18px;
    background: #f8fbff;
}

.ad-qr-document-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.ad-qr-document-card-header > div {
    min-width: 0;
}

.ad-qr-document-label {
    margin: 0 0 5px;
    color: #2563eb;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ad-qr-document-name {
    margin: 0;
    overflow-wrap: anywhere;
    color: #07152f;
    font-size: 1.2rem;
    line-height: 1.3;
}

.ad-qr-document-availability {
    margin: 6px 0 0;
    color: #475569;
    font-size: 1rem;
    line-height: 1.45;
}


.ad-qr-document-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 16px 0;
}

.ad-qr-document-meta > div {
    min-width: 0;
    padding: 12px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.ad-qr-document-meta dt {
    margin: 0 0 4px;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
}

.ad-qr-document-meta dd {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.ad-qr-document-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
}

.ad-qr-public .ad-qr-document-primary.ad-btn,
.ad-qr-public .ad-qr-document-secondary.ad-btn,
.ad-qr-public .ad-qr-back-button.ad-btn {
    width: 100%;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    text-align: center;
    white-space: normal;
    line-height: 1.25;
}

.ad-qr-public .ad-qr-document-primary.ad-btn {
    font-size: 1.05rem;
    font-weight: 900;
}

.ad-qr-public .ad-qr-document-secondary.ad-btn {
    min-height: 48px;
    font-size: 0.98rem;
}

.ad-qr-secondary-alert {
    margin-top: 16px;
}

.ad-qr-secondary-information {
    margin-top: 18px;
    padding: 20px;
}

.ad-qr-section-heading--secondary {
    margin-bottom: 14px;
}

.ad-qr-status-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.ad-qr-status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

.ad-qr-status-item span {
    color: #52627a;
    font-size: 0.9rem;
    font-weight: 750;
}

.ad-qr-status-item strong {
    color: #0f172a;
    font-size: 1.15rem;
}

.ad-qr-information-card {
    margin-top: 10px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #ffffff;
}

.ad-qr-information-card h3 {
    margin: 4px 0 5px;
    font-size: 1.1rem;
}

.ad-qr-information-card p:last-child {
    margin: 0;
    color: #52627a;
    line-height: 1.5;
}

.ad-qr-signup-cta {
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    background: #f8fafc;
    text-align: center;
}

.ad-qr-signup-question {
    margin: 0;
    color: #52627a;
    font-size: 0.92rem;
    line-height: 1.45;
}

.ad-qr-signup-link {
    display: inline-block;
    margin-top: 6px;
    color: #1d4ed8;
    font-size: 0.95rem;
    font-weight: 850;
    line-height: 1.35;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ad-qr-signup-link:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.28);
    outline-offset: 4px;
    border-radius: 6px;
}

.ad-qr-privacy {
    margin-top: 18px;
}

.ad-qr-viewer-page {
    padding-top: 14px !important;
    padding-bottom: max(56px, calc(36px + env(safe-area-inset-bottom))) !important;
}

.ad-qr-viewer-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    width: 100%;
    padding: 8px 0 12px;
    background: rgba(243, 246, 251, 0.96);
    backdrop-filter: blur(8px);
}

.ad-qr-public .ad-qr-back-button.ad-btn {
    max-width: 340px;
    justify-content: flex-start;
    font-weight: 900;
}

.ad-qr-viewer-header {
    margin: 6px 0 14px;
}

.ad-qr-document-frame-shell {
    overflow: hidden;
    padding: 0;
    background: #e8eef6;
}

.ad-qr-document-frame {
    display: block;
    width: 100%;
    min-width: 0;
    height: min(72vh, 860px);
    min-height: 520px;
    border: 0;
    background: #ffffff;
}

.ad-qr-viewer-actions {
    width: 100%;
    margin-top: 16px;
}

.ad-qr-viewer-actions--safe {
    padding-bottom: 4px;
}

.ad-qr-privacy--viewer {
    margin-bottom: max(18px, env(safe-area-inset-bottom));
}

@media (max-width: 760px) {
    .public-topbar {
        min-height: auto;
    }

    .ad-qr-public .ad-qr-documents-page,
    .ad-qr-public .ad-qr-viewer-page {
        width: 100%;
        max-width: 100%;
        padding: 14px 12px 28px;
    }

    .ad-qr-documents-header,
    .ad-qr-viewer-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .ad-qr-access-actions {
        justify-content: flex-start;
    }

    .ad-qr-access-actions form,
    .ad-qr-close-access {
        width: 100%;
    }

    .ad-qr-documents-priority,
    .ad-qr-secondary-information {
        padding: 16px;
        border-radius: 18px;
    }

    .ad-qr-section-heading h2 {
        font-size: 1.25rem;
    }

    .ad-qr-document-card {
        padding: 16px;
    }

    .ad-qr-document-card-header {
        align-items: flex-start;
    }

    .ad-qr-document-meta {
        grid-template-columns: 1fr;
    }

    .ad-qr-status-list {
        grid-template-columns: 1fr;
    }

    .ad-qr-document-frame {
        height: 68vh;
        min-height: 460px;
    }

    .ad-qr-public .ad-qr-back-button.ad-btn {
        max-width: none;
    }
}

@media (max-width: 420px) {
    .ad-qr-public .ad-qr-documents-page,
    .ad-qr-public .ad-qr-viewer-page {
        padding-left: 10px;
        padding-right: 10px;
    }

    .ad-qr-document-card-header {
        flex-direction: column;
    }

    .ad-qr-document-name {
        font-size: 1.15rem;
    }

    .ad-qr-document-frame {
        min-height: 420px;
    }
}
