/* One page, one vertical scroll area; details replace the current workspace. */
#run-workspace-root { position: fixed; inset: 0; z-index: 150; background: #f6f8fc; display: flex; flex-direction: column; color: var(--text, #243047); font-size: 14px; }
.rw-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 32px 16px; background: #fff; flex-shrink: 0; }
.rw-breadcrumb { font-size: 12px; color: #697a93; margin-bottom: 5px; letter-spacing: .03em; }
.rw-heading h1 { font-size: 23px; margin: 0; line-height: 1.5; outline: none; }
.rw-heading h1 span { font-weight: 400; color: #6c7c92; font-size: 19px; }
.rw-heading p { margin: 6px 0 0; color: #6b7890; font-size: 12px; }
.rw-header-actions, .rw-footer-actions { display: flex; gap: 10px; align-items: center; }
.rw-user { color: #66768d; font-size: 13px; }
.rw-tabs { display: flex; gap: 26px; align-items: center; background: #fff; padding: 0 32px; border-bottom: 1px solid #dfe6f1; flex-shrink: 0; }
.rw-tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 13px 2px 12px; background: transparent; color: #66748b; font-size: 14px; cursor: pointer; white-space: nowrap; }
.rw-tabs button.active { color: #245df3; border-bottom-color: #245df3; font-weight: 600; }
.rw-tabs button span { padding: 2px 6px; margin-left: 4px; background: #edf2fb; border-radius: 6px; font-size: 11px; }
.rw-tabs button { flex-shrink: 0; }
.rw-tabs-note { margin-left: auto; color: #8290a4; font-size: 12px; }
.rw-scroll { overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 1; padding: 24px 32px; scroll-padding-top: 16px; }
.rw-scroll:focus { outline: none; }
.rw-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; background: white; border: 1px solid #e1e7f0; border-radius: 9px; }
.rw-tools label { font-weight: 600; }
.rw-tools input { width: min(400px, 50vw); min-height: 36px; margin: 0; border: 1px solid #d7dfeb; border-radius: 6px; padding: 8px 12px; font: inherit; }
.rw-tools button { margin-left: auto; }
.rw-rule { color: #718098; font-size: 12px; line-height: 1.8; margin: 12px 2px 18px; }
.rw-text-button { border: 0; padding: 0 6px; background: transparent; color: #245df3; font-size: inherit; cursor: pointer; }
.rw-footer { flex-shrink: 0; padding: 14px 32px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid #dfe6f1; background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; box-shadow: 0 -4px 20px #233d6a05; }
.rw-footer .writeback-inline-error:empty { display: none; }
.rw-footer .writeback-inline-error { width: 100%; margin: 0; }
.rw-scroll .table-wrap { background: #fff; border: 1px solid #e1e7f0; border-radius: 8px; }
.rw-scroll .compare-table { min-width: 1600px; font-size: 13px; }
.rw-scroll .compare-table th { background: #f1f5fa; font-size: 12px; }
.rw-scroll .compare-table td, .rw-scroll .compare-table th { padding: 14px 12px; }
.rw-scroll .compare-table .col-select { width: 146px; }
.rw-scroll .compare-table .col-material { width: 210px; }
.rw-scroll .compare-table .col-select, .rw-scroll .compare-table .col-code { position: sticky; left: 0; z-index: 2; background: #fff; }
.rw-scroll .compare-table .col-code { left: 146px; box-shadow: 3px 0 5px #153d7408; }
.rw-scroll .compare-table th.col-select, .rw-scroll .compare-table th.col-code { background: #f1f5fa; }
.rw-scroll .compare-table tr.writeback-selected td { background: #eef4ff; }
.rw-scroll .writeback-row-check { font-size: 12px; line-height: 1.6; }
.rw-scroll .writeback-bill-reason { margin-top: 6px; }
.rw-scroll .pager { padding: 12px 0; }
.rw-hit-table { width: 100%; min-width: 900px; table-layout: fixed; font-size: 13px; }
.rw-hit-table th, .rw-hit-table td { padding: 16px 12px; vertical-align: top; white-space: normal; overflow-wrap: anywhere; }
.rw-hit-table th.num { text-align: right; }
.rw-hit-table td { line-height: 24px; font-variant-numeric: tabular-nums; }
.rw-hit-table .copyable-value { vertical-align: top; }
.rw-hit-table th { background: #f1f5fa; font-size: 12px; }.rw-hit-table th.rw-select { width: 145px; }.rw-hit-table th.rw-material { width: 25%; }.rw-hit-table th.col-doc { width: 150px; }
.rw-hit-table .writeback-row-check { display: flex; max-width: 100%; min-width: 0; align-items: flex-start; font-size: 12px; line-height: 24px; }
.rw-hit-table .writeback-row-check input { margin-top: 3px; }
.rw-hit-table .writeback-row-check span { min-width: 0; overflow-wrap: anywhere; }
.rw-hit-table tr.writeback-selected td { background: #eef4ff; }
.rw-shortage-table .rw-shortage-quantity { color: #b54708; }
.rw-shortage-table .rw-shortage-quantity b { font-size: inherit; }
.rw-shortage-table td > div:first-child { margin-top: 0; }
.rw-hit-table td > div { margin-top: 4px; line-height: 24px; }.rw-hit-table .rw-proposed { color: #245df3; }.rw-hit-table .rw-proposed b { font-size: inherit; }.rw-hit-detail { font-size: 11px; padding: 0; margin-top: 4px; line-height: 24px; text-align: left; }
.rw-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 22px; }
.rw-section-heading h2 { margin: 0 0 6px; font-size: 20px; }
.rw-section-heading p { margin: 0; }
.rw-empty { padding: 64px 20px; text-align: center; color: #7e8ba1; background: #fff; border: 1px dashed #d4ddea; border-radius: 10px; }
.rw-record-list { display: grid; gap: 12px; }
.rw-record { width: 100%; display: flex; align-items: center; justify-content: space-between; text-align: left; gap: 24px; padding: 22px; border: 1px solid #dfe5ee; border-radius: 9px; background: white; color: inherit; cursor: pointer; font: inherit; }
.rw-record:hover { border-color: #a3bbf6; background: #fafcff; }
.rw-record strong { margin-right: 10px; }.rw-record p { color: #7c899b; margin: 9px 0 0; font-size: 12px; }.rw-link { color: #245df3; white-space: nowrap; }
.rw-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.rw-facts section, .rw-basis-rules { background: #fff; border: 1px solid #e0e6ee; border-radius: 9px; padding: 20px; }
.rw-facts h3, .rw-basis-rules h3 { font-size: 14px; margin: 0 0 12px; }.rw-facts p, .rw-basis-rules p { color: #66758b; line-height: 1.8; margin: 8px 0; }
.rw-basis-rules { margin-top: 24px; }
#rw-writeback .writeback-modal { width: 100%; max-width: none; max-height: none; height: auto; background: transparent; border: none; border-radius: 0; box-shadow: none; display: block; }
#rw-writeback .writeback-modal-head { padding: 0 0 18px; border: 0; }
#rw-writeback .writeback-modal-body { padding: 0; overflow: visible; }
#rw-writeback .writeback-modal-head > button { display: none; }
#rw-footer:has(.writeback-modal-foot) { padding: 0; display: block; }
#rw-footer .writeback-modal-foot { border: none; background: white; padding: 14px 32px max(14px, env(safe-area-inset-bottom)); }
#rw-footer .writeback-acknowledgment { margin-bottom: 12px; }
#run-workspace-root button:focus-visible, #run-workspace-root input:focus-visible { outline: 3px solid #96b3fb; outline-offset: 2px; }
@media (min-width: 641px) and (max-width: 760px) { #run-workspace-root .rw-hit-table { min-width: 960px; } }
@media (max-width: 760px) {
  .rw-header { padding: 14px 16px; gap: 12px; align-items: flex-start; }.rw-heading h1 { font-size: 18px; }.rw-heading h1 span { font-size: 15px; }.rw-heading p { line-height: 1.6; font-size: 11px; }.rw-user { display: none; }.rw-header-actions button { padding: 8px 10px; white-space: nowrap; width: auto; }
  .rw-tabs { padding: 0 16px; gap: 16px; overflow-x: auto; min-height: 46px; }.rw-tabs-note { display: none; }.rw-tabs button { width: auto; min-height: 42px; }.rw-scroll { padding: 16px; }.rw-tools { gap: 8px; }.rw-tools label { width: 100%; }.rw-tools input { width: 100%; }.rw-tools button { margin-left: auto; width: auto; }.rw-rule { line-height: 1.9; }
  .rw-footer { padding: 12px 16px max(12px, env(safe-area-inset-bottom)); gap: 10px; }.rw-footer > #writeback-selection-count { font-size: 12px; }.rw-footer-actions { width: 100%; gap: 6px; }.rw-footer-actions button { font-size: 12px; padding: 9px 10px; width: auto; }.rw-footer-actions .primary { margin-left: auto; }
  .rw-scroll .compare-table { min-width: 0; font-size: 13px; }.rw-scroll .compare-table td, .rw-scroll .compare-table th { position: static; width: auto; padding: 6px 0; box-shadow: none; }.rw-scroll .compare-table .col-code { position: static; }.rw-scroll .compare-table .col-select { position: static; width: 100%; }.rw-scroll .compare-table tbody tr { padding: 16px; background: white; }.rw-scroll .compare-table tr.writeback-selected { background: #eef4ff; }.rw-scroll .compare-table td { background: transparent !important; }
  .rw-facts { grid-template-columns: 1fr; }.rw-section-heading { align-items: flex-start; }.rw-section-heading button { width: auto; flex-shrink: 0; }.rw-record { gap: 10px; padding: 16px; flex-wrap: wrap; }.rw-record > div { width: 100%; }.rw-link { margin-left: auto; }
  .rw-hit-table { min-width: 0; }.rw-hit-table th, .rw-hit-table td { width: auto; padding: 6px 0; }.rw-hit-table tbody tr { padding: 16px; background: #fff; }.rw-hit-table tr.writeback-selected { background: #eef4ff; }.rw-hit-table tr.writeback-selected td { background: transparent; }
  #rw-footer .writeback-modal-foot { padding: 12px 16px max(12px, env(safe-area-inset-bottom)); }#rw-footer .writeback-acknowledgment { font-size: 12px; line-height: 1.6; }#rw-footer .writeback-footer-actions { flex-wrap: wrap; gap: 8px; }#rw-footer .writeback-footer-actions > .muted { flex: 1 0 100%; }#rw-footer .writeback-footer-actions button { width: auto; flex: 1; }
}
