/* Employees and stores (plan §D6/§D11, Card 9) — the People/Stores/Roles tables, the
   edit/add/store drawers built on the shared `.pdrawer` primitive (§C6), and their forms.
   Shared shapes (`.psheet`, `.tbl`, `.status`, `.filters`, `.segctl`, `.fld`, `.inp`,
   `.err`, `.empty-state`, `.pnote`) come from `pages.css`/`shell.css`; this file only adds what
   this page needs and nothing else has: the drawer's own head/body/foot, the store
   checkbox list, the read-only username row, the store-price note, and the roles list. */

.tbl .acts { text-align: right; white-space: nowrap; }
.tbl .acts .link + .link { margin-left: 14px; }
.tbl tr.off td { color: var(--ink-mid); }
/* Row actions mutate a person/store — a control, so ink with an ink underline, never
   the plum `.link` colour (plum is never a control, plan §Global constraints). */
#empPage .tbl .acts .link { color: var(--ink); min-width: 44px; }

/* Phone (< 1024px, board 13/kit.css l.202,345): the username and status columns fold
   into a mono sub-line under the name and the row's own dimming; the People/Price
   columns on Stores fold away so Store code and Edit never clip. `.show-sm` mirrors
   `.hide-sm` — each is the phone-only twin of the other. */
#empPage .tbl .sub { display: block; font-size: 12px; color: var(--ink-mid); line-height: 1.3; margin-top: 2px; }
#empPage .tbl .show-sm { display: none; }

/* A People/Stores table here easily runs wider than a phone screen (5–6 nowrap
   columns) — `.tbl-wrap`'s `overflow-x: auto` (pages.css) scrolls it correctly, but a
   table that wide still pushes `document.documentElement.scrollWidth` out (a Chromium
   ink-overflow quirk: a plain `overflow: auto` box doesn't fully contain an oversized
   <table> descendant for the *document's* scrollable-overflow measurement). `contain:
   paint` closes that gap without changing anything visible. Scoped to this page — flagged
   for pages.css (Card 7/12) since any other page's table could hit the same case. */
#empPage .tbl-wrap { contain: paint; }

.form { display: grid; gap: 16px; max-width: 460px; }
.form .fld > small { display: block; font-size: 12px; color: var(--ink-mid); margin-top: 2px; }

/* the read-only username row inside the Edit drawer */
.ro { min-height: 44px; display: flex; align-items: center; border: 1px dashed var(--rule); border-radius: var(--radius); padding: 0 12px; }

/* the store checkbox list ("Stores they work at") */
.chk { display: flex; flex-wrap: wrap; gap: 8px; }
.chk label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--rule); border-radius: var(--radius); font-size: 14px; cursor: pointer; }
.chk label:has(input:checked) { border-color: var(--ink); }
.chk input { accent-color: var(--ink); width: 16px; height: 16px; margin: 0; }

/* the "Add a store" price note (D6) */
.price { border-left: 2px solid var(--ink); background: var(--paper-2); padding: 12px 14px; font-size: 13.5px; line-height: 1.55; margin: 0; }

/* Roles: a two-column definition list, label left, sentence right */
.dl { display: grid; grid-template-columns: 140px minmax(0, 1fr); column-gap: 0; max-width: 620px; margin: 0; }
.dl > div { display: contents; }
.dl dt, .dl dd { padding: 12px 0; border-bottom: 1px solid var(--rule-soft); margin: 0; min-height: 44px; display: flex; align-items: center; }
.dl dt { font-size: 13.5px; color: var(--ink-mid); }
.dl dd { font-size: 14.5px; }
.dl > div:last-child dt, .dl > div:last-child dd { border-bottom: 0; }

/* the drawer's own head/body/foot (`.pdrawer` from shell.css supplies only the sliding
   panel; the chat's `.drawer-*` classes are the dev drawer's, plan §C6, not reused here) */
.pdrawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--rule); }
.pdrawer-head h2 { font-family: var(--serif); font-size: 20px; font-weight: 500; margin: 0; }
.pdrawer-body { padding: 20px 22px; overflow: auto; flex: 1; }
.pdrawer-foot { padding: 14px 22px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 10px; }
.pdrawer-foot .btn { flex: none; }

@media (max-width: 1023px) {
  .dl { grid-template-columns: minmax(0, 1fr); }
  .dl dt { padding-bottom: 0; min-height: 0; font-size: 12.5px; }
  .dl dd { padding-top: 4px; }
  .pdrawer-foot .btn { flex: 1; }

  #empPage .hide-sm { display: none; }
  #empPage .tbl .show-sm { display: block; }
  #empPage .tbl td { white-space: normal; }
  /* stacked actions each answer a 44 px tap of their own (Card 17): they cannot share hit area */
  #empPage .tbl .acts .link { display: flex; align-items: center; justify-content: flex-end; min-height: 44px; margin: 0 0 0 auto; }
}
