/* NeuroSign cabinet and admin shells (T-026). Uses only the landing tokens (tokens.css, byte copy
   of the landing preview tokens.css of the v3 production delivery folder) and the landing classes of
   styles.css (.top, .wrap, .brand, .mark, .nav, .btn, .card, .kicker); no new colors.
   Записал: Гном Всеволод, исполнитель Rust (Opus 5.5, high), MacBook-Pro-8, 09.10.2026 */

.app-body { background: var(--paper); min-height: 100vh; }
/* The cabinet lockup in the header (LOCKUP_HTML): the same two rules as static/cabinet.css. The header background is --paper, white in light and
   black in dark, so the light lockup shows on light and the dark lockup on dark. */
.logo-d { display: none; } .logo-l, .logo-d { height: 30px; width: auto; }
@media (prefers-color-scheme: dark) { .logo-l { display: none; } .logo-d { display: block; } }
.app-grid { display: grid; grid-template-columns: 232px 1fr; gap: var(--s-6); padding-block: var(--s-6); }
.side { display: flex; flex-direction: column; gap: var(--s-2); }
.side a { text-decoration: none; color: var(--muted); font-weight: 500; padding: var(--s-2) var(--s-3); border-radius: 10px; }
.side a:hover { color: var(--ink); background: color-mix(in srgb, var(--line) 50%, transparent); }
.side a[aria-current="page"] { color: var(--ink); background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: inset 3px 0 0 var(--accent); }
.side .side-head { font-size: var(--fs-0); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: var(--s-2) var(--s-3); }
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-5); }
.page-head h1 { font-family: var(--font-display); font-size: var(--fs-4); margin: 0; }
.panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--s-4); }
.card dl { display: grid; grid-template-columns: auto 1fr; gap: var(--s-2) var(--s-4); margin: 0; }
.card dt { color: var(--muted); font-size: var(--fs-0); }
.card dd { margin: 0; font-weight: 600; }
.island-pending { color: var(--muted); font-size: var(--fs-0); }
.dropzone { border: 2px dashed var(--line); border-radius: 18px; padding: var(--s-6); text-align: center; background: color-mix(in srgb, var(--nv-mist) 60%, transparent); }
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); }
.dropzone .dz-file { font-weight: 600; margin-top: var(--s-3); word-break: break-all; }
.dropzone .dz-sha { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--fs-0); color: var(--muted); word-break: break-all; }
.empty { color: var(--muted); }
.who { margin-left: auto; display: flex; align-items: center; gap: var(--s-3); font-size: var(--fs-0); }
.signin-card { max-width: 440px; margin: var(--s-8, 4rem) auto; text-align: center; }
@media (max-width: 860px) { .app-grid { grid-template-columns: 1fr; } .side { flex-direction: row; flex-wrap: wrap; } }
.who form { margin: 0; }
.who button.btn { background: transparent; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.who-name { font-weight: 600; color: var(--ink); }
.who-org { color: var(--muted); }

/* NS-UI-PASS-2: the /signin card (markup: signin_passkey_markup in lib.rs). One column per step: label, input, actions row.
   Only tokens of tokens.css: space steps --s-*, --line, --radius-s, --panel, --ink, --accent. Gaps are flex gaps, so a hidden step
   (display: none) reserves no room; the status line is the first item of the panel and has no box while it is empty. */
.signin-card [hidden] { display: none !important; }
.signin-card #ns-signin { text-align: left; margin-top: var(--s-3); }
.signin-card #ns-signin > p { margin: 0; }
.signin-card #ns-passkey-panel { display: flex; flex-direction: column; gap: var(--s-5); }
/* styles.css gives every `section` the landing padding (--s-9 above and below): the steps of this card take none of it */
.signin-card .auth-step, .signin-card #ns-code-step { display: flex; flex-direction: column; gap: var(--s-3); margin: 0; padding: 0; }
.signin-card .auth-step h2 { margin: 0; font-size: var(--fs-2); line-height: 1.2; }
.signin-card .field { display: flex; flex-direction: column; gap: var(--s-2); }
.signin-card .field label { font-size: var(--fs-0); font-weight: 600; color: var(--ink); }
.signin-card .field input {
  box-sizing: border-box; width: 100%; min-height: 48px; padding: 0 var(--s-3);
  border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--paper); color: var(--ink); font: inherit; font-size: var(--fs-1);
}
.signin-card .field input:focus-visible, .signin-card .actions .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.signin-card .actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.signin-card .actions .btn { flex: 1 1 10rem; font-family: inherit; cursor: pointer; border: 1.5px solid transparent; }
.signin-card .actions .btn-ghost { background: transparent; border-color: var(--line); }
.signin-card .auth-status { margin: 0; padding: var(--s-3) var(--s-4); border-radius: var(--radius-s); background: var(--panel); color: var(--ink); font-size: var(--fs-0); }
/* an empty live region keeps its place in the page for screen readers but takes no room: the panel gap before the next item is taken back */
.signin-card .auth-status:empty { margin: calc(-1 * var(--s-5)) 0 0; padding: 0; background: none; }
.signin-card .auth-lang { margin: var(--s-4) 0 0; text-align: center; font-size: var(--fs-0); }
.signin-card .auth-lang a { color: var(--muted); }

/* NS-ADMIN-UI: the users pages of the operator console (AP-02, AP-03). Markup: src/pages/admin_users.rs; the elements are filled by
   island-admin (Rust compiled to WebAssembly). Only tokens of tokens.css. A hidden state has no box. */
.admin-users [hidden], .admin-user [hidden], .admin-audit [hidden] { display: none !important; }
.admin-search { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: flex-end; margin: 0 0 var(--s-4); }
.admin-search label { flex-basis: 100%; font-size: var(--fs-0); font-weight: 600; color: var(--ink); }
.admin-search input {
  box-sizing: border-box; flex: 1 1 18rem; min-height: 48px; padding: 0 var(--s-3);
  border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--paper); color: var(--ink); font: inherit;
}
.admin-search input:focus-visible, .admin-form textarea:focus-visible, .admin-actions .btn:focus-visible, .admin-form .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.admin-note { margin: var(--s-3) 0 0; color: var(--muted); font-size: var(--fs-0); }
.admin-note:empty { display: none; }
.admin-alert { margin: var(--s-3) 0 0; padding: var(--s-3) var(--s-4); border-radius: var(--radius-s); background: var(--panel); border: 1.5px solid var(--line); color: var(--ink); }
.admin-table { width: 100%; border-collapse: collapse; margin-top: var(--s-3); font-size: var(--fs-0); }
.admin-table th { text-align: left; color: var(--muted); font-weight: 600; padding: var(--s-2) var(--s-3); border-bottom: 1.5px solid var(--line); }
.admin-table td { padding: var(--s-3); border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.admin-table a, .admin-user dd a { color: var(--accent-ink); }
.badge { display: inline-block; padding: 2px var(--s-3); border: 1.5px solid var(--line); border-radius: 999px; font-size: var(--fs-0); font-weight: 600; }
.badge[data-status="blocked"] { border-color: var(--accent); color: var(--accent-ink); }
.admin-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-4); }
.admin-actions .btn, .admin-form .btn { font-family: inherit; cursor: pointer; border: 1.5px solid var(--line); }
.admin-form { display: flex; flex-direction: column; gap: var(--s-3); margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1.5px solid var(--line); }
.admin-form p { margin: 0; }
.admin-form label { font-size: var(--fs-0); font-weight: 600; }
.admin-form textarea {
  box-sizing: border-box; width: 100%; min-height: 6rem; padding: var(--s-3); resize: vertical;
  border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--paper); color: var(--ink); font: inherit;
}
.admin-form .btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.admin-form-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* NS-ADMIN-UI: the audit page (AP-07): the filter row, the status lines and the export form. */
.admin-audit .admin-search input[type="datetime-local"] { flex: 0 1 15rem; }
.admin-audit .admin-search .field { display: flex; flex-direction: column; gap: var(--s-2); flex: 1 1 12rem; }
.admin-audit .admin-search .field label { flex-basis: auto; }
.admin-audit-status { margin: var(--s-4) 0 0; display: flex; flex-direction: column; gap: var(--s-2); font-size: var(--fs-0); color: var(--muted); }
.admin-audit-status p { margin: 0; overflow-wrap: anywhere; }
.admin-audit .admin-table code { font-size: var(--fs-0); overflow-wrap: anywhere; }

/* NS-QE13-FIX V3: the header of the public pages (home, pricing, verify, recover; `public_header` in lib.rs). The links never break into two lines and
   the language switch is a pill like the one of the landing. Under 700 px the home and pricing links go (class `opt`) so the verify link, the sign-in
   link and the language switch stay in one row with the logo; under 480 px the logo and the type get smaller. */
.top nav { display: flex; align-items: center; flex-wrap: nowrap; gap: var(--s-4); margin-left: auto; font-size: var(--fs-0); }
.top nav a { white-space: nowrap; text-decoration: none; color: var(--muted); font-weight: 500; }
.top nav a:hover { color: var(--ink); }
.top nav a.langsw { color: var(--ink); font-weight: 600; border: 1px solid var(--line); border-radius: 999px; padding: var(--s-1) var(--s-3); }
@media (max-width: 700px) { .top nav a.opt { display: none; } }
@media (max-width: 480px) {
  .top .wrap { gap: var(--s-2); }
  .top .logo-l, .top .logo-d { height: 24px; }
  .top nav { gap: var(--s-2); font-size: 0.8rem; }
  .top nav a.langsw { padding: 2px var(--s-2); }
}

/* NS-QE13-FIX V2: the recovery page (`recovery_page_in` in lib.rs) is a sign-in card: its textarea and its checkbox follow the same rules as the
   inputs of the sign-in steps. */
.signin-card .field textarea {
  box-sizing: border-box; width: 100%; padding: var(--s-3); resize: vertical;
  border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--paper); color: var(--ink); font: inherit; font-size: var(--fs-1);
}
.signin-card .field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.signin-card .check { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-0); text-align: left; }
.signin-card#ns-recover { text-align: left; }
.signin-card#ns-recover h1 { text-align: center; }
.signin-card#ns-recover > p { margin: var(--s-4) 0 0; }

/* NS-QE13-FIX V1: the verdict line of /verify (module `ns-verify-page`): a bar at the left edge, the accent for a refusal and the ink for a valid package. */
[data-testid="ns-verify-result"] { margin: var(--s-4) 0 0; padding: var(--s-3) var(--s-4); border-left: 4px solid var(--accent); background: var(--panel); }
[data-testid="ns-verify-result"][data-state="valid"] { border-left-color: var(--ink); }
[data-testid="ns-verify-result"][hidden] { display: none; }
/* QE-13 round 3 (review F7): the upload button is a `.btn` (display: inline-flex), which beats the user-agent `[hidden]` rule; this rule is more specific than one class, so `hidden` hides it. */
[data-testid="ns-verify-send-document"][hidden] { display: none; }
