/* Admin Users page (master goal V·D·21, page 3): the parts the shared adm-x design system (admin-console.css)
 * leaves to the page. Logical properties only, so Arabic renders right-to-left; theme tokens come from
 * admin-shell-theme.css (light and dark). The dialog is appended to <body>, so its rules are scoped by
 * [data-user-modal], the attribute the shared dialog shell carries for this page. */

/* Overview sections never grow wider than the panel: a long row wraps instead of being clipped (phones and tablets). */
.adm-x--users [role="tabpanel"]{display:grid;grid-template-columns:minmax(0,1fr);gap:26px;align-content:start}
.adm-x--users [role="tabpanel"][hidden]{display:none}
.adm-x--users .adm-x__section{grid-template-columns:minmax(0,1fr)}
.adm-x--users .adm-u-lifecycle-actions{flex-wrap:wrap;justify-content:flex-start;white-space:normal}
.adm-x--users .adm-u-lifecycle-actions .adm-x__btn{white-space:normal;text-align:center}
.adm-x--users .adm-x__danger{margin-top:0}

/* Identifiers read as data, not as links; unknown stored codes keep the code face. */
.adm-x--users .adm-u-id,.adm-x--users .adm-u-code{color:var(--text-dim);overflow-wrap:anywhere}
.adm-x--users .adm-x__table td>.adm-u-id{white-space:nowrap}

/* Phones: every detail tab stays visible (two rows) instead of scrolling out of sight. */
@media(max-width:560px){
  .adm-x--users .adm-x__tabs{flex-wrap:wrap;overflow-x:visible}
  .adm-x--users .adm-u-lifecycle-actions .adm-x__btn{flex:1 1 calc(50% - 6px);min-height:44px}
}

/* Arabic script is never letter-spaced or upper-cased, and the small labels are set one step larger. */
.adm-x--users[lang="ar"] .adm-x__table th,.adm-x--users[lang="ar"] .adm-x__fact dt,.adm-x--users[lang="ar"] .adm-x__metric span,
.adm-x--users[lang="ar"] .adm-x__badge{letter-spacing:0;text-transform:none;font-size:12px}

/* --- "Send password reset": the e-mailed one-time code ------------------------------------------------ */
[data-user-modal] .adm-u-reset{display:grid;gap:14px;margin:0;padding:0;list-style:none}
[data-user-modal] .adm-u-reset__step{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:12px;
  padding:14px 16px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--bg-2)
}
[data-user-modal] .adm-u-reset__step>div{display:grid;gap:10px;min-width:0}
[data-user-modal] .adm-u-reset__step strong{font-size:13px}
[data-user-modal] .adm-u-reset__num{
  display:grid;
  place-items:center;
  width:26px;
  height:26px;
  border-radius:50%;
  background:color-mix(in srgb,var(--accent,#2563eb) 14%,var(--panel));
  color:color-mix(in srgb,var(--accent,#2563eb) 70%,var(--text));
  font-size:12px;
  font-weight:800
}
/* 10 characters plus the grouping dash at .35em spacing fit without scrolling in any monospace face (review 2026-11-11). */
[data-user-modal] .adm-u-reset__code{
  width:100%;
  max-width:26ch;
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--panel);
  color:var(--text);
  font:600 24px/1.2 ui-monospace,"SF Mono",Menlo,monospace;
  letter-spacing:.35em;
  text-align:center
}
[data-user-modal] .adm-u-reset__code:focus-visible{
  outline:3px solid color-mix(in srgb,var(--accent,#2563eb) 35%,transparent);
  outline-offset:2px
}
[data-user-modal] .adm-u-reset__code:disabled{opacity:.55;cursor:not-allowed}
[data-user-modal] .adm-u-reset__expiry{margin:0;min-height:1.4em;color:var(--muted);font-size:11px;font-variant-numeric:tabular-nums}
[data-user-modal] .adm-u-reset__expiry--over{color:var(--tx-danger,#b91c1c)}
[data-user-modal] .adm-u-reset__expiry:empty{display:none}
[data-user-modal] .adm-u-reset__hint{margin:0;color:var(--tx-warn,#b45309);font-size:11px}
[data-user-modal] .adm-u-reset__hint:empty{display:none}
/* Dark theme: the status, hint and expiry texts keep at least 4.5:1 on the dark panel (the light-theme tokens fall to about 2.6:1). */
[data-theme="dark"] [data-user-modal] .adm-x__code-status--error,[data-theme="dark"] [data-user-modal] .adm-u-reset__expiry--over{color:#fca5a5}
[data-theme="dark"] [data-user-modal] .adm-x__code-status--ok{color:#86efac}
[data-theme="dark"] [data-user-modal] .adm-u-reset__hint{color:#fde68a}
@media(max-width:560px){[data-user-modal] .adm-u-reset__code{max-width:none}}
@media(prefers-reduced-motion:reduce){[data-user-modal] .adm-u-reset *{transition:none}}
