/* Account pages (login, 2FA, password, profile). Colours come from the design tokens only. */

/* Login: asterisks are noise on a two-field form; screen readers still hear "(الزامی)". */
.login-form .req { display: none; }
.acc-note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 1rem 0 0;
  color: var(--fg-muted);
  font-size: 0.875rem;
}
.acc-note .icon { margin-top: 0.2rem; width: 1.1rem; height: 1.1rem; }

/* Panel pages hold a single narrow column of cards. */
.acc-narrow { width: 100%; max-width: 36rem; }
.acc-actions > .acc-grow { flex: 1 1 12rem; }

/* Key / value rows */
.acc-kv { margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.acc-kv > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.625rem 0.875rem;
  background: var(--surface-2);
  border-radius: 0.75rem;
}
.acc-kv dt { color: var(--fg-muted); font-size: 0.875rem; }
.acc-kv dd { margin: 0; font-weight: 600; }
.acc-kv code, .acc-key code, .acc-codes code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  direction: ltr;
  unicode-bidi: isolate;
}

/* 2FA status */
.acc-status { display: flex; align-items: flex-start; gap: 0.875rem; }
.acc-status-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.875rem;
  background: var(--neutral-bg);
  color: var(--neutral-fg);
}
.acc-status-icon.acc-status-on { background: var(--success-bg); color: var(--success-fg); }
.acc-status-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.625rem; margin: 0 0 0.375rem; font-weight: 700; }
.acc-status > div { min-width: 0; }

/* Numbered setup steps */
.acc-steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.5rem; }
.acc-steps > li {
  counter-increment: step;
  position: relative;
  padding-inline-start: 2.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}
.acc-steps > li::before {
  content: counter(step, persian);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-soft-fg);
  font-weight: 700;
}
.acc-text { margin: 0; color: var(--fg-muted); font-size: 0.9375rem; }
.acc-step-title { margin: 0; font-size: 1rem; line-height: 2rem; }

/* QR code: always dark-on-white, even in the dark theme, so phone cameras can read it */
.acc-qr {
  margin: 0.25rem 0;
  align-self: flex-start;
  padding: 0.75rem;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 1rem;
  line-height: 0;
}
.acc-qr img { display: block; width: 12.5rem; max-width: 100%; height: auto; aspect-ratio: 1; }

/* Manual key and recovery codes */
.acc-key {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  padding: 0.5rem;
  padding-inline-start: 0.875rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}
.acc-key code { font-size: 0.9375rem; letter-spacing: 0.05em; overflow-wrap: anywhere; font-weight: 600; }
.acc-codes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}
.acc-codes li {
  padding: 0.625rem 0.5rem;
  text-align: center;
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: 0.75rem;
}
.acc-codes code { font-size: 1.0625rem; font-weight: 700; letter-spacing: 0.04em; line-height: 1.6; white-space: nowrap; }
.acc-copy .icon { width: 1rem; height: 1rem; }
.acc-copied { display: inline-flex; align-items: center; gap: 0.25rem; }
.acc-continue { margin-top: 0.5rem; }
.acc-cancel { margin-top: 0.5rem; }

/* One-time code input: big, centred, spaced digits */
.otp-input {
  text-align: center;
  font-size: 1.375rem;
  letter-spacing: 0.3em;
  font-variant-numeric: tabular-nums;
  min-height: 3.25rem;
}
.otp-input::placeholder { letter-spacing: normal; }

@media (max-width: 30rem) {
  .acc-codes { gap: 0.375rem; }
  .acc-codes li { padding-inline: 0.25rem; }
  .acc-codes code { font-size: 0.875rem; letter-spacing: 0; }
}

/* Recovery codes are meant to be printed: show only the codes. */
@media print {
  .sidebar, .topbar, .bottom-nav, .auth-top, .skip-link, .toast-region, .acc-noprint, .page-header, .alert + .acc-noprint { display: none !important; }
  .app-content, .auth-wrap { padding: 0; background: #fff; }
  .card { box-shadow: none; border: 0; }
  .acc-codes li { border-color: #000; background: #fff; }
  .acc-codes code { color: #000; }
}
