/* Clinic settings (§12), onboarding (§13), analytics (§7). Tokens and components: /ui/ds.css. */
.admin { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.admin-layout { flex: 1; display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 0; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; padding: 14px 12px; background: var(--list-wash);
  border-right: 1px solid var(--border); }
.admin-nav button { justify-content: flex-start; text-align: left; border: 0; background: none; padding: 9px 11px;
  border-radius: 10px; color: var(--ink-soft); font-weight: 600; }
.admin-nav button:hover { background: var(--surface-2); color: var(--ink); }
.admin-nav button .ic { color: var(--muted); }
.admin-nav button.on { background: var(--surface); color: var(--accent-ink); font-weight: 700; box-shadow: var(--shadow); }
.admin-nav button.on .ic { color: var(--accent); }
.admin-panel { padding: 22px 26px 48px; overflow-y: auto; min-width: 0; max-width: 1240px; }
.admin-panel h2 { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
.admin-panel h3 { margin: 24px 0 10px; font-size: 15px; font-weight: 700; display: flex; align-items: center;
  gap: 10px; flex-wrap: wrap; }
.admin-panel .box h3:first-child { margin-top: 0; }
.admin-panel .hint { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.admin-panel .hint.accent { color: var(--high); background: var(--high-soft); border-radius: 8px; padding: 8px 11px;
  display: flex; align-items: flex-start; gap: 7px; }
.admin-panel .hint.accent .ic { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.faq-q { display: block; font-size: 12px; font-weight: 700; color: var(--ink-soft); margin-bottom: 4px; white-space: normal; }
.faq-fields { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.faq-field { display: grid; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); }
.faq-field input { width: 120px; }
.faq-preview { margin: 0; font-size: 12.5px; color: var(--ink-soft); white-space: normal; max-width: 320px; }
.faq-toggle { display: inline-flex; gap: 5px; margin-right: 8px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
table.t tr.faq-off td { opacity: .5; }
.box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 14px 16px;
  margin-bottom: 14px; box-shadow: var(--shadow); }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.grid-form label, .stack label { display: grid; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.stack { display: grid; gap: 12px; }
.stack textarea { width: 100%; min-height: 76px; }
.stack label.check { display: flex; gap: 8px; align-items: center; color: var(--ink); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-panel > .row { margin-bottom: 14px; }
.table-wrap { overflow-x: auto; }
.table-wrap.box { padding: 4px 0; }
table.t { border-collapse: collapse; width: 100%; font-size: 13px; }
table.t th, table.t td { border-bottom: 1px solid var(--border); padding: 9px 12px; text-align: left; white-space: nowrap; }
table.t tr:last-child td { border-bottom: 0; }
table.t th { color: var(--ink-soft); font-weight: 700; font-size: 12.5px; }
table.t tr:hover td { background: var(--surface-2); }
table.t tr.needs-review td { background: var(--high-soft); }
table.t tr.needs-review:hover td { background: var(--high-soft); filter: brightness(0.97); }
.chip.warn { background: var(--high-soft); color: var(--high); margin-left: 8px; }
table.t td.c, table.t th.c { text-align: center; }
table.t td.n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
table.t input[type=number] { width: 76px; }
table.t .manual { font-size: 10px; font-weight: 700; color: var(--accent-ink); background: var(--accent-soft);
  border-radius: 999px; padding: 1px 7px; margin-left: 4px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow); }
.steps .mark { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--surface-3); color: var(--muted); font-size: 12px; font-weight: 800; margin-top: 2px; }
.steps .step-body { display: grid; gap: 3px; }
.steps .step-title { font-weight: 600; }
.steps .step-hint { font-weight: 400; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.steps .mark.done { background: var(--ok-soft); color: var(--ok); }
.steps .mark .ic { width: 14px; height: 14px; }
.status-connected { color: var(--ok); font-weight: 700; } .status-degraded { color: var(--urgent); font-weight: 700; }
.status-pending, .status-off { color: var(--muted); font-weight: 700; }
code.qr { display: block; padding: 12px; background: var(--surface-2); border-radius: 9px; word-break: break-all; }
.qr-img { display: block; width: 220px; height: 220px; padding: 10px; background: var(--on-bar); border-radius: 9px; }
.snippet-code { margin-top: 6px; white-space: normal; }
.snippet-code code { display: block; white-space: pre-wrap; word-break: break-all; }
/* analytics (§7): one-hue funnel bars, stat tiles, tables for slices */
.kpis { margin-bottom: 14px; }
.fbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fbars li { display: grid; grid-template-columns: 120px minmax(0, 1fr) 96px; gap: 12px; align-items: center; font-size: 13px;
  font-weight: 600; color: var(--ink-soft); }
.fbars .num { color: var(--ink); font-weight: 800; }
.fbars .pct { color: var(--muted); font-size: 12px; }
@media (max-width: 860px) {
  .admin-layout { grid-template-columns: minmax(0, 1fr); }
  .admin-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 8px; }
  .admin-nav button { white-space: nowrap; flex: none; border-left: 0; }
  .admin-panel { padding: 16px 14px 40px; }
  .fbars li { grid-template-columns: 92px minmax(0, 1fr) 72px; gap: 8px; }
  .tnav .lbl, .brand .clinic { display: none; }
}
.robot-box { display: grid; gap: 6px; margin-bottom: 14px; } .robot-box .hint { margin: 0; }
