/* Editor layout: use the window, keep the form adjustable, and expand the map. */
body.editor-open .workspace-header{padding:12px 16px;gap:16px;min-height:76px}
body.editor-open .workspace-header .eyebrow,body.editor-open .workspace-header .subtitle{display:none}
body.editor-open .workflow-title{font-size:26px;line-height:1.4}
body.editor-open .header-actions{margin-top:0;gap:8px;flex-wrap:wrap}
body.editor-open .save-status{font-size:12px}
body.editor-open .builder{max-width:none;min-height:0;margin:0 12px;grid-template-columns:var(--steps-width,340px) 8px minmax(0,1fr)}
body.editor-open .steps-panel{border-right:0;min-width:0}
body.editor-open .panel-header,body.editor-open .diagram-header{height:46px;padding:0 12px;gap:8px}
body.editor-open .panel-intro{padding:8px 12px;font-size:12px;line-height:1.4}
body.editor-open .step-list{padding:0 10px;min-height:0}
body.editor-open .step-card-top{padding:10px}
body.editor-open .step-form{padding:0 10px 10px}
body.editor-open .step-form .field-group{margin-top:9px}
body.editor-open .step-form .field-label{margin-bottom:4px}
body.editor-open .step-form textarea{min-height:68px;resize:vertical}
body.editor-open .step-form-bottom{margin-top:9px;padding-top:8px}
body.editor-open .add-step-area{padding:8px 10px;flex-direction:row;gap:7px;border-top:1px solid #97a3be;background:#fff}
body.editor-open .add-step{flex:1;min-height:42px}
body.editor-open .add-decision{min-height:42px;padding:8px 5px;font-size:12px}
body.editor-open .panel-footnote,body.editor-open .live-badge{display:none}
body.editor-open .workspace-footer{min-height:32px;padding:4px 16px;align-items:center;gap:12px}
body.editor-open .workspace-footer>span{display:none}
body.editor-open .workspace-footer>button{margin-left:auto;min-height:28px;font-size:12px}
.workspace-pane-resizer{background:#e0e4ef;border-left:1px solid #5e72a0;border-right:1px solid #5e72a0;cursor:col-resize;touch-action:none;position:relative;min-height:0}
.workspace-pane-resizer:after{content:'';position:absolute;top:calc(50% - 18px);left:2px;height:36px;width:2px;border-radius:2px;background:#485678}
.workspace-pane-resizer:hover,.workspace-pane-resizer:focus-visible{background:#abb7d2;outline:2px solid #0b1b40;outline-offset:-2px}
.workspace-map-actions{display:flex;align-items:center;gap:5px;flex:none}
.workspace-view-button{display:flex;align-items:center;justify-content:center;gap:6px;min-width:36px;min-height:36px;padding:6px 8px;border:1px solid #5e72a0;border-radius:6px;background:#fff;color:#13203f;font-size:12px;white-space:nowrap}
.workspace-view-button:hover{background:#c8d0e4}
.workspace-view-button svg{width:15px;height:15px}
.workspace-view-button[aria-expanded=true]#workspace-expand{background:#0b1b40;color:#fff}
.steps-map-jump{display:none}
body.editor-open .builder.steps-collapsed{grid-template-columns:minmax(0,1fr)}
.builder.steps-collapsed>.steps-panel,.builder.steps-collapsed>.workspace-pane-resizer{display:none}
body.editor-open .builder.workspace-expanded{position:fixed;inset:8px;margin:0;width:auto;height:auto;max-width:none;min-height:0;z-index:40;box-shadow:0 0 0 10px #dde2ed}
body.workspace-expanded{overflow:hidden}
@media(min-width:621px){
  body.editor-open #app-shell{height:calc(100dvh - 28px);min-height:0}
  body.editor-open #app-shell>main{display:flex;flex-direction:column;min-height:0;height:100%}
  body.editor-open .topbar{height:42px;padding:0 16px;flex-shrink:0}
  body.editor-open .team-workspace-bar{padding:5px 16px;gap:8px;flex-shrink:0}
  body.editor-open .team-workspace-select{padding-top:6px;padding-bottom:6px;min-height:34px;font-size:13px}
  body.editor-open .team-workspace-bar .team-open{min-height:34px;padding:6px 12px}
  body.editor-open #workflow-editor:not([hidden]){display:flex;flex-direction:column;min-height:0;flex:1}
  body.editor-open .workspace-header{flex-shrink:0}
  body.editor-open .builder{flex:1;height:auto;grid-template-rows:minmax(0,1fr)}
  body.editor-open .workspace-footer{flex-shrink:0}
  body.editor-open .policy-links{height:28px;min-height:0;padding:2px 12px;font-size:12px;gap:8px 16px;margin-left:225px;white-space:nowrap}
  body.editor-open .step-list{max-height:none;flex:1}
}
@media(min-width:1500px){body.editor-open .policy-links{margin-left:240px}}
@media(min-width:851px) and (max-width:1200px){body.editor-open .policy-links{margin-left:190px}}
@media(min-width:851px) and (max-width:1000px){body.editor-open .policy-links{margin-left:170px}}
@media(max-width:850px){body.editor-open .policy-links{margin-left:0}}
@media(min-width:621px) and (max-width:1050px){
  body.editor-open .header-actions{max-width:55%;gap:5px}
  body.editor-open .save-status{width:100%;justify-content:flex-end}
  body.editor-open .header-actions .button{font-size:12px;padding:8px 10px}
  .workspace-control-label{display:none}
}
@media(max-width:620px){
  body.editor-open .workspace-header{padding:12px;min-height:0}
  body.editor-open .workflow-title{font-size:24px}
  body.editor-open .header-actions{margin-top:8px;gap:6px}
  body.editor-open .save-status{width:100%;justify-content:flex-start;font-size:12px}
  body.editor-open .header-actions .button{font-size:12px;min-height:40px;padding:8px 10px}
  body.editor-open .builder{display:flex;margin:0 6px;min-height:0;height:auto;border-radius:8px}
  body.editor-open .steps-panel{max-height:480px}
  body.editor-open .step-list{max-height:none;flex:1;min-height:0}
  .workspace-pane-resizer{display:none}
  .steps-map-jump{display:inline-flex}
  .workspace-control-label{display:none}
  body.editor-open .diagram-panel{height:calc(100dvh - 100px);min-height:420px;flex:none}
  body.editor-open .diagram-header{padding:0 8px;height:48px}
  body.editor-open .view-tabs{gap:8px}
  body.editor-open .view-tabs button{font-size:12px;gap:5px}
  body.editor-open .view-tabs .sop-tag{display:none}
  body.editor-open .team-workspace-bar{padding:7px 12px;gap:7px;flex-wrap:nowrap}
  body.editor-open .team-workspace-picker{width:auto;flex:1;min-width:0}
  body.editor-open .team-workspace-picker>span,body.editor-open .team-role-badge{display:none}
  body.editor-open .team-workspace-select{width:100%;min-height:38px;font-size:14px;padding-top:7px;padding-bottom:7px}
  body.editor-open .team-workspace-bar .team-open{width:auto;margin:0;min-height:38px;padding:7px 10px}
  body.editor-open .policy-links{font-size:12px;padding:8px 12px;gap:6px 12px}
  body.editor-open .builder.workspace-expanded{inset:0;border-radius:0;display:flex;flex-direction:column}
  body.editor-open .workspace-expanded>.steps-panel{max-height:45dvh;flex:0 1 45dvh}
  body.editor-open .workspace-expanded>.diagram-panel{flex:1;height:auto;min-height:0}
}
@media(max-width:359px){body.editor-open .view-tabs button>svg{display:none}.workspace-map-actions{gap:3px}.workspace-view-button{padding:5px;min-width:34px}}
@media(min-width:1201px){
  body.editor-open #app-shell>main{position:relative}
  body.editor-open .topbar .studio-tag{display:none}
  body.editor-open .team-workspace-bar{position:absolute;top:0;right:60px;z-index:5;background:transparent;border:0;min-height:42px;padding:3px 8px;max-width:55%}
  body.editor-open .team-workspace-picker>span{display:none}
  body.editor-open .team-workspace-select{width:240px}
  body.editor-open .topbar .breadcrumbs{max-width:calc(100% - 430px)}
  body.editor-open .team-workspace-bar:has(.team-bar-status:not(:empty)){position:static;max-width:none;min-height:42px;background:#dde2ed;border-bottom:1px solid #5e72a0}
}
body.editor-open .step-form textarea{field-sizing:content;max-height:220px}
.end-step-setting{display:flex;align-items:flex-start;gap:9px;margin:12px 0 0;padding:9px;border:1px solid #8995b2;background:#ebeef5;border-radius:6px;font-size:13px;line-height:1.5;color:#162341}
.end-step-setting input{accent-color:#0b1b40;width:20px;height:20px;flex:none;margin:0}
.end-step-setting small{display:block;font-size:12px;line-height:1.5;margin-top:4px}
.title-block{position:relative;padding-right:49px}
.workflow-edition-label{position:absolute;right:0;top:50%;transform:translateY(-50%);padding:4px 7px;border:1px solid #49587b;border-radius:5px;background:#fff;color:#13203f;font-size:13px;font-weight:750;line-height:1.4}
body.editor-open .diagram-meta{position:static;flex:none;inset:auto;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 12px;min-height:32px;border-bottom:1px solid #8b98b6;background:#f7f8fb;pointer-events:auto;font-size:12px;line-height:1.4}
body.editor-open #diagram-description{min-width:0}
body.editor-open .diagram-meta .map-counts{flex:none;font-size:11px}
@media(max-width:620px){body.editor-open .diagram-meta{font-size:11px;padding:5px 8px;gap:6px}body.editor-open .diagram-meta .map-counts{gap:6px;font-size:10px}}
.parallel-setting{background:#edf3fa;border-color:#839aaf}
.parallel-targets{margin:10px 0 0;padding:5px 8px;border:1px solid #839aaf;border-radius:6px;max-height:190px;overflow:auto;min-width:0}
.parallel-targets legend{font-size:12px;font-weight:750;color:#28435b;padding:0 4px}
.parallel-targets label{display:flex;align-items:flex-start;gap:8px;padding:7px 0;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.parallel-targets input{width:19px;height:19px;flex:none;accent-color:#0b1b40;margin:1px 0 0}
.account-menu-wrap{position:relative}
.account-menu-toggle{display:flex;align-items:center;gap:7px;padding:4px;border-radius:6px;color:#13203f;min-height:36px;font-size:13px}
.account-menu-toggle:hover,.account-menu-toggle[aria-expanded=true]{background:#dce1ed}
.account-menu-toggle #topbar-account-name{max-width:115px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700}
.account-menu-toggle>svg{width:13px;height:13px}
.account-menu{position:absolute;right:0;top:calc(100% + 6px);width:235px;z-index:35;padding:5px;background:#fff;border:1.5px solid #4d5c80;border-radius:8px;box-shadow:0 8px 24px #0c173130}
.account-menu button{display:block;width:100%;text-align:left;padding:10px 12px;min-height:42px;font-size:14px;color:#13203f;border-radius:5px}
.account-menu button:hover,.account-menu button:focus-visible{background:#e2e6f0}
.team-workspace-current{max-width:270px;min-width:0;padding:8px 11px;border:1px solid #4d5c80;border-radius:6px;background:#fff;color:#13203f;font-size:13px;font-weight:700;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.team-workspace-current:hover{background:#e2e6f0}
body.editor-open .team-workspace-current{padding-top:6px;padding-bottom:6px;min-height:34px}
@media(min-width:1201px){body.editor-open .team-workspace-bar{right:200px;max-width:calc(100% - 480px)}body.editor-open .topbar .breadcrumbs{max-width:calc(100% - 650px)}body.editor-open .team-workspace-current{max-width:240px}}
@media(min-width:1201px) and (max-width:1400px){body.editor-open .team-workspace-select{width:180px}body.editor-open .team-workspace-current{max-width:180px}}
@media(max-width:850px){.account-menu-toggle #topbar-account-name{display:none}}
@media(max-width:620px){.team-workspace-current{width:100%;font-size:14px;min-height:40px}.team-workspace-bar .team-open{font-size:0}.team-workspace-bar .team-open:after{content:'Settings';font-size:12px}body.editor-open .team-workspace-current{min-height:38px}.topbar .studio-tag{display:none}}
/* Document control stays readable without reducing the map's usable area. */
.workflow-details{font-size:11px;line-height:1.5;color:#162446;margin-top:4px;overflow-wrap:anywhere}
body.editor-open .workspace-header{align-items:flex-start;gap:12px}
body.editor-open .header-actions{flex-wrap:wrap;justify-content:flex-end;gap:8px}
body.editor-open .title-block{flex:1;min-width:240px}
body.editor-open .save-status{font-size:11px}
.document-card-bottom{gap:10px;flex-wrap:wrap}
.document-card-bottom>span{white-space:normal}
.signoff-version{font-size:15px;font-weight:750;color:#0b1b40}
#signoff-review-date{min-height:44px;color-scheme:light}
#signoff-status{overflow-wrap:anywhere}
.version-row small{line-height:1.6}
.version-list h3{font-size:14px;color:#0b1b40;margin-top:22px}
@media(max-width:850px){body.editor-open .title-block{min-width:0}body.editor-open .header-actions{justify-content:flex-start}#signoff-open{min-height:42px}.workflow-details{font-size:12px}}
body.editor-open .title-block{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:8px;row-gap:3px;padding-right:0}
body.editor-open .workflow-title{grid-column:1;grid-row:1;width:100%;min-width:0;margin:0}
body.editor-open .workflow-edition-label{grid-column:2;grid-row:1;position:static;transform:none;align-self:center;white-space:nowrap;font-size:11px;padding:3px 6px}
body.editor-open .workflow-details{grid-column:1/-1;grid-row:2;margin-top:0}

.sop-toolbar{flex-wrap:wrap;gap:8px}.sop-toolbar>div{display:flex;flex-wrap:wrap;gap:5px}.sop-toolbar .button{font-size:12px;padding:6px 9px;min-height:36px}.library-filters{flex-wrap:wrap}.document-card>h2,.document-card>p{margin:12px 18px}.document-card>[data-bin-restore],.document-card>[data-sop-view],.document-card>[data-sop-restore],.document-card>[data-sop-delete]{margin:6px 18px;align-self:flex-start}

.library-grid.workflow-list{display:block}.document-table-scroll{overflow-x:auto;border:1px solid #b0b9ce;border-radius:9px;background:#fff;padding-bottom:0}.document-table{border-collapse:collapse;width:100%;min-width:850px;text-align:left;font-size:13px}.document-table th{padding:12px 16px;background:#e9edf4;color:#303b55;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.5px}.document-table td{padding:16px;vertical-align:middle;border-top:1px solid #dfe3ee;color:#1c2946}.document-table td:first-child{width:36%}.document-table td:last-child{width:44px;text-align:right}.document-table tr:hover td{background:#fafbfc}.row-open{text-align:left;color:#102045;font-size:14px;font-weight:700;padding:0;line-height:1.5}.row-open:hover{text-decoration:underline}.row-subtitle{font-size:11px;color:#424f6c;margin-top:5px;line-height:1.5}.row-version{font-weight:700}.document-table small{display:block;font-size:11px;color:#414e6c;margin-top:4px}.row-menu{position:relative}.row-menu summary{list-style:none;cursor:pointer;font-size:24px;width:32px;height:32px;line-height:22px;text-align:center;border-radius:5px}.row-menu summary::-webkit-details-marker{display:none}.row-menu summary:hover{background:#e1e5ef}.row-menu-panel{position:fixed;right:auto;top:auto;min-width:190px;border:1px solid #8a98b9;background:#fff;box-shadow:0 5px 24px #15213d28;border-radius:7px;padding:5px;z-index:30;text-align:left}.row-menu-panel button,.row-menu-panel>span{display:block;text-align:left;width:100%;padding:10px 12px;font-size:12px;white-space:nowrap;border-radius:4px}.row-menu-panel button:hover{background:#e9ecf4}.row-menu-panel button:disabled{color:#7f8ba9;cursor:not-allowed}.danger-text{color:#93432e}.library-folder{display:flex;align-items:center;gap:7px;font-size:12px;color:#303c58}.library-folder select{padding:9px 24px 9px 9px;border:1px solid #b0b9ce;background:white;border-radius:6px;color:#162547;max-width:180px}.library-tools{flex-wrap:wrap;gap:12px}.library-stats .library-future{display:none}.workflow-type-fieldset{border:0;padding:0;margin:22px 0}.workflow-type-fieldset legend{font-size:13px;font-weight:700;margin-bottom:10px;color:#162444}.workflow-type-option{display:flex;align-items:flex-start;gap:11px;border:1px solid #b4bdd3;border-radius:8px;padding:13px;margin-bottom:9px;cursor:pointer;background:#fff}.workflow-type-option:has(input:checked){border-color:#12244e;box-shadow:0 0 0 1px #12244e;background:#ebeef5}.workflow-type-option input{margin:4px 0 0;accent-color:#12244e;flex:none}.workflow-type-option strong{display:block;font-size:14px;color:#122040}.workflow-type-option small{display:block;font-size:12px;line-height:1.6;color:#3e4a64;margin-top:4px}.workflow-start-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}.workflow-start-dialog .field-hint{font-size:12px;line-height:1.6;color:#3d4964;margin:14px 0}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:620px){.workflow-start-fields{grid-template-columns:1fr}.document-table th,.document-table td{padding:12px}.library-folder{width:100%}.library-folder select{max-width:none;flex:1}}

.document-library .library-heading{margin-bottom:18px}.document-library .library-heading h1{font-size:32px;margin:8px 0}.library-stats{display:flex;gap:12px;margin:18px 0 24px}.library-stats>div:not(.library-future){flex:0 1 240px;padding:12px 16px;min-height:0;display:grid;grid-template-columns:1fr auto;gap:3px 12px;align-items:center}.library-stats>div>span{grid-column:1;grid-row:1;font-size:10px}.library-stats>div>strong{grid-column:2;grid-row:1 / span 2;font-size:27px;line-height:1.2}.library-stats>div>small{grid-column:1;grid-row:2;font-size:11px}.library-filters button{padding:9px 8px;font-size:11px}.library-search{flex:1 1 170px;min-width:160px;max-width:230px;margin-left:auto}@media(max-width:620px){.document-library .library-heading h1{font-size:28px}.library-search{max-width:none;margin-left:0;flex-basis:100%}.library-stats>div:not(.library-future){padding:10px;flex:1}.library-stats>div>strong{font-size:23px}}
