/* EJA Services site and admin: the pieces added with email and two-step sign-in, and the new order of the pages (tabs in
   My account and in the admin's sections, Help, Downloads). Same tokens and glass look as site.css; everything wraps on a
   phone (no sideways scrolling). */

/* ------------------------------------------------------------------ signing in safely */
.forgot-line { margin: 2px 0 0; text-align: center; }
.notice-card { border-inline-start: 4px solid var(--gold); }
.notice-card .eja-btn { margin-top: 10px; }

/* two-step sign-in (twofactor.js) */
.tfa-code { font-size: 20px; letter-spacing: .18em; font-variant-numeric: tabular-nums; max-width: 260px; }
.tfa-steps { margin: 0; padding-inline-start: 22px; display: grid; gap: 14px; }
.tfa-steps li { overflow-wrap: anywhere; }
.tfa-steps li > * { display: block; margin-top: 6px; }
.tfa-steps .secret { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tfa-qr { width: 200px; height: 200px; max-width: 100%; background: #fff; border-radius: 12px; padding: 6px; border: 1px solid var(--line);
  image-rendering: pixelated; }
.tfa-codes { margin: 8px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
.tfa-codes li { padding: 6px 10px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); text-align: center; overflow-wrap: anywhere; }
.tfa-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 12px 16px 0; padding: 12px 14px;
  border-radius: var(--radius-14, 14px); border: 1px solid var(--line); border-inline-start: 4px solid var(--gold); background: var(--card);
  box-shadow: var(--shadow-card); }
.tfa-banner p { flex: 1 1 260px; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.tfa-banner-acts { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 420px) { .tfa-codes { grid-template-columns: minmax(0, 1fr); } }

/* My account: the online AI credit, and the plan requests that can be cancelled */
.ai-wallet { display: grid; gap: 8px; min-width: 0; }
.ai-wallet + .ai-wallet { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.ai-wallet .eja-btn { justify-self: start; }
.ai-moves { margin: 0; padding-inline-start: 20px; display: grid; gap: 4px; color: var(--muted); font-size: 14px; }
.ai-moves li { overflow-wrap: anywhere; }
#my-requests .device { flex-wrap: wrap; }

/* ------------------------------------------------------------------ the tabs of a section (admin) and of My account */
.sec-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 6px; border-radius: var(--radius-pill, 999px);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-card); width: fit-content; max-width: 100%; }
.sec-tab { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: var(--radius-pill, 999px);
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; border: 1px solid transparent; min-width: 0; }
.sec-tab span { overflow-wrap: anywhere; }
.sec-tab:hover { border-color: var(--line); }
.sec-tab.on { background: var(--brand-fill); color: var(--on-brand); }
.sec-tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sec-tab .nav-count { margin-inline-start: 4px; }
@media (max-width: 760px) {
  .sec-tabs { border-radius: 16px; width: auto; }
  .sec-tab { padding: 0 10px; min-height: 36px; font-size: 13px; }
}

/* My account: the tabs under the greeting, the licences side by side on a wide screen */
.acc-tabs { margin: 0; }
.lic-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); align-items: start; }

/* ------------------------------------------------------------------ Downloads and Help */
.page-main { padding-top: 24px; padding-bottom: 32px; display: grid; gap: 14px; align-content: start; }
.page-h1 { font-size: 26px; font-weight: 800; margin: 0; }
.page-main > .section-sub { margin: 0; }
.dl-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); align-items: start; }
.dl-card { display: grid; gap: 12px; min-width: 0; }
.dl-card .btn-xl { justify-self: start; max-width: 100%; }
.dl-card .reqs-list li { font-size: 14px; }
.dl-steps { margin: 0; padding-inline-start: 22px; display: grid; gap: 6px; color: var(--muted); font-size: 14px; list-style: decimal; }
.ai-moves { list-style: disc; }
.dl-steps li, .dl-card p { overflow-wrap: anywhere; }
.dl-notes summary { cursor: pointer; font-weight: 600; }
.dl-notes .pre { white-space: pre-wrap; margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.dl-qr-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.dl-qr { width: 180px; height: 180px; max-width: 100%; background: #fff; border-radius: 14px; padding: 8px; border: 1px solid var(--line);
  image-rendering: pixelated; flex: 0 0 auto; }
.dl-qr-row .stack { flex: 1 1 220px; }
.dl-qr-row .eja-btn { justify-self: start; }
#help-tabs { margin: 0; }

/* Z39: one-time links */
.share-made { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.share-made .secret { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.share-link, .share-secret { overflow-wrap: anywhere; word-break: break-all; }
.share-secret { white-space: pre-wrap; margin: 0; padding: 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line);
  font-family: var(--font-mono, ui-monospace, monospace); max-height: 50vh; overflow: auto; }
.page-main .block { scroll-margin-top: 90px; }
