/* Accounts panel. Loaded by the tenant and platform admin shells. */

gk-sheet[data-stock-inspector] { overflow-wrap: anywhere; }
gk-sheet[data-stock-inspector] gk-field[group="checkbox"] label {
  display: flex; align-items: center; gap: var(--space-sm, 8px);
  min-block-size: var(--gk-min-tap, 44px);
}
gk-sheet[data-stock-inspector] select { box-sizing: border-box; max-inline-size: 100%; inline-size: 100%; }

/* ── Accounts table (super-admin) ─────────────────────────── */
/* Base table styling comes from `.gk-table .gk-table--compact` (admin-shared.css);
 * only the account-table specifics remain: a slightly wider cell rhythm and the
 * softer `--c-neutral-100` row rule. Scoped `.acct-table.gk-table` (0,2,x) so it
 * outranks the base `.gk-table td` / `.gk-table--compact td` (0,1,x), which load
 * later in admin-shared.css and would otherwise win the tie. */
.acct-table.gk-table thead th { padding: var(--space-xs) var(--space-md); }
.acct-table.gk-table td {
  vertical-align: middle;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--c-neutral-100);
}
.acct-row--revoked { opacity: 0.5; }
/* Grouped-row rules scoped through `.acct-table.gk-table` so they outrank the
 * later-loaded `.gk-table td` shorthand (which would otherwise reset the
 * transparent grouping border back to `--border`). */
.acct-table.gk-table .acct-row-grouped td { border-bottom-color: transparent; }
.acct-table.gk-table .acct-row-grouped--last td { border-bottom: 1px solid var(--c-neutral-100); }
.acct-row-grouped--first .acct-cell-email { vertical-align: top; padding-top: var(--space-md); }
.acct-cell-email { font-family: var(--mono); font-size: var(--fs-12); }
.acct-cell-org   { font-family: var(--mono); font-size: var(--fs-12); color: var(--text-muted); }
.acct-cell-date  { color: var(--text-muted); font-size: var(--fs-12); }
.acct-table[data-gk-adaptive]:not([data-gk-layout="full"]) .acct-card-email { display: inline; }
.acct-role-label { color: var(--text-muted); font-size: var(--fs-12); }
.accounts-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
}
/* Keep the ROLE column from collapsing the select — the header/cell shouldn't
 * wrap the control down to a single letter. */
.acct-table.gk-table th:nth-child(2),
.acct-table.gk-table td:nth-child(2) { white-space: nowrap; }
/* Admin Accounts panel */
#panelAccounts .accounts-intro {
  margin-top: 0;
  margin-bottom: var(--space-2xl);
}
#panelAccounts .accounts-access-guide { margin-bottom: var(--space-2xl); }
#panelAccounts .accounts-access-guide summary {
  color: var(--primary);
  cursor: pointer;
  font-size: var(--fs-13);
  font-weight: 600;
}
#panelAccounts .accounts-access-guide summary:focus-visible { outline: 3px solid var(--focus-ring-color); outline-offset: 3px; }
#panelAccounts .accounts-access-guide p { line-height: 1.55; }
#panelAccounts .accounts-bootstrap-card { display: block; margin-bottom: var(--space-2xl); }
#panelAccounts .accounts-filters { display: grid; gap: var(--space-lg); min-width: 0; }
#panelAccounts .accounts-filters__search { width: min(100%, var(--control-width-xl)); }
#panelAccounts .accounts-filters__search input { width: 100%; }
#panelAccounts .accounts-filter-options { display: grid; gap: var(--space-lg); }
#panelAccounts .accounts-filter-disclosure { margin-bottom: 0; }
#panelAccounts .accounts-filter-disclosure [slot="summary"] { display: block; white-space: normal; overflow-wrap: anywhere; }
#panelAccounts .accounts-filters__group { display: grid; gap: var(--space-xs); min-width: 0; }
#panelAccounts .accounts-filters__label { color: var(--text-muted); font-size: var(--fs-12); font-weight: 700; }
#panelAccounts .accounts-filters__group gk-filter-chips { max-width: 100%; }
#panelAccounts .accounts-add-card { margin-bottom: var(--space-3xl); }
#panelAccounts .accounts-add-row {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  align-items: flex-end;
}
#panelAccounts .accounts-field { width: 200px; }
#panelAccounts .accounts-field--wide { width: 280px; }
#panelAccounts .accounts-field--email { width: 220px; }
#panelAccounts #acctStockAccess { min-inline-size: 0; box-sizing: border-box; }
#panelAccounts #acctStockAccess > label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-block-size: var(--gk-min-tap, 44px);
  cursor: pointer;
}
#panelAccounts #acctStockAccess > label input { flex: 0 0 auto; }

.admin-menu__item[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

/* Administrators: one list, each person two lines with the menu at the right. */
.acct-list { margin: 0; padding: 0; list-style: none; border-block-start: var(--hairline) solid var(--border); }
.acct-person { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); padding-block: var(--space-md); border-block-end: var(--hairline) solid var(--border); }
.acct-person__text { display: grid; gap: var(--space-3xs); min-width: 0; }
.acct-person__email { overflow-wrap: anywhere; font-weight: 600; }
.acct-person__meta { color: var(--text-muted); font-size: var(--fs-14); overflow-wrap: anywhere; }
.acct-person__actions { flex: none; }
