/* ─────────────────────────────────────────────────────────────────────────
   Airo UI primitives for the demo recreations.

   Every value here is lifted from the real app's Tailwind classes
   (src/components, src/pages) so the recreations read as the product:
   DM Sans, #FAFAF9 ground, #E5E7EB hairlines, 12px card radius, 8px control
   radius, CTA green #16A34A, and the five stage colours. Sizes are logical
   px inside the scaled demo stage. Prefix: au- (app UI), ap- (PDF page).
   ───────────────────────────────────────────────────────────────────── */

.demo__stage {
  --c-ink: #111827; --c-ink-2: #374151; --c-muted: #6B7280; --c-faint: #9CA3AF;
  --c-line: #E5E7EB; --c-line-2: #F3F4F6; --c-ground: #FAFAF9; --c-hover: #F9FAFB;
  --c-cta: #16A34A; --c-cta-dark: #15803D;
  --s-new: #F43F5E;       --s-new-bg: #FFF1F2;
  --s-insp: #0891B2;      --s-insp-bg: #E0F2FE;
  --s-appr: #6366F1;      --s-appr-bg: #EEF2FF;
  --s-sched: #16A34A;     --s-sched-bg: #F0FDF4;
  --s-done: #D97706;      --s-done-bg: #FFFBEB;
}

/* ── Screen scaffolding (inside .af-phone__screen) ─────────────────────── */
.au-screen { position: absolute; inset: 0; background: var(--c-ground); overflow: hidden; }
.au-scroll { position: absolute; left: 0; right: 0; top: 0; will-change: transform; }

.au-topbar {
  position: absolute; z-index: 30; top: 0; left: 0; right: 0;
  height: 106px; padding: 50px 16px 0;
  background: #fff; border-bottom: 1px solid var(--c-line);
  display: flex; align-items: center; justify-content: space-between;
}
.au-topbar__title { font-size: 14px; font-weight: 600; color: var(--c-ink); }
.au-topbar__icon {
  width: 36px; height: 36px; border-radius: 8px; color: var(--c-muted);
  display: flex; align-items: center; justify-content: center;
}
.au-topbar__icon svg { width: 20px; height: 20px; }
.au-topbar__action { font-size: 14px; font-weight: 600; color: var(--c-faint); padding: 0 8px; transition: color .2s ease; }
.au-topbar__action.is-ready { color: var(--c-cta); }

.au-topbar--detail { justify-content: flex-start; gap: 12px; }
.au-topbar--detail .au-topbar__meta { flex: 1; min-width: 0; }
.au-topbar--detail small { display: block; font-size: 10px; line-height: 1; font-weight: 600; letter-spacing: .025em; text-transform: uppercase; color: var(--c-faint); margin-bottom: 2px; }
.au-topbar--detail strong { display: block; font-size: 14px; line-height: 1.25; font-weight: 600; color: var(--c-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.au-filterbar {
  position: absolute; z-index: 20; top: 0; left: 0; right: 0;
  padding: 62px 16px 12px;
  background: #fff; border-bottom: 1px solid var(--c-line);
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  display: flex; flex-wrap: wrap; gap: 6px;
}
.au-fpill {
  flex-shrink: 0; min-height: 34px; padding: 6px 12px;
  display: inline-flex; align-items: center;
  border-radius: 8px; border: 1px solid var(--c-line);
  font-size: 12px; font-weight: 500; line-height: 16px;
  background: #fff; color: var(--c-muted);
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.au-fpill b { font-weight: 500; opacity: .7; margin-left: 4px; }
.au-fpill[data-stage="new_job"]           { background: var(--s-new-bg);   color: var(--s-new);   border-color: #F43F5E40; }
.au-fpill[data-stage="inspection_booked"] { background: var(--s-insp-bg);  color: var(--s-insp);  border-color: #0891B240; }
.au-fpill[data-stage="awaiting_approval"] { background: var(--s-appr-bg);  color: var(--s-appr);  border-color: #6366F140; }
.au-fpill[data-stage="scheduled"]         { background: var(--s-sched-bg); color: var(--s-sched); border-color: #16A34A40; }
.au-fpill[data-stage="completed"]         { background: var(--s-done-bg);  color: var(--s-done);  border-color: #D9770640; }
.au-fpill.is-active { background: #111827; border-color: #111827; color: #fff; }
.au-fpill.is-active[data-stage="new_job"]           { background: var(--s-new);   border-color: var(--s-new);   color: #fff; }
.au-fpill.is-active[data-stage="inspection_booked"] { background: var(--s-insp);  border-color: var(--s-insp);  color: #fff; }
.au-fpill.is-active[data-stage="awaiting_approval"] { background: var(--s-appr);  border-color: var(--s-appr);  color: #fff; }
.au-fpill.is-active[data-stage="scheduled"]         { background: var(--s-sched); border-color: var(--s-sched); color: #fff; }
.au-fpill.is-active[data-stage="completed"]         { background: var(--s-done);  border-color: var(--s-done);  color: #fff; }

.au-tabbar {
  position: absolute; z-index: 40; bottom: 0; left: 0; right: 0;
  height: 86px; padding: 0 4px 22px;
  background: #fff; border-top: 1px solid var(--c-line);
  box-shadow: 0 -2px 8px rgba(0,0,0,.05);
  display: flex;
}
.au-tab {
  flex: 1; margin: 4px 2px; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--c-faint);
}
.au-tab svg { width: 22px; height: 22px; }
.au-tab span { font-size: 10px; font-weight: 500; line-height: 1; }
.au-tab.is-active { color: var(--c-cta); background: rgba(22,163,74,.08); }

.au-fab {
  position: absolute; z-index: 30; right: 20px; bottom: 102px;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--c-cta); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
}
.au-fab svg { width: 24px; height: 24px; }

.au-stickybar {
  position: absolute; z-index: 35; left: 0; right: 0; bottom: 86px;
  padding: 12px 16px; background: #fff; border-top: 1px solid var(--c-line);
}

.au-h1 { font-size: 20px; line-height: 28px; font-weight: 700; color: var(--c-ink); margin: 0; }
.au-pagehead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }

/* ── Form ──────────────────────────────────────────────────────────────── */
.au-label { display: block; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--c-ink-2); margin-bottom: 4px; }
.au-label i { font-style: normal; color: var(--c-faint); }
.au-input {
  position: relative;
  width: 100%; min-height: 48px; padding: 10px 12px;
  border: 1px solid var(--c-line); border-radius: 8px; background: #fff;
  font-size: 16px; line-height: 24px; color: var(--c-ink);
  display: flex; align-items: center;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.au-input.is-focus { border-color: transparent; box-shadow: 0 0 0 2px var(--c-cta); }
.au-input .ph { color: var(--c-faint); }
.au-input .au-caret { display: none; }
.au-input.is-focus .au-caret { display: inline-block; }
.au-input .val { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.au-input.is-filled .ph { display: none; }
.au-input--sm { min-height: 0; padding: 8px 12px; font-size: 14px; line-height: 20px; }
.au-textarea { align-items: flex-start; min-height: 144px; font-size: 14px; line-height: 20px; padding: 8px 12px; }
.au-caret {
  display: inline-block; width: 2px; height: 1.15em; margin-left: 1px; vertical-align: -0.18em;
  background: var(--c-cta); border-radius: 1px;
  animation: au-blink 1s steps(1) infinite;
}
@keyframes au-blink { 50% { opacity: 0; } }
.au-help { font-size: 11px; line-height: 16px; color: var(--c-faint); margin-top: 4px; }
.au-field + .au-field { margin-top: 16px; }

/* Suggestion dropdown (address autocomplete, branch combobox) */
.au-suggest {
  position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin-top: 4px;
  background: #fff; border: 1px solid var(--c-line); border-radius: 12px; overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
  transform-origin: 50% 0;
}
.au-suggest__item { min-height: 44px; padding: 10px 16px; border-bottom: 1px solid var(--c-line-2); }
.au-suggest__item:last-child { border-bottom: 0; }
.au-suggest__item.is-active { background: var(--c-hover); }
.au-suggest__item strong { display: block; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--c-ink); }
.au-suggest__item strong mark { background: none; color: inherit; font-weight: 700; }
.au-suggest__item span { display: block; font-size: 12px; line-height: 16px; color: var(--c-muted); }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.au-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 16px; border-radius: 8px;
  font-size: 14px; line-height: 20px; font-weight: 600;
  background: var(--c-cta); color: #fff; border: 1px solid transparent;
  white-space: nowrap;
}
.au-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.au-btn--block { display: flex; width: 100%; }
.au-btn--xl { min-height: 52px; padding: 14px 20px; border-radius: 12px; }
.au-btn--sm { min-height: 36px; padding: 6px 12px; font-size: 12px; line-height: 16px; }
.au-btn--secondary { background: #fff; color: var(--c-ink); border-color: var(--c-line); }
.au-btn--outline { background: #fff; color: var(--c-ink-2); border: 2px solid var(--c-line); min-height: 44px; }
.au-btn.is-disabled { opacity: .5; }
.au-spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: au-spin .7s linear infinite;
}
.au-spinner--lg { width: 32px; height: 32px; border-width: 3px; color: var(--c-cta); }
@keyframes au-spin { to { transform: rotate(360deg); } }

/* ── Pills & chips ─────────────────────────────────────────────────────── */
.au-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 8px; border: 1px solid transparent;
  font-size: 12px; line-height: 16px; font-weight: 600; white-space: nowrap;
}
.au-pill i { font-style: normal; opacity: .7; font-weight: 600; }
.au-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.au-pill svg { width: 12px; height: 12px; }
.au-pill[data-stage="new_job"]           { background: var(--s-new-bg);   color: var(--s-new);   border-color: #F43F5E40; }
.au-pill[data-stage="inspection_booked"] { background: var(--s-insp-bg);  color: var(--s-insp);  border-color: #0891B240; }
.au-pill[data-stage="awaiting_approval"] { background: var(--s-appr-bg);  color: var(--s-appr);  border-color: #6366F140; }
.au-pill[data-stage="scheduled"]         { background: var(--s-sched-bg); color: var(--s-sched); border-color: #16A34A40; }
.au-pill[data-stage="completed"]         { background: var(--s-done-bg);  color: var(--s-done);  border-color: #D9770640; }
.au-pill--success { background: #F0FDF4; color: #15803D; border-color: #BBF7D0; }
.au-pill--alert   { background: #FFEDD5; color: #9A3412; border-color: #FED7AA; }
.au-pill--warning { background: #FEF3C7; color: #92400E; border-color: #FDE68A; }
.au-pill--danger  { background: #FEE2E2; color: #B91C1C; border-color: #FECACA; }
.au-pill--decide  { background: #FECACA; color: #991B1B; border-color: #F87171; }
.au-pill--info    { background: #EFF6FF; color: #1D4ED8; border-color: #BFDBFE; }
.au-pill--plain   { background: #fff; color: var(--c-muted); border-color: var(--c-line); }

.au-chip {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 16px; height: 16px; border-radius: 5px;
  font-size: 8px; font-weight: 600; color: #fff; line-height: 1;
}
.au-chip--md { width: 28px; height: 28px; border-radius: 6px; font-size: 11px; }

/* ── Job card ──────────────────────────────────────────────────────────── */
.au-card {
  position: relative; display: flex; overflow: hidden; min-height: 80px;
  background: #fff; border: 1px solid var(--c-line); border-radius: 12px;
}
.au-card + .au-card { margin-top: 8px; }
.au-card__accent { width: 4px; flex-shrink: 0; background: var(--accent, var(--c-faint)); transition: background-color .4s ease; }
.au-card__body { flex: 1; min-width: 0; padding: 16px; }
.au-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.au-card__id { display: flex; align-items: center; gap: 6px; height: 22px; flex-shrink: 0; }
.au-card__num { font-size: 12px; font-weight: 600; color: var(--c-muted); letter-spacing: .025em; line-height: 1; }
.au-card__pills { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.au-card__more { width: 22px; height: 22px; margin-right: -6px; display: flex; align-items: center; justify-content: center; color: var(--c-faint); font-size: 16px; line-height: 1; }
.au-card__addr { font-size: 14px; line-height: 1.375; font-weight: 600; color: var(--c-ink); margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.au-card__wo { font-size: 11px; line-height: 1.375; color: var(--c-muted); margin: 0 0 4px; }
.au-card__wo b { font-weight: 600; text-transform: uppercase; letter-spacing: .025em; color: var(--c-faint); margin-right: 4px; }
.au-card__wo code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; color: var(--c-ink-2); font-size: 11px; }
.au-card__client { font-size: 12px; line-height: 16px; color: var(--c-muted); margin: 0 0 8px; }
.au-card__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; }
.au-card__next { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--c-muted); display: flex; gap: 4px; min-width: 0; margin: 0; }
.au-card__next.is-faint { color: var(--c-faint); }
.au-card__progress { margin-bottom: 8px; }
.au-card__progress .track { height: 6px; border-radius: 99px; background: var(--c-line); overflow: hidden; }
.au-card__progress .fill { height: 100%; width: 100%; border-radius: 99px; background: var(--accent); transform-origin: 0 50%; }
.au-card__progress p { font-size: 12px; line-height: 16px; color: var(--c-muted); margin: 4px 0 0; }

/* Small in-card actions */
.au-act {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid;
  font-size: 12px; line-height: 16px; font-weight: 600;
}
.au-act svg { width: 14px; height: 14px; }
.au-act--email  { background: #EFF6FF; color: #2563EB; border-color: #BFDBFE; }
.au-act--call   { background: #F0FDF4; color: #16A34A; border-color: #BBF7D0; }
.au-act--amber  { background: #FEF3C7; color: #92400E; border-color: #FDE68A; }
.au-act--plain  { background: #fff; color: var(--c-muted); border-color: var(--c-line); }
.au-iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid;
}
.au-iconbtn svg { width: 20px; height: 20px; }
.au-iconbtn--call { background: #F0FDF4; border-color: #BBF7D0; color: #16A34A; }
.au-iconbtn--text { background: #EFF6FF; border-color: #BFDBFE; color: #3B82F6; }

/* Zone header (Jobs page sub-groups) */
.au-zone { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.au-zone::before { content: ''; width: 4px; height: 20px; border-radius: 2px; background: var(--zone, var(--c-line)); }
.au-zone h3 { margin: 0; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--c-ink); }
.au-zone span { font-size: 12px; font-weight: 500; color: var(--c-muted); background: var(--c-line-2); padding: 2px 8px; border-radius: 8px; }

/* ── Section card (job detail) ─────────────────────────────────────────── */
.au-section { background: #fff; border: 1px solid var(--c-line); border-radius: 12px; overflow: hidden; }
.au-section + .au-section { margin-top: 12px; }
.au-section__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border-bottom: 1px solid var(--c-line); }
.au-section__head h3 { margin: 0; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--c-ink); }
.au-section__body { padding: 16px; }

/* Call · Text · Maps tiles */
.au-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.au-tile {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; border-radius: 8px; border: 1px solid;
  font-size: 12px; line-height: 16px; font-weight: 600;
}
.au-tile svg { width: 15px; height: 15px; }
.au-tile--call { background: #F0FDF4; border-color: #BBF7D0; color: #16A34A; }
.au-tile--text { background: #EFF6FF; border-color: #BFDBFE; color: #3B82F6; }
.au-tile--maps { background: #FFF7ED; border-color: #FED7AA; color: #F97316; }

/* Report text (MarkdownDisplay) */
.au-report h4 { margin: 16px 0 8px; font-size: 12px; line-height: 16px; font-weight: 700; color: #1A2B23; text-transform: uppercase; letter-spacing: .025em; }
.au-report h4:first-child { margin-top: 0; }
.au-report p { margin: 0 0 6px; font-size: 14px; line-height: 1.625; color: var(--c-ink-2); }
.au-report .bullet { display: flex; gap: 8px; }
.au-report .bullet::before { content: '•'; color: var(--c-cta); flex-shrink: 0; }
.au-report b { font-weight: 600; color: var(--c-ink); }

/* ── Overlays ──────────────────────────────────────────────────────────── */
.au-scrim { position: absolute; z-index: 70; inset: 0; background: rgba(0,0,0,.4); }
.au-scrim--heavy { background: rgba(0,0,0,.6); }
.au-sheet {
  position: absolute; z-index: 75; left: 0; right: 0; bottom: 0;
  background: #fff; border-radius: 16px 16px 0 0;
  box-shadow: 0 -10px 40px rgba(0,0,0,.18);
  padding-bottom: 22px;
}
.au-sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 12px; border-bottom: 1px solid var(--c-line); }
.au-sheet__head h2 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 600; color: var(--c-ink); }
.au-sheet__body { padding: 16px 20px; }
.au-sheet__foot { padding: 16px 20px 8px; border-top: 1px solid var(--c-line); display: flex; justify-content: flex-end; gap: 8px; }
.au-dialog {
  position: absolute; z-index: 80; left: 24px; right: 24px; top: 50%;
  background: #fff; border-radius: 16px; padding: 32px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
  display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center;
}
.au-dialog strong { font-size: 16px; line-height: 1.375; font-weight: 600; color: var(--c-ink); }
.au-dialog span { font-size: 14px; line-height: 20px; color: var(--c-muted); }

.au-toast {
  position: absolute; z-index: 85; left: 16px; right: 16px; top: 58px;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 12px;
  background: #fff; border: 1px solid #BBF7D0;
  box-shadow: 0 10px 25px -8px rgba(17,24,39,.25);
  font-size: 13px; line-height: 18px; font-weight: 500; color: var(--c-ink);
}
.au-toast__icon { width: 22px; height: 22px; border-radius: 50%; background: #F0FDF4; color: #16A34A; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.au-toast__icon svg { width: 13px; height: 13px; }

/* ── KPI tile (Today) ──────────────────────────────────────────────────── */
.au-kpi { background: #fff; border: 1px solid var(--c-line); border-radius: 12px; padding: 14px 16px; }
.au-kpi small { display: block; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--c-muted); }
.au-kpi strong { display: block; margin-top: 6px; font-size: 24px; line-height: 32px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ── Photo tile (drawn, not photographed) ──────────────────────────────── */
.au-photo { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: #D8D4CC; }
.au-photo__cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 6px 4px; font-size: 9px; line-height: 12px; font-weight: 600; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.55)); }

/* ═════════════════════════════════════════════════════════════════════════
   PDF page — mirrors src/components/pdf/InspectionReportPDF.jsx.
   Authored at A4 points (595 × 842) and scaled by --ap-scale so type keeps
   the real proportions. Palette comes from --p-* (see AU.palette()).
   ═════════════════════════════════════════════════════════════════════ */
.ap-doc {
  --p-dark: #123345; --p-accent: #3F7FBF; --p-accent-text: #2A567F;
  --p-light: #E8F0F7; --p-border: #B2CCE5; --p-mid: #4A5B68;
  position: absolute;
  width: calc(595px * var(--ap-scale, .8));
  border-radius: 6px; overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 0 rgba(17,24,39,.04), 0 30px 60px -28px rgba(16,40,29,.5), 0 12px 24px -14px rgba(16,40,29,.3);
}
.ap-doc__inner { width: 595px; transform: scale(var(--ap-scale, .8)); transform-origin: 0 0; }
.ap-doc__pages { will-change: transform; }
.ap-page {
  position: relative; width: 595px; height: 842px; background: #fff; overflow: hidden;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: var(--p-dark);
}
.ap-page + .ap-page { border-top: 1px solid #E5E7EB; }
.ap-header { background: var(--p-dark); color: #fff; padding: 20px 30px; display: flex; justify-content: space-between; align-items: center; transition: background-color .5s ease; }
.ap-header__biz { font-size: 18px; font-weight: 700; line-height: 1.15; }
.ap-header__tag { font-size: 8px; font-style: italic; color: var(--p-accent); margin-top: 4px; transition: color .5s ease; }
.ap-header__right { text-align: right; }
.ap-header__label { font-size: 8px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.ap-header__job { font-size: 16px; font-weight: 700; margin-top: 3px; }
.ap-header__meta { font-size: 9px; opacity: .88; margin-top: 2px; }
.ap-running { background: var(--p-dark); color: #fff; padding: 7px 30px; display: flex; justify-content: space-between; font-size: 9px; opacity: 1; letter-spacing: .3px; transition: background-color .5s ease; }
.ap-prop { background: var(--p-light); padding: 20px 30px; display: flex; transition: background-color .5s ease; }
.ap-prop > div { flex: 1; }
.ap-prop > div:first-child { padding-right: 20px; }
.ap-prop > div:last-child { padding-left: 20px; border-left: 1px solid var(--p-border); }
.ap-prop small { display: block; font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.ap-prop strong { display: block; font-size: 13px; line-height: 1.3; margin-bottom: 3px; }
.ap-prop span { display: block; font-size: 9px; color: var(--p-mid); margin-bottom: 2px; }
.ap-body { padding: 6px 30px 20px; }
.ap-h { display: flex; align-items: center; margin: 18px 0 10px; font-size: 15px; font-weight: 700; }
.ap-h::before { content: ''; width: 4px; height: 20px; border-radius: 2px; background: var(--p-accent); margin-right: 8px; transition: background-color .5s ease; }
.ap-card { background: var(--p-light); border: 1px solid var(--p-border); border-radius: 6px; padding: 16px 24px; margin-bottom: 12px; transition: background-color .5s ease, border-color .5s ease; }
.ap-card h5 { margin: 14px 0 8px; font-size: 11px; font-weight: 700; }
.ap-card h5:first-child { margin-top: 0; }
.ap-card p { margin: 0 0 4px; font-size: 9px; line-height: 1.6; }
.ap-card .b { display: flex; font-size: 9px; line-height: 1.7; margin-bottom: 2px; }
.ap-card .b::before { content: '•'; width: 10px; flex-shrink: 0; }
.ap-photos { display: flex; gap: 6px; }
.ap-photos > div { flex: 1; }
.ap-photos .au-photo { border-radius: 3px; aspect-ratio: 4 / 3; }
.ap-photos small { display: block; font-size: 7px; color: #6B7280; text-align: center; margin-top: 3px; }
.ap-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 10px; }
.ap-row--muted { color: var(--p-mid); }
.ap-rule { height: 1px; background: var(--p-border); margin: 2px 0; }
.ap-rule--thick { height: 2px; background: var(--p-dark); margin: 6px 0 3px; }
.ap-total { display: flex; justify-content: space-between; align-items: baseline; padding: 5px 0; }
.ap-total b { font-size: 12px; }
.ap-total strong { font-size: 15px; color: var(--p-accent-text); transition: color .5s ease; }
.ap-terms { font-size: 9px; line-height: 1.5; font-style: italic; color: #6B7280; margin: 0; }
.ap-footer { position: absolute; left: 0; right: 0; bottom: 0; background: var(--p-dark); color: #fff; padding: 16px 30px; display: flex; justify-content: space-between; align-items: center; transition: background-color .5s ease; }
.ap-footer__biz { font-size: 10px; font-weight: 700; }
.ap-footer__tag { font-size: 7px; font-style: italic; color: var(--p-accent); margin-top: 3px; }
.ap-footer__meta { font-size: 7px; text-align: right; line-height: 1.5; }

/* PDF preview toolbar (mirrors the Save / Share / Email / Print row) */
.ap-tools { position: absolute; display: flex; gap: 8px; align-items: center; }
.ap-tool {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px;
  border-radius: 8px; border: 1px solid #E5E7EB; background: #fff; color: #6B7280;
  font: 600 13px/1 'DM Sans', system-ui, sans-serif; white-space: nowrap;
  box-shadow: 0 6px 16px -10px rgba(16,40,29,.45);
}
.ap-tool svg { width: 15px; height: 15px; }
.ap-tool--save  { background: #16A34A; border-color: #16A34A; color: #fff; }
.ap-tool--share { color: #16A34A; border-color: #16A34A; }
.ap-tool--email { color: #2563EB; border-color: #93C5FD; }

/* Raw report text box (the editable, monospace report field) */
.au-mono {
  border: 1px solid var(--c-line); border-radius: 8px; padding: 8px 12px; height: 256px; overflow: hidden;
  font: 400 12px/16px ui-monospace, 'SF Mono', Menlo, monospace; color: var(--c-ink); background: #fff;
}
.au-mono .rl { white-space: pre; min-height: 16px; }
.au-mono .rl.h { font-weight: 700; }

.au-mic {
  position: absolute; right: 8px; bottom: 8px; width: 30px; height: 30px; border-radius: 50%;
  background: #16A34A; color: #fff; display: flex; align-items: center; justify-content: center;
}
.au-mic svg { width: 15px; height: 15px; }
.au-mic::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid #16A34A; opacity: .35; animation: au-pulse 1.2s ease-out infinite; }
@keyframes au-pulse { from { transform: scale(.8); opacity: .5; } to { transform: scale(1.35); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .au-mic::after, .au-caret, .au-spinner { animation: none; } }

/* Narrow mode: the PDF preview takes over the whole stage as a sheet */
.af-sheet { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: #E9EFEB; border-radius: 22px 22px 0 0; box-shadow: 0 -20px 50px -20px rgba(16,40,29,.4); }
.au-toast--stage { top: 66px; left: 20px; right: 20px; }

/* Map pin (HTML over the drawn map) — left/top is the pin's tip */
.au-mappin { position: absolute; width: 34px; height: 48px; margin: -45px 0 0 -17px; transform-origin: 50% 94%; will-change: transform, opacity; }
.au-mappin svg { display: block; overflow: visible; }

/* Bars that touch the screen's rounded corners carry the same radius. Chrome can promote a bar to
   its own layer when another screen overlaps it, and that layer ignores the screen's rounded clip. */
.au-topbar, .au-filterbar { border-radius: 43px 43px 0 0; }
.au-tabbar { border-radius: 0 0 43px 43px; }
