/* Unity Admin Console — Hub side (briefs 1588/1589).
   Console-specific styling only; the base (Eyekus Hub palette,
   panels, tables, buttons, fields, status) comes from
   assets/unity-dept.css, which this page loads first. */

/* Toolbar — Google Admin style: search first, then the filter. */
.ua-toolbar{display:flex;gap:1rem;align-items:flex-end;flex-wrap:wrap;margin-bottom:1rem}
.ua-toolbar .ud-field{margin-bottom:0}
.ua-search{flex:1 1 280px}
.ua-toolbar .ud-btn{margin-left:auto}

/* Test-login credential cards — Stripe key-row pattern: the value
   sits beside its own copy control; PINs masked until revealed. */
.ua-cred{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface-soft);padding:1rem 1.1rem;margin-bottom:.8rem}
.ua-cred-head{display:flex;justify-content:space-between;align-items:center;gap:.8rem;flex-wrap:wrap;margin-bottom:.6rem}
.ua-cred-head strong{font-size:1.05rem}
.ua-cred-meta{color:var(--dim)}
.ua-cred-row{display:flex;align-items:center;gap:.7rem;flex-wrap:wrap;margin-bottom:.55rem}
.ua-cred-label{color:var(--dim);font-size:.85rem;text-transform:uppercase;letter-spacing:.09em;min-width:3.2rem}
.ua-cred-row code{font-size:1.05rem;letter-spacing:.06em;background:var(--bg);border:1px solid var(--border);border-radius:8px;padding:.35rem .6rem}
.ua-cred-actions{display:flex;gap:.55rem;flex-wrap:wrap;margin-top:.7rem}
.ua-danger{border-color:#B9B9B9;color:#D5D5D5}

/* Per-account detail panel (opened from the directory). */
.ua-detail{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface-soft);padding:1rem 1.1rem;margin-top:1rem}
.ua-detail h3{font-size:1.05rem;margin-bottom:.7rem}

/* Console gaps build (2026-10-30): the staff form's membership
   fieldset and checkbox rows, the members filters, and the audit
   filter/export row — all in the console's existing treatments. */
.ua-check{display:flex;gap:.55rem;align-items:center;min-height:44px;cursor:pointer}
.ua-check input{width:1.15rem;height:1.15rem;flex:none}
.ua-memberships{border:1px solid var(--border);border-radius:var(--radius);padding:.8rem 1rem 1rem;margin:0 0 1rem}
.ua-memberships legend{font-weight:600;padding:0 .4rem}
.ua-filters,.ua-audit-tools{display:flex;gap:1rem;align-items:flex-end;flex-wrap:wrap;margin-bottom:1rem}
.ua-filters .ud-field,.ua-audit-tools .ud-field{margin-bottom:0;flex:1 1 180px}
.ua-audit-tools .ud-btn{flex:none}
.ua-member-line{margin:.15rem 0;color:var(--dim)}

@media (max-width:640px){
  .ua-toolbar .ud-btn{margin-left:0}
  .ua-cred-row .ud-btn{flex:1 1 auto}
}

/* Inline form errors (brief 1748): a refusal renders inside the form
   it belongs to, in the house error treatment — never only as a line
   at the top of the page, away from the form being filled in. */
.ud-form-error{color:var(--loss);font-weight:600;margin:0 0 .8rem}
.ud-form-error[hidden]{display:none}
.ud-form-error:focus{outline:2px solid var(--loss);outline-offset:3px}

/* Unity theme mirror (owner order 2026-10-29): this console mirrors
   the Unity App's own admin dashboard, so it carries the Unity
   tokens (the app theme.css: --bg #F4F4F4, --surface #FFFFFF,
   --text #111111, --dim #5F5F5F, --border #D5D5D5, black #000 /
   #363636 headers and buttons, radius 14px, system-ui) instead of
   the Eyekus palette. Scoped to THIS page only via
   body.unity-dept[data-unity-page="admin"]: the shared
   assets/unity-dept.css keeps the Eyekus palette untouched for the
   Sales / Finance CRM pages (brief 1583 colour law). */
body.unity-dept[data-unity-page="admin"]{
  color-scheme:light;
  --bg:#F4F4F4; --surface:#FFFFFF; --surface-raised:#FFFFFF; --surface-soft:#F4F4F4;
  --text:#111111; --dim:#5F5F5F; --border:#D5D5D5;
  --accent:#000000; --accent-ink:#FFFFFF;
  --profit:#111111; --loss:#585858; --amber:#5F5F5F;
  --radius:14px; --shadow:0 10px 26px rgba(0,0,0,.10); --shadow-control:0 4px 12px rgba(0,0,0,.10);
  background:var(--bg); color:var(--text);
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
}
body.unity-dept[data-unity-page="admin"] h1,
body.unity-dept[data-unity-page="admin"] h2,
body.unity-dept[data-unity-page="admin"] h3,
body.unity-dept[data-unity-page="admin"] .ud-kpi .ud-kpi-value{font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
body.unity-dept[data-unity-page="admin"] .ud-panel{box-shadow:var(--shadow)}
body.unity-dept[data-unity-page="admin"] .ud-table tbody tr{border-bottom:1px solid var(--border)}
body.unity-dept[data-unity-page="admin"] .ud-btn{background:#FFFFFF;color:#111111}
body.unity-dept[data-unity-page="admin"] .ud-btn:hover{background:#F4F4F4}
body.unity-dept[data-unity-page="admin"] .ud-btn-gold{background:#000000;color:#FFFFFF;border-color:#000000}
body.unity-dept[data-unity-page="admin"] .ud-btn-gold:hover{background:#363636}
body.unity-dept[data-unity-page="admin"] .ud-chip-ok{background:#111111;color:#FFFFFF}
body.unity-dept[data-unity-page="admin"] .ud-chip-bad{background:#FFFFFF;color:#585858;border-color:#585858}
body.unity-dept[data-unity-page="admin"] .ua-danger{border-color:#585858;color:#585858}
body.unity-dept[data-unity-page="admin"] .ud-form-error{color:#585858}
.ua-logo{width:56px;height:56px;border-radius:12px;display:block;flex:none}

/* Quick test-login buttons on the admin LOGIN page (owner order
   2026-10-29): each button carries its department, login name and
   PIN (rendered at runtime from the Hub-gated action — never in
   this file or the page source) and opens that dashboard in one tap. */
.ua-quick{margin-top:1.2rem;border-top:1px solid var(--border);padding-top:1rem}
.ua-quick-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.7rem;margin-top:.7rem}
.ua-quick-btn{font:inherit;text-align:left;cursor:pointer;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);color:var(--text);padding:.8rem .9rem;display:flex;flex-direction:column;gap:.3rem;min-height:44px}
.ua-quick-btn:hover:not(:disabled){background:var(--surface-soft)}
.ua-quick-btn:disabled{opacity:.55;cursor:not-allowed}
.ua-quick-dept{font-weight:700}
.ua-quick-line{color:var(--dim);display:flex;gap:.45rem;align-items:center;flex-wrap:wrap}
.ua-quick-line code{color:var(--text);background:var(--surface-soft);border:1px solid var(--border);border-radius:6px;padding:.1rem .45rem;letter-spacing:.05em}
.ua-quick-go{font-weight:600}

/* Compliance build (brief 1913): sessions, deleted accounts, recovery */
.ua-recovery-entry { margin-top: 1rem; }
.ua-recovery-block { margin-top: 1.5rem; border-top: 1px solid var(--ud-line, #ddd); padding-top: 1rem; }
.ua-recovery-code { font-size: 1.35rem; letter-spacing: 0.08em; text-align: center; border: 1px dashed var(--ud-line, #bbb); border-radius: 8px; padding: 0.9rem 0.5rem; background: rgba(127, 127, 127, 0.06); }
.ua-session-note { margin-top: 0.75rem; }
