/* Premium QR Codes — Midnight contrast and surface correction */
html[data-pqr-theme="midnight"] body.pqr-studio-page {
    --bs-body-color:#e8edf7;
    --bs-body-bg:#080d17;
    --bs-border-color:#2c3850;
    --bs-secondary-color:#a3aec1;
}

html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-studio-eyebrow,
html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-home-eyebrow {
    color:#abb3ff !important;
    border-color:#34425d !important;
    background:#151f33 !important;
}

html[data-pqr-theme="midnight"] body.pqr-studio-page .cat-btn,
html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-type-navigation > a,
html[data-pqr-theme="midnight"] body.pqr-studio-page .nav-pills .nav-link {
    color:#c0cadb !important;
    border-color:#303c55 !important;
    background:#121c2d !important;
    box-shadow:none !important;
}
html[data-pqr-theme="midnight"] body.pqr-studio-page .cat-btn:hover,
html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-type-navigation > a:hover,
html[data-pqr-theme="midnight"] body.pqr-studio-page .nav-pills .nav-link:hover {
    color:#fff !important;
    border-color:#59698c !important;
    background:#1b2840 !important;
}
html[data-pqr-theme="midnight"] body.pqr-studio-page .cat-btn.active,
html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-type-navigation > a.btn-primary,
html[data-pqr-theme="midnight"] body.pqr-studio-page .nav-pills .nav-link.active {
    color:#080d17 !important;
    border-color:#8e94ff !important;
    background:#8e94ff !important;
}

html[data-pqr-theme="midnight"] body.pqr-studio-page .input-label,
html[data-pqr-theme="midnight"] body.pqr-studio-page .form-label,
html[data-pqr-theme="midnight"] body.pqr-studio-page .form-check-label,
html[data-pqr-theme="midnight"] body.pqr-studio-page legend,
html[data-pqr-theme="midnight"] body.pqr-studio-page .text-muted,
html[data-pqr-theme="midnight"] body.pqr-studio-page small {
    color:#a3aec1 !important;
}
html[data-pqr-theme="midnight"] body.pqr-studio-page .studio-card h4,
html[data-pqr-theme="midnight"] body.pqr-studio-page .studio-card h5,
html[data-pqr-theme="midnight"] body.pqr-studio-page .card-custom h4,
html[data-pqr-theme="midnight"] body.pqr-studio-page .card-custom h5 {
    color:#f3f6fc !important;
}
html[data-pqr-theme="midnight"] body.pqr-studio-page hr { border-color:#33405a !important; opacity:1; }

html[data-pqr-theme="midnight"] body.pqr-studio-page .option-pill,
html[data-pqr-theme="midnight"] body.pqr-studio-page .exclusive-pill,
html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-segment-button,
html[data-pqr-theme="midnight"] body.pqr-studio-page [class*="mode-button"] {
    color:#c7d0df !important;
    border-color:#34415b !important;
    background:#18233a !important;
}
html[data-pqr-theme="midnight"] body.pqr-studio-page .option-pill:hover,
html[data-pqr-theme="midnight"] body.pqr-studio-page .exclusive-pill:hover {
    color:#fff !important;
    border-color:#65769b !important;
    background:#202e49 !important;
}
html[data-pqr-theme="midnight"] body.pqr-studio-page .option-pill.active,
html[data-pqr-theme="midnight"] body.pqr-studio-page .exclusive-pill.active,
html[data-pqr-theme="midnight"] body.pqr-studio-page [aria-pressed="true"] {
    color:#fff !important;
    border-color:#8087ff !important;
    background:#283461 !important;
    box-shadow:0 0 0 2px rgba(128,135,255,.16) !important;
}

html[data-pqr-theme="midnight"] body.pqr-studio-page .accordion-item,
html[data-pqr-theme="midnight"] body.pqr-studio-page .accordion-button,
html[data-pqr-theme="midnight"] body.pqr-studio-page .dropdown-menu,
html[data-pqr-theme="midnight"] body.pqr-studio-page .modal-content,
html[data-pqr-theme="midnight"] body.pqr-studio-page [class*="export-studio"],
html[data-pqr-theme="midnight"] body.pqr-studio-page [class*="export-panel"],
html[data-pqr-theme="midnight"] body.pqr-studio-page [class*="download-panel"] {
    color:#e8edf7 !important;
    border-color:#2c3850 !important;
    background:#111a2a !important;
}
html[data-pqr-theme="midnight"] body.pqr-studio-page .accordion-button::after { filter:invert(1) grayscale(1); }

html[data-pqr-theme="midnight"] body.pqr-studio-page .form-control,
html[data-pqr-theme="midnight"] body.pqr-studio-page .form-select,
html[data-pqr-theme="midnight"] body.pqr-studio-page textarea,
html[data-pqr-theme="midnight"] body.pqr-studio-page input:not([type="color"]):not([type="checkbox"]):not([type="radio"]) {
    color:#eef2f9 !important;
    border-color:#34415a !important;
    background-color:#0b1423 !important;
}
html[data-pqr-theme="midnight"] body.pqr-studio-page .form-select { color-scheme:dark; }

/* QR and barcode preview paper intentionally stays light. */
html[data-pqr-theme="midnight"] body.pqr-studio-page .preview-box,
html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-preview-surface,
html[data-pqr-theme="midnight"] body.pqr-studio-page #qr_img,
html[data-pqr-theme="midnight"] body.pqr-studio-page #barcodeCanvas,
html[data-pqr-theme="midnight"] body.pqr-studio-page #bwipCanvas {
    background:#fff !important;
}

html[data-pqr-theme="midnight"] body.pqr-studio-page .alert { color:#dce4f2; border-color:#384762; background:#172238; }
html[data-pqr-theme="midnight"] body.pqr-studio-page .badge.bg-light { color:#dce4f2 !important; background:#1d2940 !important; }
html[data-pqr-theme="midnight"] body.pqr-studio-page ::selection { color:white; background:#5b62de; }

/* Exact component surfaces: QR/Barcode intelligence, safety and deployment */
html[data-pqr-theme="midnight"] body.pqr-studio-page :is(
    .pqr-qr-intelligence,
    .pqr-scanlab-results,
    .pqr-design-safety,
    .pqr-print-intelligence,
    .pqr-export-studio,
    .pqr-cert,
    .pqr-deployment,
    .pqr-barcode-intel
) {
    color:#dfe5f0 !important;
    border-color:#2d3951 !important;
    background:#111a2a !important;
    box-shadow:0 16px 42px rgba(0,0,0,.22) !important;
}

html[data-pqr-theme="midnight"] body.pqr-studio-page :is(
    .pqr-qr-intel-score,
    .pqr-qr-intel-grid > div,
    .pqr-scanlab-test,
    .pqr-scanlab-meta > span,
    .pqr-design-safety-grid > div,
    .pqr-print-grid > div,
    .pqr-cert-id,
    .pqr-cert-grid > div,
    .pqr-cert-fingerprint,
    .pqr-deployment-preview,
    .pqr-intel-score,
    .pqr-intel-grid > div
) {
    color:#dfe5f0 !important;
    border-color:#2e3a52 !important;
    background:#0d1625 !important;
}

html[data-pqr-theme="midnight"] body.pqr-studio-page :is(
    #intelStatus,
    .pqr-intel-score b,
    .pqr-intel-grid strong,
    .pqr-export-heading strong,
    .pqr-qr-intel-score b,
    .pqr-qr-intel-grid strong,
    .pqr-scanlab-result-head strong,
    .pqr-scanlab-test strong,
    .pqr-scanlab-meta strong,
    .pqr-design-safety-head strong,
    .pqr-design-safety-grid strong,
    .pqr-print-head strong,
    .pqr-print-grid strong,
    .pqr-export-studio-head strong,
    .pqr-cert-head strong,
    .pqr-cert-grid strong,
    .pqr-cert-id strong,
    .pqr-cert-tests > strong,
    .pqr-deployment-head strong,
    .pqr-deployment-preview strong
) { color:#edf2fa !important; }

html[data-pqr-theme="midnight"] body.pqr-studio-page :is(
    .pqr-intel-label,
    .pqr-intel-score span,
    .pqr-intel-score small,
    .pqr-intel-grid small,
    .pqr-export-eyebrow,
    .pqr-export-heading small,
    .pqr-export-section > label,
    .pqr-export-controls label,
    .pqr-qr-intel-eyebrow,
    .pqr-qr-intel-score span,
    .pqr-qr-intel-score small,
    .pqr-qr-intel-grid small,
    .pqr-scanlab-result-head small,
    .pqr-design-safety-head small,
    .pqr-design-safety-grid small,
    .pqr-design-safety-note,
    .pqr-print-head small,
    .pqr-print-grid small,
    .pqr-print-note,
    .pqr-export-studio-head small,
    .pqr-export-field label,
    .pqr-export-note,
    .pqr-cert-head small,
    .pqr-cert-id span,
    .pqr-cert-grid small,
    .pqr-cert-fingerprint small,
    .pqr-cert-disclaimer,
    .pqr-deployment-head small,
    .pqr-deployment-select label,
    .pqr-deployment-preview p,
    .pqr-deployment-status
) { color:#98a5ba !important; }

html[data-pqr-theme="midnight"] body.pqr-studio-page :is(
    .pqr-intel-recommend,
    .pqr-intel-message,
    .pqr-qr-intel-message,
    .pqr-design-safety-message,
    .pqr-print-message,
    .pqr-export-summary,
    .pqr-cert-message,
    .pqr-deployment-note
) {
    color:#b8c3d5 !important;
    border-color:#2f3b53 !important;
    background:#172237 !important;
}

html[data-pqr-theme="midnight"] body.pqr-studio-page :is(
    .pqr-intel-message.is-valid,
    .pqr-qr-intel-message.is-good,
    .pqr-design-safety-message.is-good,
    .pqr-print-message.is-good,
    .pqr-deployment-status.is-success
) { color:#7be0b2 !important; background:#102b26 !important; }

html[data-pqr-theme="midnight"] body.pqr-studio-page :is(
    .pqr-intel-message.is-warning,
    .pqr-qr-intel-message.is-warning,
    .pqr-design-safety-message.is-warning
) { color:#f3c76a !important; background:#302713 !important; }

html[data-pqr-theme="midnight"] body.pqr-studio-page :is(
    .pqr-intel-message.is-invalid,
    .pqr-qr-intel-message.is-risk,
    .pqr-deployment-status.is-error
) { color:#ff9b9b !important; background:#321b22 !important; }

/* Exact export controls */
html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-format-option {
    color:#cbd4e3 !important;
    border-color:#334159 !important;
    background:#172136 !important;
}
html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-format-option strong { color:#e7ecf5 !important; }
html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-format-option small { color:#8e9aaf !important; }
html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-format-option:hover { border-color:#6678a0 !important; background:#202d46 !important; }
html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-format-option.active { border-color:#858cff !important; background:#27345d !important; box-shadow:0 0 0 2px rgba(133,140,255,.13) !important; }
html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-format-option.active strong { color:#b6baff !important; }
html[data-pqr-theme="midnight"] body.pqr-studio-page :is(.pqr-export-field select,.pqr-deployment-select select,.pqr-export-controls .form-select) { color:#e8edf6 !important; border-color:#34415a !important; background-color:#0b1423 !important; color-scheme:dark; }
html[data-pqr-theme="midnight"] body.pqr-studio-page :is(.pqr-export-download,.pqr-deployment-apply) { color:white !important; border-color:#5f66dc !important; background:#5f66dc !important; }

/* Exact QR designer controls */
html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-segmented { border-color:#303c55 !important; background:#0d1625 !important; }
html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-segment { color:#99a6ba !important; background:transparent !important; }
html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-segment:hover { color:#dce4f2 !important; }
html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-segment.active { color:#b8bcff !important; background:#202b46 !important; box-shadow:none !important; }
html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-size-option { color:#b8c2d4 !important; border-color:#33415a !important; background:#172136 !important; }
html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-size-option.active { color:white !important; border-color:#777eff !important; background:#5961d5 !important; }
html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-logo-upload { color:#bdc7d7 !important; border-color:#43516b !important; background:#121d30 !important; }
html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-logo-upload:hover { border-color:#7c83f4 !important; background:#19263d !important; }
html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-logo-upload-icon { color:#b8bcff !important; background:#272e5a !important; }
html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-logo-upload strong { color:#e5eaf3 !important; }
html[data-pqr-theme="midnight"] body.pqr-studio-page :is(.pqr-logo-selection,.pqr-logo-plate-row) { border-color:#33415a !important; background:#121d30 !important; }
html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-logo-selection strong { color:#e2e8f2 !important; }
html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-social-icon { color:#aeb9cb !important; border-color:#33415a !important; background:#172136 !important; }
html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-social-icon:hover { color:#dfe5ff !important; border-color:#6f78d9 !important; background:#202d48 !important; }
html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-social-icon.active { color:#b8bcff !important; border-color:#8188ff !important; background:#29345c !important; }

/* Printable certificate and raw code canvases are the only intentional paper surfaces. */
html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-cert-document { color:#172b4d !important; border-color:#dce5ee !important; background:#fff !important; }
html[data-pqr-theme="midnight"] body.pqr-studio-page .pqr-cert-document :is(h1,h2,h3,h4,strong,p,small,span,td,th,code) { color:inherit !important; }

/* Dashboard and account components with inline light styles */
html[data-pqr-theme="midnight"] body.pqr-dashboard-page :is(.metric-card,.stat-card,.dashboard-card,.analytics-card,.panel-card,.api-card,.table-responsive) { color:#dfe5f0 !important; border-color:#2d3951 !important; background:#111a2a !important; box-shadow:0 16px 42px rgba(0,0,0,.2) !important; }
html[data-pqr-theme="midnight"] body.pqr-dashboard-page :is(.metric-card,.stat-card,.dashboard-card,.analytics-card,.panel-card,.api-card) :is(h1,h2,h3,h4,h5,strong) { color:#edf2fa !important; }
