/* Potter AI — dark luxury aesthetic */

:root {
  --bg: #0F0F0E;
  --bg-elev: #181817;
  --bg-elev-2: #1F1F1D;
  --gold: #C8A96E;
  --gold-soft: rgba(200, 169, 110, 0.18);
  --gold-mute: rgba(200, 169, 110, 0.45);
  --gold-glow: rgba(200, 169, 110, 0.55);
  --text: #E8E4DA;
  --text-dim: #8F8A7F;
  --text-faint: #5F5B52;
  --border: #2A2927;
  --border-strong: #3A3833;
  --amber: #D9A14B;
  --amber-bg: rgba(217, 161, 75, 0.12);
  --green: #6BBF8C;
  --green-bg: rgba(107, 191, 140, 0.12);
  --red: #D76464;
  --red-bg: rgba(215, 100, 100, 0.12);

  --serif: "Georgia", "Cormorant Garamond", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
          Arial, sans-serif;

  /* v19-port-2026-05-15: added for review-screen v19 port */
  --bg-elev-3: #252321;
  --bg-hover: #232220;
  --text-dimmer: #6B6660;
  --border-subtle: #1F1E1C;
  --border-stronger: #3A3835;
  --green-text: #0b1a12;
  --pdf-bg: #2A2927;
  --edit-hover: rgba(255, 255, 255, 0.04);
  --edit-focus: rgba(255, 255, 255, 0.07);
  --bf-1: #5B8DEF;
  --bf-2: #B07AD9;
  --bf-3: #5DA770;
  --bf-4: #D9A14B;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); }

/* ── top bar ──────────────────────────────────────────────────────────── */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 48px 0;
}

.wordmark {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: 0.32em;
  user-select: none;
}
.wordmark-main {
  color: var(--text);
  font-size: 20px;
}
.wordmark-sub {
  color: var(--gold);
  font-size: 20px;
  margin-left: 10px;
}

.mode-badge {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid;
  font-weight: 600;
}
.mode-sandbox {
  color: var(--amber);
  background: var(--amber-bg);
  border-color: var(--amber);
}
.mode-production {
  color: var(--green);
  background: var(--green-bg);
  border-color: var(--green);
}

.sandbox-banner {
  margin: 18px 48px 0;
  padding: 10px 18px;
  background: var(--amber-bg);
  border: 1px solid rgba(217, 161, 75, 0.3);
  color: var(--amber);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.02em;
  border-radius: 4px;
  text-align: center;
}

/* ── main ─────────────────────────────────────────────────────────────── */

.main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  padding: 48px 24px;
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 56px 56px 48px;
  max-width: 560px;
  width: 100%;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.card-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 32px;
  margin: 0 0 8px;
  text-align: center;
  letter-spacing: 0.01em;
}

.card-subtitle {
  color: var(--text-dim);
  text-align: center;
  margin: 0 0 36px;
  font-size: 14px;
  font-family: var(--sans);
  letter-spacing: 0.03em;
}

/* ── drop zone ────────────────────────────────────────────────────────── */

.dropzone {
  display: block;
  border: 1.5px dashed var(--gold-mute);
  border-radius: 6px;
  padding: 64px 32px;
  cursor: pointer;
  text-align: center;
  transition: all 0.18s ease;
  background: transparent;
}
.dropzone:hover,
.dropzone.hover {
  border-color: var(--gold);
  background: var(--gold-soft);
  box-shadow: 0 0 24px var(--gold-glow);
}
.dropzone.uploading {
  opacity: 0.6;
  pointer-events: none;
}

.dropzone-icon {
  font-size: 40px;
  color: var(--gold);
  margin-bottom: 14px;
}
.dropzone-text {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--text);
  letter-spacing: 0.04em;
}
.dropzone-hint {
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.05em;
}

.status-row {
  margin-top: 24px;
  padding: 14px 16px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
}
.status-row.success { color: var(--green); }
.status-row.error { color: var(--red); }

/* ── modals ───────────────────────────────────────────────────────────── */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  z-index: 500;
  animation: fade 0.18s ease;
}
.modal.hidden { display: none; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 100px rgba(0,0,0,0.7);
}
.plan-card { max-width: 700px; }

.modal-title {
  font-family: var(--serif);
  font-size: 22px;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.03em;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.plan-count {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.15em;
}

/* Finding 17 (2026-05-07): multi-attachment filename indicator
 * row. Sits between the modal title and the modal body so the
 * operator can see which dropped PDF the plan modal represents
 * before scrolling into the form. Subtle muted text — not a
 * primary CTA; the orange .btn-procore-link family is reserved
 * for "leaving Potter AI to interact with Procore". The "open
 * in new tab" link is a blob URL to the local File object, so
 * styling matches a regular text-hyperlink, not the orange CTA. */
.plan-filename-row {
  padding: 8px 32px 0;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}
.plan-filename-label {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--text-faint);
}
.plan-filename-name {
  color: var(--text-dim);
  font-weight: 500;
  word-break: break-all;
}
.plan-filename-link {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 12px;
}
.plan-filename-link:hover {
  text-decoration: none;
}

.modal-body {
  padding: 24px 32px;
  overflow-y: auto;
}
.modal-body p { margin: 0 0 8px; font-family: var(--sans); font-size: 14px; }
.modal-sub { color: var(--text-dim); font-family: var(--sans); font-size: 13px; margin-bottom: 12px; }

.modal-footer {
  padding: 18px 32px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ── form fields ──────────────────────────────────────────────────────── */

.field {
  margin-bottom: 18px;
  position: relative;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field label {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.field input,
.field select,
.subtle-select {
  width: 100%;
  background: var(--bg-elev-2);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 11px 12px;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus,
.field select:focus,
.subtle-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold-soft);
}

.field.warn input,
.field.warn select {
  border-color: var(--amber);
  box-shadow: 0 0 0 1px var(--amber-bg);
}

.confidence {
  position: absolute;
  right: 8px;
  top: 0;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.15em;
}

/* Search-filter picker — generic styles shared by the project picker
 * and the vendor picker (and any future search-filter dropdown). The
 * wrapper holds the input + the floating results list; results are
 * absolutely positioned so they overlay following form fields without
 * pushing them down. */
.search-picker {
  position: relative;
}
.search-loading {
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text-dim);
}
.search-results {
  list-style: none;
  margin: 4px 0 0 0;
  padding: 4px 0;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-elev-2);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  max-height: 260px;
  overflow-y: auto;
  z-index: 10;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
.search-result {
  padding: 9px 12px;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.search-result:last-child {
  border-bottom: none;
}
.search-result:hover,
.search-result.selected {
  background: var(--bg-elev);
}
.search-result-empty {
  padding: 9px 12px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text-dim);
}
.search-result-more {
  padding: 6px 12px;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-top: 1px solid var(--border);
}

.warning {
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--amber);
  background: var(--amber-bg);
  padding: 8px 10px;
  border-radius: 3px;
  border-left: 2px solid var(--amber);
}

/* Finding 13 (2026-05-07): rate-limit notice banner shown at the
 * top of the plan modal when /api/analyze-quote couldn't run
 * extract_quote_fields because of an Anthropic 429. Same color
 * family as .warning but a touch heavier to read as a top-of-modal
 * banner rather than an inline-field warning. Also reused inside
 * the conflict modals (Path 3 / Path 4) when the comparison helper
 * surfaces rate_limited: True. */
.rate-limit-notice {
  margin: 0 0 16px 0;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--amber);
  background: var(--amber-bg);
  padding: 10px 14px;
  border-radius: 3px;
  border-left: 3px solid var(--amber);
}
.rate-limit-notice strong {
  display: block;
  margin-bottom: 2px;
}
/* Conflict-modal manual-amount composite action. Finding 14
 * (2026-05-07): relocated from the modal body's notice region
 * into the action button row, where it sits as one composite
 * sibling next to Actions 1/2/4/5. The amber-bg + border-left
 * groups label + input + preview + submit so the operator sees
 * a single coherent action despite four nested controls. */
.manual-amount-block {
  /* No top margin — the .conflict-footer flex gap (10px) handles
   * spacing from the prior action button. */
  margin: 0;
  padding: 12px 14px;
  background: var(--amber-bg);
  border-radius: 3px;
  border-left: 3px solid var(--amber);
}
.manual-amount-block label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.manual-amount-block input[type="text"],
.manual-amount-block input[type="number"] {
  width: 100%;
  margin-bottom: 8px;
}

/* Live-preview calculator beneath the input. Two states: empty/
 * invalid → muted italic placeholder ("Enter the existing PDF's
 * amount above"); valid → readable amber sentence with the math. */
.manual-amount-preview {
  margin: 0 0 10px 0;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.4;
  min-height: 1.4em;
}
.manual-amount-preview-empty {
  color: var(--text-faint);
  font-style: italic;
}
.manual-amount-preview-active {
  color: var(--amber);
  font-style: normal;
}

/* Disabled submit button: grayed-out + cursor cue. Inherits from
 * .btn-conflict (gold-on-dark) but loses the gold and hover
 * affordance until the input parses valid. */
.manual-amount-block .btn-conflict:disabled,
.manual-amount-block .btn-conflict[disabled] {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-faint);
  border-color: rgba(255, 255, 255, 0.12);
  cursor: not-allowed;
  opacity: 0.65;
}
.manual-amount-block .btn-conflict:disabled:hover,
.manual-amount-block .btn-conflict[disabled]:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-faint);
}

/* Inline action link, currently used for "Add in Procore →" under the
 * vendor field when the typed text has no directory match. Looks like
 * a discreet text link, not a primary button — the search-filter
 * dropdown is still the canonical happy path; this is the escape
 * hatch when the vendor genuinely isn't in Procore yet. */
.btn-link-action {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 0;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--gold);
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-link-action:hover {
  color: var(--text);
}

.subtle-select {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-dim);
}

/* ── market row & confidence badges ───────────────────────────────────── */

.market-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.market-row .subtle-select {
  margin-top: 0;
  flex: 1;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid transparent;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-high {
  color: var(--green);
  background: var(--green-bg);
  border-color: var(--green);
}
.badge-medium,
.badge-low {
  color: var(--amber);
  background: var(--amber-bg);
  border-color: var(--amber);
}

.market-reason {
  margin-top: 8px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  font-style: italic;
}

.plan-meta {
  display: flex;
  gap: 32px;
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}
.plan-meta strong { color: var(--gold); font-weight: 600; margin-left: 6px; }

/* ── buttons ──────────────────────────────────────────────────────────── */

.btn {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.22em;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 3px;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  text-transform: uppercase;
  transition: all 0.15s ease;
}
.btn:hover { color: var(--text); }

.btn-ghost { color: var(--text-dim); }
.btn-ghost:hover { color: var(--text); background: var(--bg-elev-2); }

.btn-primary {
  background: var(--gold);
  color: #111;
  border-color: var(--gold);
}
.btn-primary:hover {
  background: transparent;
  color: var(--gold);
}

.btn-confirm {
  background: var(--green);
  color: #0b1a12;
  border-color: var(--green);
}
.btn-confirm:hover {
  background: transparent;
  color: var(--green);
}

/* Tooltip wrapper for disabled buttons. Two reasons this exists:
 *   1. Browsers don't reliably fire hover events on `disabled` buttons
 *      (Safari especially). The wrapper span is always interactive
 *      even when its child button isn't, so hover-driven affordances
 *      land on the span instead of the button.
 *   2. We want the explanation tooltip to appear INSTANTLY, not
 *      after the native browser title delay (~500ms). The native
 *      delay is too slow to compete with the `cursor: not-allowed`
 *      that fires on first hover — by the time the title surfaces,
 *      users have already read "broken" and bailed.
 *
 * `inline-block` keeps the span's box sized to its child so the
 * modal-footer flex layout stays clean. `position: relative` is the
 * anchor for the ::after tooltip pseudo-element below. */
.btn-tooltip-wrap {
  display: inline-block;
  position: relative;
}

/* Custom CSS tooltip — content pulled from data-tooltip on the span,
 * rendered as a ::after pseudo-element above the button. The pseudo
 * only materializes when (a) the attribute is non-empty AND (b) the
 * wrapper is being hovered, so enabled buttons (which clear the
 * attribute via refreshSubmitState in app.js) never produce a
 * phantom tooltip. No transition — instant on / instant off, which
 * is the whole point of the rewrite. `pointer-events: none` keeps
 * the tooltip from interfering with hover state on the wrapper. */
.btn-tooltip-wrap[data-tooltip]:not([data-tooltip=""]):hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elev-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 6px 10px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.02em;
  /* Allow wrapping so longer messages (e.g. the "Vendor not in
   * Procore — check spelling or click 'Add in Procore'" guidance)
   * stay inside the modal width. Short messages still render on a
   * single line because the box shrinks to fit. */
  white-space: normal;
  max-width: 320px;
  text-align: center;
  line-height: 1.35;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 100;
  pointer-events: none;
}

/* 2026-05-21 / verify-flag tooltips: shared, JS-positioned tooltip element.
 * position:fixed + appended to <body> so no ancestor's overflow can clip it;
 * app.js measures it and clamps it inside the viewport, so it never runs off
 * a screen edge. Same dark box as the .btn-tooltip-wrap tooltip above. */
.verify-tooltip {
  position: fixed;
  z-index: 1000;
  max-width: 280px;
  padding: 6px 10px;
  background: var(--bg-elev-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.4;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

/* Disabled state for any .btn — muted background, half-faded, and the
 * "not-allowed" cursor on hover so users don't burn a click. The
 * `:hover` overrides below kill the lift/recolor that would otherwise
 * still hint at interactivity. The hover-tooltip explaining WHY it's
 * disabled lives on the surrounding `.btn-tooltip-wrap` span (see
 * `refreshSubmitState` in app.js); a `title` directly on the button
 * isn't reliable cross-browser when the button is disabled. */
.btn:disabled,
.btn[aria-disabled="true"] {
  background: var(--bg-elev-2);
  color: var(--text-faint);
  border-color: var(--border);
  cursor: not-allowed;
  opacity: 0.5;
}
.btn:disabled:hover,
.btn[aria-disabled="true"]:hover {
  background: var(--bg-elev-2);
  color: var(--text-faint);
  border-color: var(--border);
}

.hidden { display: none !important; }

/* ── exec steps ───────────────────────────────────────────────────────── */

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
}
.step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
  color: var(--text-faint);
}
.step:last-child { border-bottom: none; }

.step-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--bg-elev-2);
}

.step.pending .step-icon { color: var(--text-faint); }
.step.running {
  color: var(--text);
}
.step.running .step-icon {
  border-color: var(--gold);
  color: var(--gold);
  animation: spin 1s linear infinite;
}
.step.success {
  color: var(--text);
}
.step.success .step-icon {
  background: var(--gold);
  color: #111;
  border-color: var(--gold);
}
.step.skipped {
  color: var(--text-dim);
}
.step.skipped .step-icon {
  border-color: var(--amber);
  color: var(--amber);
}
/* `manual` = handed off to the user in Procore. NOT a failure. Rendered
   in gold so it reads as "your turn", visually distinct from the green
   ✓ of an automated success and the red ✗ of an actual failure. */
.step.manual {
  color: var(--gold);
}
.step.manual .step-icon {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--bg-elev-2);
}
.step.manual .step-detail {
  color: var(--gold);
  opacity: 0.85;
}
.step.error {
  color: var(--red);
}
.step.error .step-icon {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.step-detail {
  font-size: 12px;
  color: var(--text-faint);
  margin-left: auto;
  font-family: var(--sans);
  letter-spacing: 0.05em;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.exec-error {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--red-bg);
  border-left: 2px solid var(--red);
  color: var(--red);
  font-family: var(--sans);
  font-size: 13px;
  white-space: pre-wrap;
}

/* ── email ────────────────────────────────────────────────────────────── */

textarea#email-text {
  width: 100%;
  min-height: 260px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 14px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--text);
  resize: vertical;
}

/* ── conflict modals (PART 2) ─────────────────────────────────────────── */
/*
 * Per spec: dark theme #1A1A18 background, gold #C8A96E action buttons,
 * subtle grey Cancel button, Georgia serif. The action buttons stack
 * vertically on narrow modals so the dynamic combine-math label can
 * breathe without wrapping.
 */

.conflict-card {
  background: #1A1A18;
  border: 1px solid var(--border-strong);
  max-width: 560px;
  font-family: var(--serif);
}

.conflict-card .modal-title {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.03em;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.conflict-message {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 12px;
}

.conflict-context {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  margin: 0;
}

/* Inline helper text under a field — italic, muted, single-line.
 * Used by the filename-collision-resolution note in the plan modal
 * to explain "trade added" / "numbered suffix" picks from Layer-1
 * collision prevention. */
.hint {
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 12px;
  font-style: italic;
  color: var(--text-dim);
  line-height: 1.4;
}

/* Filename-collision modal — radio options stacked vertically with
 * the custom-filename input inline beside its radio. Visual
 * language matches the existing conflict cards (dark muted bg,
 * gold accent on hover/focus). */
.collision-options {
  border: none;
  margin: 8px 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.collision-option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-elev-2);
}
.collision-option:hover {
  border-color: var(--border-strong);
}
.collision-option input[type="radio"] {
  margin: 0;
}
.collision-option strong {
  color: var(--gold);
  font-weight: 600;
}
.collision-option input[type="text"] {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 6px 8px;
  font-family: var(--serif);
  font-size: 13px;
  color: var(--text);
  outline: none;
}
.collision-option input[type="text"]:focus {
  border-color: var(--gold);
}
/* Two stacked deep-links inside the filename-collision modal — the
 * Bidding-tool link ("I might've already bid this") and the
 * Documents-tool link ("wrong file is in the archive"). Either or
 * both can be hidden by `.hidden` when the corresponding URL
 * wasn't surfaced. The wrapper is a paragraph so the inline-block
 * children naturally fall onto separate lines via `display: block`
 * below. */
.fc-view-links {
  margin: 8px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#fc-view-existing-bidding,
#fc-view-existing-documents {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  display: inline-block;
}
#fc-view-existing-bidding:hover,
#fc-view-existing-documents:hover {
  color: var(--text);
}

/* Numbered checklist used inside the manual-upload-required modal */
.manual-steps {
  margin: 12px 0 14px;
  padding-left: 22px;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}
.manual-steps li {
  margin-bottom: 4px;
}
.manual-steps strong {
  color: var(--gold);
  font-weight: 600;
}

.conflict-footer {
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  padding: 18px 32px 24px;
}
.conflict-footer .btn {
  width: 100%;
  text-align: center;
  padding: 13px 18px;
  font-size: 12px;
  letter-spacing: 0.18em;
}

.btn-conflict {
  background: var(--gold);
  color: #111;
  border-color: var(--gold);
  font-weight: 600;
}
.btn-conflict:hover {
  background: transparent;
  color: var(--gold);
}
.btn-conflict .btn-label { display: block; }
.btn-conflict .btn-math {
  display: block;
  margin-top: 4px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(0, 0, 0, 0.65);
  font-weight: 500;
  text-transform: none;
}
.btn-conflict:hover .btn-math {
  color: var(--gold);
  opacity: 0.85;
}

.btn-cancel {
  background: transparent;
  color: var(--text-dim);
  border-color: var(--border-strong);
}
.btn-cancel:hover {
  color: var(--text);
  background: var(--bg-elev-2);
  border-color: var(--text-dim);
}

/* ── Step 5 redesign — conflict modal building blocks ────────────────── */
/*
 * The five new conflict modals share a common visual language for AI
 * verdict blocks, side-by-side amount comparisons, clickable existing-
 * attachment links, and a "Recommended" pill on the AI-suggested action
 * button. Variables (--gold / --bg-elev-2 / --text-dim, etc.) are reused
 * verbatim so nothing introduces a new design idiom.
 */

/* Side-by-side label / value comparison rows. Used by the amount-only
 * Path 2 modal and by the defensive download-failed-handoff modal. */
.compare-block {
  margin: 12px 0 16px;
  padding: 12px 14px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.compare-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 0;
  font-family: var(--serif);
  font-size: 14px;
  gap: 12px;
}
.compare-label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.compare-value {
  color: var(--text);
  font-weight: 500;
}
.compare-value-new {
  color: var(--gold);
  font-weight: 600;
}

/* Spec Gaps 36 + 38 (2026-05-12): bundle-context block on Path 2
 * modal for multi-attachment flows. Surfaces the supplement filenames
 * and the AI-compared-combined hint when the governing entry merged
 * N>1 source files. Visual idiom matches the existing single-PDF
 * amber-tinted informational callouts (.recommendation-explanation,
 * .ai-verdict-low) so it reads as a sibling insight band, not a
 * different design language. */
/* Plan 2: review-screen notice for Word/Excel files that failed
 * conversion. Reuses the amber-tinted callout idiom established by
 * .recommendation-explanation / .ai-verdict-low / .bundle-context-block. */
.review-unconvertible-notice {
  margin: 8px 16px 0;
  padding: 8px 12px;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  background: var(--amber-bg);
  border-left: 2px solid var(--amber);
  border-radius: 0 3px 3px 0;
}
.review-unconvertible-notice.hidden { display: none; }
.review-unconvertible-notice p { margin: 0; }
.review-unconvertible-notice ul {
  margin: 6px 0 0;
  padding-left: 18px;
}
.review-unconvertible-notice li { margin-top: 2px; }

.bundle-context-block {
  margin: 8px 0;
  padding: 8px 12px;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  background: var(--amber-bg);
  border-left: 2px solid var(--amber);
  border-radius: 0 3px 3px 0;
}
.bundle-context-block p {
  margin: 0;
}
.bundle-context-block p + p {
  margin-top: 6px;
}
.bundle-context-block.hidden,
.bundle-context-merged.hidden,
.bundle-context-supplements.hidden { display: none; }

/* Action 4 destructive-bundle clarity helper (Gap 37, 2026-05-12).
 * Reuses the amber-tinted callout idiom established by
 * .recommendation-explanation / .ai-verdict-low / .bundle-context-block. */
.action-helper-text {
  margin: 4px 0 8px;
  padding: 6px 10px;
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
  background: var(--amber-bg);
  border-left: 2px solid var(--amber);
  border-radius: 0 3px 3px 0;
}
.action-helper-text.hidden { display: none; }

/* Existing / new attachment groupings. Each block has a label header,
 * one filename row (link for downloadable existing PDFs, plain span
 * for the not-yet-uploaded new PDF), and an optional amount row. */
.attachment-block {
  margin: 12px 0;
  padding: 12px 14px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.attachment-block-label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.attachment-row {
  margin: 4px 0 !important;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--serif);
  font-size: 14px;
}
.attachment-label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-right: 6px;
}
.attachment-icon {
  display: inline-block;
  font-size: 14px;
  line-height: 1;
  opacity: 0.85;
}
.attachment-link {
  color: var(--gold);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  word-break: break-all;
}
.attachment-link:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.attachment-link-static {
  color: var(--text);
  cursor: default;
}
.attachment-link-static:hover {
  color: var(--text);
  text-decoration: none;
}
.attachment-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.attachment-list li {
  display: flex;
  align-items: center;
  font-family: var(--serif);
  font-size: 14px;
}
.amount-row {
  margin: 4px 0 0 !important;
  font-family: var(--serif);
  font-size: 14px;
}
.amount-label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-right: 6px;
}
.amount-value {
  color: var(--text);
  font-weight: 500;
}
.amount-value-new {
  color: var(--gold);
  font-weight: 600;
}

/* AI verdict block — header + summary line + reasoning paragraph. The
 * confidence pill on the right echoes the existing .badge pattern. */
.ai-verdict {
  margin: 12px 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--gold-mute);
  border-radius: 4px;
  background: var(--gold-soft);
}
.ai-verdict.hidden {
  display: none;
}
.ai-verdict-headline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.ai-verdict-label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.ai-verdict-confidence {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}
.ai-verdict-confidence.confidence-high {
  color: var(--green);
  background: var(--green-bg);
  border: 1px solid var(--green);
}
.ai-verdict-confidence.confidence-low {
  color: var(--amber);
  background: var(--amber-bg);
  border: 1px solid var(--amber);
}
.ai-verdict-summary {
  margin: 0 0 4px !important;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--text);
}
.ai-verdict-reasoning {
  margin: 0 !important;
  font-family: var(--serif);
  font-size: 13px;
  color: var(--text-dim);
  font-style: italic;
  line-height: 1.5;
}

/* Finding 19 (2026-05-07): plain-English recommendation annotation.
 * Sits below the verdict prose inside the .ai-verdict block. The
 * verdict prose is serif italic muted text (.ai-verdict-reasoning);
 * this annotation deliberately goes UPRIGHT (not italic) so it
 * reads as a separate insight rather than continuing prose. Soft
 * amber border-left + faint amber-bg tint flag the line as "the
 * deterministic recommendation translation" without competing
 * with the orange Procore-destination CTA family. Color stays
 * clear (var(--text)) so the line is read carefully — it's the
 * load-bearing operator-facing safety net behind the AI verdict. */
.recommendation-explanation {
  margin: 8px 0 0 !important;
  padding: 8px 12px;
  font-family: var(--serif);
  font-size: 13px;
  font-style: normal;
  line-height: 1.5;
  color: var(--text);
  background: var(--amber-bg);
  border-left: 2px solid var(--amber);
  border-radius: 0 3px 3px 0;
}
.recommendation-explanation.hidden {
  display: none;
}

/* Low-confidence fallback message — shown in place of the verdict
 * block when AI returned confidence: "low" or unable_to_classify. */
.ai-verdict-low {
  margin: 12px 0 16px !important;
  padding: 10px 14px;
  border-left: 2px solid var(--amber);
  background: var(--amber-bg);
  font-family: var(--serif);
  font-size: 13px;
  color: var(--text);
  font-style: italic;
  line-height: 1.5;
}

/* 2026-05-19 / manage-pages-polish: amber "verify" badge for inputs whose
 * underlying file/attachment has had its content composition changed by a
 * cross-file move or extract. Clears on operator edit. */
.needs-verify {
  border-left: 2px solid var(--amber);
  background: var(--amber-bg);
  padding-left: 6px;
}

/* Recommended-action pill on the AI-suggested button. Adds a "Recommended"
 * label inline with the button text and highlights the button border so
 * it's visually distinct without overwhelming the modal. */
.action-btn.recommended {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold-soft), inset 0 0 0 1px var(--gold);
  position: relative;
}
.action-btn.recommended::after {
  content: "RECOMMENDED";
  position: absolute;
  top: -8px;
  right: 12px;
  background: var(--gold);
  color: #111;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.18em;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
}
.action-btn.recommended:hover::after {
  background: #111;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 2px 7px;
}

/* Secondary button used by the always-visible "Open in Procore" CTA on
 * conflict modals. Less visual weight than .btn-conflict (gold-on-dark
 * outline rather than solid fill) so it doesn't compete with the
 * action buttons. Doesn't dismiss the modal — clicking opens the deep
 * link in a new tab and returns focus.
 *
 * Note: superseded by .btn-procore-link below for "Open in Procore" /
 * "View in Procore" CTAs. The class definition is kept around in case
 * any future modal needs the gold-outline treatment for some other
 * non-Procore secondary CTA — no current consumers. */
.btn-secondary {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold-mute);
}
.btn-secondary:hover {
  color: #111;
  background: var(--gold);
  border-color: var(--gold);
}

/* Procore-branded CTA for "Open in Procore" / "View in Procore"
 * buttons across all modals. Uses Procore's exact brand orange
 * (#D55525, sampled from the Procore web UI) with white text so the
 * destination is visually unmistakable — the user is leaving Potter
 * AI to interact with Procore directly. Distinct from the gold-on-
 * dark .btn-conflict / .action-btn.recommended treatments so it
 * never competes with the recommended-action highlight inside a
 * conflict modal. */
.btn-procore-link {
  background: #D55525;
  color: #FFFFFF;
  border-color: #D55525;
}
.btn-procore-link:hover {
  background: #B8471F;
  border-color: #B8471F;
  color: #FFFFFF;
}
.btn-procore-link:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 2px;
}

/* ── toast ────────────────────────────────────────────────────────────── */

#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
  max-width: 400px;
}
.toast {
  padding: 14px 18px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--gold);
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text);
  border-radius: 3px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  animation: slide 0.2s ease;
}
.toast.error { border-left-color: var(--red); }
.toast.success { border-left-color: var(--green); }
.toast.warn { border-left-color: var(--amber); }

@keyframes slide {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Review Screen — v19 two-pane layout (v19-port-2026-05-15) ─── */

/* v19-port-2026-05-15: two-pane review screen overlay */
.review-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  display: grid;
  grid-template-rows: 44px 1fr;
  overflow: hidden;
}
.review-screen.hidden { display: none; }

.review-app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; border-bottom: 1px solid var(--border); background: var(--bg-elev);
}
.review-app-header h2 { font-size: 13px; font-weight: 600; margin: 0; letter-spacing: 0.01em; }
.review-actions { display: flex; gap: 8px; align-items: center; }
.review-app-body { display: grid; grid-template-columns: 400px 1fr; overflow: hidden; }

/* Sidebar — resizable via the right-edge handle */
.review-sidebar {
  background: var(--bg-elev); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
  position: relative;  /* anchor for the resize handle */
}
.review-sidebar-scroll { flex: 1; overflow-y: auto; padding: 8px 0; }

/* Resize handle — 6px-wide invisible strip sitting on the sidebar's right edge.
   col-resize cursor (↔) signals draggability. Subtle amber highlight while dragging. */
.review-sidebar-resize {
  position: absolute;
  top: 0; right: -3px; bottom: 0;
  width: 6px;
  cursor: col-resize;
  z-index: 20;
  background: transparent;
  transition: background 0.1s ease;
}
.review-sidebar-resize:hover, .review-sidebar-resize.dragging {
  background: rgba(217, 161, 75, 0.35);
}
body.resizing-sidebar { cursor: col-resize; user-select: none; }
body.resizing-sidebar iframe { pointer-events: none; }  /* iframes swallow mouseup otherwise */

.section { padding: 0; margin-bottom: 4px; }
/* Section header — clicking the row toggles expand/collapse. The editable
   children stopPropagation so direct clicks on text won't toggle. */
.section-header {
  display: flex; align-items: center; padding: 8px 12px 8px 14px;
  user-select: none; position: relative;
  cursor: pointer;
}
.section-header:hover { background: var(--bg-hover); }
.section .section-header::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 3px; background: var(--bf-color, transparent); border-radius: 0 2px 2px 0;
}
.section.bf-1 { --bf-color: var(--bf-1); }
.section.bf-2 { --bf-color: var(--bf-2); }
.section.bf-3 { --bf-color: var(--bf-3); }
.section.bf-4 { --bf-color: var(--bf-4); }
.section.needs-review { --bf-color: var(--amber); }

.chevron {
  display: inline-block; width: 14px; color: var(--text-dim); font-size: 10px;
  transition: transform 0.1s ease; cursor: pointer;
}
.section.collapsed .chevron { transform: rotate(-90deg); }

.section-label { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.section-label .primary {
  font-size: 13px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.section-label .secondary { font-size: 11px; color: var(--text-dim); }
.section-amount {
  font-size: 12px; color: var(--text-dim); margin-left: 8px; white-space: nowrap;
}

/* Inline-editable: click target is tight to the visible text. The hover/focus
   ring uses box-shadow (purely cosmetic, doesn't expand the hit area) so
   clicking just OUTSIDE the text won't accidentally focus the editable. */
.editable {
  cursor: text; padding: 0; margin: 0;
  border-radius: 3px; outline: none;
  transition: box-shadow 0.08s ease;
  display: inline-block; max-width: 100%;
}
.editable:hover { box-shadow: 0 0 0 3px var(--edit-hover); }
.editable:focus { box-shadow: 0 0 0 3px var(--edit-focus); }
.editable.vendor-edit { min-width: 140px; }
.editable.amount-edit { min-width: 64px; text-align: right; }
.editable.filename-edit { min-width: 180px; }
.editable[data-placeholder]:empty::before {
  content: attr(data-placeholder); color: var(--text-dimmer);
  font-style: italic; pointer-events: none;
}
.editable[data-placeholder]:empty:focus::before { content: ''; }

.section-children { padding: 4px 12px 6px 28px; }
.section.collapsed .section-children { display: none; }

.attachment-group {
  position: relative; padding: 6px 6px 6px 10px; margin: 4px 0;
  background: var(--bg-elev-2); border: 1px solid var(--border-subtle);
  border-left: 2px solid var(--border); border-radius: 4px;
}
.attachment-group:hover { border-color: var(--border-stronger); }
.attachment-group.governs { border-left-color: var(--amber); }
.attachment-group-header {
  display: flex; align-items: center; gap: 8px;
  padding: 1px 4px 4px 4px;
}
/* Attachment filename — the AI-suggested name (or operator-typed if AI failed
   or it's a new attachment). Primary identity of the attachment. */
.attachment-filename {
  flex: 1;
  font-size: 12px;
  color: var(--text);
  white-space: nowrap; overflow: hidden;
  min-width: 0;
}
/* Per-attachment amount, right-aligned; same editable styling */
.attachment-amount {
  font-size: 11px; color: var(--text-dim); white-space: nowrap;
}
.attachment-group.governs .attachment-amount { color: var(--amber); }

/* Single-attachment bid forms hide the governs radio (governs is implicit;
   no second attachment to choose between) */
.section.single-attachment .governs-radio { display: none; }

.governs-radio {
  display: inline-block; width: 11px; height: 11px;
  border: 1.5px solid var(--text-dimmer); border-radius: 50%;
  cursor: pointer; position: relative; flex-shrink: 0;
}
.governs-radio:hover { border-color: var(--amber); }
.governs-radio.active { border-color: var(--amber); }
.governs-radio.active::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 5px; height: 5px; background: var(--amber); border-radius: 50%;
}
.governs-label {
  font-size: 10px; color: var(--text-dimmer);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.governs-radio.active + .governs-label { color: var(--amber); }

.file-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 10px; cursor: pointer; border-radius: 4px;
  margin: 0 6px 0 0; min-height: 26px;
}
.file-row:hover { background: var(--bg-hover); }
.file-row.active {
  background: var(--bg-elev-3); box-shadow: inset 2px 0 0 var(--green);
}
.file-row .file-icon { flex: 0 0 14px; color: var(--text-dim); font-size: 13px; }
.file-row .file-name {
  flex: 1; font-size: 12px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; color: var(--text);
}
.file-row .file-pages { font-size: 10px; color: var(--text-dimmer); flex-shrink: 0; }

/* v19-port-2026-05-15 / file-level-amounts: per-file amount editable on file rows */
.file-row .file-amount {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 6px;
}
.file-row .file-amount-edit {
  min-width: 48px;
  text-align: right;
}
.file-row .file-amount-edit:empty::before {
  content: attr(data-placeholder);
  color: var(--text-dimmer);
  font-style: italic;
}
.attachment-group.governs .file-row .file-amount-edit { color: var(--amber); }

/* Read-only derived displays — attachment-amount + section-amount.
 * Visually identical to the editable spans they replace but with no
 * interactive affordance. */
.attachment-amount-display, .section-amount-display {
  /* Inherit from .attachment-amount + .section-amount; nothing extra needed */
}

.ghost-zone {
  margin: 8px 6px 4px 10px; padding: 10px 10px;
  border: 1.5px dashed var(--border-stronger);
  background: rgba(255, 255, 255, 0.015);
  border-radius: 4px; color: var(--text-dim); font-size: 11px;
  text-align: center; cursor: pointer; transition: all 0.1s ease;
}
.ghost-zone:hover { border-color: var(--amber); background: var(--amber-bg); color: var(--amber); }

.review-sidebar-footer { flex-shrink: 0; background: var(--bg-elev); }
.footer-zone {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-top: 1px solid var(--border);
  cursor: pointer; user-select: none; min-height: 52px;
}
.footer-zone:hover { background: var(--bg-hover); }
.footer-zone .icon { font-size: 14px; flex-shrink: 0; width: 18px; text-align: center; }
.footer-zone .text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.footer-zone .label { font-size: 12px; font-weight: 500; color: var(--text); }
.footer-zone .hint { font-size: 10px; color: var(--text-dimmer); }
.footer-zone .count { font-size: 10px; color: var(--text-dimmer); flex-shrink: 0; }
.footer-zone.new-bidform .icon { color: var(--amber); }
.footer-zone.new-bidform:hover { background: var(--amber-bg); }
.footer-zone.new-bidform:hover .label,
.footer-zone.new-bidform:hover .icon { color: var(--amber); }
.footer-zone.recycle .icon { color: var(--text-dim); }

/* Recycle Bin drawer — sidebar-internal, drawer-below-chip (2026-05-18).
 * Slides open below the footer chip. Sidebar-scroll above (flex: 1)
 * shrinks to make room when .open. Auto-collapse on dragstart of a
 * drawer file row is handled in app.js. */
.recycle-bin-drawer {
  flex-shrink: 0;
  background: var(--bg-elev-2);
  border-top: 1px solid transparent;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.22s ease-out, border-top-color 0.22s ease-out;
}
.recycle-bin-drawer.open {
  max-height: 130px;
  border-top-color: var(--border);
}
.recycle-bin-drawer .drawer-head {
  padding: 8px 14px 4px;
  font-size: 10px;
  color: var(--text-dimmer);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.recycle-bin-drawer .drawer-rows {
  padding: 0 6px 8px;
  overflow-y: auto;
  max-height: 92px;
}
.recycle-bin-drawer .file-row { cursor: grab; }
.recycle-bin-drawer .file-row:active { cursor: grabbing; }

/* Caret on any footer zone — rotates 180° when .expanded.
 * Chip background tints on .expanded to signal active state. */
.footer-zone .toggle-caret {
  color: var(--text-dim);
  font-size: 10px;
  margin-left: 4px;
  transition: transform 0.18s ease-out;
  display: inline-block;
}
.footer-zone.expanded .toggle-caret { transform: rotate(180deg); }
.footer-zone.expanded { background: var(--bg-hover); }

/* Main pane */
.review-main { display: flex; flex-direction: column; overflow: hidden; background: var(--pdf-bg); }
.review-main-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px; background: var(--bg-elev); border-bottom: 1px solid var(--border);
  flex-shrink: 0; min-height: 36px;
}
.review-main-header .file-info { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.review-main-header .file-info .name {
  font-size: 13px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.review-main-header .file-info .meta { font-size: 11px; color: var(--text-dim); white-space: nowrap; flex-shrink: 0; }
.review-main-header .header-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

/* v19-port-2026-05-15: pickup from Task 2 — move inline style to CSS */
.review-main-header #review-zoom-reset {
  min-width: 44px;
  text-align: center;
  font-size: 11px;
}

.review-main-body {
  flex: 1; overflow: auto; position: relative;
  background: var(--pdf-bg);
  padding: 16px;  /* fixed, static gray padding around the PDF — doesn't grow */
}
/* PDF.js canvas container. Pages are rendered ONCE at a high-res backing
   store; CSS handles the live resize. Each canvas uses width: 100% so it
   tracks the wrapper width on every layout pass — smooth and continuous
   with no JS work per frame. height: auto preserves the page aspect ratio
   automatically (canvases have intrinsic aspect from their backing-store
   width × height attributes). When pdfZoom > 1, --pdf-zoom-pct grows past
   100% and the wrapper's overflow: auto provides scrollbars. */
.pdf-wrapper {
  width: 100%; height: 100%;
  overflow: auto;
  background: var(--pdf-bg);
  --pdf-zoom-pct: 100%;
}
.pdf-wrapper canvas {
  display: block;
  margin: 0 auto 8px;
  background: white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  width: var(--pdf-zoom-pct);
  height: auto;
}
.pdf-loading {
  display: flex; align-items: center; justify-content: center;
  height: 100%;
  color: var(--text-dim); font-size: 12px;
}
.review-main-body.manage .pdf-wrapper { display: none; }

/* Page Management mode (Plan B stub) */
.page-manage {
  flex: 1; display: none; flex-direction: column; background: var(--pdf-bg); overflow: hidden;
  /* Manage Pages 2026-05-18: explicit height so the inner page-list-scroll
   * (flex: 1; overflow-y: auto;) constrains correctly. Without this, the
   * whole pane scrolls together, taking the toolbar with it. */
  height: 100%;
}
.page-manage.active { display: flex; }

/* Manage Pages 2026-05-18: when manage is active, suppress the
 * .review-main-body's own padding/overflow so .page-manage gets the full
 * height and handles its own scroll internally (page-list-scroll). */
.review-main-body.manage {
  padding: 0;
  overflow: hidden;
}

.page-manage-toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; background: var(--bg-elev-2);
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.page-manage-toolbar .selected-count {
  font-size: 12px; color: var(--text-dim); margin-right: 8px;
}
.page-manage-toolbar .selected-count strong { color: var(--text); }
.page-manage-toolbar .spacer { flex: 1; }

.page-list {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}

/* Master "select all" row — sits above the page rows.
   Padding matches a page row's so the master checkbox column-aligns
   vertically with the per-page checkboxes below. */
.page-list-header {
  display: flex; align-items: center; gap: 14px;
  padding: 6px 14px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4px;
  cursor: pointer;
  user-select: none;
  border-radius: 6px;
}
.page-list-header:hover { background: var(--bg-hover); }
.page-list-header .label {
  flex: 1;
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Master checkbox — empty / checked / indeterminate ("—" dash) */
.master-checkbox {
  width: 16px; height: 16px;
  border: 1.5px solid var(--text-dimmer); border-radius: 3px;
  flex-shrink: 0; position: relative; cursor: pointer;
}
.master-checkbox.checked {
  background: var(--amber); border-color: var(--amber);
}
.master-checkbox.checked::after {
  content: "✓"; position: absolute; top: -2px; left: 2px;
  font-size: 13px; color: var(--bg); font-weight: 700;
}
.master-checkbox.indeterminate {
  background: var(--amber); border-color: var(--amber);
}
.master-checkbox.indeterminate::after {
  content: ""; position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 8px; height: 2px; background: var(--bg); border-radius: 1px;
}

.page-row {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border); border-radius: 6px;
  cursor: pointer;
}
.page-row:hover { border-color: var(--border-stronger); }
.page-row.selected {
  border-color: var(--amber); background: var(--amber-bg);
}
.page-row .drag-handle {
  color: var(--text-dimmer); font-size: 14px; cursor: grab; user-select: none;
}

/* Page thumb wrapper — fixed dimensions; the inner img rotates inside */
.page-thumb {
  width: 110px; height: 142px;
  background: var(--bg);
  border: 1px solid var(--border); border-radius: 2px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  position: relative;
}
.page-thumb img {
  max-width: 100%; max-height: 100%;
  display: block;
  /* CSS transition handles the smooth 90° animation; rotation values
     ACCUMULATE (never modulo to 0) so each click animates the short
     way. */
  transition: transform 0.25s ease;
  transform-origin: center center;
}

.page-row .page-info {
  flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.page-row .page-num { font-size: 12px; font-weight: 600; color: var(--text); }
.page-row .page-desc { font-size: 11px; color: var(--text-dim); }

/* Per-page rotation action group */
.page-row .page-actions {
  display: flex; align-items: center; gap: 2px; flex-shrink: 0;
}
.page-row .page-actions .btn-icon {
  padding: 4px 7px; font-size: 13px;
}

.page-row .page-checkbox {
  width: 16px; height: 16px;
  border: 1.5px solid var(--text-dimmer); border-radius: 3px;
  flex-shrink: 0; position: relative; cursor: pointer;
}
.page-row.selected .page-checkbox {
  background: var(--amber); border-color: var(--amber);
}
.page-row.selected .page-checkbox::after {
  content: "✓"; position: absolute; top: -2px; left: 2px;
  font-size: 13px; color: var(--bg); font-weight: 700;
}

/* Buttons — scoped to .review-screen so v19 styles don't cascade over global .btn */
.review-screen .btn {
  padding: 6px 14px; background: var(--bg-elev-2); border: 1px solid var(--border);
  color: var(--text); border-radius: 4px; font-size: 12px; font-weight: 500;
  cursor: pointer; font-family: inherit;
}
.review-screen .btn:hover { background: var(--bg-hover); }
.review-screen .btn-confirm {
  background: var(--green); color: var(--green-text); border-color: var(--green);
}
.review-screen .btn-confirm:hover { background: transparent; color: var(--green); }
.review-screen .btn-amber {
  background: var(--amber-bg); border-color: var(--amber); color: var(--amber);
}
.review-screen .btn-amber:hover { background: rgba(217, 161, 75, 0.18); }
.review-screen .btn-sm { padding: 5px 10px; font-size: 11px; }
.review-screen .btn-icon {
  padding: 4px 8px; background: transparent; border: 1px solid transparent;
  color: var(--text-dim); border-radius: 4px; cursor: pointer; font-size: 14px; line-height: 1;
}
.review-screen .btn-icon:hover { background: var(--bg-hover); color: var(--text); }

/* Disabled state for toolbar buttons */
.review-screen .btn:disabled, .review-screen .btn-icon:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.review-screen .btn:disabled:hover, .review-screen .btn-icon:disabled:hover {
  background: var(--bg-elev-2);
  color: var(--text-dim);
}
.review-screen .btn-amber:disabled { color: var(--text-dimmer); border-color: var(--border); background: var(--bg-elev-2); }

/* Toolbar divider */
.toolbar-divider { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }

/* Dropdown */
.menu {
  position: absolute; top: 100%; right: 0; margin-top: 4px;
  background: var(--bg-elev-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 0; min-width: 220px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4); display: none; z-index: 100;
}
.menu.open { display: block; }
.menu-item {
  display: block; padding: 7px 14px; font-size: 12px; color: var(--text);
  cursor: pointer; background: transparent; border: 0; width: 100%;
  text-align: left; font-family: inherit;
}
.menu-item:hover { background: var(--bg-hover); }
.menu-item.danger { color: var(--red); }
.menu-divider { height: 1px; background: var(--border); margin: 4px 0; }
.menu-anchor { position: relative; }

/* Attachment input rows (carried forward from old review screen for plan modal parity) */
.attachment-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-top: 6px;
  flex-wrap: wrap;
}

.attachment-input-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.attachment-input-group:has(input.filename) { flex: 1; min-width: 200px; }
.attachment-input-group:has(input.amount) { width: 120px; }
.attachment-input-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim, #888);
}

.attachment-row input.filename {
  flex: 1;
  min-width: 200px;
}
.attachment-row input.filename.invalid,
#f-filename.invalid {
  border-color: var(--red);
}
.attachment-row input.filename.collision-renamed,
#f-filename.collision-renamed {
  border-color: var(--gold);
  box-shadow: 0 0 8px var(--gold-glow);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.attachment-filename-error {
  color: var(--red);
  font-size: 12px;
  margin-top: 4px;
}
.attachment-row input.amount { width: 120px; }
.attachment-row label.governs {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  cursor: pointer;
}
.attachment-row .governs {
  align-self: center;
  font-size: 12px;
}

.btn-remove-attachment {
  font-size: 11px;
  padding: 2px 6px;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
}
.btn-remove-attachment:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.btn-remove-attachment:hover:not(:disabled) {
  border-color: var(--text);
  color: var(--text);
}

.btn-delete-bidform {
  font-size: 11px;
  padding: 2px 6px;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
}
.btn-delete-bidform:hover {
  border-color: var(--text);
  color: var(--text);
}

.files-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 60px;
}

/* Plan modal multi-attachment block (Task 4.1) */
.plan-attachments {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.plan-attachment-block {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px;
  background: var(--bg-elev);
}

/* ── Manual Fixes Panel (2026-05-11) ──────────────────────────────────
 * Amber callout inside the exec / MUR modal listing the three Procore
 * fields auth-walled to OAuth (Pattern #4): Primary Bidding Contact,
 * Bid Reminder Emails, Drawings. Operator clicks "Open in Procore" on
 * each row to complete the fix in Procore's UI. The panel renders only
 * when Potter AI created a brand-new bid package this iteration.
 *
 * Reuses --amber-bg / --amber / .btn-procore-link already in the
 * codebase. .btn-primary (NOT orange) stays the modal's primary action
 * — orange .btn-procore-link is reserved for Procore destinations.
 *
 * Spec: docs/superpowers/specs/2026-05-08-manual-fixes-panel-design.md
 */

.manual-fixes-panel {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--amber-bg);
  border-left: 2px solid var(--amber);
  border-radius: 0 3px 3px 0;
}

.manual-fixes-panel.hidden {
  display: none;
}

.mfp-header {
  margin: 0 0 10px 0;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.mfp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
}

.mfp-row + .mfp-row {
  border-top: 1px solid rgba(217, 161, 75, 0.18);
}

.mfp-label {
  font-size: 13px;
  color: var(--text);
  flex: 1 1 auto;
}

.mfp-link {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .mfp-row {
    flex-direction: column;
    align-items: stretch;
  }
  .mfp-link {
    align-self: flex-end;
  }
}

/* Step-list collapse on success (2026-05-11). When all 7 steps land,
 * collapse to a single summary line so the operator sees a clean
 * success screen. Audit detail stays in potter_ai_log.txt. Failures
 * keep the list expanded so the failed step + detail are visible. */
.steps.collapsed > li {
  display: none;
}
.steps.collapsed::after {
  content: "✓ All 7 steps complete  (click to expand)";
  display: block;
  padding: 8px 0;
  color: var(--success, #2e8540);
  font-weight: 500;
  cursor: pointer;
}

/* ─── Manage Pages mode — page-row + interactions (2026-05-18) ─── */
/* The .page-manage / .page-list / .master-checkbox / etc. rules already
   shipped during the v19 port (Task 3 stub). This block adds the per-row
   styles + drag-and-drop indicators + deleted-section visuals + hover-zoom
   overlay + sidebar extracted-badge that were deferred to v1 of Manage
   Pages mode. */

.page-list-scroll { flex: 1; overflow-y: auto; padding: 12px 16px; }

.page-source-legend {
  display: none;
  gap: 12px; align-items: center;
  padding: 6px 16px;
  font-size: 11px; color: var(--text-dim);
  background: var(--bg-elev-2);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.page-source-legend.active { display: flex; flex-wrap: wrap; }
.page-source-legend .item { display: inline-flex; align-items: center; gap: 5px; }
.page-source-legend .dot { width: 8px; height: 8px; border-radius: 50%; }

.page-row {
  display: flex; align-items: center; gap: 14px;
  padding: 8px 14px;
  margin-bottom: 4px;
  border-radius: 6px;
  background: var(--bg-elev);
  border: 1px solid var(--border-subtle);
  cursor: pointer; user-select: none;
  transition: background 0.1s ease, border-color 0.1s ease;
  position: relative;
}
.page-row::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 3px; background: var(--source-color, transparent);
  border-radius: 0 2px 2px 0;
}
.page-row:hover { background: var(--bg-elev-2); border-color: var(--border); }
.page-row.selected { background: var(--amber-bg); border-color: var(--amber); }
.page-row.dragging { opacity: 0.4; }
.page-row.drop-before { box-shadow: 0 -3px 0 0 var(--amber); }
.page-row.drop-after { box-shadow: 0 3px 0 0 var(--amber); }

/* Custom zoom slider (2026-05-18). Click+drag scrubs RELATIVE to the
 * starting mouse X — no jump-to-position. The thumb is positioned via
 * the --thumb-pos CSS variable updated by JS in applyPdfZoom(). */
.zoom-slider {
  position: relative;
  width: 110px;
  height: 16px;
  cursor: ew-resize;
  margin: 0 4px;
  --thumb-pos: 25%;
}
.zoom-slider-track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  transform: translateY(-50%);
  pointer-events: none;
}
.zoom-slider-thumb {
  position: absolute;
  top: 50%;
  left: var(--thumb-pos);
  width: 12px;
  height: 12px;
  background: var(--text-dim);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: background 0.1s ease;
}
.zoom-slider:hover .zoom-slider-thumb,
.zoom-slider:active .zoom-slider-thumb { background: var(--text); }

#review-zoom-input {
  width: 38px;
  padding: 2px 4px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 3px;
  font-size: 11px;
  text-align: right;
  font-family: inherit;
  outline: none;
}
#review-zoom-input:hover { border-color: var(--border-stronger); }
#review-zoom-input:focus { border-color: var(--text-dim); }

#review-zoom-suffix {
  font-size: 11px;
  color: var(--text-dim);
  margin-left: -2px;
  margin-right: 4px;
  user-select: none;
}

.page-row .drag-handle {
  color: var(--text-dimmer); font-size: 14px; line-height: 1; cursor: grab;
  user-select: none; flex-shrink: 0; width: 14px;
}
.page-row .drag-handle:active { cursor: grabbing; }
.page-row .page-thumb {
  width: 90px; height: 116px;
  flex-shrink: 0;
  background: white;
  border-radius: 2px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  overflow: hidden;
  position: relative;
}
.page-row .page-thumb canvas {
  width: 100%; height: 100%;
  display: block;
  transition: transform 0.25s ease;
  transform-origin: center;
}
.page-row .page-info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.page-row .page-num {
  font-size: 13px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.page-row .page-desc {
  font-size: 11px; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.page-row .page-source {
  font-size: 9px; color: var(--text-dimmer);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin-top: 2px;
}
.page-row .page-source-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  margin-right: 4px; background: var(--source-color); vertical-align: middle;
}
.page-row .page-checkbox {
  width: 18px; height: 18px;
  border: 1.5px solid var(--text-dimmer);
  border-radius: 3px;
  flex-shrink: 0; position: relative; cursor: pointer;
  background: transparent;
  transition: background 0.1s ease, border-color 0.1s ease;
}
.page-row .page-checkbox.checked,
.master-checkbox.checked {
  background: var(--amber); border-color: var(--amber);
}
.page-row .page-checkbox.checked::after,
.master-checkbox.checked::after {
  content: "✓"; position: absolute; top: -2px; left: 2px;
  font-size: 14px; color: var(--pdf-bg); font-weight: 700;
}
.master-checkbox.indeterminate {
  background: var(--amber); border-color: var(--amber);
}
.master-checkbox.indeterminate::after {
  content: "—"; position: absolute; top: -3px; left: 3px;
  font-size: 14px; color: var(--pdf-bg); font-weight: 700;
}

/* Deleted-pages section — sticky bar pinned to bottom of .page-manage.
 * When expanded, the list appears ABOVE the header so the bar stays put
 * while the list grows upward into the page-list-scroll above. */
.deleted-section {
  /* Sits BELOW .page-list-scroll as a flex sibling inside .page-manage.
   * flex-shrink: 0 keeps it at content height; .page-list-scroll above
   * gets the remaining height via flex: 1. Page rows scroll in their own
   * viewport without ever being covered by this bar. */
  flex-shrink: 0;
  background: var(--bg-elev-2);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.deleted-section.hidden { display: none; }
.deleted-section-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; cursor: pointer; user-select: none;
  color: var(--text-dim); font-size: 12px;
  flex-shrink: 0;
}
.deleted-section-header:hover { background: var(--bg-hover); }
.deleted-section-header .count { color: var(--text); font-weight: 500; }
.deleted-section-header .chev {
  color: var(--text-dimmer); font-size: 10px; margin-left: 4px;
  transition: transform 0.15s ease; display: inline-block;
}
.deleted-section:not(.collapsed) .chev { transform: rotate(180deg); }
.deleted-list {
  max-height: 0;
  overflow-y: auto;
  transition: max-height 0.22s ease-out;
  background: var(--bg-elev);
}
.deleted-section:not(.collapsed) .deleted-list {
  max-height: 220px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.deleted-list .page-row { opacity: 0.55; margin-left: 12px; margin-right: 12px; }
.deleted-list .page-row:hover { opacity: 1; }
.deleted-list .restore-btn {
  background: transparent; border: 1px solid var(--amber); color: var(--amber);
  padding: 3px 10px; border-radius: 3px; cursor: pointer; font-size: 11px;
  margin-left: 8px;
}
.deleted-list .restore-btn:hover { background: var(--amber-bg); }


/* Hover-zoom overlay — shared, repositioned on hover */
.page-hover-zoom {
  position: fixed;
  z-index: 200;
  background: white;
  border-radius: 4px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
  width: 600px;
  max-width: 60vw;
  pointer-events: none;
  transition: opacity 0.1s ease;
}
.page-hover-zoom.hidden { opacity: 0; pointer-events: none; }
.page-hover-zoom:not(.hidden) { opacity: 1; }
.page-hover-zoom canvas {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.25s ease;
  transform-origin: center;
}

/* Sidebar — "extracted" badge on dynamically-spawned file rows */
.file-row .extracted-badge {
  font-size: 9px; color: var(--amber);
  background: var(--amber-bg);
  border: 1px solid var(--amber);
  padding: 1px 5px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 4px;
}

/* ── Word/Excel conversion hint on plan modal (word-excel-conversion) ── */
.plan-converted-hint {
  margin: 6px 0 0;
  padding: 6px 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  color: var(--text);
  background: var(--amber-bg);
  border-left: 2px solid var(--amber);
  border-radius: 0 3px 3px 0;
}
.plan-converted-hint.hidden { display: none; }
