/* Ratchet staff sign-in (094): sign-in, two-step, choose store, reset, invite, Who's working + PIN, Account, support
 * home and banner, People -> Team access, and the local outbox page. Uses the shop design tokens (shop.css), so it
 * follows light and dark mode and the Look switcher. */

/* ---------- card screens (extends .si / .si-card from app.css) ---------- */
.au .si-card.au-card { max-width: 420px; padding: 30px 28px 22px; border: 0; box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 30px rgba(0, 0, 0, .06); }
.au.au-wide .si-card.au-card { max-width: 640px; }
.au .si-mark { background: var(--ink); color: var(--surface); }
.au .si-card h1 { font: 700 26px/1.2 var(--font-display); letter-spacing: -0.022em; }
.au .si-sub { margin-bottom: 20px; }
.au-form { display: flex; flex-direction: column; gap: 14px; }
.au-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.au-field > label, .au-label-row label { font-size: 13px; font-weight: 600; color: var(--ink); margin: 0; }
.au-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.au-field input, .au-field select, .au-field textarea, .au-pw input { width: 100%; min-height: 44px; font-size: 16px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--hair-strong); background: var(--surface); color: var(--ink); box-sizing: border-box; }
.au-field textarea { min-height: 84px; resize: vertical; max-width: none; }
.au-pw { position: relative; }
.au-pw input { padding-right: 64px; }
.au-pw .au-show { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 32px; font-size: 13px; }
.au-readonly { background: var(--fill) !important; color: var(--ink-2) !important; }
.au-hint { font-size: 13px; color: var(--ink-2); margin: 0; line-height: 1.4; }
.au-hint.is-ok { color: var(--green); }
.au-hint.is-bad { color: var(--red); }
.au-check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink); margin: 0; cursor: pointer; }
.au-check input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; margin: 0; }
.au .si-go { min-height: 48px; margin-top: 2px; }
.au-link { font-size: 14px; padding: 4px 6px; min-height: 0; }
.au-forgot { align-self: flex-end; margin-top: -2px; }
.au-center, .au button.au-center { display: block; width: fit-content; margin: 14px auto 0; text-align: center; }
.au-fine { text-align: center; font-size: 13px; color: var(--ink-2); margin: 16px 0 0; }
.au-status:empty { display: none; }
.au-status .notice { margin: 0; }
.au-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.au-tag { flex: none; font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 2px 8px; }
.au-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.au-practice { margin-top: 18px; border-top: 1px solid var(--hair); padding-top: 14px; }
.au-practice > summary { font-size: 14px; color: var(--ink-2); font-weight: 500; }
.au-practice-body { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
button.au-danger, .au-danger { color: var(--red); }
button.au-danger:hover { background: var(--red-soft); }

/* codes */
.au-code { font: 600 24px/1 ui-monospace, "SF Mono", Menlo, monospace !important; letter-spacing: .3em; text-align: center; }
.au-code.is-recovery { letter-spacing: .08em; font-size: 20px !important; text-transform: uppercase; }
.au-code.au-code-sm { font-size: 18px !important; max-width: 180px; letter-spacing: .2em; }
.au-steps { margin: 0 0 18px; padding-left: 20px; display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.au-steps li strong { font-weight: 600; }
.au-qr { margin-top: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.au-qr img { width: 200px; height: 200px; border-radius: 12px; background: #fff; padding: 8px; box-shadow: 0 0 0 1px var(--hair); }
.au-key summary { font-size: 13px; font-weight: 500; color: var(--accent); }
/* Beta onboarding (Oct 21): add the key to the authenticator app on this phone; the next-step note on the invite; room above
   "I saved these codes"; the role hint on Team access's invite form. */
.au-open-app { align-self: stretch; text-align: center; }
.au-key .au-row { margin-top: 6px; align-items: center; }
.au-next { margin: 2px 0 10px; }
.au-card > .au-check { margin-top: 12px; }
.ta-role-hint { margin: 0 0 8px; }
.au-keytext { display: block; margin-top: 6px; font: 600 15px/1.5 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .06em; word-break: break-all; user-select: all;
  background: var(--fill); border-radius: 8px; padding: 8px 10px; }
.au-codes { list-style: none; margin: 0 0 14px; padding: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; background: var(--fill); border-radius: 12px; }
.au-codes code { font: 600 15px/1.4 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .05em; user-select: all; }
.au-account .au-codes { max-width: 420px; }

/* choose company / store */
.au-group { margin-bottom: 14px; }
.au-group-title, .au h2.au-group-title, .focus-app .au h2.au-group-title { font: 600 13px/1.3 var(--font); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); margin: 16px 0 8px; }
.au .si-list { margin-bottom: 4px; }
.au-pick { margin-bottom: 8px; }
.au-pick .si-list { max-height: 320px; overflow: auto; }

/* Who's working + PIN pad */
.au-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; margin: 6px 0 4px; }
.au button.au-person { all: unset; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 10px 14px; border-radius: 16px; cursor: pointer;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hair); text-align: center; transition: transform .12s ease, background .12s ease; }
.au button.au-person:hover { background: var(--fill); }
.au button.au-person:active { transform: scale(.97); }
.au button.au-person:focus-visible { outline: 3px solid var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.au-person-name { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.25; }
.au-person-hint { font-size: 12px; color: var(--ink-2, #555); line-height: 1.2; text-align: center; }   /* U8-A: what tells two same-name people apart */
.au-avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font: 600 20px/1 var(--font-display); }
.au-avatar-lg { width: 72px; height: 72px; font-size: 26px; margin: 0 auto 10px; }
.au-dots { display: flex; justify-content: center; gap: 14px; margin: 6px 0 22px; }
.au-dots span { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.au-dots span.on { background: var(--ink); box-shadow: none; }
.au-keys { display: grid; grid-template-columns: repeat(3, 72px); gap: 14px 22px; justify-content: center; margin-bottom: 18px; }
.au-keys .au-key { width: 72px; height: 72px; border-radius: 50%; font: 500 28px/1 var(--font-display); background: var(--fill); color: var(--ink); padding: 0; }
.au-keys .au-key:hover { background: var(--fill-hover); }
.au-keys .au-key[aria-label="Delete"] { background: transparent; font-size: 22px; }

/* support banner (fixed above every screen while in a support view) */
.au-banner { position: sticky; top: 0; z-index: 1000; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 9px 16px; background: #8a1c1c; color: #fff; font-size: 14px; }
.au-banner strong { font-weight: 600; }
.au-banner.au-banner-test { background: #1d4fa8; }   /* U35-B: testing a role (blue), apart from a support view (red) */
.au-banner-left { opacity: .9; font-variant-numeric: tabular-nums; }
.au-banner-why { opacity: .85; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-banner button { margin-left: auto; background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .4); min-height: 32px; font-size: 13px; }
.au-banner button:hover { background: rgba(255, 255, 255, .26); }
body.au-in-support .shop-side { top: 40px; }

/* Account page */
.au-account { max-width: 760px; }
.au-account .au-section { margin-bottom: 16px; }
.au-account .au-section h2 { margin-bottom: 12px; }
.au-account .au-section > p { margin: 0 0 10px; }
.au-narrow { max-width: 420px; }
.au-inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0 12px; }
.au-account .si-card.au-card { box-shadow: none; padding: 0; max-width: none; background: transparent; }
.au-account .au .si-mark, .au-section .si-mark { display: none; }
.au-section .si { min-height: 0; padding: 0; display: block; }
.au-section .si-card h1 { text-align: left; font-size: 19px; }
.au-section .si-sub { text-align: left; }
a.shop-me-name { color: inherit; display: block; }
a.shop-me-name:hover { text-decoration: underline; }

/* People -> Team access */
.ta-invite { margin-bottom: 16px; }
.ta-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.ta-where { border: 0; padding: 0; margin: 0 0 14px; }
.ta-where legend { font-size: 13px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.ta-stores { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.ta-section { margin-bottom: 16px; }
.ta-list { list-style: none; margin: 0; padding: 0; }
.ta-find { width: 100%; max-width: 420px; margin: 4px 0 12px; }   /* shop M4: find a person */
.ta-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); grid-template-areas: "who roles" "meta actions" "add add";
  gap: 6px 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--hair); }
.ta-row:first-child { border-top: 0; }
.ta-row.is-off { opacity: .7; }
.ta-who { grid-area: who; display: flex; flex-direction: column; min-width: 0; }
.ta-who strong { font-weight: 600; }
.ta-sub { color: var(--ink-2); font-size: 13px; font-weight: 400; overflow-wrap: anywhere; }
.ta-roles { grid-area: roles; display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.ta-role { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.ta button.ta-x { all: unset; cursor: pointer; width: 18px; height: 18px; display: inline-grid; place-items: center; border-radius: 50%; color: var(--ink-2); font-size: 14px; }
.ta button.ta-x:hover { background: var(--fill-hover); color: var(--red); }
.ta-meta { grid-area: meta; font-size: 13px; color: var(--ink-2); }
.ta-mail { margin-top: 4px; overflow-wrap: anywhere; }   /* U9-B: the invite email's true state */
.ta-ask { margin-top: 2px; color: var(--amber, #b25000); font-weight: 600; }
.ta-actions { grid-area: actions; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ta-addrole { grid-area: add; display: flex; gap: 8px; flex-wrap: wrap; padding-top: 8px; }
.ta-addrole select { min-height: 36px; }
.ta-addrole .ta-to { align-self: center; }
.ta-out { margin-left: 8px; font-weight: 600; }
.ta-hist > summary { font-weight: 600; font-size: 17px; }
.ta-events { list-style: none; margin: 12px 0 0; padding: 0; max-height: 480px; overflow: auto; }
.ta-events li { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 7px 0; border-top: 1px solid var(--hair); font-size: 14px; }
.ta-events li.is-support { color: #8a1c1c; }
.ta-events time { color: var(--ink-2); font-variant-numeric: tabular-nums; }

@media (max-width: 760px) {
  .ta-grid { grid-template-columns: 1fr; }
  .ta-row { grid-template-columns: 1fr; grid-template-areas: "who" "roles" "meta" "actions" "add"; }
  .ta-actions { justify-content: flex-start; }
  .ta-events li { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 480px) {
  .au .si-card.au-card { padding: 24px 18px 18px; }
  .au-people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .au-keys { grid-template-columns: repeat(3, 64px); gap: 12px 18px; }
  .au-keys .au-key { width: 64px; height: 64px; }
  .au-codes { grid-template-columns: 1fr; }
  .au-banner-why { flex-basis: 100%; white-space: normal; }
  .au-banner button { margin-left: 0; }
}

/* ---------- the local outbox page (/outbox, this laptop only) ---------- */
body.ob { margin: 0; background: var(--canvas, #f5f5f7); color: var(--ink, #1d1d1f); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; }
.ob-main { max-width: 760px; margin: 0 auto; padding: 32px 16px 60px; }
.ob-main h1 { font-size: 28px; margin: 0 0 6px; }
.ob-lead { color: #6e6e73; margin: 0 0 24px; }
.ob-item { background: #fff; border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.ob-item h2 { font-size: 17px; margin: 0 0 4px; }
.ob-meta, .ob-note { color: #6e6e73; font-size: 13px; margin: 0 0 8px; }
.ob-body { white-space: pre-wrap; word-break: break-word; font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; background: #f5f5f7; border-radius: 10px; padding: 12px 14px; margin: 8px 0 0; }
.ob-body a { color: #0a66d8; }
.ob-state { margin: 4px 0 8px; }
/* U9-B (371): the true state at a glance, each attempt, and the two decisions for an uncertain email */
.ob-item.is-unknown, .ob-item.is-waiting { box-shadow: inset 4px 0 0 #b25000, 0 1px 2px rgba(0, 0, 0, .05); }
.ob-item.is-failed { box-shadow: inset 4px 0 0 #c9302c, 0 1px 2px rgba(0, 0, 0, .05); }
.ob-item.is-sent { box-shadow: inset 4px 0 0 #248a3d, 0 1px 2px rgba(0, 0, 0, .05); }
.ob-attempts { list-style: none; margin: 0 0 8px; padding: 0; color: #3a3a3c; font-size: 13px; overflow-wrap: anywhere; }
.ob-attempts li { padding: 2px 0; }
.ob-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 8px; }
.ob-actions .ob-note { flex-basis: 100%; margin: 0; color: #b25000; }
.ob-actions form { margin: 0; }
.ob-actions button { font: 600 14px/1 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; min-height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid #d2d2d7; background: #fff; color: #1d1d1f; cursor: pointer; }
.ob-actions button.ob-danger { color: #c9302c; }
/* batch 30: the onboarding page stays white like the rest (no device dark mode) */

/* Team access › What each role can do (read-only guide) */
.ta-rg-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.ta-rg-card { border: 1px solid var(--hair); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.ta-rg-card h3 { margin: 0 0 2px; font-size: 0.98rem; }
.ta-rg-can { margin: 6px 0 0; padding-left: 18px; font-size: 0.92em; }
.ta-rg-sys { margin-top: 10px; }
/* 188: hand a person's open work to someone else */
.ta-ho { margin: 8px 0 0; display: grid; gap: 6px; }
.ta-ho-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ta-ho-row input { flex: 1 1 220px; }
.ta-ho-left { margin: 4px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 0.9em; }
/* U15-A (395): leave, move, rehire and a person's history (Team access) */
.ta-life { grid-column: 1 / -1; margin-top: 4px; }
.ta-life > summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.ta-life-out { display: grid; gap: 10px; padding: 8px 0 4px; }
.ta-life-out h4 { margin: 6px 0 0; font-size: 14px; }
.ta-status { margin: 0; }
.ta-words > summary { cursor: pointer; font-size: 13px; color: var(--ink-2); }
.ta-words ul, .ta-plan, .ta-periods { margin: 4px 0 0; padding-left: 18px; font-size: 14px; }
.ta-periods li.is-ended, .ta-periods li.is-cancelled { color: var(--ink-2); }
.ta-life-act { border-top: 1px solid var(--hair); padding-top: 8px; display: grid; gap: 6px; }
.ta-life-act > button { justify-self: start; }
.ta-lf-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.ta-lf { display: grid; gap: 2px; min-width: 0; flex: 1 1 160px; }
.ta-lf-l { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.ta-lf input, .ta-lf select { min-height: 36px; width: 100%; box-sizing: border-box; }
.ta-preview { display: grid; gap: 6px; padding: 8px 10px; border: 1px solid var(--hair); border-radius: 10px; }
.ta-preview > button { justify-self: start; }
/* 240: company roles; 241: Ratchet support access (Team access) */
.ta-cr-form, .ta-sg-form { display: grid; gap: 10px; margin-top: 10px; }
.ta-cr-perms { display: grid; gap: 8px; }
.ta-cr-kind { border: 0; margin: 0; padding: 0; display: grid; gap: 4px; }
.ta-cr-kind legend { padding: 0; margin-bottom: 4px; font-weight: 600; font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.75; }
.ta-cr-review ul { margin: 6px 0; padding-left: 18px; }
.ta-cr-new > summary, .ta-croles .au-row { margin-top: 10px; }
.ta-sg-form input[type=text], .ta-sg-form input:not([type]) { width: 100%; }

/* Batch 30 (UI direction, Oct 22): sign-in, account and onboarding in the shop's look: the title in the heavy forward italic,
   square fields and buttons, the accent from the brand when it is known (Ratchet's default before sign-in). */
.au .si-card { border-radius: 6px; box-shadow: none; border: 1px solid var(--hair); }
.au .si-card h1 { font: italic 900 28px/1.1 var(--font-title, var(--font-display)); text-transform: uppercase; letter-spacing: -0.005em; }
.au-section .si-card h1 { font-size: 19px; }
.ob-main h1 { font: italic 900 30px/1.08 var(--font-title, var(--font-display)); text-transform: uppercase; }
.au :is(input, select) { border-radius: var(--r-s, 6px); }
.au :is(input, select):focus-visible { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.au button { border-radius: var(--r-s, 6px); }
