#navigation button{width:100%}.scope-bar{display:flex;gap:12px;flex-wrap:wrap;align-items:end;margin:20px 0}.scope-bar label{display:grid;gap:6px;font-size:12px;min-width:150px}.scope-bar select,.scope-bar input{min-height:40px}.wf-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:18px}.wf-card{padding:22px}.wf-card h3{margin:5px 0 12px}.wf-card p{font-size:13px;line-height:1.6;color:#63766c}.wf-card .btn{margin-top:12px}.row-editor{border:1px solid #dfe7df;border-radius:10px;padding:16px;margin:12px 0}.row-editor .form-grid{gap:12px}.row-editor textarea{min-height:70px}.row-editor .remove-row{margin-top:10px}#editor{width:min(960px,95vw);max-width:960px}#editor .modal-body{max-height:65vh;overflow:auto}.form-grid input,.form-grid select,.form-grid textarea{width:100%}.form-grid input[type=checkbox]{width:auto}.wf-toolbar{display:flex;gap:10px;flex-wrap:wrap}.wf-error{color:#a02d29;white-space:pre-wrap;margin-top:14px}.wf-summary{display:flex;gap:16px;flex-wrap:wrap;margin:12px 0;color:#324c40}.wf-badge{padding:5px 9px;border-radius:20px;background:#eaf1ec;font-size:12px}.muted{color:#728276;font-size:12px}#workspace .empty{padding:40px}.wf-rows{display:grid;gap:6px}.wf-rows>div{padding:8px 0;border-bottom:1px solid #e7ece8}#draft-recovery{background:#fff6df;padding:16px;margin:12px 0;border-radius:8px}.readonly-note{background:#f1f5f1;padding:14px;font-size:13px;line-height:1.5;border-radius:8px}.employee{max-width:650px;margin:32px auto;padding:20px}.employee .panel{padding:24px;margin:16px 0}@media(max-width:760px){.scope-bar label{flex:1;min-width:125px}.wf-grid{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.sidebar{position:static;height:auto;width:100%}.sidebar-bottom{position:static}.shell{margin-left:0}#navigation{display:flex;flex-wrap:wrap}#navigation button{width:auto}.sidebar .nav-label,.sidebar .workspace{display:none}.sidebar{padding:18px}.sidebar-bottom{margin-top:10px}.topbar{padding:14px}main{padding:18px!important}.modal-body{padding:18px!important}}
@media(max-width:760px){.sidebar nav .nav-label{display:block;width:100%;margin:10px 0 2px}.sidebar nav .nav-link{width:auto;flex:0 1 auto}}
.source-preview{margin-top:20px;border-top:1px solid var(--line);padding-top:16px}.source-detail{min-width:220px;max-width:440px;padding:10px 0;font-size:12px}.source-detail h4{margin:14px 0 5px}.source-detail p{margin:5px 0}.source-detail details summary{cursor:pointer}

.packing-plan-grid{display:grid;grid-template-columns:1.2fr 1.2fr .8fr 1.2fr 1.2fr;gap:12px;align-items:start}.packing-plan-grid+.field{margin-top:12px}@media(max-width:760px){.packing-plan-grid{grid-template-columns:1fr 1fr}.packing-plan-grid .field:last-child{grid-column:1/-1}}@media(max-width:420px){.packing-plan-grid{grid-template-columns:1fr}}

.personnel-tools{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}.personnel-dialog{width:min(760px,95vw);border:0;border-radius:12px;padding:0}.personnel-status-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:20px 0}.personnel-status-grid .panel{padding:20px}.personnel-status-grid strong{font-size:30px;display:block}.personnel-person{display:flex;justify-content:space-between;gap:16px;align-items:start}.personnel-warning{color:#a02d29}@media(max-width:760px){.personnel-status-grid{grid-template-columns:1fr}.personnel-person{display:block}}

/* Desktop forms: compact staff choices, readable grids and bounded scrolling. */
#editor[open]{display:flex;flex-direction:column;width:min(1080px,96vw);max-width:1080px;max-height:92dvh;overflow:hidden}
#editor-content{display:flex;flex-direction:column;min-height:0;max-height:92dvh;width:100%}
#editor-content>form{display:flex;flex-direction:column;min-height:0;overflow:hidden}
#editor .modal-head,#editor .modal-foot{flex-shrink:0}
#editor .modal-head{padding:20px 24px;gap:20px}
#editor .modal-head>div{min-width:0}
#editor .modal-head h2{font-size:24px;line-height:1.25;overflow-wrap:break-word}
#editor .modal-body{min-height:0;max-height:none;overflow:auto;padding:20px 24px}
#editor .modal-foot{padding:14px 24px;align-items:center}
#editor .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:16px}
#editor .field{min-width:0;gap:6px}
#editor fieldset{min-width:0;margin:0;border:1px solid var(--line);border-radius:10px;padding:14px}
#editor legend{font-size:14px;font-weight:650;padding:0 6px}
[data-staff-list]{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:8px;align-content:start}
[data-staff-list] .check-row{display:flex;justify-content:flex-start;align-items:center;gap:10px;padding:10px 12px;min-height:44px;border:1px solid var(--line);border-radius:7px;line-height:1.35;font-size:13px;cursor:pointer}
[data-staff-list] .check-row span{min-width:0;overflow-wrap:break-word;font-weight:500}
[data-staff-list] .check-row input[type=checkbox]{order:-1;flex:0 0 18px;width:18px;height:18px;min-height:18px;margin:0;padding:0;accent-color:var(--green)}
[data-staff-list] .check-row:has(input:checked){background:#edf4e6;border-color:#8ea77a}
.staff-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;grid-column:1/-1}
.staff-groups>.field.full{grid-column:auto}
.packing-plan-grid{grid-template-columns:repeat(2,minmax(0,1fr)) minmax(110px,.65fr);gap:14px}
.packing-plan-grid .field:nth-child(n+4){grid-column:auto}
.packing-plan-grid .scan-row{flex-wrap:wrap}
.packing-plan-grid .scan-row input{min-width:100px;flex:1}
#editor .row-editor{padding:16px;margin:0 0 14px}
#editor .form-grid input[type=checkbox]{width:18px;min-height:18px;height:18px;padding:0;vertical-align:middle;accent-color:var(--green)}
@media(max-width:760px){#editor .form-grid,.staff-groups,.packing-plan-grid{grid-template-columns:1fr}#editor .modal-head h2{font-size:21px}#editor .modal-head,#editor .modal-body,#editor .modal-foot{padding:16px}.staff-groups>.field.full{grid-column:1/-1}.packing-plan-grid .field:last-child{grid-column:auto}}
