/* ═══════════════════════════════════════════════════════════════════════════
   ChangeFluent Quote Management — v0.5.8 styles
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --cfqm-primary:   var(--ast-global-color-0, #307090);
  --cfqm-accent:    var(--ast-global-color-1, #00C8E0);
  --cfqm-border:    rgba(15,23,42,.1);
  --cfqm-muted:     rgba(15,23,42,.55);
  --cfqm-card:      #ffffff;
  --cfqm-bg:        rgba(248,249,251,.8);
  --cfqm-radius:    14px;
  --cfqm-radius-sm: 8px;
  /* Grey-ramp tokens (v0.42) — light defaults match the previous hard-coded
     values exactly, so light-mode sites (Fixdly) render identically. The dark
     theme below re-points these for Genrsus. */
  --cfqm-ink:        #111827;  /* primary text */
  --cfqm-ink-2:      #374151;  /* secondary text */
  --cfqm-muted-2:    #9ca3af;  /* faint text */
  --cfqm-border-2:   #e5e7eb;  /* solid light border */
  --cfqm-surface:    #f9fafb;  /* subtle surface */
  --cfqm-surface-2:  #f3f4f6;  /* surface hover / chip */
}

/* ═══════════════════════════════════════════════════════════════════════════
   DARK THEME  (applied via <body class="cfqm-dark">, added only in Genrsus mode)
   Re-points the design tokens to a charcoal/teal palette that matches the
   polished marketing pages, then fixes the semantic (status) colours so nothing
   is dark-on-dark. Scoped entirely under body.cfqm-dark, so other sites are
   untouched.
   ═══════════════════════════════════════════════════════════════════════════ */
body.cfqm-dark {
  --cfqm-accent:     #16D0C6;
  --cfqm-primary:    #2bb3ad;
  --cfqm-card:       #1e2024;
  --cfqm-bg:         #161719;
  --cfqm-border:     rgba(255,255,255,.10);
  --cfqm-border-2:   rgba(255,255,255,.14);
  --cfqm-muted:      rgba(233,238,243,.66);
  --cfqm-muted-2:    rgba(233,238,243,.46);
  --cfqm-ink:        #eef2f6;
  --cfqm-ink-2:      #cbd2d9;
  --cfqm-surface:    #24272c;
  --cfqm-surface-2:  #2b2f35;
}
/* Ensure inherited text is light across the whole tool, whatever the theme sets. */
body.cfqm-dark .cfqm-wrap,
body.cfqm-dark .cfqm-board-wrap { color: var(--cfqm-ink); }

/* Primary colour is used both as a button background (needs white text) AND as
   link/label text; brighten only the TEXT usages so they read on charcoal. */
body.cfqm-dark .cfqm-subtitle,
body.cfqm-dark .cfqm-link,
body.cfqm-dark .cfqm-qdash-mcard-customer { color:#54d8e2; }

/* Inputs: dark field, light text, teal focus ring. */
body.cfqm-dark .cfqm-field input,
body.cfqm-dark .cfqm-field textarea,
body.cfqm-dark .cfqm-field select,
body.cfqm-dark .cfqm-fb-status-select,
body.cfqm-dark .cfqm-calc-select,
body.cfqm-dark .cfqm-calc-unit-btn,
body.cfqm-dark .cfqm-home-ai-input,
body.cfqm-dark .cfqm-inline-ai-textarea,
body.cfqm-dark .cfqm-ai-draft-textarea,
body.cfqm-dark .cfqm-fb-note-textarea,
body.cfqm-dark .cfqm-milestone-add-title,
body.cfqm-dark .cfqm-milestone-add-date,
body.cfqm-dark .cfqm-proj-cust-query-input,
body.cfqm-dark .cfqm-kanban-quickadd-input {
  background: var(--cfqm-card); color: var(--cfqm-ink); border-color: var(--cfqm-border-2);
}
body.cfqm-dark .cfqm-field input::placeholder,
body.cfqm-dark .cfqm-field textarea::placeholder { color: var(--cfqm-muted-2); }

/* Catch-all: any input/select/textarea inside the tool (e.g. the quote builder's
   Qty / Rate / unit inputs, which sit outside .cfqm-field) gets the dark field
   treatment. Checkboxes/radios keep the browser accent. */
body.cfqm-dark .cfqm-wrap input:not([type=checkbox]):not([type=radio]):not([type=range]),
body.cfqm-dark .cfqm-wrap select,
body.cfqm-dark .cfqm-wrap textarea,
body.cfqm-dark .cfqm-board-wrap input:not([type=checkbox]):not([type=radio]),
body.cfqm-dark .cfqm-board-wrap select,
body.cfqm-dark .cfqm-board-wrap textarea {
  background: var(--cfqm-card); color: var(--cfqm-ink); border-color: var(--cfqm-border-2);
}
body.cfqm-dark .cfqm-wrap input::placeholder,
body.cfqm-dark .cfqm-wrap textarea::placeholder { color: var(--cfqm-muted-2); }

/* Root background: fills the iOS safe-area / overscroll (rubber-band) area so it
   is charcoal instead of the webview's default white band at the top. */
html:has(body.cfqm-dark) { background:#161719; }
body.cfqm-dark { background:#161719; }

/* Light rgba backgrounds the grey-ramp sweep couldn't catch (hex only). */
body.cfqm-dark .cfqm-area { background: var(--cfqm-surface); border-color: var(--cfqm-border); }
body.cfqm-dark .cfqm-area-row { background: rgba(255,255,255,.03); }
body.cfqm-dark .cfqm-badge { background: rgba(255,255,255,.06); }
body.cfqm-dark .cfqm-req-pill { background: rgba(255,255,255,.05); border-color: var(--cfqm-border); color: var(--cfqm-ink-2); }
body.cfqm-dark .cfqm-portal-select-row { background: rgba(255,255,255,.04); }
body.cfqm-dark .cfqm-qdash-table tr:hover td { background: rgba(255,255,255,.03); }
body.cfqm-dark .cfqm-quote-card-hint { background: var(--cfqm-surface); }
body.cfqm-dark .cfqm-rec-note { background: var(--cfqm-surface); }

/* Timeline dot ring (was a white halo) → match the page. */
body.cfqm-dark .cfqm-proj-cust-tl-dot { border-color:#161719; }

/* Kanban column bodies. */
body.cfqm-dark .cfqm-kanban-col-body { background: var(--cfqm-surface); }

/* ── Semantic status colours: dark tint + light text (were dark-on-light) ── */
body.cfqm-dark .cfqm-badge-sent,
body.cfqm-dark .cfqm-badge-viewed { background:rgba(56,132,168,.20); border-color:rgba(56,132,168,.45); color:#8fd1ef; }
body.cfqm-dark .cfqm-badge-approved,
body.cfqm-dark .cfqm-badge-active,
body.cfqm-dark .cfqm-badge-completed { background:rgba(34,197,94,.16); border-color:rgba(34,197,94,.4); color:#6ee7a8; }
body.cfqm-dark .cfqm-badge-partially_approved,
body.cfqm-dark .cfqm-badge-paused { background:rgba(245,158,11,.16); border-color:rgba(245,158,11,.4); color:#fbbf5a; }
body.cfqm-dark .cfqm-badge-amendment_requested,
body.cfqm-dark .cfqm-badge-expired { background:rgba(239,68,68,.16); border-color:rgba(239,68,68,.4); color:#f4a1a1; }
body.cfqm-dark .cfqm-badge-new,
body.cfqm-dark .cfqm-badge-invoiced { background:rgba(0,200,224,.16); border-color:rgba(0,200,224,.4); color:#5fd6e6; }
body.cfqm-dark .cfqm-badge-draft,
body.cfqm-dark .cfqm-badge-archived { color:var(--cfqm-muted); }

/* Status banners */
body.cfqm-dark .cfqm-status-banner-partial { background:rgba(245,158,11,.12); border-color:rgba(245,158,11,.4); color:#fbbf5a; }
body.cfqm-dark .cfqm-status-banner-approved { background:rgba(34,197,94,.12); border-color:rgba(34,197,94,.4); color:#7ceaa6; }
body.cfqm-dark .cfqm-status-banner-amendment { background:rgba(239,68,68,.12); border-color:rgba(239,68,68,.4); color:#f4a1a1; }

/* Notes / inline messages */
body.cfqm-dark .cfqm-note-success { background:rgba(34,197,94,.12); color:#7ceaa6; }
body.cfqm-dark .cfqm-note-error,
body.cfqm-dark .cfqm-accept-error { background:rgba(239,68,68,.12); border-color:rgba(239,68,68,.4); color:#f4a1a1; }

/* Area accept/decline tags */
body.cfqm-dark .cfqm-area-tag-accepted { background:rgba(34,197,94,.2); color:#7ceaa6; }
body.cfqm-dark .cfqm-area-tag-declined { background:rgba(239,68,68,.18); color:#f4a1a1; }

/* Portal instructions panel */
body.cfqm-dark .cfqm-portal-instructions { background:rgba(14,165,233,.10); border-color:rgba(14,165,233,.35); }
body.cfqm-dark .cfqm-portal-instructions strong { color:#7fd6f5; }
body.cfqm-dark .cfqm-portal-steps { color:#a7d8ef; }

/* Setup tip / request category badge / kanban trade chip (cyan family) */
body.cfqm-dark .cfqm-request-setup-tip { background:rgba(0,200,224,.08); border-color:rgba(0,200,224,.3); color:#5fd6e6; }
body.cfqm-dark .cfqm-req-cat-badge { background:rgba(0,200,224,.14); border-color:rgba(0,200,224,.4); color:#5fd6e6; }
body.cfqm-dark .cfqm-kanban-card-trade,
body.cfqm-dark .cfqm-kanban-chip,
body.cfqm-dark .cfqm-badge-partially_paid { color:#5fd6e6; }

/* Project + calendar status pills that used dark amber/cyan text */
body.cfqm-dark .cfqm-proj-pill-in_progress,
body.cfqm-dark .cfqm-kanban-chip-high,
body.cfqm-dark .cfqm-cal-task-awaiting_signoff { color:#fbbf5a; }
body.cfqm-dark .cfqm-cal-task-in_progress { color:#5fd6e6; }
body.cfqm-dark .cfqm-cal-today { background:rgba(0,200,224,.12); }
body.cfqm-dark .cfqm-cal-empty { background:rgba(255,255,255,.02); }
body.cfqm-dark .cfqm-kanban-chip-assigned { background:rgba(129,140,248,.16); color:#b3bcff; }

/* Featured / thank-you tinted cards (green wash) → dark green wash */
body.cfqm-dark .cfqm-rec-featured,
body.cfqm-dark .cfqm-rec-thankyou,
body.cfqm-dark .cfqm-rec-prompt { background:rgba(34,197,94,.06); border-color:rgba(34,197,94,.3); }

/* Budget alert explain (was translucent white) */
body.cfqm-dark .cfqm-budget-alert-explain { background:rgba(255,255,255,.05); color:var(--cfqm-ink-2); }

/* AI pro CTA + calculator result card (teal wash) */
body.cfqm-dark .cfqm-hai-pro-cta,
body.cfqm-dark .cfqm-calc-result-card { background:rgba(0,200,212,.08); border-color:rgba(0,200,212,.3); }

/* Home-AI example chips + AI bubble */
body.cfqm-dark .cfqm-home-ai-example { background:var(--cfqm-surface); border-color:var(--cfqm-border-2); color:var(--cfqm-ink-2); }
body.cfqm-dark .cfqm-hai-msg-ai .cfqm-hai-msg-bubble { background:var(--cfqm-surface-2); color:var(--cfqm-ink); }
body.cfqm-dark .cfqm-home-ai-input-bar { background:transparent; }

/* Dropdown menu + modals on dark */
body.cfqm-dark .cfqm-hub-more-dropdown,
body.cfqm-dark .cfqm-ai-modal-card { background:var(--cfqm-card); }
body.cfqm-dark .cfqm-hub-more-item:hover,
body.cfqm-dark .cfqm-kanban-move:hover,
body.cfqm-dark .cfqm-kanban-edit:hover { background:var(--cfqm-surface-2); color:var(--cfqm-ink); }

/* Disabled button */
body.cfqm-dark .cfqm-btn-disabled,
body.cfqm-dark .cfqm-btn-disabled:hover { background:var(--cfqm-surface-2) !important; color:var(--cfqm-muted-2) !important; border-color:var(--cfqm-border-2) !important; }

/* ── Layout ────────────────────────────────────────────────────────────────── */
.cfqm-wrap { max-width:1100px; margin:0 auto; padding:36px 18px 40px; }

@media(max-width:480px) {
  .cfqm-wrap { padding:20px 8px 30px; }
  .cfqm-card { padding:12px 10px; margin-bottom:10px; }
  .cfqm-tab-header { margin-bottom:12px; }
  .cfqm-title { font-size:20px; }
  .cfqm-builder-topbar { padding:10px 12px; margin-bottom:12px; }
}

/* ── Responsive helpers ────────────────────────────────────────────────────── */
@media(min-width:769px) { .cfqm-mobile-only { display:none !important; } }
@media(max-width:768px)  { .cfqm-desktop-only { display:none !important; } }

/* ── Hub tab nav ───────────────────────────────────────────────────────────── */
.cfqm-hub-nav {
  display: flex; gap:4px;
  border-bottom: 2px solid var(--cfqm-border);
  margin-bottom: 24px;
}
.cfqm-hub-tab {
  padding: 10px 20px; font-size:14px; font-weight:600;
  color: var(--cfqm-muted); text-decoration:none;
  border-bottom: 3px solid transparent; margin-bottom:-2px;
  border-radius: 6px 6px 0 0; transition:color .15s,border-color .15s;
}
.cfqm-hub-tab:hover { color:var(--cfqm-ink); }
.cfqm-hub-tab-active { color:var(--cfqm-ink); border-bottom-color:var(--cfqm-accent); }
@media(max-width:600px) {
  .cfqm-hub-nav { gap:0; flex-wrap:nowrap; }
  .cfqm-hub-tab { padding:8px 8px; font-size:13px; white-space:nowrap; }
  .cfqm-hub-tab-desktop { display:none !important; }
  .cfqm-hub-more { display:inline-block; }
}

/* ── Tab header row ────────────────────────────────────────────────────────── */
.cfqm-tab-header {
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; margin-bottom:18px; flex-wrap:wrap;
}
.cfqm-tab-header .cfqm-title { margin:0; }

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.cfqm-card {
  background:var(--cfqm-card); border:1px solid var(--cfqm-border);
  border-radius:var(--cfqm-radius); padding:14px 16px; margin-bottom:12px;
  box-shadow:0 1px 3px rgba(0,0,0,.04);
}
.cfqm-subtitle { font-weight:700; color:var(--cfqm-primary); margin-bottom:12px; font-size:14px; }

/* ── Grid layouts ──────────────────────────────────────────────────────────── */
.cfqm-grid-2       { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.cfqm-grid-2-tight { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
@media(max-width:768px) {
  .cfqm-grid-2, .cfqm-grid-2-tight { grid-template-columns:1fr; }
}

/* ── Form fields ───────────────────────────────────────────────────────────── */
.cfqm-field label {
  display:block; font-size:12px; font-weight:600; letter-spacing:.3px;
  color:var(--cfqm-muted); margin:12px 0 6px; text-transform:uppercase;
}
.cfqm-field input, .cfqm-field textarea, .cfqm-field select {
  width:100%; border:1px solid var(--cfqm-border); border-radius:10px;
  padding:10px 13px; background:var(--cfqm-card); color:inherit; font-size:15px;
  transition:border-color .15s;
  box-sizing:border-box; max-width:100%; min-width:0;
}
.cfqm-field input:focus, .cfqm-field textarea:focus {
  border-color:var(--cfqm-accent); outline:none;
  box-shadow:0 0 0 3px rgba(0,200,224,.12);
}
/* iOS renders <input type=date> at an intrinsic content width and extra height,
   which overflows the field's card and pushes the whole form wider than the
   screen (a horizontal-scroll "white edge" + a stuck zoom in the app). Flatten
   it to a normal full-width box that still opens the native date picker on tap. */
.cfqm-field input[type=date],
.cfqm-wrap input[type=date] {
  -webkit-appearance:none; appearance:none;
  width:100%; max-width:100%; min-width:0; box-sizing:border-box;
  min-height:44px; line-height:1.2;
}
.cfqm-field input[type=date]::-webkit-date-and-time-value { text-align:left; }
/* Belt-and-braces: nothing inside the tool may render wider than its container. */
.cfqm-wrap input, .cfqm-wrap select, .cfqm-wrap textarea { box-sizing:border-box; max-width:100%; }
.cfqm-inline label { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.cfqm-inline input[type="checkbox"] { transform:scale(1.15); accent-color:var(--cfqm-accent); }
.cfqm-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:14px; align-items:center; }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.cfqm-btn {
  border:0; border-radius:10px; padding:11px 18px;
  font-weight:700; font-size:14px; cursor:pointer;
  text-decoration:none; display:inline-flex; align-items:center;
  justify-content:center; transition:opacity .15s, box-shadow .15s;
  letter-spacing:.1px; line-height:1.2;
}
.cfqm-btn:hover { opacity:.88; }
.cfqm-btn-primary { background:var(--cfqm-primary); color:#fff; }
.cfqm-btn-accent  { background:var(--cfqm-accent);  color:#000; font-weight:800; }
.cfqm-btn-ghost   { background:transparent; border:1.5px solid var(--cfqm-border); color:inherit; }
.cfqm-btn-sm      { padding:8px 14px; font-size:13px; border-radius:8px; }
.cfqm-btn-xs      { background:none; border:none; cursor:pointer; font-size:16px; color:var(--cfqm-muted-2); padding:0 4px; }
.cfqm-btn-xs:hover { color:#ef4444; }
.cfqm-link { color:var(--cfqm-primary); font-weight:600; text-decoration:none; }
.cfqm-link:hover  { text-decoration:underline; }

/* ── Badges ────────────────────────────────────────────────────────────────── */
.cfqm-badge {
  display:inline-block; padding:5px 11px; border-radius:999px;
  font-size:12px; font-weight:600; border:1px solid var(--cfqm-border);
  background:rgba(15,23,42,.04); white-space:nowrap; line-height:1.2;
}
.cfqm-badge-draft                              { color:var(--cfqm-muted); }
.cfqm-badge-sent, .cfqm-badge-viewed          { border-color:rgba(48,112,144,.3); background:rgba(48,112,144,.09); color:#1e3a8a; }
.cfqm-badge-approved                           { border-color:rgba(22,163,74,.3);  background:rgba(22,163,74,.1);   color:#166534; }
.cfqm-badge-partially_approved                 { border-color:rgba(245,158,11,.3); background:rgba(245,158,11,.1);  color:#92400e; }
.cfqm-badge-amendment_requested, .cfqm-badge-expired { border-color:rgba(176,80,80,.3); background:rgba(176,80,80,.1); color:#7f1d1d; }
.cfqm-badge-new                                { border-color:rgba(0,200,224,.35); background:rgba(0,200,224,.1);   color:#0e7490; }

/* ── Misc ──────────────────────────────────────────────────────────────────── */
.cfqm-note     { color:var(--cfqm-muted); font-size:13px; line-height:1.5; margin-top:8px; }
.cfqm-note-success { color:#166534; background:#f0fdf4; border-radius:8px; padding:10px 14px; margin-bottom:14px; }
.cfqm-hr       { height:1px; background:var(--cfqm-border); margin:16px 0; }
.cfqm-hint     { color:var(--cfqm-muted); font-size:12px; }
.cfqm-kv       { display:flex; align-items:center; justify-content:space-between; padding:8px 0; border-bottom:1px dashed var(--cfqm-border); }
.cfqm-kv span  { color:var(--cfqm-muted); font-size:13px; }
.cfqm-kv-big strong { font-size:20px; }
.cfqm-title    { margin:0; font-size:24px; line-height:1.2; }
.cfqm-header   { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:16px; flex-wrap:wrap; }
.cfqm-meta     { color:var(--cfqm-muted); font-size:13px; }

/* ── Gate / error screens ──────────────────────────────────────────────────── */
.cfqm-wrap.cfqm-gate { padding-top:20px; }
.cfqm-gate .cfqm-card, .cfqm-friendly-gate { max-width:480px; margin:0 auto; text-align:center; padding:40px 32px; }
.cfqm-gate-icon    { font-size:36px; margin-bottom:14px; line-height:1; }
.cfqm-gate-heading { font-size:22px; font-weight:700; color:var(--cfqm-ink); margin:0 0 12px; line-height:1.3; }
.cfqm-gate-body    { font-size:15px; color:var(--cfqm-ink-2); line-height:1.65; margin:0 0 24px; }
.cfqm-gate-actions { justify-content:center; }

/* ── Builder top bar ───────────────────────────────────────────────────────── */
.cfqm-builder-topbar {
  display:flex; align-items:center; gap:12px;
  padding:10px 0 18px; border-bottom:1px solid var(--cfqm-border);
  margin-bottom:22px; flex-wrap:wrap;
}
.cfqm-back-link { font-size:13px; color:var(--cfqm-muted); text-decoration:none; white-space:nowrap; }
.cfqm-back-link:hover { color:var(--cfqm-ink); }
.cfqm-builder-title { font-size:15px; font-weight:600; flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cfqm-builder-actions-right { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }

/* ── Area cards (quote builder) ────────────────────────────────────────────── */
.cfqm-area { border:1px solid var(--cfqm-border); border-radius:var(--cfqm-radius); padding:14px; background:rgba(248,249,251,.7); margin:12px 0; }
.cfqm-area-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; gap:10px; }
.cfqm-scope { margin:6px 0 0; color:var(--cfqm-muted); font-size:13px; line-height:1.5; }
.cfqm-chip { display:inline-block; margin-left:6px; padding:2px 8px; border-radius:999px; font-size:11px; border:1px solid var(--cfqm-border); white-space:nowrap; }
.cfqm-chip-included { background:rgba(48,112,144,.09); border-color:rgba(48,112,144,.25); }
.cfqm-chip-optional { background:rgba(176,80,80,.1);   border-color:rgba(176,80,80,.25); }
.cfqm-accept-block  { margin-top:20px; padding-top:16px; border-top:1px solid var(--cfqm-border); }

/* ── Customer portal area rows ─────────────────────────────────────────────── */
.cfqm-areas-list { display:flex; flex-direction:column; gap:10px; }
.cfqm-area-row { display:grid; grid-template-columns:1fr 110px; gap:12px; padding:14px; border:1px solid var(--cfqm-border); border-radius:var(--cfqm-radius); background:rgba(15,23,42,.02); }
@media(max-width:600px) { .cfqm-area-row { grid-template-columns:1fr; } }
.cfqm-area-price { font-weight:800; text-align:right; font-size:16px; }
.cfqm-check { display:flex; gap:10px; align-items:flex-start; flex-wrap:wrap; }
.cfqm-area-name { font-weight:700; }

/* ── Audit rows ────────────────────────────────────────────────────────────── */
.cfqm-audit-row { display:flex; justify-content:space-between; font-size:12px; padding:5px 0; border-bottom:1px solid var(--cfqm-border); color:var(--cfqm-ink-2); }
.cfqm-audit-row:last-child { border-bottom:none; }

/* ── Customer nav bar ──────────────────────────────────────────────────────── */
.cfqm-customer-nav {
  display:flex; align-items:center; justify-content:space-between;
  padding:8px 0 14px; border-bottom:1px solid var(--cfqm-border);
  margin-bottom:22px; font-size:13px; color:var(--cfqm-muted);
}

/* ── Print topbar ──────────────────────────────────────────────────────────── */
.cfqm-print-topbar { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; }
@media print { .no-print { display:none !important; } }

/* ── Note card (setup tip) ─────────────────────────────────────────────────── */
.cfqm-note-card { padding:16px 20px; }
.cfqm-request-setup-tip {
  background:rgba(0,200,224,.06); border:1px solid rgba(0,200,224,.25);
  border-radius:10px; padding:14px 18px; font-size:14px; color:#0e7490;
  margin-bottom:18px;
}

/* ── Trades Dashboard — desktop table ─────────────────────────────────────── */
.cfqm-qdash-table {
  width:100%; border-collapse:collapse; font-size:14px;
}
.cfqm-qdash-table th {
  text-align:left; font-size:12px; font-weight:600; letter-spacing:.3px;
  text-transform:uppercase; color:var(--cfqm-muted);
  padding:0 12px 10px; border-bottom:2px solid var(--cfqm-border);
}
.cfqm-qdash-table td {
  padding:13px 12px; border-bottom:1px solid rgba(15,23,42,.05);
  vertical-align:middle;
}
.cfqm-qdash-table tr:last-child td { border-bottom:none; }
.cfqm-qdash-table tr:hover td { background:rgba(15,23,42,.015); }
.cfqm-qdash-project { max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ── Trades Dashboard — mobile cards ──────────────────────────────────────── */
.cfqm-qdash-mcard {
  display:flex; gap:12px; align-items:flex-start;
  background:var(--cfqm-card); border:1px solid var(--cfqm-border);
  border-radius:var(--cfqm-radius); padding:14px 16px;
  margin-bottom:10px;
}
.cfqm-qdash-mcard-check { padding-top:3px; flex-shrink:0; }
.cfqm-qdash-mcard-body  { flex:1; min-width:0; }
.cfqm-qdash-mcard-top   { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-bottom:10px; }
.cfqm-qdash-mcard-customer { font-weight:700; font-size:15px; color:var(--cfqm-primary); }
.cfqm-qdash-mcard-project  { font-size:13px; color:var(--cfqm-muted); margin-top:2px; }
.cfqm-qdash-mcard-bottom   { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding-top:10px; border-top:1px solid rgba(15,23,42,.06); }
.cfqm-qdash-mcard-total    { font-weight:800; font-size:16px; flex:1; }
.cfqm-qdash-mcard-iter     { font-size:12px; color:var(--cfqm-muted-2); }

/* ── Incoming Requests ─────────────────────────────────────────────────────── */
.cfqm-requests-grid {
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
}
@media(min-width:900px) {
  .cfqm-requests-grid { grid-template-columns:1fr 1fr; }
}
.cfqm-req-card {
  background:var(--cfqm-card); border:1px solid var(--cfqm-border);
  border-radius:var(--cfqm-radius); padding:18px 20px;
  display:flex; flex-direction:column; gap:12px;
}
.cfqm-req-card-meta { display:flex; align-items:flex-start; gap:12px; flex-wrap:wrap; }
.cfqm-req-cat-badge {
  display:inline-block; padding:6px 14px; border-radius:999px; font-size:13px;
  font-weight:700; background:rgba(0,200,224,.1); border:1.5px solid rgba(0,200,224,.35);
  color:#0e7490; white-space:nowrap; flex-shrink:0;
}
.cfqm-req-card-pills { display:flex; flex-wrap:wrap; gap:6px; align-items:center; flex:1; }
.cfqm-req-pill {
  display:inline-block; padding:4px 10px; border-radius:999px;
  font-size:12px; background:rgba(15,23,42,.05); color:var(--cfqm-ink-2);
  border:1px solid rgba(15,23,42,.1); white-space:nowrap;
}
.cfqm-req-pill-addr { font-weight:500; }
.cfqm-req-card-desc { font-size:14px; color:var(--cfqm-ink-2); line-height:1.55; margin:0; }
.cfqm-req-card-action { margin-top:4px; }

/* ── Profile trade categories list ────────────────────────────────────────── */
.cfqm-profile-list {
  display:grid; grid-template-columns:1fr 1fr; gap:2px;
  margin-top:8px;
}
@media(min-width:900px) { .cfqm-profile-list { grid-template-columns:1fr 1fr 1fr; } }
.cfqm-profile-item label {
  display:flex; align-items:center; gap:8px; padding:8px 10px;
  border-radius:8px; cursor:pointer; font-size:14px; transition:background .1s;
}
.cfqm-profile-item label:hover { background:rgba(0,200,224,.06); }
.cfqm-profile-item input[type="checkbox"] { accent-color:var(--cfqm-accent); transform:scale(1.1); flex-shrink:0; }

/* ── Customer quote cards ──────────────────────────────────────────────────── */
.cfqm-quote-card {
  background:var(--cfqm-card); border:1px solid var(--cfqm-border);
  border-radius:var(--cfqm-radius); padding:18px 20px;
  margin-bottom:14px; transition:box-shadow .15s;
}
.cfqm-quote-card-action { border-color:rgba(48,112,144,.35); box-shadow:0 0 0 3px rgba(48,112,144,.08); }
.cfqm-quote-card-top    { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:16px; }
.cfqm-quote-card-info   { flex:1; min-width:0; }
.cfqm-quote-card-project  { font-size:17px; font-weight:700; color:var(--cfqm-ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-bottom:4px; }
.cfqm-quote-card-provider { font-size:13px; color:var(--cfqm-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cfqm-quote-card-bottom   { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:14px; border-top:1px solid rgba(15,23,42,.07); }
.cfqm-quote-card-total        { display:flex; flex-direction:column; }
.cfqm-quote-card-total-label  { font-size:11px; text-transform:uppercase; letter-spacing:.6px; color:var(--cfqm-muted-2); margin-bottom:2px; }
.cfqm-quote-card-total-amount { font-size:20px; font-weight:800; color:var(--cfqm-ink); letter-spacing:-.3px; }
.cfqm-quote-card-hint { margin-top:12px; font-size:13px; color:var(--cfqm-muted); background:var(--cfqm-surface); border-radius:8px; padding:8px 12px; line-height:1.5; }
.cfqm-quote-empty     { text-align:center; padding:40px 24px; }

/* ── Checkbox inline fix (v0.5.9) ───────────────────────────────────────────
   .cfqm-field label applies display:block + uppercase which wins over
   .cfqm-inline label. Use higher specificity to override correctly. */
.cfqm-field.cfqm-inline {
  margin: 12px 0;
}
.cfqm-field.cfqm-inline > label,
.cfqm-field.cfqm-inline label {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px;
  text-transform: none !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  color: inherit !important;
  margin: 0 !important;
  cursor: pointer;
  width: auto;
}
.cfqm-field.cfqm-inline input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  accent-color: var(--cfqm-accent);
}

/* ── Partially approved status banner ──────────────────────────────────────── */
.cfqm-status-banner {
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  border: 1px solid;
}
.cfqm-status-banner-partial {
  background: #fffbeb;
  border-color: rgba(245,158,11,.35);
  color: #78350f;
}
.cfqm-status-banner-approved {
  background: #f0fdf4;
  border-color: rgba(22,163,74,.3);
  color: #14532d;
}
.cfqm-status-banner-amendment {
  background: #fef2f2;
  border-color: rgba(239,68,68,.3);
  color: #7f1d1d;
}
.cfqm-status-banner h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
}
.cfqm-status-banner p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
}
.cfqm-status-banner p:last-child { margin-bottom: 0; }
.cfqm-area-accepted { border-color: rgba(22,163,74,.4) !important; background: rgba(22,163,74,.04) !important; }
.cfqm-area-declined  { border-color: rgba(239,68,68,.3) !important; background: rgba(239,68,68,.03) !important; opacity: .75; }
.cfqm-area-tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; margin-left: 8px;
}
.cfqm-area-tag-accepted { background: rgba(22,163,74,.15); color: #166534; }
.cfqm-area-tag-declined  { background: rgba(239,68,68,.12); color: #991b1b; }

/* ── Compat entry padding (clears fixed site headers) ───────────────────────── */
.cfqm-compat-entry > .cfqm-wrap { padding-top: 110px; }
@media(min-width:769px) { .cfqm-compat-entry > .cfqm-wrap { padding-top: 100px; } }

/* ── Portal instructions panel ─────────────────────────────────────────────── */
.cfqm-portal-instructions {
  display: flex; gap: 14px; align-items: flex-start;
  background: #f0f9ff; border: 1px solid #bae6fd;
  border-radius: 12px; padding: 16px 18px; margin-bottom: 4px;
}
.cfqm-portal-instructions-icon { font-size: 22px; line-height: 1; flex-shrink: 0; padding-top: 2px; }
.cfqm-portal-instructions strong { display: block; font-size: 15px; color: #0c4a6e; margin-bottom: 6px; }
.cfqm-portal-steps { margin: 0; padding-left: 18px; font-size: 14px; color: #075985; line-height: 1.7; }

/* ── Portal select row (tick all / running total) ───────────────────────────── */
.cfqm-portal-select-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 14px; padding: 10px 14px;
  background: rgba(15,23,42,.03); border-radius: 8px;
}
.cfqm-portal-running-total { margin-left: auto; font-size: 14px; color: var(--cfqm-ink-2); }
.cfqm-portal-running-total strong { font-size: 16px; color: var(--cfqm-ink); }

/* ── Accept error message ───────────────────────────────────────────────────── */
.cfqm-accept-error {
  background: #fef2f2; border: 1px solid #fecaca;
  border-radius: 8px; padding: 10px 14px;
  font-size: 14px; color: #991b1b; margin-bottom: 12px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   INVOICE STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Invoice stats bar */
.cfqm-inv-stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:12px; margin-bottom:20px; }
.cfqm-inv-stat { background:var(--cfqm-card); border:1px solid rgba(15,23,42,.08); border-radius:12px; padding:16px; }
.cfqm-inv-stat-alert { border-color:#dc2626; border-width:2px; }
.cfqm-inv-stat-label { font-size:12px; color:var(--cfqm-muted-2); margin-bottom:4px; }
.cfqm-inv-stat-value { font-size:22px; font-weight:800; }
.cfqm-inv-stat-sub { font-size:11px; color:var(--cfqm-muted-2); margin-top:2px; }

/* Color helpers */
.cfqm-color-orange { color:#e97316; }
.cfqm-color-red { color:#dc2626; }
.cfqm-color-green { color:#16a34a; }
.cfqm-color-blue { color:#2563eb; }

/* Invoice-specific badges */
.cfqm-badge-partially_paid { background:rgba(233,115,22,.1); color:#e97316; }
.cfqm-badge-void { background:#f5f5f5; color:var(--cfqm-muted-2); text-decoration:line-through; }
.cfqm-badge-overdue { background:rgba(220,38,38,.1); color:#dc2626; }

/* Row alert for overdue */
.cfqm-row-alert { background:rgba(220,38,38,.03); }
.cfqm-mcard-alert { border-left:3px solid #dc2626; }

/* Reference style */
.cfqm-ref { font-family:ui-monospace,monospace; font-size:12px; }

/* Invoice line item cards */
.cfqm-inv-item { background:var(--cfqm-card); border:1px solid rgba(15,23,42,.08); border-radius:10px; padding:16px; margin-bottom:12px; }
.cfqm-inv-item .cfqm-area-head { margin-bottom:12px; }

/* Photos grid */
.cfqm-photos-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:8px; margin:12px 0; }
.cfqm-photo-thumb { position:relative; border-radius:8px; overflow:hidden; aspect-ratio:4/3; }
.cfqm-photo-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.cfqm-photo-caption { position:absolute; bottom:0; left:0; right:0; padding:4px 8px; background:rgba(0,0,0,.6); color:#fff; font-size:11px; }

/* Overdue card variant on customer dashboard */
.cfqm-quote-card-overdue { border-left:3px solid #dc2626; }

/* Print styles */
@media print {
  .cfqm-hub-nav, .cfqm-builder-topbar, .cfqm-customer-nav { display:none !important; }
  .cfqm-card { box-shadow:none !important; border:1px solid #eee !important; }
}

/* Customer detail items */
.cfqm-cust-item { display:flex; justify-content:space-between; align-items:center; padding:10px 0; border-bottom:1px solid rgba(15,23,42,.06); }
.cfqm-cust-item:last-child { border-bottom:none; }
.cfqm-cust-item-info { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.cfqm-cust-item-amount { font-weight:700; font-size:14px; white-space:nowrap; }

/* Invoiced badge for converted quotes */
.cfqm-badge-invoiced { background:rgba(0,200,224,.1); color:#0891b2; }

/* ═══════════════════════════════════════════════════════════════════════════
   RECOMMENDATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Recommendation cards (tradesperson hub) */
.cfqm-rec-card { border:1px solid rgba(15,23,42,.08); border-radius:12px; padding:16px; margin-bottom:12px; transition:border-color .15s; }
.cfqm-rec-card:hover { border-color:rgba(15,23,42,.15); }
.cfqm-rec-featured { border-color:rgba(22,163,106,.3); background:rgba(240,253,244,.4); }
.cfqm-rec-hidden { opacity:.5; }
.cfqm-rec-card-top { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:12px; flex-wrap:wrap; }
.cfqm-rec-card-customer { display:flex; align-items:center; gap:10px; }
.cfqm-rec-avatar { width:36px; height:36px; border-radius:50%; background:var(--cfqm-accent, #00C8E0); color:#000; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:15px; flex-shrink:0; }
.cfqm-rec-name { font-weight:600; font-size:14px; color:var(--cfqm-ink); }
.cfqm-rec-meta { font-size:12px; color:var(--cfqm-muted-2); }
.cfqm-rec-badges { display:flex; gap:6px; flex-wrap:wrap; }
.cfqm-rec-note { font-size:14px; line-height:1.6; color:var(--cfqm-ink-2); padding:12px 16px; background:var(--cfqm-surface); border-radius:8px; border-left:3px solid var(--cfqm-accent, #00C8E0); margin-bottom:12px; }
.cfqm-rec-note-empty { font-style:italic; color:var(--cfqm-muted-2); border-left-color:var(--cfqm-border-2); background:transparent; }
.cfqm-rec-actions { display:flex; gap:8px; }

/* Recommendation prompt (customer invoice view) */
.cfqm-rec-prompt { text-align:center; padding:32px 24px; border:2px dashed rgba(22,163,106,.3); background:rgba(240,253,244,.3); }
.cfqm-rec-prompt .cfqm-field { text-align:left; max-width:460px; margin:0 auto; }
.cfqm-rec-prompt .cfqm-actions { justify-content:center; }
.cfqm-rec-prompt-icon { font-size:36px; margin-bottom:12px; }
.cfqm-rec-prompt-title { font-size:18px; font-weight:700; color:var(--cfqm-ink); margin:0 0 8px; }
.cfqm-rec-prompt-desc { font-size:14px; color:var(--cfqm-muted); margin:0; max-width:460px; display:inline-block; line-height:1.6; }

/* Thank you state */
.cfqm-rec-thankyou { text-align:center; padding:32px 24px; background:rgba(240,253,244,.5); border:1px solid rgba(22,163,106,.2); }
.cfqm-rec-thankyou .cfqm-rec-prompt-icon { color:#16a34a; font-size:32px; }
.cfqm-rec-thankyou .cfqm-rec-prompt-title { color:#16a34a; }
.cfqm-rec-thankyou .cfqm-rec-note { text-align:left; max-width:460px; margin:12px auto; }

/* Public profile recommendations */
.cfqm-public-recs { padding:24px 0; }
.cfqm-pub-rec-header { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:20px; flex-wrap:wrap; gap:8px; }
.cfqm-pub-rec-count { display:flex; align-items:baseline; gap:8px; }
.cfqm-pub-rec-number { font-size:28px; font-weight:800; color:var(--cfqm-ink); }
.cfqm-pub-rec-label { font-size:15px; color:var(--cfqm-muted); }
.cfqm-pub-rec-verified { font-size:12px; color:#16a34a; font-weight:600; }
.cfqm-pub-rec-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(280px,1fr)); gap:16px; }
.cfqm-pub-rec-card { border:1px solid rgba(15,23,42,.08); border-radius:12px; padding:20px; background:var(--cfqm-card); }
.cfqm-pub-rec-card-top { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.cfqm-pub-rec-verified-badge { font-size:11px; color:#16a34a; font-weight:600; margin-top:10px; }
@media(max-width:520px) {
    .cfqm-pub-rec-grid { grid-template-columns:1fr; }
    .cfqm-rec-card-top { flex-direction:column; align-items:flex-start; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROJECT MANAGEMENT & KANBAN BOARD
   ═══════════════════════════════════════════════════════════════════════════ */

/* Project cards (hub list) */
.cfqm-proj-card { transition:border-color .15s; }
.cfqm-proj-card:hover { border-color:rgba(15,23,42,.2); }
.cfqm-proj-card-top { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:12px; }
.cfqm-proj-card-title { font-size:16px; font-weight:700; color:var(--cfqm-ink); }
.cfqm-proj-card-meta { font-size:13px; color:var(--cfqm-muted-2); margin-top:2px; }

/* Progress bar (shared) */
.cfqm-proj-progress-wrap { display:flex; align-items:center; gap:10px; }
.cfqm-proj-progress-bar { flex:1; height:6px; background:var(--cfqm-surface-2); border-radius:3px; overflow:hidden; }
.cfqm-proj-progress-bar-lg { height:8px; }
.cfqm-proj-progress-fill { height:100%; background:var(--cfqm-accent, #00C8E0); border-radius:3px; transition:width .4s; }
.cfqm-proj-progress-pct { font-size:12px; color:var(--cfqm-muted); white-space:nowrap; }

/* Status pills */
.cfqm-proj-status-pills { display:flex; gap:8px; margin-top:12px; flex-wrap:wrap; align-items:center; }
.cfqm-proj-pill { font-size:12px; padding:2px 8px; border-radius:6px; background:var(--cfqm-surface-2); color:var(--cfqm-muted); }
.cfqm-proj-pill-upcoming { background:var(--cfqm-surface-2); color:var(--cfqm-muted); }
.cfqm-proj-pill-in_progress { background:rgba(234,179,8,.1); color:#a16207; }
.cfqm-proj-pill-awaiting_signoff { background:rgba(220,38,38,.08); color:#dc2626; }
.cfqm-proj-pill-completed { background:rgba(22,163,106,.08); color:#16a34a; }
.cfqm-proj-pill-total { font-size:12px; color:var(--cfqm-muted-2); margin-left:auto; }

/* Project summary bar on board page */
.cfqm-proj-summary { margin-bottom:20px; }
.cfqm-proj-summary-row { display:flex; align-items:center; gap:20px; flex-wrap:wrap; }
.cfqm-proj-summary-progress { flex:1; min-width:200px; }
.cfqm-proj-summary-stats { display:flex; gap:6px; flex-wrap:wrap; }

/* Badge for active status */
.cfqm-badge-active { background:rgba(22,163,106,.1); color:#16a34a; }
.cfqm-badge-paused { background:rgba(234,179,8,.1); color:#a16207; }
.cfqm-badge-archived { background:var(--cfqm-surface-2); color:var(--cfqm-muted-2); }
.cfqm-badge-completed { background:rgba(22,163,106,.1); color:#16a34a; }

/* ── Kanban Board ──────────────────────────────────────────────────────── */
.cfqm-board-wrap { max-width:none; padding-left:12px; padding-right:12px; }
.cfqm-kanban { display:flex; gap:14px; overflow-x:auto; padding-bottom:20px; -webkit-overflow-scrolling:touch; }
.cfqm-kanban-col { flex:1 1 0; min-width:240px; max-width:320px; }
.cfqm-kanban-col-header { display:flex; align-items:center; gap:6px; padding:0 4px; margin-bottom:10px; }
.cfqm-kanban-col-icon { font-size:16px; }
.cfqm-kanban-col-title { font-size:14px; font-weight:700; color:var(--cfqm-ink); }
.cfqm-kanban-col-count { font-size:12px; color:var(--cfqm-muted-2); background:var(--cfqm-surface-2); border-radius:10px; padding:1px 8px; }
.cfqm-kanban-col-body { background:var(--cfqm-surface); border-radius:12px; padding:10px; min-height:200px; }

/* Kanban cards */
.cfqm-kanban-card { background:var(--cfqm-card); border:1px solid rgba(15,23,42,.08); border-radius:10px; padding:12px; margin-bottom:10px; transition:border-color .15s,box-shadow .15s; }
.cfqm-kanban-card:hover { border-color:rgba(15,23,42,.15); box-shadow:0 2px 8px rgba(0,0,0,.04); }
.cfqm-kanban-card-signoff { border-color:rgba(220,38,38,.25); border-left:3px solid #dc2626; }
.cfqm-kanban-card-priority { border-top:2px solid #f59e0b; }
.cfqm-kanban-card-top { display:flex; justify-content:space-between; align-items:flex-start; gap:8px; margin-bottom:4px; }
.cfqm-kanban-card-title { font-size:13px; font-weight:600; color:var(--cfqm-ink); line-height:1.3; }
.cfqm-kanban-card-desc { font-size:12px; color:var(--cfqm-muted-2); line-height:1.4; margin-bottom:8px; }
.cfqm-kanban-card-meta { display:flex; gap:8px; flex-wrap:wrap; font-size:11px; color:var(--cfqm-muted-2); margin-bottom:8px; }
.cfqm-kanban-card-trade { background:rgba(0,200,224,.08); color:#0891b2; padding:1px 6px; border-radius:4px; font-weight:600; }
.cfqm-kanban-card-actions { display:flex; gap:4px; align-items:center; border-top:1px solid rgba(15,23,42,.05); padding-top:8px; }
.cfqm-kanban-move { background:none; border:1px solid rgba(15,23,42,.1); border-radius:4px; padding:2px 8px; font-size:14px; color:var(--cfqm-muted); cursor:pointer; transition:all .15s; }
.cfqm-kanban-move:hover { background:var(--cfqm-surface-2); color:var(--cfqm-ink); }
.cfqm-kanban-edit { font-size:14px; color:var(--cfqm-muted); text-decoration:none; padding:2px 6px; border-radius:4px; }
.cfqm-kanban-edit:hover { background:var(--cfqm-surface-2); color:var(--cfqm-ink); }
.cfqm-kanban-delete { background:none; border:none; font-size:16px; color:var(--cfqm-border-2); cursor:pointer; padding:2px 6px; margin-left:auto; }
.cfqm-kanban-delete:hover { color:#dc2626; }

/* Quick add */
.cfqm-kanban-quickadd { display:flex; gap:6px; margin-top:8px; }
.cfqm-kanban-quickadd-input { flex:1; padding:8px 10px; border:1px dashed rgba(15,23,42,.15); border-radius:8px; font-size:13px; background:transparent; }
.cfqm-kanban-quickadd-input:focus { border-style:solid; border-color:var(--cfqm-accent); outline:none; background:var(--cfqm-card); }

/* Mobile: stack kanban columns vertically */
@media(max-width:768px) {
    .cfqm-kanban { flex-direction:column; gap:8px; overflow-x:visible; }
    .cfqm-kanban-col { max-width:none; min-width:auto; }
    .cfqm-kanban-col-header { cursor:pointer; padding:10px 12px; background:var(--cfqm-surface-2); border-radius:10px; margin-bottom:0; user-select:none; -webkit-user-select:none; }
    .cfqm-kanban-col-header::after { content:'▾'; margin-left:auto; font-size:22px; color:var(--cfqm-muted); transition:transform .15s; line-height:1; }
    .cfqm-kanban-col.cfqm-col-collapsed .cfqm-kanban-col-header::after { transform:rotate(-90deg); }
    .cfqm-kanban-col.cfqm-col-collapsed .cfqm-kanban-col-body { display:none; }
    .cfqm-kanban-col-body { min-height:0; margin-top:6px; }
    .cfqm-board-wrap { padding-left:8px; padding-right:8px; }
}

/* ── More dropdown nav (mobile) ──────────────────────────────────────── */
.cfqm-hub-more { display:none; position:relative; }
.cfqm-hub-more-btn { background:none; border:none; cursor:pointer; font-family:inherit; font-size:inherit; font-weight:inherit; color:inherit; text-transform:none; letter-spacing:normal; }
.cfqm-hub-more-dropdown {
  display:none; position:absolute; top:100%; right:0; z-index:50;
  background:var(--cfqm-card); border-radius:8px; box-shadow:0 4px 16px rgba(0,0,0,.15);
  min-width:150px; padding:6px 0; margin-top:6px;
}
.cfqm-hub-more-open .cfqm-hub-more-dropdown { display:block; }
.cfqm-hub-more-item {
  display:block; padding:10px 16px; font-size:14px; color:var(--cfqm-ink-2); text-decoration:none;
}
.cfqm-hub-more-item:hover { background:var(--cfqm-surface-2); }
.cfqm-hub-more-item-active { color:var(--cfqm-accent,#00C8D4); font-weight:600; }

@media (max-width:600px) {
  .cfqm-hub-more { display:inline-block; }
}



/* ── Move buttons ────────────────────────────────────────────────────── */
.cfqm-kanban-card-actions { flex-wrap:wrap; }
.cfqm-move-btn { font-size:13px !important; }
.cfqm-trash-btn { font-size:18px !important; padding:4px 8px !important; opacity:0.6; transition:opacity .15s; }
.cfqm-trash-btn:hover { opacity:1; }

/* ── Share bar ───────────────────────────────────────────────────────── */
.cfqm-proj-share-bar {
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  background:var(--cfqm-surface); border:1px solid var(--cfqm-border-2); border-radius:10px;
  padding:10px 14px; margin-bottom:16px;
}
.cfqm-proj-share-left { display:flex; align-items:center; gap:8px; flex:1; min-width:0; }
.cfqm-proj-share-label { font-size:13px; font-weight:600; color:var(--cfqm-muted); white-space:nowrap; }
.cfqm-proj-share-url {
  flex:1; min-width:120px; font-size:12px; color:var(--cfqm-ink-2); background:var(--cfqm-card);
  border:1px solid var(--cfqm-border-2); border-radius:6px; padding:6px 10px; cursor:pointer;
}
.cfqm-proj-share-right { flex-shrink:0; }
@media(max-width:600px) {
  .cfqm-proj-share-bar { flex-direction:column; align-items:stretch; }
  .cfqm-proj-share-left { flex-direction:column; gap:4px; }
  .cfqm-proj-share-url { width:100%; }
}

/* ── Customer project view ───────────────────────────────────────────── */
.cfqm-project-customer-view { max-width:640px; margin:0 auto; padding:20px 16px; }
.cfqm-proj-cust-header { text-align:center; padding:28px 20px; }
.cfqm-proj-cust-biz { font-size:13px; font-weight:600; color:var(--cfqm-accent,#00C8D4); text-transform:uppercase; letter-spacing:0.5px; margin-bottom:6px; }
.cfqm-proj-cust-title { font-size:24px; font-weight:800; color:var(--cfqm-ink); margin:0 0 8px; }
.cfqm-proj-cust-desc { font-size:14px; color:var(--cfqm-muted); margin:0 0 12px; }
.cfqm-proj-cust-meta { font-size:13px; color:var(--cfqm-muted-2); display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }

.cfqm-proj-cust-progress { padding:20px; }
.cfqm-proj-cust-progress-header { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:10px; }
.cfqm-proj-cust-progress-title { font-size:15px; font-weight:700; color:var(--cfqm-ink); }
.cfqm-proj-cust-progress-pct { font-size:22px; font-weight:800; color:var(--cfqm-accent,#00C8D4); }

.cfqm-proj-cust-stats { display:flex; gap:8px; margin-top:16px; }
.cfqm-proj-cust-stat {
  flex:1; text-align:center; background:var(--cfqm-surface); border-radius:8px; padding:10px 4px;
}
.cfqm-proj-cust-stat-icon { display:block; font-size:18px; margin-bottom:2px; }
.cfqm-proj-cust-stat-count { display:block; font-size:18px; font-weight:800; color:var(--cfqm-ink); }
.cfqm-proj-cust-stat-label { display:block; font-size:11px; color:var(--cfqm-muted-2); }

/* Timeline */
.cfqm-proj-cust-timeline { margin-top:20px; }
.cfqm-proj-cust-section-title { font-size:17px; font-weight:700; color:var(--cfqm-ink); margin:0 0 16px; }

.cfqm-proj-cust-tl-group { margin-bottom:20px; }
.cfqm-proj-cust-tl-group-header {
  display:flex; align-items:center; gap:6px;
  font-size:14px; font-weight:700; color:var(--cfqm-ink-2);
  margin-bottom:10px; padding-bottom:6px; border-bottom:1px solid var(--cfqm-border-2);
}
.cfqm-proj-cust-tl-icon { font-size:16px; }

.cfqm-proj-cust-tl-item {
  display:flex; gap:12px; padding:0 0 14px 0;
  position:relative;
}
.cfqm-proj-cust-tl-item:last-child { padding-bottom:0; }
.cfqm-proj-cust-tl-dot {
  width:12px; height:12px; border-radius:50%; flex-shrink:0; margin-top:4px;
  background:var(--cfqm-border-2); border:2px solid #fff; box-shadow:0 0 0 2px var(--cfqm-border-2);
}
.cfqm-proj-cust-tl-completed .cfqm-proj-cust-tl-dot { background:#059669; box-shadow:0 0 0 2px #059669; }
.cfqm-proj-cust-tl-in_progress .cfqm-proj-cust-tl-dot { background:var(--cfqm-accent,#00C8D4); box-shadow:0 0 0 2px var(--cfqm-accent,#00C8D4); }
.cfqm-proj-cust-tl-awaiting_signoff .cfqm-proj-cust-tl-dot { background:#f59e0b; box-shadow:0 0 0 2px #f59e0b; }
.cfqm-proj-cust-tl-upcoming .cfqm-proj-cust-tl-dot { background:var(--cfqm-border-2); box-shadow:0 0 0 2px var(--cfqm-border-2); }

/* Connecting line between dots */
.cfqm-proj-cust-tl-item:not(:last-child)::before {
  content:''; position:absolute; left:5px; top:18px; bottom:0;
  width:2px; background:var(--cfqm-border-2);
}

.cfqm-proj-cust-tl-content { flex:1; min-width:0; }
.cfqm-proj-cust-tl-task-title { font-size:14px; font-weight:600; color:var(--cfqm-ink); }
.cfqm-proj-cust-tl-task-desc { font-size:13px; color:var(--cfqm-muted); margin-top:2px; }
.cfqm-proj-cust-tl-task-meta { display:flex; gap:8px; align-items:center; margin-top:6px; font-size:12px; color:var(--cfqm-muted-2); }

.cfqm-proj-cust-footer {
  text-align:center; padding:24px 0 8px; font-size:12px; color:var(--cfqm-muted-2);
  border-top:1px solid var(--cfqm-border-2); margin-top:24px;
}

/* ── Budget card (tradesperson board) ────────────────────────────────── */
.cfqm-budget-card { padding:16px 20px; }
.cfqm-budget-header { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:14px; }
.cfqm-budget-title { font-size:15px; font-weight:700; color:var(--cfqm-ink); }
.cfqm-budget-total { font-size:22px; font-weight:800; color:var(--cfqm-ink); }

.cfqm-budget-status-row { display:flex; gap:8px; margin-bottom:16px; }
.cfqm-budget-status-item {
  flex:1; text-align:center; background:var(--cfqm-surface); border-radius:8px; padding:10px 4px;
}
.cfqm-budget-status-icon { display:block; font-size:16px; margin-bottom:2px; }
.cfqm-budget-status-amount { display:block; font-size:15px; font-weight:700; color:var(--cfqm-ink); }
.cfqm-budget-status-label { display:block; font-size:11px; color:var(--cfqm-muted-2); }

.cfqm-budget-trade-section { border-top:1px solid var(--cfqm-border-2); padding-top:14px; }
.cfqm-budget-trade-title { font-size:13px; font-weight:600; color:var(--cfqm-muted); margin-bottom:10px; }
.cfqm-budget-trade-row { display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.cfqm-budget-trade-name { font-size:13px; color:var(--cfqm-ink-2); min-width:100px; flex-shrink:0; }
.cfqm-budget-trade-bar-wrap { flex:1; height:8px; background:var(--cfqm-surface-2); border-radius:4px; overflow:hidden; }
.cfqm-budget-trade-bar { height:100%; background:var(--cfqm-accent,#00C8D4); border-radius:4px; transition:width .3s; }
.cfqm-budget-trade-amount { font-size:13px; font-weight:600; color:var(--cfqm-ink); min-width:70px; text-align:right; }

@media(max-width:600px) {
  .cfqm-budget-status-row { flex-wrap:wrap; }
  .cfqm-budget-status-item { flex:1 1 45%; }
  .cfqm-budget-trade-name { min-width:80px; font-size:12px; }
}

/* ── Customer view budget summary ────────────────────────────────────── */
.cfqm-proj-cust-budget-summary {
  margin-top:14px; padding-top:14px; border-top:1px solid var(--cfqm-border-2);
}
.cfqm-proj-cust-budget-row {
  display:flex; justify-content:space-between; align-items:center;
  font-size:14px; color:var(--cfqm-ink-2); padding:4px 0;
}
.cfqm-proj-cust-budget-row strong { font-size:15px; }

/* ── Customer sign-off buttons ───────────────────────────────────────── */
.cfqm-proj-cust-signoff {
  margin-top:10px; display:flex; gap:8px; align-items:flex-start; flex-wrap:wrap;
}
.cfqm-proj-cust-signoff-approve { display:inline; }
.cfqm-proj-cust-query-toggle { display:inline; }
.cfqm-proj-cust-query-form {
  width:100%; margin-top:6px;
}
.cfqm-proj-cust-query-input {
  width:100%; padding:8px 10px; border:1px solid var(--cfqm-border-2); border-radius:8px;
  font-size:13px; font-family:inherit; resize:vertical;
}
.cfqm-proj-cust-query-input:focus { border-color:var(--cfqm-accent,#00C8D4); outline:none; }

/* ── Inline checkbox for delete ──────────────────────────────────────── */
.cfqm-check-inline { display:flex; align-items:center; flex-shrink:0; }
.cfqm-check-inline input[type="checkbox"] { width:18px; height:18px; cursor:pointer; }

/* ── Welcome / first-run card ────────────────────────────────────────── */
.cfqm-welcome-card {
  background:var(--cfqm-card); border:2px solid var(--cfqm-accent,#00C8D4); border-radius:14px;
  padding:24px; margin-bottom:20px;
}
.cfqm-welcome-header { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:16px; }
.cfqm-welcome-title { font-size:20px; font-weight:800; color:var(--cfqm-ink); margin:0 0 4px; }
.cfqm-welcome-subtitle { font-size:14px; color:var(--cfqm-muted); margin:0; }
.cfqm-welcome-dismiss {
  font-size:18px; color:var(--cfqm-muted-2); text-decoration:none; padding:4px 8px;
  border-radius:6px; line-height:1; flex-shrink:0;
}
.cfqm-welcome-dismiss:hover { background:var(--cfqm-surface-2); color:var(--cfqm-ink-2); }
.cfqm-welcome-progress { margin-bottom:20px; }

.cfqm-welcome-steps { display:flex; flex-direction:column; gap:12px; }
.cfqm-welcome-step {
  display:flex; gap:12px; align-items:flex-start;
  padding:14px 16px; background:var(--cfqm-surface); border-radius:10px;
  border:1px solid var(--cfqm-border-2);
}
.cfqm-welcome-step-done { opacity:0.6; }
.cfqm-welcome-step-done .cfqm-welcome-step-label { text-decoration:line-through; }
.cfqm-welcome-step-check { flex-shrink:0; font-size:18px; }
.cfqm-welcome-step-num {
  display:inline-flex; align-items:center; justify-content:center;
  width:24px; height:24px; border-radius:50%;
  background:var(--cfqm-accent,#00C8D4); color:#fff;
  font-size:13px; font-weight:700;
}
.cfqm-welcome-step-info { flex:1; min-width:0; }
.cfqm-welcome-step-label { font-size:14px; font-weight:600; color:var(--cfqm-ink); }
.cfqm-welcome-step-desc { font-size:13px; color:var(--cfqm-muted); margin-top:2px; }

/* ── Upgrade prompt ──────────────────────────────────────────────────── */
.cfqm-upgrade-card { text-align:center; padding:40px 24px; max-width:480px; margin:40px auto; }
.cfqm-upgrade-icon { font-size:40px; margin-bottom:12px; }
.cfqm-upgrade-title { font-size:20px; font-weight:800; color:var(--cfqm-ink); margin:0 0 10px; }
.cfqm-upgrade-desc { font-size:14px; color:var(--cfqm-muted); margin:0 0 8px; line-height:1.5; }

/* ── Polish pass: missing styles ─────────────────────────────────────── */

/* Error note */
.cfqm-note-error { color:#991b1b; background:#fef2f2; border-radius:8px; padding:10px 14px; margin-bottom:14px; }

/* Project card (hub list) */
.cfqm-proj-card-top { display:flex; align-items:center; gap:12px; }
.cfqm-proj-card-info { flex:1; min-width:0; }
.cfqm-proj-card-right { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.cfqm-proj-card-progress { margin-top:12px; }
.cfqm-proj-card-columns { display:flex; gap:6px; margin-top:8px; }
.cfqm-proj-col-chip {
  display:flex; align-items:center; gap:4px;
  background:var(--cfqm-surface-2); border-radius:6px; padding:4px 8px; font-size:12px;
}
.cfqm-proj-col-icon { font-size:13px; }
.cfqm-proj-col-count { font-weight:700; color:var(--cfqm-ink); }

/* Project progress bar */
.cfqm-proj-progress-bar { height:8px; background:var(--cfqm-border-2); border-radius:4px; overflow:hidden; }
.cfqm-proj-progress-bar-lg { height:12px; }
.cfqm-proj-progress-fill { height:100%; background:var(--cfqm-accent,#00C8D4); border-radius:4px; transition:width .3s; }
.cfqm-proj-progress-label { font-size:12px; color:var(--cfqm-muted); margin-top:4px; display:inline-block; }
.cfqm-proj-topbar-progress { margin-bottom:16px; }

/* Kanban chips (trade, priority, cost on task cards) */
.cfqm-kanban-chip {
  display:inline-block; padding:2px 8px; border-radius:4px; font-size:11px; font-weight:600;
  background:rgba(0,200,224,.08); color:#0891b2;
}
.cfqm-kanban-chip-high { background:rgba(245,158,11,.1); color:#a16207; }
.cfqm-kanban-chip-urgent { background:rgba(220,38,38,.1); color:#dc2626; }

/* Kanban card priority borders */
.cfqm-kanban-card-high { border-left:3px solid #f59e0b; }
.cfqm-kanban-card-urgent { border-left:3px solid #dc2626; }

/* Kanban card edit link */
.cfqm-kanban-card-edit {
  font-size:15px; color:var(--cfqm-muted-2); text-decoration:none; padding:2px 6px; border-radius:4px; flex-shrink:0;
}
.cfqm-kanban-card-edit:hover { background:var(--cfqm-surface-2); color:var(--cfqm-ink); }

/* Kanban card dates */
.cfqm-kanban-card-dates { display:flex; gap:4px; align-items:center; font-size:11px; color:var(--cfqm-muted-2); margin-bottom:8px; }

/* Share bar copied label */
.cfqm-proj-share-copied { font-size:12px; color:#059669; white-space:nowrap; }

/* ── Milestones (tradesperson board) ─────────────────────────────────── */
.cfqm-milestones-card { padding:16px 20px; }
.cfqm-milestones-header { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:12px; }
.cfqm-milestones-title { font-size:15px; font-weight:700; color:var(--cfqm-ink); }
.cfqm-milestones-count { font-size:13px; color:var(--cfqm-muted); }

.cfqm-milestones-list { margin-bottom:14px; }
.cfqm-milestone-item {
  display:flex; align-items:center; gap:10px;
  padding:8px 0; border-bottom:1px solid var(--cfqm-surface-2);
}
.cfqm-milestone-item:last-child { border-bottom:none; }
.cfqm-milestone-reached { opacity:0.65; }
.cfqm-milestone-reached .cfqm-milestone-name { text-decoration:line-through; }
.cfqm-milestone-marker { font-size:16px; flex-shrink:0; }
.cfqm-milestone-info { flex:1; display:flex; align-items:center; gap:8px; flex-wrap:wrap; min-width:0; }
.cfqm-milestone-name { font-size:14px; font-weight:600; color:var(--cfqm-ink); }
.cfqm-milestone-date { font-size:12px; color:var(--cfqm-muted); }
.cfqm-milestone-source { font-size:11px; color:var(--cfqm-muted-2); font-style:italic; }
.cfqm-milestone-actions { display:flex; gap:4px; flex-shrink:0; }

.cfqm-milestone-add {
  display:flex; gap:8px; align-items:center; flex-wrap:wrap;
  padding-top:10px; border-top:1px solid var(--cfqm-border-2);
}
.cfqm-milestone-add-title {
  flex:1; min-width:150px; padding:8px 10px; border:1px dashed var(--cfqm-border-2); border-radius:8px;
  font-size:13px; font-family:inherit;
}
.cfqm-milestone-add-title:focus { border-style:solid; border-color:var(--cfqm-accent,#00C8D4); outline:none; }
.cfqm-milestone-add-date { padding:8px 10px; border:1px solid var(--cfqm-border-2); border-radius:8px; font-size:13px; font-family:inherit; }

.cfqm-milestone-flag { font-size:13px; }

/* ── Milestones (customer view) ──────────────────────────────────────── */
.cfqm-proj-cust-milestones { padding:20px; }
.cfqm-proj-cust-ms-list { display:flex; flex-direction:column; gap:0; }
.cfqm-proj-cust-ms-item {
  display:flex; align-items:center; gap:10px;
  padding:10px 0; border-bottom:1px solid var(--cfqm-surface-2);
}
.cfqm-proj-cust-ms-item:last-child { border-bottom:none; }
.cfqm-proj-cust-ms-reached { opacity:0.6; }
.cfqm-proj-cust-ms-reached .cfqm-proj-cust-ms-name { text-decoration:line-through; }
.cfqm-proj-cust-ms-marker { font-size:18px; flex-shrink:0; }
.cfqm-proj-cust-ms-info { flex:1; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.cfqm-proj-cust-ms-name { font-size:14px; font-weight:600; color:var(--cfqm-ink); }
.cfqm-proj-cust-ms-date { font-size:13px; color:var(--cfqm-muted); }

/* ── Task calendar / list view ───────────────────────────────────────── */
.cfqm-calendar-wrap { max-width:900px; }

/* Month nav */
.cfqm-cal-nav { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.cfqm-cal-nav-title { font-size:17px; font-weight:700; color:var(--cfqm-ink); }

/* ── Calendar grid ───────────────────────────────────────────────────── */
.cfqm-cal-grid-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.cfqm-cal-grid { width:100%; border-collapse:collapse; table-layout:fixed; }
.cfqm-cal-grid th {
  padding:8px 4px; font-size:12px; font-weight:600; color:var(--cfqm-muted);
  text-align:center; border-bottom:2px solid var(--cfqm-border-2);
}
.cfqm-cal-grid td { vertical-align:top; border:1px solid var(--cfqm-surface-2); height:90px; padding:4px; }
.cfqm-cal-empty { background:var(--cfqm-surface); }
.cfqm-cal-day-num { font-size:13px; font-weight:700; color:var(--cfqm-ink-2); margin-bottom:4px; }
.cfqm-cal-today { background:#ecfeff; }
.cfqm-cal-today .cfqm-cal-day-num { color:var(--cfqm-accent,#00C8D4); }
.cfqm-cal-task {
  display:block; font-size:11px; line-height:1.3; padding:2px 4px; margin-bottom:2px;
  border-radius:3px; text-decoration:none; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;
}
.cfqm-cal-task-upcoming { background:var(--cfqm-surface-2); color:var(--cfqm-ink-2); }
.cfqm-cal-task-in_progress { background:rgba(0,200,224,.12); color:#0891b2; }
.cfqm-cal-task-awaiting_signoff { background:rgba(245,158,11,.12); color:#a16207; }
.cfqm-cal-task-completed { background:rgba(22,163,106,.1); color:#16a34a; }
.cfqm-cal-more { font-size:10px; color:var(--cfqm-muted-2); }

@media(max-width:600px) {
  .cfqm-cal-grid td { height:60px; padding:2px; }
  .cfqm-cal-grid th { font-size:10px; padding:6px 2px; }
  .cfqm-cal-day-num { font-size:11px; }
  .cfqm-cal-task { font-size:9px; padding:1px 3px; }
}

/* ── List view ───────────────────────────────────────────────────────── */
.cfqm-cal-list-group { margin-bottom:12px; }
.cfqm-cal-list-day {
  font-size:14px; font-weight:700; color:var(--cfqm-ink);
  padding:8px 0 6px; border-bottom:2px solid var(--cfqm-border-2); margin-bottom:4px;
  display:flex; align-items:center; gap:8px;
}
.cfqm-cal-list-today { color:var(--cfqm-accent,#00C8D4); }
.cfqm-cal-list-today-badge {
  font-size:11px; font-weight:600; background:var(--cfqm-accent,#00C8D4); color:#fff;
  padding:2px 8px; border-radius:10px;
}
.cfqm-cal-list-undated { color:var(--cfqm-muted-2); }
.cfqm-cal-list-item {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:10px 12px; border-radius:8px; text-decoration:none;
  border:1px solid var(--cfqm-surface-2); margin-bottom:4px; transition:background .15s;
}
.cfqm-cal-list-item:hover { background:var(--cfqm-surface); }
.cfqm-cal-list-item-main { flex:1; min-width:0; }
.cfqm-cal-list-item-title { display:block; font-size:14px; font-weight:600; color:var(--cfqm-ink); }
.cfqm-cal-list-item-project { display:block; font-size:12px; color:var(--cfqm-muted-2); margin-top:1px; }
.cfqm-cal-list-item-right { flex-shrink:0; }

/* ── Tab header actions ──────────────────────────────────────────────── */
.cfqm-tab-header-actions { display:flex; gap:8px; align-items:center; }

/* ── Collaborators ───────────────────────────────────────────────────── */
.cfqm-collab-list { margin-bottom:14px; }
.cfqm-collab-item {
  display:flex; align-items:center; gap:10px;
  padding:8px 0; border-bottom:1px solid var(--cfqm-surface-2);
}
.cfqm-collab-item:last-child { border-bottom:none; }
.cfqm-collab-info { flex:1; min-width:0; }
.cfqm-collab-name { display:block; font-size:14px; font-weight:600; color:var(--cfqm-ink); }
.cfqm-collab-email { display:block; font-size:12px; color:var(--cfqm-muted-2); }
.cfqm-collab-invite-form { padding-top:10px; border-top:1px solid var(--cfqm-border-2); }

.cfqm-kanban-chip-assigned { background:rgba(99,102,241,.1); color:#4f46e5; }

/* ── Sub-invoice cards ───────────────────────────────────────────────── */
.cfqm-sub-inv-card { padding:14px 18px; }
.cfqm-sub-inv-top { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; flex-wrap:wrap; }
.cfqm-sub-inv-info { flex:1; min-width:0; }
.cfqm-sub-inv-from { display:block; font-size:15px; font-weight:700; color:var(--cfqm-ink); }
.cfqm-sub-inv-ref { display:block; font-size:12px; color:var(--cfqm-muted-2); }
.cfqm-sub-inv-project { display:block; font-size:12px; color:var(--cfqm-muted); margin-top:2px; }
.cfqm-sub-inv-right { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.cfqm-sub-inv-total { font-size:17px; font-weight:800; color:var(--cfqm-ink); }
.cfqm-sub-inv-actions { display:flex; align-items:center; gap:8px; margin-top:10px; padding-top:10px; border-top:1px solid var(--cfqm-surface-2); flex-wrap:wrap; }

/* ── Suggested actions ───────────────────────────────────────────────── */
.cfqm-suggestions-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; padding:0 4px; }
.cfqm-suggestions-title { font-size:15px; font-weight:700; color:var(--cfqm-ink); }
.cfqm-suggestions-count {
  font-size:12px; font-weight:700; color:#fff; background:var(--cfqm-accent,#00C8D4);
  width:22px; height:22px; border-radius:50%; display:flex; align-items:center; justify-content:center;
}
.cfqm-suggestions-wrap { margin-bottom:8px; }
.cfqm-suggestions-wrap .cfqm-card { max-width:100%; box-sizing:border-box; }
.cfqm-suggestion-item {
  display:flex; align-items:center; gap:10px;
}
.cfqm-suggestion-high { background:rgba(239,68,68,.04) !important; border-color:rgba(239,68,68,.2) !important; }
.cfqm-suggestion-icon { font-size:18px; flex-shrink:0; }
.cfqm-suggestion-info { flex:1; min-width:0; }
.cfqm-suggestion-name { display:block; font-size:14px; font-weight:600; color:var(--cfqm-ink); }
.cfqm-suggestion-desc { display:block; font-size:12px; color:var(--cfqm-muted-2); margin-top:1px; }
.cfqm-suggestion-actions { display:flex; gap:6px; flex-shrink:0; flex-wrap:wrap; }

/* AI draft panel */
.cfqm-ai-draft-panel { padding:16px 20px; margin-bottom:16px; }

@media(max-width:600px) {
  .cfqm-suggestion-item { flex-wrap:wrap; }
  .cfqm-suggestion-actions { width:100%; margin-top:6px; }
}

/* ── Suggestions ─────────────────────────────────────────────────────── */
/* AI Suggestions (standalone cards, no parent container) */
.cfqm-suggestions-header { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:12px; }
.cfqm-suggestions-title { font-size:15px; font-weight:700; color:var(--cfqm-ink); }
.cfqm-suggestions-count {
  font-size:12px; font-weight:600; background:var(--cfqm-accent,#00C8D4); color:#fff;
  padding:2px 8px; border-radius:10px;
}
.cfqm-suggestions-list { display:flex; flex-direction:column; gap:0; }
.cfqm-suggestion-item {
  display:flex; align-items:flex-start; gap:10px;
  padding:10px 0; border-bottom:1px solid var(--cfqm-surface-2);
}
.cfqm-suggestion-item:last-child { border-bottom:none; }
.cfqm-suggestion-high { background:rgba(239,68,68,.04); margin:0 -20px; padding:10px 20px; border-radius:8px; }
.cfqm-suggestion-icon { font-size:18px; flex-shrink:0; margin-top:2px; }
.cfqm-suggestion-info { flex:1; min-width:0; }
.cfqm-suggestion-item-title { display:block; font-size:14px; font-weight:600; color:var(--cfqm-ink); }
.cfqm-suggestion-desc { display:block; font-size:12px; color:var(--cfqm-muted); margin-top:2px; }
.cfqm-suggestion-actions { display:flex; gap:6px; flex-shrink:0; align-items:flex-start; flex-wrap:wrap; }

/* ── AI draft modal ──────────────────────────────────────────────────── */
.cfqm-ai-modal {
  position:fixed; top:0; left:0; right:0; bottom:0;
  background:rgba(0,0,0,.4); z-index:9999;
  display:flex; align-items:center; justify-content:center; padding:20px;
}
.cfqm-ai-modal-card { max-width:560px; width:100%; padding:0; overflow:hidden; }
.cfqm-ai-modal-header {
  display:flex; justify-content:space-between; align-items:center;
  padding:14px 18px; border-bottom:1px solid var(--cfqm-border-2);
}
.cfqm-ai-modal-close {
  background:none; border:none; font-size:22px; color:var(--cfqm-muted-2); cursor:pointer;
  padding:0; line-height:1;
}
.cfqm-ai-modal-close:hover { color:var(--cfqm-ink); }
.cfqm-ai-draft-textarea {
  width:100%; font-size:14px; padding:14px 18px; border:none; border-bottom:1px solid var(--cfqm-border-2);
  font-family:inherit; resize:vertical; min-height:120px; box-sizing:border-box;
}
.cfqm-ai-draft-textarea:focus { outline:none; }

@media(max-width:600px) {
  .cfqm-suggestion-item { flex-wrap:wrap; }
  .cfqm-suggestion-actions { width:100%; margin-top:6px; }
}

/* ── AI draft button disabled state ──────────────────────────────────── */
.cfqm-btn-disabled, .cfqm-btn-disabled:hover {
  opacity:0.6; cursor:default; pointer-events:none;
  background:var(--cfqm-border-2) !important; color:var(--cfqm-muted-2) !important; border-color:var(--cfqm-border-2) !important;
}

/* ── Budget health alerts ────────────────────────────────────────────── */
.cfqm-budget-alerts { display:flex; flex-direction:column; gap:8px; margin-bottom:12px; }
.cfqm-budget-alert {
  display:flex; align-items:flex-start; gap:10px;
  padding:12px 16px; border-radius:10px; border-left:4px solid;
}
.cfqm-budget-alert-warning { background:rgba(245,158,11,.06); border-color:#f59e0b; }
.cfqm-budget-alert-danger { background:rgba(239,68,68,.06); border-color:#ef4444; }
.cfqm-budget-alert-info { background:rgba(99,102,241,.06); border-color:#6366f1; }
.cfqm-budget-alert-icon { font-size:18px; flex-shrink:0; margin-top:1px; }
.cfqm-budget-alert-body { flex:1; min-width:0; }
.cfqm-budget-alert-title { display:block; font-size:14px; font-weight:700; color:var(--cfqm-ink); }
.cfqm-budget-alert-desc { display:block; font-size:13px; color:var(--cfqm-muted); margin-top:2px; }
.cfqm-budget-alert-explain {
  margin-top:8px; padding:10px 12px; background:rgba(255,255,255,.7);
  border-radius:8px; font-size:13px; color:var(--cfqm-ink-2); line-height:1.5;
}

/* ── Inline AI draft component ───────────────────────────────────────── */
.cfqm-inline-ai { margin-top:12px; }
.cfqm-inline-ai-panel {
  margin-top:10px; padding:14px 16px;
  background:var(--cfqm-surface); border:1px solid var(--cfqm-border-2); border-radius:10px;
}
.cfqm-inline-ai-header {
  display:flex; justify-content:space-between; align-items:center; margin-bottom:10px;
}
.cfqm-inline-ai-title { font-size:14px; font-weight:700; color:var(--cfqm-ink); }
.cfqm-inline-ai-textarea {
  width:100%; padding:12px; font-size:14px; font-family:inherit;
  border:1px solid var(--cfqm-border-2); border-radius:8px; resize:vertical;
  line-height:1.5;
}
.cfqm-inline-ai-textarea:focus { border-color:var(--cfqm-accent,#00C8D4); outline:none; }

/* ═══════════════════════════════════════════════════════════════════════ */
/* HOMEOWNER HUB                                                         */
/* ═══════════════════════════════════════════════════════════════════════ */

.cfqm-ho-wrap { max-width:800px; }
.cfqm-ho-nav { margin-bottom:16px; }
.cfqm-ho-welcome { margin-bottom:16px; }
.cfqm-ho-welcome-sub { color:var(--cfqm-muted); font-size:14px; margin:4px 0 0; }

/* Stats grid */
.cfqm-ho-stats-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:16px; }
.cfqm-ho-stat-card {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:18px 12px; text-decoration:none; transition:transform .15s;
}
.cfqm-ho-stat-card:hover { transform:translateY(-2px); }
.cfqm-ho-stat-icon { font-size:24px; margin-bottom:6px; }
.cfqm-ho-stat-num { font-size:28px; font-weight:800; color:var(--cfqm-ink); line-height:1; }
.cfqm-ho-stat-label { font-size:12px; color:var(--cfqm-muted-2); margin-top:4px; }

@media(max-width:500px) {
  .cfqm-ho-stats-grid { grid-template-columns:repeat(2,1fr); }
}

/* Item cards (quotes, invoices, projects, moves) */
.cfqm-ho-item-card {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:14px 18px; text-decoration:none; transition:background .15s; margin-bottom:6px;
}
.cfqm-ho-item-card:hover { background:var(--cfqm-surface); }
.cfqm-ho-item-main { flex:1; min-width:0; }
.cfqm-ho-item-title { display:block; font-size:15px; font-weight:600; color:var(--cfqm-ink); }
.cfqm-ho-item-sub { display:block; font-size:12px; color:var(--cfqm-muted-2); margin-top:1px; }
.cfqm-ho-item-right { display:flex; flex-direction:column; align-items:flex-end; gap:4px; flex-shrink:0; }
.cfqm-ho-item-amount { font-size:16px; font-weight:700; color:var(--cfqm-ink); }
.cfqm-ho-item-pct { font-size:20px; font-weight:800; color:var(--cfqm-accent,#00C8D4); }

/* ═══════════════════════════════════════════════════════════════════════ */
/* MOVE PLANNER                                                          */
/* ═══════════════════════════════════════════════════════════════════════ */

.cfqm-move-wrap { max-width:800px; }

/* Summary card */
.cfqm-move-summary { padding:20px; }
.cfqm-move-summary-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:14px; margin-bottom:14px; }
.cfqm-move-summary-item { display:flex; flex-direction:column; }
.cfqm-move-summary-label { font-size:11px; font-weight:600; color:var(--cfqm-muted-2); text-transform:uppercase; letter-spacing:.05em; }
.cfqm-move-summary-value { font-size:15px; font-weight:600; color:var(--cfqm-ink); margin-top:2px; }
.cfqm-move-summary-sub { font-size:13px; color:var(--cfqm-accent,#00C8D4); font-weight:600; margin-top:1px; }
.cfqm-move-progress { margin-top:4px; }

/* Category cards */
.cfqm-move-category { padding:16px 20px; margin-bottom:10px; }
.cfqm-move-cat-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.cfqm-move-cat-title { font-size:15px; font-weight:700; color:var(--cfqm-ink); }
.cfqm-move-cat-count { font-size:13px; color:var(--cfqm-muted-2); }

/* Individual tasks */
.cfqm-move-task {
  display:flex; align-items:center; gap:10px;
  padding:8px 0; border-bottom:1px solid var(--cfqm-surface-2);
}
.cfqm-move-task:last-child { border-bottom:none; }
.cfqm-move-task-done { opacity:0.5; }
.cfqm-move-task-done .cfqm-move-task-title { text-decoration:line-through; }
.cfqm-move-task-check {
  background:none; border:none; cursor:pointer; font-size:18px; padding:0;
  line-height:1; flex-shrink:0;
}
.cfqm-move-task-info { flex:1; min-width:0; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.cfqm-move-task-title { font-size:14px; color:var(--cfqm-ink); }
.cfqm-move-task-date { font-size:12px; color:var(--cfqm-muted-2); }

/* New move form */
.cfqm-ho-new-move { padding:20px; }

/* ═══════════════════════════════════════════════════════════════════════ */
/* FEEDBACK SYSTEM                                                       */
/* ═══════════════════════════════════════════════════════════════════════ */

.cfqm-fb-filters { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:16px; align-items:center; }
.cfqm-fb-card { padding:16px 20px; margin-bottom:10px; }
.cfqm-fb-card-top { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:10px; flex-wrap:wrap; }
.cfqm-fb-card-left { flex:1; min-width:0; }
.cfqm-fb-card-type { display:block; font-size:13px; font-weight:700; margin-bottom:2px; }
.cfqm-fb-card-from { display:block; font-size:14px; font-weight:600; color:var(--cfqm-ink); }
.cfqm-fb-card-date { display:block; font-size:12px; color:var(--cfqm-muted-2); margin-top:1px; }
.cfqm-fb-card-right { flex-shrink:0; }
.cfqm-fb-status-select {
  padding:6px 10px; border-radius:8px; font-size:13px; font-weight:600;
  border:2px solid; background:var(--cfqm-card); font-family:inherit; cursor:pointer;
}
.cfqm-fb-card-message {
  font-size:14px; color:var(--cfqm-ink-2); line-height:1.6;
  padding:12px 16px; background:var(--cfqm-surface); border-radius:8px; margin-bottom:10px;
}
.cfqm-fb-card-screenshot { margin-bottom:10px; }
.cfqm-fb-card-note { padding-top:10px; border-top:1px solid var(--cfqm-surface-2); }
.cfqm-fb-note-textarea {
  width:100%; padding:8px 10px; border:1px dashed var(--cfqm-border-2); border-radius:8px;
  font-size:13px; font-family:inherit; margin-bottom:6px; resize:vertical;
}
.cfqm-fb-note-textarea:focus { border-style:solid; border-color:var(--cfqm-accent,#00C8D4); outline:none; }

/* ═══════════════════════════════════════════════════════════════════════ */
/* MANAGER DASHBOARD                                                     */
/* ═══════════════════════════════════════════════════════════════════════ */

.cfqm-mgr-request-card { padding:16px 20px; margin-bottom:12px; }
.cfqm-mgr-req-top { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:10px; flex-wrap:wrap; }
.cfqm-mgr-req-info { flex:1; min-width:0; }
.cfqm-mgr-req-title { display:block; font-size:15px; font-weight:700; color:var(--cfqm-ink); }
.cfqm-mgr-req-cats { display:block; font-size:13px; color:var(--cfqm-accent,#00C8D4); font-weight:600; margin-top:2px; }
.cfqm-mgr-req-date { display:block; font-size:12px; color:var(--cfqm-muted-2); margin-top:1px; }
.cfqm-mgr-req-right { flex-shrink:0; }
.cfqm-mgr-req-desc {
  font-size:14px; color:var(--cfqm-ink-2); line-height:1.5;
  padding:10px 14px; background:var(--cfqm-surface); border-radius:8px; margin-bottom:10px;
}
.cfqm-mgr-nearby { margin-top:12px; padding-top:12px; border-top:1px solid var(--cfqm-surface-2); }
.cfqm-mgr-nearby-trade {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:8px 0; border-bottom:1px solid var(--cfqm-surface-2);
}
.cfqm-mgr-nearby-trade:last-child { border-bottom:none; }
.cfqm-mgr-nearby-info { flex:1; min-width:0; }
.cfqm-mgr-nearby-name { display:block; font-size:14px; font-weight:600; color:var(--cfqm-ink); }
.cfqm-mgr-nearby-meta { display:block; font-size:12px; color:var(--cfqm-muted-2); }

/* ── Mobile: wider cards for all components ──────────────────────────── */
@media(max-width:480px) {
  .cfqm-budget-card,
  .cfqm-milestones-card,
  .cfqm-move-summary,
  .cfqm-move-category,
  .cfqm-ho-new-move,
  .cfqm-fb-card,
  .cfqm-mgr-request-card,
  .cfqm-sub-inv-card { padding:12px !important; }

  .cfqm-budget-alert { padding:10px 12px; }
  .cfqm-fb-modal { padding:20px 16px; }
  .cfqm-ho-stats-grid { gap:6px; }
  .cfqm-ho-stat-card { padding:14px 8px; }
  .cfqm-ho-stat-num { font-size:24px; }
  .cfqm-ho-item-card { padding:12px !important; }
  .cfqm-inline-ai-panel { padding:12px; }
  .cfqm-proj-share-bar { padding:12px; }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* HOME TASKS AI                                                         */
/* ═══════════════════════════════════════════════════════════════════════ */

.cfqm-home-ai-wrap { max-width:700px; }

/* Intro card */
.cfqm-home-ai-intro { text-align:center; padding:30px 24px; }
.cfqm-home-ai-intro-icon { font-size:40px; margin-bottom:8px; }
.cfqm-home-ai-intro-title { font-size:22px; font-weight:800; color:var(--cfqm-ink); margin:0 0 8px; }
.cfqm-home-ai-intro-sub { font-size:14px; color:var(--cfqm-muted); margin:0 0 20px; line-height:1.6; }
.cfqm-home-ai-examples { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; }
.cfqm-home-ai-example {
  background:var(--cfqm-surface-2); border:1px solid var(--cfqm-border-2); border-radius:20px;
  padding:8px 16px; font-size:13px; color:var(--cfqm-ink-2); cursor:pointer;
  font-family:inherit; transition:all .15s;
}
.cfqm-home-ai-example:hover { background:var(--cfqm-border-2); border-color:var(--cfqm-border-2); }

/* Chat area */
.cfqm-home-ai-chat {
  display:flex; flex-direction:column; gap:12px;
  max-height:60vh; overflow-y:auto; padding:4px 0;
  margin-bottom:12px;
}
.cfqm-hai-msg { display:flex; }
.cfqm-hai-msg-user { justify-content:flex-end; }
.cfqm-hai-msg-ai { justify-content:flex-start; }
.cfqm-hai-msg-bubble {
  max-width:85%; padding:12px 16px; border-radius:14px;
  font-size:14px; line-height:1.5;
}
.cfqm-hai-msg-user .cfqm-hai-msg-bubble {
  background:var(--cfqm-accent,#00C8D4); color:#fff;
  border-bottom-right-radius:4px;
}
.cfqm-hai-msg-ai .cfqm-hai-msg-bubble {
  background:var(--cfqm-surface-2); color:var(--cfqm-ink);
  border-bottom-left-radius:4px;
}
.cfqm-hai-thinking { color:var(--cfqm-muted-2); font-style:italic; }

/* Input bar */
.cfqm-home-ai-input-bar {
  display:flex; gap:8px; align-items:flex-end;
  position:sticky; bottom:0; background:var(--cfqm-card); padding:12px 0;
}
.cfqm-home-ai-input {
  flex:1; padding:12px 14px; border:1px solid var(--cfqm-border-2); border-radius:12px;
  font-size:14px; font-family:inherit; resize:none; line-height:1.4;
}
.cfqm-home-ai-input:focus { border-color:var(--cfqm-accent,#00C8D4); outline:none; }
.cfqm-home-ai-input-bar .cfqm-btn { padding:12px 20px; border-radius:12px; }

/* Response card (inside AI bubble) */
.cfqm-hai-response { }
.cfqm-hai-outcome {
  display:flex; align-items:center; gap:8px;
  padding:10px 14px; border-radius:8px; margin-bottom:12px;
}
.cfqm-hai-outcome-icon { font-size:20px; }
.cfqm-hai-outcome-label { font-size:14px; font-weight:700; }
.cfqm-hai-meta { display:flex; gap:12px; margin-bottom:12px; }
.cfqm-hai-meta-item { font-size:12px; font-weight:600; color:var(--cfqm-muted); }
.cfqm-hai-section { margin-bottom:10px; }
.cfqm-hai-section:last-child { margin-bottom:0; }
.cfqm-hai-section-title { font-size:12px; font-weight:700; color:var(--cfqm-muted-2); text-transform:uppercase; letter-spacing:.05em; margin-bottom:4px; }
.cfqm-hai-section-text { font-size:14px; color:var(--cfqm-ink-2); line-height:1.5; margin:0; }
.cfqm-hai-pro-cta {
  margin-top:12px; padding:12px 14px; background:rgba(0,200,212,.06);
  border-radius:8px; border:1px solid rgba(0,200,212,.2);
}
.cfqm-hai-pro-text { font-size:14px; color:var(--cfqm-ink); margin:0 0 8px; }

@media(max-width:480px) {
  .cfqm-home-ai-intro { padding:20px 14px; }
  .cfqm-hai-msg-bubble { max-width:92%; padding:10px 12px; }
  .cfqm-hai-outcome { padding:8px 10px; }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* MANAGER DASHBOARD (standalone)                                        */
/* ═══════════════════════════════════════════════════════════════════════ */

.cfqm-mgr-dash { max-width:900px; }
.cfqm-mgr-welcome { margin-bottom:16px; }

.cfqm-mgr-stats-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-bottom:16px; }
.cfqm-mgr-stat-card {
  background:var(--cfqm-card); border:1px solid var(--cfqm-border-2); border-radius:12px;
  padding:16px 12px; text-align:center;
}
.cfqm-mgr-stat-num { display:block; font-size:28px; font-weight:800; color:var(--cfqm-ink); line-height:1; }
.cfqm-mgr-stat-label { display:block; font-size:11px; color:var(--cfqm-muted-2); margin-top:4px; font-weight:600; text-transform:uppercase; letter-spacing:.03em; }

.cfqm-mgr-action-grid { display:flex; flex-direction:column; gap:6px; }
.cfqm-mgr-action-card {
  display:flex; align-items:center; gap:12px; padding:14px 16px;
  text-decoration:none; transition:background .15s;
}
.cfqm-mgr-action-card:hover { background:var(--cfqm-surface); }
.cfqm-mgr-action-urgent { border-left:3px solid #ef4444; }
.cfqm-mgr-action-icon { font-size:20px; flex-shrink:0; }
.cfqm-mgr-action-info { flex:1; min-width:0; }
.cfqm-mgr-action-num { font-size:20px; font-weight:800; color:var(--cfqm-ink); margin-right:6px; }
.cfqm-mgr-action-label { font-size:14px; color:var(--cfqm-ink-2); }
.cfqm-mgr-action-arrow { font-size:18px; color:var(--cfqm-border-2); flex-shrink:0; }

@media(max-width:480px) {
  .cfqm-mgr-stats-grid { grid-template-columns:repeat(2,1fr); }
  .cfqm-mgr-stat-card { padding:12px 8px; }
  .cfqm-mgr-stat-num { font-size:22px; }
  .cfqm-mgr-action-card { padding:12px; }
  .cfqm-mgr-dash { padding:12px 6px 20px; }
}

/* ── Manager: find trades results ────────────────────────────────────── */
.cfqm-mgr-find-results { margin-top:12px; }
.cfqm-mgr-find-header { font-size:14px; font-weight:700; color:var(--cfqm-ink); margin-bottom:8px; }
.cfqm-mgr-find-card {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:10px 14px; background:var(--cfqm-surface); border:1px solid var(--cfqm-border-2);
  border-radius:8px; margin-bottom:6px;
}
.cfqm-mgr-find-card-info { flex:1; min-width:0; }
.cfqm-mgr-find-card-name { display:block; font-size:14px; font-weight:600; color:var(--cfqm-ink); }
.cfqm-mgr-find-card-detail { display:block; font-size:12px; color:var(--cfqm-muted); }
.cfqm-mgr-find-card-detail a { color:var(--cfqm-accent,#00C8D4); text-decoration:none; }
.cfqm-mgr-find-card-detail a:hover { text-decoration:underline; }
@media(max-width:480px) {
  .cfqm-mgr-find-card { flex-direction:column; align-items:flex-start; gap:8px; }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* HOMEOWNER REQUEST FORM                                                */
/* ═══════════════════════════════════════════════════════════════════════ */

.cfqm-req-form-wrap { max-width:700px; }
.cfqm-req-section { margin-bottom:20px; }
.cfqm-req-section .cfqm-subtitle { margin-bottom:8px; }

.cfqm-req-trades-grid {
  display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:6px;
}
.cfqm-req-trade-option {
  display:flex; align-items:center; gap:8px;
  padding:10px 12px; border:1px solid var(--cfqm-border-2); border-radius:8px;
  cursor:pointer; transition:all .15s; font-size:13px;
}
.cfqm-req-trade-option:hover { border-color:var(--cfqm-border-2); background:var(--cfqm-surface); }
.cfqm-req-trade-option input[type="checkbox"] { margin:0; flex-shrink:0; }
.cfqm-req-trade-option input[type="checkbox"]:checked + .cfqm-req-trade-label { color:var(--cfqm-accent,#00C8D4); font-weight:600; }
.cfqm-req-trade-option:has(input:checked) { border-color:var(--cfqm-accent,#00C8D4); background:rgba(0,200,212,.04); }
.cfqm-req-trade-label { font-size:13px; color:var(--cfqm-ink-2); }

/* Request CTA on homeowner hub */
.cfqm-ho-request-cta { padding:18px 20px; margin-top:12px; }

@media(max-width:480px) {
  .cfqm-req-trades-grid { grid-template-columns:repeat(2, 1fr); }
  .cfqm-req-trade-option { padding:8px 10px; font-size:12px; }
  .cfqm-ho-request-cta { padding:14px 12px; }
}

/* ── Garden planner current season highlight ─────────────────────────── */
.cfqm-garden-current-season { border-left:3px solid #059669; }

/* ═══════════════════════════════════════════════════════════════════════ */
/* MATERIALS CALCULATOR                                                  */
/* ═══════════════════════════════════════════════════════════════════════ */

.cfqm-calc-wrap { }
.cfqm-calc-section { margin-bottom:14px; }
.cfqm-calc-label { font-size:14px; font-weight:700; color:var(--cfqm-ink); display:block; margin-bottom:6px; }
.cfqm-calc-select {
  width:100%; padding:10px 12px; border:1px solid var(--cfqm-border-2); border-radius:8px;
  font-size:14px; font-family:inherit; background:var(--cfqm-card);
}
.cfqm-calc-select:focus { border-color:var(--cfqm-accent,#00C8D4); outline:none; }

.cfqm-calc-unit-toggle { display:flex; gap:0; margin-bottom:10px; }
.cfqm-calc-unit-btn {
  flex:1; padding:8px; border:1px solid var(--cfqm-border-2); background:var(--cfqm-card);
  font-size:13px; font-weight:600; cursor:pointer; font-family:inherit;
  color:var(--cfqm-muted); transition:all .15s;
}
.cfqm-calc-unit-btn:first-child { border-radius:8px 0 0 8px; }
.cfqm-calc-unit-btn:last-child { border-radius:0 8px 8px 0; border-left:none; }
.cfqm-calc-unit-active {
  background:var(--cfqm-accent,#00C8D4); color:#fff; border-color:var(--cfqm-accent,#00C8D4);
}

.cfqm-calc-room { padding:10px 12px; background:var(--cfqm-surface); border-radius:8px; margin-bottom:6px; }

.cfqm-calc-result-card {
  background:#f0fdfa; border:1px solid rgba(0,200,212,.2); border-radius:10px;
  padding:14px 16px;
}
.cfqm-calc-result-row {
  display:flex; justify-content:space-between; align-items:center;
  padding:6px 0; border-bottom:1px solid rgba(0,200,212,.1);
}
.cfqm-calc-result-row:last-child { border-bottom:none; }
.cfqm-calc-result-label { font-size:13px; color:var(--cfqm-muted); }
.cfqm-calc-result-value { font-size:14px; font-weight:600; color:var(--cfqm-ink); }

/* ═══════════════════════════════════════════════════════════════════════════
   v0.42.3 — dark <select> fix, full-width on mobile, print stays light
   ═══════════════════════════════════════════════════════════════════════════ */

/* iOS/Safari render <select> with a native (white) control that ignores normal
   background CSS. Reset the appearance and paint our own dark field + chevron.
   !important is needed because the builder sets background inline. */
body.cfqm-dark .cfqm-wrap select,
body.cfqm-dark .cfqm-board-wrap select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-color: var(--cfqm-card) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23cbd2d9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 12px !important;
  padding-right: 30px !important;
  color: var(--cfqm-ink) !important;
  border-color: var(--cfqm-border-2) !important;
}

/* Make the tool use the full screen width even inside a boxed theme layout
   (Astra etc.). Only affects pages that contain the tool, so other pages and
   light-mode sites are untouched. */
@media (max-width: 768px) {
  .cfqm-wrap { padding-left: 12px; padding-right: 12px; }
}
.entry-content:has(> .cfqm-wrap),
.ast-container:has(.cfqm-wrap) .entry-content,
.site-content:has(.cfqm-wrap) .ast-container {
  max-width: 100% !important;
}
.entry-content:has(> .cfqm-wrap) { padding-left: 0 !important; padding-right: 0 !important; }

/* Printed / PDF quotes must stay on white paper regardless of the dark theme. */
@media print {
  body.cfqm-dark {
    --cfqm-accent:#00C8E0; --cfqm-primary:#307090;
    --cfqm-card:#ffffff; --cfqm-bg:#ffffff;
    --cfqm-border:rgba(15,23,42,.1); --cfqm-border-2:#e5e7eb;
    --cfqm-muted:rgba(15,23,42,.55); --cfqm-muted-2:#9ca3af;
    --cfqm-ink:#111827; --cfqm-ink-2:#374151;
    --cfqm-surface:#f9fafb; --cfqm-surface-2:#f3f4f6;
    background:#fff !important;
  }
  body.cfqm-dark .cfqm-wrap { color:#111827 !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   v0.42.5 — box-sizing (stop inputs overflowing their card) + edge polish
   ═══════════════════════════════════════════════════════════════════════════ */
.cfqm-wrap, .cfqm-board-wrap, .cfqm-card, .cfqm-area, .cfqm-area-row,
.cfqm-wrap input, .cfqm-wrap textarea, .cfqm-wrap select,
.cfqm-field input, .cfqm-field textarea, .cfqm-field select {
  box-sizing: border-box;
}
.cfqm-wrap input, .cfqm-wrap textarea, .cfqm-wrap select { max-width: 100%; }

/* Full-width stretch fallback (works on iOS 16.4+; JS handles older). */
@media (max-width: 768px) {
  .ast-container:has(.cfqm-wrap),
  .site-content:has(.cfqm-wrap) .ast-container,
  .entry-content:has(.cfqm-wrap) {
    max-width: 100% !important; padding-left: 0 !important; padding-right: 0 !important;
  }
  .cfqm-wrap { padding-left: 12px !important; padding-right: 12px !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   v0.42.6 — self-contained full-bleed width (ignores theme container) + iOS date
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  html, body { overflow-x: hidden; }              /* guard the 100vw technique */
  /* Break the tool out of whatever boxed container the theme puts it in and
     span the full viewport, regardless of the theme's padding/max-width. */
  .cfqm-wrap {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: 50% !important;
    margin-right: 0 !important;
    transform: translateX(-50%);
    padding-left: 14px !important;
    padding-right: 14px !important;
    box-sizing: border-box;
  }
}
/* iOS native date inputs have an intrinsic width that can overflow their card. */
.cfqm-wrap input[type="date"],
.cfqm-wrap input[type="number"],
.cfqm-wrap input[type="text"],
.cfqm-wrap input[type="email"],
.cfqm-wrap input[type="tel"] { min-width: 0; max-width: 100%; box-sizing: border-box; }

/* ═══════════════════════════════════════════════════════════════════════════
   v0.42.9 — remove the theme's boxed-content outline around the tool (dark)
   Astra's "boxed/contained" content wraps the entry in a container with a light
   background + border + shadow. On the dark tool that reads as a white outline
   around the whole section (and a line across the top). Strip it in dark mode
   only; the plugin's own cards keep their styling.
   ═══════════════════════════════════════════════════════════════════════════ */
body.cfqm-dark .ast-article-single,
body.cfqm-dark .ast-article-post,
body.cfqm-dark .ast-separate-container .ast-article-single,
body.cfqm-dark .ast-separate-container .ast-article-post,
body.cfqm-dark .entry-content,
body.cfqm-dark #primary .ast-article-single,
body.cfqm-dark .ast-separate-container #primary {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
}
