/* ── The Building view, as the design boards draw it ─────────────────────
   People (People.dc.html), Floors and Keys (FloorsKeys.dc.html), the call
   list that adds people to a loca (AddPeople.dc.html), the one-time key
   (KeyReveal.dc.html) and the Notifications panel (Notifications.dc.html).
   Loaded after styles.css. Plain selectors (no nesting: the desktop's
   WebKitGTK may not read it) and theme tokens only, so Loca, Calm and
   Console each draw it in their own colours. Rules are scoped under the
   pane's id so they win over the older shared rules in styles.css. */

/* ---- the page ---------------------------------------------------------- */
#peoplePanel { padding: 26px 28px; font-size: 14px; color: var(--txt); }
#peoplePanel .pphead { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; margin: 0 0 18px; }
#peoplePanel .pptitle { margin: 0; font-size: 26px; font-weight: 600; line-height: 1.2; color: var(--txt); }
#peoplePanel .ppsub { font-size: 14px; color: var(--muted); }
/* "Add people" sits at the far end of the heading, as the board draws it. */
#peoplePanel .pphead .ppadd { margin-left: auto; align-self: center; height: 38px; padding: 0 16px; font-size: 14px; }
/* Said to a screen reader, not drawn. */
#peoplePanel .pplabel { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* The section tabs: words on a line, the open one underlined. */
#peoplePanel .buildingtabs { display: flex; gap: 22px; margin: 0 0 18px; padding: 0; max-width: none;
  background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
#peoplePanel .btab { padding: 8px 0; margin-bottom: -1px; border-radius: 0; border-bottom: 2px solid transparent;
  background: none; color: var(--muted); font-family: inherit; font-size: 14px; font-weight: 400; line-height: 20px; }
#peoplePanel .btab:hover { color: var(--txt); }
#peoplePanel .btab.active { background: none; box-shadow: none; color: var(--txt); font-weight: 600;
  border-bottom-color: var(--txt); }
#peoplePanel .btab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* How many join requests wait, on their tab. */
#peoplePanel .btabcount { display: inline-block; min-width: 8px; margin-left: 4px; padding: 0 7px; border-radius: 9px;
  background: var(--bad); color: var(--on-bad); font-size: 12px; font-weight: 600; line-height: 18px; text-align: center; }
/* What a row's ⋯ did: one line above the list, kept across its redraws. */
#peoplePanel .ppnotice { margin: 0 0 12px; font-size: 13px; color: var(--txt); }
#peoplePanel .ppnotice:empty { display: none; }

/* One button vocabulary for the page: outline, ink primary, red danger. */
#peoplePanel .btn { height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel); color: var(--txt); font-family: inherit; font-size: 13px; font-weight: 500; }
#peoplePanel .btn:hover, #peoplePanel .btn:focus-visible { color: var(--txt); border-color: var(--muted); }
#peoplePanel .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
#peoplePanel .btn.primary:hover, #peoplePanel .btn.primary:focus-visible { background: var(--accent2);
  border-color: var(--accent2); color: var(--on-accent); }
#peoplePanel .btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line));
  background: color-mix(in srgb, var(--bad) 6%, var(--panel)); }
#peoplePanel .btn.danger:hover, #peoplePanel .btn.danger:focus-visible { color: var(--bad); border-color: var(--bad); }

/* Pills: the filter chips. */
#peoplePanel .chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--muted);
  font-family: inherit; font-size: 13px; font-weight: 500; }
#peoplePanel .chip:hover { color: var(--txt); }
#peoplePanel .chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* Who is a person and who an agent: a green dot, a blue star. */
#peoplePanel .kindmark, #callList .kindmark, #addPeople .kindmark { display: inline-block; width: auto; height: auto; flex: 0 0 auto;
  background: none; border-radius: 0; line-height: 1; }
#peoplePanel .kindmark.human::before, #callList .kindmark.human::before, #addPeople .kindmark.human::before { content: "●"; color: var(--human); font-size: 12px; }
#peoplePanel .kindmark.agent::before, #callList .kindmark.agent::before, #addPeople .kindmark.agent::before { content: "*"; color: var(--agent);
  font: 700 15px var(--mono); }
#peoplePanel .chip.on .kindmark::before { color: inherit; }

/* ---- People: search, filters, the table ------------------------------- */
#peoplePanel .pptools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 18px; }
#peoplePanel #peopleSearch { box-sizing: border-box; height: 36px; width: 240px; max-width: 100%; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--txt);
  font-family: inherit; font-size: 14px; }
#peoplePanel #peopleSearch:focus { outline: none; border-color: var(--accent); }
#peoplePanel .ppkinds { display: flex; flex-wrap: wrap; gap: 8px; }
#peoplePanel .pptools .grpfilter { margin: 0; padding-left: 10px; border-left: 1px solid var(--line); gap: 8px; }

#peoplePanel .ptable { margin: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
/* The last column holds a member's three actions (Message · Suspend ·
   Revoke) and the row's ⋯ on one line
   (tests/browser/people-actions-layout.spec.js). */
#peoplePanel .peoplehead, #peoplePanel .prow { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, .8fr) 316px;
  column-gap: 16px; }
#peoplePanel .peoplehead { padding: 12px 16px; border-bottom: 0; color: var(--muted); font-size: 13px; font-weight: 600;
  letter-spacing: 0; text-transform: none; }
#peoplePanel .prow { padding: 12px 16px; border-bottom: 0; border-top: 1px solid var(--panel2); font-size: 14px; }
#peoplePanel .prow:hover { background: color-mix(in srgb, var(--panel2) 35%, transparent); }
#peoplePanel .prow.poff { color: var(--muted); }
#peoplePanel .prow.poff .kindmark { opacity: .45; }
#peoplePanel .prow.poff .pnametext { color: var(--muted); }
#peoplePanel .pname { gap: 8px; }
#peoplePanel .pnametext { font-weight: 600; font-size: 14px; color: var(--txt); }
#peoplePanel .prow.rankrow .pname { font-weight: 600; }
#peoplePanel .prank { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
#peoplePanel .prank > .pkind { color: inherit; font-size: 14px; }
#peoplePanel .prank .rankbadge { margin: 0; padding: 0; border: 0; border-radius: 0; background: none;
  color: var(--master); font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; }
#peoplePanel .prank .rankbadge.rank-smaster { color: var(--smaster); }
#peoplePanel .prank .pgroups > .pnowhere:only-child { display: none; }
#peoplePanel .pwhere { gap: 4px 6px; font-size: 14px; color: inherit; }
#peoplePanel .pwhere .pnowhere { font-size: 14px; color: inherit; }
#peoplePanel .pwhere .locachip { padding: 0; border: 0; background: none; color: inherit; font-size: 14px; }
#peoplePanel .pwhere .locachip.more { color: var(--muted); }
#peoplePanel .pstatuses { display: inline-flex; gap: 4px; }
/* "Online in" and "Offline" already say it; the wake state of an agent stays. */
#peoplePanel .prow .pstatus.connection, #peoplePanel .prow .pstatus.na { display: none; }
#peoplePanel .pkit { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; min-width: 0; }
#peoplePanel .pkit .kitver { color: inherit; font: 13px var(--mono); }
#peoplePanel .pkit .kitold { color: var(--gold); font-size: 12px; }
#peoplePanel .pnokit { color: var(--dim); }
#peoplePanel .pacts { gap: 6px; }
/* A row's ⋯: a quiet button, and the one menu it opens (keys.js). */
#peoplePanel .prowmenu { display: inline-flex; flex: 0 0 auto; }
#peoplePanel .prowmore { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: none;
  color: var(--muted); font-family: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
#peoplePanel .prowmore:hover, #peoplePanel .prowmore[aria-expanded="true"] { background: var(--panel2); color: var(--txt); }
#peoplePanel .prowmore:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
#peopleRowMenu { position: fixed; z-index: 80; display: flex; flex-direction: column; min-width: 200px; max-width: min(320px, calc(100vw - 16px));
  max-height: min(320px, calc(100vh - 16px)); overflow-y: auto; padding: 6px; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--txt) 18%, transparent); }
#peopleRowMenu .prowpophead { padding: 6px 10px 4px; color: var(--muted); font-size: 12px; font-weight: 600; }
#peopleRowMenu .prowitem { display: block; width: 100%; padding: 7px 10px; border: 0; border-radius: 6px; background: none;
  color: var(--txt); font-family: inherit; font-size: 14px; text-align: left; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; cursor: pointer; }
#peopleRowMenu .prowitem:hover, #peopleRowMenu .prowitem:focus-visible { background: var(--panel2); outline: none; }
#peopleRowMenu .prowpopnone { padding: 6px 10px 8px; color: var(--muted); font-size: 13px; }
#peoplePanel .ptable > .callnone { padding: 14px 16px; border-top: 1px solid var(--panel2); font-size: 13px; color: var(--muted); }
#peoplePanel .ptable .rankconfirm { margin: 0 16px 12px; font-size: 13px; }

/* Join requests: a card under the table, Approve in ink, Deny in outline. */
#peoplePanel .jrsection, #peoplePanel .jrsection.waiting { margin: 18px 0 0; padding: 16px 18px; display: flex;
  flex-direction: column; gap: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
#peoplePanel .jrsection.waiting { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
#peoplePanel .jrhead .jrtitle { margin: 0; padding: 0; color: var(--txt); font-size: 15px; font-weight: 600;
  letter-spacing: 0; text-transform: none; }
#peoplePanel .jrstock { gap: 10px; color: var(--muted); font-size: 13px; }
#peoplePanel .jrrow { margin: 0; padding: 10px 0 0; border-top: 1px solid var(--panel2); flex-wrap: wrap; }
#peoplePanel .jrwho { gap: 8px; font-size: 14px; color: var(--muted); }
#peoplePanel .jrwho b { font-weight: 600; color: var(--txt); }
#peoplePanel .jrwho .pkind { font-size: 12px; color: var(--dim); }
#peoplePanel .jrnone { padding: 0; font-size: 13px; color: var(--muted); }
#peoplePanel .jrerr { color: var(--bad); font-size: 13px; }
#peoplePanel .jrstale { color: var(--muted); }
#peoplePanel .jrnotice { margin: 0; font-size: 13px; color: var(--txt); }
#peoplePanel .jrnotice:empty { display: none; }
/* The Join requests tab: the same pane with only its requests card. */
#peoplePanel #peopleList.jronly .pptools, #peoplePanel #peopleList.jronly .ptable { display: none; }
#peoplePanel #peopleList.jronly .jrsection { margin-top: 0; }

/* ---- Floors, Keys and Private messages: one card each ----------------- */
#peoplePanel .buildingpane { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
#peoplePanel .bbhead { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 12px; }
#peoplePanel .bbhead b, #peoplePanel .bbtitle { margin: 0; color: var(--txt); font-size: 17px; font-weight: 600; }
#peoplePanel .bbhead small { flex-basis: 100%; color: var(--muted); font-size: 13px; line-height: 1.45; }
#peoplePanel .bbhead .bbtag { margin-left: auto; color: var(--gold); font-size: 13px; }
#peoplePanel .bbempty { color: var(--muted); font-size: 13px; padding: 10px 0; }

/* Floors: one bordered list, a row per floor. */
#groupsPane .grpform { margin: 0 0 12px; }
#groupsPane .keyform input { flex: 1 1 220px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--txt); font-family: inherit; font-size: 14px; color-scheme: var(--scheme); }
#groupsPane .grpnotice { font-size: 13px; color: var(--muted); }
#groupsPane .grplist { gap: 0; border: 1px solid var(--panel2); border-radius: 10px; overflow: hidden; }
#groupsPane .grplist > .bbempty { padding: 12px 14px; }
#groupsPane .grpcard { padding: 12px 14px; border: 0; border-radius: 0; background: none; }
#groupsPane .grpcard + .grpcard { border-top: 1px solid var(--panel2); }
#groupsPane .grpcard.floorc { border-left: 3px solid var(--floor); }
#groupsPane .grpname b { font-size: 14px; font-weight: 600; }
#groupsPane .grpowner { color: var(--muted); font-size: 13px; }
#groupsPane .grplabel { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; }
#groupsPane .grpmember { padding: 8px 0; border-top: 1px solid var(--panel2); font-size: 14px; }
#groupsPane .grpmember .pnamebtn { font-weight: 600; }
#groupsPane .locachip { padding: 2px 8px; border-radius: 6px; font-size: 13px; }
#groupsPane .grpadd select { height: 34px; padding: 0 10px; border-radius: 8px; background: var(--panel); font-family: inherit;
  font-size: 14px; color-scheme: var(--scheme); }

/* Keys: the generator, then the ledger as a table. */
#keyLedger .keygenhead { margin: 4px 0 6px; }
#keyLedger .keygenhead b { font-size: 14px; font-weight: 600; color: var(--txt); }
#keyLedger .keygenhead small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
#keyLedger .keyform select, #keyLedger .keyform input { height: 34px; padding: 0 10px; border-radius: 8px; background: var(--panel);
  font-family: inherit; font-size: 14px; color-scheme: var(--scheme); }
#keyLedger .keylisthead { margin-top: 18px; padding-top: 14px; font-size: 15px; }
#keyLedger .keylisthead small { font-size: 13px; }
#keyLedger .keyfilters { gap: 8px; margin: 10px 0; }
#keyLedger .keyhead, #keyLedger .keyrow { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.4fr) 90px 84px;
  gap: 10px; align-items: center; }
#keyLedger .keyhead { padding: 6px 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
#keyLedger .keyrow { padding: 8px; border-top: 1px solid var(--panel2); font-size: 14px; }
#keyLedger .keykind b { font-weight: 500; }
#keyLedger .keykind code { color: var(--muted); font: 12px var(--mono); }
#keyLedger .keydates { font-size: 13px; color: var(--muted); }
#keyLedger .keystate { font-size: 12px; font-weight: 600; }
#keyLedger .keystate.state-unused { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
#keyLedger .keystate.state-active, #keyLedger .keystate.state-used { color: var(--human);
  border-color: color-mix(in srgb, var(--human) 40%, var(--line)); }
#keyLedger .keyrow .btn.danger { height: 30px; padding: 0 10px; border-radius: 6px; font-size: 12px; }

/* The one-time key: shown once, in a dark block, with a plain warning. */
#keyLedger .keyissued { display: flex; flex-direction: column; gap: 14px; margin: 10px 0 14px; padding: 22px 24px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--panel);
  box-shadow: 0 16px 44px color-mix(in srgb, var(--txt) 16%, transparent); font-size: 15px; line-height: 1.55; color: var(--txt); }
#keyLedger .keyissued.hidden { display: none; }
#keyLedger .keyonce { font-size: 13px; color: var(--muted); }
#keyLedger .keyfor { font-size: 22px; font-weight: 600; line-height: 1.3; }
#keyLedger .keyfor b { font-family: var(--mono); color: var(--agent); }
#keyLedger .keyissued .keydim { color: var(--muted); font-size: 15px; }
#keyLedger .keysecret { display: flex; flex-wrap: nowrap; align-items: stretch; gap: 10px; }
#keyLedger .keysecret code { flex: 1 1 auto; min-width: 0; padding: 14px; border-radius: 10px; background: var(--txt);
  color: var(--bg); font: 15px var(--mono); word-break: break-all; overflow-wrap: anywhere; }
#keyLedger .keysecret .btn { flex: 0 0 auto; height: auto; min-height: 40px; padding: 0 16px; border-radius: 10px; font-size: 14px; }
#keyLedger .keywarn { padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--warn) 32%, var(--line)); border-radius: 10px;
  background: color-mix(in srgb, var(--warn) 8%, var(--panel)); color: var(--txt); font-size: 14px; }
#keyLedger .keydone { display: flex; justify-content: flex-end; }
#keyLedger .keydone .btn { height: 40px; padding: 0 16px; font-size: 14px; }

/* ---- Add people: the call list beside the table ----------------------- */
#callList { border-radius: 10px; background: var(--panel); }
#callList .callhead { padding: 10px 12px 6px; color: var(--txt); font-size: 13px; font-weight: 600; }
#callList .callrow { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--panel2);
  font-family: inherit; font-size: 13px; }
#callList .callrow:hover { background: var(--panel2); color: var(--txt); }
#callList .callwho { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex: 0 1 auto; }
#callList .callwho b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--txt); }
#callList .callrow .where { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--muted); font-size: 12px; }
#callList .callinvite { flex: 0 0 auto; display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 8px;
  background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 600; }
#callList .callnone { padding: 10px 12px; font-size: 13px; color: var(--muted); }

/* ---- Add people: the dialog the heading's button opens --------------- */
#addPeople .extcard { display: flex; flex-direction: column; width: min(640px, 100%); padding: 0; border-radius: 16px;
  background: var(--panel); box-shadow: 0 24px 60px color-mix(in srgb, var(--txt) 25%, transparent);
  font-size: 14px; color: var(--txt); }
#addPeople .aphead { display: flex; align-items: center; gap: 10px; padding: 18px 20px 18px 24px; border-bottom: 1px solid var(--line); }
#addPeople .aphead h2 { margin: 0; font-size: 19px; font-weight: 600; }
#addPeople .apclose { margin-left: auto; width: 36px; height: 36px; border: 0; border-radius: 8px; background: none;
  color: var(--muted); font-family: inherit; font-size: 20px; cursor: pointer; }
#addPeople .apclose:hover, #addPeople .apclose:focus-visible { background: var(--panel2); color: var(--txt); }
#addPeople .apbody { display: flex; flex-direction: column; gap: 14px; padding: 20px 24px 22px; }
#addPeople .apsec { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--bg); }
#addPeople .apsec.apmain { border: 1.5px solid var(--txt); }
#addPeople .apsec h3 { margin: 0; font-size: 15px; font-weight: 600; }
#addPeople .apsec p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
#addPeople .aplabel { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
#addPeople .aploca { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
#addPeople .aploca select { flex: 1 1 auto; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel); color: var(--txt); font-family: inherit; font-size: 14px; color-scheme: var(--scheme); }
#addPeople #addPeopleSearch { box-sizing: border-box; width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel); color: var(--txt); font-family: inherit; font-size: 15px; }
#addPeople #addPeopleSearch:focus { outline: none; border-color: var(--accent); }
#addPeople .aplist { display: flex; flex-direction: column; gap: 4px; max-height: 240px; overflow-y: auto; }
#addPeople .aprow { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 10px; border-radius: 8px;
  background: var(--panel2); font-size: 14px; }
#addPeople .apwho { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex: 0 1 auto; }
#addPeople .apwho b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
#addPeople .apwhere { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--muted); font-size: 13px; }
#addPeople .aphint, #addPeople .apnone { color: var(--muted); font-size: 13px; }
#addPeople .apnone { margin: 0; }
#addPeople .apcmd { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--txt); color: var(--bg);
  font: 13px var(--mono); overflow-x: auto; white-space: pre; }
#addPeople .apline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--muted); font-size: 13px; }
#addPeople .apline .btn { margin-left: auto; }
#addPeople .apnote { min-height: 0; font-size: 13px; color: var(--txt); }
#addPeople .apnote:empty { display: none; }
#addPeople .btn { flex: 0 0 auto; height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel); color: var(--txt); font-family: inherit; font-size: 13px; font-weight: 500; }
#addPeople .btn:hover, #addPeople .btn:focus-visible { border-color: var(--muted); }
#addPeople .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
#addPeople .btn.primary:hover, #addPeople .btn.primary:focus-visible { background: var(--accent2); border-color: var(--accent2); }
#addPeople .btn:disabled { opacity: .5; }

/* ---- Notifications ----------------------------------------------------- */
#notifPanel { width: min(460px, calc(100vw - 16px)); border-radius: 14px; background: var(--panel); font-family: inherit;
  font-size: 14px; color: var(--txt); }
#notifPanel .notifhead { gap: 8px; padding: 14px 12px 14px 18px; }
#notifPanel .notifhead h2 { gap: 8px; font-size: 17px; font-weight: 600; }
#notifPanel .notifhead h2 svg { color: var(--muted); }
#notifPanel .notifcount { color: var(--muted); font-size: 12px; }
#notifPanel .btn { height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel);
  color: var(--txt); font-family: inherit; font-size: 13px; font-weight: 500; }
#notifPanel .btn:hover, #notifPanel .btn:focus-visible { border-color: var(--muted); }
#notifPanel .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
#notifPanel .btn:disabled { opacity: .5; }
/* "New notification" reads as the design's dark send button. */
#notifPanel .notifcompose summary { display: inline-flex; align-items: center; height: 34px; margin: 12px 18px; padding: 0 14px;
  border-radius: 8px; background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 600; list-style: none; }
#notifPanel .notifcompose summary::-webkit-details-marker { display: none; }
#notifPanel .notifcompose summary:hover { background: var(--accent2); color: var(--on-accent); }
#notifPanel .notifcompose form { padding: 0 18px 14px; gap: 10px; }
#notifPanel .notifaud { font-size: 13px; }
#notifPanel .notifauds legend, #notifPanel .notiffield > span { color: var(--muted); font-size: 12px; font-weight: 600;
  letter-spacing: 0; text-transform: none; }
#notifPanel .notiffield input, #notifPanel .notiffield textarea { font-family: inherit; font-size: 14px; }
#notifPanel .notiftabs { gap: 8px; padding: 12px 18px 4px; }
#notifPanel .chip { height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel);
  color: var(--muted); font-family: inherit; font-size: 13px; font-weight: 500; }
#notifPanel .chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
#notifPanel .notifstatus { padding: 8px 18px; font-size: 13px; }
#notifPanel .notifscroll { padding: 8px 0 12px; }
#notifPanel .notifitem { display: flex; align-items: flex-start; gap: 14px; padding: 14px 30px 14px 18px;
  border-bottom: 1px solid var(--panel2); }
#notifPanel .notifitem.unread::before { content: none; }
#notifPanel .notifitem.unread::after { content: ""; position: absolute; right: 12px; top: 22px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--bad); }
#notifPanel .notificon { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--gold) 32%, var(--line)); background: color-mix(in srgb, var(--gold) 10%, var(--panel));
  color: var(--gold); }
#notifPanel .notifmain { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
#notifPanel .notifitemhead { align-items: center; }
#notifPanel .notiftitle { font-size: 15px; font-weight: 600; color: var(--txt); }
#notifPanel .notifitem:not(.unread):not(.sent) .notiftitle { font-weight: 500; color: var(--txt); }
#notifPanel .notifmark { height: 28px; padding: 0 10px; font-size: 12px; }
#notifPanel .notifbody { margin: 0; color: var(--muted); font-size: 14px; }
#notifPanel .notifitem:not(.unread) .notifbody { color: var(--muted); }
#notifPanel .notifmeta { gap: 0 5px; margin: 0; color: var(--dim); font-size: 12px; }
#notifPanel .notiffrom { color: var(--gold); }
#notifPanel .notifcounts { margin: 0; color: var(--muted); font-size: 12px; }
#notifPanel .notifempty { font-size: 14px; }
#notifPanel .notifolder { margin: 12px 18px 0; }
/* "Open all": a link in the panel's head to the full view. */
#notifPanel .btn.notifopenall { padding: 0 6px; border-color: transparent; background: transparent; color: var(--accent2);
  text-decoration: underline; text-underline-offset: 3px; }
#notifPanel .btn.notifopenall:hover, #notifPanel .btn.notifopenall:focus-visible { border-color: transparent; color: var(--txt); }
/* The full view: the same panel laid over the main area, as the board's
   Notifications page — a large title, the filter chips, the list in cards
   under Today and Earlier. */
#notifPanel.notiffull { top: var(--notif-top, 0); left: var(--notif-left, 0); width: var(--notif-width, 100vw);
  height: var(--notif-height, 100vh); max-height: none; border: 0; border-radius: 0; box-shadow: none; background: var(--bg); }
#notifPanel.notiffull .notifhead { flex-wrap: wrap; gap: 12px; padding: 26px 28px 12px; border-bottom: 0; }
#notifPanel.notiffull .notifhead h2 { font-size: 26px; }
#notifPanel.notiffull .notifhead h2 svg { width: 20px; height: 20px; }
#notifPanel.notiffull .notifhead .btn { height: 36px; padding: 0 14px; font-size: 14px; }
#notifPanel.notiffull .notifstatus { padding: 4px 28px 8px; border-bottom: 0; }
#notifPanel.notiffull .notifcompose { max-width: 860px; border-bottom: 0; }
#notifPanel.notiffull .notifcompose summary { margin: 4px 28px 8px; }
#notifPanel.notiffull .notifcompose form { padding: 0 28px 14px; }
#notifPanel.notiffull .notiftabs { padding: 4px 28px 8px; }
#notifPanel.notiffull .notifscroll { padding: 0 28px 28px; }
#notifPanel.notiffull .notifday { margin: 14px 0 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
#notifPanel.notiffull .notiflist { max-width: 860px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
  overflow: hidden; }
#notifPanel.notiffull .notifitem:last-child { border-bottom: 0; }
#notifPanel.notiffull .notifempty { max-width: 860px; text-align: left; padding: 22px 0; }
#notifPanel.notiffull .notifolder { margin: 12px 0 0; }
#notifToast { font-family: inherit; }
#notifToast .notiftoastopen b { font-size: 14px; }
#notifToast .notiftoastopen small { font-size: 12px; }

/* ---- a phone ----------------------------------------------------------- */
@media (max-width: 760px) {
  #peoplePanel { padding: 16px; }
  #peoplePanel .pptitle { font-size: 22px; }
  #peoplePanel .pphead .ppadd { height: 34px; padding: 0 12px; font-size: 13px; }
  #addPeople .aphead { padding: 14px 14px 14px 18px; }
  #addPeople .apbody { padding: 16px; }
  #addPeople .apsec { padding: 12px; }
  #peoplePanel .buildingtabs { gap: 18px; overflow-x: auto; }
  #peoplePanel #peopleSearch { width: 100%; }
  #peoplePanel .pptools .grpfilter { padding-left: 0; border-left: 0; }
  #peoplePanel .peoplehead { display: none; }
  #peoplePanel .prow { grid-template-columns: minmax(0, 1fr); grid-template-areas: "name" "rank" "where" "kit" "acts";
    row-gap: 6px; }
  #peoplePanel .prow .pname { grid-area: name; }
  #peoplePanel .prow .prank { grid-area: rank; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
  #peoplePanel .prow .pwhere { grid-area: where; }
  #peoplePanel .prow .pkit { grid-area: kit; }
  #peoplePanel .prow .pkit.pkitnone { display: none; }
  #peoplePanel .prow .pacts { grid-area: acts; justify-content: flex-start; }
  #peoplePanel .buildingpane { padding: 14px; }
  #keyLedger .keyhead { display: none; }
  #keyLedger .keyrow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "kind state" "who who" "dates acts"; }
  #keyLedger .keyissued { padding: 16px; }
  #keyLedger .keysecret { flex-wrap: wrap; }
  #keyLedger .keysecret .btn { min-height: 36px; }
  #notifPanel { width: auto; }
  #notifPanel.notiffull { width: var(--notif-width, 100vw); }
  #notifPanel.notiffull .notifhead { padding: 18px 16px 10px; }
  #notifPanel.notiffull .notifhead h2 { font-size: 22px; }
  #notifPanel.notiffull .notiftabs, #notifPanel.notiffull .notifstatus { padding-left: 16px; padding-right: 16px; }
  #notifPanel.notiffull .notifcompose summary { margin-left: 16px; margin-right: 16px; }
  #notifPanel.notiffull .notifcompose form { padding-left: 16px; padding-right: 16px; }
  #notifPanel.notiffull .notifscroll { padding: 0 16px 20px; }
}

/* Console: the key sits in a dark well rather than a bright bar. */
:root[data-theme="console"] #keyLedger .keysecret code, :root[data-theme="console"] #addPeople .apcmd { background: var(--bg); color: var(--txt);
  box-shadow: inset 0 0 0 1px var(--line); }
@media (max-width: 760px) {
  #peoplePanel .prow .pacts:empty { display: none; }
}
