/* Companies, New company, People & roles, Borrowed access and the borrowed-access form
   (build plan 2026-11-07, A3). Each page wears `.pane`, so the Front Office's spacing,
   fields, folds and lists apply; this file adds only what those pages need beyond them.
   Tokens only (desk.css); no inline styles are set by the scripts. The admin body already
   pads the page, so these panes add no padding of their own. */

#view-clients.pane, #view-newclient.pane, #view-identity.pane, #view-borrowedaccess.pane { padding: 0; }
#view-clients .pane-head .actions { justify-self: end; }
/* app.css gives `.note` a bar and padding for the pages not yet moved; on these pages a
   note is the Front Office's grey line (desk.css). */
#view-clients .note, #view-newclient .note, #view-identity .note, #view-borrowedaccess .note, #view-workspace .note,
#elevform .note { border-left: 0; padding: 0; margin: 0; line-height: inherit; }
#clroot, #idroot, #babody, #ncroot, .cllist, .idlist { display: grid; gap: var(--s-3); align-content: start; min-width: 0; }

/* The lists: one line a row, numbers on the right. */
.cltable, .idtable, .idmembers, .batable { width: 100%; }
.cltable th, .cltable td, .idtable th, .idtable td, .idmembers th, .idmembers td, .batable th, .batable td {
  vertical-align: middle; text-align: left; }
.cltable th[scope="row"], .idtable th[scope="row"], .idmembers th[scope="row"] {
  font-size: var(--text-base); font-weight: 400; color: var(--ink); text-transform: none; letter-spacing: normal; }
.cltable td.num, .cltable th.num { text-align: right; font-variant-numeric: tabular-nums; }
.cltable th.num .sort-head { justify-content: flex-end; }
.cltable tr.selected > th, .idtable tr.selected > th { box-shadow: inset 3px 0 0 var(--accent); }
.cltable tr.selected, .idtable tr.selected { background: var(--accent-soft); }
.clname .btn.link { font-weight: 600; }
.clstate { white-space: nowrap; }
.clmono { font-family: var(--mono); }

/* One company's details, under its row: the parts side by side, wrapping. */
.cldetail > td, .iddetail > td { background: var(--surface-2); padding: var(--s-4); }
.cldetails { display: grid; gap: var(--s-3); }
.clparts { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: var(--s-4); }
.clpart { display: grid; gap: var(--s-2); align-content: start; min-width: 0; }
.clpart h4, .clpart p { margin: 0; }
.clsteps, .clstuck, .clattempts { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.clattempts li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.clform, .idform { display: grid; gap: var(--s-3); max-width: 36rem; }

/* New company. */
.ncform { display: grid; gap: var(--s-6); max-width: 56rem; }
.ncpair { display: flex; flex-wrap: wrap; gap: var(--s-4); }
.ncpair > .field { flex: 1 1 12rem; }
.nctypes { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: var(--s-3); }
.nctype { display: flex; gap: var(--s-2); margin: 0; padding: var(--s-3); border: 1px solid var(--line);
  border-radius: var(--radius-lg); cursor: pointer; }
.nctype:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.nctypebody { display: grid; gap: var(--s-1); }
.nctypebody p { margin: 0; }
.ncsamples { margin: 0; padding-left: var(--s-4); }
input.ncaddr { max-width: 16rem; }
.ncdomain { margin-left: var(--s-1); color: var(--ink-2); }
.ncpw { font-family: var(--mono); font-size: var(--text-lg); padding: var(--s-1) var(--s-2);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); user-select: all; }

/* People & roles. */
.idpanel { display: grid; gap: var(--s-3); }
.idpanel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-2); }
.idpanel-head h3 { margin: 0; }
.idmembers td .chip + .chip { margin-left: var(--s-1); }
.idperson .clmono { overflow-wrap: anywhere; }
.idgrant { display: grid; grid-template-columns: minmax(0, 1fr) 12rem auto; gap: var(--s-3); align-items: start;
  padding: var(--s-2) 0; border-top: 1px solid var(--line); }
.idgrant p { margin: 0; }
.iddivisions { display: grid; }
.iddivision { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3);
  padding: var(--s-2) 0; border-bottom: 1px solid var(--line); }

/* Borrowed access. */
.bamail { font-family: var(--mono); }
.bawhy { max-width: 24rem; overflow-wrap: anywhere; }

/* The one borrowed-access form (elevation.js), in the dialog and in the workspace. */
.borrow-form { display: grid; gap: var(--s-4); max-width: 36rem; }
#elevform.pane { padding: 0; background: transparent; }
/* The dialog's own label and fieldset rules (app.css .dlg) are for the forms not yet moved. */
#elevform label.check { display: flex; margin: 0; }
#elevform fieldset { border: 0; padding: 0; margin: 0; }
#elevform .field label { margin: 0; }

@media (max-width: 760px) {
  .idgrant { grid-template-columns: minmax(0, 1fr); }
}
