/* ==========================================================================
   Jigx Mobile Wireframes v2 — component CSS
   Source of truth: Jigx docs (docs.jigx.com/examples/readme/components) +
   reference-screens/custom-garage-quote/*.png and reference-screens/time-*.png
   Maps 1:1 to Jigx primitives: jig-header, card (isContained, isCompact),
   list-item, field-row, section, group, form fields, primary/secondary/
   tertiary button, open-scanner, signature, location, widgets, jig.tabs.
   ========================================================================== */

:root {
  /* Jigx palette (calibrated from real Jigx-Acumatica screens) */
  --jg-bg: #eef2f6;
  --jg-surface: #ffffff;
  --jg-surface-muted: #f4f6f9;
  --jg-field-bg: #e6ebf0;
  --jg-hairline: #e2e8f0;

  --jg-text: #0f172a;
  --jg-text-muted: #64748b;
  --jg-text-dim: #94a3b8;
  --jg-section: #94a3b8;

  --jg-primary: #3ca7c9;          /* Jigx teal/cyan (primary button) */
  --jg-primary-dark: #2b9cb8;
  --jg-primary-soft: #cfeaf3;
  --jg-accent: #06b6d4;            /* Cyan accent used in list icons */
  --jg-accent-blue: #2563eb;

  --jg-success: #22c55e;
  --jg-success-soft: #dcfce7;
  --jg-warn: #f59e0b;
  --jg-warn-soft: #fef3c7;
  --jg-danger: #ef4444;
  --jg-danger-soft: #fee2e2;

  --jg-pill-blue-bg: #dbeafe;
  --jg-pill-blue-fg: #1d4ed8;

  --jg-radius-card: 16px;
  --jg-radius-field: 12px;
  --jg-radius-pill: 999px;

  --jg-shadow-card: 0 1px 2px rgba(15,23,42,.04), 0 2px 6px rgba(15,23,42,.04);
  --jg-shadow-float: 0 8px 22px rgba(15,23,42,.12);

  --jg-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'SF Pro Text', sans-serif;
}

/* ---------- page / gallery scaffold ---------- */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--jg-font);
  background: #f8fafc;
  color: var(--jg-text);
  -webkit-font-smoothing: antialiased;
}
.wf-v2-page {
  padding: 32px 24px 80px;
  max-width: 1280px;
  margin: 0 auto;
}
.wf-v2-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.wf-v2-head h1 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.wf-v2-head p {
  margin: 0;
  font-size: 14px;
  color: var(--jg-text-muted);
  max-width: 780px;
  line-height: 1.5;
}
.wf-v2-back {
  font-size: 13px;
  font-weight: 600;
  color: var(--jg-accent-blue);
  text-decoration: none;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid var(--jg-hairline);
  border-radius: 999px;
  white-space: nowrap;
}
.wf-v2-grid {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(340px, 1fr);
  gap: 36px;
  align-items: start;
}
@media (max-width: 1100px) {
  .wf-v2-grid { grid-template-columns: 1fr; }
}
.wf-v2-notes {
  background: #fff;
  border: 1px solid var(--jg-hairline);
  border-radius: 14px;
  padding: 20px 22px;
  font-size: 14px;
  line-height: 1.6;
  color: #334155;
  min-width: 0;
}
.wf-v2-notes h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--jg-text-muted);
  margin: 0 0 8px;
}
.wf-v2-notes h2 + p { margin-top: 0; }
.wf-v2-notes h3 {
  margin: 18px 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--jg-text);
}
.wf-v2-notes p { margin: 0 0 10px; }
.wf-v2-notes ul { margin: 0 0 12px; padding-left: 18px; }
.wf-v2-notes li { margin-bottom: 4px; }
.wf-v2-notes code {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 12px;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  color: #0f172a;
}
.wf-v2-voice {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  padding: 8px 12px;
  margin: 6px 0;
  font-size: 13px;
  color: #075985;
}
.wf-v2-voice-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0ea5e9;
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
}

/* ---------- device frame ---------- */
.jg-device {
  width: 340px;
  height: 736px;
  background: #0f172a;
  border-radius: 42px;
  padding: 10px;
  box-shadow: 0 30px 60px rgba(15,23,42,.25), 0 10px 24px rgba(15,23,42,.18);
  flex-shrink: 0;
}
.jg-device-screen { border-radius: 34px; }
.jg-device-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 38px;
  overflow: hidden;
  background: var(--jg-bg);
  display: flex;
  flex-direction: column;
}
.jg-row-devices {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: center;
}

/* ---------- iOS status bar + dynamic island ---------- */
.jg-status {
  height: 48px;
  background: var(--jg-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  font-size: 15px;
  font-weight: 600;
  color: var(--jg-text);
  position: relative;
  z-index: 5;
  flex-shrink: 0;
}
.jg-status .jg-island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 30px;
  background: #0f172a;
  border-radius: 999px;
}
.jg-status .jg-indicators {
  display: flex;
  align-items: center;
  gap: 5px;
}
.jg-signal {
  width: 18px; height: 11px;
  background: linear-gradient(to right, #0f172a 0 3px, transparent 3px 5px, #0f172a 5px 8px, transparent 8px 10px, #0f172a 10px 13px, transparent 13px 15px, #0f172a 15px 18px);
}
.jg-wifi {
  width: 16px; height: 11px;
  background: radial-gradient(circle at 50% 100%, #0f172a 0 2px, transparent 2px 4px, #0f172a 4px 6px, transparent 6px 8px, #0f172a 8px 10px);
}
.jg-battery {
  width: 26px; height: 12px;
  border: 1.5px solid #0f172a;
  border-radius: 3px;
  position: relative;
  padding: 1px;
}
.jg-battery::after {
  content: '';
  position: absolute;
  right: -3px; top: 3px;
  width: 2px; height: 4px;
  background: #0f172a;
  border-radius: 0 2px 2px 0;
}
.jg-battery-fill {
  width: 72%;
  height: 100%;
  background: #0f172a;
  border-radius: 1px;
}

/* ---------- app nav / jig-header ---------- */
.jg-appbar {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 8px 12px 14px;
  background: var(--jg-bg);
  flex-shrink: 0;
  z-index: 4;
}
.jg-appbar.over-hero {
  position: absolute;
  top: 48px; left: 0; right: 0;
  background: transparent;
  z-index: 10;
}
.jg-appbar .jg-back,
.jg-appbar .jg-nav-action {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--jg-accent-blue);
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(15,23,42,.06);
}
.jg-appbar .jg-back.flat,
.jg-appbar .jg-nav-action.flat {
  background: transparent;
  box-shadow: none;
}
.jg-appbar .jg-title {
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--jg-text);
  letter-spacing: -0.01em;
}
.jg-appbar .jg-title small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--jg-text-muted);
  letter-spacing: 0;
  margin-top: 1px;
}
.jg-appbar-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.95);
  color: var(--jg-primary);
  font-size: 12px;
  font-weight: 600;
  justify-self: end;
  box-shadow: 0 1px 2px rgba(15,23,42,.06);
}

/* ---------- scrolling content area ---------- */
.jg-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0 16px 120px;
  scrollbar-width: none;
  position: relative;
}
.jg-scroll::-webkit-scrollbar { display: none; }

.jg-page-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--jg-text);
  margin: 4px 0 14px;
}
.jg-page-title small {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--jg-text-muted);
  letter-spacing: 0;
  margin-top: 2px;
}
.jg-page-date {
  font-size: 18px;
  font-weight: 700;
  color: var(--jg-text);
  margin: -4px 0 14px;
}

/* ---------- jig-header hero image ---------- */
.jg-hero {
  position: relative;
  height: 170px;
  margin: -8px -16px 14px;
  overflow: hidden;
}
.jg-hero img,
.jg-hero .jg-hero-art {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.jg-hero-art.hvac {
  background:
    radial-gradient(circle at 30% 40%, rgba(255,255,255,.3) 0 60px, transparent 60px),
    linear-gradient(135deg, #cbd5e1 0%, #94a3b8 50%, #64748b 100%);
}
.jg-hero-art.tools {
  background:
    repeating-linear-gradient(62deg, rgba(0,0,0,.04) 0 4px, transparent 4px 8px),
    linear-gradient(135deg, #e7e2d6 0%, #d4cdb9 50%, #bdb19a 100%);
}
.jg-hero-art.house {
  background:
    linear-gradient(180deg, #dbeafe 0 40%, #a7d8a3 40% 100%),
    radial-gradient(circle at 60% 30%, #fde68a 0 30px, transparent 30px);
}
.jg-hero-art.map-tile {
  background:
    linear-gradient(90deg, transparent 0 49%, rgba(255,255,255,.55) 49% 51%, transparent 51%),
    linear-gradient(0deg, transparent 0 47%, rgba(255,255,255,.55) 47% 49%, transparent 49%),
    linear-gradient(125deg, #dcdccf 0%, #eae6d8 45%, #d4d7c6 100%);
}
.jg-hero-art.warehouse {
  background:
    repeating-linear-gradient(90deg, #475569 0 2px, transparent 2px 24px),
    linear-gradient(180deg, #cbd5e1 0 50%, #94a3b8 50% 100%);
}
.jg-hero-art.receipt {
  background:
    repeating-linear-gradient(0deg, #f8fafc 0 14px, #f1f5f9 14px 16px),
    linear-gradient(180deg, #fef3c7 0%, #fcd34d 100%);
}
.jg-hero-art.camera {
  background:
    radial-gradient(circle at 50% 45%, rgba(255,255,255,.08) 0 36%, transparent 36%),
    linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}
.jg-scan-frame {
  position: absolute;
  inset: 24px 28px;
  pointer-events: none;
  z-index: 2;
}
.jg-scan-c {
  position: absolute;
  width: 22px; height: 22px;
  border: 3px solid #22d3ee;
  box-shadow: 0 0 12px rgba(34,211,238,.55);
}
.jg-scan-c.tl { top: 0; left: 0; border-right: none; border-bottom: none; border-top-left-radius: 6px; }
.jg-scan-c.tr { top: 0; right: 0; border-left: none; border-bottom: none; border-top-right-radius: 6px; }
.jg-scan-c.bl { bottom: 0; left: 0; border-right: none; border-top: none; border-bottom-left-radius: 6px; }
.jg-scan-c.br { bottom: 0; right: 0; border-left: none; border-top: none; border-bottom-right-radius: 6px; }
.jg-scan-label {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  background: rgba(15,23,42,.82);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 7px 13px;
  border-radius: 999px;
  white-space: nowrap;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.jg-scan-label .jg-dot-pulse {
  width: 6px; height: 6px; border-radius: 999px; background: #22d3ee;
  box-shadow: 0 0 0 0 rgba(34,211,238,.6);
}
.jg-hero-art.signature {
  background:
    radial-gradient(circle at 30% 60%, rgba(59,130,246,.15) 0 40px, transparent 40px),
    linear-gradient(180deg, #dbeafe 0%, #e0f2fe 100%);
}
.jg-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(238,242,246,0) 60%, var(--jg-bg) 100%);
}

/* ---------- section header (small uppercase) ---------- */
.jg-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--jg-section);
  margin: 18px 0 8px;
  padding: 0 4px;
}

/* ---------- card (component.card) ---------- */
.jg-card {
  background: var(--jg-surface);
  border-radius: var(--jg-radius-card);
  box-shadow: var(--jg-shadow-card);
  overflow: hidden;
}
.jg-card + .jg-card { margin-top: 10px; }
.jg-card.flat { box-shadow: none; border: 1px solid var(--jg-hairline); }
.jg-card-header {
  padding: 14px 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.jg-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--jg-text);
}
.jg-card-sub {
  font-size: 12px;
  color: var(--jg-text-muted);
  margin-top: 2px;
}
.jg-card-body { padding: 14px 16px 16px; }
.jg-card-body.tight { padding: 10px 16px; }
.jg-card-header + .jg-card-body { padding-top: 0; }

/* ---------- form field (field + field-row + section) ---------- */
.jg-field {
  background: var(--jg-field-bg);
  border-radius: var(--jg-radius-field);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 56px;
  margin-bottom: 8px;
}
.jg-field:last-child { margin-bottom: 0; }
.jg-field-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.jg-field-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--jg-text-muted);
}
.jg-field-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--jg-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jg-field-value.placeholder { color: var(--jg-text-dim); font-weight: 400; }
.jg-field-value.mono { font-variant-numeric: tabular-nums; }
.jg-field-icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--jg-text-muted);
  font-size: 16px;
}
.jg-field.focused {
  background: #d8ecf2;
  outline: 2px solid var(--jg-primary);
  outline-offset: -2px;
}
.jg-field.selected {
  background: #dfeef6;
}
.jg-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.jg-field-row.three { grid-template-columns: 1fr 1fr 1fr; }
.jg-field-row:last-child { margin-bottom: 0; }
.jg-field-row > .jg-field { margin-bottom: 0; }

.jg-form-section {
  margin-bottom: 12px;
}

/* segmented choice — the "Billable" tick pattern */
.jg-choice {
  background: #dfeef6;
  border: 1px solid transparent;
  border-radius: var(--jg-radius-field);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--jg-text);
}
.jg-choice-check {
  width: 26px; height: 26px;
  border-radius: 999px;
  background: var(--jg-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}
.jg-choice-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.jg-choice-pill {
  background: var(--jg-field-bg);
  border-radius: var(--jg-radius-field);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 500;
}
.jg-choice-pill.active {
  background: #dfeef6;
  box-shadow: inset 0 0 0 1.5px rgba(60,167,201,.3);
}
.jg-choice-pill .jg-radio {
  width: 20px; height: 20px;
  border-radius: 999px;
  border: 1.5px solid #94a3b8;
}
.jg-choice-pill.active .jg-radio {
  background: var(--jg-primary);
  border-color: var(--jg-primary);
  position: relative;
}
.jg-choice-pill.active .jg-radio::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 999px;
  background: #fff;
}

/* ---------- list-item ---------- */
.jg-list {
  background: var(--jg-surface);
  border-radius: var(--jg-radius-card);
  box-shadow: var(--jg-shadow-card);
  overflow: hidden;
}
.jg-list + .jg-list { margin-top: 10px; }
.jg-listitem {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--jg-surface-muted);
  min-height: 68px;
}
.jg-listitem:last-child { border-bottom: 0; }
.jg-listitem.disabled {
  opacity: 0.55;
}
.jg-listitem.disabled .jg-listitem-title { color: var(--jg-text-muted); }

/* ---------- callout (inline informational card) ---------- */
.jg-callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 10px 0 2px;
}
.jg-callout-ico {
  width: 32px; height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e0f2fe;
  color: #0369a1;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
}
.jg-callout-body { flex: 1; min-width: 0; }
.jg-callout-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
  line-height: 1.3;
}
.jg-callout-sub {
  font-size: 12px;
  color: #475569;
  line-height: 1.5;
}
.jg-callout .jg-chev { align-self: center; color: var(--jg-text-muted); }
.jg-listitem-avatar {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: #e0f2fe;
  color: var(--jg-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}
.jg-listitem-avatar.round { border-radius: 999px; }
.jg-listitem-avatar.warn { background: var(--jg-warn-soft); color: #b45309; }
.jg-listitem-avatar.success { background: var(--jg-success-soft); color: #166534; }
.jg-listitem-avatar.danger { background: var(--jg-danger-soft); color: #b91c1c; }
.jg-listitem-avatar.muted { background: #f1f5f9; color: #64748b; }
.jg-listitem-avatar.primary { background: #cfeaf3; color: var(--jg-primary-dark); }
.jg-listitem-avatar.photo {
  background-size: cover;
  background-position: center;
}
.jg-listitem-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.jg-listitem-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--jg-text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.jg-listitem-sub {
  font-size: 13px;
  color: var(--jg-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jg-listitem-desc {
  font-size: 12px;
  color: var(--jg-text-dim);
  margin-top: 2px;
}
.jg-listitem-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--jg-text-muted);
}
.jg-listitem-right .jg-chev { color: #cbd5e1; font-size: 18px; }
.jg-listitem.tight { min-height: 56px; padding: 10px 16px; }

/* ---------- pill / chip ---------- */
.jg-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--jg-radius-pill);
  background: var(--jg-pill-blue-bg);
  color: var(--jg-pill-blue-fg);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}
.jg-pill.green { background: var(--jg-success); color: #fff; }
.jg-pill.amber { background: var(--jg-warn-soft); color: #92400e; }
.jg-pill.red   { background: var(--jg-danger-soft); color: #b91c1c; }
.jg-pill.gray  { background: #e2e8f0; color: #475569; }
.jg-pill.outline { background: transparent; border: 1px solid #cbd5e1; color: #475569; }
.jg-pill.dot::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 999px;
  background: currentColor;
  flex-shrink: 0;
}

.jg-pillrow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

/* ---------- button (component.button primary/secondary/tertiary) ---------- */
.jg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 24px;
  border-radius: var(--jg-radius-pill);
  font-size: 16px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.jg-btn.primary {
  background: var(--jg-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(60,167,201,.35);
}
.jg-btn.primary.soft {
  background: var(--jg-primary-soft);
  color: var(--jg-primary-dark);
  box-shadow: none;
}
.jg-btn.secondary {
  background: #e5f0f5;
  color: var(--jg-primary-dark);
}
.jg-btn.tertiary {
  background: transparent;
  color: var(--jg-primary-dark);
  font-weight: 600;
}
.jg-btn.danger {
  background: var(--jg-danger);
  color: #fff;
  box-shadow: 0 4px 14px rgba(239,68,68,.35);
}
.jg-btn.block { width: 100%; }
.jg-btn.compact {
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
  border-radius: 10px;
}
/* Icon-only button (no label, just an emoji/glyph) — renders as a square pill */
.jg-btn.icon {
  width: 50px;
  padding: 0;
  flex-shrink: 0;
}
.jg-btn.compact.icon { width: 36px; height: 36px; }

/* ---------- floating primary action (dock) ---------- */
.jg-dock {
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  padding: 14px 14px 20px;
  background: var(--jg-bg);
  border-top: 1px solid var(--jg-hairline);
  box-shadow: 0 -8px 14px -10px rgba(15,23,42,.06);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 6;
}
.jg-dock .jg-btn.block { flex: 1; }
.jg-dock.with-tabbar { bottom: 84px; padding-bottom: 14px; }
/* Give scroll area room so content doesn't hide behind the dock */
.jg-scroll { padding-bottom: 92px; }

.jg-home-dock {
  position: absolute;
  bottom: 24px;
  right: 18px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--jg-shadow-float);
  z-index: 7;
  color: var(--jg-text);
  font-size: 22px;
}
.jg-home-dock.with-tabbar { bottom: 96px; }

/* ---------- bottom tab bar (jig.tabs navigation) ---------- */
.jg-tabbar {
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  height: 78px;
  background: #fff;
  border-top: 1px solid var(--jg-hairline);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
  padding-bottom: 14px;
  z-index: 5;
}
.jg-tabbar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding-top: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
}
.jg-tabbar-item .jg-tab-ico {
  width: 26px; height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.jg-tabbar-item.active { color: var(--jg-primary); }

/* ---------- in-screen jig.tabs segmented ---------- */
.jg-segtabs {
  display: flex;
  background: #e2e8f0;
  border-radius: 10px;
  padding: 3px;
  margin: 0 0 14px;
}
.jg-segtab {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  border-radius: 8px;
}
.jg-segtab.active {
  background: #fff;
  color: var(--jg-text);
  box-shadow: 0 1px 2px rgba(15,23,42,.08);
}
.jg-segtab-count {
  display: inline-block;
  min-width: 18px;
  padding: 0 6px;
  margin-left: 4px;
  background: #cbd5e1;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: #475569;
  line-height: 16px;
  vertical-align: middle;
}
.jg-segtab.active .jg-segtab-count {
  background: var(--jg-primary);
  color: #fff;
}

/* ---------- AI summary card ---------- */
.jg-ai-card {
  background: linear-gradient(135deg, #eef2ff 0%, #e0f2fe 100%);
  border: 1px solid #c7d2fe;
  border-radius: var(--jg-radius-card);
  padding: 14px 16px 16px;
  box-shadow: 0 8px 20px -12px rgba(79,70,229,.25);
  margin-bottom: 2px;
}
.jg-ai-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.jg-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  color: #4338ca;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(79,70,229,.15);
}
.jg-ai-meta {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}
.jg-ai-tldr {
  font-size: 14px;
  line-height: 1.55;
  color: var(--jg-text);
}
.jg-ai-tldr strong { color: #1e1b4b; }

/* ---------- timeline (AI key events) ---------- */
.jg-timeline {
  position: relative;
  padding-left: 10px;
}
.jg-timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: #e2e8f0;
}
.jg-tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 22px 44px 1fr;
  gap: 8px;
  padding: 8px 0;
  align-items: start;
}
.jg-tl-dot {
  width: 12px; height: 12px;
  background: #94a3b8;
  border-radius: 999px;
  border: 3px solid var(--jg-bg);
  margin-top: 3px;
  box-shadow: 0 0 0 1px #cbd5e1;
}
.jg-tl-dot.warn { background: #f59e0b; box-shadow: 0 0 0 1px #fbbf24; }
.jg-tl-dot.good { background: #22c55e; box-shadow: 0 0 0 1px #86efac; }
.jg-tl-time {
  font-size: 12px;
  font-weight: 700;
  color: var(--jg-text-muted);
  padding-top: 2px;
  font-variant-numeric: tabular-nums;
}
.jg-tl-body {
  font-size: 13px;
  line-height: 1.45;
  color: var(--jg-text);
}

/* ---------- people gallery ---------- */
.jg-people-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.jg-person {
  background: var(--jg-card-bg);
  border-radius: var(--jg-radius-card);
  padding: 12px 8px;
  text-align: center;
  box-shadow: var(--jg-shadow-card);
}
.jg-person-avatar {
  width: 40px; height: 40px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e0f2fe, #0ea5e9);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
}
.jg-person-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--jg-text);
}
.jg-person-role {
  font-size: 11px;
  color: var(--jg-text-muted);
  margin-top: 1px;
}

/* ---------- search + filter chips ---------- */
.jg-search {
  background: var(--jg-field-bg);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin-bottom: 10px;
}
.jg-search-input {
  font-size: 15px;
  color: var(--jg-text-dim);
  flex: 1;
}
.jg-chiprow {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 10px;
  scrollbar-width: none;
}
.jg-chiprow::-webkit-scrollbar { display: none; }
.jg-chip {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--jg-hairline);
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}
.jg-chip.active {
  background: var(--jg-primary);
  border-color: var(--jg-primary);
  color: #fff;
}

/* ---------- day / date strip ---------- */
.jg-daystrip {
  background: #fff;
  border-radius: var(--jg-radius-card);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--jg-shadow-card);
  margin-bottom: 10px;
}
.jg-daystrip-nav {
  width: 32px; height: 32px;
  border-radius: 999px;
  background: #cfeaf3;
  color: var(--jg-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.jg-daystrip-label {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
}
.jg-daystrip-label small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--jg-text-muted);
  margin-top: 2px;
}
.jg-weekstrip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 12px;
}
.jg-weekstrip-day {
  text-align: center;
  padding: 8px 0;
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--jg-text-muted);
}
.jg-weekstrip-day small {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--jg-text-dim);
}
.jg-weekstrip-day.active {
  background: var(--jg-primary);
  color: #fff;
}
.jg-weekstrip-day.active small { color: rgba(255,255,255,.8); }
.jg-weekstrip-day.has-dot { position: relative; }
.jg-weekstrip-day.has-dot::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 3px;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 999px;
  background: var(--jg-primary);
}

/* ---------- timer card (big numeric display) ---------- */
.jg-timer {
  background: #fff;
  border-radius: var(--jg-radius-card);
  padding: 18px 20px;
  box-shadow: var(--jg-shadow-card);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.jg-timer-body { flex: 1; }
.jg-timer-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--jg-danger);
  margin-bottom: 2px;
}
.jg-timer-status.running { color: var(--jg-success); }
.jg-timer-status::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 999px;
  background: currentColor;
}
.jg-timer-value {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--jg-text);
  font-variant-numeric: tabular-nums;
}
.jg-timer-sub {
  font-size: 12px;
  color: var(--jg-text-muted);
  margin-top: 2px;
}
.jg-timer-action {
  width: 60px; height: 60px;
  border-radius: 999px;
  background: var(--jg-success);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 6px 14px rgba(34,197,94,.4);
}
.jg-timer-action.stop {
  background: var(--jg-danger);
  box-shadow: 0 6px 14px rgba(239,68,68,.4);
  border-radius: 16px;
}
.jg-timer-action.stop::after {
  content: '';
  width: 22px; height: 22px;
  background: #fff;
  border-radius: 4px;
}

/* total time rail (bottom of time clock) */
.jg-total-rail {
  background: #fff;
  border-radius: 18px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  box-shadow: var(--jg-shadow-float);
  margin: 14px 0 0;
}
.jg-total-rail .jg-ico-circle {
  width: 38px; height: 38px;
  border-radius: 999px;
  background: var(--jg-field-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--jg-text-muted);
}
.jg-total-rail .jg-total-label { font-size: 11px; color: var(--jg-text-muted); font-weight: 500; }
.jg-total-rail .jg-total-value { font-size: 16px; font-weight: 800; color: var(--jg-text); }

/* ---------- signature pad ---------- */
.jg-signature-pad {
  height: 180px;
  background: #fff;
  border: 1.5px dashed #cbd5e1;
  border-radius: var(--jg-radius-card);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: var(--jg-text-dim);
  font-size: 13px;
  padding-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.jg-signature-pad.signed {
  border-style: solid;
  border-color: var(--jg-primary);
}
.jg-signature-pad .jg-sig-line {
  position: absolute;
  left: 14px; right: 14px;
  bottom: 34px;
  height: 1px;
  background: #e2e8f0;
}
.jg-signature-pad .jg-sig-ink {
  position: absolute;
  left: 36px; bottom: 46px;
  width: 150px; height: 40px;
  background:
    radial-gradient(ellipse at 20% 80%, var(--jg-primary-dark) 0 2px, transparent 3px),
    radial-gradient(ellipse at 50% 50%, var(--jg-primary-dark) 0 2px, transparent 3px);
  filter: blur(.3px);
  font-family: 'Brush Script MT', cursive;
  font-size: 26px;
  color: var(--jg-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- photo grid / evidence ---------- */
.jg-photogrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.jg-photo {
  aspect-ratio: 1/1;
  border-radius: 12px;
  background: #e2e8f0;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #94a3b8;
}
.jg-photo.before { background: linear-gradient(135deg, #cbd5e1, #94a3b8); }
.jg-photo.after  { background: linear-gradient(135deg, #bbf7d0, #4ade80); }
.jg-photo.missing {
  background: #f1f5f9;
  border: 1.5px dashed #cbd5e1;
  color: var(--jg-primary);
  font-size: 26px;
  font-weight: 700;
}
.jg-photo .jg-photo-label {
  position: absolute;
  left: 6px; bottom: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15,23,42,.7);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
}
.jg-photo.video::after {
  content: '▶';
  position: absolute;
  width: 32px; height: 32px;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  color: var(--jg-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* ---------- map location card ---------- */
.jg-map {
  height: 180px;
  margin: 0 -16px 14px;
  position: relative;
  background:
    linear-gradient(90deg, transparent 0 49%, rgba(255,255,255,.55) 49% 51%, transparent 51%),
    linear-gradient(0deg, transparent 0 47%, rgba(255,255,255,.55) 47% 49%, transparent 49%),
    linear-gradient(120deg, #dad6c8 0%, #eae6d8 40%, #c9d1be 100%);
  overflow: hidden;
}
.jg-map-route {
  position: absolute;
  left: 10%; right: 8%;
  top: 50%;
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--jg-primary) 0 6px, transparent 6px 10px);
  transform: rotate(-4deg);
  transform-origin: left center;
}
.jg-pin {
  position: absolute;
  width: 34px; height: 34px;
  border-radius: 999px;
  background: var(--jg-primary);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(15,23,42,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}
.jg-pin.start { background: var(--jg-success); }
.jg-pin.end   { background: var(--jg-danger); }

/* ---------- voice capture affordance ---------- */
.jg-voice-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--jg-surface);
  border-radius: var(--jg-radius-card);
  box-shadow: var(--jg-shadow-card);
  margin-bottom: 10px;
}
.jg-voice-mic {
  width: 40px; height: 40px;
  border-radius: 999px;
  background: var(--jg-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.jg-voice-hint {
  font-size: 13px;
  color: var(--jg-text-muted);
  flex: 1;
}

/* ---------- progress ---------- */
.jg-progress {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}
.jg-progress-bar {
  height: 100%;
  background: var(--jg-primary);
  border-radius: 999px;
}

/* ---------- checkbox circle ---------- */
.jg-check {
  width: 24px; height: 24px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.jg-check.done { background: var(--jg-success); }
.jg-check.pending { background: transparent; border: 1.5px solid #cbd5e1; color: transparent; }
.jg-check.required { background: var(--jg-warn); }

/* ---------- message thread (notes escalation) ---------- */
.jg-msg {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.jg-msg-avatar {
  width: 34px; height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, #cfeaf3, #3ca7c9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}
.jg-msg-body {
  background: #fff;
  border-radius: 14px;
  padding: 10px 14px;
  flex: 1;
  box-shadow: var(--jg-shadow-card);
}
.jg-msg-meta {
  font-size: 11px;
  color: var(--jg-text-muted);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.jg-msg-meta strong { color: var(--jg-text); font-weight: 700; }
.jg-msg-text { font-size: 14px; color: var(--jg-text); line-height: 1.4; }
.jg-msg.me { flex-direction: row-reverse; }
.jg-msg.me .jg-msg-body {
  background: var(--jg-primary);
  color: #fff;
}
.jg-msg.me .jg-msg-text,
.jg-msg.me .jg-msg-meta { color: #fff; }
.jg-msg.me .jg-msg-meta strong { color: #fff; }

/* ---------- helper icons ---------- */
.jg-ico-sq {
  width: 22px; height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}

/* ---------- utility ---------- */
.jg-row { display: flex; align-items: center; gap: 10px; }
.jg-row.between { justify-content: space-between; }
.jg-grow { flex: 1; }
.jg-center { text-align: center; }
.jg-mt-8 { margin-top: 8px; }
.jg-mt-14 { margin-top: 14px; }
.jg-mb-14 { margin-bottom: 14px; }
.jg-mb-0 { margin-bottom: 0; }

/* ---------- tab panel hide ---------- */
[data-jg-panel][hidden] { display: none !important; }

/* ---------- composite helper for 2 phones side by side ---------- */
.jg-two-up {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
}
.jg-phone-caption {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--jg-text-muted);
  margin-bottom: 8px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.jg-phone-wrap { display: flex; flex-direction: column; align-items: center; }
