.management-navigation{display:flex;align-items:center;flex-wrap:wrap;gap:16px;margin-bottom:var(--s5)}
.management-navigation>.subtabs{margin-bottom:0}
.management-navigation>.management-account-search{margin-left:auto;width:310px;max-width:100%;min-width:0}
.management-account-search input{width:100%;min-width:0;box-sizing:border-box}
@media(max-width:720px){.management-navigation>.management-account-search{width:100%}}
/* Wider permission editor; retain shared dialog colors, spacing and actions. */
dialog.dialog-permissions{width:880px;max-width:calc(100vw - 32px);height:calc(100dvh - 32px);max-height:1160px}
.dialog-permissions .entry-grid{grid-template-columns:minmax(0,1fr)}
.dialog-permissions .position-picker{width:100%;box-sizing:border-box;min-height:min(60dvh,720px)}
.dialog-permissions .position-picker[open]{display:flex;flex-direction:column;height:min(60dvh,720px)}
.dialog-permissions .position-picker summary{flex:none;max-height:140px;overflow:auto}
.dialog-permissions .position-options{flex:1;min-height:0;max-height:none;align-content:start}
.dialog-permissions .permission-editor-content{display:flex;flex-direction:column;gap:16px}
.permission-checkbox-list{border:1px solid #a8b6cd;border-radius:12px;background:#fff;overflow:auto;min-height:120px;flex:1;padding:8px 16px}
.permission-checkbox-list>label{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #e2e8f0;cursor:pointer}
.permission-checkbox-list>label:last-child{border-bottom:0}
.permission-checkbox-list input{width:18px;height:18px;min-height:0;flex:none;accent-color:#245add}
.permission-checkbox-list small{display:block;color:var(--muted);margin-top:3px}
dialog.dialog-staffing{width:520px;max-width:calc(100vw - 32px)}
.dialog-staffing .inline-role-picker{width:100%;box-sizing:border-box}
.dialog-staffing .inline-role-picker .position-options{border-top:0;grid-template-columns:repeat(2,minmax(0,1fr));max-height:300px;min-height:240px;align-content:start;padding:14px 16px;gap:12px 16px}
.dialog-staffing .inline-role-picker .position-options label{min-width:0;align-items:flex-start}
.management-navigation>.management-add-role{margin-left:auto}
.new-role-names{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.new-role-names label{display:grid;gap:8px}
@media(max-width:600px){.new-role-names{grid-template-columns:1fr}}

/* Compact production schedule: full product names, submission-time validation. */
.operation-schedule .schedule-list article.schedule-order-card { position:relative; grid-template-columns:minmax(220px,1fr) minmax(0,1.6fr) auto; padding:42px 14px 14px; }
.schedule-order-card .schedule-main { min-width:0; }
.schedule-order-card .schedule-main strong { white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; line-height:1.5; }
.schedule-order-card .schedule-main small { flex-wrap:wrap; white-space:normal; }
.schedule-order-card .schedule-demand-refresh { position:absolute; top:7px; right:10px; padding:6px; min-height:28px; width:30px; display:grid; place-items:center; }
.schedule-order-card .operation-plan-strip>span { box-sizing:border-box; min-width:172px; flex-shrink:0; }
.schedule-order-card .operation-plan-strip .operation-card-dates { font-size:11px; line-height:1.4; white-space:normal; overflow-wrap:anywhere; }
.schedule-validation-list { padding-left:22px; margin:12px 0; display:grid; gap:10px; line-height:1.5; }
@media(max-width:1100px){.operation-schedule .schedule-list article.schedule-order-card{grid-template-columns:minmax(0,1fr);} .schedule-order-card .schedule-row-actions{justify-content:flex-end;}}

/* Applies to every order and operation card, not a selected record. */
.schedule-order-card .schedule-row-actions { flex-direction:column; align-items:stretch; justify-content:center; }
.schedule-order-card .operation-plan-strip { overflow-x:auto; overflow-y:hidden; padding-bottom:10px; scrollbar-width:thin; scrollbar-color:#9aafca #e7edf5; }
.schedule-order-card .operation-plan-strip::-webkit-scrollbar { height:8px; }
.schedule-order-card .operation-plan-strip::-webkit-scrollbar-track { background:#e7edf5; border-radius:4px; }
.schedule-order-card .operation-plan-strip::-webkit-scrollbar-thumb { background:#9aafca; border-radius:4px; }
.schedule-order-card .operation-plan-strip>span { position:relative; width:184px; min-width:184px; grid-template-columns:20px minmax(0,1fr) auto; align-content:start; }
.schedule-order-card .operation-card-name { grid-column:2; white-space:normal; overflow-wrap:anywhere; }
.schedule-order-card .operation-plan-strip .operation-card-machine { grid-column:3; grid-row:1; align-self:start; justify-self:end; max-width:68px; overflow-wrap:anywhere; white-space:normal; text-align:right; line-height:20px; }
.schedule-order-card .operation-plan-strip .operation-card-dates { grid-column:1/-1; grid-row:2; margin-top:3px; }

/* Explicit overflow control remains visible on systems with overlay scrollbars. */
.schedule-order-card .operation-strip-wrap { min-width:0; width:100%; }
.schedule-order-card .operation-plan-strip>span { width:25ch; min-width:25ch; max-width:25ch; flex:0 0 25ch; }
.schedule-order-card .operation-strip-scrollbar { display:block; appearance:none; -webkit-appearance:none; width:100%; height:14px; min-height:0; margin:2px 0 0; padding:0; border:0; border-radius:7px; background:transparent; cursor:ew-resize; }
.schedule-order-card .operation-strip-scrollbar::-webkit-slider-runnable-track { height:8px; background:#e7edf5; border-radius:4px; }
.schedule-order-card .operation-strip-scrollbar::-webkit-slider-thumb { appearance:none; -webkit-appearance:none; width:48px; height:8px; background:#9aafca; border-radius:4px; }
.schedule-order-card .operation-strip-scrollbar::-moz-range-track { height:8px; background:#e7edf5; border-radius:4px; }
.schedule-order-card .operation-strip-scrollbar::-moz-range-thumb { width:48px; height:8px; background:#9aafca; border:0; border-radius:4px; }
.schedule-order-card .operation-strip-scrollbar:focus-visible { outline:2px solid var(--primary); outline-offset:2px; }

/* One persistent custom scrollbar; hide the duplicate native overlay. */
.schedule-order-card .operation-plan-strip { scrollbar-width:none; padding-bottom:2px; }
.schedule-order-card .operation-plan-strip::-webkit-scrollbar { display:none; height:0; }
.operation-schedule .schedule-list article.schedule-order-card { grid-template-columns:minmax(0,230px) minmax(0,1fr) auto; }
.schedule-order-card .schedule-main { width:100%; max-width:230px; }
.schedule-order-card .schedule-main small { display:block; overflow-wrap:anywhere; line-height:1.5; }
@media(max-width:800px){.operation-schedule .schedule-list article.schedule-order-card{grid-template-columns:minmax(0,1fr);} }
/* 2.0.6: search-first material selection. */
.bom-search-results { max-height:220px; overflow:auto; border:1px solid #d6dfef; border-radius:10px; background:#fff; }
.bom-search-results button { display:block; width:100%; padding:10px; text-align:left; border:0; background:transparent; color:inherit; white-space:normal; }
.bom-search-results button:hover { background:#edf3ff; }

/* 2.0.7: demand action precedes a shorter card viewport on every schedule row. */
.schedule-order-card .schedule-operation-area { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:14px; min-width:0; }
.schedule-operation-area .schedule-demand-toggle { white-space:nowrap; }
.schedule-operation-area .operation-strip-wrap { min-width:0; overflow:hidden; }
.schedule-operation-area .operation-plan-strip>span { box-sizing:border-box; width:25ch; min-width:25ch; max-width:25ch; flex:0 0 25ch; }
@media(max-width:800px){.schedule-order-card .schedule-operation-area{grid-template-columns:minmax(0,1fr);} .schedule-operation-area .schedule-demand-toggle{justify-self:start;}}

/* 2.1.0: operation cards, 22 character units including padding. */
.schedule-operation-area .operation-plan-strip>span { width:22ch; min-width:22ch; max-width:22ch; flex:0 0 22ch; }
