/* Legacy layer: sits between Tailwind's preflight (base) and its utilities, so
   utilities in markup win over these rules. Order is declared in application.css. */
@layer legacy {
/* ─────────────────────────────────────────────────────────────
   Scoby - Component styles
   Based on docs/design_system/ui_kits/ + preview/
   ───────────────────────────────────────────────────────────── */

* { box-sizing: border-box; margin: 0; }

/* ═════════════════════════════════════════════════════════════
   APP LAYOUT (light header, authenticated pages)
   ═════════════════════════════════════════════════════════════ */

/* ── Logo (shared across layouts) ─────────────────────────── */

.scoby-logo {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
}
.scoby-logo:hover { color: inherit; }

.scoby-logo-mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  align-self: center;
  filter: drop-shadow(0 0 8px rgba(23, 196, 163, 0.35));
}
.scoby-logo-name {
  font-family: var(--font-display);
  font-weight: var(--w-bold);
  font-size: 24px;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1;
}
.scoby-logo-product {
  font-family: var(--font-display);
  font-weight: var(--w-semibold);
  font-size: 12px;
  color: var(--living-teal);
  letter-spacing: -0.015em;
  line-height: 1;
  margin-left: -3px;
}

/* ── Project switcher ────────────────────────────────────── */

/* ── Buttons (from preview/components-buttons.html) ───────── */

button,
a.btn,
.btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  padding: 10px 18px;
  cursor: pointer;
  transition: all 120ms cubic-bezier(0.2, 0.7, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
}

a.btn-primary,
.btn-primary {
  background: var(--living-teal);
  color: var(--ui-accent-fg);
  border-color: var(--living-teal);
}
a.btn-primary:hover,
.btn-primary:hover {
  background: var(--ui-accent-hover);
  border-color: var(--ui-accent-hover);
  color: var(--ui-accent-fg);
}

a.btn-navy,
.btn-navy {
  background: var(--deep-core-navy);
  color: #fff;
  border-color: var(--deep-core-navy);
}
a.btn-navy:hover,
.btn-navy:hover { color: #fff; }

/* ═════════════════════════════════════════════════════════════
   FORM INPUTS (from preview/components-inputs.html)
   Bare-element styling — no classes needed on inputs
   ═════════════════════════════════════════════════════════════ */

label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: 14px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-primary);
  box-sizing: border-box;
  transition: all 120ms;
}

input:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: var(--living-teal);
  box-shadow: 0 0 0 3px rgba(23, 196, 163, 0.18);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-tertiary);
}

/* Checkbox & radio — override the global input rule completely */
input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  accent-color: var(--living-teal);
  cursor: pointer;
  flex-shrink: 0;
}
input[type="radio"] { border-radius: 999px; }

/* Submit — behaves as a button, not a text field */
input[type="submit"] {
  width: auto;
  border: 1px solid var(--living-teal);
  background: var(--living-teal);
  color: var(--ui-accent-fg);
  font-weight: 500;
  cursor: pointer;
  transition: all 120ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
input[type="submit"]:hover {
  background: var(--ui-accent-hover);
  border-color: var(--ui-accent-hover);
}
input[type="submit"]:focus {
  box-shadow: 0 0 0 3px rgba(23, 196, 163, 0.18);
}

/* Hidden fields should not show */
input[type="hidden"] {
  display: none;
}

/* ── Input with prefix (e.g. currency) ────────────────────── */

.with-prefix {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 4px 0 12px;
}
.with-prefix span {
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 13px;
}
.with-prefix input {
  border: 0;
  background: transparent;
  padding-left: 6px;
  box-shadow: none !important;
}

/* ── Toggle switch ────────────────────────────────────────── */

.toggle {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: var(--living-teal);
  position: relative;
  cursor: pointer;
  border: 0;
  padding: 0;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 18px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
}
.toggle.off { background: var(--border); }
.toggle.off::after { left: 2px; }

/* ── Custom checkbox icon (CSS-only, for non-native) ──────── */

.check-input {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--living-teal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── Custom radio (CSS-only, for non-native) ──────────────── */

.radio {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1.5px solid var(--text-tertiary);
  position: relative;
}
.radio.on { border-color: var(--living-teal); }
.radio.on::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  background: var(--living-teal);
}

/* ── Check row (checkbox/radio + label inline) ────────────── */

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.check label {
  display: inline;
  margin-bottom: 0;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
}

/* ═════════════════════════════════════════════════════════════
   BADGES (from preview/components-badges.html)
   ═════════════════════════════════════════════════════════════ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}
.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
}
.badge-succeeded,
.badge-success { background: var(--success-soft); color: var(--success-dark); }
.badge-processing { background: var(--processing-soft); color: var(--processing); }
.badge-failed,
.badge-danger { background: var(--danger-soft); color: #8B2A30; }
.badge-warning { background: var(--warning-soft); color: #8B5E1F; }
.badge-neutral { background: var(--border); color: var(--text-secondary); }
.badge-teal {
  background: rgba(23, 196, 163, 0.10);
  color: var(--success-dark);
  border: 1px solid rgba(23, 196, 163, 0.30);
}

/* ═════════════════════════════════════════════════════════════
   TABLES (from preview/components-table.html)
   ═════════════════════════════════════════════════════════════ */

.tbl-wrap {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
thead th {
  text-align: left;
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-mist);
}
tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
tbody tr:last-child td { border-bottom: 0; }
/* Light pages only: the dark product has its own row hover (.tbl-row). */
body:not(.product-body) tbody tr:hover { background: var(--surface-mist); cursor: pointer; }

.num {
  font-family: var(--font-mono);
  font-feature-settings: 'tnum';
  text-align: right;
  color: var(--text-primary);
}
.proc {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

.tbl-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out);
}
.tbl-action:hover {
  color: var(--living-teal);
  background: var(--surface-mist);
}
.tbl-action-danger:hover {
  color: var(--danger);
  background: var(--danger-soft);
}
.tbl-action-success:hover {
  color: var(--success-dark);
  background: var(--success-soft);
}

/* ═════════════════════════════════════════════════════════════
   CARDS (from preview/components-cards.html)
   ═════════════════════════════════════════════════════════════ */

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}
.card-value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 8px;
  font-feature-settings: 'tnum';
  color: var(--text-primary);
}
.card-delta {
  font-size: 12.5px;
  font-weight: 500;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.card-delta.up { color: var(--success-dark); }
.card-delta.down { color: var(--danger); }

/* ═════════════════════════════════════════════════════════════
   APP PAGES (projects, authenticated views)
   ═════════════════════════════════════════════════════════════ */

/* ── Form page (new project, etc.) ────────────────────────── */

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
}

/* ── Empty state ──────────────────────────────────────────── */

/* ── Detail page (project show) ───────────────────────────── */

/* ── Alert banner ─────────────────────────────────────────── */

/* ── Code block ───────────────────────────────────────────── */

.code-block {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--deep-core-navy);
  color: var(--mint-layer);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  margin-top: 14px;
  line-height: 1.6;
}

/* ═════════════════════════════════════════════════════════════
   ONBOARDING WIZARD (Asaas subaccount)
   ═════════════════════════════════════════════════════════════ */

/* ── Wizard progress indicator ────────────────────────────── */

/* ── Radio cards (account type selector) ──────────────────── */

/* ── Review step ──────────────────────────────────────────── */

/* ── Status card (post-submission) ────────────────────────── */

/* ── Banner (project show CTA) ────────────────────────────── */

/* -- KYC progress stepper (onboarding status page) -- */

/* connecting line between dots */

/* ── Document verification page ───────────────────────────── */

/* Hosted handoff — the hero (QR on desktop, tap-through on mobile) */

/* API uploads — a tidy checklist */

/* ═════════════════════════════════════════════════════════════
   PRODUCT UI — dark chrome (ported from ui_kits/product/styles.css)
   Everything is scoped under .product-body so it never collides with
   the light marketing/auth/app classes above.
   ═════════════════════════════════════════════════════════════ */

.product-body {
  margin: 0;
  background: var(--dark-2);
  color: var(--on-dark-1);
  font-family: var(--font-sans);
}
.product-body * { box-sizing: border-box; }
.product-body button { font-family: inherit; cursor: pointer; }
.product-body a { color: var(--living-teal); }

/* ── Shell ──────────────────────────────────────────────── */
.product-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  background: var(--dark-2);
}
.product-main { display: flex; flex-direction: column; min-width: 0; }
.product-body .page { padding: 28px 36px 72px; flex: 1; }

/* ── Sidebar ────────────────────────────────────────────── */
/* A shade below the content, so the page sits on top of it. */
.product-body .sidebar {
  background: var(--ui-bg-deep);
  border-right: 1px solid var(--dark-4);
  padding: 16px 14px 0;
  display: flex; flex-direction: column; gap: 2px;
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  /* Taller than a short window: scroll inside instead of stretching the page,
     with no scrollbar taking ~10px from the items on short windows only. */
  overflow-y: auto; scrollbar-width: none;
  /* Keeps a focused nav item clear of the pinned account block. */
  scroll-padding-bottom: 96px;
}
.product-body .sidebar-section { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-dark-3); font-weight: 500; padding: 14px 10px 4px; }
/* line-height keeps each item at 38px (the kit's), not the body's 24px leading.
   As wide as the switcher, the icon on the section labels' 24px column. */
.product-body .nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px 9px 8px; border-radius: 8px;
  color: var(--on-dark-2); text-decoration: none;
  font-size: 13.5px; font-weight: 500; line-height: 20px;
  border: 0; background: transparent; width: 100%; text-align: left;
  border-left: 2px solid transparent;
  transition: background var(--t-fast) var(--ease-out), color var(--t-fast);
}
.product-body .nav-item:hover { background: var(--dark-3); color: #fff; }
/* Active: the surface lifts, the text goes white; only the bar and the icon are teal. */
.product-body .nav-item.active { background: var(--ui-surface); color: var(--ui-fg-strong); border-left-color: var(--ui-accent); }
.product-body .nav-item.active .ico { color: var(--ui-accent); }
.product-body .nav-spacer { flex: 1; }
/* Pinned to the bottom while the nav scrolls, so sign-out stays in reach. */
.product-body .nav-account {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 24px 32px; margin: 12px -14px 0;
  border-top: 1px solid var(--dark-4); background: var(--ui-bg-deep);
  position: sticky; bottom: 0;
}
.product-body .avatar { width: 30px; height: 30px; border-radius: 999px; background: var(--grad-growth); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; flex-shrink: 0; }
/* A long email or project name truncates instead of scrolling the sidebar sideways. */
.product-body .nav-account .who { font-size: 12.5px; font-weight: 500; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-body .nav-account .org { font-size: 10.5px; color: var(--on-dark-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Topbar ─────────────────────────────────────────────── */
.product-body .topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 36px; border-bottom: 1px solid var(--dark-4); gap: 16px;
  background: rgba(8, 26, 34, 0.85); backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 5;
}
.product-body .topbar-lead { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.product-body .topbar .topbar-menu { display: none; flex-shrink: 0; }
.product-body .crumbs { display: flex; gap: 8px; align-items: center; min-width: 0; font-size: 13px; color: var(--on-dark-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-body .crumbs > span:first-child,
.product-body .crumbs strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.product-body .crumbs strong { color: #fff; font-weight: 600; }
.product-body .crumbs .sep { color: var(--on-dark-3); flex-shrink: 0; }
.product-body .topbar .actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ── Buttons (dark) ─────────────────────────────────────── */
.product-body .btn { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; padding: 9px 16px; border-radius: 10px; border: 1px solid transparent; transition: all var(--t-fast) var(--ease-out); line-height: 1; white-space: nowrap; font-family: inherit; text-decoration: none; }
.product-body .btn.primary { background: var(--living-teal); color: var(--ui-accent-fg); border-color: var(--living-teal); }
.product-body .btn.primary:hover { background: var(--ui-accent-hover); border-color: var(--ui-accent-hover); }
.product-body .btn.secondary { background: var(--dark-3); color: var(--on-dark-1); border-color: var(--dark-4); }
.product-body .btn.secondary:hover { background: var(--dark-4); border-color: var(--dark-5); }
.product-body .btn.sm { font-size: 12.5px; padding: 6px 12px; }
.product-body .icon-btn { display: inline-flex; align-items: center; justify-content: center; padding: 7px; border-radius: 8px; background: transparent; color: var(--on-dark-2); border: 0; transition: all var(--t-fast); }
.product-body .icon-btn:hover { background: var(--dark-3); color: #fff; }

/* ── Cards ──────────────────────────────────────────────── */
.product-body .card { background: var(--dark-3); border: 1px solid var(--dark-4); border-radius: 14px; padding: 24px; }
.product-body .card-title { font-size: 14px; font-weight: 600; color: #fff; letter-spacing: -0.005em; display: flex; align-items: center; gap: 8px; }
.product-body .card-eyebrow { font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-dark-3); }
/* A drawer card's eyebrow sits 12px above its content, whatever comes first. */
.product-body .drawer-body .card > .card-eyebrow { display: block; margin-bottom: 12px; }
.product-body .drawer-body .card > .card-eyebrow + .kv-row { margin-top: 0; }
.product-body .drawer-body .card > .card-eyebrow + .link-list > li:first-child { padding-top: 0; }

/* ── Tables (dark) ──────────────────────────────────────── */
/* Scrolls sideways when the columns outgrow the card, rather than cutting a cell. */
.product-body .tbl-wrap { background: var(--dark-3); border: 1px solid var(--dark-4); border-radius: 14px; overflow: hidden; overflow-x: auto; }
.product-body .tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.product-body .tbl thead th { text-align: left; font-weight: 500; color: var(--on-dark-3); font-size: 11px; letter-spacing: 0.10em; text-transform: uppercase; padding: 12px 18px; border-bottom: 1px solid var(--dark-4); background: var(--dark-3); white-space: nowrap; }
/* Mono on the values only: a numeric column's header keeps the row's sans (the global .num sets mono). */
.product-body .tbl thead th.num { text-align: right; font-family: inherit; }
/* A 20px line, not the body's 24px: a two-line cell (name + email) keeps rows near the others' height. */
.product-body .tbl tbody td { padding: 14px 18px; border-bottom: 1px solid var(--dark-4); vertical-align: middle; color: var(--on-dark-1); line-height: var(--lh-body-sm); }
.product-body .tbl tbody tr:last-child td { border-bottom: 0; }
.product-body .tbl-row { position: relative; transition: background 80ms; }
.product-body .tbl-row:hover,
.product-body .tbl-row-static:hover { background: color-mix(in srgb, var(--ui-surface-raised) 45%, transparent); }
.product-body .tbl .num { font-family: var(--font-mono); font-feature-settings: 'tnum'; text-align: right; white-space: nowrap; }
.product-body .tbl .id { font-family: var(--font-mono); font-size: 12px; color: var(--on-dark-2); white-space: nowrap; }
/* Dates read as text: sans with even figures, muted. Mono is for ids and amounts only. */
.product-body .tbl .date { font-variant-numeric: tabular-nums; color: var(--ui-fg-muted); white-space: nowrap; }
.product-body .tbl .date .row-link { color: inherit; }
.product-body .processor { font-family: var(--font-mono); font-size: 11.5px; color: var(--on-dark-3); }
.product-body .row-link { color: var(--on-dark-2); text-decoration: none; }
.product-body .row-link::after { content: ""; position: absolute; inset: 0; }
.product-body .tbl-bordered-top { border-top: 1px solid var(--dark-4); }
.product-body .tbl tbody .tbl-empty td { color: var(--on-dark-2); }
.product-body .tbl-row-static { cursor: default; }

/* ── Badges (dark) ──────────────────────────────────────── */
.product-body .badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.product-body .badge .dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.product-body .badge.success { background: rgba(23, 196, 163, 0.14); color: var(--mint-layer); }
.product-body .badge.processing { background: rgba(93, 138, 184, 0.18); color: #94B2D4; }
.product-body .badge.warning { background: rgba(219, 162, 76, 0.18); color: #F0BE73; }
.product-body .badge.failed, .product-body .badge.danger { background: rgba(224, 77, 85, 0.18); color: #F47B82; }
.product-body .badge.neutral { background: var(--dark-4); color: var(--on-dark-2); }

/* ── Drawer ─────────────────────────────────────────────── */
.product-body .drawer-overlay { position: fixed; inset: 0; background: rgba(5, 15, 20, 0.65); backdrop-filter: blur(8px); z-index: 50; display: flex; justify-content: flex-end; animation: drawer-scrim-in var(--t-base) var(--ease-out); }
.product-body .drawer { width: 720px; max-width: 95vw; background: var(--dark-2); border-left: 1px solid var(--dark-4); height: 100vh; overflow-y: auto; animation: drawer-in 360ms var(--ease-out); box-shadow: -40px 0 60px -20px rgba(0,0,0,0.6); }
/* In: the scrim fades while the panel slides its full width. Out (drawer#close
   sets data-closing): the same way back, quicker, then the frame empties. */
@keyframes drawer-in { from { transform: translateX(100%); } }
@keyframes drawer-scrim-in { from { opacity: 0; } }
@keyframes drawer-out { to { transform: translateX(100%); } }
@keyframes drawer-scrim-out { to { opacity: 0; } }
.product-body .drawer-overlay[data-closing] { animation: drawer-scrim-out 240ms var(--ease-out) forwards; pointer-events: none; }
.product-body .drawer-overlay[data-closing] .drawer { animation: drawer-out 240ms var(--ease-out) forwards; }
@media (prefers-reduced-motion: reduce) {
  .product-body .drawer-overlay, .product-body .drawer { animation: none; }
}
.product-body .drawer-header { padding: 22px 32px; border-bottom: 1px solid var(--dark-4); display: flex; align-items: center; justify-content: space-between; gap: 16px; position: sticky; top: 0; background: var(--dark-2); z-index: 1; }
.product-body .drawer-id-row { display: flex; align-items: center; gap: 10px; }
.product-body .drawer-id { font-family: var(--font-mono); font-size: 13px; color: var(--on-dark-2); }
.product-body .drawer-title { font-family: var(--font-display); font-size: 22px; font-weight: 600; margin-top: 6px; letter-spacing: -0.01em; color: #fff; }
.product-body .drawer-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
/* Close is a 28px box, as tall as the .btn.sm beside it. */
.product-body .drawer-actions .icon-btn { padding: 6px; }
/* Close sits in the top-right corner at every width, even when the actions wrap under the title;
   the title and the actions keep clear of it. A header whose only action is close leaves no empty box. */
.product-body .drawer-header [data-action~="drawer#close"] { position: absolute; top: 18px; right: 20px; }
.product-body .drawer-header > :first-child { padding-right: 40px; }
.product-body .drawer-actions { margin-right: 40px; }
.product-body .drawer-actions:has(> :only-child[data-action~="drawer#close"]) { display: contents; }
.product-body .drawer-body { padding: 28px 32px 48px; }
.product-body .drawer-muted { font-size: 12px; color: var(--on-dark-2); }
.product-body .kv-row { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--on-dark-1); margin-top: 4px; }
.product-body .kv-row > :last-child { min-width: 0; overflow-wrap: anywhere; text-align: right; }
.product-body .kv-label { color: var(--on-dark-3); }
.product-body .drawer-dates .kv-row { gap: 12px; }
.product-body .drawer-dates .kv-label { flex: 0 0 72px; }
.product-body .drawer-dates .kv-row > span:last-child { min-width: 0; text-align: right; }
/* Invoice drawer: actions (button_to forms), sticky outcome notice, support id. */
.product-body .drawer-actions form { margin: 0; }
.product-body .drawer-header { flex-wrap: wrap; }
.product-body .drawer-notice { flex-basis: 100%; }
.product-body .drawer-notice .notice { margin-bottom: 0; }
/* Dev/staging-only sandbox shortcut: dashed amber so it never reads as a product action. */
.product-body .drawer-sandbox {
  flex-basis: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap;
  padding: var(--s-2) var(--s-3); border: 1px dashed var(--warning); border-radius: var(--radius-sm);
}
.product-body .drawer-sandbox-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--warning); }

/* ── Layout helpers ─────────────────────────────────────── */
.product-body .stack > * + * { margin-top: 14px; }
.product-body .divider { height: 1px; background: var(--dark-4); margin: 18px 0; }

/* ── Empty / placeholder surface ────────────────────────── */
.product-body .empty-card { text-align: center; padding: 64px; color: var(--on-dark-3); }
.product-body .empty-body { margin-top: 8px; font-size: 13.5px; }

/* ── Mobile sidebar scrim (hidden on desktop) ───────────── */
.product-body .sidebar-scrim { display: none; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .product-shell { grid-template-columns: 1fr; }
  .product-body .sidebar {
    position: fixed; top: 0; left: 0; z-index: 60; width: 260px; height: 100vh; height: 100dvh;
    overscroll-behavior: contain; /* the page behind the drawer stays put */
    /* Hidden while closed, so Tab doesn't walk through an off-screen menu. */
    visibility: hidden;
    transform: translateX(-100%); transition: transform var(--t-base) var(--ease-out), visibility 0s var(--t-base);
  }
  .product-shell.sidebar-open .sidebar { visibility: visible; transition-delay: 0s; transform: translateX(0); box-shadow: 30px 0 60px -20px rgba(0,0,0,0.6); }
  .product-shell.sidebar-open .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(5, 15, 20, 0.55); }
  .product-body .topbar .topbar-menu { display: inline-flex; }
  .product-body .topbar { padding: 14px 18px; }
  .product-body .page { padding: 22px 18px 64px; }
}

@media (max-width: 720px) {
  .product-body .drawer { width: 100vw; max-width: 100vw; border-left: 0; }
  .product-body .drawer-header { flex-direction: column; align-items: flex-start; padding: 16px 18px; }
  .product-body .drawer-header > :first-child { padding-right: 48px; }
  .product-body .drawer-body { padding: 18px 18px 40px; }
  .product-body .drawer-header [data-action~="drawer#close"] { top: 12px; right: 12px; }

  /* The project is in the sidebar switcher: keep the page title readable. */
  .product-body .crumbs > span:first-child,
  .product-body .crumbs .sep { display: none; }

  /* Touch targets of at least 40px. */
  .product-body .btn { min-height: 40px; }
  .product-body .icon-btn { min-width: 40px; min-height: 40px; }
  .product-body .drawer-actions { flex-wrap: wrap; margin-right: 0; }

  /* Tables → stacked cards. `.tbl tbody` beats the desktop cell padding and border. */
  .product-body .tbl thead { display: none; }
  .product-body .tbl, .product-body .tbl tbody, .product-body .tbl tr, .product-body .tbl td { display: block; width: 100%; }
  .product-body :is(.tbl-row, .tbl-row-static) { padding: 12px 16px; border-bottom: 1px solid var(--dark-4); }
  .product-body .tbl tbody :is(.tbl-row, .tbl-row-static) td {
    border: 0; padding: 4px 0;
    display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 2px 12px; text-align: right;
  }
  /* A secondary line (email, id) always goes under the main value. */
  .product-body :is(.tbl-row, .tbl-row-static) td > .cell-sub:not(:only-child) { flex-basis: 100%; }
  /* The label takes the left; everything else in the cell packs on the right. */
  .product-body :is(.tbl-row, .tbl-row-static) td::before {
    content: attr(data-label); margin-right: auto;
    font-family: var(--font-sans); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-dark-3);
  }
}

/* ═════════════════════════════════════════════════════════════
   PRODUCT UI — Dashboard + Subscriptions (scoped under .product-body)
   ═════════════════════════════════════════════════════════════ */

/* ── KPIs ───────────────────────────────────────────────── */
.product-body .kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.product-body .kpi-grid-3 { grid-template-columns: repeat(3, 1fr); }
/* 24px inside (16px on phones), the inset of ui_card_class(compact: true).
   Label, value and note sit on rows shared across the grid's row (subgrid):
   a label that wraps takes its neighbours' values down with its own. */
.product-body .kpi { display: grid; grid-row: span 3; grid-template-rows: subgrid; align-content: start; gap: 10px; padding: 24px; background: var(--dark-3); border: 1px solid var(--dark-4); border-radius: 14px; min-height: 122px; }
/* A 16px line for 11px caps; baseline keeps the live dot on the first line when it wraps. */
/* Centred in its row: a neighbour's icon tile makes the shared label row taller. */
.product-body .kpi .label { font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: 0.10em; text-transform: uppercase; color: var(--on-dark-3); display: flex; align-items: baseline; align-self: center; gap: 8px; }
.product-body .kpi .value { font-family: var(--font-display); font-size: 30px; font-weight: 600; letter-spacing: -0.015em; color: #fff; }
.product-body .kpi .delta { font-size: 12.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.product-body .kpi.featured { background: var(--grad-primary); border-color: transparent; position: relative; overflow: hidden; }
.product-body .kpi.featured::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 100% 100%, rgba(137, 241, 213, 0.30) 0%, transparent 50%); border-radius: 14px; }
.product-body .kpi.featured > * { position: relative; z-index: 1; }
.product-body .kpi.featured .label { color: rgba(255, 255, 255, 0.75); }
.product-body .kpi.featured .delta.neutral { color: rgba(255, 255, 255, 0.75); }
.product-body .kpi.featured .value { color: #fff; }

/* Ghost buttons */
.product-body .btn.ghost { background: transparent; color: var(--on-dark-2); border-color: transparent; }
.product-body .btn.ghost:hover { background: var(--dark-3); color: #fff; }

/* ── Subscriptions plan grid ────────────────────────────── */
.product-body .plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
.product-body .plan-head { display: flex; justify-content: space-between; align-items: flex-start; }
.product-body .plan-icon { width: 40px; height: 40px; border-radius: 999px; background: rgba(23, 196, 163, 0.10); border: 1px solid var(--living-teal); display: flex; align-items: center; justify-content: center; }
.product-body .plan-strong { color: #fff; }

/* ── Responsive (charts/grids) ──────────────────────────── */
@media (max-width: 900px) {
  .product-body .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .product-body .kpi-grid-3 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .product-body .plan-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .product-body .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Two columns: the value scales with its box (the @container in product/_kpi,
     not the card, whose containment would break the subgrid) so a 7-digit amount stays on one line. */
  .product-body .kpi { padding: 16px; min-height: 0; }
  .product-body .kpi .value { font-size: min(24px, 12cqi); white-space: nowrap; }

}

/* ═════════════════════════════════════════════════════════════
   PRODUCT UI — Section tabs (scoped under .product-body)
   ═════════════════════════════════════════════════════════════ */

/* ── Section tabs (catalog sub-nav) ────── */
.product-body .section-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--dark-4); margin-bottom: 24px; }
.product-body .section-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border: 0; border-radius: 0; background: transparent;
  /* Fixed leading: a <button> tab and a link tab are both 42px tall. */
  color: var(--on-dark-2); font-size: 13.5px; font-weight: 500; line-height: 20px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color var(--t-fast) var(--ease-out), border-color var(--t-fast);
}
.product-body .section-tab { text-decoration: none; }
.product-body .section-tab:hover { color: #fff; }
.product-body .section-tab.active { color: var(--living-teal); border-bottom-color: var(--living-teal); }
@media (max-width: 720px) {
  /* Tabs scroll sideways instead of wrapping into rows. */
  /* overflow clips the tab's -1px overlap: draw the line inside instead. */
  .product-body .section-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; border-bottom: 0; box-shadow: inset 0 -1px var(--dark-4); }
  .product-body .section-tab { flex-shrink: 0; white-space: nowrap; margin-bottom: 0; }
  .product-body .section-tab:focus-visible { outline-offset: -2px; } /* the scroll would clip an outer ring */
}

/* ── Fields (dark) ──────────────────────────────────────── */
.product-body .field { margin-top: 14px; }
.product-body .field-label { display: block; font-size: 12px; color: var(--on-dark-2); margin-bottom: 6px; }
.product-body .field-hint { font-size: 12px; color: var(--on-dark-3); margin-top: 10px; line-height: 1.5; }
/* 14px text on its 20px line: the same 42px box as ui_input_class, so a select
   (still .input, for the chevron) lines up with the inputs beside it. */
.product-body .input {
  font-family: inherit; font-size: 14px; line-height: var(--lh-body-sm); width: 100%;
  padding: 10px 14px; background: var(--dark-2);
  border: 1px solid var(--dark-4); border-radius: 10px; color: var(--on-dark-1);
}
.product-body .input:focus { outline: 0; border-color: var(--living-teal); box-shadow: 0 0 0 3px rgba(23, 196, 163, 0.18); }
.product-body .input[readonly] { color: var(--on-dark-2); }

/* ── Select (custom chevron, matches .input) ─────────────── */
/* Strip the native widget so selects align with text inputs and carry the
   Scoby stroke chevron instead of the OS arrow. Any <select class="input">
   in the product UI picks this up automatically. */
.product-body select.input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 40px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238FA0B3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
}
.product-body select.input:focus {
  /* Tint the chevron teal to echo the focus ring. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2317C4A3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.product-body select.input:hover { border-color: var(--dark-5); }
/* The popup list is OS-rendered, but most engines honour option colours. */
.product-body select.input option {
  background: var(--dark-2);
  color: var(--on-dark-1);
}
.product-body select.input::-ms-expand { display: none; }

/* ── Narrow form (create / edit records) ─────────────────── */
.product-body .form-narrow { max-width: 560px; }
.product-body .form-narrow .card-eyebrow { display: block; margin-bottom: 4px; }
.product-body .form-error {
  margin-top: 14px; padding: 12px 14px; border-radius: 10px;
  background: rgba(224, 77, 85, 0.12); border: 1px solid rgba(224, 77, 85, 0.32);
  font-size: 13px; color: #F47B82;
}
.product-body .form-error strong { display: block; margin-bottom: 4px; color: #F47B82; }
.product-body .form-error ul { margin: 0; padding-left: 18px; }

/* ── Component builder (plan form) ───────────────────────── */
.product-body .pc-row {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--dark-4);
}
/* The section's gap already spaces the first row from the heading. */
.product-body .pc-row:first-child { margin-top: 0; }
/* Beside the row's first line at every width, even when a metered row's usage
   type wraps below: 22px is a field label (16px line + 6px margin). */
.product-body .pc-row-aside { display: flex; padding-top: 22px; }
.product-body .btn-icon-danger {
  display: inline-flex; align-items: center; justify-content: center;
  /* Reset the global button padding (10px 18px) — with box-sizing:border-box it
     collapses the button's content box to 0 width and shrinks the icon away. */
  padding: 0;
  /* Match .input height (line-height + 2×10px padding + 2×1px border) so the
     bottom-aligned button lines up flush with the field's input, not 8px below it. */
  width: calc(var(--lh-body-sm) + 22px); height: calc(var(--lh-body-sm) + 22px);
  border-radius: 10px; cursor: pointer;
  background: var(--dark-3); border: 1px solid var(--dark-4); color: var(--on-dark-2);
  transition: all var(--t-fast) var(--ease-out);
}
.product-body .btn-icon-danger:hover { color: var(--danger); border-color: var(--danger); }

/* ── Record pages (customers index / show) ───────────────── */
.product-body .cust-name,
.product-body .entity-name { color: #fff; font-weight: 500; text-decoration: none; }
.product-body .cust-name:hover,
.product-body .entity-name:hover { color: var(--living-teal); }
.product-body .row-actions { text-align: right; white-space: nowrap; }
/* Also a <button> (button_to actions): drop the generic button padding and
   border, or the fixed 30px box squeezes the icon to nothing. */
.product-body .tbl-action {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; color: var(--on-dark-3);
  transition: all var(--t-fast) var(--ease-out);
  /* Centred on the text and overhanging the cell's padding, so the row is as tall as one without actions. */
  vertical-align: middle; margin-block: -5px;
}
/* The last glyph ends on the column's edge, as the other values do; the box overhangs the padding. */
.product-body .row-actions > .tbl-action:last-child,
.product-body .row-actions > form:last-child > .tbl-action { margin-right: -7px; }
.product-body .tbl-action:hover { background: var(--dark-4); color: #fff; }
.product-body .tbl-action-danger:hover { background: rgba(224, 77, 85, 0.16); color: #F47B82; }
.product-body .tbl-action-success:hover { background: rgba(23, 196, 163, 0.16); color: var(--mint-layer); }
@media (max-width: 720px) {
  .product-body .tbl-action { width: 40px; height: 40px; margin-block: 0; }
  .product-body .row-actions > .tbl-action:last-child,
  .product-body .row-actions > form:last-child > .tbl-action { margin-right: -12px; }
}

.product-body .btn.danger { background: rgba(224, 77, 85, 0.14); color: #F47B82; border-color: rgba(224, 77, 85, 0.32); }
.product-body .btn.danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

.product-body .danger-zone { margin-top: 14px; border-color: rgba(224, 77, 85, 0.28); }
.product-body .danger-zone.warning { border-color: rgba(219, 162, 76, 0.32); }
.product-body .card-eyebrow.danger { color: #F47B82; }

/* ── Developers: API key + code ─────────────────────────── */
.product-body .api-reveal { border-color: rgba(219, 162, 76, 0.4); background: rgba(219, 162, 76, 0.08); margin-bottom: 14px; }
.product-body .api-key-code {
  display: block; margin-top: 10px; padding: 12px 14px;
  background: var(--dark-2); border: 1px solid var(--dark-4); border-radius: 8px;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--mint-layer);
  word-break: break-all;
}
.product-body .code-block {
  margin-top: 10px; padding: 14px; background: var(--dark-2);
  border: 1px solid var(--dark-4); border-radius: 8px;
  font-family: var(--font-mono); font-size: 12px; color: var(--on-dark-1);
  white-space: pre-wrap; word-break: break-all; line-height: 1.6;
}
.product-body .kv-row .processor { color: var(--on-dark-1); }

/* ── Payments provider row ──────────────────────────────── */
.product-body .settings-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.product-body .settings-provider { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.product-body .settings-note { font-size: 13px; color: var(--on-dark-2); line-height: 1.6; }

@media (max-width: 720px) {
  .product-body .settings-row { flex-direction: column; align-items: stretch; }
}

/* ═════════════════════════════════════════════════════════════
   PRODUCT UI — Workspace switcher (sidebar)
   ═════════════════════════════════════════════════════════════ */
.product-body .workspace-switcher { position: relative; margin: 0 0 8px; }
.product-body .workspace-current {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 9px; border-radius: 10px; /* the avatar on the nav's 24px column */
  background: var(--dark-3); border: 1px solid var(--dark-4);
  color: #fff; font-size: 13px; font-weight: 500; text-align: left;
  transition: border-color var(--t-fast) var(--ease-out), background var(--t-fast);
}
.product-body .workspace-current:hover { border-color: var(--dark-5); background: var(--dark-4); }
.product-body .workspace-avatar {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  background: var(--grad-growth); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.product-body .workspace-avatar.small { width: 22px; height: 22px; border-radius: 6px; font-size: 10px; }
.product-body .workspace-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-body .workspace-caret { color: var(--on-dark-3); display: inline-flex; }

.product-body .workspace-menu {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40;
  background: var(--dark-3); border: 1px solid var(--dark-4); border-radius: 12px;
  padding: 6px; box-shadow: var(--shadow-dark-2);
}
.product-body .workspace-menu.open { display: block; }
.product-body .workspace-option {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 8px; text-decoration: none;
  color: var(--on-dark-1); font-size: 13px;
  transition: background var(--t-fast);
}
.product-body .workspace-option:hover { background: var(--dark-4); color: #fff; }
.product-body .workspace-option.active { color: #fff; }
.product-body .workspace-option-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-body .workspace-check { color: var(--living-teal); font-weight: 600; }
.product-body .workspace-new {
  margin-top: 4px; border-top: 1px solid var(--dark-4); border-radius: 0 0 8px 8px;
  color: var(--living-teal); font-weight: 500; padding-top: 12px;
}
.product-body .workspace-new:hover { background: transparent; color: var(--mint-layer); }

/* ── List cell sub-line + pager (filters are ui/_filter_bar) ── */
.product-body .cell-sub { font-size: 12px; line-height: var(--lh-caption); color: var(--on-dark-3); margin-top: 2px; }
.product-body .pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 12.5px; color: var(--on-dark-3); }
.product-body .pager-actions { display: flex; gap: 8px; }

/* ── KPI note ───────────────────────────────────────────── */
.product-body .kpi .delta.neutral { color: var(--on-dark-3); }

/* ═════════════════════════════════════════════════════════════
   PRODUCT UI — Shared primitives (copyable value, choice cards,
   check field, link list, empty actions). Reusable on any screen.
   ═════════════════════════════════════════════════════════════ */

/* ── Screen-reader-only text ────────────────────────────── */
.product-body .visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Interactive controls inside a clickable row ────────── */
/* .row-link stretches over the whole row; lift real controls above it. */
.product-body .tbl-row :is(button, form, .tbl-action, .copyable) { position: relative; z-index: 1; }
/* A code in a row overhangs the cell's padding (as .tbl-action does), so the row keeps the others' height. */
@media (min-width: 721px) {
  .product-body .tbl-row .copyable { margin-block: -3px; }
}

/* ── Copyable value (code + copy button) ────────────────── */
.product-body .copyable { display: inline-flex; align-items: center; gap: var(--s-1); max-width: 100%; }
.product-body .copyable-text {
  font-family: var(--font-mono); font-size: 12px; color: var(--mint-layer);
  background: var(--dark-2); border: 1px solid var(--dark-4); border-radius: var(--radius-xs);
  padding: 2px var(--s-2); overflow-wrap: anywhere;
}
.product-body .copyable-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; padding: 0; border: 0; border-radius: var(--radius-xs);
  background: transparent; color: var(--on-dark-3);
  transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.product-body .copyable-button:hover { background: var(--dark-4); color: var(--on-dark-1); }
.product-body .copyable-button:focus-visible { outline: 2px solid var(--living-teal); outline-offset: 1px; }
.product-body .copy-icon-idle { display: inline-flex; }
.product-body .copy-icon-done { display: none; }
/* Any copy controller element flashes .is-copied after a successful copy. */
.product-body .is-copied .copy-icon-idle { display: none; }
.product-body .is-copied .copy-icon-done { display: inline-flex; color: var(--living-teal); }

/* ── Plain fieldset (groups fields to disable them together, no chrome) ── */
.product-body .fieldset-plain,
.product-body .choice-group { border: 0; padding: 0; margin-inline: 0; min-width: 0; }

/* ── Choice cards (radio set with explanations) ─────────── */
.product-body .choice-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s-3); }
.product-body .choice-card {
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: var(--s-4); border-radius: var(--radius-md);
  background: var(--dark-2); border: 1px solid var(--dark-4); cursor: pointer;
  transition: border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out);
}
.product-body .choice-card:hover { border-color: var(--dark-5); }
.product-body .choice-card:has(input:checked) { border-color: var(--living-teal); background: var(--dark-3); }
.product-body .choice-card:has(input:focus-visible) { outline: 2px solid var(--living-teal); outline-offset: 2px; }
.product-body .choice-card input { margin-top: 3px; accent-color: var(--living-teal); }
/* Option title and hint as the check field's below: one weight, the form hints' muted 12/16. */
.product-body .choice-card strong { display: block; font-size: 13.5px; font-weight: 500; color: var(--on-dark-1); }
.product-body .choice-card small { display: block; margin-top: var(--s-1); font-size: 12px; font-weight: 400; line-height: 16px; color: var(--ui-fg-muted); }
.product-body .choice-group:disabled .choice-card { cursor: not-allowed; }
.product-body .choice-group:disabled .choice-card:not(:has(input:checked)) { opacity: 0.5; }

/* ── Check field (checkbox + label + explanation) ───────── */
.product-body .check-field { display: flex; align-items: flex-start; gap: var(--s-3); cursor: pointer; }
.product-body .check-field input { margin-top: 3px; accent-color: var(--living-teal); }
.product-body .check-field strong { display: block; font-size: 13.5px; font-weight: 500; color: var(--on-dark-1); }
.product-body .check-field small { display: block; margin-top: var(--s-1); font-size: 12px; font-weight: 400; line-height: 16px; color: var(--ui-fg-muted); }

/* ── Inputs: mono variant + disabled ────────────────────── */
.product-body .input-mono { font-family: var(--font-mono); font-size: 13px; }
/* Locked reads as locked, not empty (same as ui_input_class): dashed raised
   box, muted text instead of the placeholder's subtle grey. */
.product-body .input:disabled {
  background-color: var(--ui-surface-raised); border-style: dashed; border-color: var(--ui-border-strong);
  color: var(--ui-fg-muted); cursor: not-allowed;
}

/* ── Link list (records related to the current one) ─────── */
.product-body .link-list { list-style: none; margin: 0; padding: 0; }
.product-body .link-list li {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-2) 0; border-bottom: 1px solid var(--dark-4);
}
.product-body .link-list li:last-child { border-bottom: 0; }

/* ── Empty state actions ────────────────────────────────── */
.product-body .empty-card .empty-body { max-width: 52ch; margin-inline: auto; line-height: 1.6; color: var(--on-dark-2); }

/* ── Code samples keep their lines: scroll sideways, never split a token ── */
.product-body pre.code-block { white-space: pre; overflow-x: auto; word-break: normal; scrollbar-color: var(--dark-5) transparent; }

/* ── Loading frames ─────────────────────────────────────── */
/* Turbo marks a frame busy while it loads: take its controls out of reach, so
   nothing acts on what's about to be replaced, and dim the stale content only
   if the answer is slow (the delay), so a quick filter doesn't blink. */
.product-body turbo-frame[aria-busy="true"] { opacity: 0.55; pointer-events: none; transition: opacity var(--t-base) var(--ease-out) 250ms; }

/* ── Disabled buttons ───────────────────────────────────── */
.product-body .btn:disabled,
.product-body .btn-icon-danger:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* ── Notice (outcome of an action, shown in place) ──────── */
.product-body .notice {
  margin-bottom: var(--s-4); padding: var(--s-3) var(--s-4); border-radius: var(--radius-sm);
  border: 1px solid var(--dark-4); background: var(--dark-3);
  font-size: 13px; line-height: 1.5; color: var(--on-dark-1);
}
.product-body .notice.success { border-color: var(--living-teal); color: var(--mint-layer); }
.product-body .notice.processing { border-color: var(--processing); }
.product-body .notice.warning { border-color: var(--warning); }
.product-body .notice.danger { border-color: var(--danger); }
.product-body .notice-action { margin-left: var(--s-2); color: var(--living-teal); font-weight: 500; white-space: nowrap; }
.product-body .notice-action:hover { text-decoration: underline; }
}
