#accessPanel { width: min(1120px, calc(100vw - 32px)); max-width: none; height: min(740px, calc(100dvh - 32px)); max-height: none; padding: 0; border: 1px solid #c6d6d8; border-radius: 8px; color: #203032; background: white; }
#accessPanel::backdrop { background: #10202b70; }
#accessPanel[open] { display: flex; flex-direction: column; }
.access-header, .access-toolbar { display:flex; align-items:center; gap:12px; padding:14px 18px; border-bottom:1px solid #d7e2e6; flex-wrap:wrap; }
.access-header h2 { margin:0; font-size:18px; flex:1; }
.access-toolbar input { width:220px; max-width:100%; }
.access-toolbar [data-action="create"] { margin-left:auto; }
#accessPanel input:not([type="checkbox"]), #accessPanel select { min-height:34px; border:1px solid #c6d6d8; border-radius:6px; padding:6px 10px; font:inherit; background:white; color:inherit; }
#accessPanel input:focus-visible, #accessPanel select:focus-visible { outline:2px solid #08766a; outline-offset:1px; }
.access-content { display:flex; flex:1; min-height:0; overflow:auto; }
.access-list { flex:1; min-width:0; overflow:auto; }
#accessPanel table { width:100%; table-layout:auto; border-collapse:collapse; }
#accessPanel th, #accessPanel td { padding:10px 12px; text-align:left; border-bottom:1px solid #dfe6eb; white-space:normal; overflow-wrap:anywhere; }
#accessPanel th { position:sticky; top:0; background:#e0efeb; font-size:12px; z-index:1; }
#accessPanel td { font-size:13px; }
#accessPanel td:last-child { width:110px; }
.access-editor { width:330px; flex-shrink:0; padding:18px; border-left:1px solid #d7e2e6; overflow:auto; }
.access-editor h3 { margin:0 0 16px; font-size:16px; }
.access-field { display:grid; gap:6px; margin-bottom:14px; }
.access-field input,.access-field select { width:100%; min-width:0; }
.access-check { display:flex; gap:8px; align-items:center; margin:14px 0; }
.access-check input { width:16px; height:16px; flex:none; }
.access-form-actions { display:flex; gap:8px; margin-top:20px; }
.access-status { min-height:34px; padding:8px 18px; color:#a52828; border-top:1px solid #d7e2e6; }
.access-muted { color:#65727c; }
.access-active { color:#08766a; }
body.access-readonly #importExcel, body.access-readonly #addManual, body.access-readonly #splitExpense,
body.access-readonly #assignRoute, body.access-readonly #excludeRoute, body.access-readonly #editRoutePoints,
body.access-readonly #confirmRouteChanges, body.access-readonly #importRcDirectory, body.access-readonly #addRcDirectoryRow,
body.access-readonly #saveRcDirectory, body.access-readonly #addTkDirectoryRow, body.access-readonly #toggleDbEdit,
body.access-readonly #saveDbView, body.access-readonly .floating-row-actions, body.access-readonly .row-actions { display:none !important; }
@media(max-width:760px) {
  #accessPanel { width:calc(100vw - 16px); height:calc(100dvh - 16px); }
  .access-content { flex-direction:column; }
  .access-list { min-height:180px; flex:1 0 200px; }
  .access-editor { width:100%; border-left:0; border-top:1px solid #d7e2e6; overflow:visible; }
  .access-toolbar [data-action="create"] { margin-left:0; }
  #accessPanel table { min-width:600px; }
}
#accessPanel fieldset { border:1px solid #cbdad6; border-radius:6px; margin:10px 0; padding:10px; min-width:0; }
#accessPanel legend { font-weight:700; padding:0 4px; }
#accessPanel .access-effective { font-size:12px; overflow-wrap:anywhere; }
.access-denied { display:none !important; }
.access-rc-options { max-height:180px; overflow:auto; }
.access-rc-options .access-check[hidden], .access-rc-scope[hidden] { display:none; }
#accessPanel { overflow:hidden; }
.access-header,.access-toolbar,.access-status { flex-shrink:0;min-width:0;overflow-wrap:anywhere; }
.access-content { overflow:hidden; }
.access-editor:not([hidden]) { display:flex;flex-direction:column;min-height:0;min-width:0;padding:0;overflow:hidden; }
.access-editor-fields { flex:1;min-height:0;min-width:0;overflow:auto;padding:18px;overflow-wrap:anywhere; }
.access-form-actions { flex-shrink:0;margin:0;padding:12px 18px;border-top:1px solid #d7e2e6;background:#fff;flex-wrap:wrap; }
#accessPanel button { max-width:100%;white-space:normal;overflow-wrap:anywhere; }
.access-status { max-height:100px;overflow:auto; }
@media(max-width:760px) {
  .access-content:has(.access-editor:not([hidden])) .access-list { display:none; }
  .access-editor:not([hidden]) { flex:1;width:100%; }
  #accessPanel:has(.access-editor:not([hidden])) .access-toolbar input,
  #accessPanel:has(.access-editor:not([hidden])) .access-toolbar [data-action="create"] { display:none; }
  .access-header,.access-toolbar { padding:10px 12px;gap:8px; }
  .access-editor-fields { padding:12px; }
  .access-form-actions { padding:10px 12px; }
  .access-form-actions button { flex:1;min-width:0; }
}
