/* =========================
   Brand tokens
========================= */
:root {
    --qrd-french-chalk: #e8eee8;
    --qrd-french-chalk-light: #f6f8f5;
    --qrd-eau-de-nil: #8fac9b;
    --qrd-eau-de-nil-dark: #607f6d;
    --qrd-deep-bronze-green: #25352e;
    --qrd-oxford-blue: #243d5b;
    --qrd-grapefruit: #e76c60;
    --qrd-ink: #1d2822;
    --qrd-ink-soft: #526058;
    --qrd-muted: #718078;
    --qrd-border: #d3ddd6;
}

/* =========================
   Base
========================= */
html,
body {
    height: 100%;
}

html {
    font-size: 14px;
}

body {
    margin: 0;
    background: #f6f7f9;
    color: #18202a;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

main {
    min-width: 0;
}

.qrd-main {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
}

.qrd-main-container {
    width: 100%;
    padding-top: 12px;
    padding-bottom: 20px;
}

/* Focus states */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem #ffffff, 0 0 0 0.25rem rgba(96, 127, 109, 0.35);
}

/* =========================
   Header
========================= */
.qrd-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.qrd-navbar {
    min-height: 70px;
    padding-top: 0;
    padding-bottom: 0;
}

    .qrd-navbar > .container-xl {
        min-height: 70px;
    }

/* Brand */

.qrd-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-right: 0;
    color: #111827;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-decoration: none;
}

.qrd-brand-logo {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

.qrd-brand:hover,
.qrd-brand:focus {
    color: #111827;
}

/* Workspace selector */

.qrd-workspace-btn,
.qrd-mobile-workspace-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    min-height: 52px;
    padding: 7px 12px;
    color: #18202a;
    text-align: left;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
}

.qrd-workspace-btn {
    min-width: 190px;
    max-width: 230px;
}

    .qrd-workspace-btn:hover,
    .qrd-mobile-workspace-btn:hover {
        background: #f1f5f9;
        border-color: #cbd5e1;
    }

    .qrd-workspace-btn:focus,
    .qrd-mobile-workspace-btn:focus {
        outline: none;
        border-color: #94a3b8;
        box-shadow: 0 0 0 3px rgba(37, 140, 251, 0.18);
    }

.qrd-workspace-copy {
    display: block;
    min-width: 0;
}

.qrd-workspace-name,
.qrd-workspace-org {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qrd-workspace-name {
    color: #1f2937;
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1.3;
}

.qrd-workspace-org {
    margin-top: 2px;
    color: #64748b;
    font-size: 0.72rem;
    line-height: 1.3;
}

.qrd-workspace-chevron {
    flex-shrink: 0;
    color: #64748b;
    font-size: 0.72rem;
}

.qrd-workspace-menu {
    min-width: 240px;
    padding: 6px;
    margin-top: 7px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

    .qrd-workspace-menu .dropdown-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 9px 10px;
        color: #374151;
        font-size: 0.88rem;
        border-radius: 7px;
    }

        .qrd-workspace-menu .dropdown-item:hover {
            color: #111827;
            background: #f1f5f9;
        }

        .qrd-workspace-menu .dropdown-item.active,
        .qrd-workspace-menu .dropdown-item:active {
            color: #111827;
            background: #e9eef5;
        }

.qrd-current-workspace {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 500;
}

/* Navigation */

.qrd-header .navbar-collapse {
    align-self: stretch;
    align-items: stretch;
}

.qrd-nav {
    align-self: stretch;
}

    .qrd-nav .nav-item {
        display: flex;
    }

    .qrd-nav .nav-link {
        position: relative;
        display: flex;
        align-items: center;
        padding: 0 10px;
        color: #475569;
        font-weight: 600;
    }

        .qrd-nav .nav-link:hover {
            color: #111827;
        }

        .qrd-nav .nav-link.active {
            color: #111827;
        }

            .qrd-nav .nav-link.active::after {
                content: "";
                position: absolute;
                right: 10px;
                bottom: -1px;
                left: 10px;
                height: 2px;
                background: #111827;
                border-radius: 2px 2px 0 0;
            }

/* Mobile navigation button */

.navbar-toggler {
    padding: 8px;
    border: 0;
}

    .navbar-toggler:focus {
        box-shadow: 0 0 0 3px rgba(37, 140, 251, 0.18);
    }

.navbar-toggler-icon {
    position: relative;
    display: block;
    width: 24px;
    height: 2px;
    background-color: #111827;
    background-image: none;
}

    .navbar-toggler-icon::before,
    .navbar-toggler-icon::after {
        content: "";
        position: absolute;
        left: 0;
        width: 24px;
        height: 2px;
        background-color: #111827;
    }

    .navbar-toggler-icon::before {
        top: -6px;
    }

    .navbar-toggler-icon::after {
        top: 6px;
    }

/* Account menu */

.qrd-user {
    display: flex;
    align-items: center;
}

.user-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    color: #18202a;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

    .user-icon-btn:hover {
        color: #111827;
        background: #f1f5f9;
    }

    .user-icon-btn:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(37, 140, 251, 0.18);
    }

    .user-icon-btn .bi-person-circle {
        font-size: 1.85rem;
        line-height: 1;
    }

.user-dropdown {
    min-width: 260px;
    padding: 6px 0;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
}

    .user-dropdown .dropdown-item {
        padding: 8px 16px;
    }

        .user-dropdown .dropdown-item:hover {
            background: #f1f5f9;
        }

/* Mobile header */

.qrd-mobile-workspace {
    margin-top: 16px;
    margin-bottom: 8px;
}

@media (max-width: 991.98px) {
    .qrd-navbar {
        min-height: 64px;
        padding-top: 7px;
        padding-bottom: 7px;
    }

        .qrd-navbar > .container-xl {
            min-height: 50px;
        }

    .qrd-brand {
        gap: 8px;
        font-size: 1.25rem;
    }

    .qrd-brand-logo {
        width: 26px;
        height: 26px;
    }

    .qrd-header .navbar-collapse {
        padding-bottom: 14px;
    }

    .qrd-nav {
        align-self: auto;
        margin-top: 8px;
    }

        .qrd-nav .nav-item {
            display: block;
        }

        .qrd-nav .nav-link {
            display: block;
            padding: 10px 0;
        }

            .qrd-nav .nav-link.active::after {
                right: auto;
                bottom: 3px;
                left: 0;
                width: 28px;
            }

    .qrd-user {
        display: block;
        margin-top: 8px;
    }

        .qrd-user .dropdown-menu {
            right: auto;
            left: 0;
        }

    .qrd-workspace-menu {
        max-width: 100%;
    }
}

/* =========================
   General layout
========================= */
.qrd-shell {
    max-width: 760px;
    margin: 0 auto;
    padding: 12px 20px 20px;
}

.qrd-content {
    max-width: 600px;
}

.qrd-page-header {
    margin-bottom: 16px;
}

.qrd-page-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.qrd-page-subtitle {
    margin-top: 4px;
    color: #6c757d;
}

/* =========================
   Cards
========================= */
.qrd-card,
.qrd-feature-card,
.qrd-scan-card,
.qrd-dashboard-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
}

.qrd-card,
.qrd-feature-card,
.qrd-scan-card {
    padding: 20px;
    margin-bottom: 20px;
}

.qrd-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.qrd-dashboard-card {
    display: block;
    padding: 20px;
    color: #111827;
    text-decoration: none;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

    .qrd-dashboard-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    }

.qrd-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 14px;
    background: #f1f5f9;
    border-radius: 12px;
}

/* =========================
   Scan page
========================= */
.qrd-scan-body {
    position: relative;
    width: 100%;
    max-height: 420px;
    overflow: hidden;
    background: #000000;
    border-radius: 6px;
}

#reader {
    padding: 0 !important;
}

    #reader video {
        width: 100% !important;
    }

/* =========================
   Policy pages
========================= */
.qrd-policy-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 48px 20px 72px;
    color: #18202a;
}

    .qrd-policy-page h1 {
        margin-bottom: 0.75rem;
        font-size: 2rem;
        font-weight: 700;
    }

    .qrd-policy-page h2 {
        margin-top: 2rem;
        margin-bottom: 0.75rem;
        font-size: 1.15rem;
        font-weight: 700;
    }

    .qrd-policy-page p,
    .qrd-policy-page li {
        color: #4b5563;
        line-height: 1.65;
    }

    .qrd-policy-page ul {
        padding-left: 1.25rem;
    }

/* =========================
   Footer
========================= */
.footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    color: #5f6d65;
    font-size: 10.5px;
}

.footer-left,
.footer-right {
    padding: 16px 24px;
}

.footer-link {
    margin-right: 7px;
    padding-right: 10px;
    color: var(--qrd-eau-de-nil-dark);
    border-right: 1px solid #bbbbbb;
    white-space: nowrap;
}

    .footer-link:hover {
        color: var(--qrd-oxford-blue);
    }

    .footer-link:last-child {
        margin: 0;
        padding: 0;
        border: none;
    }

@media (max-width: 599px) {
    .footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-right {
        margin-top: 8px;
    }
}

/* Dropdown indicators are rendered explicitly in the shared layout. */
.qrd-workspace-btn.dropdown-toggle::after,
.qrd-mobile-workspace-btn.dropdown-toggle::after,
.user-icon-btn.dropdown-toggle::after {
    display: none;
}

/* =========================
   Login page
========================= */
.login-shell {
    display: flex;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
}

.login-shell > .row {
    flex: 1 1 auto;
    width: 100%;
    margin: 0;
}

.login-left {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    background: #ffffff;
    border-right: 1px solid #edf1ee;
}

.login-panel {
    width: min(calc(100% - 48px), 400px);
    max-width: 400px;
    padding: 2rem 0;
}

.login-brand-section {
    margin-bottom: 28px;
    text-align: center;
}

.qrd-brand-frame {
    display: inline-flex;
    padding: 12px 18px;
    background: var(--qrd-french-chalk-light);
    border: 1px solid var(--qrd-border);
    border-radius: 14px;
}

.qrd-brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.qrd-brand-mark {
    display: block;
    flex-shrink: 0;
}

.qrd-brand-title {
    color: var(--qrd-ink);
    font-size: 1.18rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    line-height: 1.1;
}

.qrd-brand-subtitle {
    margin-top: 3px;
    color: var(--qrd-eau-de-nil-dark);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}

.login-intro {
    margin: 18px 0 0;
    color: #6b7280;
    font-size: 0.95rem;
}

.login-panel .form-control,
.login-panel .btn {
    min-height: 48px;
}

.btn-microsoft {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    color: #1f2937;
    background: #ffffff;
    border: 1px solid #cfd6d1;
}

.btn-microsoft:hover {
    color: #111827;
    background: #f8faf9;
    border-color: #b9c4bc;
}

.microsoft-mark {
    display: grid;
    grid-template-columns: repeat(2, 7px);
    grid-template-rows: repeat(2, 7px);
    gap: 2px;
}

.microsoft-mark span:nth-child(1) { background: #f25022; }
.microsoft-mark span:nth-child(2) { background: #7fba00; }
.microsoft-mark span:nth-child(3) { background: #00a4ef; }
.microsoft-mark span:nth-child(4) { background: #ffb900; }

.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: #94a3b8;
    font-size: 0.82rem;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.login-link {
    color: var(--qrd-eau-de-nil-dark);
    font-size: 0.9rem;
    text-decoration: none;
}

.login-link:hover {
    color: var(--qrd-oxford-blue);
    text-decoration: underline;
}

.qrd-hero-landing {
    align-items: center;
    min-height: 100%;
    padding: 64px clamp(48px, 7vw, 110px);
    background:
        radial-gradient(circle at 80% 20%, rgba(143, 172, 155, 0.18), transparent 32%),
        linear-gradient(135deg, #f4f7f4 0%, #edf2ef 100%);
}

.hero-content {
    width: 100%;
    max-width: 760px;
}

.hero-title {
    margin: 0;
    color: var(--qrd-deep-bronze-green);
    font-size: clamp(2rem, 3.3vw, 3.8rem);
    font-weight: 760;
    letter-spacing: -0.035em;
    line-height: 1.04;
}

.hero-lead {
    max-width: 680px;
    margin: 24px 0 0;
    color: #4b5a52;
    font-size: clamp(1rem, 1.25vw, 1.2rem);
    line-height: 1.65;
}

.hero-brand-name {
    color: var(--qrd-ink);
    font-weight: 750;
    letter-spacing: 0.04em;
}

.hero-steps {
    display: grid;
    gap: 10px;
    margin-top: 30px;
}

.hero-step {
    display: flex;
    align-items: baseline;
    gap: 10px;
    color: #38483f;
    font-size: 1rem;
}

.hero-step-number {
    min-width: 22px;
    color: var(--qrd-eau-de-nil-dark);
    font-weight: 750;
}

.hero-example {
    display: grid;
    grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1.2fr);
    gap: 22px;
    max-width: 600px;
    margin-top: 32px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(96, 127, 109, 0.2);
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(37, 53, 46, 0.07);
}

.hero-example-identity {
    padding-right: 18px;
    border-right: 1px solid #dfe7e1;
}

.hero-example-code {
    color: var(--qrd-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.05rem;
    font-weight: 750;
}

.hero-example-count {
    margin-top: 5px;
    color: var(--qrd-muted);
    font-size: 0.8rem;
}

.hero-example-links {
    display: grid;
    gap: 9px;
}

.hero-example-link {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #46544c;
    font-size: 0.88rem;
}

.hero-example-marker {
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    border-radius: 50%;
}

.marker-eau-de-nil { background: var(--qrd-eau-de-nil); }
.marker-oxford-blue { background: var(--qrd-oxford-blue); }
.marker-grapefruit { background: var(--qrd-grapefruit); }

.hero-closing {
    margin: 24px 0 0;
    color: var(--qrd-deep-bronze-green);
    font-weight: 700;
    letter-spacing: 0.01em;
}

@media (max-width: 767.98px) {
    .login-shell {
        min-height: auto;
    }

    .login-left {
        min-height: auto;
        border-right: 0;
    }

    .login-panel {
        width: min(calc(100% - 40px), 400px);
        padding: 42px 0;
    }
}

/* =========================
   Scan page UX
   This section deliberately overrides the earlier basic scan styles.
========================= */

.qrd-scan-shell {
    max-width: 1180px;
    padding: 12px 20px 40px;
}

.qrd-scan-grid {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(360px, 1fr);
    gap: 22px;
    align-items: start;
    transition: grid-template-columns 0.18s ease;
}

.qrd-scan-grid.qrd-scan-grid-has-links {
    grid-template-columns: minmax(340px, 5fr) minmax(440px, 7fr);
}

.qrd-scan-left,
.qrd-scan-right {
    min-width: 0;
}

.qrd-scan-card,
.qrd-payload-card,
.qrd-links-card {
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.qrd-scan-card-collapsed {
    padding: 18px 20px;
}

.qrd-field {
    margin-bottom: 16px;
}

.qrd-label {
    display: block;
    margin-bottom: 6px;
    color: #374151;
    font-size: 0.9rem;
    font-weight: 650;
}

.qrd-field-help,
.qrd-card-subtitle {
    margin-top: 5px;
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.45;
}

.qrd-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.qrd-card-heading h2 {
    margin: 0;
    color: #111827;
    font-size: 1rem;
    font-weight: 750;
}

.qrd-card-subtitle {
    margin-bottom: 0;
}

.qrd-mode-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 4px;
    margin-bottom: 16px;
    background: #f1f5f9;
    border-radius: 12px;
}

.qrd-mode-btn {
    min-height: 42px;
    padding: 9px 10px;
    color: #475569;
    font-weight: 650;
    background: transparent;
    border: 0;
    border-radius: 9px;
}

.qrd-mode-btn:hover {
    color: #111827;
}

.qrd-mode-btn:focus-visible {
    outline: 3px solid rgba(37, 140, 251, 0.25);
    outline-offset: 1px;
}

.qrd-mode-btn.active {
    color: #111827;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.qrd-camera-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 38px;
    margin-bottom: 10px;
}

.qrd-scan-status {
    min-height: 22px;
    margin: 0;
    color: #64748b;
    font-size: 0.88rem;
}

.qrd-camera-toolbar .btn {
    flex-shrink: 0;
}

.qrd-scan-status.ok {
    color: #166534;
}

.qrd-scan-status.warning {
    color: #92400e;
}

.qrd-scan-status.error {
    color: #991b1b;
}

.qrd-scan-body {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 320px;
    max-height: none;
    overflow: hidden;
    background: #080d12;
    border-radius: 14px;
}

#reader {
    padding: 0 !important;
}

#reader video {
    width: 100% !important;
    min-height: 320px;
    object-fit: cover;
}

#reader img {
    max-width: 100% !important;
    object-fit: contain;
}

.qrd-reader-empty {
    padding: 40px 28px;
    color: #cbd5e1;
    text-align: center;
}

.qrd-reader-title {
    color: #111827;
    font-size: 1rem;
    font-weight: 700;
}

.qrd-scan-body .qrd-reader-title {
    color: #ffffff;
}

.qrd-reader-copy {
    margin-top: 5px;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
}

.qrd-scan-body .qrd-reader-copy {
    color: #94a3b8;
}

.qrd-scan-actions,
.qrd-payload-actions,
.qrd-link-actions,
.qrd-captured-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.qrd-scan-actions {
    margin-top: 14px;
}

.qrd-drop-zone {
    display: grid;
    place-items: center;
    min-height: 320px;
    padding: 28px;
    text-align: center;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    transition: background-color 0.12s ease, border-color 0.12s ease;
}

.qrd-drop-zone.dragover {
    background: #eef6ff;
    border-color: #60a5fa;
}

.qrd-file-name {
    margin-top: 10px;
    color: #64748b;
    font-size: 0.85rem;
    word-break: break-all;
}

.qrd-manual-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

/* Captured scan summary */

.qrd-captured-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.qrd-captured-copy {
    min-width: 0;
}

.qrd-captured-kicker {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.qrd-captured-value {
    margin-top: 3px;
    overflow-wrap: anywhere;
    color: #111827;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.05rem;
    font-weight: 700;
}

.qrd-captured-status {
    margin-top: 4px;
    color: #166534;
    font-size: 0.88rem;
}

/* Scanned value */

.qrd-payload-value {
    width: 100%;
    padding: 13px 14px;
    overflow-wrap: anywhere;
    color: #111827;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.96rem;
    line-height: 1.45;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.qrd-payload-actions {
    margin-top: 14px;
}

.qrd-qr-preview-panel {
    margin-top: 16px;
}

.qrd-qr {
    display: grid;
    place-items: center;
    width: 100%;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}

.qrd-qr canvas,
.qrd-qr img {
    width: 100% !important;
    max-width: 220px;
    height: auto !important;
}

/* Link results */

.qrd-links-card {
    position: sticky;
    top: 84px;
}

.qrd-empty-state {
    padding: 42px 10px;
    text-align: center;
}

.qrd-empty-title {
    color: #111827;
    font-size: 1rem;
    font-weight: 750;
}

.qrd-empty-copy {
    max-width: 320px;
    margin: 6px auto 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
}

.qrd-links-list {
    display: grid;
    gap: 10px;
}

.qrd-link-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}

.qrd-link-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.qrd-link-title {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #111827;
    font-weight: 760;
}

.qrd-link-description {
    margin-top: 3px;
    color: #475569;
    font-size: 0.86rem;
    line-height: 1.45;
}

.qrd-link-url {
    margin-top: 5px;
    overflow-wrap: anywhere;
    color: #64748b;
    font-size: 0.83rem;
    line-height: 1.4;
}

.qrd-link-badge {
    flex-shrink: 0;
    padding: 4px 8px;
    color: #1e3a8a;
    font-size: 0.72rem;
    font-weight: 750;
    white-space: nowrap;
    background: #dbeafe;
    border-radius: 999px;
}

.qrd-result-message {
    margin-top: 12px;
    padding: 12px 14px;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
}

.qrd-saved-scans-row {
    margin-top: 14px;
    padding-top: 11px;
    border-top: 1px solid #e5e7eb;
}

.qrd-muted-link {
    padding: 0;
    color: #64748b;
    font-size: 0.86rem;
    text-decoration: none;
}

.qrd-muted-link:hover {
    color: #111827;
    text-decoration: underline;
}

@media (max-width: 991.98px) {
    .qrd-scan-shell {
        padding: 20px 14px 32px;
    }

    .qrd-scan-grid,
    .qrd-scan-grid.qrd-scan-grid-has-links {
        grid-template-columns: 1fr;
    }

    .qrd-links-card {
        position: static;
    }

    .qrd-scan-body,
    .qrd-drop-zone {
        min-height: 280px;
    }
}

@media (max-width: 599px) {
    .qrd-mode-row {
        grid-template-columns: 1fr;
    }

    .qrd-manual-row {
        grid-template-columns: 1fr;
    }

    .qrd-camera-toolbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .qrd-captured-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .qrd-captured-actions,
    .qrd-payload-actions,
    .qrd-link-actions {
        width: 100%;
    }

    .qrd-captured-actions .btn,
    .qrd-link-actions .btn,
    .qrd-link-actions .btn-dark {
        flex: 1 1 auto;
    }

    .qrd-link-title-row {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* =========================
   Scan page: enterprise history and upload refinements
========================= */

.qrd-scan-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.qrd-scan-page-header > div {
    min-width: 0;
}

.qrd-history-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-height: 40px;
    padding-inline: 13px;
    color: #334155;
    background: #ffffff;
}

.qrd-history-button:hover {
    color: #111827;
    background: #f8fafc;
}

.qrd-history-count {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 750;
    background: #334155;
    border-radius: 999px;
}

.qrd-empty-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin: 0 auto 12px;
    color: #64748b;
    font-size: 1.35rem;
    background: #f1f5f9;
    border-radius: 12px;
}

.qrd-paste-hint {
    margin-top: 14px;
    color: #94a3b8;
    font-size: 0.76rem;
}

.qrd-paste-hint kbd {
    padding: 2px 6px;
    color: #475569;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 650;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-bottom-width: 2px;
    border-radius: 5px;
    box-shadow: none;
}

.qrd-local-processing-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 12px 2px 0;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.45;
}

.qrd-local-processing-note i {
    flex-shrink: 0;
    margin-top: 1px;
    color: #3f6f65;
}

/* Right-hand recent scans panel */
.qrd-history-panel {
    --bs-offcanvas-width: min(430px, 100vw);
    color: #18202a;
    background: #ffffff;
    border-left: 1px solid #e5e7eb;
    box-shadow: -16px 0 40px rgba(15, 23, 42, 0.14);
}

.qrd-history-header {
    align-items: flex-start;
    padding: 22px 22px 17px;
    border-bottom: 1px solid #e5e7eb;
}

.qrd-history-header .offcanvas-title {
    margin: 0;
    color: #111827;
    font-size: 1.15rem;
    font-weight: 750;
}

.qrd-history-subtitle {
    margin: 3px 0 0;
    color: #64748b;
    font-size: 0.82rem;
}

.qrd-history-body {
    padding: 0;
    overflow-y: auto;
}

.qrd-history-settings {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 22px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.qrd-history-setting-title {
    color: #1f2937;
    font-size: 0.88rem;
    font-weight: 700;
}

.qrd-history-setting-copy {
    margin-top: 2px;
    color: #64748b;
    font-size: 0.77rem;
}

.qrd-history-settings .form-check-input {
    width: 2.35rem;
    height: 1.25rem;
    margin: 0;
    cursor: pointer;
}

.qrd-history-empty {
    display: grid;
    place-items: center;
    min-height: 260px;
    padding: 36px 28px;
    color: #64748b;
    text-align: center;
}

.qrd-history-empty > i {
    margin-bottom: 12px;
    color: #94a3b8;
    font-size: 1.7rem;
}

.qrd-history-empty > div {
    color: #334155;
    font-size: 0.95rem;
    font-weight: 700;
}

.qrd-history-empty p {
    max-width: 250px;
    margin: 5px 0 0;
    font-size: 0.82rem;
    line-height: 1.45;
}

.qrd-history-list {
    display: grid;
}

.qrd-history-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 8px;
    border-bottom: 1px solid #eef0f3;
}

.qrd-history-item:hover {
    background: #f8fafc;
}

.qrd-history-item-main {
    min-width: 0;
    padding: 13px 10px;
    color: inherit;
    text-align: left;
    background: transparent;
    border: 0;
    border-radius: 8px;
}

.qrd-history-item-main:focus-visible,
.qrd-history-icon-btn:focus-visible {
    outline: 3px solid rgba(37, 140, 251, 0.22);
    outline-offset: 1px;
}

.qrd-history-item-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.qrd-history-value {
    min-width: 0;
    overflow: hidden;
    color: #111827;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qrd-history-time {
    flex-shrink: 0;
    color: #94a3b8;
    font-size: 0.72rem;
}

.qrd-history-meta {
    margin-top: 4px;
    overflow: hidden;
    color: #64748b;
    font-size: 0.76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qrd-history-item-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.qrd-history-icon-btn {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    color: #64748b;
    background: transparent;
    border: 0;
    border-radius: 8px;
}

.qrd-history-icon-btn:hover {
    color: #111827;
    background: #e9eef5;
}

.qrd-history-remove:hover {
    color: #b91c1c;
    background: #fef2f2;
}

.qrd-history-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
}

.qrd-history-footer .btn:disabled,
.qrd-history-footer .dropdown-item:disabled {
    opacity: 0.45;
}

@media (max-width: 767.98px) {
    .qrd-scan-page-header {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    .qrd-history-button {
        align-self: flex-start;
    }
}

@media (max-width: 479.98px) {
    .qrd-history-panel {
        --bs-offcanvas-width: 100vw;
    }

    .qrd-history-header {
        padding: 18px 17px 14px;
    }

    .qrd-history-settings {
        padding: 14px 17px;
    }

    .qrd-history-footer {
        padding: 12px 14px;
    }
}

/* =========================
   Scan page: compact results, quick filter and captured QR preview
========================= */

.qrd-captured-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    flex-shrink: 0;
}

.qrd-captured-actions {
    flex-direction: column;
    flex-wrap: nowrap;
}

.qrd-captured-actions .btn {
    min-width: 124px;
}

.qrd-captured-qr {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    flex: 0 0 86px;
    padding: 6px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #dbe3df;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}

.qrd-captured-qr:hover {
    border-color: #aab9b0;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.qrd-captured-qr:focus-visible {
    outline: 3px solid rgba(37, 140, 251, 0.25);
    outline-offset: 2px;
}

.qrd-captured-qr canvas,
.qrd-captured-qr img {
    display: block;
    width: 72px !important;
    height: 72px !important;
}

.qrd-link-filter-panel {
    margin-bottom: 12px;
}

.qrd-link-filter {
    position: relative;
    display: flex;
    align-items: center;
}

.qrd-link-filter > .bi-search {
    position: absolute;
    left: 13px;
    z-index: 2;
    color: #64748b;
    pointer-events: none;
}

.qrd-link-filter .form-control {
    min-height: 42px;
    padding-left: 38px;
    padding-right: 42px;
    background: #ffffff;
    border-color: #dbe3df;
    border-radius: 10px;
}

.qrd-link-filter .form-control:focus {
    border-color: #94a3b8;
}

.qrd-link-filter-clear {
    position: absolute;
    right: 7px;
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    color: #64748b;
    background: transparent;
    border: 0;
    border-radius: 7px;
}

.qrd-link-filter-clear:hover {
    color: #111827;
    background: #f1f5f9;
}

.qrd-link-filter-clear:focus-visible {
    outline: 3px solid rgba(37, 140, 251, 0.22);
    outline-offset: 1px;
}

.qrd-link-filter-summary {
    min-height: 18px;
    margin-top: 5px;
    color: #64748b;
    font-size: 0.78rem;
}

.qrd-links-list {
    gap: 8px;
}

.qrd-link-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px 13px;
    border-radius: 12px;
}

.qrd-link-main {
    min-width: 0;
}

.qrd-link-title-row {
    align-items: center;
}

.qrd-link-description {
    margin-top: 2px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.qrd-link-url {
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qrd-link-actions {
    flex-wrap: nowrap;
    align-items: center;
}

.qrd-link-actions .btn {
    min-height: 36px;
    white-space: nowrap;
}

.qrd-copy-link-button {
    display: inline-grid;
    place-items: center;
    width: 38px;
    padding-inline: 0;
}

@media (max-width: 767.98px) {
    .qrd-captured-summary {
        align-items: flex-start;
    }

    .qrd-captured-tools {
        width: 100%;
        justify-content: space-between;
    }

    .qrd-captured-actions {
        flex: 1 1 auto;
    }

    .qrd-captured-actions .btn {
        min-width: 0;
        width: 100%;
    }

    .qrd-link-card {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .qrd-link-actions {
        width: 100%;
    }

    .qrd-link-actions .btn-dark {
        flex: 1 1 auto;
    }
}

@media (max-width: 420px) {
    .qrd-captured-tools {
        align-items: stretch;
    }

    .qrd-captured-qr {
        width: 78px;
        height: 78px;
        flex-basis: 78px;
    }

    .qrd-captured-qr canvas,
    .qrd-captured-qr img {
        width: 66px !important;
        height: 66px !important;
    }
}

/* =========================
   Scan audit page
========================= */
.qrd-audit-shell {
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
    padding: 12px 20px 40px;
}

.qrd-audit-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 16px;
}

.qrd-kicker {
    margin-bottom: 3px;
    color: var(--qrd-eau-de-nil-dark);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.qrd-audit-header-actions {
    display: flex;
    align-items: center;
    padding-top: 6px;
}

.qrd-audit-scope {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 260px;
    padding: 7px 10px;
    overflow: hidden;
    color: #526058;
    font-size: 0.8rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    background: #eef3ef;
    border: 1px solid #dce5df;
    border-radius: 999px;
}

.qrd-audit-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(140px, 1fr));
    gap: 12px;
    max-width: 680px;
    margin-bottom: 16px;
}

.qrd-audit-stat {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    min-height: 64px;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.qrd-audit-stat strong {
    color: #111827;
    font-size: 1.45rem;
    line-height: 1;
}

.qrd-audit-stat-label {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 650;
}

.qrd-audit-stat-success {
    border-left: 3px solid #4f8a69;
}

.qrd-audit-stat-failed {
    border-left: 3px solid #c45d55;
}

.qrd-audit-filter-card,
.qrd-audit-results-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.qrd-audit-filter-card {
    padding: 16px;
    margin-bottom: 16px;
}

.qrd-audit-filter-heading,
.qrd-audit-results-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.qrd-audit-filter-heading {
    margin-bottom: 12px;
}

.qrd-audit-filter-heading h2,
.qrd-audit-results-heading h2 {
    margin: 0;
    color: #111827;
    font-size: 1rem;
    font-weight: 750;
}

.qrd-audit-filter-heading p,
.qrd-audit-results-heading p {
    margin: 3px 0 0;
    color: #718078;
    font-size: 0.8rem;
}

.qrd-audit-clear-link {
    color: var(--qrd-eau-de-nil-dark);
    font-size: 0.82rem;
    font-weight: 650;
    text-decoration: none;
}

.qrd-audit-clear-link:hover {
    color: var(--qrd-oxford-blue);
    text-decoration: underline;
}

.qrd-audit-filter-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.45fr) minmax(170px, 1fr) minmax(135px, 0.7fr) minmax(145px, 0.78fr) minmax(145px, 0.78fr) auto;
    gap: 12px;
    align-items: end;
}

.qrd-audit-filter-field {
    min-width: 0;
}

.qrd-audit-filter-actions {
    display: flex;
    gap: 8px;
    white-space: nowrap;
}

.qrd-input-with-icon {
    position: relative;
}

.qrd-input-with-icon > i {
    position: absolute;
    top: 50%;
    left: 12px;
    z-index: 2;
    color: #94a3b8;
    transform: translateY(-50%);
    pointer-events: none;
}

.qrd-input-with-icon .form-control {
    padding-left: 36px;
}

.qrd-audit-results-card {
    overflow: hidden;
}

.qrd-audit-results-heading {
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid #e8edf0;
}

.qrd-audit-page-size-form {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 0.8rem;
}

.qrd-audit-page-size-form .form-select {
    width: 76px;
}

.qrd-audit-table-wrap {
    overflow-x: auto;
}

.qrd-audit-table {
    width: 100%;
    table-layout: fixed;
    color: #25313b;
    font-size: 0.82rem;
}

.qrd-audit-table thead th {
    padding: 11px 12px;
    color: #526058;
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    background: #f7f9f8;
    border-bottom: 1px solid #dfe6e2;
    white-space: nowrap;
}

.qrd-audit-table thead th a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
}

.qrd-audit-table thead th a:hover {
    color: #111827;
}

.qrd-audit-table tbody td {
    padding: 12px;
    vertical-align: top;
    border-color: #edf0f2;
}

.qrd-audit-table tbody tr:hover {
    background: #fafcfb;
}

.qrd-audit-col-time { width: 138px; }
.qrd-audit-col-identity { width: 175px; }
.qrd-audit-col-resolver { width: 150px; }
.qrd-audit-col-result { width: 138px; }
.qrd-audit-col-user { width: 170px; }

.qrd-audit-time time {
    display: grid;
    gap: 2px;
    color: #334155;
    white-space: nowrap;
}

.qrd-audit-time small {
    color: #718078;
    font-size: 0.72rem;
}

.qrd-audit-identity {
    display: block;
    overflow: hidden;
    color: #243d5b;
    font-size: 0.79rem;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
    background: transparent;
}

.qrd-audit-resolver,
.qrd-audit-user {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.qrd-audit-resolver {
    color: #405047;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.75rem;
}

.qrd-audit-user {
    color: #475569;
}

.qrd-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 7px;
    font-size: 0.7rem;
    font-weight: 750;
    line-height: 1;
    border-radius: 999px;
}

.qrd-status-success {
    color: #286341;
    background: #e7f4eb;
}

.qrd-status-failed {
    color: #9d3e38;
    background: #fdebea;
}

.qrd-audit-failure {
    margin-top: 7px;
    color: #64748b;
    font-size: 0.72rem;
}

.qrd-audit-failure summary {
    cursor: pointer;
    user-select: none;
}

.qrd-audit-failure div {
    margin-top: 6px;
    padding: 8px;
    color: #5d3a37;
    line-height: 1.4;
    background: #fff7f6;
    border: 1px solid #f2d7d4;
    border-radius: 7px;
}

.qrd-audit-destination {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.qrd-audit-url {
    display: block;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    color: var(--qrd-eau-de-nil-dark);
    white-space: nowrap;
    text-overflow: ellipsis;
    text-decoration: none;
}

.qrd-audit-url:hover {
    color: var(--qrd-oxford-blue);
    text-decoration: underline;
}

.qrd-audit-destination-actions {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
    opacity: 0.25;
    transition: opacity 0.12s ease;
}

.qrd-audit-table tbody tr:hover .qrd-audit-destination-actions,
.qrd-audit-destination-actions:focus-within {
    opacity: 1;
}

.qrd-audit-empty-value {
    color: #94a3b8;
    font-size: 0.75rem;
}

.qrd-audit-empty {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 64px 24px;
    color: #718078;
    text-align: center;
}

.qrd-audit-empty > i {
    font-size: 2rem;
}

.qrd-audit-empty h3 {
    margin: 0;
    color: #334155;
    font-size: 1rem;
}

.qrd-audit-empty p {
    margin: 0;
    font-size: 0.85rem;
}

.qrd-audit-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-top: 1px solid #e8edf0;
}

.qrd-audit-pagination-summary {
    color: #718078;
    font-size: 0.8rem;
}

.qrd-audit-mobile-list {
    display: none;
}

.qrd-audit-copy-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1080;
    padding: 10px 14px;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 650;
    background: #1f2937;
    border-radius: 9px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.qrd-audit-copy-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1199.98px) {
    .qrd-audit-filter-grid {
        grid-template-columns: minmax(220px, 1.4fr) minmax(170px, 1fr) minmax(135px, 0.7fr) minmax(145px, 0.8fr) minmax(145px, 0.8fr);
    }

    .qrd-audit-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 991.98px) {
    .qrd-audit-shell {
        padding-right: 14px;
        padding-left: 14px;
    }

    .qrd-audit-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .qrd-audit-filter-actions {
        grid-column: auto;
        align-self: end;
    }

    .qrd-audit-table-wrap {
        display: none;
    }

    .qrd-audit-mobile-list {
        display: grid;
        gap: 12px;
        padding: 14px;
    }

    .qrd-audit-mobile-card {
        padding: 14px;
        background: #ffffff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
    }

    .qrd-audit-mobile-card-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 12px;
    }

    .qrd-audit-mobile-card-head code {
        overflow: hidden;
        color: #243d5b;
        font-weight: 700;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .qrd-audit-mobile-card dl {
        display: grid;
        gap: 8px;
        margin: 0;
    }

    .qrd-audit-mobile-card dl > div {
        display: grid;
        grid-template-columns: 84px minmax(0, 1fr);
        gap: 10px;
    }

    .qrd-audit-mobile-card dt {
        color: #718078;
        font-size: 0.72rem;
        font-weight: 650;
    }

    .qrd-audit-mobile-card dd {
        min-width: 0;
        margin: 0;
        overflow-wrap: anywhere;
        color: #334155;
        font-size: 0.8rem;
    }

    .qrd-audit-mobile-failure {
        margin-top: 12px;
        padding: 9px 10px;
        color: #7d3e38;
        font-size: 0.78rem;
        background: #fff7f6;
        border: 1px solid #f2d7d4;
        border-radius: 8px;
    }

    .qrd-audit-mobile-actions {
        display: flex;
        gap: 8px;
        margin-top: 12px;
    }
}

@media (max-width: 575.98px) {
    .qrd-audit-header {
        display: block;
    }

    .qrd-audit-header-actions {
        margin-top: 10px;
        padding-top: 0;
    }

    .qrd-audit-summary {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .qrd-audit-stat {
        min-height: 54px;
    }

    .qrd-audit-filter-grid {
        grid-template-columns: 1fr;
    }

    .qrd-audit-filter-actions {
        width: 100%;
    }

    .qrd-audit-filter-actions .btn {
        flex: 1;
    }

    .qrd-audit-results-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .qrd-audit-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .qrd-audit-pagination .btn-group {
        width: 100%;
    }

    .qrd-audit-pagination .btn {
        flex: 1;
    }
}

/* =========================
   Static Links Administration
========================= */
.qrd-admin-wide {
    width: min(100%, 1320px);
    margin: 0 auto;
    padding: 12px 20px 28px;
}
.qrd-admin-form-shell { max-width: 920px; }
.qrd-admin-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}
.qrd-page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.qrd-back-link { margin-bottom: 12px; }
.qrd-back-link a { color: #475569; text-decoration: none; font-weight: 600; }
.qrd-filter-card { padding: 16px; }
.qrd-table-card { padding: 0; overflow: hidden; }
.qrd-table-card .table-responsive { margin: 0; }
.qrd-identity-code { font-size: .9rem; color: #111827; }
.qrd-empty-state { padding: 52px 20px; text-align: center; color: #64748b; }
.qrd-empty-state i { font-size: 2rem; }
.qrd-empty-state h2 { margin: 12px 0 6px; color: #1f2937; font-size: 1.1rem; }
.qrd-empty-state-small { padding: 24px; }
.qrd-inline-link-editor { padding: 16px; margin-bottom: 12px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; }
.qrd-admin-link-list { display: grid; gap: 8px; }
.qrd-admin-link-item { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-top: 1px solid #e5e7eb; }
.qrd-admin-link-item:first-child { border-top: 0; }
.qrd-admin-link-copy { min-width: 0; }
.qrd-admin-link-copy h3 { margin: 0; font-size: 1rem; }
.qrd-admin-link-copy p { margin: 3px 0; color: #64748b; font-size: .88rem; }
.qrd-admin-link-url { display: block; max-width: 720px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #475569; font-size: .8rem; }
.qrd-admin-link-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.qrd-danger-zone { border-color: #fecaca; background: #fffafa; }
.qrd-danger-zone p { color: #7f1d1d; font-size: .9rem; }
.qrd-upload-row { display: flex; gap: 10px; }
.qrd-import-summary { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.qrd-import-summary > div { padding: 16px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; }
.qrd-import-summary strong { display: block; font-size: 1.5rem; color: #111827; }
.qrd-import-summary span { color: #64748b; font-size: .8rem; }
.qrd-cell-url { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #64748b; font-size: .78rem; }
.qrd-import-message { margin-bottom: 3px; font-size: .78rem; }
.qrd-import-information { color: #475569; }
.qrd-import-warning { color: #92400e; }
.qrd-import-error { color: #b91c1c; font-weight: 600; }
@media (max-width: 767.98px) {
    .qrd-admin-heading { align-items: flex-start; flex-direction: column; }
    .qrd-page-actions { width: 100%; }
    .qrd-page-actions .btn { flex: 1 1 auto; }
    .qrd-admin-link-item { flex-direction: column; }
    .qrd-admin-link-actions { justify-content: flex-end; }
    .qrd-upload-row { flex-direction: column; }
    .qrd-import-summary { grid-template-columns: 1fr; }
}
.qrd-existing-destination-box { padding: 12px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 10px; }

/* =========================
   Link groups and clean link model
========================= */
.qrd-admin-disclosure {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 14px;
    background: #fff;
}
.qrd-admin-disclosure summary {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    list-style: none;
}
.qrd-admin-disclosure summary::-webkit-details-marker { display: none; }
.qrd-admin-disclosure summary::after {
    content: "\F282";
    font-family: "bootstrap-icons";
    margin-left: auto;
    transition: transform .15s ease;
}
.qrd-admin-disclosure[open] summary::after { transform: rotate(180deg); }

/* =========================
   Shared static-link management
========================= */
.qrd-shared-link-impact {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 11px 14px;
    margin: 4px 0 10px;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #dbe3ea;
    border-radius: 10px;
    font-size: .85rem;
}

.qrd-shared-link-impact strong {
    color: #17212b;
    white-space: nowrap;
}

.qrd-link-duplicate-note {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    color: #6b5b24;
    font-size: .78rem;
}

.qrd-link-management-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.qrd-delete-everywhere {
    min-width: min(100%, 380px);
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fffafa;
}

.qrd-delete-everywhere summary {
    padding: 9px 12px;
    color: #b42318;
    cursor: pointer;
    font-size: .82rem;
    font-weight: 650;
    list-style: none;
}

.qrd-delete-everywhere summary::-webkit-details-marker {
    display: none;
}

.qrd-delete-everywhere summary::after {
    content: "\F282";
    float: right;
    font-family: "bootstrap-icons";
    transition: transform .15s ease;
}

.qrd-delete-everywhere[open] summary::after {
    transform: rotate(180deg);
}

.qrd-delete-everywhere-body {
    padding: 0 12px 12px;
    color: #7f1d1d;
    font-size: .8rem;
}

.qrd-delete-everywhere-body p {
    margin: 0 0 10px;
}

.qrd-delete-confirmation-form {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto;
    gap: 8px;
    align-items: end;
}

.qrd-delete-confirmation-form .qrd-label {
    grid-column: 1 / -1;
}

@media (max-width: 767.98px) {
    .qrd-shared-link-impact {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .qrd-delete-everywhere,
    .qrd-delete-confirmation-form {
        width: 100%;
    }

    .qrd-delete-confirmation-form {
        grid-template-columns: 1fr;
    }
}


/* =========================
   Static-link row actions
========================= */
.qrd-icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    min-width: 34px;
    padding-inline: 0;
}

.qrd-inline-remove-confirm {
    margin: -2px 0 12px;
}

.qrd-inline-remove-confirm-inner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 12px;
    color: #7f1d1d;
    background: #fffafa;
    border: 1px solid #fecaca;
    border-radius: 10px;
}

.qrd-inline-remove-confirm-inner > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-right: auto;
    font-size: .8rem;
}

.qrd-inline-remove-confirm-inner span {
    color: #64748b;
}

@media (max-width: 767.98px) {
    .qrd-inline-remove-confirm-inner {
        align-items: stretch;
        flex-direction: column;
    }

    .qrd-inline-remove-confirm-inner > div {
        margin-right: 0;
    }
}

/* =========================
   Operational dashboard
========================= */
.qrd-dashboard-shell {
    max-width: 1180px;
}

.qrd-dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.qrd-dashboard-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.qrd-dashboard-actions .qrd-dashboard-card {
    min-height: 154px;
}

.qrd-dashboard-section {
    margin-top: 28px;
}

.qrd-dashboard-section-heading,
.qrd-dashboard-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.qrd-dashboard-section-heading h2,
.qrd-dashboard-panel-heading h2 {
    margin: 0;
    color: #111827;
    font-size: 1rem;
    font-weight: 750;
}

.qrd-dashboard-section-heading p,
.qrd-dashboard-panel-heading p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: .84rem;
}

.qrd-dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.qrd-metric-card {
    min-width: 0;
    padding: 18px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .035);
}

.qrd-metric-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-bottom: 12px;
    color: #334155;
    background: #f1f5f9;
    border-radius: 10px;
}

.qrd-metric-value {
    overflow: hidden;
    color: #111827;
    font-size: 1.8rem;
    font-weight: 760;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qrd-metric-label {
    margin-top: 7px;
    color: #334155;
    font-size: .88rem;
    font-weight: 700;
}

.qrd-metric-note {
    margin-top: 3px;
    overflow: hidden;
    color: #64748b;
    font-size: .76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qrd-dashboard-panels {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr);
    gap: 18px;
    margin-top: 18px;
}

.qrd-dashboard-panel {
    min-width: 0;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .035);
}

.qrd-text-link {
    color: #315a74;
    font-size: .82rem;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

.qrd-text-link:hover {
    text-decoration: underline;
}

.qrd-activity-list,
.qrd-attention-list {
    display: flex;
    flex-direction: column;
}

.qrd-activity-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid #eef2f7;
}

.qrd-activity-row:first-child {
    padding-top: 2px;
    border-top: 0;
}

.qrd-activity-state,
.qrd-attention-icon,
.qrd-dashboard-healthy-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    color: #475569;
    background: #f1f5f9;
    border-radius: 10px;
}

.qrd-activity-state.is-success {
    color: #166534;
    background: #ecfdf3;
}

.qrd-activity-state.is-failed,
.qrd-attention-icon.is-warning {
    color: #9a3412;
    background: #fff7ed;
}

.qrd-activity-main {
    min-width: 0;
}

.qrd-activity-title {
    overflow: hidden;
    color: #111827;
    font-size: .88rem;
    font-weight: 720;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qrd-activity-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 2px;
    color: #64748b;
    font-size: .76rem;
}

.qrd-activity-time {
    color: #64748b;
    font-size: .75rem;
    white-space: nowrap;
}

.qrd-attention-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
    padding: 12px 0;
    color: inherit;
    text-decoration: none;
    border-top: 1px solid #eef2f7;
}

.qrd-attention-row:first-child {
    padding-top: 2px;
    border-top: 0;
}

.qrd-attention-row:hover strong {
    text-decoration: underline;
}

.qrd-attention-row strong,
.qrd-dashboard-healthy strong,
.qrd-dashboard-empty strong {
    display: block;
    color: #111827;
    font-size: .84rem;
    font-weight: 720;
}

.qrd-attention-row span,
.qrd-dashboard-healthy span,
.qrd-dashboard-empty span {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: .75rem;
}

.qrd-attention-count {
    min-width: 28px;
    padding: 4px 8px;
    color: #334155;
    font-size: .78rem;
    font-weight: 750;
    text-align: center;
    background: #f1f5f9;
    border-radius: 999px;
}

.qrd-dashboard-healthy {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 110px;
    padding: 18px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.qrd-dashboard-healthy-icon {
    color: #166534;
    background: #ecfdf3;
}

.qrd-dashboard-empty {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    min-height: 180px;
    padding: 24px;
    color: #64748b;
    text-align: center;
    background: #f8fafc;
    border: 1px dashed #dbe3ec;
    border-radius: 12px;
}

.qrd-dashboard-empty > i {
    margin-bottom: 9px;
    font-size: 1.25rem;
}

@media (max-width: 1050px) {
    .qrd-dashboard-actions,
    .qrd-dashboard-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .qrd-dashboard-panels {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .qrd-dashboard-actions,
    .qrd-dashboard-metrics {
        grid-template-columns: 1fr;
    }

    .qrd-dashboard-actions .qrd-dashboard-card {
        min-height: 0;
    }

    .qrd-activity-row,
    .qrd-attention-row {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .qrd-activity-time,
    .qrd-attention-count {
        grid-column: 2;
        justify-self: start;
    }
}


/* ==========================================================================
   Code details and reported link problems
   ========================================================================== */

.qrd-code-details-panel {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--qrd-border, #dfe4ea);
}

.qrd-code-details-list {
    display: grid;
    gap: .55rem;
    margin: 0;
}

.qrd-code-detail-row {
    display: grid;
    grid-template-columns: minmax(8rem, .7fr) minmax(0, 1.3fr);
    gap: 1rem;
}

.qrd-code-detail-row dt {
    margin: 0;
    color: var(--qrd-muted, #667085);
    font-weight: 600;
}

.qrd-code-detail-row dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.qrd-code-details-toggle,
.qrd-report-link-button {
    padding-left: 0;
    padding-right: 0;
    text-decoration: none;
}

.qrd-report-link-button {
    color: var(--qrd-muted, #667085);
    white-space: nowrap;
}

.qrd-report-link-button:hover,
.qrd-report-link-button:focus {
    color: #b42318;
}

.qrd-report-modal .modal-header {
    align-items: flex-start;
}

.qrd-admin-group + .qrd-admin-group {
    margin-top: 2rem;
}

.qrd-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.qrd-admin-count {
    display: inline-flex;
    align-items: center;
    min-height: 1.75rem;
    padding: .2rem .55rem;
    border-radius: 999px;
    background: #fff1f0;
    color: #b42318;
    font-size: .78rem;
    font-weight: 700;
}

.qrd-admin-section {
    padding: 1.25rem;
}

.qrd-admin-two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.qrd-inline-form {
    display: grid;
    gap: .75rem;
    align-items: center;
}

.qrd-detail-fields-section {
    overflow: visible;
}

.qrd-section-count {
    display: inline-flex;
    align-items: center;
    min-height: 1.75rem;
    padding: .2rem .6rem;
    border: 1px solid var(--qrd-border, #dfe4ea);
    border-radius: 999px;
    background: #f7f9fb;
    color: var(--qrd-muted, #667085);
    font-size: .8rem;
    font-weight: 700;
    white-space: nowrap;
}

.qrd-field-create-panel {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px dashed #cfd6df;
    border-radius: .85rem;
    background: #fafbfc;
}

.qrd-field-panel-heading h3,
.qrd-field-card-header h3 {
    margin: 0;
    font-size: 1rem;
}

.qrd-field-panel-heading p {
    margin: .25rem 0 0;
    color: var(--qrd-muted, #667085);
    font-size: .9rem;
}

.qrd-code-field-list {
    display: grid;
    gap: 1rem;
    margin-top: 1.25rem;
}

.qrd-field-card {
    border: 1px solid var(--qrd-border, #dfe4ea);
    border-radius: .85rem;
    background: #fff;
    overflow: hidden;
}

.qrd-field-editor {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(6.5rem, .42fr);
    gap: 1rem;
    padding: 1rem;
    align-items: start;
    min-width: 0;
}

.qrd-field-name {
    grid-column: 1;
}

.qrd-field-code {
    grid-column: 2;
}

.qrd-field-order {
    grid-column: 3;
}

.qrd-field-description {
    grid-column: 1 / -1;
}

.qrd-field-editor-create {
    padding: 1rem 0 0;
}

.qrd-field-card-header {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: .85rem;
    border-bottom: 1px solid var(--qrd-border, #dfe4ea);
}

.qrd-field-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
    margin-top: .35rem;
    color: var(--qrd-muted, #667085);
    font-size: .85rem;
}

.qrd-field-card-meta code {
    padding: .15rem .4rem;
    border-radius: .35rem;
    background: #f1f4f8;
    color: #344054;
}

.qrd-form-field {
    min-width: 0;
}

.qrd-form-field label {
    display: block;
    margin-bottom: .35rem;
    color: #1d2939;
    font-size: .82rem;
    font-weight: 700;
}

.qrd-field-help {
    display: block;
    margin-top: .35rem;
    color: var(--qrd-muted, #667085);
    font-size: .78rem;
    line-height: 1.35;
}

.qrd-field-description input {
    width: 100%;
}

.qrd-field-editor-footer {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: .15rem;
}

.qrd-field-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
}

.qrd-switch-label {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin: 0;
    white-space: nowrap;
}

.qrd-field-delete {
    border-top: 1px solid var(--qrd-border, #dfe4ea);
    background: #fcfcfd;
}

.qrd-field-delete summary {
    width: fit-content;
    margin: .75rem 1rem;
    color: #b42318;
    cursor: pointer;
    font-size: .85rem;
    font-weight: 700;
    list-style-position: inside;
}

.qrd-field-delete-panel {
    padding: 0 1rem 1rem;
    color: #475467;
}

.qrd-field-delete-panel p {
    margin: 0 0 .85rem;
}

.qrd-field-delete-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .75rem;
    align-items: end;
}

.qrd-field-delete-unavailable {
    padding: .75rem 1rem;
    border-top: 1px solid var(--qrd-border, #dfe4ea);
    background: #fcfcfd;
    color: var(--qrd-muted, #667085);
    font-size: .82rem;
}

.qrd-empty-state {
    padding: 1.5rem;
    border: 1px dashed #cfd6df;
    border-radius: .85rem;
    text-align: center;
    color: var(--qrd-muted, #667085);
}

.qrd-empty-state p {
    margin: .35rem 0 0;
}

.qrd-known-code-value {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
    min-width: 0;
}

.qrd-import-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--qrd-muted, #667085);
}

.qrd-import-preview {
    max-height: 28rem;
    margin: 1rem 0;
    border: 1px solid var(--qrd-border, #dfe4ea);
    border-radius: .75rem;
}

.qrd-search-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .75rem;
    margin: 1rem 0;
}

.qrd-simple-list {
    display: grid;
    gap: 0;
}

.qrd-simple-list-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 1rem;
    padding: .75rem 0;
    border-bottom: 1px solid var(--qrd-border, #dfe4ea);
}

.qrd-simple-list-row span {
    color: var(--qrd-muted, #667085);
    font-size: .9rem;
    white-space: nowrap;
}

.qrd-reported-filter {
    grid-template-columns: minmax(0, 1fr) 14rem auto;
}

.qrd-problem-list {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.qrd-problem-card {
    padding: 1.25rem;
}

.qrd-problem-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.qrd-problem-heading h2 {
    margin: .15rem 0 .35rem;
    font-size: 1.1rem;
}

.qrd-problem-kicker {
    color: var(--qrd-muted, #667085);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.qrd-problem-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.qrd-problem-meta div {
    min-width: 0;
}

.qrd-problem-meta dt {
    color: var(--qrd-muted, #667085);
    font-size: .8rem;
}

.qrd-problem-meta dd {
    margin: .2rem 0 0;
    overflow-wrap: anywhere;
}

.qrd-problem-notes {
    padding: .85rem 1rem;
    border-radius: .75rem;
    background: #f7f8fa;
}

.qrd-problem-notes p {
    margin: .35rem 0 0;
}

.qrd-problem-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
}

.qrd-problem-update,
.qrd-related-fix {
    display: grid;
    grid-template-columns: 12rem minmax(0, 1fr) auto;
    gap: .75rem;
    margin-top: 1rem;
}

.qrd-related-fix {
    grid-template-columns: minmax(0, 1fr) auto;
}

@media (max-width: 1100px) {
    .qrd-field-editor {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .qrd-field-name,
    .qrd-field-code {
        grid-column: auto;
    }

    .qrd-field-order {
        grid-column: 1;
        max-width: 10rem;
    }

    .qrd-field-description {
        grid-column: 1 / -1;
    }

    .qrd-admin-two-column {
        grid-template-columns: 1fr;
    }

    .qrd-problem-meta {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .qrd-field-editor,
    .qrd-field-delete-form,
    .qrd-code-detail-row,
    .qrd-simple-list-row,
    .qrd-problem-meta,
    .qrd-problem-update,
    .qrd-related-fix,
    .qrd-reported-filter {
        grid-template-columns: 1fr;
    }

    .qrd-field-name,
    .qrd-field-code,
    .qrd-field-order,
    .qrd-field-description {
        grid-column: auto;
        max-width: none;
    }

    .qrd-field-card-header,
    .qrd-field-editor-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .qrd-field-editor-footer .btn {
        width: 100%;
    }

    .qrd-field-options {
        align-items: flex-start;
        flex-direction: column;
        gap: .75rem;
    }

    .qrd-problem-heading {
        flex-direction: column;
    }
}

/* =========================
   Code Details administration refinement
========================= */
.qrd-code-details-shell {
    width: min(100%, 1180px);
}

.qrd-code-details-header {
    align-items: flex-end;
}

.qrd-status-alert {
    margin-top: 1rem;
}

.qrd-code-details-intro {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.qrd-intro-card {
    position: relative;
    padding: 1rem 1rem 1rem 3.25rem;
}

.qrd-intro-kicker {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    background: #eef4ef;
    color: #254c43;
    font-size: .82rem;
    font-weight: 800;
}

.qrd-intro-card h2 {
    margin: 0 0 .25rem;
    color: #17212b;
    font-size: .98rem;
    font-weight: 800;
}

.qrd-intro-card p {
    margin: 0;
    color: var(--qrd-muted, #667085);
    font-size: .88rem;
    line-height: 1.45;
}

.qrd-section-heading-spacious {
    align-items: flex-start;
    gap: 1rem;
}

.qrd-section-heading-spacious p {
    max-width: 760px;
}

.qrd-status-pill.bg-success,
.qrd-status-pill.bg-secondary {
    color: #fff !important;
}

.qrd-status-pill.bg-light {
    color: #17212b !important;
}

.qrd-field-active-help {
    margin-top: 0;
    white-space: normal;
}

.qrd-field-management-row {
    border-top: 1px solid var(--qrd-border, #dfe4ea);
    background: #fcfcfd;
}

.qrd-field-delete {
    border-top: 0;
    background: transparent;
}

.qrd-field-delete summary {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    width: fit-content;
    margin: .8rem 1rem;
    padding: .42rem .7rem;
    border: 1px solid #fecaca;
    border-radius: .55rem;
    background: #fffafa;
    color: #b42318;
    cursor: pointer;
    font-size: .85rem;
    font-weight: 750;
    list-style: none;
}

.qrd-field-delete summary::-webkit-details-marker {
    display: none;
}

.qrd-field-delete summary::after {
    content: "\F282";
    font-family: "bootstrap-icons";
    margin-left: .2rem;
    transition: transform .15s ease;
}

.qrd-field-delete[open] summary::after {
    transform: rotate(180deg);
}

.qrd-field-delete-unavailable {
    padding: .85rem 1rem;
    border-top: 0;
    background: #f8fafc;
    color: #526070;
    font-size: .85rem;
    line-height: 1.45;
}

.qrd-code-detail-import-section,
.qrd-known-codes-section {
    margin-top: 1.25rem;
}

.qrd-import-help-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 1rem 0 1.25rem;
}

.qrd-import-help-grid > div {
    padding: .95rem;
    border: 1px solid #dfe4ea;
    border-radius: .85rem;
    background: #f8fafc;
}

.qrd-import-help-grid h3 {
    margin: 0 0 .25rem;
    color: #17212b;
    font-size: .92rem;
    font-weight: 800;
}

.qrd-import-help-grid p {
    margin: 0;
    color: var(--qrd-muted, #667085);
    font-size: .84rem;
    line-height: 1.45;
}

.qrd-import-upload-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: end;
    padding: 1rem;
    border: 1px solid #dfe4ea;
    border-radius: .85rem;
    background: #fff;
}

.qrd-import-review {
    margin-top: 1.25rem;
}

.qrd-import-summary-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .85rem;
    margin-bottom: 1rem;
}

.qrd-import-summary-cards > div {
    padding: .95rem;
    border: 1px solid #e5e7eb;
    border-radius: .85rem;
    background: #fff;
}

.qrd-import-summary-cards strong {
    display: block;
    color: #17212b;
    font-size: 1.45rem;
    line-height: 1.1;
}

.qrd-import-summary-cards span {
    color: var(--qrd-muted, #667085);
    font-size: .82rem;
}

.qrd-import-summary-cards .qrd-summary-danger {
    border-color: #fecaca;
    background: #fffafa;
}

.qrd-import-summary-cards .qrd-summary-danger strong {
    color: #b42318;
}

.qrd-import-summary-cards .qrd-summary-warning {
    border-color: #fde68a;
    background: #fffbeb;
}

.qrd-import-summary-cards .qrd-summary-warning strong {
    color: #92400e;
}

.qrd-import-preview-block {
    margin-top: 1rem;
}

.qrd-import-preview-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .5rem;
}

.qrd-import-preview-heading h3 {
    margin: 0;
    color: #17212b;
    font-size: .98rem;
    font-weight: 800;
}

.qrd-import-preview-heading span {
    color: var(--qrd-muted, #667085);
    font-size: .8rem;
}

.qrd-import-preview {
    max-height: 32rem;
    margin: 0;
    border: 1px solid var(--qrd-border, #dfe4ea);
    border-radius: .75rem;
    overflow: auto;
}

.qrd-preview-table {
    min-width: 980px;
    margin-bottom: 0;
}

.qrd-preview-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    color: #334155;
    font-size: .78rem;
    white-space: nowrap;
}

.qrd-preview-table td {
    font-size: .85rem;
    vertical-align: top;
}

.qrd-preview-long {
    max-width: 26rem;
    overflow-wrap: anywhere;
}

.qrd-action-pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.5rem;
    padding: .1rem .5rem;
    border: 1px solid #dbe3ea;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: .76rem;
    font-weight: 750;
}

.qrd-import-message {
    margin-bottom: .25rem;
    font-size: .8rem;
    line-height: 1.35;
}

.qrd-import-message:last-child {
    margin-bottom: 0;
}

.qrd-import-information {
    color: #475569;
}

.qrd-import-warning {
    color: #92400e;
}

.qrd-import-error {
    color: #b91c1c;
    font-weight: 700;
}

.qrd-import-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    margin-top: 1rem;
}

.qrd-import-blocked {
    flex: 1 1 28rem;
    padding: .85rem 1rem;
    border: 1px solid #fecaca;
    border-radius: .75rem;
    background: #fffafa;
    color: #7f1d1d;
    font-size: .88rem;
}

.qrd-known-code-search {
    max-width: 36rem;
}

.qrd-known-code-table-wrap {
    margin-top: 1rem;
    border: 1px solid var(--qrd-border, #dfe4ea);
    border-radius: .85rem;
    overflow: hidden;
}

.qrd-known-code-table {
    margin-bottom: 0;
}

.qrd-known-code-table th {
    background: #f8fafc;
    color: #334155;
    font-size: .78rem;
    white-space: nowrap;
}

.qrd-known-code-table td {
    color: #475569;
}

.qrd-known-code-table td:first-child {
    color: #17212b;
}

@media (max-width: 1100px) {
    .qrd-code-details-intro,
    .qrd-import-help-grid,
    .qrd-import-summary-cards {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 760px) {
    .qrd-code-details-header {
        align-items: flex-start;
    }

    .qrd-code-details-intro,
    .qrd-import-help-grid,
    .qrd-import-summary-cards,
    .qrd-import-upload-form {
        grid-template-columns: 1fr;
    }

    .qrd-import-upload-form .btn,
    .qrd-import-actions .btn {
        width: 100%;
    }

    .qrd-import-preview-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: .15rem;
    }

    .qrd-known-code-table-wrap {
        overflow-x: auto;
    }

    .qrd-known-code-table {
        min-width: 620px;
    }
}

/* =========================
   Code Details groups
========================= */
.qrd-detail-groups-section {
    margin-top: 1.25rem;
}

.qrd-group-list {
    display: grid;
    gap: 1rem;
    margin-top: 1.25rem;
}

.qrd-group-card {
    border: 1px solid var(--qrd-border, #dfe4ea);
    border-radius: .85rem;
    background: #fff;
    overflow: hidden;
}

.qrd-group-editor {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(6.5rem, .42fr);
    gap: 1rem;
    padding: 1rem;
    align-items: start;
    min-width: 0;
}

.qrd-group-name { grid-column: 1; }
.qrd-group-code { grid-column: 2; }
.qrd-group-order { grid-column: 3; }
.qrd-group-description { grid-column: 1 / -1; }

.qrd-field-group {
    grid-column: 3;
}

.qrd-field-editor {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .95fr) minmax(0, .9fr) minmax(6.5rem, .35fr);
}

.qrd-field-order {
    grid-column: 4;
}

.qrd-field-description {
    grid-column: 1 / -1;
}

.qrd-import-summary-cards-wide {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.qrd-code-detail-row dt .qrd-code-detail-group-label,
.qrd-code-detail-group-label {
    display: block;
    margin-bottom: .1rem;
    color: var(--qrd-muted, #667085);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .02em;
}

@media (max-width: 1200px) {
    .qrd-field-editor,
    .qrd-group-editor {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .qrd-field-name,
    .qrd-field-code,
    .qrd-field-group,
    .qrd-group-name,
    .qrd-group-code {
        grid-column: auto;
    }

    .qrd-field-order,
    .qrd-group-order {
        grid-column: 1;
        max-width: 10rem;
    }

    .qrd-import-summary-cards-wide {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .qrd-field-editor,
    .qrd-group-editor {
        grid-template-columns: 1fr;
    }

    .qrd-field-name,
    .qrd-field-code,
    .qrd-field-group,
    .qrd-field-order,
    .qrd-field-description,
    .qrd-group-name,
    .qrd-group-code,
    .qrd-group-order,
    .qrd-group-description {
        grid-column: auto;
        max-width: none;
    }

    .qrd-import-summary-cards-wide {
        grid-template-columns: 1fr;
    }
}

.qrd-workspace-confidence,
.qrd-import-workspace-note,
.qrd-preview-workspace-banner {
    border: 1px solid rgba(37, 76, 67, .16);
    background: rgba(238, 244, 239, .78);
    color: var(--qrd-ink, #102033);
}

.qrd-workspace-confidence {
    display: flex;
    gap: .8rem;
    align-items: flex-start;
    margin: 0 0 1.4rem;
    padding: .95rem 1rem;
    border-radius: 1rem;
    box-shadow: 0 .35rem 1.4rem rgba(16, 32, 51, .04);
}

.qrd-workspace-confidence-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    border-radius: 999px;
    background: rgba(37, 76, 67, .1);
    color: var(--qrd-brand-green, #254c43);
}

.qrd-workspace-confidence strong,
.qrd-workspace-confidence span {
    display: block;
}

.qrd-workspace-confidence span {
    margin-top: .15rem;
    color: var(--qrd-muted, #667085);
    font-size: .9rem;
    line-height: 1.45;
}

.qrd-import-workspace-note,
.qrd-preview-workspace-banner {
    display: flex;
    align-items: center;
    gap: .5rem;
    border-radius: .85rem;
    padding: .75rem .85rem;
    margin: .9rem 0 1rem;
    font-size: .9rem;
}

.qrd-import-workspace-note i {
    color: var(--qrd-brand-green, #254c43);
}

.qrd-preview-workspace-banner {
    margin-top: 0;
    margin-bottom: 1rem;
}

@media (max-width: 760px) {
    .qrd-workspace-confidence,
    .qrd-import-workspace-note,
    .qrd-preview-workspace-banner {
        align-items: flex-start;
    }
}

.qrd-manual-value-panel {
    border: 1px solid rgba(16, 32, 51, .10);
    border-radius: 1rem;
    background: rgba(255, 255, 255, .74);
    padding: 1rem;
    margin: .5rem 0 1.25rem;
}

.qrd-manual-value-copy h3 {
    font-size: 1rem;
    margin: 0 0 .2rem;
}

.qrd-manual-value-copy p {
    margin: 0 0 .9rem;
    color: var(--qrd-muted, #667085);
    font-size: .92rem;
    line-height: 1.45;
}

.qrd-manual-value-form {
    display: grid;
    grid-template-columns: minmax(13rem, .95fr) minmax(13rem, .9fr) minmax(16rem, 1.45fr);
    gap: .9rem;
    align-items: start;
}

.qrd-manual-value-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    justify-content: flex-end;
    align-items: center;
    padding-top: .2rem;
}

.qrd-known-code-table td,
.qrd-known-code-table th {
    white-space: nowrap;
}

@media (max-width: 1200px) {
    .qrd-manual-value-form {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .qrd-manual-value {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .qrd-manual-value-form {
        grid-template-columns: 1fr;
    }

    .qrd-manual-value,
    .qrd-manual-value-actions {
        grid-column: auto;
    }

    .qrd-manual-value-actions {
        justify-content: stretch;
    }

    .qrd-manual-value-actions .btn {
        width: 100%;
    }
}

/* =========================
   Code Details known code values UX fix
========================= */
.qrd-code-details-shell {
    max-width: 1180px;
    width: 100%;
}

.qrd-known-codes-section {
    overflow: visible;
}

.qrd-known-codes-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(22rem, .82fr);
    gap: 1.25rem;
    align-items: start;
    margin-top: 1rem;
}

.qrd-known-codes-workbench .qrd-manual-value-panel {
    margin: 0;
    min-width: 0;
}

.qrd-known-code-list-panel {
    min-width: 0;
    padding: 1rem;
    border: 1px solid rgba(16, 32, 51, .10);
    border-radius: 1rem;
    background: rgba(255, 255, 255, .74);
}

.qrd-panel-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: .35rem;
    padding: .16rem .48rem;
    border: 1px solid rgba(37, 76, 67, .14);
    border-radius: 999px;
    background: rgba(238, 244, 239, .82);
    color: var(--qrd-brand-green, #254c43);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.qrd-manual-value-form,
.qrd-manual-value-form > *,
.qrd-known-code-list-panel,
.qrd-known-code-list-panel > * {
    min-width: 0;
}

.qrd-manual-value-form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.qrd-manual-value {
    grid-column: 1 / -1;
}

.qrd-manual-value textarea {
    resize: vertical;
    max-width: 100%;
}

.qrd-manual-value-actions {
    justify-content: flex-start;
}

.qrd-known-code-search {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .75rem;
    margin-top: .75rem;
}

.qrd-known-code-table-wrap {
    margin-top: .9rem;
}

@media (max-width: 1100px) {
    .qrd-known-codes-workbench {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .qrd-known-code-search {
        grid-template-columns: 1fr;
    }

    .qrd-known-code-search .btn {
        width: 100%;
    }
}

/* =========================
   Code Details manual value and Scan group polish
========================= */
.qrd-manual-value-status {
    display: block;
    margin-top: .25rem;
    min-height: 1.15rem;
}

.qrd-manual-value-status[data-tone="success"] {
    color: #027a48;
}

.qrd-manual-value-status[data-tone="error"] {
    color: #b42318;
}

.qrd-manual-value-status[data-tone="muted"] {
    color: var(--qrd-muted, #667085);
}

.qrd-toast-container {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1080;
    display: grid;
    gap: .6rem;
    max-width: min(26rem, calc(100vw - 2rem));
    pointer-events: none;
}

.qrd-toast {
    transform: translateY(.35rem);
    opacity: 0;
    border: 1px solid rgba(16, 32, 51, .12);
    border-radius: .9rem;
    background: #102033;
    color: #fff;
    box-shadow: 0 .85rem 2rem rgba(16, 32, 51, .18);
    padding: .75rem .9rem;
    font-weight: 700;
    line-height: 1.35;
    transition: opacity .18s ease, transform .18s ease;
}

.qrd-toast.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.qrd-toast-success {
    background: #027a48;
}

.qrd-toast-error {
    background: #b42318;
}

.qrd-code-detail-group-heading {
    margin: .75rem 0 .15rem;
    padding-top: .65rem;
    border-top: 1px solid rgba(16, 32, 51, .10);
    color: var(--qrd-brand-green, #254c43);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.qrd-code-details-list .qrd-code-detail-group-heading:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

/* =========================
   Code Details collapsible admin sections and live values
========================= */
.qrd-section-heading-actions {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.qrd-section-toggle {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--qrd-ink, #102033);
    font-weight: 700;
    white-space: nowrap;
}

.qrd-section-toggle i {
    font-size: .85rem;
    transition: transform .16s ease;
}

.qrd-section-toggle.is-collapsed i {
    transform: rotate(180deg);
}

.qrd-collapsible-section-body {
    margin-top: .8rem;
}

.qrd-collapsible-section-body[hidden] {
    display: none !important;
}

.qrd-known-code-table tbody tr.is-updated td {
    animation: qrd-row-pulse 1.4s ease-out;
}

@keyframes qrd-row-pulse {
    0% { background-color: rgba(37, 99, 235, .12); }
    100% { background-color: transparent; }
}

@media (max-width: 760px) {
    .qrd-section-heading-actions {
        justify-content: flex-start;
    }
}

/* Code details: make saved field options explicit in browsers that honour option styling. */
.qrd-manual-value-form select option[data-qrd-has-value="true"] {
    font-weight: 700;
}

/* Code Details admin: make hidden values visible and recoverable. */
.qrd-hidden-count {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.45rem;
    color: #7a3b00;
    font-size: 0.78rem;
    font-weight: 700;
    background: #fff4df;
    border: 1px solid #f2c77a;
    border-radius: 999px;
}

.qrd-manual-value-status[data-tone="warning"] {
    color: #8a4b00;
    font-weight: 600;
}

.qrd-known-code-table th,
.qrd-known-code-table td {
    white-space: nowrap;
}

/* Code details recovery controls */
.qrd-inline-reactivate-form {
    display: inline-flex;
}

.qrd-inline-reactivate-form .btn {
    --bs-btn-padding-y: 0.15rem;
    --bs-btn-padding-x: 0.45rem;
    --bs-btn-font-size: 0.72rem;
}

.qrd-reactivate-code-button.d-none {
    display: none !important;
}

/* =========================
   Scan link card visual system restored
   Re-applies the latest Scan result UX after Code Details recovery CSS.
========================= */
/* =========================
   Scan result clarity pass
   Distinguish Dynamic Links from Static Links and align result actions.
========================= */
.qrd-links-list {
    gap: 10px;
}

.qrd-link-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 16px;
    padding: 13px 14px 13px 16px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #d8e1ea;
    border-radius: 13px;
}

.qrd-link-card::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 5px;
}

.qrd-link-card-dynamic::before {
    background: var(--qrd-oxford-blue);
}

.qrd-link-card-static::before {
    background: #1f6b55;
}

.qrd-link-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.qrd-link-title {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #0f172a;
    font-weight: 760;
    line-height: 1.2;
}

.qrd-link-badges {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    max-width: 48%;
}

.qrd-link-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    font-size: 0.72rem;
    font-weight: 760;
    line-height: 1;
    white-space: nowrap;
    border-radius: 999px;
}

.qrd-link-source-badge-dynamic {
    color: #ffffff;
    background: var(--qrd-oxford-blue);
    border: 1px solid var(--qrd-oxford-blue);
}

.qrd-link-source-badge-static {
    color: #ffffff;
    background: #1f6b55;
    border: 1px solid #1f6b55;
}

.qrd-link-group-badge {
    color: #17407a;
    background: #e1efff;
    border: 1px solid #d4e7ff;
}

.qrd-link-source-note {
    margin-top: 4px;
    color: #25405c;
    font-size: 0.78rem;
    font-weight: 650;
}

.qrd-link-description {
    margin-top: 4px;
    color: #475569;
    font-size: 0.86rem;
    line-height: 1.38;
}

.qrd-link-url {
    margin-top: 3px;
    overflow: hidden;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qrd-link-actions {
    display: flex;
    align-self: end;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 8px;
    padding-bottom: 4px;
}

.qrd-link-actions .btn {
    min-height: 36px;
    white-space: nowrap;
}

.qrd-copy-link-button {
    display: inline-grid;
    place-items: center;
    width: 38px;
    padding-inline: 0;
}

.qrd-report-link-button {
    color: #64748b;
    text-decoration: none;
}

.qrd-report-link-button:hover {
    color: var(--qrd-oxford-blue);
    text-decoration: underline;
}

.qrd-edit-details-link {
    white-space: nowrap;
}

@media (max-width: 991.98px) {
    .qrd-link-card {
        grid-template-columns: 1fr;
    }

    .qrd-link-badges {
        max-width: none;
    }

    .qrd-link-actions {
        align-self: auto;
        justify-content: flex-start;
        padding-bottom: 0;
    }
}

@media (max-width: 599px) {
    .qrd-link-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .qrd-link-badges {
        justify-content: flex-start;
    }

    .qrd-payload-actions,
    .qrd-link-actions {
        width: 100%;
    }

    .qrd-payload-actions .btn,
    .qrd-payload-actions .qrd-edit-details-link,
    .qrd-link-actions .btn-dark {
        flex: 1 1 auto;
    }
}

/* =========================
   Scan result enterprise clarity pass v3
   Stronger type contrast, less repeated text, clearer action column.
========================= */
.qrd-links-list {
    gap: 10px;
}

.qrd-link-card {
    --qrd-link-type-colour: #143a5f;
    --qrd-link-type-soft: rgba(20, 58, 95, 0.055);
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(232px, auto);
    align-items: stretch;
    gap: 18px;
    min-height: 108px;
    padding: 14px 16px 14px 22px;
    overflow: hidden;
    background: linear-gradient(90deg, var(--qrd-link-type-soft), #ffffff 58%);
    border: 1px solid #d4dfeb;
    border-radius: 13px;
}

.qrd-link-card::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 10px;
    background: var(--qrd-link-type-colour);
}

.qrd-link-card-dynamic {
    --qrd-link-type-colour: #143a5f;
    --qrd-link-type-soft: rgba(20, 58, 95, 0.07);
    border-color: #b9cce1;
}

.qrd-link-card-static {
    --qrd-link-type-colour: #0d6efd;
    --qrd-link-type-soft: rgba(13, 110, 253, 0.075);
    border-color: #abcdfd;
}

.qrd-link-main {
    min-width: 0;
}

.qrd-link-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    padding: 1px 0 7px;
}

.qrd-link-title {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #0f172a;
    font-weight: 780;
    line-height: 1.22;
}

.qrd-link-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    max-width: none;
}

.qrd-link-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 780;
    line-height: 1;
    white-space: nowrap;
    border-radius: 999px;
}

.qrd-link-source-badge {
    color: #ffffff;
    background: var(--qrd-link-type-colour);
    border: 1px solid var(--qrd-link-type-colour);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
}

.qrd-link-source-badge-dynamic {
    color: #ffffff;
    background: #143a5f;
    border-color: #143a5f;
}

.qrd-link-source-badge-static {
    color: #ffffff;
    background: #0d6efd;
    border-color: #0d6efd;
}

.qrd-link-group-badge {
    color: #123e72;
    background: #e8f2ff;
    border: 1px solid #cfe3ff;
}

.qrd-link-source-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    color: #25405c;
    font-size: 0.78rem;
    font-weight: 650;
}

.qrd-link-source-note::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--qrd-link-type-colour);
}

.qrd-link-description {
    margin-top: 5px;
    color: #475569;
    font-size: 0.86rem;
    line-height: 1.38;
}

.qrd-link-url {
    margin-top: 4px;
    overflow: hidden;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qrd-link-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 8px;
}

.qrd-link-actions .btn {
    min-height: 36px;
    white-space: nowrap;
}

.qrd-copy-link-button {
    display: inline-grid;
    place-items: center;
    width: 38px;
    padding-inline: 0;
}

.qrd-report-link-button {
    color: #64748b;
    text-decoration: none;
}

.qrd-report-link-button:hover {
    color: var(--qrd-oxford-blue);
    text-decoration: underline;
}

@media (max-width: 991.98px) {
    .qrd-link-card {
        grid-template-columns: 1fr;
    }

    .qrd-link-side {
        align-items: flex-start;
        padding-bottom: 0;
    }

    .qrd-link-badges,
    .qrd-link-actions {
        justify-content: flex-start;
    }
}


/* =========================
   Scan result minimal clarity pass
   Keep type cues, remove repeated explanatory text, reduce visual noise.
========================= */
.qrd-links-list {
    gap: 9px;
}

.qrd-link-card {
    --qrd-link-type-colour: #143a5f;
    --qrd-link-type-soft: rgba(20, 58, 95, 0.025);
    grid-template-columns: minmax(0, 1fr) minmax(224px, auto);
    align-items: stretch;
    gap: 16px;
    min-height: 92px;
    padding: 13px 15px 13px 18px;
    background: linear-gradient(90deg, var(--qrd-link-type-soft), #ffffff 44%);
    border-color: #d8e2ec;
    box-shadow: none;
}

.qrd-link-card::before {
    width: 6px;
}

.qrd-link-card-dynamic {
    --qrd-link-type-colour: #143a5f;
    --qrd-link-type-soft: rgba(20, 58, 95, 0.035);
    border-color: #c8d7e6;
}

.qrd-link-card-static {
    --qrd-link-type-colour: #0d6efd;
    --qrd-link-type-soft: rgba(13, 110, 253, 0.04);
    border-color: #bfd8ff;
}

.qrd-link-title {
    font-weight: 760;
    line-height: 1.2;
}

.qrd-link-description {
    margin-top: 6px;
}

.qrd-link-url {
    margin-top: 6px;
    color: #52657a;
}

.qrd-link-side {
    gap: 12px;
    padding: 0 0 4px;
}

.qrd-link-badge {
    min-height: 22px;
    padding: 3px 9px;
    font-size: 0.7rem;
    font-weight: 760;
}

.qrd-link-actions {
    align-items: center;
}

.qrd-link-actions .btn {
    min-height: 34px;
}

.qrd-link-actions .btn-dark {
    padding-inline: 12px;
}

.qrd-copy-link-button {
    width: 36px;
}

.qrd-link-source-note {
    display: none !important;
}

@media (max-width: 991.98px) {
    .qrd-link-card {
        grid-template-columns: 1fr;
        min-height: 0;
    }
}

/* =========================
   Laptop-first density restoration
   Keep the brand style, but reduce default scale on working pages.
========================= */
@media (min-width: 768px) {
    html {
        font-size: 15px;
    }

    .qrd-navbar,
    .qrd-navbar > .container-xl {
        min-height: 62px;
    }

    .qrd-brand {
        gap: 9px;
        font-size: 1.35rem;
    }

    .qrd-brand-logo {
        width: 26px;
        height: 26px;
    }

    .qrd-workspace-btn {
        min-width: 170px;
        max-width: 210px;
        min-height: 44px;
        padding: 6px 11px;
        border-radius: 8px;
    }

    .qrd-workspace-name {
        font-size: 0.9rem;
    }

    .qrd-workspace-org {
        font-size: 0.78rem;
    }

    .qrd-nav .nav-link {
        padding-inline: 9px;
        font-size: 0.96rem;
    }

    .qrd-main-container {
        padding-top: 10px;
        padding-bottom: 16px;
    }

    .qrd-page-header {
        margin-bottom: 13px;
    }

    .qrd-page-title {
        font-size: 1.45rem;
    }

    .qrd-page-subtitle {
        font-size: 0.95rem;
    }

    .qrd-card,
    .qrd-feature-card,
    .qrd-scan-card {
        padding: 16px;
        margin-bottom: 16px;
        border-radius: 14px;
    }

    .qrd-dashboard-card {
        padding: 16px;
        border-radius: 14px;
    }

    .qrd-dashboard-grid {
        gap: 14px;
    }

    .qrd-card-heading {
        margin-bottom: 11px;
    }

    .qrd-field {
        margin-bottom: 12px;
    }

    .qrd-label {
        margin-bottom: 5px;
    }

    .form-control,
    .form-select,
    .btn {
        font-size: 0.95rem;
    }
}

/* =========================
   Code Details intro card alignment fix
   Keeps the numbered badge out of the heading text at laptop density.
========================= */
.qrd-code-details-intro .qrd-intro-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: .75rem;
    row-gap: .15rem;
    align-items: start;
    padding: .95rem 1rem;
}

.qrd-code-details-intro .qrd-intro-kicker {
    position: static;
    grid-column: 1;
    grid-row: 1 / span 2;
    margin-top: .05rem;
    width: 1.55rem;
    height: 1.55rem;
    flex: 0 0 auto;
}

.qrd-code-details-intro .qrd-intro-card h2,
.qrd-code-details-intro .qrd-intro-card p {
    grid-column: 2;
    min-width: 0;
}

.qrd-code-details-intro .qrd-intro-card h2 {
    margin: 0;
    line-height: 1.2;
}

.qrd-code-details-intro .qrd-intro-card p {
    margin: 0;
}

@media (max-width: 767.98px) {
    .qrd-code-details-intro .qrd-intro-card {
        column-gap: .65rem;
        padding: .9rem;
    }
}

/* =========================
   Friendly error page
========================= */
.qrd-error-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: min(720px, calc(100vh - 140px));
    padding: 2rem 1rem;
}

.qrd-error-card {
    width: min(100%, 640px);
    padding: 2rem;
    background: #ffffff;
    border: 1px solid var(--qrd-border, #d7ded8);
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.qrd-error-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.qrd-error-product {
    color: var(--qrd-oxford-blue, #233a56);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.12em;
}

.qrd-error-subtitle {
    margin-top: 0.2rem;
    color: var(--qrd-eau-de-nil-dark, #5c7968);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.11em;
}

.qrd-error-card h1 {
    margin: 0 0 0.75rem;
    color: var(--qrd-oxford-blue, #233a56);
    font-size: clamp(1.7rem, 2vw, 2.1rem);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.qrd-error-card p {
    color: var(--qrd-ink-soft, #475569);
    line-height: 1.6;
}

.qrd-error-request-id {
    margin-top: 1rem;
    padding: 0.75rem 0.9rem;
    background: var(--qrd-french-chalk-light, #f5f8f5);
    border: 1px solid var(--qrd-border, #d7ded8);
    border-radius: 10px;
    font-size: 0.9rem;
}

.qrd-error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.4rem;
}

.qrd-error-dev-note {
    margin-top: 1.4rem;
    font-size: 0.86rem;
}


/* =========================
   Session expired notices
========================= */

.qrd-session-expired-login-notice,
.qrd-session-expired-overlay {
    position: fixed;
    inset: 0;
    z-index: 1085;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1.25rem;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.qrd-session-expired-overlay {
    align-items: center;
    background: rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(2px);
}

.qrd-session-expired-login-notice.is-visible,
.qrd-session-expired-overlay.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.qrd-session-expired-login-notice.is-dismissing,
.qrd-session-expired-overlay.is-dismissing {
    opacity: 0;
    transform: translateY(-8px);
}

.qrd-session-expired-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.9rem;
    width: min(460px, calc(100vw - 2rem));
    padding: 1rem 1rem 1.15rem;
    overflow: hidden;
    color: var(--qrd-ink, #102033);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(207, 216, 210, 0.9);
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
    pointer-events: auto;
}

.qrd-session-expired-card-centred {
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.qrd-session-expired-symbol {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-top: 0.1rem;
    color: #ffffff;
    background: var(--qrd-oxford-blue, #273950);
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.qrd-session-expired-symbol span {
    width: 13px;
    height: 13px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: qrd-session-expired-spin 950ms linear infinite;
}

.qrd-session-expired-copy h2 {
    margin: 0 0 0.25rem;
    color: var(--qrd-oxford-blue, #273950);
    font-size: 1rem;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.qrd-session-expired-copy p {
    margin: 0;
    color: var(--qrd-ink-soft, #475569);
    font-size: 0.92rem;
    line-height: 1.45;
}

.qrd-session-expired-copy .qrd-session-expired-muted {
    margin-top: 0.25rem;
    color: var(--qrd-muted, #64748b);
    font-size: 0.86rem;
}

.qrd-session-expired-progress {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    overflow: hidden;
    background: rgba(207, 216, 210, 0.55);
}

.qrd-session-expired-progress span {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--qrd-eau-de-nil-dark, #587260);
    transform-origin: left center;
    animation: qrd-session-expired-progress 2.6s linear forwards;
}

@keyframes qrd-session-expired-progress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@keyframes qrd-session-expired-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .qrd-session-expired-login-notice,
    .qrd-session-expired-overlay,
    .qrd-session-expired-symbol span,
    .qrd-session-expired-progress span {
        animation: none;
        transition: none;
    }
}
