/* SOP steps extend the existing BayesPeaQ Configuration card; no extra navigation or duplicate RBAC shell. */
[data-sop-step-host],.bpq-sop-record{margin-top:22px;padding:21px;border:1px solid #cad9ec;border-radius:14px;background:#fbfcff;color:#1d365c}
.bpq-sop-flow{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:12px;list-style:none;padding:0;margin:12px 0}
.bpq-sop-flow>li{border:1px solid #cad9ec;border-radius:10px;padding:14px;background:#fff;overflow-wrap:anywhere}
.bpq-sop-flow>li[aria-current=step]{border:2px solid #3456ad;background:#eef3ff}
.bpq-sop-flow small{display:block;font-size:12px;color:#566c88;margin-top:4px}
.bpq-sop-flow ul{padding-left:18px;margin:12px 0 0}.bpq-sop-flow ul li+li{margin-top:10px}
[data-sop-step-host] h3,.bpq-sop-record h3{font-size:19px;margin:3px 0 8px}
[data-sop-step-host] h4,.bpq-sop-record h4{font-size:15px;margin:16px 0 9px}
.bpq-sop-heading{display:flex;align-items:start;justify-content:space-between;gap:15px}
.bpq-sop-heading small{font-size:11px;letter-spacing:.07em;font-weight:800;color:#4a66ad}
.bpq-sop-heading p,.bpq-sop-small{font-size:13px;line-height:1.6;color:#566c88}
.bpq-sop-heading p{max-width:760px}
[data-sop-step-host] button,.bpq-sop-record button{background:#3456ad;color:white;border:1px solid #304fa2;padding:9px 14px;border-radius:9px;font:inherit;font-size:13px;min-height:42px;font-weight:720;cursor:pointer}
[data-sop-step-host] button:hover:not(:disabled),.bpq-sop-record button:hover:not(:disabled){background:#223d84}
[data-sop-step-host] button:disabled,.bpq-sop-record button:disabled{opacity:.45;cursor:not-allowed}
[data-sop-step-host] :is(input,textarea,select),.bpq-sop-record input{font:inherit;color:#1c365d;background:#fff;border:1px solid #b9cbe4;border-radius:9px;padding:10px;min-height:42px;width:100%;max-width:100%}
[data-sop-step-host] :is(button,input,select,textarea,summary):focus-visible,.bpq-sop-record :is(button,input):focus-visible{outline:3px solid #6f64cf;outline-offset:2px}
[data-sop-step-host] label,.bpq-sop-record label{display:flex;flex-direction:column;gap:5px;color:#2b456b;font-size:13px;font-weight:650}
[data-sop-step-host] details{padding:12px 13px;background:white;border:1px solid #dde6f2;border-radius:11px}
[data-sop-step-host] summary{cursor:pointer;font-size:14px;font-weight:760;color:#31529a;min-height:30px}
.bpq-sop-label-grid,.bpq-sop-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0}
.bpq-sop-label-grid label small{font-size:10px;color:#744f10}
.bpq-sop-fields .wide{grid-column:span 2}
.bpq-sop-item{border:1px solid #dce5f1;border-radius:11px;background:white;padding:13px;margin:8px 0;display:flex;align-items:start;gap:10px;justify-content:space-between}
.bpq-sop-item b,.bpq-sop-item small{display:block}
.bpq-sop-item b{color:#203b73;font-size:13px}
.bpq-sop-item small{font-size:12px;color:#61738c;line-height:1.5}
.bpq-sop-item p{font-size:12px;color:#4d6280}
.bpq-sop-item>div:last-child:not(:first-child){display:flex;gap:7px;flex-wrap:wrap}
.bpq-sop-item button{font-size:12px;min-height:38px;padding:6px 11px}
.bpq-sop-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:12px 0}
.bpq-sop-actions span{color:#925e13;font-weight:720;font-size:12px}
.bpq-sop-editor{padding:14px;border:1px solid #b9c9e7;border-radius:12px;background:#f4f7ff}
.bpq-sop-toggles{display:flex;flex-wrap:wrap;gap:14px}
.bpq-sop-toggles label{display:flex;flex-direction:row;align-items:center;gap:8px}
.bpq-sop-toggles input{width:17px;min-height:17px;height:17px}
.bpq-sop-reason{margin:16px 0}
.bpq-sop-preview,.bpq-sop-approvals{font-size:13px;color:#27436f;background:#fff;border-radius:10px;padding:12px;margin-top:12px;border:1px solid #dce6f6}
.bpq-sop-feedback{margin:12px 0;padding:11px;border-radius:9px;background:#e8f7f1;color:#0d614e;font-size:13px}
.bpq-sop-feedback.is-error{background:#fff0f2;color:#8f3149}
.bpq-sop-warning{font-size:13px;font-weight:700;color:#8b5314;padding:10px;border:1px solid #efd69d;background:#fff7e5;border-radius:8px}
.bpq-sop-record-action{min-width:240px}
.bpq-sop-record-action label{margin-bottom:7px}
@media(max-width:760px){[data-sop-step-host],.bpq-sop-record{padding:14px}.bpq-sop-heading,.bpq-sop-item{flex-direction:column}.bpq-sop-label-grid,.bpq-sop-fields{grid-template-columns:1fr}.bpq-sop-fields .wide{grid-column:auto}.bpq-sop-record-action{min-width:0;width:100%}}
@media(prefers-reduced-motion:reduce){[data-sop-step-host] *, .bpq-sop-record *{scroll-behavior:auto!important;transition:none!important}}

.bpq-sop-workflow-picker{display:flex;flex-direction:column;gap:6px;margin-bottom:14px;font-weight:730;font-size:13px;color:#243f72}.bpq-sop-workflow-picker select{max-width:460px}


/* Keep the SOP editor visually consistent with the compact Role Studio. */
.bpq-studio-mode [data-sop-step-host]{margin-top:15px;padding:16px 17px;border-radius:12px;background:#fff;border-color:#dbe3ef;box-shadow:none}
.bpq-studio-mode [data-sop-step-host] .bpq-sop-workflow-picker{margin:0 0 14px;font-size:13px;max-width:460px}
.bpq-studio-mode [data-sop-step-host] .bpq-sop-heading{gap:10px;margin:0 0 11px}
.bpq-studio-mode [data-sop-step-host] .bpq-sop-heading h3{font-size:18px;letter-spacing:-.02em;margin:3px 0}
.bpq-studio-mode [data-sop-step-host] .bpq-sop-heading p{font-size:12px;margin:3px 0 0}
.bpq-studio-mode [data-sop-step-host] .bpq-sop-heading small{font-size:10px}
.bpq-studio-mode [data-sop-step-host] h4{font-size:14px;margin:14px 0 8px}
.bpq-studio-mode [data-sop-step-host] details{padding:10px 12px;border-color:#dbe3ef;background:#fbfcff}
.bpq-studio-mode [data-sop-step-host] .bpq-sop-item{padding:10px 11px;margin:6px 0;border-color:#dce4f0}
.bpq-studio-mode [data-sop-step-host] .bpq-sop-item b{color:#1c365e}
.bpq-studio-mode [data-sop-step-host] .bpq-sop-editor{background:#f7f9ff;border-color:#cbd8eb}
.bpq-studio-mode [data-sop-step-host] :is(input,select,textarea){font-size:14px;min-height:44px}
.bpq-studio-mode [data-sop-step-host] button{background:#3155b7;border-color:#3155b7;min-height:42px}
.bpq-studio-mode [data-sop-step-host] button:hover:not(:disabled){background:#234695}
.bpq-studio-mode [data-sop-step-host] button[data-sop-reload],.bpq-studio-mode [data-sop-step-host] button[data-sop-cancel]{background:#fff;color:#26447d;border-color:#cbd7eb}
.bpq-studio-mode [data-sop-step-host] button[data-sop-reload]:hover,.bpq-studio-mode [data-sop-step-host] button[data-sop-cancel]:hover{background:#f2f6ff}
@media(max-width:580px){.bpq-studio-mode [data-sop-step-host]{padding:13px}.bpq-studio-mode [data-sop-step-host] .bpq-sop-heading{flex-direction:column}}

/* Clear, mobile-friendly QMS role eligibility and non-authorizing contributors. */
[data-sop-step-host] .bpq-sop-role-guidance{display:block;font-weight:500;font-size:12px;line-height:1.55;color:#425a79;overflow-wrap:anywhere;padding:5px 0}
[data-sop-step-host] .bpq-sop-contributors{grid-column:1/-1;min-width:0}
[data-sop-step-host] .bpq-sop-contributors summary{color:#244678;font-size:13px}
[data-sop-step-host] .bpq-sop-contributor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 9px;max-height:240px;overflow-y:auto;padding:8px 2px}
[data-sop-step-host] .bpq-sop-contributor-grid label{display:flex;flex-direction:row;align-items:center;gap:8px;min-width:0;padding:9px;border:1px solid #e0e8f3;border-radius:9px;background:#fff;font-size:12px;font-weight:620;line-height:1.4}
[data-sop-step-host] .bpq-sop-contributor-grid input[type=checkbox]{width:17px;height:17px;min-height:17px;flex:0 0 17px;padding:0;accent-color:#3155b7}
[data-sop-step-host] .bpq-sop-contributor-grid span{overflow-wrap:anywhere}
[data-sop-step-host] [data-sop-field="owner_role"]{min-width:0}
@media(max-width:580px){[data-sop-step-host] .bpq-sop-contributor-grid{grid-template-columns:1fr;max-height:255px}}


/* Governed acknowledgement decisions: readable actions without implying QA approval. */
.bpq-sop-record-action{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-width:510px}
.bpq-sop-record-action label{grid-column:1/-1;margin:0}
.bpq-sop-record-action button{min-width:0;white-space:normal;line-height:1.35}
.bpq-sop-record-action button[data-sop-feedback]{background:#f7f9ff;color:#243f75;border-color:#bacbed}
.bpq-sop-record-action button[data-sop-feedback]:hover:not(:disabled){background:#e7efff}
.bpq-sop-record-action button[data-sop-feedback="escalate_to_qa"]{color:#8b3e18;border-color:#d5a67e;background:#fffaf4}
.bpq-sop-record-action button[data-sop-feedback="escalate_to_qa"]:hover:not(:disabled){background:#fff1dd}
@media(max-width:480px){.bpq-sop-record-action{grid-template-columns:1fr}}
