/* DIAR-6B.4 — controlled investigation workflow and case management */
.diar-workflow-v4{min-width:0}
.workflow-stage-strip{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:8px;margin:18px 0;padding:0;list-style:none}
.workflow-stage-strip li{min-width:0;display:flex;align-items:center;gap:8px;padding:10px;border:1px solid #dbe6ee;border-radius:14px;background:#fff;color:#496477;font-size:12px;font-weight:800;line-height:1.25}
.workflow-stage-strip li b{display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;border-radius:50%;background:#edf3f7;color:#123b63}
.workflow-stage-strip li.current{border-color:#8054e8;background:#f4efff;color:#4f22af;box-shadow:0 8px 22px rgba(91,55,186,.12)}
.workflow-stage-strip li.current b{background:#8054e8;color:#fff}
.workflow-stage-strip li.complete{border-color:#9fdacb;background:#eefaf6;color:#087d6c}
.workflow-kpis{grid-template-columns:repeat(6,minmax(0,1fr))!important}
.workflow-filter-panel{grid-template-columns:2fr repeat(5,minmax(150px,1fr))!important}
.workflow-filter-panel .filter-actions{grid-column:1/-1}
.workflow-table{min-width:1260px}
.workflow-stage-badge,.sla-badge{display:inline-flex;align-items:center;min-height:28px;padding:5px 10px;border-radius:999px;font-size:12px;font-weight:900;white-space:nowrap}
.workflow-stage-badge{background:#eee9ff;color:#5d32c4}
.stage-assigned{background:#e8f1ff;color:#245fb9}.stage-under_review{background:#e8f8f5;color:#087f70}.stage-information_required{background:#fff4dc;color:#956000}.stage-finding_proposed{background:#f1e9ff;color:#7428c6}.stage-supervisor_review{background:#e7efff;color:#224f9c}.stage-management_approval{background:#ffe9f1;color:#a32658}.stage-corrective_action{background:#fff0e3;color:#a24c00}.stage-closed{background:#e9f7ef;color:#187849}
.sla-overdue{background:#ffe7ea;color:#b4233d}.sla-due_soon{background:#fff2d8;color:#8a5700}.sla-on_track{background:#e8f7f1;color:#08785f}.sla-completed{background:#edf2f5;color:#476272}.sla-no_due_date{background:#f1f3f5;color:#65737d}
.workflow-case-hero{align-items:center}.workflow-case-hero .risk-panel{min-width:220px}
.case-stage-strip{position:relative;margin-bottom:12px}
.case-workspace-tabs{position:sticky;top:86px;z-index:15;display:flex;gap:8px;overflow-x:auto;padding:10px;margin:0 0 18px;border:1px solid #dce6ed;border-radius:16px;background:rgba(255,255,255,.96);box-shadow:0 8px 24px rgba(15,45,70,.07);scrollbar-width:thin}
.case-workspace-tabs a{flex:0 0 auto;padding:9px 13px;border-radius:10px;color:#24485f;text-decoration:none;font-weight:800}
.case-workspace-tabs a:hover,.case-workspace-tabs a.is-active{background:#8054e8;color:#fff}
.workflow-case-layout{align-items:start}
.workflow-panel{scroll-margin-top:155px}
.workflow-panel h3{margin:24px 0 10px;color:#12364d}
.workflow-facts{grid-template-columns:repeat(4,minmax(0,1fr))}
.workflow-table-wrap{overflow:auto;border:1px solid #dce6ed;border-radius:14px;margin:14px 0}
.workflow-table-wrap table{width:100%;min-width:760px;border-collapse:collapse}
.workflow-table-wrap th,.workflow-table-wrap td{padding:12px;border-bottom:1px solid #e2ebf0;text-align:start}
.workflow-table-wrap th{background:#eef5f7;color:#23485f;font-size:12px;text-transform:uppercase}
.signal-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.signal-grid article{padding:14px;border-radius:14px;background:#f6fafb;border:1px solid #dce8ed}.signal-grid p{margin:6px 0 0;color:#5c7483}
.workflow-record-list,.corrective-grid{display:grid;gap:12px}.workflow-record-list article,.corrective-grid article{padding:16px;border:1px solid #dce7ed;border-radius:15px;background:#fbfdfe}.workflow-record-list article>div,.corrective-grid article>div{display:flex;align-items:center;justify-content:space-between;gap:12px}.workflow-record-list p,.corrective-grid p{color:#4e6878}.workflow-record-list blockquote{margin:12px 0 0;padding:12px 14px;border-inline-start:4px solid #1aa68b;background:#eef9f6;border-radius:8px}
.workflow-record-list dl{display:grid;grid-template-columns:150px 1fr;gap:6px 12px}.workflow-record-list dt{font-weight:800}.workflow-record-list dd{margin:0;color:#4f6878}
.approvals-list{grid-template-columns:repeat(2,minmax(0,1fr))}.decision-approved{color:#087d5e}.decision-returned{color:#a86a00}.decision-rejected{color:#b4233d}
.corrective-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.inline-workflow-form{display:grid;grid-template-columns:minmax(160px,1fr) minmax(220px,2fr) auto;gap:8px;margin-top:12px}.inline-workflow-form textarea{min-height:42px}.inline-workflow-form button{border:0;border-radius:10px;padding:8px 14px;background:#0e8c7d;color:#fff;font-weight:800}
.stage-action-card{border-top:4px solid #8054e8}.stage-action-card form{display:grid;gap:10px}.workflow-sidebar{min-width:0}.workflow-sidebar .case-card{overflow:hidden}
.workflow-queue-card .queue-table-wrap{scrollbar-gutter:stable}.workflow-table th:last-child,.workflow-table td:last-child{position:sticky;inset-inline-end:0;background:#fff;box-shadow:-8px 0 14px rgba(20,55,75,.05)}.workflow-table th:last-child{background:#285c68;color:#fff}
html[dir="rtl"] .workflow-table th:last-child,html[dir="rtl"] .workflow-table td:last-child{box-shadow:8px 0 14px rgba(20,55,75,.05)}
@media(max-width:1450px){.workflow-stage-strip{grid-template-columns:repeat(5,minmax(0,1fr))}.workflow-kpis{grid-template-columns:repeat(3,minmax(0,1fr))!important}.workflow-filter-panel{grid-template-columns:repeat(3,minmax(0,1fr))!important}.workflow-facts{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1050px){.workflow-stage-strip{grid-template-columns:repeat(3,minmax(0,1fr))}.workflow-case-layout{grid-template-columns:1fr!important}.workflow-sidebar{position:static!important}.workflow-facts{grid-template-columns:repeat(2,minmax(0,1fr))}.approvals-list,.corrective-grid{grid-template-columns:1fr}.signal-grid{grid-template-columns:1fr}.case-workspace-tabs{top:74px}}
@media(max-width:720px){.workflow-stage-strip{grid-template-columns:1fr 1fr}.workflow-kpis{grid-template-columns:1fr 1fr!important}.workflow-filter-panel{grid-template-columns:1fr!important}.workflow-facts{grid-template-columns:1fr}.inline-workflow-form{grid-template-columns:1fr}.workflow-record-list dl{grid-template-columns:1fr}.workflow-table th:last-child,.workflow-table td:last-child{position:static}.workflow-case-hero{display:block}.workflow-case-hero .risk-panel{margin-top:14px;min-width:0}}
