.req-view { display: flex; flex-direction: column; gap: 20px; }

.req-header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.req-subtitle { color: var(--text-secondary); margin: -8px 0 0 0; font-size: 14px; }
.req-readonly-badge {
  background: rgba(125,133,144,0.2);
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.req-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.req-tab {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
  margin-bottom: -1px;
}
.req-tab:hover { color: var(--text-primary); }
.req-tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.req-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.req-form__title { margin: 0; font-size: 15px; font-weight: 600; }
.req-form__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 720px) { .req-form__grid { grid-template-columns: 1fr; } }
.req-form__field { display: flex; flex-direction: column; gap: 4px; }
.req-form__field--wide { grid-column: 1 / -1; }
.req-form__label { color: var(--text-secondary); font-size: 12px; }
.req-form__field input,
.req-form__field select,
.req-form__field textarea {
  background: var(--bg);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
}
.req-form__field textarea { resize: vertical; min-height: 56px; }
.req-form__actions { display: flex; justify-content: flex-end; }
.req-form__submit {
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.12s;
}
.req-form__submit:hover { opacity: 0.88; }

.req-queue { display: flex; flex-direction: column; gap: 12px; }
.req-queue__title { margin: 0; font-size: 14px; font-weight: 600; color: var(--text-secondary); }

/* Wrap the table so dense triage rows scroll horizontally on narrow viewports
   instead of crushing column widths to unreadable. */
.req-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.req-table { width: 100%; min-width: 880px; border-collapse: collapse; }
.req-table th, .req-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.req-table th {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.req-table tbody tr:hover { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.req-table code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--text-secondary);
}
.req-demand { font-weight: 600; font-size: 16px; }
.req-by { color: var(--text-secondary); font-size: 11px; }
.req-auto-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 3px;
  background: color-mix(in oklab, var(--accent) 18%, transparent);
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.req-note { max-width: 280px; font-size: 13px; }

.req-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.req-pill--open                  { background: rgba(187,128,9,0.20); color: #d29922; }
.req-pill--ordered               { background: rgba(46,160,67,0.20); color: #3fb950; }
.req-pill--fulfilled-by-transfer { background: rgba(56,139,253,0.20); color: #58a6ff; }
.req-pill--declined              { background: rgba(125,133,144,0.20); color: #8b949e; }
.req-pill--sampling              { background: rgba(219,109,40,0.20); color: #db6d28; }
.req-pill--considering           { background: rgba(187,128,9,0.20); color: #d29922; }
.req-pill--added                 { background: rgba(46,160,67,0.20); color: #3fb950; }

.req-triage { display: flex; flex-direction: column; gap: 6px; min-width: 240px; }
.req-triage__row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.req-triage__status,
.req-triage__note,
.req-triage__source,
.req-triage__qty {
  background: var(--bg);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font: inherit;
  font-size: 13px;
}
.req-triage__note { flex: 1; min-width: 120px; }
.req-triage__save {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 4px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s;
  white-space: nowrap;
}
.req-triage__save:hover { background: color-mix(in oklab, var(--accent) 12%, transparent); }
.req-triage__fulfill {
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent);
  border-radius: 6px;
  background: color-mix(in oklab, var(--accent) 6%, transparent);
}
.req-triage__sub { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.req-triage__sub > span {
  color: var(--text-secondary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.req-triage__qty { width: 70px; }
.req-transfer-link {
  display: inline-block;
  margin-top: 4px;
  color: var(--accent);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  text-decoration: none;
}
.req-transfer-link:hover { text-decoration: underline; }

.req-triage-locked {
  min-width: 200px;
}
.req-triage-locked__hint {
  color: var(--text-secondary);
  font-size: 12px;
  font-style: italic;
}

.req-empty {
  background-color: var(--surface);
  background-image: radial-gradient(circle, var(--dot-color) 2px, transparent 2px);
  background-size: 28px 28px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 32px 24px;
  color: var(--text-secondary);
  text-align: center;
  font-size: 14px;
}

.req-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
