/* ══════════════════════════════════════════════════════════════════════════
   ShapedSocial Access Control
   ──────────────────────────────────────────────────────────────────────────
   Deliberately a copy of SALTO Space's console chrome: a cyan masthead, a
   darker blue menu strip under it, a flat grey table on a near-white card.
   Colours were sampled from the reference screenshot rather than guessed, so
   they are the measured modal values of each band:

     masthead  #0092CD      menu strip #0068A5      card  #F7F7F7
     table head #E4E4E4     rows #FFFFFF / #F4F4F4  accent #10C8A0

   The point of copying it is familiarity: this is an operations console, and
   operations consoles are read at speed by people who already know this shape.
   ══════════════════════════════════════════════════════════════════════════ */

:root{
  --top:#0092CD; --top-d:#007FB4;
  --nav:#0068A5; --nav-h:#015A90; --nav-open:#015081;
  --card:#F7F7F7; --ground:#FFFFFF;
  --thead:#E4E4E4; --thead-b:#C9C9C9;
  --row:#FFFFFF; --row-alt:#F4F4F4; --row-h:#E8F4FB; --row-sel:#D6EBF8;
  --line:#D5D5D5; --line-soft:#E6E6E6;
  --ink:#333333; --ink-2:#555555; --ink-3:#888888;
  --accent:#10C8A0; --deny:#C0392B; --warn:#E08A1E; --ok:#2E9B57;
  --focus:#0092CD;
}

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
/* Neue Helvetica 77 Condensed Bold throughout.
   macOS exposes it as the PostScript name HelveticaNeue-CondensedBold, which
   is the same face Linotype numbers 77. Windows has nothing equivalent and the
   licence does not allow serving it, so Roboto Condensed Bold is self-hosted
   as the fallback: Apache 2.0, redistributable, and the closest free
   grotesque. font-src is 'self' in this site's CSP, so it has to be local. */
@font-face{
  font-family:'AC Condensed';
  src:local('HelveticaNeue-CondensedBold'),
      local('Helvetica Neue Condensed Bold'),
      url('/fonts/RobotoCondensed-Bold.woff2') format('woff2');
  font-weight:700;font-style:normal;font-display:swap;
}
body{
  background:var(--ground); color:var(--ink);
  font:700 12.5px/1.45 'AC Condensed','Helvetica Neue Condensed Bold',
       'Arial Narrow',Tahoma,sans-serif;
  font-stretch:condensed;
  -webkit-font-smoothing:antialiased;
}
/* A condensed bold everywhere leaves nothing to emphasise with, so the
   hierarchy moves to size and colour instead of weight. */
input,select,textarea,button{font-family:inherit;font-weight:inherit;font-stretch:condensed}
a{color:#0a6fa8;text-decoration:none}
a:hover{text-decoration:underline}
[hidden]{display:none!important}
button{font:inherit;cursor:pointer}

/* ── Masthead ────────────────────────────────────────────────────────── */
.masthead{
  background:var(--top); color:#fff; height:52px;
  display:flex;align-items:center;gap:16px;padding:0 18px;position:relative;
}
.masthead .brand{display:flex;align-items:center;gap:10px;flex:0 0 auto}
.masthead .brand img{height:30px;width:auto;display:block}
.masthead .brand .sub{
  font-size:9.5px;letter-spacing:.16em;text-transform:uppercase;
  color:rgba(255,255,255,.85);padding-left:1px;
}
.masthead .spacer{flex:1 1 auto}
.masthead .who{display:flex;align-items:center;gap:9px;font-size:12px;color:#fff}
.masthead .who .avatar{
  width:26px;height:26px;border-radius:3px;background:rgba(255,255,255,.22);
  display:flex;align-items:center;justify-content:center;font-weight:600;font-size:12px;
}
.icon-btn{
  width:30px;height:30px;border:1px solid rgba(255,255,255,.45);background:transparent;
  color:#fff;border-radius:3px;display:flex;align-items:center;justify-content:center;
}
.icon-btn:hover{background:rgba(255,255,255,.16)}
.icon-btn svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.9}

/* ── Menu strip ──────────────────────────────────────────────────────── */
.menubar{background:var(--nav);display:flex;align-items:stretch;padding:0 10px;position:relative;z-index:40}
.menu{position:relative}
.menu > .menu-link{
  background:transparent;color:#fff;font-size:13.5px;
  padding:13px 18px;display:flex;align-items:center;gap:9px;height:100%;text-decoration:none;
}
.menu > .menu-link svg{width:19px;height:19px;flex:0 0 19px;opacity:.95}
.menu > .menu-link:hover{background:var(--nav-h);text-decoration:none}
.menu > .menu-link.on{background:var(--nav-open)}
.menu > button{
  background:transparent;border:0;color:#fff;font-size:13.5px;font-weight:600;
  padding:13px 18px;display:flex;align-items:center;gap:9px;height:100%;
}
.menu > button svg{width:19px;height:19px;flex:0 0 19px;opacity:.95}
.menu > button::after{content:"";border:4px solid transparent;border-top-color:rgba(255,255,255,.85);margin-top:3px}
/* Collapsible category on the assign screens */
.cat-head{cursor:pointer;user-select:none}
.cat-head .chev{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2.4;transition:transform .15s;flex:0 0 14px}
.cat.open .cat-head .chev{transform:rotate(90deg)}
.cat-body{display:none}
.cat.open .cat-body{display:block}
.cat-head .tally{font-size:10.5px;color:var(--ink-3);font-weight:400}
.menu > button:hover{background:var(--nav-h)}
.menu.open > button{background:var(--nav-open)}
.menu .drop{
  position:absolute;top:100%;left:0;min-width:238px;background:#fff;
  border:1px solid var(--line);box-shadow:0 4px 12px rgba(0,0,0,.18);
  padding:4px 0;display:none;
}
.menu.open .drop{display:block}
.menu .drop a{
  display:block;padding:10px 18px;color:var(--ink);font-size:13px;white-space:nowrap;
}
.menu .drop a:hover{background:var(--row-h);text-decoration:none}
.menu .drop a.on{font-weight:600;color:#0a6fa8}
.menu .drop .sep{height:1px;background:var(--line-soft);margin:4px 0}

/* ── Page ────────────────────────────────────────────────────────────── */
.page{padding:22px 26px 40px}
.panel{background:var(--card);border:1px solid var(--line);padding:0 0 10px}
.panel-head{display:flex;align-items:center;gap:10px;padding:14px 16px 12px}
.panel-head svg{width:22px;height:22px;stroke:var(--ink-2);fill:none;stroke-width:1.7}
.panel-head h1{font-size:19px;font-weight:600;color:var(--ink)}
.panel-head .count{font-size:11.5px;color:var(--ink-3);margin-left:2px}
.panel-head .spacer{flex:1}

.toolbar{display:flex;align-items:center;gap:8px;padding:0 16px 12px;flex-wrap:wrap}
.btn{
  background:#fff;border:1px solid var(--line);color:var(--ink);
  padding:5px 11px;border-radius:2px;font-size:12px;display:inline-flex;align-items:center;gap:6px;
}
.btn:hover:not(:disabled){background:#f0f0f0}
.btn:disabled{opacity:.5;cursor:default}
.btn svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2}
.btn.primary{background:var(--top);border-color:var(--top-d);color:#fff}
.btn.primary:hover:not(:disabled){background:var(--top-d)}
.btn.danger{color:var(--deny);border-color:#E0B4AE}
.btn.danger:hover:not(:disabled){background:#FBEFEE}
.search{
  border:1px solid var(--line);background:#fff;padding:5px 9px;font-size:12px;
  min-width:220px;border-radius:2px;color:var(--ink);
}
.search:focus{outline:1px solid var(--focus);outline-offset:-1px}

/* ── Table ───────────────────────────────────────────────────────────── */
.tablewrap{margin:0 10px;border:1px solid var(--line);background:#fff;overflow-x:auto}
table.grid{border-collapse:collapse;width:100%;min-width:900px}
table.grid thead th{
  background:var(--thead);border-right:1px solid var(--thead-b);
  border-bottom:1px solid var(--thead-b);
  padding:6px 9px;text-align:left;font-size:11px;font-weight:600;
  text-transform:uppercase;letter-spacing:.04em;color:#4a4a4a;white-space:nowrap;
  position:sticky;top:0;z-index:2;
}
table.grid thead th .th{display:flex;align-items:center;gap:6px}
table.grid thead th .sortbox{
  width:15px;height:15px;display:none;align-items:center;justify-content:center;
  background:var(--accent);color:#fff;font-size:9px;border-radius:1px;flex:0 0 15px;
}
table.grid thead th.sorted .sortbox{display:flex}
table.grid thead th.sortable{cursor:pointer;user-select:none}
table.grid thead th.sortable:hover{background:#D9D9D9}
table.grid thead th .funnel{width:11px;height:11px;opacity:.5;margin-left:auto;flex:0 0 11px}
table.grid tbody td{
  border-right:1px solid var(--line-soft);border-bottom:1px solid var(--line-soft);
  padding:5px 9px;white-space:nowrap;color:var(--ink);
}
table.grid tbody tr{background:var(--row)}
table.grid tbody tr:nth-child(even){background:var(--row-alt)}
table.grid tbody tr:hover{background:var(--row-h)}
table.grid tbody tr.sel{background:var(--row-sel)}
table.grid td.c,table.grid th.c{text-align:center;width:30px}
table.grid td.wrap{white-space:normal}
/* Department comes from Entra and can be long ("Data, Security & Information
   Compliance"), which pushed Enabled and Created off the right edge. */
table.grid td.dept{white-space:normal;min-width:150px;max-width:230px}
.empty{padding:26px 16px;color:var(--ink-3);font-size:12.5px;text-align:center}

/* Status glyphs, matching the console's own vocabulary: a red bar for blocked,
   a key for an active holder, blank for nothing issued. */
.glyph{width:15px;height:15px;display:inline-block;vertical-align:-3px}
.glyph.deny{color:var(--deny)}
.glyph.key{color:#444}

.tier{
  display:inline-block;min-width:62px;text-align:center;
  padding:1.5px 7px;border-radius:2px;font-size:10.5px;font-weight:600;
  text-transform:uppercase;letter-spacing:.04em;border:1px solid transparent;
}
.tier.none{color:#8a8a8a;background:#EFEFEF;border-color:#DEDEDE}
.tier.read{color:#16607f;background:#E1F0F7;border-color:#BFDFEE}
.tier.write{color:#7a5300;background:#FDF1D8;border-color:#F0DCA8}
.tier.admin{color:#8a2318;background:#FBE6E3;border-color:#F0C4BD}
.tier.owner{color:#5B2A86;background:#EFE6F7;border-color:#D8C6EA}

.pill{display:inline-block;padding:1px 7px;border-radius:9px;font-size:10.5px;border:1px solid var(--line)}
.pill.live{color:#1d6b40;background:#E6F5EC;border-color:#BBE0C8}
.pill.pending{color:#8a6100;background:#FDF3DF;border-color:#EEDCAE}

/* ── Footer status strip, as the reference has ────────────────────────── */
.statusbar{
  display:flex;align-items:center;gap:14px;padding:7px 16px;margin:10px 10px 0;
  border:1px solid var(--line);background:#fff;font-size:11.5px;color:var(--ink-3);
}
.statusbar .dot{width:8px;height:8px;border-radius:50%;background:var(--ok);flex:0 0 8px}
.statusbar .spacer{flex:1}

/* ── Drawer: the per-user access editor ──────────────────────────────── */
.scrim{position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:60;display:none}
.scrim.open{display:block}
.drawer{
  position:fixed;top:0;right:0;bottom:0;width:min(560px,100%);background:#fff;
  z-index:61;transform:translateX(100%);transition:transform .18s ease;
  display:flex;flex-direction:column;border-left:1px solid var(--line);
}
.drawer.open{transform:none}
.drawer-head{background:var(--top);color:#fff;padding:12px 16px;display:flex;align-items:center;gap:10px}
.drawer-head h2{font-size:15px;font-weight:600}
.drawer-head .sub{font-size:11.5px;color:rgba(255,255,255,.88)}
.drawer-head .spacer{flex:1}
.drawer-body{flex:1;overflow:auto;padding:14px 16px}
.drawer-foot{border-top:1px solid var(--line);padding:10px 16px;display:flex;gap:8px;align-items:center;background:var(--card)}
.drawer-foot .spacer{flex:1}

fieldset{border:1px solid var(--line);margin:0 0 14px;padding:10px 12px 12px;background:#fff}
legend{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--ink-2);padding:0 5px}
.svc{display:flex;align-items:center;gap:10px;padding:7px 0;border-top:1px solid var(--line-soft)}
.svc:first-of-type{border-top:0}
.svc .name{flex:1;min-width:0}
.svc .name b{display:block;font-size:12.5px;font-weight:600}
.svc .name span{display:block;font-size:11px;color:var(--ink-3)}
.svc select{
  border:1px solid var(--line);padding:4px 6px;font-size:12px;background:#fff;
  color:var(--ink);min-width:116px;border-radius:2px;
}
.svc select:disabled{background:#F2F2F2;color:#999}
.note{font-size:11px;color:var(--ink-3);margin-top:8px;line-height:1.5}

.chiprow{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.chip{
  display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);
  background:#F3F3F3;padding:2px 7px;border-radius:2px;font-size:11px;
}
.chip button{border:0;background:none;color:var(--ink-3);line-height:1;padding:0}
.chip button:hover{color:var(--deny)}

.msg{padding:8px 11px;border:1px solid var(--line);font-size:12px;margin-bottom:12px;display:none}
.msg.err{display:block;background:#FBEFEE;border-color:#E6BDB7;color:#8a2318}
.msg.ok{display:block;background:#E9F6EE;border-color:#BBE0C8;color:#1d6b40}

/* ── Sign-in ─────────────────────────────────────────────────────────── */
.signin-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;background:#EDEFF1;padding:24px}
.signin{width:100%;max-width:380px;background:#fff;border:1px solid var(--line);box-shadow:0 2px 8px rgba(0,0,0,.08)}
.signin .cap{background:var(--top);padding:18px;text-align:center}
.signin .cap img{height:34px;width:auto}
.signin .body{padding:20px}
.signin h1{font-size:16px;font-weight:600;margin-bottom:4px}
.signin p.lede{font-size:12px;color:var(--ink-3);margin-bottom:16px;line-height:1.55}
.signin .btn{width:100%;justify-content:center;padding:9px}
.signin .or{text-align:center;font-size:11px;color:var(--ink-3);margin:12px 0}
.signin label{display:block;font-size:11px;font-weight:600;color:var(--ink-2);margin-bottom:3px}
.signin input{width:100%;border:1px solid var(--line);padding:7px 9px;font-size:12.5px;margin-bottom:9px;border-radius:2px}
.signin input:focus{outline:1px solid var(--focus);outline-offset:-1px}

#loading{min-height:100vh;display:flex;align-items:center;justify-content:center;color:var(--ink-3);font-size:12.5px}

@media (max-width:820px){
  .masthead{padding:0 12px}
  .menubar{overflow-x:auto}
  .page{padding:14px 10px 30px}
  .tablewrap{margin:0 6px}
  .toolbar .search{min-width:0;flex:1 1 160px}
}

/* ── Selection action bar ─────────────────────────────────────────────────
   Appears above the grid once a row is selected, the way the reference
   console surfaces row actions rather than hiding them in a context menu. */
.actionbar{
  display:none;align-items:stretch;gap:0;margin:0 10px 10px;
  border:1px solid var(--line);background:#fff;
}
.actionbar.on{display:flex}
.actionbar .act{
  background:#fff;border:0;border-right:1px solid var(--line-soft);
  padding:14px 22px 12px;display:flex;flex-direction:column;align-items:center;gap:7px;
  min-width:116px;color:var(--ink-2);
}
.actionbar .act:last-child{border-right:0}
.actionbar .act:hover:not(:disabled){background:var(--row-h);color:var(--ink)}
.actionbar .act:disabled{opacity:.4;cursor:default}
.actionbar .act svg{width:28px;height:28px;stroke:currentColor;fill:none;stroke-width:1.6}
.actionbar .act span{
  font-size:11.5px;letter-spacing:.07em;text-transform:uppercase;font-weight:700;white-space:nowrap;
}
.actionbar .selinfo{
  margin-left:auto;display:flex;align-items:center;padding:0 20px;
  font-size:12.5px;color:var(--ink-3);border-left:1px solid var(--line-soft);
}

/* ── Centre modal ────────────────────────────────────────────────────────
   Deliberately centred rather than a side drawer: these are things you stop
   and read, not things you adjust while keeping an eye on the list. */
.mscrim{position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:70;display:none;
  align-items:flex-start;justify-content:center;padding:52px 16px 24px;overflow:auto}
.mscrim.open{display:flex}
.modal{
  background:#fff;border:1px solid var(--line);box-shadow:0 8px 28px rgba(0,0,0,.28);
  width:100%;max-width:760px;display:flex;flex-direction:column;max-height:calc(100vh - 80px);
}
.modal.wide{max-width:980px}
.modal-head{background:var(--top);color:#fff;padding:11px 15px;display:flex;align-items:center;gap:10px;flex:0 0 auto}
.modal-head h2{font-size:14.5px;font-weight:600}
.modal-head .sub{font-size:11.5px;color:rgba(255,255,255,.88)}
.modal-head .spacer{flex:1}
.modal-body{padding:16px;overflow:auto;flex:1 1 auto}
.modal-foot{border-top:1px solid var(--line);background:var(--card);padding:10px 15px;display:flex;gap:8px;flex:0 0 auto}
.modal-foot .spacer{flex:1}

/* ── Read-only detail grid, for values owned by Entra ─────────────────── */
.detail{display:grid;grid-template-columns:190px 1fr;gap:0;border:1px solid var(--line)}
.detail dt{
  background:#F2F2F2;border-bottom:1px solid var(--line-soft);border-right:1px solid var(--line);
  padding:7px 11px;font-size:11.5px;font-weight:600;color:var(--ink-2);
}
.detail dd{
  border-bottom:1px solid var(--line-soft);padding:7px 11px;font-size:12.5px;
  color:#8d8d8d;background:#FAFAFA;overflow-wrap:anywhere;
}
.detail dt:last-of-type,.detail dd:last-of-type{border-bottom:0}
.readonly-banner{
  display:flex;gap:8px;align-items:flex-start;border:1px solid #E3D6A9;background:#FDF8E7;
  padding:8px 11px;font-size:11.5px;color:#6b5a16;margin-bottom:12px;line-height:1.5;
}
.readonly-banner svg{width:14px;height:14px;flex:0 0 14px;margin-top:1px;stroke:currentColor;fill:none;stroke-width:2}

/* ── Assign / unassign screens ───────────────────────────────────────── */
.who-strip{
  display:flex;align-items:center;gap:14px;border:1px solid var(--line);background:#fff;
  padding:10px 14px;margin:0 10px 12px;
}
.who-strip .av{
  width:38px;height:38px;border-radius:3px;background:var(--top);color:#fff;
  display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:600;flex:0 0 38px;
}
.who-strip b{display:block;font-size:13.5px}
.who-strip span{display:block;font-size:11.5px;color:var(--ink-3)}
.who-strip .spacer{flex:1}

.pickrow{display:flex;align-items:center;gap:12px;padding:9px 11px;border-bottom:1px solid var(--line-soft)}
.pickrow:last-child{border-bottom:0}
.pickrow input[type=checkbox]{flex:0 0 auto}
.pickrow .meta{flex:1;min-width:0}
.pickrow .meta b{display:block;font-size:12.5px}
.pickrow .meta span{display:block;font-size:11px;color:var(--ink-3)}
.pickrow .cur{flex:0 0 auto;min-width:86px;text-align:right}
.pickrow select{border:1px solid var(--line);padding:4px 6px;font-size:12px;background:#fff;min-width:112px;border-radius:2px}
.pickrow select:disabled{background:#F2F2F2;color:#9a9a9a}

/* ── Category grouping on the assign screens ─────────────────────────── */
.cat{border:1px solid var(--line);background:#fff;margin:0 0 12px}
.cat-head{
  background:var(--thead);border-bottom:1px solid var(--thead-b);
  padding:7px 11px;display:flex;align-items:baseline;gap:9px;
}
.cat-head b{font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:#4a4a4a}
.cat-head span{font-size:11px;color:var(--ink-3)}
.cat-head .spacer{flex:1}
.cat-head .enf{font-size:10px;letter-spacing:.05em;text-transform:uppercase;color:var(--ink-3)}
.cat-body{padding:2px 11px}

/* ── Home mosaic ─────────────────────────────────────────────────────────
   The reference console opens on a tile wall rather than a dashboard: one
   primary action in brand blue, the rest in flat grey at mixed sizes so the
   eye lands on the common one first. Greys are the console's own, not a
   separate palette. */
.mosaic{
  display:grid;grid-template-columns:repeat(6,1fr);grid-auto-rows:118px;gap:2px;
  background:var(--line-soft);border:1px solid var(--line);margin:0 10px;
}
.tile{
  background:#FBFBFB;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:9px;color:#A9A9A9;text-align:center;padding:12px;text-decoration:none;transition:background .12s,color .12s;
}
.tile:hover{background:#F1F1F1;color:#6f6f6f;text-decoration:none}
.tile svg{width:38px;height:38px;stroke:currentColor;fill:none;stroke-width:1.5}
.tile span{font-size:14px;line-height:1.25;font-weight:600}
.tile.lg{grid-column:span 2;grid-row:span 2}
.tile.lg svg{width:62px;height:62px}
.tile.lg span{font-size:26px;font-weight:700;letter-spacing:-.01em}
.tile.md{grid-column:span 2}
.tile.md svg{width:46px;height:46px}
.tile.md span{font-size:19px;font-weight:700}
.tile.primary{background:var(--top);color:#fff}
.tile.primary:hover{background:var(--top-d);color:#fff}
.tile.primary svg{stroke-width:1.6}
.tile[aria-disabled="true"]{opacity:.45;pointer-events:none}
.home-note{margin:12px 10px 0;font-size:11.5px;color:var(--ink-3);line-height:1.55}
@media (max-width:900px){
  .mosaic{grid-template-columns:repeat(4,1fr)}
  .tile.lg{grid-column:span 2;grid-row:span 2}
}
@media (max-width:560px){
  .mosaic{grid-template-columns:repeat(2,1fr);grid-auto-rows:104px}
  .tile.lg,.tile.md{grid-column:span 2;grid-row:auto}
  .tile.lg{grid-row:span 2}
}

/* ── Filter rail for the audit page ──────────────────────────────────── */
.filters{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(168px,1fr));gap:9px;
  margin:0 10px 10px;padding:11px;border:1px solid var(--line);background:#fff;
}
.filters .f{display:flex;flex-direction:column;gap:3px;min-width:0}
.filters label{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--ink-3)}
.filters input,.filters select{
  border:1px solid var(--line);padding:5px 7px;font-size:12px;background:#fff;color:var(--ink);
  border-radius:2px;min-width:0;font-family:inherit;
}
.filters input:focus,.filters select:focus{outline:1px solid var(--focus);outline-offset:-1px}
.filters .acts{display:flex;align-items:flex-end;gap:6px}
.filters .acts .btn{white-space:nowrap}

/* ── Permission IDs ──────────────────────────────────────────────────────
   The tier digit is carried in the colour as well as the number, so a screen
   full of IDs reads at a glance: blue view, amber operate, red administer. */
.pid{
  display:inline-block;font-size:11.5px;letter-spacing:.04em;
  padding:2px 7px;border-radius:2px;border:1px solid transparent;
}
.pid.t1{color:#16607f;background:#E1F0F7;border-color:#BFDFEE}
.pid.t2{color:#7a5300;background:#FDF1D8;border-color:#F0DCA8}
.pid.t3{color:#8a2318;background:#FBE6E3;border-color:#F0C4BD}
.pid.bg{box-shadow:inset 0 0 0 1px #8a2318}
.pid.unknown{color:#8a8a8a;background:#EFEFEF;border-color:#DEDEDE}

/* Held permissions, grouped by service */
.held-svc{border:1px solid var(--line);background:#fff;margin:0 0 10px}
.held-svc .hs-head{
  background:var(--thead);border-bottom:1px solid var(--thead-b);padding:6px 11px;
  display:flex;align-items:baseline;gap:9px;
}
.held-svc .hs-head b{font-size:11.5px;text-transform:uppercase;letter-spacing:.06em;color:#4a4a4a}
.held-svc .hs-head span{font-size:11px;color:var(--ink-3)}
.held-svc .hs-head .spacer{flex:1}
.held-row{display:flex;align-items:center;gap:11px;padding:7px 11px;border-top:1px solid var(--line-soft)}
.held-row:first-child{border-top:0}
.held-row .meta{flex:1;min-width:0}
.held-row .meta b{display:block;font-size:12.5px}
.held-row .meta span{display:block;font-size:11px;color:var(--ink-3)}
.held-row .tierlab{font-size:10.5px;color:var(--ink-3);text-transform:uppercase;letter-spacing:.05em}
.held-empty{padding:22px 12px;text-align:center;color:var(--ink-3);font-size:12.5px}

/* Picker */
.pickbar{display:flex;gap:8px;align-items:center;padding:0 0 10px}
.pick-list{border:1px solid var(--line);max-height:46vh;overflow:auto;background:#fff}
.pick-cat{background:var(--thead);border-bottom:1px solid var(--thead-b);border-top:1px solid var(--thead-b);
  padding:6px 11px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:#4a4a4a;
  position:sticky;top:0;z-index:1;display:flex;gap:9px;align-items:baseline}
.pick-cat .spacer{flex:1}
.pick-cat .mini{font-size:10.5px;font-weight:400;color:var(--ink-3);text-transform:none;letter-spacing:0}
.pick-item{display:flex;align-items:center;gap:11px;padding:7px 11px;border-bottom:1px solid var(--line-soft);cursor:pointer}
.pick-item:hover{background:var(--row-h)}
.pick-item.off{opacity:.45;cursor:default;background:#FAFAFA}
.pick-item.off:hover{background:#FAFAFA}
.pick-item .meta{flex:1;min-width:0}
.pick-item .meta b{display:block;font-size:12.5px}
.pick-item .meta span{display:block;font-size:11px;color:var(--ink-3)}
.pick-item .state{font-size:10.5px;color:var(--ink-3);white-space:nowrap}
.bg-warn{display:flex;gap:8px;align-items:flex-start;border:1px solid #E0B4AE;background:#FBEFEE;
  padding:8px 11px;font-size:11.5px;color:#8a2318;margin:10px 0 0;line-height:1.5}
.bg-warn svg{width:14px;height:14px;flex:0 0 14px;margin-top:1px;stroke:currentColor;fill:none;stroke-width:2.2}

/* Select all / Clear all, per service, inside the permission picker. */
.pick-all{
  background:none; border:1px solid var(--bdr,#C8C6C4); border-radius:2px;
  padding:2px 8px; margin-right:10px; cursor:pointer;
  font:inherit; font-size:11px; color:var(--lnk,#0078D4); white-space:nowrap;
}
.pick-all:hover{ background:rgba(0,120,212,.08); border-color:#0078D4 }
