/* ==========================================================================
   zSign prototype - shared stylesheet
   Light theme only. Palette and type follow Zive's frontend
   (frontend/src/styles/colors.scss, frontend/src/theme/index.ts, index.css):
   primary navy #0A3C5F, accent orange #CC3D0B (white text 4.95:1, WCAG AA), ink #16202E, muted #64707D.
   Every class here is listed in assets/CONTRACT.md. Do not rename classes;
   add page-specific styles in a <style> block in the page instead.
   ========================================================================== */

:root {
  /* Brand */
  --zs-primary: #0a3c5f;
  --zs-primary-hover: #1a4c6f;
  --zs-primary-pressed: #072c46;
  --zs-primary-soft: #e8f0f6;
  --zs-primary-softer: #f2f6fa;
  --zs-link: #0f6fb3;
  --zs-accent: #cc3d0b;
  --zs-accent-hover: #b8350a;
  --zs-accent-soft: #fff0ea;

  /* Text */
  --zs-ink: #16202e;
  --zs-muted: #64707d;
  --zs-faint: #98a2ae;
  --zs-on-primary: #f7f7fa;

  /* Surfaces */
  --zs-bg: #f4f6f8;
  --zs-surface: #ffffff;
  --zs-surface-2: #f9fafb;
  --zs-surface-3: #eef0f2;
  --zs-border: #dbe1e5;
  --zs-border-strong: #c3ccd3;
  --zs-divider: #e7ebee;
  --zs-overlay: rgba(10, 22, 34, .48);

  /* Semantic (from Zive colors.scss) */
  --zs-success: #1e8a3a;
  --zs-success-ink: #134a17;
  --zs-success-bg: #ebfaec;
  --zs-success-line: #8de294;
  --zs-info: #4976fc;
  --zs-info-ink: #02217e;
  --zs-info-bg: #e6ecfe;
  --zs-info-line: #94aaea;
  --zs-warning: #d99a00;
  --zs-warning-ink: #664d00;
  --zs-warning-bg: #fff2cc;
  --zs-warning-line: #f0c442;
  --zs-danger: #d92d20;
  --zs-danger-hover: #b42318;
  --zs-danger-ink: #7a150a;
  --zs-danger-bg: #ffe8e5;
  --zs-danger-line: #ff9c8f;

  /* Status chip colours (envelope status vocabulary) */
  --zs-st-draft-bg: #eef0f2;      --zs-st-draft-fg: #3f4a4f;      --zs-st-draft-dot: #98a2ae;
  --zs-st-sent-bg: #e6ecfe;       --zs-st-sent-fg: #02217e;       --zs-st-sent-dot: #4976fc;
  --zs-st-progress-bg: #e3f1fb;   --zs-st-progress-fg: #0a4f7d;   --zs-st-progress-dot: #107ecb;
  --zs-st-completed-bg: #ebfaec;  --zs-st-completed-fg: #134a17;  --zs-st-completed-dot: #2fb344;
  --zs-st-declined-bg: #ffe8e5;   --zs-st-declined-fg: #7a150a;   --zs-st-declined-dot: #ff4b36;
  --zs-st-voided-bg: #e9ecef;     --zs-st-voided-fg: #3c4049;     --zs-st-voided-dot: #51585d;
  --zs-st-expired-bg: #fff2cc;    --zs-st-expired-fg: #664d00;    --zs-st-expired-dot: #e0a800;
  --zs-st-action-bg: #fff0ea;     --zs-st-action-fg: #a8360b;     --zs-st-action-dot: #cc3d0b;

  /* Type */
  --zs-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --zs-mono: 'Cascadia Mono', Consolas, 'SF Mono', Menlo, monospace;
  --zs-sig-font: 'Segoe Script', 'Brush Script MT', 'Lucida Handwriting', 'Snell Roundhand', cursive;
  --zs-fs-xs: 11.5px;
  --zs-fs-sm: 12.5px;
  --zs-fs: 13.5px;
  --zs-fs-md: 15px;
  --zs-fs-lg: 18px;
  --zs-fs-xl: 22px;
  --zs-fs-2xl: 28px;

  /* Shape and depth */
  --zs-radius-sm: 4px;
  --zs-radius: 6px;
  --zs-radius-lg: 10px;
  --zs-shadow-sm: 0 1px 2px rgba(16, 32, 46, .06);
  --zs-shadow: 0 2px 6px rgba(16, 32, 46, .08), 0 1px 2px rgba(16, 32, 46, .06);
  --zs-shadow-lg: 0 12px 32px rgba(16, 32, 46, .18), 0 2px 8px rgba(16, 32, 46, .08);
  --zs-focus: 0 0 0 3px rgba(16, 126, 203, .28);

  /* Layout */
  --zs-topbar-h: 56px;
  --zs-rail-w: 240px;
  --zs-flowbar-h: 60px;
  --zs-page-max: 1200px;

  color-scheme: light;
}

/* -------------------------------------------------------------------------- */
/* Base                                                                        */
/* -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--zs-font);
  font-size: var(--zs-fs);
  line-height: 1.5;
  color: var(--zs-ink);
  background: var(--zs-bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5 { margin: 0; color: var(--zs-ink); line-height: 1.25; }
h1 { font-size: var(--zs-fs-xl); font-weight: 750; letter-spacing: -.01em; }
h2 { font-size: var(--zs-fs-lg); font-weight: 700; }
h3 { font-size: var(--zs-fs-md); font-weight: 650; }
h4 { font-size: var(--zs-fs); font-weight: 650; }
p { margin: 0 0 8px; }
a { color: var(--zs-link); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; }
button { font: inherit; }
hr { border: 0; border-top: 1px solid var(--zs-divider); margin: 16px 0; }
:focus-visible { outline: none; box-shadow: var(--zs-focus); border-radius: var(--zs-radius-sm); }
::selection { background: #cfe3f3; }

.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: middle; }
.icon-sm { width: 14px; height: 14px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 40px; height: 40px; stroke-width: 1.4; }

/* Text helpers */
.text-muted { color: var(--zs-muted); }
.text-faint { color: var(--zs-faint); }
.text-sm { font-size: var(--zs-fs-sm); }
.text-xs { font-size: var(--zs-fs-xs); }
.text-md { font-size: var(--zs-fs-md); }
.text-lg { font-size: var(--zs-fs-lg); }
.text-strong { font-weight: 650; }
.text-danger { color: var(--zs-danger); }
.text-success { color: var(--zs-success); }
.text-warning { color: var(--zs-warning-ink); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mono { font-family: var(--zs-mono); font-size: .92em; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.micro-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--zs-muted); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Layout helpers */
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-sm { display: flex; flex-direction: column; gap: 6px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.cluster { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row-top { align-items: flex-start; }
.spacer { flex: 1 1 auto; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.mt-0 { margin-top: 0; } .mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.hidden, [hidden] { display: none !important; }

/* -------------------------------------------------------------------------- */
/* App shell: top bar, left rail, main                                         */
/* -------------------------------------------------------------------------- */
.app {
  display: grid;
  grid-template-columns: var(--zs-rail-w) minmax(0, 1fr);
  grid-template-rows: var(--zs-topbar-h) minmax(0, 1fr);
  grid-template-areas: "top top" "rail main";
  min-height: 100vh;
}
.app.no-rail { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "main"; }
.main { grid-area: main; min-width: 0; padding: 24px 32px 48px; }
.app.no-rail .main { padding: 24px 32px 48px; }
.page { max-width: var(--zs-page-max); margin: 0 auto; }
.page-narrow { max-width: 860px; margin: 0 auto; }

.topbar {
  grid-area: top;
  position: sticky; top: 0; z-index: 40;
  height: var(--zs-topbar-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 16px 0 12px;
  background: var(--zs-surface);
  border-bottom: 1px solid var(--zs-border);
}
.topbar-menu-btn { display: none; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--zs-ink); text-decoration: none; font-weight: 750; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 7px; background: var(--zs-primary); color: #fff; display: grid; place-items: center; }
.brand-mark svg { width: 20px; height: 20px; }
.brand small { font-weight: 500; color: var(--zs-muted); font-size: 12px; margin-left: 2px; }
.topnav { display: flex; align-items: stretch; height: 100%; gap: 2px; margin-left: 12px; }
.topnav a { display: flex; align-items: center; padding: 0 12px; color: var(--zs-muted); font-weight: 600; font-size: 13.5px; border-bottom: 2px solid transparent; text-decoration: none; }
.topnav a:hover { color: var(--zs-ink); background: var(--zs-surface-2); }
.topnav a.active { color: var(--zs-primary); border-bottom-color: var(--zs-primary); }
.topbar-search { flex: 0 1 340px; margin-left: auto; position: relative; }
.topbar-search .input { padding-left: 34px; height: 34px; background: var(--zs-surface-2); }
.topbar-search .icon { position: absolute; left: 10px; top: 8px; color: var(--zs-faint); }
.topbar-actions { display: flex; align-items: center; gap: 4px; }
.topbar-workspace { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: var(--zs-radius); color: var(--zs-muted); font-size: 12.5px; font-weight: 600; border: 1px solid var(--zs-border); background: var(--zs-surface); cursor: pointer; }
.topbar-workspace:hover { background: var(--zs-surface-2); }

.rail {
  grid-area: rail;
  position: sticky; top: var(--zs-topbar-h);
  height: calc(100vh - var(--zs-topbar-h));
  overflow-y: auto;
  background: var(--zs-surface);
  border-right: 1px solid var(--zs-border);
  padding: 16px 12px;
  display: flex; flex-direction: column; gap: 2px;
}
.rail-start { margin-bottom: 14px; }
.rail-start .btn { width: 100%; justify-content: center; }
.rail-section { margin: 14px 8px 4px; }
.rail-link {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: var(--zs-radius);
  color: var(--zs-ink); font-weight: 550; font-size: 13.5px; text-decoration: none;
}
.rail-link:hover { background: var(--zs-surface-2); text-decoration: none; }
.rail-link.active { background: var(--zs-primary-soft); color: var(--zs-primary); font-weight: 650; }
.rail-link .icon { color: var(--zs-muted); }
.rail-link.active .icon { color: var(--zs-primary); }
.rail-link .count { margin-left: auto; font-size: 12px; color: var(--zs-muted); font-weight: 600; }
.rail-link.active .count { color: var(--zs-primary); }
.rail-sub { padding-left: 38px; font-weight: 500; font-size: 13px; }
.rail-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.rail-footer { margin-top: auto; padding-top: 16px; }
.rail-backdrop { display: none; }

/* -------------------------------------------------------------------------- */
/* Page header                                                                 */
/* -------------------------------------------------------------------------- */
.page-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-header .page-title { flex: 1 1 auto; min-width: 0; }
.page-header .page-title p { color: var(--zs-muted); margin: 4px 0 0; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--zs-muted); margin-bottom: 6px; }
.breadcrumb a { color: var(--zs-muted); }

/* -------------------------------------------------------------------------- */
/* Buttons                                                                     */
/* -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border-radius: var(--zs-radius);
  border: 1px solid var(--zs-border-strong);
  background: var(--zs-surface);
  color: var(--zs-ink);
  font-weight: 600; font-size: 13px; line-height: 1;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background-color .12s, border-color .12s, color .12s, box-shadow .12s;
}
.btn:hover { background: var(--zs-surface-2); border-color: var(--zs-muted); text-decoration: none; }
.btn:active { background: var(--zs-surface-3); }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--zs-primary); border-color: var(--zs-primary); color: var(--zs-on-primary); }
.btn-primary:hover { background: var(--zs-primary-hover); border-color: var(--zs-primary-hover); }
.btn-primary:active { background: var(--zs-primary-pressed); }
.btn-accent { background: var(--zs-accent); border-color: var(--zs-accent); color: #fff; }
.btn-accent:hover { background: var(--zs-accent-hover); border-color: var(--zs-accent-hover); }
.btn-secondary { background: var(--zs-surface); border-color: var(--zs-primary); color: var(--zs-primary); }
.btn-secondary:hover { background: var(--zs-primary-softer); border-color: var(--zs-primary); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--zs-ink); }
.btn-ghost:hover { background: var(--zs-surface-3); border-color: transparent; }
.btn-danger { background: var(--zs-danger); border-color: var(--zs-danger); color: #fff; }
.btn-danger:hover { background: var(--zs-danger-hover); border-color: var(--zs-danger-hover); }
.btn-danger-outline { color: var(--zs-danger); border-color: var(--zs-danger-line); background: var(--zs-surface); }
.btn-danger-outline:hover { background: var(--zs-danger-bg); border-color: var(--zs-danger); }
.btn-link { background: none; border: 0; height: auto; padding: 0; color: var(--zs-link); font-weight: 600; }
.btn-link:hover { background: none; text-decoration: underline; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-lg { height: 42px; padding: 0 20px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; padding: 0; }
.btn-icon.btn-sm { width: 30px; }
.btn[disabled], .btn.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn-group { display: inline-flex; }
.btn-group > .btn:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.btn-group > .btn:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
.btn-group > .btn-primary:not(:first-child) { border-left-color: rgba(255,255,255,.35); }
.btn-group > .btn-caret { width: 32px; padding: 0; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--zs-radius); border: 0; background: transparent; color: var(--zs-muted); cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--zs-surface-3); color: var(--zs-ink); }
.icon-btn .dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--zs-accent); border: 2px solid var(--zs-surface); }

/* -------------------------------------------------------------------------- */
/* Chips, badges, avatars                                                      */
/* -------------------------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 8px;
  border-radius: 11px;
  font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap;
  background: var(--zs-surface-3); color: var(--zs-ink);
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .9; flex: none; }
.chip.chip-plain::before, .chip-product::before, .chip-count::before { display: none; }
.chip .icon { width: 13px; height: 13px; }
.chip-lg { height: 26px; padding: 0 10px; font-size: 12.5px; border-radius: 13px; }
.chip-draft { background: var(--zs-st-draft-bg); color: var(--zs-st-draft-fg); }
.chip-draft::before { background: var(--zs-st-draft-dot); }
.chip-sent { background: var(--zs-st-sent-bg); color: var(--zs-st-sent-fg); }
.chip-sent::before { background: var(--zs-st-sent-dot); }
.chip-in_progress { background: var(--zs-st-progress-bg); color: var(--zs-st-progress-fg); }
.chip-in_progress::before { background: var(--zs-st-progress-dot); }
.chip-completed { background: var(--zs-st-completed-bg); color: var(--zs-st-completed-fg); }
.chip-completed::before { background: var(--zs-st-completed-dot); }
.chip-declined { background: var(--zs-st-declined-bg); color: var(--zs-st-declined-fg); }
.chip-declined::before { background: var(--zs-st-declined-dot); }
.chip-voided { background: var(--zs-st-voided-bg); color: var(--zs-st-voided-fg); }
.chip-voided::before { background: var(--zs-st-voided-dot); }
.chip-expired { background: var(--zs-st-expired-bg); color: var(--zs-st-expired-fg); }
.chip-expired::before { background: var(--zs-st-expired-dot); }
.chip-action { background: var(--zs-st-action-bg); color: var(--zs-st-action-fg); }
.chip-action::before { background: var(--zs-st-action-dot); }
.chip-expiring { background: var(--zs-surface); color: var(--zs-warning-ink); box-shadow: inset 0 0 0 1px var(--zs-warning-line); }
.chip-expiring::before { background: var(--zs-warning); }
.chip-product { background: var(--zs-surface); color: var(--zs-muted); box-shadow: inset 0 0 0 1px var(--zs-border); font-weight: 600; }
.chip-count { background: var(--zs-surface-3); color: var(--zs-muted); }
.chip-success { background: var(--zs-success-bg); color: var(--zs-success-ink); }
.chip-warning { background: var(--zs-warning-bg); color: var(--zs-warning-ink); }
.chip-danger { background: var(--zs-danger-bg); color: var(--zs-danger-ink); }
.chip-info { background: var(--zs-info-bg); color: var(--zs-info-ink); }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--zs-accent); color: #fff; font-size: 11px; font-weight: 700; }
.badge-neutral { background: var(--zs-surface-3); color: var(--zs-muted); }
.badge-new { background: var(--zs-success-bg); color: var(--zs-success-ink); font-size: 10px; letter-spacing: .3px; text-transform: uppercase; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--zs-radius-sm); background: var(--zs-surface-3); color: var(--zs-muted); font-size: 12px; font-weight: 600; }

.avatar {
  --av: var(--zs-primary);
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--av) 14%, white);
  color: var(--av);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--av) 55%, white);
  font-size: 12px; font-weight: 700; letter-spacing: .2px;
}
.avatar-sm { width: 24px; height: 24px; font-size: 10.5px; }
.avatar-lg { width: 40px; height: 40px; font-size: 14px; }
.avatar-solid { background: var(--av); color: #fff; box-shadow: none; }

/* Person cell: avatar + name + e-mail */
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person-name { font-weight: 600; color: var(--zs-ink); }
.person-email { font-size: 12.5px; color: var(--zs-muted); }
.person > div { min-width: 0; }

/* Signer chain (SignNow row pattern) */
.signer-chain { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: 12.5px; color: var(--zs-muted); }
.signer-chain .sc-label { font-weight: 600; color: var(--zs-muted); margin-right: 2px; }
.signer-chain .sc-step { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 4px; border-radius: 12px; background: var(--zs-surface-2); border: 1px solid var(--zs-divider); color: var(--zs-ink); max-width: 240px; }
.signer-chain .sc-num { font-weight: 700; color: var(--zs-muted); font-size: 11px; min-width: 12px; text-align: center; }
.signer-chain .sc-mark { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; flex: none; }
.signer-chain .sc-mark .icon { width: 11px; height: 11px; stroke-width: 2.6; }
.sc-mark.done { background: var(--zs-success-bg); color: var(--zs-success); }
.sc-mark.current { background: var(--zs-info-bg); color: var(--zs-link); }
.sc-mark.waiting { background: var(--zs-surface-3); color: var(--zs-faint); }
.sc-mark.view { background: var(--zs-surface-3); color: var(--zs-muted); }
.sc-mark.bad { background: var(--zs-danger-bg); color: var(--zs-danger); }
.signer-chain .sc-arrow { color: var(--zs-faint); }
.signer-chain .sc-arrow .icon { width: 12px; height: 12px; }

/* Progress */
.progress { height: 6px; border-radius: 3px; background: #e7ebee; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 3px; background: var(--zs-link); transition: width .3s; }
.progress.success > span { background: var(--zs-success); }
.progress.danger > span { background: var(--zs-danger); }
.progress.muted > span { background: var(--zs-faint); }

/* -------------------------------------------------------------------------- */
/* Cards                                                                       */
/* -------------------------------------------------------------------------- */
.card { background: var(--zs-surface); border: 1px solid var(--zs-border); border-radius: var(--zs-radius-lg); box-shadow: var(--zs-shadow-sm); min-width: 0; }
.card-header { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--zs-divider); }
.card-header h2, .card-header h3 { flex: 1 1 auto; }
.card-body { padding: 18px; }
.card-footer { padding: 12px 18px; border-top: 1px solid var(--zs-divider); display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.card-flat { box-shadow: none; }
.card-muted { background: var(--zs-surface-2); }
.card-link { display: block; color: inherit; text-decoration: none; transition: border-color .12s, box-shadow .12s; }
.card-link:hover { text-decoration: none; border-color: var(--zs-border-strong); box-shadow: var(--zs-shadow); }

.stat { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; color: inherit; text-decoration: none; border-radius: var(--zs-radius-lg); }
.stat:hover { text-decoration: none; }
.stat-value { font-size: 30px; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; }
.stat-label { font-size: 13px; font-weight: 600; color: var(--zs-muted); }

.section { margin-top: 28px; }
.section-title { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.section-title h2, .section-title h3 { flex: 1 1 auto; }

/* Collapsible section (Set up envelope) */
.fold { border-bottom: 1px solid var(--zs-border); padding: 20px 0; }
.fold-head { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.fold-head h2 { flex: 1 1 auto; font-size: 17px; }
.fold-head .fold-caret { transition: transform .15s; color: var(--zs-muted); }
.fold.collapsed .fold-caret { transform: rotate(-90deg); }
.fold.collapsed .fold-body { display: none; }
.fold-body { padding-top: 16px; }
.fold-num { width: 24px; height: 24px; border-radius: 50%; background: var(--zs-primary); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }

/* Key-value list (details tab) */
.kv { display: grid; grid-template-columns: minmax(140px, 200px) minmax(0, 1fr); gap: 10px 20px; }
.kv dt { color: var(--zs-muted); font-size: 12.5px; font-weight: 600; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 32px; }
.fact .micro-label { display: block; margin-bottom: 2px; }
.fact-value { overflow-wrap: anywhere; }

/* Empty state */
.empty { text-align: center; padding: 48px 24px; color: var(--zs-muted); }
.empty .icon-xl { margin: 0 auto 12px; color: var(--zs-faint); }
.empty h3 { margin-bottom: 4px; }
.empty p { max-width: 420px; margin: 0 auto 16px; }

/* -------------------------------------------------------------------------- */
/* Tables and list rows                                                        */
/* -------------------------------------------------------------------------- */
.table-wrap { background: var(--zs-surface); border: 1px solid var(--zs-border); border-radius: var(--zs-radius-lg); overflow: hidden; box-shadow: var(--zs-shadow-sm); }
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--zs-muted); background: var(--zs-surface-2); padding: 10px 14px; border-bottom: 1px solid var(--zs-border); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--zs-divider); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table-hover tbody tr:hover td { background: var(--zs-primary-softer); }
.table-compact td { padding: 8px 12px; }
.table-compact th { padding: 8px 12px; }
.table .col-check { width: 40px; padding-right: 0; }
.table .col-actions { text-align: right; white-space: nowrap; width: 1%; }
.table tr.selected td { background: #eef5fb; }
.table-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; background: var(--zs-surface-2); border-bottom: 1px solid var(--zs-border); }
.table-footer { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--zs-divider); background: var(--zs-surface); font-size: 12.5px; color: var(--zs-muted); }
.bulk-bar { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--zs-primary); color: #fff; font-weight: 600; font-size: 13px; }
.bulk-bar .btn { height: 30px; background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.bulk-bar .btn:hover { background: rgba(255,255,255,.12); }

/* Envelope list row (documents list) */
.env-row td { padding-top: 14px; padding-bottom: 14px; }
.env-cell { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.env-title { font-weight: 650; color: var(--zs-ink); font-size: 14px; display: block; }
.env-title:hover { color: var(--zs-primary); }
.env-meta { font-size: 12.5px; color: var(--zs-muted); margin: 2px 0 6px; }
.env-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.env-status { min-width: 150px; }
.env-status .progress { margin: 8px 0 4px; width: 140px; }
.env-status small { color: var(--zs-muted); font-size: 12px; }

/* Document thumbnail (faux page) */
.doc-thumb {
  width: 44px; height: 56px; flex: none;
  border: 1px solid var(--zs-border); border-radius: 3px; background: #fff;
  padding: 7px 6px; display: flex; flex-direction: column; gap: 3px; overflow: hidden; position: relative;
}
.doc-thumb i { display: block; height: 2px; background: #d5dbe0; border-radius: 1px; }
.doc-thumb i:nth-child(1) { width: 60%; background: #9aa6b1; height: 3px; }
.doc-thumb i:nth-child(3n) { width: 82%; }
.doc-thumb i:nth-child(4n) { width: 70%; }
.doc-thumb-lg { width: 100%; height: auto; aspect-ratio: 8.5 / 11; padding: 14% 12%; gap: 5%; }
.doc-thumb-lg i { height: 3%; }
.doc-thumb .doc-thumb-stamp { position: absolute; inset: auto 0 38% 0; text-align: center; transform: rotate(-18deg); font-family: var(--zs-mono); font-size: 7px; letter-spacing: 1px; color: rgba(16, 126, 203, .28); font-weight: 700; text-transform: uppercase; }
.doc-card { width: 168px; border: 1px solid var(--zs-border); border-radius: var(--zs-radius-lg); background: var(--zs-surface); overflow: hidden; display: flex; flex-direction: column; }
.doc-card-preview { background: var(--zs-surface-3); padding: 14px 22px 0; height: 132px; overflow: hidden; }
.doc-card-preview .doc-thumb { width: 100%; height: auto; aspect-ratio: 8.5/11; border-radius: 2px 2px 0 0; padding: 12px 10px; gap: 5px; box-shadow: var(--zs-shadow-sm); }
.doc-card-body { padding: 10px 12px; display: flex; align-items: flex-start; gap: 6px; border-top: 1px solid var(--zs-divider); }
.doc-card-name { font-weight: 600; font-size: 13px; overflow-wrap: anywhere; line-height: 1.3; }
.doc-card-meta { font-size: 12px; color: var(--zs-muted); }

/* -------------------------------------------------------------------------- */
/* Document page canvas (editor, signer, previews)                             */
/* -------------------------------------------------------------------------- */
.doc-viewer { background: #e9edf1; padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.doc-page {
  position: relative;
  width: 100%; max-width: 816px;
  aspect-ratio: 8.5 / 11;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 32, 46, .18), 0 0 0 1px rgba(16, 32, 46, .05);
  container-type: inline-size;
  overflow: hidden;
  color: #1b1f24;
  font-family: Georgia, 'Times New Roman', serif;
}
.doc-page-content { position: absolute; inset: 0; padding: 8.5cqw 9cqw; font-size: 1.62cqw; line-height: 1.55; }
.doc-page-content h1 { font-family: Georgia, 'Times New Roman', serif; font-size: 2.9cqw; text-align: center; font-weight: 700; letter-spacing: .02em; margin-bottom: 1.2cqw; color: #111; }
.doc-page-content h2 { font-family: Georgia, 'Times New Roman', serif; font-size: 1.9cqw; font-weight: 700; margin: 2cqw 0 .8cqw; color: #111; }
.doc-page-content p { margin: 0 0 1.3cqw; text-align: justify; }
.doc-page-content .doc-sub { text-align: center; font-size: 1.5cqw; color: #444; margin-bottom: 3cqw; }
.doc-page-content .doc-lines i { display: block; height: .55cqw; background: #e3e6e9; margin: 0 0 1.25cqw; border-radius: 1px; }
.doc-page-content .doc-lines i:nth-child(5n) { width: 72%; margin-bottom: 2.6cqw; }
.doc-sigblock { position: absolute; font-size: 1.45cqw; color: #222; }
.doc-sigblock .line { border-bottom: 1px solid #333; height: 4.6cqw; }
.doc-sigblock .cap { margin-top: .5cqw; color: #555; }
.doc-page-stamp { position: absolute; top: 2.4cqw; left: 3cqw; font-family: var(--zs-mono); font-size: 1.1cqw; color: #6b7480; }
.doc-page-number { position: absolute; bottom: 2.6cqw; left: 0; right: 0; text-align: center; font-size: 1.2cqw; color: #8a939c; font-family: var(--zs-font); }
.doc-page-watermark { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; font-family: var(--zs-mono); font-size: 7cqw; font-weight: 700; color: rgba(16, 126, 203, .10); transform: rotate(-24deg); letter-spacing: .1em; text-transform: uppercase; }

/* A field placed on a page. Position with left/top/width/height in % of the page. */
.field-box {
  --rc: var(--zs-link);
  position: absolute;
  border: 1.5px solid var(--rc);
  background: color-mix(in srgb, var(--rc) 13%, transparent);
  border-radius: 3px;
  display: flex; align-items: center; gap: .6cqw;
  padding: 0 .9cqw;
  font-family: var(--zs-font);
  font-size: 1.35cqw; font-weight: 600;
  color: color-mix(in srgb, var(--rc) 80%, black);
  overflow: hidden; white-space: nowrap;
  cursor: pointer;
}
.field-box .icon { width: 1.9cqw; height: 1.9cqw; min-width: 10px; min-height: 10px; }
.field-box.required::after { content: "*"; position: absolute; top: .1cqw; right: .5cqw; color: var(--zs-danger); font-size: 1.6cqw; }
.field-box.selected { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--rc); z-index: 3; }
.field-box.filled { border-color: var(--zs-success); background: rgba(47, 179, 68, .08); color: #0d3d18; }
.field-box.invalid { border-color: var(--zs-danger); background: rgba(217, 45, 32, .08); color: var(--zs-danger-ink); }
.field-box.sig-solid { background: var(--zs-accent); border-color: var(--zs-accent); color: #fff; justify-content: center; }
.field-box.readonly { cursor: default; border-style: dashed; }
.field-value-sig { font-family: var(--zs-sig-font); font-size: 2.6cqw; font-weight: 400; color: #0b2a6f; white-space: nowrap; display: block; line-height: 1.2; }
.field-value-sig.wrap { white-space: normal; overflow-wrap: anywhere; line-height: 1.05; }
.fl-v.sig { overflow: visible; }
.sig-frame { display: inline-block; max-width: 100%; min-width: 0; border-left: 2px solid #0b2a6f; padding: .2cqw 0 .2cqw .8cqw; font-family: var(--zs-font); line-height: 1.15; color: #0b2a6f; }
.sig-frame small { display: block; font-size: .95cqw; font-weight: 600; color: #4b5563; }

/* Margin flag used by guided signing: Start, Next, Sign, Fill in */
.flag {
  position: absolute; left: -8px; transform: translateX(-100%);
  display: inline-flex; align-items: center; height: 30px; padding: 0 10px 0 12px;
  background: var(--zs-accent); color: #fff; font-weight: 700; font-size: 13px;
  border-radius: 4px 0 0 4px; white-space: nowrap; cursor: pointer; z-index: 5;
}
.flag::after { content: ""; position: absolute; right: -14px; top: 0; border-style: solid; border-width: 15px 0 15px 14px; border-color: transparent transparent transparent var(--zs-accent); }

/* -------------------------------------------------------------------------- */
/* Tabs                                                                        */
/* -------------------------------------------------------------------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--zs-border); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tab { appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 12px; margin-bottom: -1px; color: var(--zs-muted); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; text-decoration: none; }
.tab:hover { color: var(--zs-ink); text-decoration: none; }
.tab.active, .tab[aria-selected="true"] { color: var(--zs-primary); border-bottom-color: var(--zs-primary); }
.tab .chip-count { height: 18px; padding: 0 6px; font-size: 11px; }
.tab-panel[hidden] { display: none; }
.segmented { display: inline-flex; border: 1px solid var(--zs-border-strong); border-radius: var(--zs-radius); overflow: hidden; background: var(--zs-surface); }
.segmented button { border: 0; background: none; padding: 0 12px; height: 32px; font-weight: 600; font-size: 12.5px; color: var(--zs-muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.segmented button + button { border-left: 1px solid var(--zs-border); }
.segmented button.active { background: var(--zs-primary-soft); color: var(--zs-primary); }

/* Stepper (Set up > Add fields > Review and send) */
.stepper { display: flex; align-items: center; gap: 0; }
.stepper-step { display: flex; align-items: center; gap: 8px; color: var(--zs-muted); font-weight: 600; font-size: 12.5px; white-space: nowrap; text-decoration: none; }
.stepper-step:hover { text-decoration: none; }
.stepper-step .stepper-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--zs-border-strong); display: grid; place-items: center; font-size: 11px; background: #fff; color: var(--zs-faint); }
.stepper-step.done { color: var(--zs-ink); }
.stepper-step.done .stepper-dot { background: var(--zs-success); border-color: var(--zs-success); color: #fff; }
.stepper-step.current { color: var(--zs-primary); }
.stepper-step.current .stepper-dot { border-color: var(--zs-primary); color: var(--zs-primary); }
.stepper-line { width: 40px; height: 2px; background: var(--zs-border); margin: 0 10px; }
.stepper-step.done + .stepper-line { background: var(--zs-success); }

/* -------------------------------------------------------------------------- */
/* Full-screen flow pages (set up, editor, send)                              */
/* -------------------------------------------------------------------------- */
.flow { min-height: 100vh; display: flex; flex-direction: column; background: var(--zs-bg); }
.flowbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--zs-flowbar-h);
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px;
  padding: 0 16px;
  background: var(--zs-surface); border-bottom: 1px solid var(--zs-border);
}
.flowbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.flowbar-title { font-weight: 650; font-size: 15px; min-width: 0; }
.flowbar-right { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.flow-body { flex: 1 1 auto; }
.flow-footer { position: sticky; bottom: 0; z-index: 30; background: var(--zs-surface); border-top: 1px solid var(--zs-border); padding: 12px 16px; display: flex; gap: 8px; align-items: center; justify-content: center; }
.save-state { font-size: 12.5px; color: var(--zs-muted); display: inline-flex; align-items: center; gap: 6px; }
.save-state .icon { width: 14px; height: 14px; color: var(--zs-success); }
.correcting-bar { position: sticky; top: var(--zs-flowbar-h); z-index: 35; background: #fdf0c4; color: #5a4300; border-bottom: 1px solid #f0d77c; padding: 9px 16px; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 13px; text-align: center; }

/* -------------------------------------------------------------------------- */
/* Forms                                                                       */
/* -------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.label { font-size: 12.5px; font-weight: 600; color: var(--zs-ink); }
.label .req { color: var(--zs-danger); margin-left: 2px; }
.help { font-size: 12px; color: var(--zs-muted); }
.error-text { font-size: 12px; color: var(--zs-danger); display: flex; gap: 4px; align-items: center; }
.input, .select, .textarea {
  width: 100%; height: 36px; padding: 0 10px;
  border: 1px solid var(--zs-border-strong); border-radius: var(--zs-radius);
  background: var(--zs-surface); color: var(--zs-ink);
  font: inherit; font-size: 13.5px;
  transition: border-color .12s, box-shadow .12s;
}
.textarea { height: auto; min-height: 88px; padding: 8px 10px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 30px; 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='%2364707d' 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 8px center; cursor: pointer; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--zs-muted); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--zs-link); box-shadow: var(--zs-focus); }
.input::placeholder, .textarea::placeholder { color: var(--zs-faint); }
.input[disabled], .select[disabled], .textarea[disabled], .input[readonly].locked { background: var(--zs-surface-3); color: var(--zs-muted); cursor: not-allowed; }
.input-sm, .select-sm { height: 30px; font-size: 12.5px; }
.input-num { width: 76px; text-align: center; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea, .input.is-invalid { border-color: var(--zs-danger); }
.field.has-error .input:focus { box-shadow: 0 0 0 3px rgba(217, 45, 32, .2); }
.input-group { position: relative; display: flex; align-items: stretch; }
.input-group .input { flex: 1 1 auto; }
.input-group .input-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--zs-faint); pointer-events: none; }
.input-group .input-icon + .input { padding-left: 34px; }
.input-group .input-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.input-group .input-addon { display: flex; align-items: center; padding: 0 10px; background: var(--zs-surface-3); border: 1px solid var(--zs-border-strong); border-left: 0; border-radius: 0 var(--zs-radius) var(--zs-radius) 0; color: var(--zs-muted); font-size: 12.5px; white-space: nowrap; }
.input-group .input-addon-left { border-left: 1px solid var(--zs-border-strong); border-right: 0; border-radius: var(--zs-radius) 0 0 var(--zs-radius); }
.input-group .input:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.counter { font-size: 11.5px; color: var(--zs-muted); text-align: right; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }

.check, .radio { display: inline-flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: 13.5px; line-height: 1.4; }
.check input, .radio input { appearance: none; margin: 1px 0 0; width: 17px; height: 17px; border: 1.5px solid var(--zs-border-strong); background: #fff; flex: none; cursor: pointer; display: grid; place-items: center; transition: background .12s, border-color .12s; }
.check input { border-radius: 4px; }
.radio input { border-radius: 50%; }
.check input:checked { background: var(--zs-primary); border-color: var(--zs-primary); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); background-size: 12px; background-position: center; background-repeat: no-repeat; }
.radio input:checked { border-color: var(--zs-primary); box-shadow: inset 0 0 0 4px #fff; background: var(--zs-primary); }
.check input:focus-visible, .radio input:focus-visible { box-shadow: var(--zs-focus); }
.check input:disabled, .radio input:disabled { opacity: .5; cursor: not-allowed; }
.check .check-desc { display: block; font-size: 12px; color: var(--zs-muted); }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; }
.switch input { appearance: none; margin: 0; width: 34px; height: 20px; border-radius: 10px; background: var(--zs-border-strong); position: relative; cursor: pointer; flex: none; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked { background: var(--zs-primary); }
.switch input:checked::after { transform: translateX(14px); }
.switch input:focus-visible { box-shadow: var(--zs-focus); }

.dropzone { border: 1.5px dashed var(--zs-border-strong); border-radius: var(--zs-radius-lg); background: var(--zs-surface-2); padding: 28px 20px; text-align: center; color: var(--zs-muted); display: flex; flex-direction: column; align-items: center; gap: 10px; justify-content: center; transition: background .12s, border-color .12s; }
.dropzone.dragover { background: var(--zs-primary-softer); border-color: var(--zs-link); }
.dropzone .dz-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--zs-surface-3); display: grid; place-items: center; color: var(--zs-muted); }

.filter-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-bar .search { position: relative; flex: 0 1 280px; min-width: 180px; }
.filter-bar .search .icon { position: absolute; left: 10px; top: 9px; color: var(--zs-faint); }
.filter-bar .search .input { padding-left: 34px; }
.filter-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 16px; border: 1px solid var(--zs-border-strong); background: var(--zs-surface); color: var(--zs-ink); font-weight: 600; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.filter-btn:hover { background: var(--zs-surface-2); }
.filter-btn.active { background: var(--zs-primary-soft); border-color: var(--zs-primary); color: var(--zs-primary); }
.filter-btn .icon { width: 14px; height: 14px; }
.filter-btn .x { margin-left: 2px; display: inline-grid; place-items: center; border-radius: 50%; width: 16px; height: 16px; }
.filter-btn .x:hover { background: rgba(10, 60, 95, .14); }

/* -------------------------------------------------------------------------- */
/* Menus                                                                       */
/* -------------------------------------------------------------------------- */
.menu {
  position: fixed; z-index: 120;
  min-width: 200px; max-width: 340px; max-height: calc(100vh - 24px); overflow-y: auto;
  background: var(--zs-surface); border: 1px solid var(--zs-border); border-radius: var(--zs-radius-lg);
  box-shadow: var(--zs-shadow-lg); padding: 6px;
  animation: zs-pop .12s ease-out;
}
.menu-header { padding: 8px 10px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--zs-muted); }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border: 0; border-radius: var(--zs-radius);
  background: none; color: var(--zs-ink); text-align: left; cursor: pointer;
  font-size: 13.5px; font-weight: 500; text-decoration: none;
}
.menu-item:hover, .menu-item:focus-visible, .menu-item.open { background: var(--zs-surface-3); text-decoration: none; box-shadow: none; }
.menu-item .icon { color: var(--zs-muted); width: 17px; height: 17px; }
.menu-item .menu-text { flex: 1 1 auto; min-width: 0; }
.menu-item .menu-desc { display: block; font-size: 12px; color: var(--zs-muted); font-weight: 400; margin-top: 1px; }
.menu-item .menu-check { color: var(--zs-primary); }
.menu-item .menu-sub-caret { color: var(--zs-faint); }
.menu-item.danger { color: var(--zs-danger); }
.menu-item.danger .icon { color: var(--zs-danger); }
.menu-item[disabled], .menu-item.disabled { opacity: .45; cursor: not-allowed; }
.menu-item.rich { align-items: flex-start; }
.menu-item.rich .menu-icon-tile { width: 32px; height: 32px; border-radius: 8px; background: var(--zs-primary-soft); color: var(--zs-primary); display: grid; place-items: center; flex: none; }
.menu-item.rich .menu-icon-tile .icon { color: var(--zs-primary); }
.menu-divider { height: 1px; background: var(--zs-divider); margin: 6px 4px; }
@keyframes zs-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }

/* -------------------------------------------------------------------------- */
/* Dialogs and drawers                                                         */
/* -------------------------------------------------------------------------- */
.dialog-backdrop { position: fixed; inset: 0; z-index: 100; background: var(--zs-overlay); display: flex; align-items: center; justify-content: center; padding: 24px; animation: zs-fade .15s ease-out; }
.dialog {
  width: 100%; max-width: 520px; max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
  background: var(--zs-surface); border-radius: 12px; box-shadow: var(--zs-shadow-lg);
  animation: zs-rise .18s ease-out;
}
.dialog-sm { max-width: 420px; }
.dialog-lg { max-width: 760px; }
.dialog-xl { max-width: 1040px; }
.dialog-full { max-width: none; width: calc(100vw - 48px); height: calc(100vh - 48px); }
.dialog-header { display: flex; align-items: center; gap: 12px; padding: 18px 22px 14px; border-bottom: 1px solid var(--zs-divider); }
.dialog-header h2 { flex: 1 1 auto; font-size: 17px; }
.dialog-body { padding: 18px 22px; overflow-y: auto; flex: 1 1 auto; }
.dialog-footer { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--zs-divider); background: var(--zs-surface-2); border-radius: 0 0 12px 12px; flex-wrap: wrap; }
.dialog-footer .left { margin-right: auto; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 100; background: var(--zs-overlay); animation: zs-fade .15s ease-out; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 101; width: 440px; max-width: 100vw; background: var(--zs-surface); box-shadow: var(--zs-shadow-lg); display: flex; flex-direction: column; animation: zs-slide .2s ease-out; }
.drawer .dialog-footer { border-radius: 0; }
@keyframes zs-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes zs-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes zs-slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* -------------------------------------------------------------------------- */
/* Toasts and banners                                                          */
/* -------------------------------------------------------------------------- */
.toast-region { position: fixed; left: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 10px;
  min-width: 280px; max-width: 440px;
  padding: 11px 12px 11px 14px; border-radius: var(--zs-radius-lg);
  background: #13222f; color: #fff; box-shadow: var(--zs-shadow-lg);
  font-size: 13.5px; font-weight: 500;
  animation: zs-rise .2s ease-out;
}
.toast .icon { width: 18px; height: 18px; }
.toast-success .icon:first-child { color: #6ee07c; }
.toast-error .icon:first-child { color: #ff8a7a; }
.toast-info .icon:first-child { color: #8fb4ff; }
.toast .toast-msg { flex: 1 1 auto; }
.toast .toast-action { background: none; border: 0; color: #9fd0ff; font-weight: 700; cursor: pointer; padding: 4px 6px; border-radius: 4px; }
.toast .toast-action:hover { background: rgba(255,255,255,.08); }
.toast .toast-close { background: none; border: 0; color: rgba(255,255,255,.6); cursor: pointer; display: grid; place-items: center; padding: 2px; border-radius: 4px; }
.toast .toast-close:hover { color: #fff; }
.toast.leaving { opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }

.banner { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: var(--zs-radius); border: 1px solid; font-size: 13.5px; }
.banner .icon { margin-top: 1px; }
.banner .banner-body { flex: 1 1 auto; min-width: 0; }
.banner .banner-title { font-weight: 650; display: block; }
.banner ul { margin: 4px 0 0; padding-left: 18px; }
.banner-info { background: var(--zs-info-bg); border-color: var(--zs-info-line); color: var(--zs-info-ink); }
.banner-success { background: var(--zs-success-bg); border-color: var(--zs-success-line); color: var(--zs-success-ink); }
.banner-warning { background: var(--zs-warning-bg); border-color: var(--zs-warning-line); color: var(--zs-warning-ink); }
.banner-error { background: var(--zs-danger-bg); border-color: var(--zs-danger-line); color: var(--zs-danger-ink); }
.banner-neutral { background: var(--zs-surface-2); border-color: var(--zs-border); color: var(--zs-ink); }

/* -------------------------------------------------------------------------- */
/* Timelines and event lists                                                   */
/* -------------------------------------------------------------------------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 18px 32px; }
.timeline li::before { content: ""; position: absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: var(--zs-divider); }
.timeline li:last-child::before { display: none; }
.timeline .tl-dot { position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--zs-surface-3); color: var(--zs-muted); }
.timeline .tl-dot .icon { width: 12px; height: 12px; stroke-width: 2.4; }
.timeline .tl-dot.done { background: var(--zs-success); color: #fff; }
.timeline .tl-dot.current { background: var(--zs-primary); color: #fff; }
.timeline .tl-title { font-weight: 600; }
.timeline .tl-meta { font-size: 12.5px; color: var(--zs-muted); }

/* Routing steps (recipient status dialog) */
.route-step { border: 1px solid var(--zs-border); border-radius: var(--zs-radius-lg); overflow: hidden; margin-bottom: 14px; }
.route-step-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--zs-surface-2); border-bottom: 1px solid var(--zs-border); font-weight: 650; }
.route-step-head .spacer { flex: 1; }

/* -------------------------------------------------------------------------- */
/* Recipient card (set up envelope)                                           */
/* -------------------------------------------------------------------------- */
.recipient-card { --rc: var(--zs-link); display: flex; align-items: stretch; gap: 0; background: var(--zs-surface); border: 1px solid var(--zs-border); border-radius: var(--zs-radius-lg); box-shadow: var(--zs-shadow-sm); overflow: hidden; }
.recipient-card .rc-stripe { width: 5px; background: var(--rc); flex: none; }
.recipient-card .rc-body { flex: 1 1 auto; padding: 16px 16px 14px; min-width: 0; }
.recipient-card.dragging { opacity: .5; }
.recipient-card.drop-target { box-shadow: 0 -3px 0 0 var(--zs-link); }
.recipient-card.locked { background: var(--zs-surface-2); }
.recipient-card.has-error { border-color: var(--zs-danger-line); }
.rc-order { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 4px; }
.drag-handle { cursor: grab; color: var(--zs-faint); display: grid; place-items: center; padding: 2px; border-radius: 4px; }
.drag-handle:hover { color: var(--zs-muted); background: var(--zs-surface-3); }
.rc-extra { margin-top: 12px; padding: 12px; border-radius: var(--zs-radius); background: var(--zs-surface-2); border: 1px solid var(--zs-divider); }

/* -------------------------------------------------------------------------- */
/* Signer bottom bar (signer.html) and signer header                           */
/* -------------------------------------------------------------------------- */
.signer-header { position: sticky; top: 0; z-index: 40; height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--zs-primary); color: #fff; }
.signer-header .signer-doc { min-width: 0; }
.signer-header .signer-doc strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.signer-header .signer-doc span { display: block; font-size: 12px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.signer-header .btn { border-color: rgba(255,255,255,.45); background: transparent; color: #fff; }
.signer-header .btn:hover { background: rgba(255,255,255,.1); }
.signer-header .btn-accent { background: var(--zs-accent); border-color: var(--zs-accent); }
.signer-header .btn-accent:hover { background: var(--zs-accent-hover); }
.signer-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
  min-height: 60px; padding: 10px 16px;
  background: var(--zs-primary); color: #fff;
  box-shadow: 0 -4px 16px rgba(16, 32, 46, .18);
  font-weight: 600; font-size: 14px;
}
.signer-bar .signer-bar-saved { position: absolute; left: 16px; font-size: 12.5px; font-weight: 500; opacity: .8; display: inline-flex; align-items: center; gap: 6px; }
.signer-bar .btn { background: #fff; color: var(--zs-primary); border-color: #fff; }
.signer-bar .btn:hover { background: #e9f0f5; }
.signer-bar .btn-accent { background: var(--zs-accent); color: #fff; border-color: var(--zs-accent); }
.signer-bar .btn-accent:hover { background: var(--zs-accent-hover); }
.signer-bar.is-error { background: #a3201a; }
.signer-bar.is-done { background: #14532d; }
.signer-bar .progress { width: 140px; background: rgba(255,255,255,.25); }
.signer-bar .progress > span { background: #fff; }

/* -------------------------------------------------------------------------- */
/* E-mail preview (send page, signer-email.html)                              */
/* -------------------------------------------------------------------------- */
.email-frame { background: #eef1f4; border: 1px solid var(--zs-border); border-radius: var(--zs-radius-lg); overflow: hidden; }
.email-headers { background: var(--zs-surface); padding: 12px 16px; font-size: 12.5px; border-bottom: 1px solid var(--zs-border); display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 3px 8px; }
.email-headers dt { color: var(--zs-muted); }
.email-headers dd { margin: 0; overflow-wrap: anywhere; }
.email-body { max-width: 560px; margin: 18px auto; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: var(--zs-shadow-sm); font-size: 13.5px; }
.email-logo { padding: 18px 24px; display: flex; align-items: center; gap: 10px; font-weight: 750; border-bottom: 1px solid var(--zs-divider); }
.email-hero { background: var(--zs-primary); color: #fff; text-align: center; padding: 28px 24px; }
.email-hero .icon { margin: 0 auto 10px; width: 36px; height: 36px; stroke-width: 1.5; opacity: .9; }
.email-hero p { font-size: 16px; font-weight: 600; margin: 0 0 16px; }
.email-hero .btn { background: var(--zs-accent); border-color: var(--zs-accent); color: #fff; height: 40px; padding: 0 22px; }
.email-content { padding: 20px 24px; }
.email-content blockquote { margin: 12px 0; padding: 10px 14px; border-left: 3px solid var(--zs-border-strong); background: var(--zs-surface-2); color: var(--zs-ink); white-space: pre-wrap; }
.email-notice { padding: 14px 24px; border-top: 1px solid var(--zs-divider); font-size: 12px; color: var(--zs-muted); }
.email-notice strong { color: var(--zs-ink); display: block; margin-bottom: 2px; }
.email-footer { text-align: center; font-size: 11.5px; color: var(--zs-muted); padding: 0 24px 18px; }

/* Phone frame used by previews */
.phone-frame { width: 300px; max-width: 100%; margin: 0 auto; border: 10px solid #1b2530; border-radius: 34px; overflow: hidden; background: #fff; box-shadow: var(--zs-shadow-lg); }

/* -------------------------------------------------------------------------- */
/* Misc                                                                        */
/* -------------------------------------------------------------------------- */
.kbd { font-family: var(--zs-mono); font-size: 11.5px; padding: 1px 5px; border: 1px solid var(--zs-border-strong); border-bottom-width: 2px; border-radius: 4px; background: var(--zs-surface); }
.copy-inline { display: inline-flex; align-items: center; gap: 6px; }
.copy-btn { border: 0; background: none; color: var(--zs-muted); cursor: pointer; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 4px; }
.copy-btn:hover { background: var(--zs-surface-3); color: var(--zs-ink); }
.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list .ok { color: var(--zs-success); }
.check-list .warn { color: var(--zs-warning); }
.check-list .bad { color: var(--zs-danger); }
.skeleton { background: linear-gradient(90deg, #eef0f2, #f7f8f9, #eef0f2); background-size: 200% 100%; animation: zs-shimmer 1.2s infinite; border-radius: 4px; }
@keyframes zs-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
[data-tip] { position: relative; }
[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: #1a2124; color: #fff; padding: 5px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; white-space: nowrap; z-index: 150; pointer-events: none; }
.divider-v { width: 1px; align-self: stretch; background: var(--zs-border); }
.demo-ribbon { position: fixed; right: 12px; bottom: 12px; z-index: 90; font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--zs-muted); background: var(--zs-surface); border: 1px solid var(--zs-border); border-radius: 12px; padding: 3px 9px; box-shadow: var(--zs-shadow-sm); }
.demo-ribbon a { color: inherit; }

/* -------------------------------------------------------------------------- */
/* Shared pieces added in the integration pass                                 */
/* -------------------------------------------------------------------------- */
.radio .check-desc { display: block; font-size: 12px; color: var(--zs-muted); }
.table-scroll { position: relative; }
/* Code or data sample (API bodies, CSV headers, webhook payloads) */
.code { display: block; font-family: var(--zs-mono); font-size: 12px; line-height: 1.55; background: #0f1d2a; color: #d6e4f0; border-radius: 8px; padding: 12px 14px; white-space: pre; overflow-x: auto; margin: 0; max-width: 100%; }
/* A page with room for the margin flag: the flag sits in the wrapper, outside the page's clipped box */
.doc-page-wrap { position: relative; width: 100%; max-width: 816px; }
.doc-page-wrap > .doc-page { max-width: none; }
.doc-page-wrap > .flag { top: 0; transition: top .25s ease; }
/* Printed form parts on a page (captions, blank lines, tick boxes, attachment boxes) */
.doc-form-title { position: absolute; font-family: var(--zs-font); font-size: 1.2cqw; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #333; }
.doc-form-cap { position: absolute; display: flex; align-items: flex-end; padding-bottom: .5cqw; font-size: 1.45cqw; line-height: 1.2; color: #222; white-space: nowrap; overflow: hidden; }
.doc-form-cap.after { align-items: center; padding-bottom: 0; white-space: normal; }
.doc-form-cap.top { align-items: flex-start; padding-top: .3cqw; white-space: normal; }
.doc-form-line { position: absolute; border-bottom: 1px solid #333; }
.doc-form-check { position: absolute; border: 1px solid #333; background: #fff; }
.doc-form-digit { position: absolute; border: 1px solid #333; border-top-color: #999; background: #fff; }
.doc-form-box { position: absolute; border: 1px dashed #8a939c; border-radius: 2px; }
/* A value printed into a signed page (ZS.flatPageHTML) */
.fl-v { position: absolute; display: flex; align-items: center; font-family: var(--zs-font); font-size: 1.5cqw; font-weight: 500; color: #111; white-space: nowrap; overflow: hidden; padding: 0 .3cqw; }
.fl-v.check { justify-content: center; border: 1px solid #333; padding: 0; background: #fff; }
.fl-v.check .icon { width: 1.8cqw; height: 1.8cqw; stroke-width: 3; }
.fl-v .icon { width: 1.6cqw; height: 1.6cqw; }
.fl-v .sig-frame img { display: block; height: 3.2cqw; max-width: 22cqw; object-fit: contain; }
/* A filled field that keeps its recipient's colour (prefilled preview, H6) */
.field-box.filled.keep-color { border-color: var(--rc); background: color-mix(in srgb, var(--rc) 9%, #fff); color: #111; }
/* Menu items with an initials circle or a colour dot instead of an icon */
.menu-item .avatar { flex: none; }
.menu-swatch { width: 12px; height: 12px; border-radius: 50%; flex: none; margin: 3px 3px 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }

/* Print: history and certificate pages */
@media print {
  .topbar, .rail, .toast-region, .no-print, .demo-ribbon, .dialog-footer, .flowbar { display: none !important; }
  body { background: #fff; }
  .app { display: block; }
  .main { padding: 0; }
  .dialog-backdrop { position: static; background: none; padding: 0; display: block; }
  .dialog { box-shadow: none; max-height: none; width: auto; height: auto; }
  .dialog-body { overflow: visible; }
  body.printing-dialog > *:not(.dialog-backdrop) { display: none !important; }
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                  */
/* -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .topnav a { padding: 0 9px; }
  .topbar-search { flex-basis: 220px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "main"; }
  .topbar-menu-btn { display: inline-grid; }
  .rail { position: fixed; top: 0; left: 0; bottom: 0; height: 100vh; z-index: 110; width: 280px; transform: translateX(-105%); transition: transform .2s; box-shadow: var(--zs-shadow-lg); }
  body.rail-open .rail { transform: none; }
  body.rail-open .rail-backdrop { display: block; position: fixed; inset: 0; z-index: 105; background: var(--zs-overlay); }
  .topnav { display: none; }
  .main, .app.no-rail .main { padding: 20px 20px 40px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hide-md { display: none !important; }
}
@media (max-width: 640px) {
  :root { --zs-topbar-h: 52px; }
  .main, .app.no-rail .main { padding: 16px 16px 32px; }
  h1 { font-size: 19px; }
  .topbar { gap: 8px; padding: 0 8px; }
  .topbar-search { display: none; }
  .topbar-workspace { display: none; }
  .brand small { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .hide-sm { display: none !important; }
  .page-header { flex-direction: column; align-items: stretch; }
  .page-actions .btn { flex: 1 1 auto; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dd { margin-bottom: 10px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .dialog-backdrop { padding: 0; align-items: flex-end; }
  .dialog, .dialog-full { max-width: none; width: 100%; height: auto; max-height: 92vh; border-radius: 14px 14px 0 0; }
  .dialog-footer { border-radius: 0; }
  .dialog-footer .btn { flex: 1 1 auto; }
  .drawer { width: 100vw; }
  .toast-region { left: 12px; right: 12px; bottom: 12px; }
  .toast { min-width: 0; max-width: none; }
  .flowbar { grid-template-columns: minmax(0, 1fr) auto; }
  .flowbar .stepper { display: none; }
  .stepper-line { width: 16px; margin: 0 6px; }
  /* Tables stack into cards */
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { padding: 12px 14px; border-bottom: 1px solid var(--zs-divider); position: relative; }
  .table-stack td { border: 0; padding: 3px 0; }
  .table-stack td[data-label]::before { content: attr(data-label); display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--zs-muted); margin-top: 4px; }
  .table-stack .col-check { position: absolute; right: 8px; top: 12px; width: auto; }
  .table-stack .col-actions { text-align: left; width: auto; padding-top: 8px; }
  .signer-bar { gap: 10px; font-size: 13px; }
  .signer-bar .signer-bar-saved { position: static; width: 100%; justify-content: center; }
  .flag { height: 26px; font-size: 12px; left: 0; transform: translateX(-60%); }
  .doc-page-wrap > .flag { left: 0; transform: none; border-radius: 0 4px 4px 0; height: 24px; font-size: 11.5px; padding: 0 6px; }
  .doc-page-wrap > .flag::after { border-width: 12px 0 12px 10px; right: -10px; }
}
/* Touch targets in the signer flow (signer-email, signer, signer-done carry body.touch-flow): on a phone every
   control outside the document page is at least 44 x 44 px. min-height / min-width win over the fixed heights
   the pages set; text links get a 44 px tall box without changing what they say. Fields on the page itself
   have their own 44 px hit areas (signer.html). */
@media (max-width: 640px) {
  body.touch-flow :is(button, select, summary, [role="button"], [role="checkbox"], [role="radio"], .btn, .menu-item, .tab, .icon-btn):not(.doc-page *):not(.btn-link) { min-height: 44px; min-width: 44px; }
  body.touch-flow :is(.input, .select, .textarea, select):not(.doc-page *) { min-height: 44px; font-size: 16px; }
  body.touch-flow :is(a[href]:not(.btn):not(.menu-item), .btn-link):not(.doc-page *) { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; vertical-align: middle; }
  body.touch-flow :is(label.check, label.radio):not(.doc-page *) { min-height: 44px; align-items: center; cursor: pointer; }
  body.touch-flow .dialog-header .icon-btn, body.touch-flow .dialog-close { width: 44px; height: 44px; }
}
.doc-thumb-lg .doc-thumb-stamp, .doc-card-preview .doc-thumb-stamp { font-size: 13px; }

/* ---- Prefill rules panel, report lists, API shapes (shared) ---------------------------------------- */
.rules-list { display: flex; flex-direction: column; gap: 6px; }
.rule-list { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.rule-list .chip { margin-right: 4px; }
.rule-row { border: 1px solid var(--zs-border); border-radius: var(--zs-radius); background: var(--zs-surface); }
.rule-row > summary { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; list-style: none; flex-wrap: wrap; }
.rule-row > summary::-webkit-details-marker { display: none; }
.rule-row[open] > summary { border-bottom: 1px solid var(--zs-divider); }
.rule-title { flex: 1; min-width: 180px; font-weight: 600; font-size: 13px; }
.rule-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.rule-code { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; max-height: 260px; overflow: auto; }
.ignored-list { display: flex; flex-direction: column; gap: 4px; }
.ignored-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--zs-divider); }
.ignored-row .text-xs { flex: 1; min-width: 160px; }
.link-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--zs-border); border-radius: var(--zs-radius); }
.api-shapes pre.code { margin: 0; font-size: 11.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
