/* Procurement module: compact ERP tables, clearer forms and authenticated photo viewing. */
#purchaseRequisitions, .pr-dialog { --pr-border:#e4e7ec; --pr-muted:#667085; --pr-blue:#1677ff; color:#344054; }
#purchaseRequisitions .pr-shell { padding:16px; border:1px solid var(--pr-border); border-radius:4px; background:#fff; }
#purchaseRequisitions .pr-heading, .pr-dialog .pr-detail-heading, .pr-dialog .pr-section-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 12px; }
#purchaseRequisitions .pr-heading strong { font-size:15px; }
#purchaseRequisitions .pr-heading small { display:block; margin-top:4px; font-size:12px; color:var(--pr-muted); }
#purchaseRequisitions .pr-actions, .pr-dialog .pr-actions { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
#purchaseRequisitions button, .pr-dialog button { min-height:30px; padding:6px 10px; font-size:12px; border-radius:4px; white-space:nowrap; }
#purchaseRequisitions button:disabled, .pr-dialog button:disabled { opacity:.45; cursor:not-allowed; }
#purchaseRequisitions .pr-tabs { display:flex; flex-wrap:wrap; gap:0; margin-bottom:12px; border-bottom:1px solid var(--pr-border); }
#purchaseRequisitions .pr-tabs button { border-radius:0; padding:9px 14px; background:transparent; color:#667085; border-bottom:2px solid transparent; }
#purchaseRequisitions .pr-tabs button.active { color:var(--pr-blue); border-bottom-color:var(--pr-blue); font-weight:600; }
#purchaseRequisitions .pr-tabs button:hover { background:#f8fbff; color:var(--pr-blue); }
#purchaseRequisitions .pr-filter { display:flex; align-items:flex-end; flex-wrap:wrap; gap:10px; padding:12px; margin-bottom:14px; border:1px solid #eef2f6; border-radius:4px; background:#fafbfc; }
#purchaseRequisitions .pr-filter > label { display:flex; flex-direction:column; flex:0 1 160px; min-width:130px; font-size:12px; gap:6px; }
#purchaseRequisitions .pr-filter > .pr-keyword { flex:1 1 260px; max-width:440px; }
#purchaseRequisitions .pr-filter .pr-actions { flex:0 0 auto; }
#purchaseRequisitions input, #purchaseRequisitions select, .pr-dialog input, .pr-dialog textarea { min-width:0; width:100%; border:1px solid #d0d5dd; border-radius:4px; background:#fff; color:#344054; padding:6px 8px; min-height:32px; font:inherit; font-size:13px; }
.pr-dialog textarea { resize:vertical; line-height:1.6; }
#purchaseRequisitions input:focus-visible, #purchaseRequisitions select:focus-visible, #purchaseRequisitions button:focus-visible, .pr-dialog input:focus-visible, .pr-dialog textarea:focus-visible, .pr-dialog button:focus-visible, .pr-dialog summary:focus-visible { outline:2px solid var(--pr-blue); outline-offset:2px; }
#purchaseRequisitions .pr-table-wrap, .pr-dialog .pr-table-wrap { width:100%; overflow:auto; border:1px solid var(--pr-border); border-radius:3px; }
#purchaseRequisitions .pr-table, .pr-dialog .pr-table { width:100%; margin:0; border-collapse:collapse; border-spacing:0; background:#fff; }
#purchaseRequisitions .pr-table th, .pr-dialog .pr-table th { padding:9px 10px; text-align:left; background:#f8fafc; border-bottom:1px solid var(--pr-border); color:#475467; font-size:12px; white-space:nowrap; }
#purchaseRequisitions .pr-table td, .pr-dialog .pr-table td { padding:8px 10px; vertical-align:middle; border-bottom:1px solid #eef2f6; font-size:13px; }
#purchaseRequisitions .pr-table tr:last-child td, .pr-dialog .pr-table tr:last-child td { border-bottom:0; }
#purchaseRequisitions .pr-table tbody tr:hover td, .pr-dialog .pr-table tbody tr:hover td { background:#fbfcff; }
#purchaseRequisitions .pr-list-table { min-width:860px; table-layout:fixed; }
#purchaseRequisitions .pr-col-bill { width:215px; }
#purchaseRequisitions .pr-col-applicant { width:120px; }
#purchaseRequisitions .pr-col-items { width:100px; }
#purchaseRequisitions .pr-col-status { width:165px; }
#purchaseRequisitions .pr-col-action { width:100px; }
#purchaseRequisitions .pr-applicant { overflow-wrap:anywhere; }
#purchaseRequisitions .pr-purpose-preview { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; line-height:1.7; }
#purchaseRequisitions .pr-list-table .pr-status-cell { white-space:normal; }
#purchaseRequisitions .pr-photo-count { color:#175cd3 !important; }
#purchaseRequisitions .pr-table small, .pr-dialog .pr-table small { display:block; margin-top:3px; color:var(--pr-muted); font-size:11px; line-height:1.5; }
#purchaseRequisitions .pr-number, .pr-dialog .pr-number { text-align:right !important; white-space:nowrap; font-variant-numeric:tabular-nums; }
#purchaseRequisitions .pr-purpose, .pr-dialog .pr-wrap { min-width:130px; max-width:290px; white-space:normal; overflow-wrap:anywhere; }
#purchaseRequisitions .pr-link { padding:0; min-height:0; background:transparent; color:#175cd3; text-align:left; font-size:13px; font-weight:600; }
#purchaseRequisitions .pr-link:hover { text-decoration:underline; background:transparent; }
#purchaseRequisitions .pr-badge, .pr-dialog .pr-badge { display:inline-block; padding:3px 6px; margin:0 5px 3px 0; border-radius:3px; background:#f2f4f7; color:#475467; font-size:11px; line-height:1.5; white-space:nowrap; }
#purchaseRequisitions .pr-pending_director, #purchaseRequisitions .pr-pending_admin, .pr-dialog .pr-pending_director, .pr-dialog .pr-pending_admin { background:#eff8ff; color:#175cd3; }
#purchaseRequisitions .pr-approved, #purchaseRequisitions .pr-arrived, .pr-dialog .pr-approved, .pr-dialog .pr-arrived { background:#ecfdf3; color:#067647; }
#purchaseRequisitions .pr-rejected, .pr-dialog .pr-rejected { background:#fff1f0; color:#b42318; }
#purchaseRequisitions .pr-partial_purchased, #purchaseRequisitions .pr-partial_arrived, .pr-dialog .pr-partial_purchased, .pr-dialog .pr-partial_arrived { background:#fffaeb; color:#93370d; }
#purchaseRequisitions .pr-pager { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:7px; margin-top:10px; color:var(--pr-muted); font-size:12px; }
#purchaseRequisitions .pr-muted, .pr-dialog .pr-muted { color:var(--pr-muted); font-size:12px; line-height:1.7; }
#purchaseRequisitions .pr-empty, .pr-dialog .pr-empty { padding:30px 12px !important; text-align:center !important; color:var(--pr-muted); font-size:13px; }
#purchaseRequisitions .pr-error, .pr-dialog .pr-error { margin:0 0 12px; padding:10px 12px; border:1px solid #fecdca; border-radius:4px; background:#fff8f7; color:#b42318; font-size:13px; line-height:1.7; overflow-wrap:anywhere; }
#purchaseRequisitions .pr-uncertain, .pr-dialog .pr-uncertain { margin:0 0 12px; padding:10px 12px; border:1px solid #fedf89; border-radius:4px; background:#fffcf5; color:#93370d; font-size:13px; line-height:1.7; }
#purchaseRequisitions .pr-uncertain p, .pr-dialog .pr-uncertain p { margin:4px 0 8px; }
#purchaseRequisitions .pr-request-key, .pr-dialog .pr-request-key { display:block; font-size:11px; overflow-wrap:anywhere; }
.pr-dialog { width:min(1160px,calc(100vw - 40px)); max-width:none; max-height:calc(100vh - 40px); padding:0; border:1px solid #d0d5dd; border-radius:7px; box-shadow:0 20px 60px rgba(16,24,40,.22); }
.pr-dialog::backdrop { background:rgba(16,24,40,.45); }
.pr-dialog.pr-dialog-fallback { position:fixed; inset:20px; z-index:150; margin:auto; display:block; }
.pr-dialog .pr-dialog-shell { padding:18px 20px; }
.pr-dialog [hidden] { display:none !important; }
.pr-dialog .pr-dialog-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-bottom:10px; margin-bottom:12px; border-bottom:1px solid var(--pr-border); }
.pr-dialog .pr-dialog-head h3 { margin:0; font-size:16px; }
.pr-dialog h4 { margin:0 0 8px; font-size:15px; }
.pr-dialog .pr-detail-heading h4 { margin:0 0 5px; font-size:18px; }
.pr-dialog .pr-facts { display:flex; flex-wrap:wrap; gap:0; margin:0 0 10px; padding:9px 0; border:1px solid var(--pr-border); border-radius:3px; background:#fafbfc; }
.pr-dialog .pr-facts > div { flex:1 1 190px; padding:0 12px; border-left:1px solid var(--pr-border); }
.pr-dialog .pr-facts > div:first-child { border-left:0; }
.pr-dialog .pr-facts dt { color:var(--pr-muted); font-size:12px; }
.pr-dialog .pr-facts dd { margin:4px 0 0; font-size:13px; overflow-wrap:anywhere; }
.pr-dialog .pr-note { margin:0 0 18px; padding:12px 14px; border:1px solid var(--pr-border); border-left:3px solid #91caff; border-radius:4px; font-size:13px; background:#fafbfc; }
.pr-dialog .pr-note h4 { margin:0 0 7px; font-size:13px; }
.pr-dialog .pr-note p { margin:4px 0 7px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.8; }
.pr-dialog .pr-note p:last-child { margin-bottom:0; }
.pr-dialog .pr-detail-note { padding-top:10px; margin-top:10px; border-top:1px solid var(--pr-border); font-size:12px; color:var(--pr-muted); }
.pr-dialog .pr-items-table { min-width:870px; }
.pr-dialog .pr-col-detail-item { width:34%; }
.pr-dialog .pr-items-table .pr-col-unit { width:60px; }
.pr-dialog .pr-item-description { overflow-wrap:anywhere; white-space:normal; }
.pr-dialog .pr-item-description > strong { display:block; font-size:13px; font-weight:600; line-height:1.6; }
.pr-dialog .pr-item-remark { margin:5px 0 0; color:var(--pr-muted); white-space:pre-wrap; font-size:12px; line-height:1.6; }
.pr-dialog .pr-unit { overflow-wrap:anywhere; }
.pr-dialog .pr-outstanding { background:#fafcff; color:#175cd3; }
.pr-dialog .pr-detail-actions { margin:14px 0; padding:12px 0 0; }
.pr-dialog .pr-action-form { margin:0 0 14px; padding:12px; border:1px solid #d0d5dd; border-radius:4px; background:#fff; }
.pr-dialog .pr-action-form > label { margin:10px 0; gap:5px; font-size:12px; }
.pr-dialog .pr-action-form > p { margin:4px 0 10px; }
.pr-dialog .pr-execution-table { min-width:780px; }
.pr-dialog .pr-execution-table input { min-width:155px; }
.pr-dialog .pr-history { margin-top:12px; padding-top:10px; border-top:1px solid var(--pr-border); }
.pr-dialog .pr-history summary { cursor:pointer; font-size:13px; font-weight:600; margin-bottom:9px; }
.pr-dialog .pr-history table { min-width:700px; }
.pr-dialog .pr-create-fields { display:grid; gap:12px; margin-bottom:20px; }
.pr-dialog .pr-create-fields label { display:flex; flex-direction:column; min-width:0; font-size:12px; gap:7px; }
.pr-dialog .pr-purpose-field { padding:14px; border:1px solid var(--pr-border); border-radius:4px; background:#fafbfc; }
.pr-dialog .pr-purpose-field > span { font-size:14px; font-weight:600; }
.pr-dialog .pr-purpose-field textarea { min-height:108px; }
.pr-dialog .pr-required { margin-left:3px; color:#b42318; font-size:11px; font-weight:400; }
.pr-dialog .pr-optional { margin-left:3px; color:var(--pr-muted); font-size:11px; font-weight:400; }
.pr-dialog .pr-extra-note { padding:10px 14px; border:1px solid var(--pr-border); border-radius:4px; }
.pr-dialog .pr-extra-note summary { font-size:12px; cursor:pointer; }
.pr-dialog .pr-extra-note > label { margin-top:10px; color:var(--pr-muted); }
.pr-dialog .pr-section-head strong { font-size:13px; }
.pr-dialog .pr-section-head small { display:block; margin-top:4px; }
.pr-dialog .pr-draft-table { min-width:920px; table-layout:fixed; }
.pr-dialog .pr-draft-table .pr-col-line { width:44px; }
.pr-dialog .pr-draft-table .pr-col-name { width:210px; }
.pr-dialog .pr-draft-table .pr-col-spec { width:180px; }
.pr-dialog .pr-draft-table .pr-col-quantity { width:140px; }
.pr-dialog .pr-draft-table .pr-col-unit { width:110px; }
.pr-dialog .pr-draft-table .pr-col-remove { width:62px; }
.pr-dialog .pr-draft-table th, .pr-dialog .pr-draft-table td { padding:10px 8px; vertical-align:top; }
.pr-dialog .pr-draft-table .pr-line-no { width:40px; color:var(--pr-muted); }
.pr-dialog .pr-item-note summary { padding:6px 0; font-size:12px; color:#175cd3; cursor:pointer; }
.pr-dialog .pr-item-note textarea { margin-top:6px; min-height:64px; }
.pr-dialog .pr-remove { background:transparent; color:#b42318; padding:6px 2px; }
.pr-dialog .pr-remove:hover { background:#fff1f0; }
.pr-dialog .pr-submit-bar { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; margin-top:18px; padding-top:14px; border-top:1px solid var(--pr-border); }
.pr-dialog .pr-submit-bar > .pr-muted { margin-right:auto; }
.pr-dialog .pr-item-photos { margin-top:8px; }
.pr-dialog .pr-item-photos summary { width:fit-content; padding:3px 0; color:#175cd3; font-size:12px; cursor:pointer; }
.pr-dialog .pr-item-photos summary > span { color:var(--pr-muted); margin-left:3px; }
.pr-dialog .pr-photo-gallery { display:flex; flex-wrap:wrap; gap:7px; margin-top:8px; }
.pr-dialog button.pr-photo-thumb { display:grid; place-items:center; width:64px; height:64px; min-height:64px; padding:0; overflow:hidden; border:1px solid var(--pr-border); border-radius:4px; background:#f8fafc; white-space:normal; color:var(--pr-muted); }
.pr-dialog .pr-photo-thumb img { display:block; width:100%; height:100%; object-fit:cover; }
.pr-dialog .pr-photo-thumb span { padding:4px; font-size:10px; line-height:1.5; }
.pr-dialog .pr-photo-thumb:hover { border-color:var(--pr-blue); }
.pr-dialog[data-pr-kind="photo"] { width:min(980px,calc(100vw - 40px)); }
.pr-dialog .pr-photo-caption { display:flex; flex-wrap:wrap; align-items:baseline; gap:8px 12px; margin-bottom:12px; overflow-wrap:anywhere; }
.pr-dialog .pr-photo-caption strong { font-size:14px; }
.pr-dialog .pr-photo-caption span { color:var(--pr-muted); font-size:12px; }
.pr-dialog .pr-photo-viewer { display:grid; place-items:center; min-height:180px; padding:12px; border:1px solid var(--pr-border); border-radius:4px; background:#f8fafc; }
.pr-dialog .pr-photo-viewer img { display:block; width:auto; height:auto; max-width:100%; max-height:calc(100vh - 220px); object-fit:contain; }
[data-pr-nav] [data-pr-badge], [data-purchase-requisitions-nav] .pr-nav-count, .nav[data-page="purchaseRequisitions"] .pr-nav-count { display:inline-block; min-width:18px; margin-left:5px; padding:1px 5px; border-radius:9px; font-size:11px; text-align:center; background:#f04438; color:#fff; }
@media (max-width:980px) { #purchaseRequisitions .pr-heading { align-items:flex-start; flex-wrap:wrap; } .pr-dialog, .pr-dialog[data-pr-kind="photo"] { width:calc(100vw - 24px); max-height:calc(100vh - 24px); } }
@media (max-width:600px) { #purchaseRequisitions .pr-shell { padding:10px; } #purchaseRequisitions .pr-heading > .pr-actions { width:100%; } #purchaseRequisitions .pr-filter > label, #purchaseRequisitions .pr-filter > .pr-keyword { flex:1 1 100%; max-width:none; } #purchaseRequisitions .pr-tabs button { padding:9px 10px; } .pr-dialog { width:calc(100vw - 16px); max-height:calc(100vh - 16px); } .pr-dialog .pr-dialog-shell { padding:12px; } .pr-dialog .pr-facts > div { flex-basis:100%; border-left:0; margin:4px 0; } .pr-dialog .pr-detail-heading { align-items:flex-start; } }
