/* ORUMUP bell-style dark surface repair, 2026-10-13.
   A screen-only, theme-gated palette patch: no changes to layout, media, QR,
   print, authentication, permissions, click handlers, or semantic action status. */
@media screen {
  html[data-oreumup-theme="dark"] {
    --oreumup-bell-panel: var(--oreumup-theme-surface, #192820);
    --oreumup-bell-card: var(--oreumup-theme-soft, #20332a);
    --oreumup-bell-hover: var(--oreumup-theme-raised, #2a4035);
    --oreumup-bell-border: var(--oreumup-theme-line, #496457);
    --oreumup-bell-text: var(--oreumup-theme-ink, #ffffff);
    --oreumup-bell-subtext: var(--oreumup-theme-muted, #e6e6e6);
  }

  /* My Info: operator permission is an informational control panel, not a
     differently themed application. Keep the active role and all role rules. */
  html[data-oreumup-theme="dark"] body #operatorAuthorityPanel,
  html[data-oreumup-theme="dark"] body #operatorAuthorityPanel .operator-role-current {
    background-color: var(--oreumup-bell-panel) !important;
    background-image: none !important;
    border-color: var(--oreumup-bell-border) !important;
    color: var(--oreumup-bell-text) !important;
  }
  html[data-oreumup-theme="dark"] body #operatorAuthorityPanel :is(
    h3, .operator-role-current b, .operator-authority-head strong
  ) { color: var(--oreumup-bell-text) !important; }
  html[data-oreumup-theme="dark"] body #operatorAuthorityPanel :is(
    .operator-authority-head p, .operator-role-switch small, .operator-access-status
  ) { color: var(--oreumup-bell-subtext) !important; }
  html[data-oreumup-theme="dark"] body #operatorAuthorityPanel .operator-role-switch {
    background: var(--oreumup-bell-card) !important;
    color: var(--oreumup-bell-text) !important;
    border-color: var(--oreumup-bell-border) !important;
  }
  html[data-oreumup-theme="dark"] body #operatorAuthorityPanel .operator-role-switch:is(:hover, :focus-visible) {
    background: var(--oreumup-bell-hover) !important;
  }
  html[data-oreumup-theme="dark"] body #operatorAuthorityPanel .operator-role-switch.active {
    background: var(--oreumup-theme-accent-soft) !important;
    color: var(--oreumup-theme-accent) !important;
    border-color: var(--oreumup-theme-accent) !important;
  }
  html[data-oreumup-theme="dark"] body #operatorAuthorityPanel .operator-role-switch.active small {
    color: var(--oreumup-theme-accent) !important;
  }

  /* Version and credits: cards use the alert palette. The rights notice
     retains a distinct warm caution tone instead of turning gray. */
  html[data-oreumup-theme="dark"] body #oreumupInfoModal :is(
    .app-info-item, .app-info-note, .app-info-credits
  ) {
    background-color: var(--oreumup-bell-card) !important;
    background-image: none !important;
    color: var(--oreumup-bell-text) !important;
    border-color: var(--oreumup-bell-border) !important;
  }
  html[data-oreumup-theme="dark"] body #oreumupInfoModal :is(
    .app-info-brand strong, .app-info-item b, .app-info-credits b, .app-info-note b
  ) { color: var(--oreumup-bell-text) !important; }
  html[data-oreumup-theme="dark"] body #oreumupInfoModal :is(
    .app-info-brand small, .app-info-item span, .app-info-credits span, .app-info-future
  ) { color: var(--oreumup-bell-subtext) !important; }
  html[data-oreumup-theme="dark"] body #oreumupInfoModal .app-info-ip {
    background-color: var(--oreumup-theme-warning-soft, #3a2e1d) !important;
    border-color: #88734c !important;
    color: var(--oreumup-theme-warning, #f4d295) !important;
  }
  html[data-oreumup-theme="dark"] body #oreumupInfoModal .app-info-ip b {
    color: var(--oreumup-theme-warning, #f4d295) !important;
  }

  /* Shared reading cards: keep all post types readable when their own
     category CSS introduces a pale hover or !important background. */
  html[data-oreumup-theme="dark"] body :is(
    #questionWriteModal .question-board-item,
    #questionWriteModal .question-answer,
    #questionWriteModal .question-subanswer,
    #postDetailBody .question-answer,
    #postDetailBody .question-subanswer,
    #oreumupQuestionReplyModal .question-answer,
    #oreumupQuestionReplyModal .question-subanswer,
    #questionWriteModal .question-preview-reply,
    #postDetailBody .question-detail-reply
  ) {
    background-color: var(--oreumup-bell-card) !important;
    background-image: none !important;
    color: var(--oreumup-bell-text) !important;
  }
  html[data-oreumup-theme="dark"] body :is(
    #questionWriteModal .question-board-item,
    #postDetailBody, #oreumupQuestionReplyModal
  ) :is(
    h4, p, .question-body, .question-title-button,
    .question-answer-text, .question-answer-head b, .question-answer-editor,
    .question-reply b, .question-preview-reply b, .detail-reply b
  ) { color: var(--oreumup-bell-text) !important; }
  html[data-oreumup-theme="dark"] body :is(
    #questionWriteModal, #postDetailBody, #oreumupQuestionReplyModal
  ) :is(.board-time, .question-reply-time, .detail-reply-time, .question-answer-time, .question-answer-mark) {
    color: var(--oreumup-bell-subtext) !important;
  }

  /* All posting/reading card hover states — not the category badge inks.
     Active/focus feedback resembles the bell notification hover, not white. */
  html[data-oreumup-theme="dark"] body :is(
    .question-board-item, .question-answer, .question-subanswer,
    .question-reply, .question-preview-reply, .detail-reply,
    .inventory-board-item, .my-trade-item, .notice-board-item,
    .stock-row, .quick-pick, .oreumup-conv-card
  ):is(:hover, :focus-within),
  html[data-oreumup-theme="dark"] body #inventoryBoardList .inventory-board-item[data-stock-post-id]:hover,
  html[data-oreumup-theme="dark"] body #questionWriteModal .question-board-item:hover {
    background-color: var(--oreumup-bell-hover) !important;
    background-image: none !important;
    color: var(--oreumup-bell-text) !important;
  }
  html[data-oreumup-theme="dark"] body #questionWriteModal .question-board-item
    .oreumup-conv-fav-btn:hover {
    background: var(--oreumup-bell-hover) !important;
    border-color: var(--oreumup-bell-border) !important;
    color: var(--oreumup-bell-text) !important;
  }
  html[data-oreumup-theme="dark"] body #questionWriteModal .question-board-item
    .oreumup-conv-fav-btn.active {
    background: var(--oreumup-theme-accent-soft) !important;
    color: var(--oreumup-theme-accent) !important;
  }

  /* Stock posting choices and their labels. Checkboxes keep original
     checked behavior, price notice keeps an amber semantic indicator. */
  html[data-oreumup-theme="dark"] body .stock-info-choice {
    background-color: var(--oreumup-bell-card) !important;
    background-image: none !important;
    border-color: var(--oreumup-bell-border) !important;
    color: var(--oreumup-bell-text) !important;
  }
  html[data-oreumup-theme="dark"] body .stock-info-choice b {
    color: var(--oreumup-bell-text) !important;
  }
  html[data-oreumup-theme="dark"] body .stock-info-choice small {
    color: var(--oreumup-bell-subtext) !important;
  }
  html[data-oreumup-theme="dark"] body .stock-info-choice.price-public-choice {
    background-color: var(--oreumup-theme-warning-soft, #3a2e1d) !important;
    border-color: #88734c !important;
  }
  html[data-oreumup-theme="dark"] body .stock-info-choice.price-public-choice b {
    color: var(--oreumup-theme-warning, #f4d295) !important;
  }

  /* Today's activity panel; keep the event-type chip and timestamp distinct. */
  html[data-oreumup-theme="dark"] body :is(
    #heroTodayPanel, #heroTodayPanel .hero-today-item
  ) {
    background-color: var(--oreumup-bell-card) !important;
    background-image: none !important;
    border-color: var(--oreumup-bell-border) !important;
    color: var(--oreumup-bell-text) !important;
  }
  html[data-oreumup-theme="dark"] body #heroTodayPanel
    .hero-today-item:is(:hover, :focus-visible) {
    background-color: var(--oreumup-bell-hover) !important;
  }
  html[data-oreumup-theme="dark"] body #heroTodayPanel .hero-today-copy b {
    color: var(--oreumup-bell-text) !important;
  }
  html[data-oreumup-theme="dark"] body #heroTodayPanel .hero-today-copy small {
    color: var(--oreumup-bell-subtext) !important;
  }
  html[data-oreumup-theme="dark"] body #heroTodayPanel .hero-today-kind {
    background: var(--oreumup-theme-accent-soft) !important;
    color: var(--oreumup-theme-accent) !important;
  }

  /* Free-tools cards use the same surface/border/hover rhythm as bell alerts.
     Preserve colorful emoji and the existing layout and tap targets. */
  html[data-oreumup-theme="dark"] body #toolsModal .tool-launch {
    background-color: var(--oreumup-bell-card) !important;
    background-image: none !important;
    border-color: var(--oreumup-bell-border) !important;
    color: var(--oreumup-bell-text) !important;
    border-radius: 14px;
  }
  html[data-oreumup-theme="dark"] body #toolsModal .tool-launch strong {
    color: var(--oreumup-bell-text) !important;
  }
  html[data-oreumup-theme="dark"] body #toolsModal .tool-launch small {
    color: var(--oreumup-bell-subtext) !important;
  }
  html[data-oreumup-theme="dark"] body #toolsModal .tool-launch:is(:hover, :focus-visible) {
    background-color: var(--oreumup-bell-hover) !important;
    border-color: var(--oreumup-theme-accent) !important;
  }

  /* Compact AI stock editing popup has an independent stylesheet. Only its
     surfaces, headings and neutral controls are recolored, never dragged/moved. */
  html[data-oreumup-theme="dark"] body .orumup-ai-panel {
    background-color: var(--oreumup-bell-panel) !important;
    background-image: none !important;
    border-color: var(--oreumup-bell-border) !important;
    color: var(--oreumup-bell-text) !important;
  }
  html[data-oreumup-theme="dark"] body .orumup-ai-panel-copy strong {
    color: var(--oreumup-bell-text) !important;
  }
  html[data-oreumup-theme="dark"] body :is(
    .orumup-ai-panel-copy small, .orumup-ai-status
  ) { color: var(--oreumup-bell-subtext) !important; }
  html[data-oreumup-theme="dark"] body .orumup-ai-panel-row input {
    background: var(--oreumup-bell-card) !important;
    color: var(--oreumup-bell-text) !important;
    border-color: var(--oreumup-bell-border) !important;
    caret-color: var(--oreumup-bell-text) !important;
  }
  html[data-oreumup-theme="dark"] body .orumup-ai-panel-row input::placeholder {
    color: var(--oreumup-bell-subtext) !important;
    opacity: 1;
  }
  html[data-oreumup-theme="dark"] body .orumup-ai-panel-actions button,
  html[data-oreumup-theme="dark"] body .orumup-ai-voice:not(.is-listening) {
    background: var(--oreumup-bell-card) !important;
    color: var(--oreumup-bell-text) !important;
    border-color: var(--oreumup-bell-border) !important;
  }
  html[data-oreumup-theme="dark"] body .orumup-ai-panel-actions button:hover,
  html[data-oreumup-theme="dark"] body .orumup-ai-voice:not(.is-listening):hover {
    background: var(--oreumup-bell-hover) !important;
  }

  /* Bulk inventory organizer is a separately mounted DOM/style sheet.
     Scope to its own backdrop, preserve row images and registration status. */
  html[data-oreumup-theme="dark"] body #oreumupInventorySyncModal .oreumup-inv-card {
    background: var(--oreumup-bell-panel) !important;
    color: var(--oreumup-bell-text) !important;
    border: 1px solid var(--oreumup-bell-border) !important;
  }
  html[data-oreumup-theme="dark"] body #oreumupInventorySyncModal :is(
    .oreumup-inv-head p, .oreumup-inv-summary, .inv-main small,
    .inv-bulk-options span, .inv-select-actions span, .oreumup-inv-empty
  ) { color: var(--oreumup-bell-subtext) !important; }
  html[data-oreumup-theme="dark"] body #oreumupInventorySyncModal :is(
    .oreumup-inv-head h2, .inv-title b, .inv-bulk-options label, .inv-editline label
  ) { color: var(--oreumup-bell-text) !important; }
  html[data-oreumup-theme="dark"] body #oreumupInventorySyncModal :is(
    .inv-bulk-options, .oreumup-inv-product, .oreumup-inv-status
  ) {
    background: var(--oreumup-bell-card) !important;
    border-color: var(--oreumup-bell-border) !important;
    color: var(--oreumup-bell-text) !important;
  }
  html[data-oreumup-theme="dark"] body #oreumupInventorySyncModal
    .oreumup-inv-product.selected {
    background: var(--oreumup-theme-accent-soft) !important;
    border-color: var(--oreumup-theme-accent) !important;
  }
  html[data-oreumup-theme="dark"] body #oreumupInventorySyncModal
    .oreumup-inv-product:is(:hover, :focus-within) {
    background: var(--oreumup-bell-hover) !important;
  }
  html[data-oreumup-theme="dark"] body #oreumupInventorySyncModal
    .oreumup-inv-product.selected:is(:hover, :focus-within) {
    background: var(--oreumup-theme-accent-soft) !important;
  }
  html[data-oreumup-theme="dark"] body #oreumupInventorySyncModal :is(
    .oreumup-inv-search input, .inv-filter-row input,
    .inv-bulk-options input[type="text"], .inv-editline input, .inv-editline select
  ) {
    background: var(--oreumup-bell-card) !important;
    color: var(--oreumup-bell-text) !important;
    border-color: var(--oreumup-bell-border) !important;
  }
  html[data-oreumup-theme="dark"] body #oreumupInventorySyncModal :is(
    .oreumup-inv-search input, .inv-filter-row input,
    .inv-bulk-options input[type="text"], .inv-editline input
  )::placeholder {
    color: var(--oreumup-bell-subtext) !important;
  }
  html[data-oreumup-theme="dark"] body #oreumupInventorySyncModal .inv-thumb {
    background: var(--oreumup-bell-card) !important;
  }
  html[data-oreumup-theme="dark"] body #oreumupInventorySyncModal .oreumup-inv-status[data-kind="ok"] {
    background: var(--oreumup-theme-accent-soft) !important;
    color: var(--oreumup-theme-accent) !important;
  }
  html[data-oreumup-theme="dark"] body #oreumupInventorySyncModal .oreumup-inv-status[data-kind="err"] {
    background: var(--oreumup-theme-danger-soft, #432a29) !important;
    color: var(--oreumup-theme-error, #ffb7a7) !important;
  }
  html[data-oreumup-theme="dark"] body #oreumupInventorySyncModal .inv-match.ok {
    background: var(--oreumup-theme-accent-soft) !important;
    color: var(--oreumup-theme-accent) !important;
  }
  html[data-oreumup-theme="dark"] body #oreumupInventorySyncModal .inv-match.warn {
    background: var(--oreumup-theme-warning-soft) !important;
    color: var(--oreumup-theme-warning) !important;
  }
  html[data-oreumup-theme="dark"] body #oreumupInventorySyncModal .inv-match.none {
    background: var(--oreumup-bell-card) !important;
    color: var(--oreumup-bell-subtext) !important;
  }

  /* Neutral buttons follow bell cards; colored publish/delete/active actions
     remain separate so the meaning of a button stays obvious. */
  html[data-oreumup-theme="dark"] body :is(
    #heroTodayPanel .hero-today-pager button,
    #stockUploadModal .quick-cancel,
    #stockUploadModal .board-filter-btn,
    #questionWriteModal .board-filter-btn,
    #questionWriteModal .oreumup-conv-fav-btn:not(.active),
    .my-trade-tab:not(.active),
    .stock-size-btn:not(.active)
  ),
  html[data-oreumup-theme="dark"] body #oreumupInventorySyncModal :is(
    .oreumup-inv-head > button, .oreumup-inv-tools button,
    .inv-filter-row button, .inv-select-actions button,
    .oreumup-inv-pager button, .inv-mytrade
  ) {
    background: var(--oreumup-bell-card) !important;
    color: var(--oreumup-bell-text) !important;
    border-color: var(--oreumup-bell-border) !important;
    border-radius: 11px;
  }
  html[data-oreumup-theme="dark"] body :is(
    #heroTodayPanel .hero-today-pager button,
    #stockUploadModal .quick-cancel,
    #stockUploadModal .board-filter-btn:not(.active),
    #questionWriteModal .board-filter-btn:not(.active),
    #questionWriteModal .oreumup-conv-fav-btn:not(.active),
    .my-trade-tab:not(.active),
    .stock-size-btn:not(.active)
  ):is(:hover, :focus-visible),
  html[data-oreumup-theme="dark"] body #oreumupInventorySyncModal :is(
    .oreumup-inv-head > button, .oreumup-inv-tools button,
    .inv-filter-row button:not(.active), .inv-select-actions button,
    .oreumup-inv-pager button, .inv-mytrade
  ):is(:hover, :focus-visible) {
    background: var(--oreumup-bell-hover) !important;
    color: var(--oreumup-bell-text) !important;
  }
  html[data-oreumup-theme="dark"] body #oreumupInventorySyncModal .inv-filter-row button.active,
  html[data-oreumup-theme="dark"] body #stockUploadModal .board-filter-btn.active,
  html[data-oreumup-theme="dark"] body #questionWriteModal .board-filter-btn.active {
    background: var(--oreumup-theme-accent-soft) !important;
    color: var(--oreumup-theme-accent) !important;
    border-color: var(--oreumup-theme-accent) !important;
  }
  html[data-oreumup-theme="dark"] body #oreumupInventorySyncModal .oreumup-inv-tools .inv-tool-clear {
    background: var(--oreumup-theme-danger-soft, #432a29) !important;
    color: var(--oreumup-theme-error, #ffb7a7) !important;
    border-color: #94605d !important;
  }
  html[data-oreumup-theme="dark"] body #oreumupInventorySyncModal .oreumup-inv-tools .inv-tool-latest {
    background: #15543c !important;
    color: #f2fff8 !important;
    border-color: #41735d !important;
  }
  html[data-oreumup-theme="dark"] body #oreumupInventorySyncModal .oreumup-inv-tools .inv-tool-upload {
    background: #204654 !important;
    color: #e4f5ff !important;
    border-color: #547f8a !important;
  }
  html[data-oreumup-theme="dark"] body #oreumupInventorySyncModal .inv-register:not(:disabled) {
    background-color: #087547 !important;
    background-image: none !important;
    color: #ffffff !important;
  }

  /* Keyboard indication is additive; no overrides of the program's
     own click/disabled/ESC/scroll/pointer-events behavior. */
  html[data-oreumup-theme="dark"] body :is(
    #toolsModal .tool-launch, #operatorAuthorityPanel .operator-role-switch,
    #oreumupInventorySyncModal button, .orumup-ai-panel-actions button,
    #heroTodayPanel button, #questionWriteModal .board-filter-btn
  ):focus-visible {
    outline: 2px solid var(--oreumup-theme-focus, #8cc8ff) !important;
    outline-offset: 2px;
  }

  /* Owner review portals are moved OUT of #operatorAuthorityPanel; legacy
     selectors do not reach them once mounted in the review dialog. */
  html[data-oreumup-theme="dark"] body dialog.ops-review-dialog
    :is(.ops-review-owner-tools button,.ops-review-embedded-owner,
        .operator-direct-register,.operator-doc-vault,.operator-authority-panel,
        .operator-doc-auth,.operator-doc-card,.operator-scope-note,
        .operator-special-access,.operator-direct-register-preview,
        .operator-direct-register label,.operator-direct-register input,
        .operator-direct-register select,.operator-doc-toolbar button,
        .operator-doc-card button) {
    background-color:var(--oreumup-bell-card) !important;
    background-image:none !important;
    border-color:var(--oreumup-bell-border) !important;
    color:var(--oreumup-bell-text) !important;
  }
  html[data-oreumup-theme="dark"] body dialog.ops-review-dialog
    :is(.operator-direct-register-head h4,.operator-direct-register label,
        .operator-direct-register-preview b,.operator-doc-head h3,
        .operator-doc-card strong,.operator-doc-card b,.operator-special-access-title,
        .operator-doc-vault summary,.operator-doc-status) {
    color:var(--oreumup-bell-text) !important;
  }
  html[data-oreumup-theme="dark"] body dialog.ops-review-dialog
    :is(.operator-direct-register-head p,.operator-doc-head p,
        .operator-direct-register-status:not(.error),.operator-doc-card small,
        .operator-doc-toolbar span,.operator-scope-note) {
    color:var(--oreumup-bell-subtext) !important;
  }
  html[data-oreumup-theme="dark"] body dialog.ops-review-dialog
    :is(input,textarea,select)::placeholder {
    color:var(--oreumup-bell-subtext) !important;opacity:1;
  }
  html[data-oreumup-theme="dark"] body dialog.ops-review-dialog
    :is(.ops-review-owner-tools button,.operator-doc-toolbar button,
        .operator-doc-card button):is(:hover,:focus-visible) {
    background-color:var(--oreumup-bell-hover) !important;
  }
  html[data-oreumup-theme="dark"] body dialog.ops-review-dialog
    .operator-direct-register #operatorRegSubmit:not(:disabled) {
    background:#087547 !important;color:#fff !important;border-color:#3d8f6c !important;
  }
  html[data-oreumup-theme="dark"] body dialog.ops-review-dialog
    .operator-direct-register-status.error { color:#ffb7a7 !important; }
  html[data-oreumup-theme="dark"] body #participantModal
    :is(.participant-detail,.participant-detail-content) {
    background:var(--oreumup-bell-card) !important;
    border:1px solid var(--oreumup-bell-border) !important;
    color:var(--oreumup-bell-text) !important;
  }
  html[data-oreumup-theme="dark"] body #participantModal .participant-detail summary {
    color:var(--oreumup-bell-text) !important;
  }
  html[data-oreumup-theme="dark"] body #participantModal .participant-detail-content span {
    color:var(--oreumup-bell-subtext) !important;
  }
  #participantModal .participant-detail {grid-column:1 / -1;margin-top:8px;border-radius:9px;padding:7px 9px}
  #participantModal .participant-detail summary {font-weight:800;cursor:pointer}
  #participantModal .participant-detail-content {display:grid;gap:3px;margin-top:6px;padding:7px;border-radius:8px}

  /* Owner member editor: same fields and accessible focus in all window sizes. */
  .ops-review-dialog .operator-member-editor {
    flex:1 0 100%;width:100%;padding:8px 10px;margin-top:7px;
    border:1px solid var(--oreumup-bell-border,#496457);border-radius:11px;
  }
  .ops-review-dialog .operator-member-editor summary {
    cursor:pointer;min-height:32px;font-weight:800;
  }
  .ops-review-dialog .operator-member-edit-grid {
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding:9px 0;
  }
  .ops-review-dialog .operator-member-edit-grid label {
    display:flex;flex-direction:column;gap:4px;min-width:0;font-size:13px;font-weight:700;
  }
  .ops-review-dialog .operator-member-edit-grid label.full {grid-column:1 / -1;}
  .ops-review-dialog .operator-member-edit-grid label:has(input[type=checkbox]){
    flex-direction:row;align-items:center;gap:8px;
  }
  .ops-review-dialog .operator-member-edit-grid :is(input,select) {
    width:100%;min-width:0;min-height:42px;box-sizing:border-box;
    padding:8px 10px;border:1px solid #7d9e8c;border-radius:8px;font:inherit;
  }
  .ops-review-dialog .operator-member-edit-grid input[type=checkbox]{
    width:18px;min-height:18px;flex:0 0 18px;
  }
  .ops-review-dialog .operator-member-edit-actions {display:flex;gap:8px;flex-wrap:wrap;}
  @media(max-width:600px){
    .ops-review-dialog .operator-member-edit-grid{grid-template-columns:1fr;}
  }
  html[data-oreumup-theme="dark"] body .ops-review-dialog .operator-member-editor,
  html[data-oreumup-theme="dark"] body .ops-review-dialog .operator-member-edit-grid :is(input,select) {
    background:var(--oreumup-bell-card) !important;
    color:var(--oreumup-bell-text) !important;
    border-color:var(--oreumup-bell-border) !important;
  }
  html[data-oreumup-theme="dark"] body .ops-review-dialog .operator-member-editor :is(summary,label) {
    color:var(--oreumup-bell-text) !important;
  }

  /* Owner review: new document/member panels inherit the bell palette.
     Only the protected owner portal is affected; badge/approval/delete semantics
     and printing are deliberately left alone. */
  html[data-oreumup-theme="dark"] body dialog.ops-review-dialog
    .ops-review-embedded-owner :is(
      .operator-audit-panel, .operator-member-editor,
      .operator-doc-list details, .operator-special-access,
      .operator-doc-grant, .operator-member-state
    ) {
    background-color:var(--oreumup-bell-card) !important;
    border-color:var(--oreumup-bell-border) !important;
    color:var(--oreumup-bell-text) !important;
  }
  html[data-oreumup-theme="dark"] body dialog.ops-review-dialog
    .ops-review-embedded-owner details > summary {
    background-color:var(--oreumup-bell-card) !important;
    color:var(--oreumup-bell-text) !important;
    border-color:var(--oreumup-bell-border) !important;
  }
  html[data-oreumup-theme="dark"] body dialog.ops-review-dialog
    .ops-review-embedded-owner :is(
      .operator-doc-list details, .operator-member-editor, .operator-audit-panel
    ) :is(button, input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    background-color:var(--oreumup-bell-card) !important;
    color:var(--oreumup-bell-text) !important;
    border-color:var(--oreumup-bell-border) !important;
  }
  html[data-oreumup-theme="dark"] body dialog.ops-review-dialog
    .ops-review-embedded-owner :is(
      .operator-audit-row, .operator-audit-row b,
      .operator-doc-meta, .operator-doc-empty,
      .operator-member-editor summary,
      .operator-special-access-note
    ) {
    color:var(--oreumup-bell-subtext) !important;
  }
  html[data-oreumup-theme="dark"] body dialog.ops-review-dialog
    .ops-review-embedded-owner :is(
      .operator-doc-toolbar button, .operator-doc-card button,
      .operator-member-edit-actions button,
      .operator-audit-panel > summary
    ):is(:hover,:focus-visible) {
    background-color:var(--oreumup-bell-hover) !important;
    color:var(--oreumup-bell-text) !important;
  }
  html[data-oreumup-theme="dark"] body dialog.ops-review-dialog
    .ops-review-embedded-owner :is(button,select):disabled {
    opacity:.82 !important;
  }
  html[data-oreumup-theme="dark"] body dialog.ops-review-dialog
    .ops-review-embedded-owner .operator-doc-status.error {
    color:#ffb7a7 !important;
  }
  html[data-oreumup-theme="dark"] body dialog.ops-review-dialog
    .ops-review-embedded-owner .operator-role-fixed-note {
    color:var(--oreumup-bell-subtext) !important;
  }

  /* The fixed role selector and generated special-access labels were still
     white-on-dark islands inside dynamically mounted member cards. */
  html[data-oreumup-theme="dark"] body dialog.ops-review-dialog
    .ops-review-embedded-owner :is(.operator-doc-grant select,.operator-special-access-grid label) {
    background-color:var(--oreumup-bell-card) !important;
    color:var(--oreumup-bell-text) !important;
    border-color:var(--oreumup-bell-border) !important;
  }
  html[data-oreumup-theme="dark"] body dialog.ops-review-dialog
    .ops-review-embedded-owner :is(.operator-special-access-title small,.operator-audit-row small) {
    color:var(--oreumup-bell-subtext) !important;
  }
  /* Dark operator review uses the same surfaces and active states as the bell.
     No changes to the underlying membership data or protected actions. */
  html[data-oreumup-theme="dark"] body dialog.ops-review-dialog
    .ops-review-embedded-owner :is(
      #operatorMemberManagementGroup, #operatorMembershipInquiryPanel,
      #operatorHomepageControlPanel, .oreumup-operator-item,
      .operator-doc-card, .operator-doc-toolbar
    ) {
    background-color:var(--oreumup-bell-card) !important;
    border-color:var(--oreumup-bell-border) !important;
    color:var(--oreumup-bell-text) !important;
  }
  html[data-oreumup-theme="dark"] body dialog.ops-review-dialog
    .ops-review-embedded-owner :is(
      #operatorMemberManagementGroup .operator-member-management-title,
      #operatorMembershipInquiryPanel > summary, #operatorHomepageControlPanel > summary,
      .oreumup-operator-item strong, .oreumup-operator-item p
    ) {color:var(--oreumup-bell-text) !important;}
  html[data-oreumup-theme="dark"] body dialog.ops-review-dialog
    .ops-review-embedded-owner :is(.oreumup-operator-panel-bar span,.oreumup-operator-item small,
      .operator-doc-toolbar span) {color:var(--oreumup-bell-subtext) !important;}
  html[data-oreumup-theme="dark"] body dialog.ops-review-dialog
    .ops-review-embedded-owner :is(
      .operator-doc-toolbar button, .operator-doc-auth button, .operator-doc-card button,
      .operator-member-edit-actions button, .operator-special-access-save,
      .oreumup-operator-panel-bar button, .oreumup-homepage-row button
    ) {
    background:var(--oreumup-bell-card) !important;
    border:1px solid var(--oreumup-bell-border) !important;
    color:var(--oreumup-bell-text) !important;
    box-shadow:none !important;
  }
  html[data-oreumup-theme="dark"] body dialog.ops-review-dialog
    .ops-review-embedded-owner :is(
      .operator-doc-toolbar button, .operator-doc-auth button, .operator-doc-card button,
      .operator-member-edit-actions button, .operator-special-access-save,
      .oreumup-operator-panel-bar button, .oreumup-homepage-row button
    ):is(:hover,:focus-visible) {background:var(--oreumup-bell-hover) !important;}
  html[data-oreumup-theme="dark"] body dialog.ops-review-dialog
    .ops-review-embedded-owner .oreumup-homepage-row button.lock {
    background:var(--oreumup-theme-warning-soft,#392b21) !important;
    color:var(--oreumup-theme-warning,#f7d39d) !important;
  }
  html[data-oreumup-theme="dark"] body dialog.ops-review-dialog
    .ops-review-embedded-owner .oreumup-homepage-row button.open {
    background:var(--oreumup-theme-accent-soft,#183b2d) !important;
    color:var(--oreumup-theme-accent,#a8ebc0) !important;
  }


  /* Screen-only quote and customer selection controls use the bell palette.
     The independent A4 print document and semantic button states are unchanged. */
  html[data-oreumup-theme="dark"] body .home-qt-dialog,
  html[data-oreumup-theme="dark"] body .home-qt-modal :is(
    .hqt-form,.hqt-quote-connect,.hqt-quote-customer-manager,.hqt-result,
    .hqt-promo-grid,.hqt-card-tools
  ) {
    background-color:var(--oreumup-bell-panel) !important;
    border-color:var(--oreumup-bell-border) !important;
    color:var(--oreumup-bell-text) !important;
  }
  html[data-oreumup-theme="dark"] body .home-qt-modal :is(
    .home-qt-head h3,.hqt-field>span,.hqt-quote-connect strong,
    .hqt-quote-customer-manager strong,.hqt-quote-customer-panel strong
  ) {color:var(--oreumup-bell-text) !important;}
  html[data-oreumup-theme="dark"] body .home-qt-modal :is(
    .home-qt-head p,.hqt-note,.hqt-field small,.hqt-quote-connect small
  ) {color:var(--oreumup-bell-subtext) !important;}
  html[data-oreumup-theme="dark"] body .home-qt-modal :is(
    .hqt-field input,.hqt-field select,.hqt-field textarea,
    .hqt-quote-connect input,.hqt-quote-customer-manager input
  ) {
    background:var(--oreumup-bell-card) !important;
    border-color:var(--oreumup-bell-border) !important;
    color:var(--oreumup-bell-text) !important;
  }
  html[data-oreumup-theme="dark"] body .home-qt-modal :is(
    .hqt-secondary,.hqt-quote-connect button,.hqt-quote-customer-manager button
  ) {
    background:var(--oreumup-bell-card) !important;
    border:1px solid var(--oreumup-bell-border) !important;
    color:var(--oreumup-bell-text) !important;
  }
  html[data-oreumup-theme="dark"] body .home-qt-modal :is(
    .hqt-secondary,.hqt-quote-connect button,.hqt-quote-customer-manager button
  ):is(:hover,:focus-visible) {background:var(--oreumup-bell-hover) !important;}
  html[data-oreumup-theme="dark"] body .home-qt-modal .hqt-primary {
    background:var(--oreumup-theme-accent,#0b9256) !important;
    color:#fff !important;
  }

}


/* Quick-quote controls use the same dark-surface contrast as notification bell.
   Screen-only: no change to printable A4 quotation colors or document layout. */
@media screen {
  html[data-oreumup-theme="dark"] body #hqtQuoteRoot :is(
    .oqm-data-tools, .oqm-data-body, .hqt-quote-connect,
    .hqt-quote-party, .hqt-quote-pick, .hqt-quote-output-options,
    .hqt-quote-qr-preview, .hqt-quote-customer-list, .hqt-field
  ) {
    background:var(--oreumup-bell-card,#20332a)!important;
    border-color:var(--oreumup-bell-border,#496457)!important;
    color:var(--oreumup-bell-text,#fff)!important;
  }
  html[data-oreumup-theme="dark"] body #hqtQuoteRoot :is(
    .hqt-quote-party h3, .hqt-quote-party-field>span,
    .oqm-data-tools>summary, .hqt-quote-main-actions
  ) {
    background:var(--oreumup-bell-hover,#2a4035)!important;
    color:var(--oreumup-bell-text,#fff)!important;
    border-color:var(--oreumup-bell-border,#496457)!important;
  }
  html[data-oreumup-theme="dark"] body #hqtQuoteRoot :is(
    input, textarea, select, .hqt-quote-party-field>input
  ) {
    background:var(--oreumup-bell-panel,#192820)!important;
    color:var(--oreumup-bell-text,#fff)!important;
    border-color:var(--oreumup-bell-border,#496457)!important;
  }
  html[data-oreumup-theme="dark"] body #hqtQuoteRoot :is(
    label, small, summary, .hqt-status, .oqm-data-tools small,
    #hqtQuoteDataStatus, .hqt-quote-pick small
  ) {color:var(--oreumup-bell-subtext,#e6e6e6)!important;}
  html[data-oreumup-theme="dark"] body #hqtQuoteRoot :is(
    .oqm-data-actions button:not(#hqtQuoteImportLatest):not(.hqt-primary),
    .hqt-secondary, .hqt-quote-pick button:not(.hqt-primary), .hqt-quote-download-actions button:not(.hqt-primary)
  ) {background:var(--oreumup-bell-card,#20332a)!important;color:var(--oreumup-bell-text,#fff)!important;border:1px solid var(--oreumup-bell-border,#496457)!important;}
  html[data-oreumup-theme="dark"] body #hqtQuoteRoot :is(
    .oqm-data-actions button, .hqt-secondary, .hqt-quote-pick button:not(.hqt-primary)
  ):is(:hover,:focus-visible) {background:var(--oreumup-bell-hover,#2a4035)!important;}
  html[data-oreumup-theme="dark"] body #hqtQuoteRoot :is(
    .hqt-quote-party h3,.hqt-quote-party-field>span,.oqm-data-tools>summary
  ) {box-shadow:none!important;}
}

/* Quick quote: bell-standard editable cells, including Chromium autofill.
   This is screen-only and never touches the standalone A4 print document. */
@media screen {
  html[data-oreumup-theme="dark"] body #hqtQuoteRoot
    :is(.hqt-quote-party-field>input,.hqt-quote-party-field>textarea,
        #hqtBuyerName,#hqtBuyerBiz,#hqtBuyerPhone,#hqtBuyerAddress,
        #hqtSellerStore,#hqtSellerBiz,#hqtSellerPhone,#hqtSellerAddress) {
    background-color:var(--oreumup-bell-panel,#192820)!important;
    color:var(--oreumup-bell-text,#fff)!important;
    border-color:var(--oreumup-bell-border,#496457)!important;
    -webkit-text-fill-color:var(--oreumup-bell-text,#fff)!important;
  }
  html[data-oreumup-theme="dark"] body #hqtQuoteRoot input:-webkit-autofill {
    -webkit-text-fill-color:var(--oreumup-bell-text,#fff)!important;
    -webkit-box-shadow:0 0 0 1000px var(--oreumup-bell-panel,#192820) inset!important;
    caret-color:var(--oreumup-bell-text,#fff)!important;
  }
  html[data-oreumup-theme="dark"] body #hqtQuoteRoot input::placeholder {
    color:var(--oreumup-bell-subtext,#cbdad1)!important;
    opacity:.83;
  }
}
