/* The second step of the back-office / register sign-in (public/shared/two-step.js). Only tokens both stylesheets define (--ink, --muted, --line, --panel-2, --brand, --danger-ink). */
.ts-form { display: grid; gap: 14px; min-width: 0; }
.ts-note { margin: 0; color: var(--muted); }
.ts-steps { margin: 0; padding-inline-start: 20px; display: grid; gap: 4px; color: var(--muted); }
.ts-qr { justify-self: center; width: min(212px, 100%); background: #fff; padding: 8px; border-radius: 10px; border: 1px solid var(--line); line-height: 0; }   /* white in the dark theme too: the code must scan */
.ts-qr svg { width: 100%; height: auto; aspect-ratio: 1; display: block; }
.ts-secret { display: grid; gap: 6px; min-width: 0; }
.ts-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ts-secret-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--panel-2); border: 1px dashed var(--line); border-radius: 10px; min-width: 0; }
.ts-secret-row code { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14.5px; letter-spacing: .08em; text-align: center; overflow-wrap: anywhere; color: var(--ink); }
.ts-copy, .ts-link, .ts-back { background: none; border: 0; padding: 8px 6px; min-height: 40px; color: var(--brand); font: inherit; font-weight: 700; cursor: pointer; }
.ts-link { padding: 0; min-height: 0; justify-self: start; text-decoration: underline; }
.ts-back { justify-self: center; }
.ts-code { width: 100%; min-height: 48px; text-align: center; direction: ltr; letter-spacing: .5em; font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
.ts-error { margin: 0; min-height: 18px; color: var(--danger-ink); font-weight: 650; }
.ts-error:empty { min-height: 0; }

/* Password fields (js/core/password-field.js), one look on the back office, the register sign-in and every form that sets a password:
   the show / hide button sits inside the field at its inline end (the left in Arabic). Logical properties only; tokens both stylesheets define. */
.pw-wrap { position: relative; display: block; min-width: 0; }
:root:root .pw-wrap > input.pw-input { padding-inline-end: 46px; }
.pw-toggle { position: absolute; inset-block: 0; inset-inline-end: 0; width: 44px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.pw-toggle:hover:not(:disabled) { color: var(--ink); }
.pw-toggle[aria-pressed="true"] { color: var(--brand); }
.pw-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: -3px; }
.pw-toggle:disabled { opacity: .5; cursor: default; }
.pw-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; min-width: 0; align-items: start; }   /* the checklist under the first field never stretches the confirm field */
.pw-pair > .field { margin-bottom: 0; }
/* the live rules under the first password field (shared/password-policy.js): a rule turns green with a tick once it is met; after a refused save the missing ones turn red */
.pw-rules { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; line-height: 1.4; }
.pw-rules li { display: flex; align-items: baseline; gap: 8px; color: var(--muted); }
.pw-rules li::before { content: "\25CB"; flex: none; width: 1.2em; text-align: center; }
.pw-rules li.ok { color: var(--ok-ink, var(--ok, #2f8f5b)); }
.pw-rules li.ok::before { content: "\2713"; font-weight: 800; }
.pw-rules.flag li:not(.ok) { color: var(--danger-ink, var(--danger, #b3261e)); font-weight: 650; }
.pw-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 900px), (pointer: coarse) {
  /* 48 px to tap on a phone */
  .pw-toggle { width: 48px; min-height: 48px; }
  :root:root .pw-wrap > input.pw-input { min-height: 48px; padding-inline-end: 52px; }
}
