/* Accounts: sign-in / setup / invitation pages, the header's signed-in name, Team, Activity and My account.
   Uses app.css's tokens (loaded first on every page); nothing here changes the existing pages. */

/* ------------------------------------------------------------------ standalone pages */
body.auth-page { min-height: 100vh; }
main.auth { max-width: 520px; padding: 9vh 20px 48px; }
.auth-card {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 28px 30px 24px;
}
.auth-card h1 { font-size: 26px; margin-bottom: .5em; }
.auth-brand {
  font: 800 13px/1 var(--head);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-brand::before {
  content: "";
  width: 10px; height: 18px;
  border-radius: 3px;
  background: var(--frame);
  box-shadow: 0 0 0 2px var(--marker);
}
.auth-step { font-size: 12.5px; font-weight: 650; color: var(--ink-soft); margin: -6px 0 10px; }
.auth-actions { margin-top: 16px; }
.auth-error { color: var(--warn); font-weight: 600; font-size: 14px; min-height: 1.2em; margin: 12px 0 0; }
.auth-error:empty { margin: 0; min-height: 0; }
.auth-foot { font-size: 13px; margin: 18px 0 0; }
.auth code, .acct code { background: var(--lightbox); padding: 2px 6px; border-radius: 5px; font-size: 13px; }
/* app.css gives buttons display:inline-flex, which beats the hidden attribute: keep hidden things hidden here */
.auth [hidden], .acct [hidden] { display: none !important; }
.auth input[type="email"], .acct input[type="email"], .acct input[type="date"] {
  width: 100%;
  font: 15px/1.4 var(--body);
  color: var(--ink);
  background: var(--lightbox);
  border: 1px solid var(--rule);
  border-radius: var(--radius-ui);
  padding: 9px 10px;
}
.auth .readonly { font-weight: 650; margin: 4px 0 2px; }

/* ------------------------------------------------------------------ authenticator enrolment */
.enrol { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; margin: 8px 0 4px; }
.qr {
  background: #fff;
  border-radius: 12px;
  padding: 6px;
  line-height: 0;
  box-shadow: inset 0 0 0 1px var(--rule);
}
.qr svg { width: 176px; height: 176px; display: block; }
.enrol ol { margin: 0 0 6px; padding-left: 20px; font-size: 14px; }
.enrol li { margin-bottom: 6px; }
.secret-key { font: 600 13.5px/1.6 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .04em; word-break: break-all; }

/* ------------------------------------------------------------------ recovery codes */
.codes {
  list-style: none;
  padding: 14px 16px;
  margin: 10px 0 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 18px;
  background: var(--lightbox);
  border: 1px dashed var(--rule);
  border-radius: 10px;
  counter-reset: code;
}
.codes li { counter-increment: code; font: 600 14px/1.6 ui-monospace, "SF Mono", Menlo, monospace; }
.codes li::before { content: counter(code) "."; display: inline-block; width: 2.2em; color: var(--ink-soft); font-weight: 500; }
.codes li code { background: none; padding: 0; font: inherit; }
label.ack { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 12px 0 4px; }

/* ------------------------------------------------------------------ header: who is signed in */
.who { display: flex; align-items: center; gap: 10px; font-size: 13px; white-space: nowrap; }
.who[hidden] { display: none; }
.who-name { color: var(--ink); font-weight: 650; text-decoration: none; }
.who-name:hover, .who-name[aria-current="page"] { text-decoration: underline; text-underline-offset: 3px; }
.who-role { color: var(--ink-soft); }
.who button { padding: 6px 10px; font-size: 13px; }

/* ------------------------------------------------------------------ Team, Activity, My account */
.acct .panel h2 { margin-bottom: .5em; }
.acct .grid2 { align-items: start; }
.accepted-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.accept-box { border-left: 5px solid var(--marker); padding: 4px 0 4px 14px; }
.accept-box .row { margin-top: 10px; }
.accept-box input { max-width: 320px; }
.link-box { display: flex; gap: 8px; margin: 10px 0 4px; }
.link-box input { font: 13px/1.4 ui-monospace, "SF Mono", Menlo, monospace; }
.pill.active, .pill.accepted, .pill.on { background: color-mix(in srgb, var(--ok) 18%, var(--sheet)); color: var(--ok); }
.pill.revoked, .pill.expired { background: color-mix(in srgb, var(--warn) 14%, var(--sheet)); color: var(--warn); }
.pill.pending { background: color-mix(in srgb, var(--action) 14%, var(--sheet)); color: var(--action); }
.pill.off { color: var(--ink-soft); }
.you { font-size: 12px; color: var(--ink-soft); margin-left: 4px; }
table.plain td.actions { white-space: nowrap; text-align: right; }
table.plain td.actions button { padding: 6px 10px; font-size: 13px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; margin-bottom: 14px; }
.filters label { margin: 0 0 4px; }
.filters select, .filters input { width: auto; min-width: 150px; }
.audit td { font-size: 13.5px; }
.audit .detail { color: var(--ink-soft); font-size: 12.5px; max-width: 52ch; overflow-wrap: anywhere; }
.audit .when { white-space: nowrap; }
.inline-form { display: grid; gap: 2px; max-width: 420px; }
.inline-form .row { margin-top: 10px; }
.device { color: var(--ink-soft); font-size: 12.5px; }

@media (max-width: 1520px) {
  .who-role { display: none; }            /* the header is full: the name links to My account, which says the role */
}
@media (max-width: 760px) {
  main.auth { padding-top: 5vh; }
  .auth-card { padding: 22px 18px 18px; }
  .enrol { grid-template-columns: 1fr; }
  .codes { grid-template-columns: 1fr; }
  .who { flex-wrap: wrap; }
}
