/* The sign-in page (2026-11-17, security.js): quiet and plain - the faces of the people who used this machine, one tap,
 * then the device's own Windows Hello / Touch ID / Face ID / fingerprint. Built on style.css's tokens (light and dark). */
.auth-screen {
  --co-CN: #e5484d;
  --co-KZ: #0ea5e9;
  --co-RU: #f59e0b;
  --co-ALL: #22c55e;
  background:
    radial-gradient(1100px 520px at 50% -12%, var(--accent-soft), transparent 72%),
    var(--bg);
}
.auth-card {
  width: min(100%, 440px);
  padding: 32px 30px 24px;
  border-radius: 20px;
}
.auth-title { font-size: 24px; font-weight: 680; letter-spacing: -0.015em; }
.auth-sub { font-size: 14.5px; line-height: 1.55; }

/* ---------------------------------------------------------------- the faces */
.who-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 12px;
  margin: 4px 0 18px;
}
.who {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 150px;
  padding: 18px 8px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.who:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.who:active { transform: scale(0.97); }
.who:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.who[aria-busy="true"] { pointer-events: none; opacity: 0.65; }
.who-face {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--co, var(--border-strong));
  font-size: 26px;
  font-weight: 650;
  color: var(--text);
}
.who-name { font-size: 15px; font-weight: 620; line-height: 1.25; word-break: break-word; }
.who-co { display: inline-flex; align-items: center; gap: 5px; color: var(--text-3); font-size: 12px; }
.who-co::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--co, var(--text-3)); }
.who-key {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}
.who-key svg { width: 16px; height: 16px; }
.who[data-co="CN"], .who-chip[data-co="CN"] { --co: var(--co-CN); }
.who[data-co="KZ"], .who-chip[data-co="KZ"] { --co: var(--co-KZ); }
.who[data-co="RU"], .who-chip[data-co="RU"] { --co: var(--co-RU); }
.who[data-co="ALL"], .who-chip[data-co="ALL"] { --co: var(--co-ALL); }

/* the person picked on the password form */
.who-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
}
.who-chip .who-face { width: 40px; height: 40px; font-size: 17px; }
.who-chip b { display: block; font-size: 15px; }
.who-chip small { color: var(--text-3); font-size: 12px; }

/* ---------------------------------------------------------------- the key picture (enrol / device step / waiting) */
.key-art {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin: 2px auto 18px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}
.key-art svg { width: 52px; height: 52px; }
.key-art.wait { background: var(--warn-soft); color: var(--warn); }
.auth-screen.asking .key-art { animation: key-pulse 1.6s ease-in-out infinite; }
@keyframes key-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 35%, transparent); }
  50% { box-shadow: 0 0 0 14px color-mix(in srgb, var(--accent) 0%, transparent); }
}
#enrol-form .auth-title, #wait-form .auth-title, #passkey-form .auth-title,
#enrol-form .auth-sub, #wait-form .auth-sub, #passkey-form .auth-sub { text-align: center; }
#enrol-form .btn-block, #wait-form .btn-block, #passkey-form .btn-block, #who-form .btn-block { min-height: 46px; font-size: 15px; }
#enrol-later, #who-other { margin-top: 8px; }

@media (max-width: 480px) {
  .auth-screen { padding: 20px 16px; place-items: start center; }
  .auth-card { padding: 26px 18px 20px; border-radius: 18px; }
  .who-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .who, .auth-screen.asking .key-art { transition: none; animation: none; }
}
.auth-form .field[hidden] { display: none; }

/* 安全 → 员工账户: devices waiting for 同意 (security.js deviceRequestsBlock) */
.device-requests {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent);
  border-radius: 12px;
  background: var(--warn-soft);
}
.device-requests h3 { margin: 0 0 4px; font-size: 15px; color: var(--warn); }
.device-request {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0 0;
  margin-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--warn) 25%, transparent);
}
.device-request .sub { color: var(--text-2); font-size: 12.5px; }

/* ---------------------------------------------------------------- 共用 / 个人 (2026-11-17) */
.who-else .who-face { background: transparent; box-shadow: none; border: 2px dashed var(--border-strong); color: var(--text-3); font-weight: 300; }
.who-co.plain::before { display: none; }
#who-form.personal .who-list { display: block; margin: 0 0 6px; }
.who-solo { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 0 4px; text-align: center; }
.who-solo .who-face { width: 112px; height: 112px; font-size: 46px; margin-bottom: 8px; }
.who-solo .who-name { font-size: 22px; font-weight: 680; }
.who-solo .who-co { font-size: 13px; }
.who-go {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  margin: 26px 0 6px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 10%, transparent);
  transition: transform 120ms ease;
}
.who-go:active { transform: scale(0.95); }
.who-go:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.who-go[aria-busy="true"] { opacity: 0.6; pointer-events: none; }
.who-go svg { width: 52px; height: 52px; }
.who-go-pw { font-size: 30px; letter-spacing: 2px; }
.who-go-text { font-size: 16px; font-weight: 620; }
.who-not { margin-top: 4px; color: var(--text-3); font-size: 13px; }

/* 安全 → 员工账户: the machines and how each is used */
.machines { margin: 18px 0 0; }
.machines h3 { margin: 0 0 4px; font-size: 15px; }
.machines input[type="text"] { width: 100%; min-width: 140px; }
.machines .sub { color: var(--text-3); font-size: 12px; }
