/* ============================================================
   CUSTOM FIELDS — customer "Setup" panel (display + edit) and
   the superadmin field-config screens.
   ============================================================ */

/* Setup panel on the customer overview. Auto-fills columns so the layout holds
   for any number of configured fields. */
.cust-setup {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px 22px; margin: 0 0 var(--sp-5);
}
.cust-setup .f { display: flex; flex-direction: column; gap: var(--sp-3); }
.cust-setup .k {
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
}
.cust-setup .v { font-size: var(--fs-6); font-weight: 700; color: var(--ink); }
.cust-setup .v--text { font-size: var(--fs-5); font-weight: 500; color: var(--ink-2); line-height: 1.5; }
.cust-setup .none { color: var(--faint); font-size: var(--fs-5); }
.cust-setup .badge {
  align-self: flex-start; font-size: var(--fs-3); font-weight: 700;
  padding: 3px 11px; border-radius: 999px;
}
.cust-setup .badge.yes { color: var(--green); background: var(--green-soft); }
.cust-setup .badge.no { color: var(--muted); background: var(--rail); }
.cust-setup .poschips { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.cust-setup .pchip {
  font-size: var(--fs-3); font-weight: 600; color: var(--ink-2);
  background: var(--rail); border: 1px solid var(--line); padding: 3px 10px; border-radius: 7px;
}

/* Setup fields on the customer edit form. */
.ce-setup { display: flex; flex-direction: column; gap: 18px; }
.ce-setup__field { display: flex; flex-direction: column; gap: 7px; }
.ce-toggle { display: inline-flex; align-items: center; gap: var(--sp-4); font-weight: 500; cursor: pointer; }
.ce-checks { display: flex; flex-wrap: wrap; gap: var(--sp-4) var(--sp-6); }
.ce-check { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; cursor: pointer; }
.ce-hint { font-size: var(--fs-4); color: var(--muted); }

/* Superadmin field list. */
.cfd-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.cfd-row {
  display: flex; align-items: center; gap: var(--sp-6); flex-wrap: wrap;
  padding: 14px var(--sp-6); border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
}
.cfd-row.is-inactive { opacity: .6; }
.cfd-row__main { display: flex; align-items: center; gap: 10px; }
.cfd-row__label { font-size: 15px; font-weight: 700; color: var(--ink); }
.cfd-row__type {
  font-size: var(--fs-2); letter-spacing: .06em; text-transform: uppercase;
  font-weight: 700; color: var(--muted); background: var(--rail);
  padding: var(--sp-1) var(--sp-4); border-radius: 6px;
}
.cfd-row__scope {
  font-size: var(--fs-2); font-weight: 600; color: var(--muted);
  border: 1px solid var(--line); padding: var(--sp-1) var(--sp-4); border-radius: 6px;
}
.cfd-row__badge {
  font-size: var(--fs-2); font-weight: 700; color: var(--muted);
  border: 1px solid var(--line-2); padding: var(--sp-1) var(--sp-4); border-radius: 6px;
}
.cfd-row__options { display: flex; flex-wrap: wrap; gap: var(--sp-3); flex: 1; }
.cfd-row__options .pchip {
  font-size: var(--fs-3); font-weight: 600; color: var(--ink-2);
  background: var(--rail); border: 1px solid var(--line); padding: 3px 10px; border-radius: 7px;
}
.cfd-row__actions { display: flex; gap: var(--sp-4); margin-left: auto; }

/* Select-options editor on the field form. */
.cfd-options { display: flex; flex-direction: column; gap: var(--sp-4); margin-bottom: 10px; }
.cfd-option { display: flex; align-items: center; gap: var(--sp-4); }
.cfd-option .kb-input { flex: 1; }

/* ── Public shared page ─────────────────────────────────────────────
   Read-only view served at /shared/:token. The content sits on a white
   "sheet of paper" (same content width as the in-app page, 760px),
   centered on a gray background with a soft shadow. */
.kb-public-body { background: #e7e9ec; }

.kb-public { min-height: 100vh; padding: 56px var(--sp-7); }

/* TOC column sits to the right, outside the paper; the group is centered. */
.kb-public__layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 48px;
}

/* The paper + claim share one column so the claim centers on the page.
   760px content + 72px side padding each side = 904px paper. */
.kb-public__col { flex: 0 1 904px; min-width: 0; }

.kb-public__main {
  background: var(--paper);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(12, 13, 14, .06), 0 18px 50px -20px rgba(12, 13, 14, .28);
  padding: 64px 72px;
}

.kb-public__main .kb-page,
.kb-public__main .kb-page--public { max-width: none; margin: 0; }

/* In-app blocks are a flex row (drag handle + content); the public page has no
   handle, so let each block's single child fill the full page width. */
.kb-public .kb-block > * { flex: 1 1 auto; min-width: 0; }

/* Drop the TOC so its first line aligns with the page title inside the paper. */
.kb-toc--public { top: 64px; margin-top: 64px; }

/* "Proudly served by November" claim below the page. */
.kb-public__claim {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  margin-top: var(--sp-8);
  font-size: var(--fs-4); color: var(--muted);
}
.kb-public__claim strong { color: var(--ink-2); font-weight: 700; }
.kb-public__claim-icon {
  width: 22px; height: 22px;
  border-radius: 5px;
  display: block;
}

@media (max-width: 760px) {
  .kb-public { padding: var(--sp-7) var(--sp-5); }

  .kb-public__main { padding: 36px var(--sp-7); }
}

/* Print: flatten the "paper" onto a plain white page — no gray backdrop,
   no shadow, no rounded corners. */
@media print {
  .kb-public-body,
  .kb-public { background: var(--white); }

  .kb-public { min-height: 0; padding: 0; }

  .kb-public__main {
    box-shadow: none;
    border-radius: 0;
    padding: 0;
  }
}
/* Users management row — muted email beside the name. */
.usr-row__email { font-family: var(--read); font-size: var(--fs-3); color: var(--muted); }
