.rq-workspace { max-width: 1800px; padding: 28px 32px 40px; }
.rq-page-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.rq-page-heading h1 { font-size: 24px; font-weight: 600; margin: 3px 0 6px; }
.rq-page-heading p:not(.rq-eyebrow) { color: #64748b; font-size: 13px; }
.rq-eyebrow { color: #7c3aed; font-size: 12px; font-weight: 600; }
.rq-view-label { color: #6d28d9; background: #f5f3ff; border: 1px solid #ddd6fe; border-radius: 8px; padding: 8px 12px; font-size: 12px; white-space: nowrap; }
.rq-list-panel { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 24px #0f172a04; }
.rq-filterbar, .rq-table-toolbar, .rq-table-options, .rq-pagination, .rq-pagination > div { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rq-filterbar { padding: 18px 20px; border-bottom: 1px solid #e2e8f0; }
.rq-filterbar input[type=search], .rq-list-panel select, .rq-status-dialog select, .rq-status-dialog textarea { border: 1px solid #dbe1ea; border-radius: 8px; padding: 8px 10px; background: #fff; font: inherit; font-size: 13px; color: #334155; }
.rq-search { flex: 1; min-width: 220px; }
.rq-search input { width: 100%; }
.rq-mine { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #475569; white-space: nowrap; }
.rq-mine input { accent-color: #7c3aed; }
.rq-button { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 7px 12px; font: inherit; font-size: 12px; color: #475569; cursor: pointer; white-space: nowrap; }
.rq-button:hover:not(:disabled) { border-color: #c4b5fd; color: #6d28d9; background: #faf8ff; }
.rq-button:disabled { opacity: .4; cursor: not-allowed; }
.rq-table-toolbar { justify-content: space-between; padding: 12px 20px; font-size: 12px; color: #64748b; }
.rq-table-toolbar > p { color: #334155; font-weight: 600; }
.rq-table-options label { display: flex; align-items: center; gap: 6px; }
.rq-table-options select { padding: 5px 8px; font-size: 12px; }
.rq-table-scroll { overflow: auto; max-height: 66vh; border-top: 1px solid #e2e8f0; }
.rq-table { width: 100%; min-width: 1360px; border-collapse: separate; border-spacing: 0; text-align: left; font-family: var(--wms-font-body); font-size: 12px; }
.rq-table th { position: sticky; top: 0; z-index: 2; background: #f8fafc; color: #64748b; font-weight: 600; padding: 13px 16px; white-space: nowrap; border-bottom: 1px solid #e2e8f0; }
.rq-table td { padding: 15px 16px; vertical-align: middle; border-bottom: 1px solid #f1f5f9; background: #fff; }
.rq-table tbody tr[data-request-id]:hover td { background: #faf9ff; }
.rq-table .rq-action-col { position: sticky; right: 0; border-left: 1px solid #f1f5f9; text-align: center; }
.rq-table th.rq-action-col { z-index: 3; }
.rq-title-cell { min-width: 270px; max-width: 370px; }
.rq-link { border: 0; padding: 0; background: none; color: #6d28d9; cursor: pointer; font: inherit; text-align: left; }
.rq-link:hover { text-decoration: underline; }
.rq-request-number { font-family: var(--wms-font-mono); font-size: 12px; white-space: nowrap; }
.rq-title-link { color: #1e293b; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.rq-subline { color: #94a3b8; font-size: 12px; margin-top: 5px; overflow-wrap: anywhere; }
.rq-table .rq-status-select { min-width: 142px; max-width: 168px; font-size: 12px; font-weight: 600; cursor: pointer; border-radius: 20px; padding: 6px 10px; }
.rq-table .rq-status-select.st-ใหม่ { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.rq-table .rq-status-select.st-รับเรื่องแล้ว { background: #ecfeff; color: #0e7490; border-color: #a5f3fc; }
.rq-table .rq-status-select.st-กำลังพิจารณา { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.rq-table .rq-status-select.st-กำลังพัฒนา { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }
.rq-table .rq-status-select.st-เสร็จสิ้น { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.rq-table .rq-status-select.st-ไม่อนุมัติ { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
.rq-table .rq-status-select.st-ยกเลิก { background: #f8fafc; color: #64748b; border-color: #e2e8f0; }
.rq-person { max-width: 160px; min-width: 100px; overflow-wrap: anywhere; }
.rq-date { white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 12px; }
.rq-attachments { white-space: nowrap; color: #64748b; }
.rq-urgent { color: #be123c; margin-left: 6px; font-size: 12px; white-space: nowrap; }
.rq-table .rq-group td { padding: 0; background: #fafaff; border-bottom: 1px solid #ede9fe; }
.rq-group-toggle { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 18px; border: 0; background: none; font: inherit; color: #475569; cursor: pointer; text-align: left; }
.rq-group-count { font-size: 12px; color: #7c3aed; background: #ede9fe; border-radius: 12px; padding: 1px 7px; }
.rq-list-message { padding: 30px 20px; text-align: center; color: #64748b; font-size: 13px; }
.rq-pagination { padding: 14px 20px; justify-content: space-between; border-top: 1px solid #e2e8f0; color: #64748b; font-size: 12px; }
.rq-pagination select { padding: 4px 7px; }
.rq-pagination > div { gap: 8px; }
.rq-error { color: #be123c; font-size: 13px; }
.rq-muted { color: #64748b; font-size: 12px; }
.rq-status-overlay { position: fixed; inset: 0; z-index: 65; display: flex; align-items: center; justify-content: center; background: #0f172a80; padding: 20px; }
.rq-status-dialog { width: 100%; max-width: 480px; max-height: 90vh; overflow: auto; border-radius: 18px; background: #fff; box-shadow: 0 24px 80px #0f172a33; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.rq-dialog-heading, .rq-dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rq-dialog-heading h2 { font-size: 18px; font-weight: 600; }
.rq-status-request { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.rq-status-dialog label { font-size: 13px; font-weight: 500; }
.rq-dialog-actions { justify-content: flex-end; padding-top: 8px; }
.rq-button.rq-button-primary { background: #7c3aed; color: white; border-color: #7c3aed; }
.rq-button.rq-button-primary:hover:not(:disabled) { background: #6d28d9; color: white; }
.rq-detail-tabs { display: flex; gap: 18px; border-bottom: 1px solid #e2e8f0; margin-bottom: 16px; }
.rq-detail-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 0; color: #64748b; font: inherit; font-size: 13px; cursor: pointer; }
.rq-detail-tabs button[aria-selected=true] { border-color: #7c3aed; color: #6d28d9; font-weight: 600; }
#detail-history-count { background: #ede9fe; border-radius: 10px; padding: 1px 6px; font-size: 12px; }
.rq-history { list-style: none; padding: 8px 0; margin: 8px 0 0 6px; max-height: 360px; overflow: auto; }
.rq-history li { position: relative; margin-left: 6px; padding: 0 12px 22px 20px; border-left: 2px solid #ede9fe; }
.rq-history li::before { content: ''; position: absolute; top: 5px; left: -5px; width: 8px; height: 8px; border-radius: 50%; background: #a78bfa; }
.rq-history li:first-child::before { background: #7c3aed; box-shadow: 0 0 0 3px #ede9fe; }
.rq-history li p { font-size: 13px; color: #334155; white-space: pre-wrap; overflow-wrap: anywhere; }
.rq-history li small { display: block; color: #94a3b8; font-size: 12px; margin-top: 5px; }
.rq-workspace :focus-visible, .rq-status-overlay :focus-visible, .rq-detail-tabs :focus-visible { outline: 2px solid #8b5cf6; outline-offset: 3px; }
@media (max-width: 700px) {
  .rq-workspace { padding: 20px 12px 28px; }
  .rq-page-heading h1 { font-size: 19px; }
  .rq-view-label { display: none; }
  .rq-filterbar, .rq-table-toolbar { padding: 12px; gap: 10px; }
  .rq-search { flex-basis: 100%; min-width: 0; }
  .rq-table-options { gap: 8px; }
  .rq-table-scroll { max-height: 62vh; }
  .rq-pagination { padding: 12px; }
  .rq-table .rq-action-col { position: static; }
  .rq-status-dialog { padding: 20px; }
}
