/* ============================================================
   Field & Stem — floral quote planner
   Editorial wedding florist aesthetic: warm cream + mossy ink,
   serif-italic display + clean sans for UI.
   ============================================================ */

:root {
  --cream:        #f4ecdd;
  --cream-2:      #f8f1e3;
  --cream-3:      #faf4e8;
  --paper:        #fcf7ec;
  --ink:          #2d3325;
  --ink-soft:     #4a4e3e;
  --ink-mute:     #7c7868;
  --line:         #dccfb3;
  --line-soft:    #e9dfc8;
  --accent:       #c8918c;       /* dusty rose */
  --accent-deep:  #a87278;
  --sage:         #9aa688;
  --moss:         #6e7a5b;
  --butter:       #d9c79a;
  --warn:         #b06b56;
  --shadow-card:  0 1px 0 rgba(255,255,255,.6) inset, 0 1px 2px rgba(60,52,38,.04), 0 12px 30px -16px rgba(60,52,38,.18);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-ui:      'Inter', system-ui, -apple-system, sans-serif;

  --pad: 24px;
  --card-pad: 32px;
  --radius: 4px;
  --radius-lg: 6px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  /* faint paper grain */
  background-image:
    radial-gradient(circle at 12% 8%,  rgba(154,166,136,.06) 0,  rgba(154,166,136,0) 30%),
    radial-gradient(circle at 88% 70%, rgba(200,145,140,.06) 0,  rgba(200,145,140,0) 30%);
  background-attachment: fixed;
}

#root { min-height: 100vh; }

.serif-italic {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.eyebrow {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ── Shell ───────────────────────────────────────────────── */
.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.workspace {
  display: grid;
  grid-template-columns: 1fr 320px;
  min-width: 0;
}

.workspace-inner {
  padding: 36px 40px 60px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-width: 0;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  background: var(--cream-3);
  border-right: 1px solid var(--line-soft);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-collapsed {
  width: 56px;
  align-items: center;
  padding: 22px 8px;
}

.sidebar-mark {
  margin-top: 16px;
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-style: italic;
  letter-spacing: 0.3em;
  color: var(--ink-mute);
  font-size: 13px;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-name {
  font-size: 19px;
  color: var(--ink);
  line-height: 1.05;
}

.brand-tag {
  font-size: 10.5px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}

.icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 160ms, color 160ms;
}
.icon-btn:hover {
  background: var(--cream-2);
  color: var(--ink);
}
.icon-btn-tone {
  border-color: transparent;
  background: rgba(45, 51, 37, 0.04);
}
.icon-btn-tone:hover { background: rgba(45, 51, 37, 0.10); }

.sidebar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--ink-mute);
}
.sidebar-search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-ui);
  font-size: 12.5px;
  color: var(--ink);
}
.sidebar-search input::placeholder { color: var(--ink-mute); }

.btn-new {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
  padding: 9px 14px;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 160ms;
}
.btn-new:hover { background: var(--ink-soft); }

.sidebar-section-label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding: 8px 4px 0;
  border-top: 1px solid var(--line-soft);
  margin-top: 4px;
}
.sidebar-view-toggle {
  display: flex; gap: 0; margin: 0 2px;
  border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
}
.sidebar-view-btn {
  flex: 1; padding: 5px 8px; border: none; background: transparent;
  font-family: var(--font-ui); font-size: 11px; font-weight: 500;
  color: var(--ink-mute); cursor: pointer; transition: background 120ms, color 120ms;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.sidebar-view-btn + .sidebar-view-btn { border-left: 1px solid var(--line); }
.sidebar-view-btn-active { background: var(--ink); color: #faf6ee; }
.sidebar-view-btn-active .sidebar-view-count { opacity: 0.85; }
.sidebar-view-count { font-size: 10px; opacity: 0.7; }
.sidebar-empty {
  padding: 20px 12px; text-align: center;
  font-size: 12px; color: var(--ink-mute); font-style: italic;
}
.client-row-closed { opacity: 0.7; }
.reopen-btn {
  font-size: 10px; padding: 2px 8px; border-radius: 4px;
  border: 1px solid var(--line); background: transparent;
  color: var(--ink-mute); cursor: pointer; font-family: var(--font-ui);
}
.reopen-btn:hover { border-color: var(--ink-mute); color: var(--ink); }

.owner-filter {
  display: flex;
  gap: 6px;
  padding: 0 2px;
}
.owner-btn {
  flex: 1;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-mute);
  cursor: pointer;
  transition: background 140ms, color 140ms, border-color 140ms;
}
.owner-btn:hover { background: var(--cream-2); color: var(--ink); }
.owner-btn-active {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
.owner-btn-active:hover { background: var(--ink-soft); border-color: var(--ink-soft); }

.client-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  overflow-y: auto;
  margin: 0 -4px;
}

.client-row {
  text-align: left;
  background: transparent;
  border: 0;
  padding: 12px 12px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--ink-soft);
  transition: background 160ms;
  border: 1px solid transparent;
}
.client-row:hover {
  background: var(--cream-2);
  color: var(--ink);
}
.client-row-active {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(60,52,38,.04);
}

.client-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.client-name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 17px;
  line-height: 1.1;
  color: var(--ink);
}
.client-row-meta,
.client-row-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--ink-mute);
}
.client-row-meta { gap: 6px; justify-content: flex-start; }
.dot-sep { opacity: 0.5; }
.client-venue {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.client-total {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--ink-soft);
  margin-left: 8px;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.status-dot > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.sidebar-foot {
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-foot-stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11px;
  color: var(--ink-mute);
}
.sidebar-foot-stat strong {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  color: var(--ink);
}

/* ── Lifecycle path ───────────────────────────────────────── */
.lifecycle-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  margin-bottom: 20px;
}
.lifecycle-row .lifecycle-path { margin-bottom: 0; flex: 1; }
.close-quote-btn {
  display: flex; align-items: center; gap: 4px;
  font-family: var(--font-ui); font-size: 11px; font-weight: 500;
  color: var(--ink-mute); background: none; border: 1px solid var(--line-soft);
  border-radius: 6px; padding: 4px 10px; cursor: pointer;
  transition: color 150ms, border-color 150ms; white-space: nowrap;
}
.close-quote-btn:hover { color: #c44; border-color: #c44; }
.close-confirm {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--ink-mute); white-space: nowrap;
}
.btn-sm { padding: 3px 10px; font-size: 11px; }
.lifecycle-path {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 20px;
}
.lifecycle-connector {
  flex: 1;
  height: 1px;
  background: var(--line-soft);
  margin: 12px 0 0;
  transition: background 300ms;
}
.lifecycle-connector-done { background: var(--ink); }
.lifecycle-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
  min-width: 52px;
}
.lifecycle-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--cream-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  transition: background 200ms, border-color 200ms, box-shadow 200ms;
}
.lifecycle-step-past .lifecycle-dot {
  background: var(--ink);
  border-color: var(--ink);
}
.lifecycle-step-active .lifecycle-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(200,145,140,.18);
}
.lifecycle-label {
  font-family: var(--font-ui);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  transition: color 200ms;
  white-space: nowrap;
}
.lifecycle-step-past .lifecycle-label { color: var(--ink-soft); }
.lifecycle-step-active .lifecycle-label { color: var(--ink); font-weight: 600; }
.lifecycle-step:hover .lifecycle-label { color: var(--ink); }
.lifecycle-step-past:hover .lifecycle-dot {
  background: var(--ink-mute);
  border-color: var(--ink-mute);
  box-shadow: 0 0 0 4px rgba(124,120,104,.12);
}
.lifecycle-step-active:hover .lifecycle-dot {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}
.lifecycle-step:not(.lifecycle-step-past):not(.lifecycle-step-active):hover .lifecycle-dot {
  border-color: var(--ink-soft);
  background: var(--cream-2);
}

/* ── Event header ─────────────────────────────────────────── */
.event-header {
  position: relative;
  padding-top: 8px;
}
.event-header-corner {
  position: absolute;
  top: -8px;
  left: -8px;
  color: var(--moss);
}
.event-header-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: end;
  padding-top: 24px;
}
.event-title {
  font-family: var(--font-display);
  font-weight: 400;
  margin: 8px 0 24px;
  font-size: 72px;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}
.event-title-input {
  background: transparent;
  border: 0;
  outline: 0;
  font: inherit;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 72px;
  color: var(--ink);
  letter-spacing: -0.02em;
  padding: 0;
  width: auto;
  min-width: 1ch;
  field-sizing: content;
  border-bottom: 1px dashed transparent;
}
.event-title-input:hover { border-bottom-color: var(--line); }
.event-title-input:focus { border-bottom-color: var(--accent); }
.event-title-amp {
  font-style: italic;
  color: var(--accent);
  font-size: 64px;
}
.event-title-partner {
  color: var(--ink-mute);
}
.event-title-input::placeholder { color: var(--ink-mute); opacity: 0.5; }

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  align-items: start;
  padding-top: 4px;
}
.event-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.date-picker-wrap {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.date-input { width: auto; max-width: 160px; }
.date-clear-btn {
  background: none; border: 1px solid var(--line-soft); border-radius: 4px;
  padding: 2px 4px; cursor: pointer; color: var(--ink-mute);
  display: flex; align-items: center;
}
.date-clear-btn:hover { border-color: var(--ink-mute); }
.date-tbd-label {
  font-size: 13px; color: var(--ink-mute); font-style: italic;
}
.gcal-export-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--ink-mute); text-decoration: none;
  border: 1px solid var(--line-soft); border-radius: 4px;
  padding: 2px 8px 2px 5px; white-space: nowrap;
}
.gcal-export-btn:hover { border-color: var(--ink-mute); color: var(--ink); }

.inline-input {
  background: transparent;
  border: 0;
  border-bottom: 1px dashed transparent;
  font-family: var(--font-ui);
  font-size: 13.5px;
  color: var(--ink);
  padding: 2px 0;
  outline: 0;
  width: 100%;
}
.inline-input:hover { border-bottom-color: var(--line); }
.inline-input:focus { border-bottom-color: var(--accent); }
.inline-input-editable { border-bottom-color: var(--line-soft); }
.inline-input-meta { font-size: 14.5px; min-width: 160px; }
.inline-input-name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  font-weight: 500;
}
.inline-input-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  font-weight: 500;
}

.mood-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mood-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  color: var(--ink-soft);
  background: var(--cream-2);
}
.mood-chip-editable {
  cursor: pointer;
  transition: background 140ms, border-color 140ms;
}
.mood-chip-editable:hover {
  background: var(--paper);
  border-color: var(--ink-mute);
}
.mood-chip-x {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  color: var(--ink-mute);
  opacity: 0;
  transition: opacity 140ms;
  margin-left: 1px;
}
.mood-chip-editable:hover .mood-chip-x { opacity: 1; }
.mood-chip-editing {
  padding: 3px 10px;
  border: 1px dashed var(--accent);
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--ink);
  outline: 0;
  min-width: 80px;
}
.mood-chip-add {
  padding: 3px 10px;
  border: 1px dashed var(--line);
  border-radius: 999px;
  background: transparent;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--ink-mute);
  cursor: pointer;
  transition: border-color 140ms, color 140ms;
}
.mood-chip-add:hover { border-color: var(--ink-mute); color: var(--ink); }

.event-header-mood {
  display: grid;
  grid-template-columns: repeat(3, 84px);
  gap: 10px;
}
.event-header-mood image-slot {
  display: block;
  width: 84px;
  height: 104px;
  --image-slot-bg: var(--cream-2);
  --image-slot-border-color: var(--line);
  --image-slot-text: var(--ink-mute);
}

/* ── Card primitive ──────────────────────────────────────── */
.card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: var(--card-pad);
  box-shadow: var(--shadow-card);
  position: relative;
}

.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}
.section-title h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 34px;
  margin: 4px 0 0;
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: var(--ink);
}
.section-lede {
  margin: 8px 0 0;
  color: var(--ink-mute);
  font-size: 13px;
  max-width: 520px;
  line-height: 1.55;
}

.section-summary {
  display: flex;
  gap: 28px;
  text-align: right;
}
.section-summary > div {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.section-summary span {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.section-summary strong {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 24px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ── Palette table ───────────────────────────────────────── */
.palette-table-scroll {
  overflow-x: auto;
  margin: 0 calc(-1 * var(--card-pad));
  padding: 0 var(--card-pad);
  /* subtle scroll affordance */
  mask-image: linear-gradient(to right, transparent 0, #000 var(--card-pad), #000 calc(100% - var(--card-pad)), transparent 100%);
}
.palette-table-inner {
  min-width: 900px;
}
.palette-table-head {
  display: grid;
  grid-template-columns: 44px minmax(140px, 1.4fr) 96px 70px 80px 96px minmax(120px, 1fr) 88px 20px;
  gap: 12px;
  padding: 0 14px 8px;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border-bottom: 1px solid var(--line-soft);
}
.palette-table-head > div { padding-bottom: 4px; }

.palette-rows {
  display: flex;
  flex-direction: column;
}

.palette-row {
  display: grid;
  grid-template-columns: 44px minmax(140px, 1.4fr) 96px 70px 80px 96px minmax(120px, 1fr) 88px 20px;
  gap: 12px;
  align-items: center;
  padding: 14px 14px;
  border-bottom: 1px solid var(--line-soft);
  transition: background 160ms;
}
.palette-row:hover { background: var(--cream-3); }
.palette-row:last-child { border-bottom: 0; }

.palette-row-swatch {
  display: flex;
  align-items: center;
  justify-content: center;
}
.swatch {
  border-radius: 50%;
  display: inline-block;
  position: relative;
  flex-shrink: 0;
}
.swatch-ring {
  box-shadow:
    0 0 0 1px rgba(255,255,255,.9) inset,
    0 0 0 1px rgba(60,52,38,.10);
}

.palette-row-name { min-width: 0; }
.palette-row-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.kind-tag {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--moss);
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(154,166,136,.15);
}
.supplier-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--ink-mute);
  text-decoration: none;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 1px;
}
.supplier-link:hover { color: var(--accent-deep); border-color: var(--accent); }

.meta-select {
  appearance: none;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-ui);
  cursor: pointer;
  padding: 1px 14px 1px 0;
  background-image: url("data:image/svg+xml,%3Csvg width='8' height='5' viewBox='0 0 8 5' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L4 4L7 1' stroke='%237c7868' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
}
.meta-select:hover { color: var(--ink); }
.kind-select {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--moss);
  padding: 2px 18px 2px 7px;
  border-radius: 999px;
  background-color: rgba(154,166,136,.15);
  background-position: right 5px center;
  font-weight: 500;
}
.kind-select:hover { background-color: rgba(154,166,136,.25); }
.supplier-select {
  font-size: 11px;
  color: var(--ink-mute);
  border-bottom: 1px dashed var(--line);
  padding-bottom: 1px;
  max-width: 110px;
}
.supplier-select:hover { color: var(--ink); border-color: var(--ink-mute); }
.supplier-ext {
  display: inline-flex;
  align-items: center;
  color: var(--ink-mute);
  opacity: 0.6;
  text-decoration: none;
  transition: opacity 140ms;
}
.supplier-ext:hover { opacity: 1; color: var(--accent-deep); }

.palette-row-cell { min-width: 0; }
.cell-label {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 3px;
  display: none;
}
.cell-readout {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.cell-readout-sub {
  display: block;
  font-family: var(--font-ui);
  font-style: normal;
  font-size: 10.5px;
  color: var(--ink-mute);
  letter-spacing: 0;
  margin-top: 1px;
}
.cell-readout-strong { color: var(--ink); font-size: 19px; }

.palette-row-total {
  text-align: right;
}

.row-remove {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--ink-mute);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 160ms, background 160ms, color 160ms;
}
.palette-row:hover .row-remove { opacity: 1; }
.row-remove:hover { background: rgba(176,107,86,.12); color: var(--warn); }

/* number / money inputs */
.num-input, .money-input {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--cream-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 5px 8px;
  width: 100%;
  transition: border-color 160ms, background 160ms;
}
.num-input:focus-within,
.money-input:focus-within {
  border-color: var(--accent);
  background: var(--paper);
}
.num-input input, .money-input input {
  background: transparent;
  border: 0;
  outline: 0;
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
  color: var(--ink);
  width: 100%;
  min-width: 0;
  padding: 0;
}
.money-input > span {
  font-size: 12px;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.num-input > span {
  font-size: 11px;
  color: var(--ink-mute);
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

/* waste bar */
.waste-bar {
  position: relative;
  height: 24px;
  border-radius: 999px;
  background: var(--cream-2);
  border: 1px solid var(--line-soft);
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0 10px;
}
.waste-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, rgba(154,166,136,.4), rgba(154,166,136,.7));
  transition: width 200ms;
}
.waste-bar-warn .waste-bar-fill {
  background: linear-gradient(90deg, rgba(200,145,140,.4), rgba(176,107,86,.7));
}
.waste-bar-label {
  position: relative;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.waste-bar-warn .waste-bar-label::before {
  content: '⚠ ';
  color: var(--warn);
}

/* add flower CTA */
.add-flower-cta {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px dashed var(--line);
  color: var(--ink-soft);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color 160ms, color 160ms, background 160ms;
}
.add-flower-cta:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
  background: var(--cream-2);
}

.add-flower-card {
  margin-top: 16px;
  padding: 16px;
  background: var(--cream-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
}
.add-flower-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.swatch-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.swatch-preset {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.9) inset,
    0 0 0 1px rgba(60,52,38,.10);
  transition: transform 160ms;
}
.swatch-preset:hover { transform: scale(1.12); }
.swatch-preset-active {
  box-shadow:
    0 0 0 1px rgba(255,255,255,.9) inset,
    0 0 0 2px var(--ink);
}
/* Custom colour picker — sits at the end of the presets row.
   When no custom colour is chosen it shows as a muted circle with a + icon.
   Once a custom colour is picked it renders like any other preset swatch. */
.swatch-preset-custom {
  background: var(--cream-2);
  color: var(--ink-mute);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
}
.swatch-preset-custom:hover { color: var(--ink); }

.btn-primary, .btn-ghost, .btn-text {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 160ms, color 160ms, border-color 160ms;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-primary {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
.btn-primary:hover { background: var(--ink-soft); border-color: var(--ink-soft); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--cream-2); border-color: var(--ink); }
.btn-text {
  background: transparent;
  color: var(--ink-mute);
  padding: 8px 6px;
}
.btn-text:hover { color: var(--ink); }
.btn-block { width: 100%; }

/* ── Arrangements section ────────────────────────────────── */
.arr-section { position: relative; overflow: hidden; }

.arr-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.arr-card {
  background: var(--cream-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
  min-width: 0;
  transition: background 160ms, border-color 160ms, box-shadow 200ms;
}
.arr-card:hover { background: var(--paper); }
.arr-card-open {
  background: var(--paper);
  border-color: var(--line);
  box-shadow: 0 1px 2px rgba(60,52,38,.04), 0 16px 40px -24px rgba(60,52,38,.25);
}
.arr-card-corner {
  position: absolute;
  top: 14px;
  right: 14px;
  color: var(--moss);
  pointer-events: none;
}

.arr-photo-slot {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
}
.arr-photo-slot:hover .arr-photo-overlay { opacity: 1; }
.arr-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
}
.arr-photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(45, 51, 37, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  transition: opacity 160ms;
  border-radius: var(--radius-lg);
}
.arr-photo-clear {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(45, 51, 37, 0.6);
  border: 0;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 160ms;
  z-index: 2;
}
.arr-photo-slot:hover .arr-photo-clear { opacity: 1; }
.arr-photo-error {
  margin: 0 0 12px;
  padding: 8px 12px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: var(--radius);
  color: #991b1b;
  font-size: 12px;
}

.arr-card-head {
  display: grid;
  grid-template-columns: 84px 1fr auto auto auto;
  align-items: center;
  gap: 24px;
}

.arr-card-id { min-width: 0; }
.arr-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-mute);
  margin-top: 4px;
}

.arr-card-count, .arr-card-totals {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}
.arr-card-totals { min-width: 80px; }
.arr-card-line {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 26px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.count-stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px;
  background: var(--cream-3);
}
.count-stepper input {
  width: 36px;
  text-align: center;
  background: transparent;
  border: 0;
  outline: 0;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  padding: 4px 0;
}
.step-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: background 160ms;
}
.step-btn:hover { background: var(--cream-2); }

.arr-card-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.arr-card-body {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px dashed var(--line);
}
.alloc-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.alloc-help { font-size: 11px; color: var(--ink-mute); }

.alloc-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 24px;
}

.alloc-row {
  display: grid;
  grid-template-columns: 22px 1fr auto 70px;
  gap: 12px;
  align-items: center;
  padding: 8px 6px;
  border-radius: var(--radius);
  transition: background 160ms;
}
.alloc-row:hover { background: var(--cream-2); }
.alloc-row-active {
  background: rgba(154,166,136,.08);
}
.alloc-row-name { min-width: 0; }
.alloc-row-flower {
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.alloc-row-cost {
  font-size: 10.5px;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.alloc-row-cost span {
  letter-spacing: 0.04em;
}
.alloc-row-line {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
}
.alloc-row-line .dim { color: var(--ink-mute); opacity: 0.6; }

.alloc-stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.alloc-stepper input {
  width: 32px;
  text-align: center;
  background: var(--cream-2);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--ink);
  padding: 3px 0;
  outline: 0;
}
.alloc-row-active .alloc-stepper input {
  background: var(--paper);
  border-color: var(--accent);
}

.bouquet-preview {
  background: var(--cream-3);
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(60,52,38,.06) inset, 0 0 0 1px var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bouquet-preview svg { width: 100%; height: 100%; }
.bouquet-preview-empty {
  color: var(--ink-mute);
}
.bouquet-preview-empty svg { width: 60%; height: 60%; }

/* Add arrangement */
.add-arr-cta {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px dashed var(--line);
  background: transparent;
  color: var(--ink-soft);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 12.5px;
  cursor: pointer;
}
.add-arr-cta:hover { border-color: var(--accent); color: var(--accent-deep); background: var(--cream-2); }

.add-arr-menu {
  margin-top: 14px;
  background: var(--cream-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}
.add-arr-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.add-arr-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
  transition: background 160ms, border-color 160ms;
}
.preset-chip:hover { background: var(--cream-3); border-color: var(--accent); color: var(--accent-deep); }

.add-arr-custom {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.add-arr-custom .inline-input {
  font-size: 13px;
  border-bottom: 1px solid var(--line);
  padding: 6px 2px;
}

/* ── Pricing ─────────────────────────────────────────────── */
.pricing-card { position: relative; }
.pricing-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
}

.extras-list {
  display: flex;
  flex-direction: column;
}
.extras-row {
  display: grid;
  grid-template-columns: 1fr 140px 110px;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.extras-row:last-child { border-bottom: 0; }
.extras-row-label strong {
  display: block;
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 500;
}
.extras-row-label span {
  font-size: 11px;
  color: var(--ink-mute);
}
.extras-row-ro .extras-row-input { display: none; }
.extras-row-ro {
  grid-template-columns: 1fr 110px;
  gap: 14px;
}
.extras-row-amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  color: var(--ink);
  line-height: 1;
}
.extras-row-total .extras-row-amount strong {
  font-size: 28px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
}
.extras-row-total {
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  grid-template-columns: 1fr 110px;
}
.extras-row-input { display: flex; align-items: center; }

.rate-input {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--cream-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 5px 10px;
  width: 100%;
}
.rate-input input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
}
.rate-input span { color: var(--ink-mute); font-size: 12px; }

.markup-panel {
  background: var(--ink);
  color: var(--cream);
  padding: 26px 28px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.markup-panel::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(200,145,140,.25), transparent 60%);
  pointer-events: none;
}
.markup-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 18px;
  gap: 20px;
}
.markup-head .eyebrow { color: rgba(244,236,221,.55); }
.markup-label {
  font-size: 30px;
  margin-top: 2px;
  color: var(--cream);
  font-weight: 500;
}
.markup-retail {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.markup-retail span {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244,236,221,.55);
}
.markup-retail strong {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}

.markup-range {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  margin: 4px 0 0;
}
.markup-range::-webkit-slider-runnable-track {
  height: 4px;
  background: rgba(244,236,221,.15);
  border-radius: 999px;
}
.markup-range::-moz-range-track {
  height: 4px;
  background: rgba(244,236,221,.15);
  border-radius: 999px;
}
.markup-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: -7px;
  box-shadow: 0 0 0 1px var(--cream), 0 4px 12px rgba(0,0,0,.3);
  cursor: pointer;
}
.markup-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--cream), 0 4px 12px rgba(0,0,0,.3);
  cursor: pointer;
}
.markup-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: rgba(244,236,221,.4);
}

.markup-readouts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(244,236,221,.15);
}
.markup-readouts > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.markup-readouts span {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244,236,221,.55);
}
.markup-readouts strong {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 26px;
  font-variant-numeric: tabular-nums;
  color: var(--cream);
}
.profit-pos { color: var(--accent) !important; }

/* ── Totals rail ─────────────────────────────────────────── */
.totals-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 36px 30px;
  border-left: 1px solid var(--line-soft);
  background: var(--cream-3);
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
}
.rail-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rail-client {
  font-size: 28px;
  line-height: 1.05;
  color: var(--ink);
  margin-top: 4px;
}
.rail-date {
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}

.rail-divider {
  color: var(--moss);
  margin: 4px 0;
}

.rail-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.rail-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rail-stat span {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.rail-stat strong {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.rail-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 4px;
}
.rail-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12.5px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.rail-line-soft {
  color: var(--ink-mute);
  font-size: 11.5px;
  padding-top: 6px;
  margin-top: 2px;
  border-top: 1px dashed var(--line-soft);
}

.rail-grand {
  padding: 18px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  margin: 4px 0;
  background:
    repeating-linear-gradient(180deg, var(--cream-3) 0 1px, transparent 1px 100%);
}
.grand-amount {
  font-size: 44px;
  line-height: 1;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.grand-sub {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.grand-sub span { color: var(--ink-mute); }

.rail-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

/* ── Workspace foot ──────────────────────────────────────── */
.workspace-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 0 12px;
  color: var(--moss);
}
.foot-scripture {
  font-size: 17px;
  color: var(--ink-soft);
}
.foot-meta {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ── Responsive trims ────────────────────────────────────── */
@media (min-width: 1500px) {
  .palette-table-head, .palette-row {
    grid-template-columns: 56px minmax(180px, 1.6fr) 110px 80px 80px 110px 1.2fr 110px 24px;
    gap: 14px;
  }
  .cell-readout { font-size: 18px; }
  .cell-readout-strong { font-size: 20px; }
}
@media (max-width: 1280px) {
  .event-title, .event-title-input { font-size: 56px; }
  .event-title-amp { font-size: 48px; }
  .event-header-content { grid-template-columns: 1fr; gap: 20px; }
  .event-header-mood { grid-template-columns: repeat(3, minmax(0, 120px)); }
  .event-header-mood image-slot { width: 100%; height: 96px; }
  .alloc-list { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .arr-card-head { grid-template-columns: 76px 1fr auto auto auto; gap: 16px; }
}
@media (max-width: 980px) {
  .event-title, .event-title-input { font-size: 44px; }
  .event-title-amp { font-size: 36px; }
  .event-header-mood { grid-template-columns: repeat(3, 1fr); }
  .event-header-mood image-slot { width: 100%; height: 88px; }
}
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 240px 1fr; }
  .workspace { grid-template-columns: 1fr; }
  .totals-rail { position: static; height: auto; border-left: 0; border-top: 1px solid var(--line-soft); }
}

/* ── Auth banner (top of workspace, unsigned-in state) ─────────────────── */
/* ── Merge prompt (local vs Google conflict on sign-in) ───────────────── */
.merge-prompt {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  background: var(--paper);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}
.merge-prompt-icon {
  flex-shrink: 0;
  color: var(--accent);
  margin-top: 2px;
}
.merge-prompt-body { flex: 1; min-width: 0; }
.merge-prompt-title {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.merge-prompt-desc {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 12px;
  line-height: 1.5;
}
.merge-prompt-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.merge-discard-btn {
  background: none;
  border: 0;
  font-family: var(--font-ui);
  font-size: 12.5px;
  color: var(--ink-mute);
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.merge-discard-btn:hover { color: var(--ink); }

/* ── Login gate ─────────────────────────────────────────────────────── */
.login-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--cream);
}
.login-gate-card {
  text-align: center;
  padding: 48px 40px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
  max-width: 340px;
  width: 100%;
}
.login-gate-brand {
  font-size: 28px;
  color: var(--ink);
  margin-bottom: 4px;
}
.login-gate-sub {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 32px;
}
.login-gate-btn {
  width: 100%;
  justify-content: center;
  padding: 10px 16px;
  font-size: 14px;
}
.login-gate-error {
  padding: 14px 16px;
  margin-bottom: 20px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: var(--radius);
  color: #991b1b;
  font-size: 13px;
  text-align: left;
}
.login-gate-error strong { display: block; margin-bottom: 6px; font-size: 14px; }
.login-gate-error p { margin: 0 0 4px; }
.login-gate-error a { color: #991b1b; font-weight: 500; }

.auth-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--ink-soft);
}

/* ── Read-only quote mode ──────────────────────────────────────────── */
.readonly-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #fef3cd;
  border: 1px solid #e6d590;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 13px;
  color: #664d03;
}
.readonly-banner svg { flex-shrink: 0; opacity: 0.6; }

.workspace-readonly .event-title-input,
.workspace-readonly .inline-input-editable,
.workspace-readonly .event-header select {
  pointer-events: none;
  opacity: 0.7;
}
.workspace-readonly .card input,
.workspace-readonly .card select,
.workspace-readonly .card textarea,
.workspace-readonly .card button:not([data-nav]) {
  pointer-events: none;
  opacity: 0.7;
}
.workspace-readonly .lifecycle-dot { pointer-events: none; }
.workspace-readonly .mood-chip-remove,
.workspace-readonly .mood-add-btn { display: none; }
.workspace-readonly image-slot { pointer-events: none; }
.auth-banner svg { flex-shrink: 0; opacity: 0.6; }
.auth-banner span { flex: 1; }

.auth-signin-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms, box-shadow 120ms;
}
.auth-signin-btn:hover {
  background: var(--cream-3);
  box-shadow: 0 1px 4px rgba(60,52,38,.08);
}

/* Subtle variant used inside sidebar footer */
.auth-signin-btn-subtle {
  width: 100%;
  justify-content: center;
  margin-top: 10px;
  font-size: 11.5px;
  padding: 5px 10px;
  color: var(--ink-mute);
}

/* ── Signed-in bar (sidebar footer) ───────────────────────────────────── */
.signed-in-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  font-size: 11.5px;
  color: var(--ink-mute);
}
.save-status {
  display: flex;
  align-items: center;
  gap: 6px;
}
.save-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.save-dot-idle { background: var(--line); }
.save-dot-ok   { background: var(--sage); }
.save-dot-err  { background: var(--warn); }
.save-dot-spin {
  background: var(--accent);
  animation: dot-pulse 900ms ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.45; transform: scale(0.75); }
}

.auth-signout-btn {
  background: none;
  border: none;
  padding: 2px 4px;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--ink-mute);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-signout-btn:hover { color: var(--ink); }

/* ── Arrangement photo upload spinner ────────────────────────────────── */
.arr-photo-uploading { opacity: 0.65; cursor: wait; }
.arr-photo-spinner {
  display: block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 600ms linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════════════
   Print / PDF export  (.qp-* = quote print)
   The .qp-root div is a sibling of .app-shell. Normally invisible;
   on print we flip the two so only the quote shows.
   Each .qp-page renders as its own sheet thanks to page-break-after.
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── Settings tabs ──────────────────────────────────────────────────── */
.settings-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}
.settings-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--ink-mute);
  cursor: pointer;
  transition: color 140ms, border-color 140ms;
}
.settings-tab-btn:hover { color: var(--ink); }
.settings-tab-btn.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
  font-weight: 500;
}
.settings-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--line);
  font-size: 10.5px;
  font-weight: 600;
}

/* ─── Supplier editor ────────────────────────────────────────────────── */
.supplier-editor { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.supplier-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #fbf7ef;
  border: 1px solid #ece3cc;
  border-radius: 4px;
}
.supplier-row-fields {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.supplier-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.supplier-name-input {
  flex: 1;
  min-width: 100px;
  padding: 5px 8px;
  border: 1px solid #dccfb3;
  border-radius: 3px;
  background: #fff;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--ink);
}
.supplier-url-input {
  flex: 2;
  min-width: 140px;
  padding: 5px 8px;
  border: 1px solid #dccfb3;
  border-radius: 3px;
  background: #fff;
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--ink-soft);
}
.supplier-name-input:focus, .supplier-url-input:focus {
  outline: none;
  border-color: var(--accent);
}
.supplier-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  border: 1px solid #dccfb3;
  background: #f5ede0;
  color: var(--ink-mute);
  text-decoration: none;
  transition: background 140ms, color 140ms;
}
.supplier-link-btn:hover { background: #e8d8c4; color: var(--ink); }
.supplier-remove-btn { color: var(--warn, #b06b56) !important; white-space: nowrap; }
.supplier-add-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px dashed #dccfb3;
  border-radius: 4px;
  background: #fdf9f3;
}
.supplier-add-btn { flex-shrink: 0; }

/* ─── Version modal ──────────────────────────────────────────────────── */
.version-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(45, 51, 37, 0.45);
  backdrop-filter: blur(3px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.version-modal {
  background: var(--paper, #fcf7ec);
  border: 1px solid #dccfb3;
  border-radius: 8px;
  box-shadow: 0 24px 60px -12px rgba(45,51,37,.32);
  width: 100%;
  max-width: 440px;
  padding: 28px 30px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.version-modal-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.version-modal-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink, #2d3325);
  color: var(--cream, #f4ecdd);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.version-modal-title {
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 4px;
  color: var(--ink);
}
.version-modal-sub {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.5;
}
.version-modal-stamp {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--ink, #2d3325);
  color: var(--cream, #f4ecdd);
  border-radius: 5px;
}
.version-modal-label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  letter-spacing: .01em;
}
.version-modal-amount {
  font-size: 16px;
  font-weight: 600;
  opacity: .9;
}
.version-modal-history {
  padding: 10px 14px;
  background: #f5ede0;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.version-modal-history-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-mute);
  margin-bottom: 4px;
}
.version-modal-history-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.version-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.version-modal-icon-warn {
  background: #c44;
}
.missing-photos-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.missing-photos-group-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-mute);
  margin-bottom: 6px;
}
.missing-photos-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.missing-photo-chip {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  background: #f5ede0;
  border: 1px solid #e3d5b8;
  color: var(--ink-soft);
}

/* ─── Version display in rail / sidebar ──────────────────────────────── */
.rail-version-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  background: var(--ink, #2d3325);
  color: var(--cream, #f4ecdd);
  border-radius: 10px;
  font-size: 11px;
  font-family: var(--font-display);
  font-style: italic;
  letter-spacing: .02em;
}
.rail-versions {
  padding: 12px 0 4px;
  border-top: 1px solid var(--line-soft);
  margin-top: 4px;
}
.rail-versions .eyebrow { margin-bottom: 6px; }
.rail-version-list { display: flex; flex-direction: column; gap: 3px; }
.rail-version-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-soft);
  padding: 2px 0;
}
.rail-version-label { font-family: var(--font-display); font-style: italic; }
.rail-version-amount { font-weight: 500; }
.client-row-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.client-version-badge {
  font-size: 9.5px;
  font-family: var(--font-display);
  font-style: italic;
  padding: 1px 6px;
  background: var(--ink, #2d3325);
  color: var(--cream, #f4ecdd);
  border-radius: 8px;
  white-space: nowrap;
}

/* ─── Mobile responsive ──────────────────────────────────────────────── */
.mobile-header { display: none; } /* shown via media query */
.mobile-totals-bar { display: none; }
.mobile-sidebar-overlay { display: none; }

@media (max-width: 860px) {
  /* Sidebar becomes a fixed slide-in drawer */
  .sidebar, .sidebar-collapsed {
    position: fixed !important;
    left: 0;
    top: 0;
    height: 100dvh;
    z-index: 300;
    transform: translateX(-110%);
    transition: transform 280ms cubic-bezier(.4,0,.2,1);
    box-shadow: 4px 0 32px rgba(45,51,37,.18);
  }
  .sidebar.sidebar-mobile-open,
  .sidebar-collapsed.sidebar-mobile-open {
    transform: translateX(0);
  }
  /* Overlay backdrop */
  .mobile-sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(45,51,37,.35);
    z-index: 299;
  }
  /* Workspace takes full width */
  .workspace {
    padding-top: 52px;   /* room for fixed mobile header */
    padding-bottom: 64px; /* room for fixed mobile totals bar */
  }
  /* TotalsRail hidden on mobile — replaced by mobile-totals-bar */
  .totals-rail { display: none !important; }
  /* Mobile top header bar */
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 52px;
    background: var(--cream, #f4ecdd);
    border-bottom: 1px solid var(--line, #dccfb3);
    padding: 0 16px;
    z-index: 200;
  }
  .mobile-hamburger, .mobile-export-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
  }
  .mobile-header-brand {
    font-size: 18px;
    color: var(--ink);
    letter-spacing: .01em;
  }
  /* Mobile sticky totals bar */
  .mobile-totals-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: var(--ink, #2d3325);
    color: var(--cream, #f4ecdd);
    padding: 0 16px;
    z-index: 200;
    gap: 12px;
  }
  .mobile-totals-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  .mobile-totals-name {
    font-size: 11px;
    opacity: .7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mobile-totals-amount {
    font-size: 20px;
    line-height: 1.1;
  }
  .mobile-totals-export {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: var(--accent, #c8918c);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
  }
  /* Reduce workspace inner padding on mobile */
  .workspace-inner { padding: 0 12px 24px; }
  /* Cards full-width, reduce padding */
  .card { border-radius: 4px; }
  /* Arrangement cards: stack photo below header */
  .arr-card-head {
    grid-template-columns: 72px 1fr;
    grid-template-rows: auto auto;
    gap: 8px;
  }
  .arr-card-count, .arr-card-totals { grid-column: 2; }
  .arr-card-actions { grid-column: 1 / -1; justify-content: flex-end; }
  /* Palette table: horizontal scroll */
  .palette-table-scroll { -webkit-overflow-scrolling: touch; }
  /* Supplier editor: stack fields */
  .supplier-row-fields { flex-direction: column; }
  .supplier-row { flex-wrap: wrap; }
  /* Version modal: full width on mobile */
  .version-modal { max-width: 100%; border-radius: 12px 12px 0 0; }
  .version-modal-overlay { align-items: flex-end; padding: 0; }
}

/* ─── Flower library picker (inline, below palette table) ─────────────── */
.flower-picker {
  margin-top: 12px;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  background: #fbf7ef;
  overflow: hidden;
}
.flower-picker-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: #f5ede0;
}
.flower-picker-search-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #dccfb3;
  border-radius: 4px;
  padding: 5px 10px;
}
.flower-picker-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--ink);
}
.flower-picker-clear {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--ink-mute);
  line-height: 0;
}
.flower-picker-new {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.flower-picker-list {
  max-height: 340px;
  overflow-y: auto;
}
.flower-picker-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f0e6d4;
  transition: background 100ms;
}
.flower-picker-item:last-child { border-bottom: none; }
.flower-picker-item:hover:not(.flower-picker-item-added) { background: #f0ead8; }
.flower-picker-item-added { opacity: .55; cursor: default; }
.flower-picker-info { flex: 1; min-width: 0; }
.flower-picker-info strong { display: block; font-size: 13px; color: var(--ink); }
.flower-picker-info span  { font-size: 11.5px; color: var(--ink-mute); }
.flower-picker-badge {
  font-size: 10.5px;
  padding: 2px 8px;
  background: var(--sage, #9aa688);
  color: #fff;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.flower-picker-add-hint {
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 100ms;
}
.flower-picker-item:hover .flower-picker-add-hint { opacity: 1; }
.flower-picker-empty {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.flower-picker-empty-msg { font-size: 13px; color: var(--ink-soft); }

/* ─── New-flower setup modal ─────────────────────────────────────────── */
.new-flower-overlay {
  position: fixed;
  inset: 0;
  background: rgba(45, 51, 37, 0.45);
  backdrop-filter: blur(3px);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.new-flower-modal {
  background: var(--paper, #fcf7ec);
  border: 1px solid #dccfb3;
  border-radius: 8px;
  box-shadow: 0 24px 60px -12px rgba(45,51,37,.32);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.new-flower-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--line-soft);
}
.new-flower-modal-title { margin: 2px 0 0; font-size: 22px; }
.new-flower-modal-sub   { font-size: 12.5px; color: var(--ink-mute); margin: 4px 0 0; }
.new-flower-form  { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.new-flower-color-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.new-flower-color-controls { flex: 1; }
.new-flower-field-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.new-flower-field { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 120px; }
.new-flower-field-name { flex: 2; min-width: 200px; }
.new-flower-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-mute);
  font-weight: 500;
}
.new-flower-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--line-soft);
}

/* ─── Flower library manager (Settings tab) ──────────────────────────── */
.flib-manager { margin-top: 8px; }
.flib-table-head {
  display: grid;
  grid-template-columns: 40px 1fr 130px 110px 140px 32px;
  gap: 10px;
  padding: 6px 12px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-mute);
}
.flib-row {
  display: grid;
  grid-template-columns: 40px 1fr 130px 110px 140px 32px;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line-soft);
  transition: background 100ms;
}
.flib-row:hover { background: #f8f2e8; }
.flib-row:last-child { border-bottom: none; }
.flib-name-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.flib-name-input { font-size: 13px; }
.flib-kind { font-size: 11.5px; }
.flib-price-cell, .flib-stems-cell {
  display: flex;
  align-items: center;
  gap: 5px;
}
.flib-unit { font-size: 11px; color: var(--ink-mute); white-space: nowrap; }
.flib-supplier-cell { min-width: 0; }
.flib-swatch-editable { position: relative; cursor: pointer; }
.flib-swatch-edit-hint {
  position: absolute; bottom: -2px; right: -2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 150ms;
}
.flib-row:hover .flib-swatch-edit-hint { opacity: 1; }
.flib-color-picker {
  position: absolute; top: 100%; left: 0; z-index: 10;
  margin-top: 4px; padding: 6px 8px;
  background: var(--bg-card); border: 1px solid var(--line-soft);
  border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.12);
  display: flex; gap: 4px; flex-wrap: wrap; width: 180px;
}

@media (max-width: 860px) {
  .flib-table-head { display: none; }
  .flib-row {
    grid-template-columns: 36px 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .flib-name-cell { grid-column: 2 / -2; }
  .flib-price-cell { grid-row: 2; grid-column: 2; }
  .flib-stems-cell { grid-row: 2; grid-column: 3; }
  .flib-supplier-cell { grid-row: 2; grid-column: 2 / 4; }
  .flib-row .row-remove { grid-row: 1; grid-column: 3; justify-self: end; }
  /* Mobile: new flower modal full-width */
  .new-flower-overlay { padding: 0; align-items: flex-end; }
  .new-flower-modal { border-radius: 12px 12px 0 0; max-width: 100%; }
  /* Flower picker full-width */
  .flower-picker-head { flex-wrap: wrap; }
}

/* PDF title version tag */
.qp-title-version {
  font-size: 11pt;
  color: #7c7868;
  margin-top: 4pt;
  font-style: italic;
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
}

.qp-root { display: none; }

@media print {
  .app-shell  { display: none !important; }

  .qp-root {
    display: block !important;
    font-family: var(--font-ui, 'Inter', system-ui, sans-serif);
    color: #2d3325;
    background: #fff;
    font-size: 11pt;
    line-height: 1.55;
  }

  .qp-page {
    page-break-after: always;
    break-after: page;
    min-height: 11in;
    padding: 0.55in 0.6in 1.2in;
    position: relative;
    display: flex;
    flex-direction: column;
  }
  .qp-page:last-child { page-break-after: auto; break-after: auto; }

  /* ─── Logos ───────────────────────────────────────────────────────── */
  /* Hero logo: title page only. */
  .qp-hero-logo {
    text-align: center;
    margin: 12px 0 24px;
  }
  .qp-hero-logo img {
    max-width: 3.4in;
    max-height: 2in;
    width: auto;
    height: auto;
    object-fit: contain;
    display: inline-block;
  }
  /* Footer logo: fixed to bottom of every printed page. */
  .qp-footer-brand {
    position: fixed;
    bottom: 0.3in;
    left: 0;
    width: 100%;
    text-align: center;
  }
  .qp-footer-brand img {
    max-width: 1.6in;
    max-height: 0.7in;
    width: auto;
    height: auto;
    object-fit: contain;
    display: inline-block;
    opacity: 0.92;
  }

  /* ─── Page 1: Title ───────────────────────────────────────────────── */
  .qp-page-title { text-align: center; }
  .qp-title-meta {
    margin-top: 60px;
    font-size: 11pt;
    color: #4a4e3e;
  }
  .qp-title-date  { letter-spacing: .02em; }
  .qp-title-venue { margin-top: 4px; }
  .qp-title-name {
    font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
    font-style: italic;
    font-size: 44pt;
    font-weight: 400;
    margin: 18px 0 0;
    line-height: 1.1;
    color: #2d3325;
  }
  .qp-title-partner {
    font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
    font-style: italic;
    font-size: 26pt;
    color: #4a4e3e;
    margin-top: -4px;
  }
  /* Summary table on title page */
  .qp-summary-table {
    width: 90%;
    margin: 8px auto 0;
    border-collapse: collapse;
    font-size: 11pt;
  }
  .qp-summary-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #ece3cc;
    vertical-align: top;
  }
  .qp-summary-table tr:last-child td { border-bottom: none; }
  .qp-sum-name {
    text-align: right;
    color: #4a4e3e;
    width: 42%;
  }
  .qp-sum-qty {
    text-align: center;
    width: 12%;
    font-weight: 600;
    border-left: 1px solid #b4a89a;
    border-right: 1px solid #b4a89a;
  }
  .qp-sum-notes {
    text-align: left;
    color: #4a4e3e;
    font-size: 10pt;
    line-height: 1.4;
    width: 46%;
  }

  /* ─── Section title on inner pages ────────────────────────────────── */
  .qp-section-title {
    font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
    font-style: italic;
    font-size: 28pt;
    margin: 0 0 20px;
    color: #2d3325;
  }

  /* ─── Detail pages (arrangement + flowers + photo) ────────────────── */
  .qp-detail-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
  }
  .qp-detail {
    display: grid;
    grid-template-columns: 1fr 2.2in;
    gap: 16px;
    background: #fbeee9;
    border-radius: 4px;
    padding: 16px 18px;
    align-items: center;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .qp-detail-title {
    font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
    font-style: italic;
    font-size: 18pt;
    margin: 0 0 8px;
    color: #2d3325;
  }
  .qp-detail-flowers {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #2d3325;
    font-size: 10.5pt;
  }
  .qp-detail-flowers li { padding: 2px 0; }
  .qp-muted { color: #9a9282; font-style: italic; }

  .qp-detail-photo {
    width: 100%;
    height: 1.9in;
    background: #f0e6dd;
    border-radius: 2px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .qp-detail-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .qp-photo-default {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.2in;
  }
  .qp-detail-photo .bouquet-preview {
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }
  .qp-photo-placeholder {
    color: #b4a89a;
    font-size: 9pt;
    letter-spacing: .12em;
    text-transform: uppercase;
  }

  /* ─── Flower palette page ─────────────────────────────────────────── */
  .qp-palette-title {
    font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
    font-style: italic;
    font-size: 32pt;
    text-align: center;
    margin: 0 0 24px;
  }
  .qp-palette-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .qp-palette-cell {
    aspect-ratio: 1 / 1;
    background: #f4ecdd;
    overflow: hidden;
    position: relative;
  }
  .qp-palette-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .qp-palette-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px;
    background: repeating-linear-gradient(45deg, #f4ecdd, #f4ecdd 6px, #ece3cc 6px, #ece3cc 12px);
  }
  .qp-palette-placeholder-name {
    font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
    font-style: italic;
    font-size: 13pt;
    color: #4a4e3e;
  }
  .qp-palette-placeholder-note {
    font-size: 8pt;
    color: #9a9282;
    margin-top: 6px;
    letter-spacing: .04em;
  }

  /* ─── Price breakdown ────────────────────────────────────────────── */
  .qp-breakdown-title {
    text-align: left;
    font-size: 26pt;
    margin: 8px 0 18px;
  }
  .qp-breakdown-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12pt;
  }
  .qp-breakdown-table td {
    padding: 12px 14px;
    border: 1px solid #c8d4c5;
  }
  .qp-breakdown-table td:nth-child(2) {
    text-align: right;
    width: 33%;
  }
  .qp-breakdown-table tr:nth-child(odd) td { background: #f5f3ee; }
  .qp-breakdown-spacer td { padding: 0; border: none; height: 4px; background: #fff !important; }
  .qp-breakdown-total td {
    font-size: 14pt;
    border-top: 2px solid #5e6e3e;
    background: #fff !important;
  }
  .qp-breakdown-notes {
    margin-top: 22px;
    text-align: center;
    font-size: 9.5pt;
    color: #4a4e3e;
    line-height: 1.55;
  }
  .qp-breakdown-notes p { margin: 0 0 10px; }

  /* ─── Contract ────────────────────────────────────────────────────── */
  .qp-contract-title {
    font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
    font-style: italic;
    font-size: 30pt;
    text-align: center;
    margin: 0 0 16px;
  }
  .qp-contract-body { font-size: 9.5pt; line-height: 1.45; color: #2d3325; }
  .qp-contract-body p { margin: 0 0 9px; text-align: justify; }
  .qp-contract-body strong { color: #2d3325; }

  .qp-signature-block { margin-top: 28px; }
  .qp-sig-line {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 22px;
    font-size: 10pt;
    text-transform: uppercase;
    letter-spacing: .06em;
  }
  .qp-sig-rule {
    flex: 1;
    border-bottom: 1px solid #2d3325;
    min-height: 18px;
    padding-bottom: 2px;
    text-transform: none;
    letter-spacing: 0;
    font-size: 11pt;
  }

  @page { margin: 0; size: letter; }
}

/* ═══════════════════════════════════════════════════════════════════════
   On-screen UI extensions: custom-line editor, settings view, quote summary
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── Custom line items inside ExtrasEditor ─────────────────────────── */
.custom-lines {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #d6cdb5;
}
.custom-lines-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}
.custom-lines-head > span:last-child {
  font-size: 11px;
  color: #9a9282;
  font-style: italic;
}
.custom-line {
  display: grid;
  grid-template-columns: 1fr 110px 24px;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
}
.custom-line-label {
  border: 1px solid #e0d4bc;
  border-radius: 3px;
  padding: 6px 10px;
  font: inherit;
  background: #fff;
  color: var(--ink, #2d3325);
}
.custom-line-label::placeholder { color: #b4a89a; font-style: italic; }
.custom-line-add {
  margin-top: 6px;
  background: transparent;
  border: 1px dashed #c8b894;
  color: #6b6450;
  border-radius: 3px;
  padding: 7px 12px;
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.custom-line-add:hover { background: #faf5e8; border-color: #b4a07a; }
.custom-line:hover .row-remove { opacity: 1; }

/* ─── Sidebar settings button ───────────────────────────────────────── */
.sidebar-settings-btn {
  width: 100%;
  background: transparent;
  border: 1px solid #d6cdb5;
  border-radius: 3px;
  padding: 8px 10px;
  margin-bottom: 12px;
  font: inherit;
  font-size: 12px;
  color: #4a4e3e;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.sidebar-settings-btn:hover { background: #f4ecdd; border-color: #b4a07a; }

/* ─── Settings view ─────────────────────────────────────────────────── */
.settings-toast {
  position: fixed; top: 16px; right: 16px; z-index: 100;
  background: var(--ink); color: var(--bg-card);
  padding: 8px 16px; border-radius: 8px; font-size: 12.5px;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  animation: toast-in 200ms ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }
.settings-view .workspace-inner { max-width: 880px; }
.settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin: 24px 0 28px;
}
.settings-head h1 {
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-style: italic;
  font-size: 32px;
  margin: 4px 0 6px;
  color: var(--ink, #2d3325);
}
.settings-head .section-lede { max-width: 540px; }

.palette-lib-empty {
  padding: 32px;
  text-align: center;
  color: #9a9282;
  font-style: italic;
  background: #f8f2e4;
  border-radius: 3px;
}
.palette-lib-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.palette-lib-row {
  display: grid;
  grid-template-columns: 48px 1.4fr 110px 1fr;
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  background: #fbf7ef;
  border: 1px solid #ece3cc;
  border-radius: 3px;
}
.palette-lib-name strong {
  display: block;
  font-size: 14px;
  color: var(--ink, #2d3325);
}
.palette-lib-name span {
  display: block;
  font-size: 11px;
  color: #9a9282;
  margin-top: 2px;
}
.palette-lib-thumb {
  width: 96px;
  height: 96px;
  background: #f0e6dd;
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.palette-lib-thumb img { width: 100%; height: 100%; object-fit: cover; }
.palette-lib-thumb-placeholder {
  font-size: 10px;
  color: #b4a89a;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.palette-lib-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.palette-lib-thumb-uploading {
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0e6dd;
  border-radius: 3px;
}

/* ─── Palette library — filter tabs ─────────────────────────────────── */
.palette-lib-filters {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}
.palette-lib-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border: 1px solid #dccfb3;
  border-radius: 20px;
  background: transparent;
  font-family: var(--font-ui);
  font-size: 12.5px;
  color: #6b6450;
  cursor: pointer;
  transition: background 140ms, border-color 140ms, color 140ms;
}
.palette-lib-filter-btn:hover {
  background: #f5ede0;
  border-color: #c8b899;
  color: #3d2e1a;
}
.palette-lib-filter-btn.active {
  background: var(--ink, #2d3325);
  border-color: var(--ink, #2d3325);
  color: #f8f3ea;
}
.palette-lib-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: rgba(0,0,0,.12);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1;
}
.palette-lib-filter-btn.active .palette-lib-filter-count {
  background: rgba(255,255,255,.22);
}
.palette-lib-filter-count-warn {
  background: var(--warn, #b06b56) !important;
  color: #fff !important;
}

/* ─── Palette library — usage badge + orphan state ──────────────────── */
.palette-lib-usage {
  display: block;
  font-size: 11px;
  color: #9a9282;
  margin-top: 2px;
}
.palette-lib-orphan-tag {
  font-size: 10.5px;
  color: var(--warn, #b06b56);
  font-style: italic;
}
.palette-lib-row-orphaned {
  opacity: .85;
  border-color: #e4ccb8 !important;
  background: #fdf4ec !important;
}
.palette-lib-swatch-empty {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: repeating-linear-gradient(
    -45deg,
    #e8d8c6 0,
    #e8d8c6 3px,
    #f5ede0 3px,
    #f5ede0 8px
  );
  border: 1.5px dashed #c4b09a;
}
.palette-lib-orphan-name {
  color: #7a6654;
  font-style: italic;
}
.palette-lib-remove-btn {
  color: var(--warn, #b06b56) !important;
}
.palette-lib-orphan-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: #fff6f0;
  border: 1px solid #f0d4c0;
  border-radius: 4px;
  font-size: 13px;
  color: #7a5540;
  margin-top: 8px;
  margin-bottom: 4px;
  line-height: 1.5;
}
.palette-lib-clear-all {
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--warn, #b06b56) !important;
  font-weight: 500;
}

.muted { color: #9a9282; font-style: italic; }

/* ─── Quote Summary editor card ─────────────────────────────────────── */
.quote-summary-card .qs-preview {
  background: #fbf7ef;
  border: 1px solid #ece3cc;
  border-radius: 3px;
  padding: 28px 32px;
  margin-top: 14px;
}
.qs-preview-head { text-align: center; margin-bottom: 18px; }
.qs-preview-date  { font-size: 13px; color: #4a4e3e; }
.qs-preview-venue { font-size: 12px; color: #6b6450; margin-top: 2px; }
.qs-preview-name {
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-style: italic;
  font-size: 30px;
  color: var(--ink, #2d3325);
  margin-top: 8px;
}
.qs-empty { text-align: center; color: #9a9282; font-style: italic; padding: 16px 0; }
.qs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.qs-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #ece3cc;
  vertical-align: middle;
}
.qs-table tr:last-child td { border-bottom: none; }
.qs-name { text-align: right; color: #4a4e3e; width: 38%; }
.qs-qty  { text-align: center; width: 60px; border-left: 1px solid #b4a89a; border-right: 1px solid #b4a89a; }
.qs-notes { padding-left: 16px !important; width: auto; }
.qs-notes-input {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  padding: 6px 8px;
  border-radius: 3px;
  font: inherit;
  color: var(--ink, #2d3325);
}
.qs-notes-input:hover  { border-color: #ece3cc; background: #fff; }
.qs-notes-input:focus  { border-color: #b4a07a; background: #fff; outline: none; }
.qs-notes-input::placeholder { color: #b4a89a; font-style: italic; }
