/* V2 is scoped to its mount; legacy Bug layouts keep their existing styles. */
.request-workbench { --rq-muted: #536078; --rq-subtle: #f5f7fc; --rq-good: #14683b; color: #172033; font-size: 14px; line-height: 1.6; min-width: 0; }
.request-workbench h1, .request-workbench h2 { margin: 4px 0 8px; font-size: 22px; line-height: 1.4; }
.request-workbench h3 { margin: 22px 0 10px; font-size: 16px; }
.request-workbench h4 { margin: 0 0 7px; font-size: 14px; }
.request-workbench p { margin: 8px 0 12px; }
.request-workbench code { overflow-wrap: anywhere; font-size: 12px; }
.request-workbench button, .request-workbench input, .request-workbench select { min-height: 44px; }
.request-workbench button:disabled { cursor: not-allowed; color: #667085; border-color: #d6ddea; background: #edf0f6; box-shadow: none; }
.request-workbench label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: #354258; }
.request-workbench input:not([type=checkbox]), .request-workbench select, .request-workbench textarea { width: 100%; min-width: 0; border: 1px solid #bbc4d4; border-radius: 8px; padding: 10px 12px; background: #fff; color: #172033; font: inherit; font-weight: 400; }
.request-workbench textarea { resize: vertical; min-height: 100px; }
.request-workbench :is(button, a, input, select, textarea, summary, [tabindex]):focus-visible, .rq-confirm :focus-visible { outline: 3px solid #5265d3; outline-offset: 3px; }
.request-workbench a { color: #344bbb; text-decoration: underline; text-underline-offset: 3px; }
.request-workbench .page-intro { gap: 16px; }
.request-workbench .page-intro p { font-size: 13px; color: var(--rq-muted); }
.request-workbench .workspace-panel { padding: 20px; }
.rq-actions, .rq-action-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.rq-action { display: flex; flex-direction: column; gap: 5px; flex: 1 1 140px; }
.rq-action small { font-size: 12px; color: var(--rq-muted); }
.rq-grid { display: grid; grid-template-columns: minmax(250px, .75fr) minmax(0, 1.6fr); align-items: start; gap: 16px; }
.rq-list-panel { min-width: 0; }
.rq-list-panel .section-title h3 { margin: 0; }
.rq-list-panel > label { margin: 14px 0; }
.rq-list-item { display: grid; gap: 4px; width: 100%; padding: 14px 12px; text-align: left; border: 0; border-bottom: 1px solid #e3e8f1; border-radius: 0; background: transparent; font-size: 12px; color: var(--rq-muted); overflow-wrap: anywhere; }
.rq-list-item.selected { background: #eef1ff; box-shadow: inset 3px 0 #5265d3; }
.rq-list-item strong { font-size: 14px; color: #202d45; }
.rq-item-head { display: flex; flex-wrap: wrap; gap: 7px; align-items: flex-start; }
.rq-detail { min-width: 0; }
.rq-detail-heading { display: flex; flex-wrap: wrap; gap: 15px; justify-content: space-between; margin-bottom: 20px; }
.rq-detail-heading > div:first-child { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.rq-status-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.rq-badge { display: inline-block; color: #34456c; background: #edf1fa; padding: 3px 8px; border-radius: 5px; font-size: 12px; font-weight: 600; line-height: 1.6; }
.rq-badge.warning { color: #804d03; background: #fff0d1; }
.rq-badge.success { color: var(--rq-good); background: #e5f4eb; }
.rq-tabs { display: flex; gap: 3px; margin-bottom: 22px; border-bottom: 1px solid #d9e0ed; overflow: auto; }
.rq-tabs button { flex: 1 0 auto; border: 0; border-radius: 0; padding: 12px 10px; font-size: 13px; background: transparent; color: var(--rq-muted); }
.rq-tabs button[aria-selected=true] { color: #344bbb; box-shadow: inset 0 -3px #5265d3; font-weight: 700; }
.rq-notice { background: #eef2ff; color: #304576; padding: 12px 14px; border: 1px solid #dce3fa; border-radius: 8px; overflow-wrap: anywhere; }
.rq-notice.warning { background: #fff6e5; border-color: #f1d8a5; color: #704304; }
.rq-notice.success { background: #edf8f1; border-color: #c6e2d2; color: #14683b; }
.rq-help, .rq-empty { color: var(--rq-muted); font-size: 13px; }
.rq-empty { padding: 24px 4px; }
.rq-prose { white-space: pre-wrap; overflow-wrap: anywhere; }
/* Keep approval decisions prominent; retain complete immutable IDs for audit and reconciliation. */
.rq-delivery-technical { margin: 14px 0; padding: 0 14px; border: 1px solid #dce3ef; border-radius: 8px; background: #fff; }
.rq-delivery-technical > summary { min-height: 44px; padding: 10px 0; cursor: pointer; color: #344bbb; font-weight: 600; }
.rq-delivery-technical .rq-facts { margin: 8px 0 14px; }
.rq-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.rq-facts > div { min-width: 0; background: var(--rq-subtle); border-radius: 6px; padding: 10px 12px; }
.rq-facts dt { color: var(--rq-muted); font-size: 12px; }
.rq-facts dd { margin: 4px 0 0; font-size: 13px; overflow-wrap: anywhere; white-space: pre-wrap; }
.rq-node-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rq-node { min-width: 0; padding: 13px; border: 1px solid #e0e5ef; border-radius: 8px; overflow-wrap: anywhere; }
.rq-node p, .rq-node ul { font-size: 12px; color: var(--rq-muted); }
.rq-node ul { padding-left: 15px; }
.rq-form-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin: 18px 0; }
.rq-wide { grid-column: 1 / -1; }
#rq-create { margin-bottom: 20px; }
.request-workbench .rq-checkbox { display: flex; gap: 9px; align-items: flex-start; margin: 16px 0; font-weight: 400; }
.rq-checkbox input { min-height: 24px; width: 20px; height: 24px; margin: 0; flex: 0 0 20px; }
.rq-checks { list-style: none; padding: 0; display: grid; gap: 10px; }
.rq-checks li { padding: 10px 12px; border: 1px solid #e3e8f1; border-radius: 6px; overflow-wrap: anywhere; }
.rq-checks p { color: var(--rq-muted); font-size: 13px; margin-bottom: 0; }
.rq-artifacts { display: grid; gap: 14px; }
.rq-artifact { padding: 14px; border: 1px solid #dce3ef; border-radius: 8px; min-width: 0; }
.rq-artifact > p { color: var(--rq-muted); font-size: 12px; }
.rq-artifact > code { display: block; margin-bottom: 12px; }
.rq-artifact img { display: block; width: 100%; height: auto; max-height: 360px; object-fit: contain; border: 1px solid #dce3ef; margin: 10px 0; background: #f5f7fc; }
.rq-artifact-body pre { overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: #f5f7fc; max-height: 320px; padding: 12px; font-size: 12px; border-radius: 6px; }
.rq-artifact-body > a { display: block; padding: 6px 0; }
.rq-environment { margin-top: 20px; }
.rq-profiles { margin-top: 20px; }
.request-workbench summary { cursor: pointer; padding: 8px 0; font-weight: 600; }
.rq-profile-form { padding: 14px 0; border-top: 1px solid #e3e8f1; }
.rq-profile-form fieldset { border: 1px solid #dce3ef; border-radius: 8px; margin: 16px 0; padding: 16px; min-width: 0; }
.rq-profile-node { display: grid; grid-template-columns: 140px minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: center; margin: 12px 0; }
.rq-profile-node label:last-of-type { grid-column: 2 / -1; }
.rq-profile-node p { grid-column: 2 / -1; margin-top: 0; }
.rq-confirm { max-width: 640px; width: calc(100% - 32px); border: 1px solid #d6ddea; border-radius: 12px; padding: 24px; color: #172033; box-shadow: 0 20px 60px #111a3530; }
.rq-confirm::backdrop { background: #111a3570; }
.rq-confirm p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }
.rq-confirm button { min-height: 44px; }
#rq-patch-content { max-width: 100%; min-width: 0; }
#rq-patch-content .diff-view { max-width: 100%; overflow: auto; }
@media (max-width: 1180px) { .rq-grid { grid-template-columns: minmax(210px, .7fr) minmax(0, 1.5fr); } .rq-node-grid { grid-template-columns: 1fr; } }
@media (max-width: 980px) { .rq-grid { grid-template-columns: 1fr; } #rq-list { max-height: 320px; overflow: auto; } .rq-node-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .request-workbench .page-intro { flex-direction: column; align-items: stretch; } .request-workbench .workspace-panel { padding: 16px; } .rq-node-grid, .rq-form-grid, .rq-facts { grid-template-columns: 1fr; } .rq-profile-node { grid-template-columns: 1fr; } .rq-profile-node p { grid-column: auto; } .rq-wide { grid-column: auto; } .rq-actions { align-items: stretch; } .rq-actions button { flex: 1 1 auto; } .rq-detail-heading h2 { font-size: 20px; } }

.rq-pagination { display: flex; justify-content: space-between; gap: 8px; padding-top: 14px; }
@media (max-width: 720px) { .rq-profile-node label:last-of-type { grid-column: auto; } }

/* Evidence remains complete; native disclosure controls keep long success reports scannable. */
.rq-check-counts { font-weight: 600; color: #354258; }
.rq-passed-checks { margin-bottom: 16px; padding: 8px 12px; border: 1px solid #dce3ef; border-radius: 8px; }
.rq-failed-checks .rq-checks li { border-color: #e7bd78; background: #fff9ee; }
.rq-check-detail summary { overflow-wrap: anywhere; }
.rq-artifact-body .rq-log-preview { max-height: 96px; margin-bottom: 8px; }
.rq-log-details { border-top: 1px solid #e3e8f1; margin-top: 8px; }
.rq-log-content { max-height: 240px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: #f5f7fc; padding: 12px; border-radius: 6px; font: 12px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; }

#rq-bug-selection { margin: 16px 0; padding: 14px; border: 1px solid #dce3ef; border-radius: 8px; background: #f5f7fc; }
.request-workbench input[readonly], .request-workbench textarea[readonly] { background: #f5f7fc; color: #536078; }
.legacy-workflow-note { padding: 12px 14px; border: 1px solid #dce3ef; border-radius: 8px; background: #f5f7fc; color: #536078; font-size: 12px; line-height: 1.7; }

/* Editing remains in the current request; polling never replaces session drafts. */
.rq-editor { margin: 18px 0; padding: 18px; border: 1px solid #bccbe2; border-radius: 8px; background: #f8faff; }
.rq-editor pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.rq-editor h3 { scroll-margin-top: 24px; }
.rq-history { border-top: 1px solid #dce3ef; margin: 16px 0; }
.rq-history p { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (max-width: 720px) { .rq-editor { padding: 12px; } .rq-editor .rq-actions { flex-wrap: wrap; } }
.rq-node-provenance { display: grid; gap: 8px; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid #e0e5ef; }
.rq-node-provenance dt { color: var(--rq-muted); font-size: 12px; }
.rq-node-provenance dd { margin: 2px 0 0; font-size: 12px; overflow-wrap: anywhere; }
/* Keep the selected review tab visible at 390px instead of off-screen in a scroller. */
@media (max-width: 720px) {
  .rq-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .rq-tabs button { min-width: 0; white-space: normal; }
}
.rq-bug-context, .rq-bug-context-form { margin: 16px 0; padding: 14px; border: 1px solid #e7bd78; border-radius: 8px; background: #fffaf0; }
.rq-bug-context-form { display: grid; gap: 10px; }
.rq-bug-context-form h4, .rq-bug-context h4 { margin: 0; }

/* Discovery controls share the existing form and panel design. */
.rq-list-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.rq-list-filters label, #rq-bug-selection label { min-width: 0; }
.rq-list-filters select, #rq-bug-id { width: 100%; min-width: 0; max-width: 100%; }
#rq-bug-selection { display: grid; gap: 12px; }
#rq-bug-selection[hidden] { display: none; }
#rq-bug-status { margin: 0; }
.rq-empty strong { display: block; color: var(--rq-text, #202d45); }
.rq-empty .rq-actions { justify-content: center; }
#rq-setup p { margin: 8px 0 12px; }
@media (max-width: 420px) { .rq-list-filters { grid-template-columns: 1fr; } }

.rq-form-grid[hidden], .rq-bug-context-form[hidden] { display: none; }

#rq-repository-catalog { margin: 14px 0; }
#rq-repository-catalog > summary { cursor: pointer; font-weight: 650; }
.rq-repository-catalog { display: grid; gap: 8px; padding-left: 20px; margin: 14px 0; overflow-wrap: anywhere; }
.rq-repository-catalog li { line-height: 1.5; }

/* Current ownership is a read projection, independent of approval controls. */
.rq-progress-summary { display:flex; flex-wrap:wrap; align-items:center; gap:10px 18px; padding:14px 16px; margin:16px 0; border:1px solid var(--border, #dce2ed); border-radius:10px; background:#f4f7fc; }
.rq-progress-summary span { color:#536177; font-size:12px; }
.rq-progress-summary button { margin-left:auto; }
.rq-progress-summary.warning { border-color:#c88026; background:#fff8e9; }
.rq-progress-section { margin-block:20px; }
.rq-progress-section dd { overflow-wrap:anywhere; }
.rq-progress-events { list-style:none; padding:0; margin:16px 0; }
.rq-progress-events li { display:grid; grid-template-columns:120px minmax(0,1fr); gap:14px; padding:14px 0; border-bottom:1px solid #e3e7ee; }
.rq-progress-events time { font-size:12px; color:#637188; }
.rq-progress-events small,.rq-progress-events code { display:block; margin-top:5px; overflow-wrap:anywhere; color:#637188; }
.rq-linked-requests li { margin-top:8px; }
.rq-linked-requests span { display:block; font-size:12px; margin-top:4px; }
@media(max-width:600px) { .rq-progress-events li { grid-template-columns:1fr; gap:4px; } .rq-progress-summary button { margin-left:0; } }
