#batch-panel td small { display:block; margin-top:4px; color:#5d778a; }
#batch-panel .fields { gap:16px; }
#batch-panel .table-wrap { overscroll-behavior-x:contain; }
#batch-panel #batch-preview-area table { table-layout:fixed; width:100%; min-width:560px; }
#batch-panel #batch-preview-area th:first-child { width:24%; }
#batch-panel #batch-preview-area th:nth-child(2),
#batch-panel #batch-preview-area th:last-child { width:38%; }
#batch-panel #batch-preview-area td:last-child { width:auto; white-space:normal; }
#batch-panel #batch-preview-area td { overflow-wrap:anywhere; }
#batch-panel #batch-depts label { font-size:14px; }
#batch-panel #batch-depts { gap:8px 14px!important; padding:8px!important; }
#batch-panel #batch-depts input { flex-shrink:0; }

/* Function permissions fit the content pane; growing levels wrap vertically. */
#permissions-app > .panel:not(#batch-panel) .table-wrap { overflow:visible; min-width:0; }
#permissions-app > .panel:not(#batch-panel) table { width:100%; min-width:0; table-layout:fixed; }
#permissions-app > .panel:not(#batch-panel) th:first-child { width:25%; }
#permissions-app > .panel:not(#batch-panel) th:nth-child(2) { width:calc(75% - 320px); }
#permissions-app > .panel:not(#batch-panel) th:nth-child(3) { width:140px; }
#permissions-app > .panel:not(#batch-panel) th:last-child { width:180px; }
#permissions-app > .panel:not(#batch-panel) td { overflow-wrap:anywhere; }
#permissions-app > .panel:not(#batch-panel) td fieldset { min-inline-size:0; max-width:100%; }
#permissions-app > .panel:not(#batch-panel) td fieldset label { margin:6px 0; }
#permissions-app > .panel:not(#batch-panel) td small { display:block; margin-top:6px; }
#permissions-app > .panel:not(#batch-panel) td:last-child { text-align:right; padding-right:18px; }
#permissions-app > .panel:not(#batch-panel) button[data-save] { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
@media(max-width:1100px) {
  #permissions-app > .panel:not(#batch-panel) thead { display:none; }
  #permissions-app > .panel:not(#batch-panel) tbody { display:grid; gap:18px; }
  #permissions-app > .panel:not(#batch-panel) tr { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); border:1px solid #c5e1ef; border-radius:16px; padding:12px; }
  #permissions-app > .panel:not(#batch-panel) td { min-width:0; border:0; padding:8px; }
  #permissions-app > .panel:not(#batch-panel) td:nth-child(-n+2) { grid-column:1/-1; }
  #permissions-app > .panel:not(#batch-panel) td:nth-child(3)::before { content:'最後更新：'; display:block; color:#5d778a; font-size:12px; }
  #permissions-app > .panel:not(#batch-panel) td:last-child { align-self:end; padding-right:12px; }
}
