.scope-panel{min-width:0}
.scope-table .scope-assignee{width:100%;min-width:0;min-height:44px;padding:6px;font-size:13px;box-sizing:border-box}
.employee-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.employee-fields label{display:flex;flex-direction:column;gap:6px;font-size:13px}
.employee-fields input{width:100%;min-width:0;min-height:44px;box-sizing:border-box}
.employee-row-actions{display:flex;flex-wrap:wrap;gap:8px}
.employee-row-actions button{min-height:44px}
.employee-panel .scope-error{color:var(--destructive)}
#employee-message{min-height:24px;margin:12px 0}
#employee-history{margin-top:20px;overflow-wrap:anywhere}
#employee-history summary{padding:12px 0;cursor:pointer}
@media(max-width:1024px){.employee-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.employee-fields{grid-template-columns:1fr}.scope-table .scope-assignee{font-size:16px}.employee-fields input{font-size:16px}}
.scope-menu-link{min-height:44px;width:100%;white-space:normal;cursor:pointer}
.item-menu-rule-dialog{width:min(850px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:90dvh;box-sizing:border-box;overflow:auto;padding:20px;border:1px solid var(--border);border-radius:8px;background:var(--card);color:var(--foreground);font-family:var(--font-sans);font-size:14px}
.item-menu-rule-dialog::backdrop{background:rgb(0 0 0/.4)}
.item-menu-rule-dialog header{display:flex;justify-content:space-between;align-items:start;gap:12px;position:sticky;top:0;z-index:2;background:var(--card);padding:10px 0;border-bottom:1px solid var(--border)}
.item-menu-rule-dialog h2{font-size:18px;margin:0 0 6px}
.item-menu-rule-dialog header button{flex:none;min-width:64px;white-space:nowrap}
.menu-rule-help summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-size:13px;color:var(--primary)}
.item-menu-rule-dialog header p{margin:0;overflow-wrap:anywhere}
.item-menu-rule-dialog button{min-height:44px;padding:8px 12px;border:1px solid var(--border);border-radius:6px;background:var(--card);color:var(--foreground);cursor:pointer;white-space:normal}
.item-menu-rule-dialog button:disabled{opacity:.5;cursor:not-allowed}
.menu-rule-toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:end;margin:16px 0}
.menu-rule-toolbar label{display:grid;gap:6px;flex:1 1 180px}
.item-menu-rule-dialog input,.item-menu-rule-dialog select{width:100%;min-width:0;min-height:44px;box-sizing:border-box;border:1px solid var(--border);border-radius:6px;background:var(--card);color:var(--foreground);padding:8px;font-size:14px}
.item-menu-rule-dialog :is(button,input,select):focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.menu-rule-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:13px}
.menu-rule-table th:first-child{width:54%}.menu-rule-table th:nth-child(2){width:18%}
.menu-rule-table :is(th,td){padding:10px 8px;border:1px solid var(--border);text-align:left;vertical-align:middle;overflow-wrap:anywhere}
.menu-rule-table th{background:var(--secondary)}
.menu-rule-table td label{display:flex;gap:10px;align-items:center;min-height:44px;cursor:pointer}
.menu-rule-table input[type=checkbox]{width:18px;height:18px;min-height:0;flex:none;accent-color:var(--primary)}
.menu-rule-table small{display:block;color:var(--muted-foreground);font-size:12px;margin-top:4px;font-variant-numeric:tabular-nums}
#menu-rule-error{color:var(--destructive);font-size:13px}#menu-rule-error:empty{display:none}
.item-menu-rule-dialog footer{display:flex;gap:8px;flex-wrap:wrap;align-items:center;padding:12px 0;margin-top:8px;position:sticky;bottom:0;z-index:2;background:var(--card);border-top:1px solid var(--border)}
.menu-rule-table input,.menu-rule-table select{scroll-margin-top:120px;scroll-margin-bottom:120px}
.item-menu-rule-dialog footer>span{flex:1}
.item-menu-rule-dialog #menu-rule-apply{background:var(--primary);color:var(--primary-foreground);border-color:var(--primary)}
@media(max-width:600px){.item-menu-rule-dialog footer [data-menu-rule-cancel]{display:none}}
@media(max-width:600px){.item-menu-rule-dialog{padding:12px}.menu-rule-table th:first-child{width:46%}.menu-rule-table th:nth-child(2){width:20%}.menu-rule-table :is(th,td){padding:8px 4px;font-size:12px}.item-menu-rule-dialog input,.item-menu-rule-dialog select{font-size:16px;padding:6px}.item-menu-rule-dialog footer>span{display:none}.item-menu-rule-dialog footer button{flex:1 1 120px}}
#catalog-code-editor{margin:16px 0;border:1px solid var(--border);border-radius:6px;padding:12px}
#catalog-code-editor summary{cursor:pointer;font-size:13px}
#catalog-code-editor label{display:block;margin-top:12px;font-size:13px}
#ingredient-list-codes{display:block;width:100%;box-sizing:border-box;margin-top:8px;min-height:180px}
.scope-help{margin:0 0 16px;color:var(--foreground);font-size:14px}
.scope-toolbar{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px;margin:12px 0}
.scope-toolbar label{display:flex;flex-direction:column;gap:5px;font-size:12px;color:var(--muted-foreground)}
.scope-toolbar input,.scope-toolbar select{max-width:100%;min-width:180px}
.scope-toolbar button{min-height:38px}
#scope-save{background:var(--primary);color:var(--primary-foreground);border:1px solid var(--primary)}
#scope-save:disabled{opacity:.5;cursor:not-allowed}
#scope-meta,#scope-count,.scope-note{font-size:12px;color:var(--muted-foreground);overflow-wrap:anywhere}
#scope-message{min-height:24px;font-size:13px;margin:12px 0}
#scope-message.scope-error{color:var(--destructive)}
#scope-table{overflow:visible;max-height:none}
.scope-table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:13px}
.scope-table caption{text-align:left}
.scope-table caption.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.scope-table th,.scope-table td{border:1px solid var(--border);padding:9px 10px;text-align:left;vertical-align:middle;overflow-wrap:anywhere}
.scope-table th{background:var(--secondary);font-weight:600}
.scope-table td small{display:block;font-size:11px;color:var(--muted-foreground)}
.scope-table input[type=text]{width:100%;min-width:0;box-sizing:border-box;padding:8px;background:var(--card);font-size:13px}
.scope-table .scope-check{display:flex;gap:9px;align-items:center;min-height:36px;cursor:pointer;white-space:nowrap}
.scope-table .scope-check input{width:18px;height:18px;min-height:0;flex:none;cursor:pointer;accent-color:var(--primary)}
.purpose-matrix .purpose-cell .scope-check{justify-content:center;min-width:44px;min-height:44px}
.scope-check .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.scope-table .is-excluded td{background:var(--secondary)}
.scope-table .is-changed td:first-child{box-shadow:inset 3px 0 var(--primary)}
.scope-table input[aria-invalid=true]{border-color:var(--destructive);outline:2px solid var(--destructive)}
#scope-history{margin-top:20px}
#scope-history summary{cursor:pointer;color:var(--muted-foreground);padding:10px 0}
#scope-history h3{font-size:13px;margin:18px 0 8px}
.scope-saving #scope-table{opacity:.7}
.scope-bulk-summary{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:12px 0;font-size:13px}
.scope-bulk-summary button,.scope-bulk-buttons button{min-height:44px;cursor:pointer}
.scope-bulk-buttons{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.scope-bulk-buttons button{flex:1 1 60px;min-width:0;padding:6px;font-size:12px;white-space:normal;line-height:1.4;background:var(--card)}
.scope-purpose-heading{text-align:center!important}
.scope-purpose-heading .scope-bulk-buttons{flex-direction:column}
.scope-purpose-heading .scope-bulk-buttons button{flex:none;width:100%}
.scope-bulk-buttons button:disabled,.scope-bulk-summary button:disabled{opacity:.5;cursor:not-allowed}
.scope-bulk-mobile{display:none}
@media(max-width:760px){
 .scope-bulk-mobile{display:grid;gap:12px;margin:12px 0}
 .scope-bulk-mobile>div{border:1px solid var(--border);border-radius:6px;padding:12px;font-size:13px}
 .scope-bulk-mobile .scope-bulk-buttons{margin-top:8px}
 .scope-toolbar label{width:100%}
 .scope-toolbar input,.scope-toolbar select{width:100%;min-width:0}
 .scope-toolbar button{min-height:44px}
 .scope-table colgroup,.scope-table thead{display:none}
 .scope-table,.scope-table tbody,.scope-table tr,.scope-table td{display:block;width:100%;box-sizing:border-box}
 .scope-table tr{border:1px solid var(--border);margin:10px 0;border-radius:6px}
 .scope-table td{display:grid;grid-template-columns:100px minmax(0,1fr);gap:10px;border:0;border-bottom:1px solid var(--border);font-size:14px}
 .scope-table td::before{content:attr(data-label);color:var(--muted-foreground);font-size:12px}
 .scope-table td:last-child{border-bottom:0}
 .scope-table td small{grid-column:2}
 .scope-table .scope-check{min-height:44px}
}
