body:not(.fleet-access-ready) .side .nav.fleet-nav-v1072{visibility:hidden}
.access-permission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:6px 0 14px}
.access-permission-group{border:1px solid #d7e1e8;border-radius:14px;padding:13px;background:#fff}
.access-permission-group h3{margin:0 0 8px;font-size:13px}
.access-permission-group>div{display:grid;gap:2px}
.access-permission-group label{display:flex;align-items:flex-start;gap:10px;padding:9px 4px;border-top:1px solid #edf1f4;cursor:pointer}
.access-permission-group label:first-child{border-top:0}
.access-permission-group input{width:18px;height:18px;margin-top:1px;accent-color:#ed1b2f}
.access-permission-group span,.access-permission-group b,.access-permission-group small{display:block}
.access-permission-group b{font-size:11px}.access-permission-group small{color:#71818d;font-size:9px;margin-top:2px}
:root[data-theme="dark"] .access-permission-group{background:#121e28;border-color:#2c3c48}
:root[data-theme="dark"] .access-permission-group label{border-color:#263743}
@media(max-width:800px){.access-permission-grid{grid-template-columns:1fr}}

/* Light-mode accessibility for user editor: never inherit the dark admin cards'
   dark backgrounds with near-black text. Scoped to the user-edit surface only. */
:root:not([data-theme="dark"]) .fleet-user-account-card,
:root:not([data-theme="dark"]) .fleet-user-role-card,
:root:not([data-theme="dark"]) .access-quickbar,
:root:not([data-theme="dark"]) .access-permission-group{background:#fff!important;color:#172332!important;border:1px solid #d7e1e8!important}
:root:not([data-theme="dark"]) .fleet-user-account-card :is(h3,label,p,span,b,strong,small),
:root:not([data-theme="dark"]) .fleet-user-role-card :is(h3,label,p,span,b,strong,small),
:root:not([data-theme="dark"]) .access-quickbar :is(h3,label,p,span,b,strong,small),
:root:not([data-theme="dark"]) .access-permission-group :is(h3,label,p,span,b,strong,small){color:#172332!important}
:root:not([data-theme="dark"]) .access-permission-group .access-page-row,
:root:not([data-theme="dark"]) .access-permission-group .access-group-toggle{border-color:#e5ebf1!important}
:root:not([data-theme="dark"]) .access-permission-group small,
:root:not([data-theme="dark"]) .fleet-user-role-card .muted{color:#52677b!important}
:root:not([data-theme="dark"]) .fleet-user-account-card input:not([type="checkbox"]),
:root:not([data-theme="dark"]) .fleet-user-role-card select{color:#152130!important;background:#fff!important;border:1px solid #bbc9d6!important}
:root:not([data-theme="dark"]) .fleet-user-account-card .btn,
:root:not([data-theme="dark"]) .fleet-user-role-card .btn,
:root:not([data-theme="dark"]) .access-quickbar .btn{background:#f7fafc!important;color:#172332!important;border:1px solid #c8d5e0!important}
.access-permission-grid .access-page-row{min-height:42px}
.access-permission-grid .access-page-row input{flex:none}
@media(max-width:960px){.fleet-user-edit-grid,.access-permission-grid{grid-template-columns:1fr!important}}


/* Light Fleet user/role administration: correct the accidental dark-card
   override. Keep dark mode independent and honor either supported theme hook. */
:root:not([data-theme="dark"]) .fleet-user-account-card,
:root:not([data-theme="dark"]) .fleet-user-role-card,
:root:not([data-theme="dark"]) .fleet-role-card{
  background:#f4f8fc!important;color:#172536!important;
  border:1px solid #c8d6e2!important;border-radius:14px;
}
:root:not([data-theme="dark"]) .fleet-user-account-card :is(h3,label,p,span,b,strong,small),
:root:not([data-theme="dark"]) .fleet-user-role-card :is(h3,label,p,span,b,strong,small),
:root:not([data-theme="dark"]) .fleet-role-card :is(h3,label,p,span,b,strong,small){
  color:#182b40!important;
}
:root:not([data-theme="dark"]) .fleet-role-card .fleet-role-title b{font-size:17px;font-weight:800}
:root:not([data-theme="dark"]) .fleet-role-card p{font-size:14px;line-height:1.5;color:#354a60!important}
:root:not([data-theme="dark"]) .fleet-role-card .badge{
  background:#e6eef6!important;color:#223d56!important;border:1px solid #b8cbdc!important;
}
:root:not([data-theme="dark"]) .fleet-user-account-card input:not([type="checkbox"]),
:root:not([data-theme="dark"]) .fleet-user-role-card :is(input:not([type="checkbox"]),select){
  background:#fff!important;color:#172536!important;border:1px solid #9fb2c5!important;
  font-size:15px;
}
:root:not([data-theme="dark"]) .fleet-user-account-card .btn,
:root:not([data-theme="dark"]) .fleet-user-role-card .btn,
:root:not([data-theme="dark"]) .fleet-role-card .btn{
  background:#fff!important;color:#182b40!important;border:1px solid #adbed0!important;
  min-height:37px;font-size:13px;font-weight:750;
}
:root:not([data-theme="dark"]) .fleet-user-role-card .muted,
:root:not([data-theme="dark"]) .fleet-user-account-card .muted{color:#415b73!important}
:root:not([data-theme="dark"]) .fleet-user-account-card,
:root:not([data-theme="dark"]) .fleet-user-role-card{padding:18px!important}
:root:not([data-theme="dark"]) .fleet-user-account-card h3,
:root:not([data-theme="dark"]) .fleet-user-role-card h3{font-size:18px;font-weight:800}


/* Strong visual hierarchy for Users & Permissions in dark mode. */
.fleet-users-readable .table th,.fleet-users-readable .table td{font-size:13px!important;padding:13px 14px!important;line-height:1.5}
.fleet-users-readable .table td:first-child b{font-size:15px!important;font-weight:800}
.fleet-users-readable .table td small{font-size:12px!important;line-height:1.45}
.fleet-users-readable .account-notice{font-size:13px!important;line-height:1.55}
:root[data-theme="dark"] .fleet-users-readable{background:#172636!important;border:1px solid #3b5063!important;color:#f1f5f9!important}
:root[data-theme="dark"] .fleet-users-readable .account-notice{background:#253748!important;border:1px solid #476178!important;color:#e0eaf4!important}
:root[data-theme="dark"] .fleet-users-readable .account-notice b{color:#fff!important}
:root[data-theme="dark"] .fleet-users-readable .table{background:#1b2b3b!important;color:#f2f6fb!important}
:root[data-theme="dark"] .fleet-users-readable .table thead th{background:#2a4157!important;color:#f6f9fc!important;border-color:#506779!important;font-weight:850!important}
:root[data-theme="dark"] .fleet-users-readable .table tbody tr{background:#192938!important;color:#edf3f9!important}
:root[data-theme="dark"] .fleet-users-readable .table tbody tr:nth-child(even){background:#213447!important}
:root[data-theme="dark"] .fleet-users-readable .table tbody tr:hover{background:#314a60!important}
:root[data-theme="dark"] .fleet-users-readable .table td{color:#f0f6fb!important;border-color:#40596c!important}
:root[data-theme="dark"] .fleet-users-readable .table td :is(b,strong){color:#fff!important}
:root[data-theme="dark"] .fleet-users-readable .table td small{color:#cad8e6!important}
:root[data-theme="dark"] .fleet-users-readable .table .badge{border:1px solid #658398!important;font-weight:850!important}
:root[data-theme="dark"] .fleet-users-readable .row-actions .btn{background:#2b4054!important;border:1px solid #658098!important;color:#f7fafc!important;min-height:35px!important;font-weight:800!important}
:root[data-theme="dark"] .fleet-users-readable .row-actions .btn:hover{background:#395873!important}
:root[data-theme="dark"] .fleet-user-account-card,
:root[data-theme="dark"] .fleet-user-role-card,
:root[data-theme="dark"] .fleet-role-card,
:root[data-theme="dark"] .access-quickbar,
:root[data-theme="dark"] .access-permission-group{background:#1d2f40!important;border:1px solid #486078!important;color:#f4f8fc!important}
:root[data-theme="dark"] .fleet-user-account-card :is(h3,label,p,span,b,strong),
:root[data-theme="dark"] .fleet-user-role-card :is(h3,label,p,span,b,strong),
:root[data-theme="dark"] .fleet-role-card :is(h3,label,p,span,b,strong),
:root[data-theme="dark"] .access-permission-group :is(h3,label,span,b,strong){color:#eff6fc!important}
:root[data-theme="dark"] .fleet-user-account-card :is(small,.muted),
:root[data-theme="dark"] .fleet-user-role-card :is(small,.muted),
:root[data-theme="dark"] .fleet-role-card :is(small,.muted),
:root[data-theme="dark"] .access-permission-group small{color:#c5d6e4!important;font-size:11px!important}
:root[data-theme="dark"] .access-permission-group label{border-top-color:#41596d!important;min-height:44px!important}
:root[data-theme="dark"] .fleet-user-account-card input:not([type="checkbox"]),
:root[data-theme="dark"] .fleet-user-role-card :is(input:not([type="checkbox"]),select){background:#101f2d!important;color:#fff!important;border:1px solid #6b839a!important;font-size:15px!important}
:root[data-theme="dark"] .fleet-user-account-card input::placeholder{color:#acc2d3!important}
:root[data-theme="dark"] .fleet-user-account-card .btn,
:root[data-theme="dark"] .fleet-user-role-card .btn,
:root[data-theme="dark"] .fleet-role-card .btn,
:root[data-theme="dark"] .access-quickbar .btn{background:#2e455b!important;color:#fff!important;border:1px solid #718ba0!important;min-height:36px;font-size:13px;font-weight:750}


/* Compact three-stage Fleet user editor: the navigation and Save bar stay in
   view while only the current account/role/permission pane can scroll.
   These selectors do not change the independent Fleet role editor. */
#modal .modal-card.fleet-tabbed-user-modal{
  width:min(980px,calc(100vw - 24px))!important;
  max-width:calc(100vw - 24px)!important;
  height:min(735px,calc(100dvh - 30px));
  min-height:0;
  max-height:calc(100dvh - 30px)!important;
  padding:0!important;
  overflow:hidden!important;
  display:flex;
  flex-direction:column;
  border-radius:14px;
}
.fleet-user-editor-shell{min-height:0;flex:1;display:flex;flex-direction:column;overflow:hidden;color:var(--text,#192d40)}
.fleet-user-editor-heading{flex:none;margin:0!important;padding:17px 22px 12px!important;border-bottom:1px solid var(--border,#d5e0e9)}
.fleet-user-editor-heading h2{margin:0!important}
.fleet-user-editor-heading p{margin:5px 0 0;color:var(--muted,#52677b)}
.fleet-user-primary-tabs{flex:none;display:flex;align-items:stretch;gap:5px;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:thin;padding:9px 18px 0;background:var(--panel,#fff);border-bottom:1px solid var(--border,#d5e0e9)}
.fleet-user-primary-tabs button{flex:none;display:inline-flex;align-items:center;gap:7px;font-weight:750;color:var(--muted,#536777);background:transparent;border:0;border-radius:7px 7px 0 0;border-bottom:3px solid transparent;min-height:43px;padding:10px 16px;cursor:pointer}
.fleet-user-primary-tabs button:is(:hover,:focus-visible){background:color-mix(in srgb,var(--accent,#e8273c) 8%,var(--panel,#fff))}
.fleet-user-primary-tabs button.is-active{color:var(--text,#192d40);border-bottom-color:#ed1b2f;background:color-mix(in srgb,#ed1b2f 5%,var(--panel,#fff))}
.fleet-user-primary-tabs [data-fleet-enabled-summary]{font-size:10px;border-radius:20px;background:var(--background,#eef3f7);border:1px solid var(--border,#d5e0e9);padding:3px 6px}
.fleet-user-editor-scroll{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;padding:17px 22px 19px;scrollbar-width:thin}
.fleet-user-pane[hidden],.fleet-user-editor-shell .access-permission-group[hidden]{display:none!important}
.fleet-user-editor-shell .fleet-user-edit-grid{display:block;margin:0}
.fleet-user-editor-shell .fleet-user-account-card,.fleet-user-editor-shell .fleet-user-role-card{max-width:100%;min-height:0!important;margin:0;padding:17px!important}
.fleet-user-editor-shell .fleet-user-account-card .access-card-title{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.fleet-user-editor-shell .fleet-user-account-card .access-card-title h3{margin:0}
.fleet-user-editor-shell .fleet-user-account-card .access-card-title .row-actions{justify-content:flex-end}
.fleet-user-editor-shell .fleet-user-account-card .form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.fleet-user-editor-shell .fleet-user-account-card .form-grid .span2{grid-column:1 / -1}
.fleet-user-editor-shell .fleet-user-account-card .form-grid input:not([type="checkbox"]){width:100%;min-width:0}
.fleet-user-editor-shell .fleet-user-role-card{display:grid;gap:12px}
.fleet-user-editor-shell .fleet-user-role-card p{max-width:75ch}
.fleet-user-editor-shell .fleet-user-role-card .row-actions{align-items:center}
.fleet-user-editor-shell .fleet-role-tip{padding:12px 14px;background:color-mix(in srgb,var(--panel,#fff) 82%,#e7eef4);border:1px solid var(--border,#c6d5e2);border-radius:9px;line-height:1.5}
.fleet-access-category-tabs{position:sticky;z-index:3;top:-17px;display:flex;align-items:stretch;gap:6px;max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:thin;padding:10px 1px;border-bottom:1px solid var(--border,#ccd9e4);background:var(--panel,#fff)}
.fleet-access-category-tabs button{flex:none;display:inline-flex;align-items:center;gap:7px;border:1px solid var(--border,#c7d7e5);background:var(--panel,#fff);border-radius:8px;padding:8px 12px;min-height:38px;color:var(--text,#1a3145);font-size:12px;white-space:nowrap;font-weight:700}
.fleet-access-category-tabs button.is-active{color:#fff;background:#1d486b;border-color:#1d486b}
.fleet-access-tab-count{font-size:10px;font-weight:800;border-radius:20px;background:color-mix(in srgb,#8095aa 20%,transparent);padding:2px 6px}
.fleet-user-editor-shell .access-quickbar{flex-wrap:wrap;margin:13px 0;padding:11px 13px}
.fleet-user-editor-shell .access-quickbar>.muted{flex:1 1 160px}
.fleet-user-editor-shell .access-permission-grid{display:block!important;margin:0;padding:0!important}
.fleet-user-editor-shell .access-permission-group{max-width:100%;padding:0!important;margin:0!important}
.fleet-user-editor-shell .access-page-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.fleet-user-editor-shell .access-page-row{min-height:44px!important;padding:10px 12px!important}
.fleet-user-editor-shell .access-page-row input{flex:none}
.fleet-user-editor-shell .fleet-access-information{font-size:12px;line-height:1.5;margin:13px 0 0}
.fleet-user-editor-footer{flex:none;padding:10px 20px 13px;background:var(--panel,#fff);border-top:1px solid var(--border,#d5e0e9);box-shadow:0 -5px 18px #0c26400a}
.fleet-user-editor-footer #access-save-error:empty{display:none}
.fleet-user-editor-footer #access-save-error:not(:empty){margin-bottom:6px}
.fleet-user-editor-footer .modal-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin:0!important}
.fleet-user-editor-footer .modal-actions [data-access-action="save-user-access"]{min-width:120px}
.fleet-user-editor-shell button:focus-visible{outline:2px solid #147cbe!important;outline-offset:2px}
:root[data-theme="dark"] .fleet-user-primary-tabs button.is-active{color:#fff}
:root[data-theme="dark"] .fleet-access-category-tabs button.is-active{color:#fff}
@media(max-width:680px){
 #modal .modal-card.fleet-tabbed-user-modal{height:calc(100dvh - 48px)!important;max-height:calc(100dvh - 48px)!important;width:calc(100vw - 48px)!important;max-width:calc(100vw - 48px)!important;min-width:0!important;box-sizing:border-box!important;margin:0!important}
 .fleet-user-editor-heading{padding:12px 14px 9px!important}
 .fleet-user-primary-tabs{padding:5px 8px 0;gap:2px}
 .fleet-user-primary-tabs button{padding:8px 12px;min-height:40px;font-size:12px}
 .fleet-user-editor-scroll{padding:12px 13px}
 .fleet-access-category-tabs{top:-12px}
 .fleet-user-editor-shell .fleet-user-account-card .form-grid,.fleet-user-editor-shell .access-page-list{grid-template-columns:1fr}
 .fleet-user-editor-shell .fleet-user-account-card .access-card-title{align-items:flex-start}
 .fleet-user-editor-shell .fleet-user-account-card .access-card-title .row-actions{justify-content:flex-start}
 .fleet-user-editor-footer{padding:9px 12px}
 .fleet-user-editor-footer .modal-actions{gap:6px}
}


/* Users & Permissions: the Actions TD must retain normal table geometry.
   The old 'td.row-actions { display:flex }' made its border/background a
   separate, vertically offset flex box while the other four cells determined
   row height. Only the nested child is allowed to use flex. */
.fleet-users-readable .table{border-collapse:collapse;width:100%}
.fleet-users-readable .table tbody tr{display:table-row!important}
.fleet-users-readable .table thead th,
.fleet-users-readable .table tbody td{display:table-cell!important;vertical-align:middle!important;box-sizing:border-box}
.fleet-users-readable .table tbody td.fleet-user-actions-cell{min-width:270px}
.fleet-users-readable .table .fleet-user-actions-cell>.row-actions{
  display:flex!important;align-items:center;justify-content:flex-start;
  gap:7px;flex-wrap:wrap;min-width:0;margin:0;padding:0;
}
.fleet-users-readable .table .fleet-user-actions-cell .btn{white-space:nowrap}
.fleet-users-readable .table tbody tr td{border-bottom:1px solid var(--line,#cbd8e3)}
.fleet-users-readable .table tbody tr:last-child td{border-bottom:0}
:root[data-theme="dark"] .fleet-users-readable .table tbody tr td{border-bottom-color:#40596c!important}

/* Protected administrator grants are viewable, never editable. Access
   indicators are actual server-derived effective grants, not toggle inputs. */
#modal .modal-card.fleet-super-permissions-modal{
  width:min(900px,calc(100vw - 28px))!important;
  max-width:calc(100vw - 28px)!important;
  max-height:min(82dvh,850px)!important;
  overflow-y:auto!important;
}
.fleet-super-access-view{display:grid;gap:15px;min-width:0;color:var(--ink,#172536)}
.fleet-super-access-view>.modal-head{margin:0}
.fleet-super-access-view .notice{line-height:1.6}
.fleet-super-access-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.fleet-super-access-group{min-width:0;border:1px solid var(--line,#cbd8e3);border-radius:12px;overflow:hidden;background:var(--card,#fff)}
.fleet-super-access-group h3{display:flex;align-items:baseline;justify-content:space-between;gap:10px;font-size:15px;margin:0;padding:12px 14px;background:color-mix(in srgb,currentColor 4%,transparent);border-bottom:1px solid var(--line,#cbd8e3)}
.fleet-super-access-group h3 small{font-size:11px;white-space:nowrap;font-weight:650;color:var(--muted,#607285)}
.fleet-super-access-items{display:grid}
.fleet-super-access-item{display:grid;grid-template-columns:20px minmax(0,1fr) auto;align-items:start;gap:9px;padding:9px 12px;border-bottom:1px solid color-mix(in srgb,currentColor 10%,transparent);font-size:12px;line-height:1.4}
.fleet-super-access-item:last-child{border-bottom:0}
.fleet-super-access-icon{font-weight:900;color:#15865c;text-align:center}
.fleet-super-access-item strong{font-size:11px;white-space:nowrap;font-weight:750}
.fleet-super-access-item strong.is-granted{color:#14845b}
.fleet-super-access-item strong.is-ungranted{color:#a44d4d}
.fleet-super-access-view>.modal-actions{display:flex;justify-content:flex-end}
:root[data-theme="dark"] .fleet-super-access-view{color:#f0f6fb}
:root[data-theme="dark"] .fleet-super-access-group{background:#1d2f40;border-color:#425c70}
:root[data-theme="dark"] .fleet-super-access-group h3{border-bottom-color:#425c70}
:root[data-theme="dark"] .fleet-super-access-group h3 small{color:#c5d4e0}
:root[data-theme="dark"] .fleet-super-access-icon,
:root[data-theme="dark"] .fleet-super-access-item strong.is-granted{color:#71e8b4}
:root[data-theme="dark"] .fleet-super-access-item strong.is-ungranted{color:#ffacac}
@media(max-width:800px){
 .fleet-super-access-groups{grid-template-columns:1fr}
 .fleet-users-readable .table tbody td.fleet-user-actions-cell{min-width:230px}
}
