/* Order Panel — dark SaaS, with editorial warmth */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  background: var(--dark-hero);
  color: #EFE7DB;
  min-height: 100vh;
  min-width: 1180px;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 1200px 600px at 50% -200px, rgba(232,97,45,0.18), transparent 60%),
    radial-gradient(ellipse 600px 400px at 100% 100%, rgba(232,97,45,0.06), transparent 60%);
  background-attachment: fixed;
}

button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }

/* ---------- Tokens overlay for dark surfaces ---------- */
:root {
  --surface-0: #14100E;
  --surface-1: rgba(255,255,255,0.035);
  --surface-2: rgba(255,255,255,0.06);
  --surface-3: rgba(255,255,255,0.09);
  --line-1: rgba(255,255,255,0.07);
  --line-2: rgba(255,255,255,0.12);
  --ink-1: #F2E9DA;
  --ink-2: #C9BCA6;
  --ink-3: #8A7F6E;
  --cream-soft: #E8DCC4;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center;
  padding: 14px 28px;
  background: rgba(15,11,8,0.85);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--line-1);
}
.topbar-logo { display: flex; align-items: center; gap: 10px; }
.topbar-logo img { width: 28px; height: 28px; border-radius: 6px; }
.topbar-logo-text {
  font-family: var(--font-sans);
  font-weight: 700; font-size: 15px;
  letter-spacing: -0.01em; color: var(--ink-1);
}
.topbar-logo-text span { color: var(--orange); }
.topbar-divider {
  width: 1px; height: 24px;
  background: var(--line-2);
  margin: 0 22px;
}
.topbar-step-rail {
  display: flex; align-items: center; gap: 14px;
  flex: 1; min-width: 0; overflow: hidden;
}
.topbar-step {
  display: flex; align-items: center; gap: 9px;
  color: var(--ink-3);
  font-size: 13px; font-weight: 500;
  white-space: nowrap;
}
.topbar-step-num {
  width: 22px; height: 22px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.topbar-step.done { color: var(--ink-2); }
.topbar-step.done .topbar-step-num {
  background: rgba(107,143,94,0.18);
  border-color: rgba(107,143,94,0.4);
  color: #A8C49A;
}
.topbar-step.active { color: var(--orange); }
.topbar-step.active .topbar-step-num {
  background: var(--orange);
  border-color: var(--orange);
  color: white;
  box-shadow: 0 0 0 4px rgba(232,97,45,0.15);
}
.topbar-step-link {
  width: 24px; height: 1px;
  background: var(--line-2);
}
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-progress {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--ink-2);
}
.topbar-progress-bar {
  width: 80px; height: 5px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.topbar-progress-bar > div {
  height: 100%; background: var(--orange);
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.topbar-save {
  font-size: 12px; color: var(--ink-3);
  display: flex; align-items: center; gap: 6px;
}
.topbar-save-dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--done-green);
  box-shadow: 0 0 8px rgba(107,143,94,0.7);
}
.topbar-help {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: 12.5px; font-weight: 500;
  color: var(--ink-1);
  white-space: nowrap;
}
.topbar-right > * { flex-shrink: 0; }

/* ---------- Closer-mode strip ---------- */
.closer-strip {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 28px;
  background: linear-gradient(90deg, rgba(232,97,45,0.13), rgba(232,97,45,0.04));
  border-bottom: 1px solid rgba(232,97,45,0.18);
  font-size: 12.5px;
}
.closer-strip-tag {
  font-family: var(--font-sans);
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--orange);
  padding: 4px 9px;
  border: 1px solid rgba(232,97,45,0.4);
  border-radius: 4px;
  background: rgba(232,97,45,0.08);
}
.closer-strip-msg { color: var(--ink-2); }
.closer-strip-msg b { color: var(--ink-1); font-weight: 600; }
.closer-strip-spacer { flex: 1; }
.closer-strip-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  font-size: 11.5px;
  color: var(--ink-2);
}
.closer-strip-pill .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--orange); }

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 32px 28px 80px;
}

/* ---------- Section header ---------- */
.section-eyebrow {
  font-family: var(--font-sans);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 12px;
  display: flex; align-items: center; gap: 8px;
}
.section-eyebrow::before, .section-eyebrow::after {
  content: '✦'; font-size: 9px; opacity: 0.7;
}
.section-eyebrow::after { display: none; }

.section-title {
  font-family: var(--font-serif);
  font-weight: 700; font-size: 40px;
  line-height: 1.05; letter-spacing: -0.02em;
  color: var(--ink-1);
  margin: 0 0 12px;
}
.section-title em {
  font-style: italic; color: var(--orange);
  font-weight: 600;
}
.section-sub {
  font-size: 15.5px; color: var(--ink-2);
  margin: 0 0 28px;
  max-width: 620px;
  line-height: 1.55;
}

/* ---------- Cards / surfaces ---------- */
.card {
  background: var(--surface-1);
  border: 1px solid var(--line-1);
  border-radius: 18px;
}
.card-elev {
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
  border: 1px solid var(--line-2);
  border-radius: 18px;
}
.divider { height: 1px; background: var(--line-1); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 600; font-size: 14px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--ink-1);
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
}
.btn:hover { background: var(--surface-3); border-color: rgba(255,255,255,0.18); }
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--orange);
  border-color: var(--orange);
  color: white;
  box-shadow: 0 8px 24px -8px rgba(232,97,45,0.55), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:hover { background: var(--orange-hover); border-color: var(--orange-hover); }
.btn-ghost {
  background: transparent; border-color: var(--line-2);
}
.btn-sm { padding: 6px 12px; font-size: 12.5px; }

/* ---------- Toggle / checkbox ---------- */
.toggle {
  width: 38px; height: 22px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  position: relative;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s;
  flex-shrink: 0;
}
.toggle::after {
  content: ''; position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 999px;
  background: var(--ink-2);
  transition: transform 0.25s cubic-bezier(0.22,1,0.36,1), background 0.25s;
}
.toggle.on { background: var(--orange); border-color: var(--orange); }
.toggle.on::after { transform: translateX(16px); background: white; }
.toggle.system { opacity: 0.45; cursor: not-allowed; }

.check {
  width: 22px; height: 22px;
  border-radius: 7px;
  border: 1.5px solid var(--line-2);
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.check.on {
  background: var(--orange);
  border-color: var(--orange);
}
.check.on svg { stroke: white; }
.check svg { width: 14px; height: 14px; stroke: transparent; stroke-width: 3; }

/* ---------- Tabs (variant switcher) ---------- */
.variant-tabs {
  display: inline-flex;
  padding: 4px;
  background: var(--surface-1);
  border: 1px solid var(--line-1);
  border-radius: 999px;
  margin-bottom: 24px;
}
.variant-tab {
  padding: 7px 14px;
  font-size: 12.5px; font-weight: 500;
  color: var(--ink-2);
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
  display: flex; align-items: center; gap: 7px;
}
.variant-tab:hover { color: var(--ink-1); }
.variant-tab.active {
  background: var(--surface-3);
  color: var(--ink-1);
}
.variant-tab .glyph {
  width: 14px; height: 14px; opacity: 0.7;
}

/* ---------- Group header (scenarios) ---------- */
.group-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4px;
  margin: 28px 0 12px;
  gap: 12px;
  flex-wrap: wrap;
}
.group-header:first-child { margin-top: 4px; }
.group-header-title {
  font-family: var(--font-sans);
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3);
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
}
.group-header-badge {
  font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--orange);
  background: rgba(232,97,45,0.10);
  border: 1px solid rgba(232,97,45,0.3);
  padding: 3px 7px;
  border-radius: 999px;
  letter-spacing: 0.1em;
}
.group-header-badge.subdued {
  color: var(--ink-3);
  background: var(--surface-2);
  border-color: var(--line-2);
}
body[data-theme="cream"] .group-header-badge {
  background: rgba(192,81,26,0.10);
  border-color: rgba(192,81,26,0.3);
}

/* ---------- Appointment management bundle card ---------- */
.bundle-card {
  padding: 18px 20px 16px;
  border-radius: 16px;
  border: 1px solid var(--line-1);
  background: var(--surface-1);
  margin-bottom: 6px;
  transition: background 0.2s, border-color 0.2s;
}
.bundle-card.on {
  border-color: rgba(232,97,45,0.4);
  background: rgba(232,97,45,0.05);
}
body[data-theme="cream"] .bundle-card.on {
  border-color: rgba(192,81,26,0.4);
  background: rgba(192,81,26,0.05);
}
.bundle-card-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  cursor: pointer;
}
.toggle.big {
  width: 44px; height: 26px;
}
.toggle.big::after {
  width: 20px; height: 20px;
  top: 2px; left: 2px;
}
.toggle.big.on::after { transform: translateX(18px); }
.bundle-card-text { min-width: 0; }
.bundle-card-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink-1);
  margin-bottom: 3px;
  letter-spacing: -0.005em;
}
.bundle-card.on .bundle-card-title {
  color: var(--ink-1);
}
.bundle-card-sub {
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.5;
  max-width: 460px;
}
.bundle-card-price {
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  text-align: right;
  white-space: nowrap;
  letter-spacing: -0.02em;
}
.bundle-card.on .bundle-card-price { color: var(--orange); }
.bundle-card-price .amount {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.bundle-card-price .suffix {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  display: block;
  margin-top: 1px;
  letter-spacing: 0.02em;
}
.bundle-card-divider {
  height: 1px;
  background: var(--line-1);
  margin: 16px 0 14px;
}
.bundle-card.on .bundle-card-divider {
  background: rgba(232,97,45,0.18);
}
body[data-theme="cream"] .bundle-card.on .bundle-card-divider {
  background: rgba(192,81,26,0.18);
}
.bundle-card-incl-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.bundle-card-incl-count { font-weight: 600; letter-spacing: 0.05em; }
.bundle-incl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.bundle-incl-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0,0,0,0.10);
  border: 1px solid var(--line-1);
  transition: background 0.2s, border-color 0.2s, opacity 0.2s;
}
body[data-theme="cream"] .bundle-incl-item { background: rgba(0,0,0,0.025); }
.bundle-incl-item.on {
  background: rgba(255,255,255,0.04);
  border-color: var(--line-2);
}
body[data-theme="cream"] .bundle-incl-item.on { background: rgba(0,0,0,0.04); }
.bundle-card:not(.on) .bundle-incl-item { opacity: 0.65; }
.bundle-incl-check {
  width: 18px; height: 18px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  color: transparent;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all 0.2s;
}
.bundle-incl-item.on .bundle-incl-check {
  background: var(--orange);
  border-color: var(--orange);
  color: white;
}
.bundle-incl-body { min-width: 0; }
.bundle-incl-name {
  font-size: 13px; font-weight: 600;
  color: var(--ink-1);
  margin-bottom: 2px;
}
.bundle-incl-desc {
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.45;
}

/* ---------- Summary sub-line (under bundle in sidebar) ---------- */
.summary-sub-line {
  display: flex; align-items: center; gap: 8px;
  padding: 3px 0 3px 12px;
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.4;
}
.summary-sub-line > svg {
  color: rgba(107,143,94,0.85);
  flex-shrink: 0;
}

/* ---------- Custom scenario composer ---------- */
.custom-composer {
  border: 1.5px dashed var(--line-2);
  border-radius: 14px;
  padding: 16px 18px 14px;
  background: var(--surface-1);
  margin-bottom: 6px;
}
.custom-composer-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.custom-composer-title {
  font-size: 13.5px; font-weight: 600;
  color: var(--ink-1);
  display: flex; align-items: center; gap: 9px;
}
.custom-composer-icon {
  width: 24px; height: 24px;
  border-radius: 7px;
  background: rgba(232,97,45,0.13);
  border: 1px solid rgba(232,97,45,0.3);
  color: var(--orange);
  display: flex; align-items: center; justify-content: center;
}
body[data-theme="cream"] .custom-composer-icon {
  background: rgba(192,81,26,0.10);
  border-color: rgba(192,81,26,0.3);
}
.custom-composer-price {
  font-variant-numeric: tabular-nums;
  color: var(--ink-1);
  letter-spacing: -0.02em;
}
.custom-composer-price .amount {
  font-size: 18px; font-weight: 700;
  letter-spacing: -0.025em;
}
.custom-composer-price .suffix {
  font-family: var(--font-sans);
  font-size: 11px; font-weight: 500;
  color: var(--ink-3);
  margin-left: 4px;
}
.custom-composer-input {
  width: 100%;
  border: 1px solid var(--line-2);
  background: var(--surface-0, transparent);
  background: rgba(0,0,0,0.18);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink-1);
  line-height: 1.5;
  resize: vertical;
  min-height: 96px;
  transition: border-color 0.2s, background 0.2s;
}
body[data-theme="cream"] .custom-composer-input,
body[data-theme="hybrid"] .custom-composer-input {
  background: rgba(0,0,0,0.025);
}
.custom-composer-input:focus {
  outline: none;
  border-color: rgba(232,97,45,0.5);
  background: rgba(0,0,0,0.25);
}
body[data-theme="cream"] .custom-composer-input:focus {
  border-color: rgba(192,81,26,0.5);
  background: rgba(0,0,0,0.04);
}
.custom-composer-input::placeholder {
  color: var(--ink-3);
  font-style: italic;
  opacity: 0.85;
}
.custom-composer-foot {
  display: flex; align-items: flex-start; gap: 16px;
  margin-top: 12px;
}
.custom-composer-meta {
  flex: 1;
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.5;
  padding-top: 2px;
}
.custom-composer-meta b { color: var(--ink-2); font-weight: 600; }
.custom-composer-meta > svg {
  flex-shrink: 0;
  color: var(--orange);
  margin-top: 1px;
}
.custom-composer-foot .btn {
  flex-shrink: 0;
  white-space: nowrap;
}
.custom-composer-chars {
  display: flex; align-items: center;
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line-1);
  font-variant-numeric: tabular-nums;
}

/* ---------- Custom scenario row ---------- */
.custom-row {
  border-color: rgba(232,97,45,0.32) !important;
  background: rgba(232,97,45,0.05) !important;
}
body[data-theme="cream"] .custom-row {
  border-color: rgba(192,81,26,0.32) !important;
  background: rgba(192,81,26,0.05) !important;
}
.custom-row .check.custom {
  background: rgba(232,97,45,0.18);
  border-color: rgba(232,97,45,0.5);
  color: var(--orange);
}
body[data-theme="cream"] .custom-row .check.custom {
  background: rgba(192,81,26,0.18);
  border-color: rgba(192,81,26,0.5);
  color: var(--orange);
}
.custom-row .row-desc {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.custom-row-name {
  color: var(--ink-1);
}
.pending-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: #E8A53D;
  background: rgba(232,165,61,0.10);
  border: 1px solid rgba(232,165,61,0.35);
  padding: 2px 7px;
  border-radius: 999px;
}
body[data-theme="cream"] .pending-badge {
  color: #B07A18;
  background: rgba(176,122,24,0.10);
  border-color: rgba(176,122,24,0.4);
}
.pending-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pending-pulse 1.8s ease-in-out infinite;
}
@keyframes pending-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ---------- Summary sidebar — pending dot ---------- */
.summary-pending-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #E8A53D;
  margin-right: 6px;
  vertical-align: middle;
  animation: pending-pulse 1.8s ease-in-out infinite;
}

/* ---------- Linear modal — triage chip + pending status ---------- */
.linear-sub-status.pending {
  border-color: #E8A53D;
  background: rgba(232,165,61,0.18);
}
.linear-triage {
  display: inline-block;
  font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: #E8A53D;
  background: rgba(232,165,61,0.10);
  border: 1px solid rgba(232,165,61,0.35);
  padding: 1px 5px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: middle;
}
body[data-theme="cream"] .linear-triage {
  color: #B07A18;
  background: rgba(176,122,24,0.10);
  border-color: rgba(176,122,24,0.35);
}
.linear-module {
  display: inline-block;
  font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--orange);
  background: rgba(232,97,45,0.10);
  border: 1px solid rgba(232,97,45,0.35);
  padding: 1px 5px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: middle;
}
body[data-theme="cream"] .linear-module {
  background: rgba(192,81,26,0.10);
  border-color: rgba(192,81,26,0.35);
}
.group-header-meta {
  font-size: 12px; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.group-header-meta b {
  font-weight: 600; color: var(--orange);
}
.group-note {
  font-size: 12.5px;
  color: var(--ink-3);
  padding: 0 4px;
  margin: -4px 0 12px;
  line-height: 1.5;
  font-style: italic;
}

/* ---------- Variant A: Checklist rows ---------- */
.row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center; gap: 16px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--line-1);
  background: var(--surface-1);
  transition: background 0.18s, border-color 0.18s;
  margin-bottom: 6px;
}
.row:hover { background: var(--surface-2); border-color: var(--line-2); }
.row.on { border-color: rgba(232,97,45,0.32); background: rgba(232,97,45,0.05); }
.row.system { opacity: 0.7; }
.row-body { min-width: 0; }
.row-title {
  font-weight: 600; font-size: 14.5px;
  color: var(--ink-1);
  display: flex; align-items: center; gap: 9px;
}
.row-title .sys-tag {
  font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--line-2);
  padding: 1px 5px;
  border-radius: 3px;
}
.row-desc {
  font-size: 12.5px; color: var(--ink-3);
  margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row-price {
  font-size: 19px; font-weight: 600;
  color: var(--ink-1);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  min-width: 70px;
  text-align: right;
}
.row-price.included { color: var(--ink-3); font-size: 11.5px; font-family: var(--font-sans); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.row-price-suffix { font-size: 11px; color: var(--ink-3); font-family: var(--font-sans); font-weight: 500; margin-left: 2px; }
.row-edit {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3);
  border: 1px solid transparent;
}
.row-edit:hover { background: var(--surface-2); border-color: var(--line-2); color: var(--ink-1); }

/* ---------- Variant B: Cards grid ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.scn-card {
  position: relative;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--line-1);
  background: var(--surface-1);
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.15s;
  min-height: 158px;
  display: flex; flex-direction: column;
}
.scn-card:hover { background: var(--surface-2); border-color: var(--line-2); transform: translateY(-1px); }
.scn-card.on { border-color: rgba(232,97,45,0.42); background: rgba(232,97,45,0.06); }
.scn-card.on .scn-card-icon { color: var(--orange); border-color: rgba(232,97,45,0.4); background: rgba(232,97,45,0.12); }
.scn-card-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2);
  margin-bottom: 12px;
  transition: all 0.2s;
}
.scn-card-title {
  font-weight: 600; font-size: 14px;
  color: var(--ink-1);
  margin-bottom: 4px;
}
.scn-card-desc {
  font-size: 12px; color: var(--ink-3);
  line-height: 1.45;
  flex: 1;
}
.scn-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px;
}
.scn-card-price {
  font-family: var(--font-serif);
  font-size: 16px; font-weight: 600;
  color: var(--ink-1);
  font-variant-numeric: tabular-nums;
}
.scn-card-price.included {
  font-family: var(--font-sans);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(107,143,94,0.85);
}
.scn-card .check { width: 20px; height: 20px; border-radius: 6px; }
.scn-card .check svg { width: 11px; height: 11px; }

/* ---------- Variant C: Workflow ---------- */
.flow-wrap {
  padding: 28px;
  border-radius: 18px;
  background:
    radial-gradient(ellipse 500px 300px at 0% 40%, rgba(232,97,45,0.06), transparent 60%),
    var(--surface-1);
  border: 1px solid var(--line-1);
  overflow-x: auto;
}
.flow-canvas {
  position: relative;
  min-width: 980px;
  height: 460px;
}
.flow-call {
  position: absolute; left: 0; top: 200px;
  width: 110px; height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--orange), #B43C0F);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: white;
  box-shadow: 0 12px 40px -8px rgba(232,97,45,0.5), inset 0 1px 0 rgba(255,255,255,0.2);
}
.flow-call .pulse {
  position: absolute; inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(232,97,45,0.4);
  animation: pulse-ring 2.4s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1.25); opacity: 0; }
}
.flow-call-label { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.8; }
.flow-call-name { font-family: var(--font-serif); font-weight: 700; font-size: 18px; margin-top: 2px; }
.flow-col-label {
  position: absolute;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3);
}
.flow-node {
  position: absolute;
  width: 130px; padding: 9px 11px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  cursor: pointer;
  transition: all 0.18s;
  display: flex; align-items: center; gap: 8px;
}
.flow-node:hover { background: var(--surface-3); border-color: rgba(255,255,255,0.2); }
.flow-node.on {
  background: rgba(232,97,45,0.13);
  border-color: rgba(232,97,45,0.5);
  box-shadow: 0 4px 16px -4px rgba(232,97,45,0.4);
}
.flow-node.off { opacity: 0.45; }
.flow-node-icon {
  width: 22px; height: 22px;
  border-radius: 5px;
  background: var(--surface-3);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2);
  flex-shrink: 0;
}
.flow-node.on .flow-node-icon { background: rgba(232,97,45,0.25); color: var(--orange); }
.flow-node-text {
  min-width: 0;
}
.flow-node-name {
  font-size: 11.5px; font-weight: 600;
  color: var(--ink-1);
  line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.flow-node-price {
  font-size: 10.5px; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}
.flow-node.on .flow-node-price { color: var(--orange); }
.flow-svg {
  position: absolute; inset: 0;
  pointer-events: none;
}

/* ---------- Variant D: Wizard ---------- */
.wizard-step-rail {
  display: flex; gap: 4px;
  margin-bottom: 24px;
}
.wizard-step-rail > div {
  flex: 1; height: 3px; border-radius: 999px;
  background: var(--surface-2);
  transition: background 0.3s;
}
.wizard-step-rail > div.done { background: rgba(107,143,94,0.6); }
.wizard-step-rail > div.active { background: var(--orange); }

.wizard-card {
  padding: 36px 38px 28px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  border: 1px solid var(--line-2);
  position: relative;
  overflow: hidden;
}
.wizard-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 400px 200px at 20% 0%, rgba(232,97,45,0.08), transparent 60%);
  pointer-events: none;
}
.wizard-counter {
  position: relative;
  font-family: var(--font-serif);
  font-size: 13px; font-weight: 600;
  color: var(--orange);
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}
.wizard-counter b { font-size: 18px; }
.wizard-q {
  position: relative;
  font-family: var(--font-serif);
  font-size: 32px; font-weight: 700;
  line-height: 1.15;
  color: var(--ink-1);
  margin: 0 0 12px;
  letter-spacing: -0.015em;
  max-width: 560px;
}
.wizard-sub {
  position: relative;
  font-size: 15px; color: var(--ink-2);
  margin-bottom: 24px;
  max-width: 540px;
}
.wizard-choices {
  position: relative;
  display: flex; gap: 12px;
  margin-bottom: 22px;
}
.wizard-choice {
  flex: 0 0 auto; min-width: 120px;
  padding: 14px 22px;
  border-radius: 14px;
  border: 1.5px solid var(--line-2);
  background: var(--surface-1);
  font-weight: 600; font-size: 15px;
  color: var(--ink-1);
  display: flex; align-items: center; gap: 10px;
  transition: all 0.2s;
}
.wizard-choice:hover { background: var(--surface-2); }
.wizard-choice.on {
  background: rgba(232,97,45,0.13);
  border-color: var(--orange);
  color: var(--ink-1);
}
.wizard-choice .ring {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  display: flex; align-items: center; justify-content: center;
}
.wizard-choice.on .ring { border-color: var(--orange); background: var(--orange); }
.wizard-choice.on .ring::after {
  content: ''; width: 7px; height: 7px; border-radius: 50%; background: white;
}
.wizard-bundle {
  position: relative;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--surface-1);
  border: 1px dashed var(--line-2);
}
.wizard-bundle-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.wizard-bundle-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.wizard-bundle-chip {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  font-size: 12px; color: var(--ink-2);
  display: flex; align-items: center; gap: 6px;
}
.wizard-bundle-chip .check-mini {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: rgba(107,143,94,0.4);
  display: flex; align-items: center; justify-content: center;
  color: #A8C49A;
}
.wizard-foot {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 24px;
}
.wizard-foot .running {
  font-size: 12.5px; color: var(--ink-3);
}
.wizard-foot .running b {
  font-family: var(--font-serif);
  font-size: 17px; color: var(--orange); font-weight: 600;
  margin-left: 6px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Order summary sidebar ---------- */
.summary {
  position: sticky;
  top: 84px;
  align-self: start;
  background: linear-gradient(180deg, #1F1714 0%, #160F0C 100%);
  border: 1px solid var(--line-2);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.6);
}
.summary-head {
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--line-1);
  background:
    radial-gradient(ellipse 240px 140px at 100% 0%, rgba(232,97,45,0.18), transparent 60%);
}
.summary-eyebrow {
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.summary-business {
  font-family: var(--font-serif);
  font-size: 22px; font-weight: 700;
  color: var(--ink-1);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.summary-business-meta {
  font-size: 12.5px; color: var(--ink-3);
}
.summary-body {
  padding: 18px 22px 4px;
}
.summary-section {
  margin-bottom: 14px;
}
.summary-section-head {
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
  display: flex; align-items: center; justify-content: space-between;
}
.summary-line {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
}
.summary-line-name { color: var(--ink-2); padding-right: 10px; min-width: 0; }
.summary-line-name span.dim { color: var(--ink-3); font-size: 11px; margin-left: 4px; }
.summary-line-price {
  font-variant-numeric: tabular-nums;
  color: var(--ink-1);
  font-weight: 500;
  white-space: nowrap;
}
.summary-line-price.zero { color: var(--ink-3); font-weight: 400; font-size: 11.5px; }
.summary-line.collapsed {
  font-size: 12px; color: var(--ink-3);
  font-style: italic;
}
.summary-divider {
  height: 1px; background: var(--line-1);
  margin: 14px 0;
}
.summary-totals {
  padding: 16px 22px 6px;
  border-top: 1px solid var(--line-1);
  background: rgba(0,0,0,0.2);
}
.summary-totals .summary-line { padding: 5px 0; }
.summary-grand {
  padding: 14px 22px 22px;
  background: rgba(0,0,0,0.35);
  display: flex; align-items: baseline; justify-content: space-between;
  border-top: 1px solid var(--line-1);
}
.summary-grand-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3);
}
.summary-grand-value {
  font-weight: 700; font-size: 38px;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.035em;
}
.summary-grand-value-suffix {
  font-family: var(--font-sans);
  font-size: 12px; font-weight: 500;
  color: var(--ink-3);
  margin-left: 4px;
  letter-spacing: 0;
}
.summary-cta {
  padding: 18px 22px 22px;
}
.summary-cta .btn { width: 100%; padding: 14px; font-size: 14.5px; }
.summary-trust {
  display: flex; flex-direction: column; gap: 8px;
  padding: 4px 22px 22px;
  font-size: 11.5px; color: var(--ink-3);
}
.summary-trust-row { display: flex; align-items: center; gap: 8px; }
.summary-trust-row svg { color: rgba(107,143,94,0.85); }

.bump {
  animation: bump 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes bump {
  0% { transform: scale(1); }
  30% { transform: scale(1.05); color: #FFB07A; }
  100% { transform: scale(1); }
}

/* ---------- Submit modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15,11,8,0.78);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadein 0.25s ease-out;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal {
  max-width: 520px; width: 100%;
  background: linear-gradient(180deg, #1B1411 0%, #100C0A 100%);
  border: 1px solid var(--line-2);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 40px 100px -20px rgba(0,0,0,0.8);
  animation: pop 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes pop { from { transform: scale(0.92) translateY(20px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
.modal-head {
  padding: 28px 28px 20px;
  display: flex; align-items: center; gap: 14px;
  background:
    radial-gradient(ellipse 320px 160px at 100% 0%, rgba(232,97,45,0.18), transparent 60%);
}
.modal-check {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(107,143,94,0.18);
  border: 1px solid rgba(107,143,94,0.45);
  display: flex; align-items: center; justify-content: center;
  color: #A8C49A;
  flex-shrink: 0;
}
.modal-title {
  font-family: var(--font-serif);
  font-weight: 700; font-size: 22px;
  color: var(--ink-1);
  margin: 0;
}
.modal-sub {
  font-size: 13px; color: var(--ink-3);
  margin-top: 2px;
}
.modal-body { padding: 6px 28px 22px; }
.linear-issue {
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--surface-1);
  overflow: hidden;
}
.linear-issue-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-1);
  background: var(--surface-2);
}
.linear-logo {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, #5E6AD2, #4F58B9);
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 10px; font-weight: 700;
}
.linear-project {
  font-size: 13.5px; font-weight: 600;
  color: var(--ink-1);
}
.linear-project span { color: var(--ink-3); font-weight: 500; margin-left: 6px; }
.linear-parent {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--line-1);
}
.linear-parent-id {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-3);
  background: var(--surface-2);
  padding: 2px 7px;
  border-radius: 5px;
}
.linear-parent-name { color: var(--ink-1); font-weight: 600; }
.linear-subs {
  padding: 10px 16px;
  max-height: 200px; overflow-y: auto;
}
.linear-sub {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 0;
  font-size: 12.5px;
}
.linear-sub-status {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-3);
  flex-shrink: 0;
}
.linear-sub-id {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  min-width: 64px;
}
.linear-sub-name { color: var(--ink-2); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal-foot {
  padding: 18px 28px 24px;
  display: flex; gap: 10px; align-items: center;
}
.modal-foot .btn { padding: 11px 16px; }
.modal-stat {
  flex: 1;
  font-size: 12px; color: var(--ink-3);
}
.modal-stat b {
  color: var(--ink-1); font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---------- Misc ---------- */
.context-strip {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--surface-1);
  border: 1px solid var(--line-1);
  margin-bottom: 24px;
  font-size: 13px;
}
.context-strip .ind-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(232,97,45,0.13);
  border: 1px solid rgba(232,97,45,0.3);
  display: flex; align-items: center; justify-content: center;
  color: var(--orange);
}
.context-strip-body { flex: 1; }
.context-strip-title {
  font-weight: 600; color: var(--ink-1);
  font-size: 13.5px;
}
.context-strip-meta {
  font-size: 11.5px; color: var(--ink-3);
  margin-top: 1px;
}
.context-strip-pill {
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--orange);
  border: 1px solid rgba(232,97,45,0.35);
  background: rgba(232,97,45,0.08);
  padding: 4px 9px;
  border-radius: 999px;
}

/* ---------- Self-serve helper bubbles ---------- */
.help-bubble {
  display: flex; gap: 12px;
  padding: 13px 14px;
  border-radius: 12px;
  background: rgba(232,97,45,0.06);
  border: 1px solid rgba(232,97,45,0.18);
  font-size: 12.5px; color: var(--ink-2);
  margin-bottom: 16px;
  line-height: 1.5;
}
.help-bubble-icon {
  width: 26px; height: 26px; flex-shrink: 0;
  border-radius: 8px;
  background: rgba(232,97,45,0.18);
  display: flex; align-items: center; justify-content: center;
  color: var(--orange);
}
.help-bubble b { color: var(--ink-1); font-weight: 600; }

/* ---------- Page footer / step nav ---------- */
.page-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 28px;
}
.page-foot-back {
  color: var(--ink-3); font-size: 13.5px;
  display: flex; align-items: center; gap: 6px;
}
.page-foot-back:hover { color: var(--ink-1); }
.page-foot-actions {
  display: flex; gap: 10px; align-items: center;
}
.page-foot-meta {
  font-size: 12px; color: var(--ink-3);
  margin-right: 6px;
}

/* ====================================================================
   THEMES
   ==================================================================== */

/* ---------- Cream editorial ---------- */
body[data-theme="cream"] {
  --surface-0: #F5F0E6;
  --surface-1: rgba(0,0,0,0.028);
  --surface-2: rgba(0,0,0,0.05);
  --surface-3: rgba(0,0,0,0.085);
  --line-1: rgba(0,0,0,0.08);
  --line-2: rgba(0,0,0,0.14);
  --ink-1: #2C2C2C;
  --ink-2: #5F5447;
  --ink-3: #8A8275;
  --orange: #C0511A;
  --orange-hover: #A8441A;
  background: #F5F0E6 !important;
  color: var(--ink-1);
  background-image:
    radial-gradient(ellipse 1200px 600px at 50% -200px, rgba(192,81,26,0.10), transparent 60%),
    radial-gradient(ellipse 600px 400px at 100% 100%, rgba(192,81,26,0.04), transparent 60%) !important;
}
body[data-theme="cream"] .topbar {
  background: rgba(253,246,237,0.88);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
body[data-theme="cream"] .topbar-logo img {
  filter: hue-rotate(-8deg) saturate(1.05);
}
body[data-theme="cream"] .topbar-divider { background: rgba(0,0,0,0.1); }
body[data-theme="cream"] .closer-strip {
  background: linear-gradient(90deg, rgba(192,81,26,0.10), rgba(192,81,26,0.02));
  border-bottom: 1px solid rgba(192,81,26,0.18);
}
body[data-theme="cream"] .closer-strip-tag {
  background: rgba(192,81,26,0.10);
  border-color: rgba(192,81,26,0.35);
}
body[data-theme="cream"] .closer-strip-pill {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.1);
}
body[data-theme="cream"] .summary {
  background: linear-gradient(180deg, #FFFFFF 0%, #FDF6ED 100%);
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 20px 60px -20px rgba(60,30,10,0.18);
}
body[data-theme="cream"] .summary-head {
  background: radial-gradient(ellipse 240px 140px at 100% 0%, rgba(192,81,26,0.12), transparent 60%);
  border-bottom-color: rgba(0,0,0,0.08);
}
body[data-theme="cream"] .summary-totals,
body[data-theme="cream"] .summary-grand {
  background: rgba(192,81,26,0.05);
  border-top-color: rgba(0,0,0,0.08);
}
body[data-theme="cream"] .modal-backdrop {
  background: rgba(60,40,25,0.4);
}
body[data-theme="cream"] .modal {
  background: linear-gradient(180deg, #FFFFFF 0%, #FDF6ED 100%);
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 40px 100px -20px rgba(60,30,10,0.35);
}
body[data-theme="cream"] .modal-head {
  background: radial-gradient(ellipse 320px 160px at 100% 0%, rgba(192,81,26,0.14), transparent 60%);
}
body[data-theme="cream"] .linear-issue-head { background: rgba(192,81,26,0.05); }
body[data-theme="cream"] .topbar-save-dot { background: #5A8B4E; box-shadow: 0 0 6px rgba(90,139,78,0.5); }
body[data-theme="cream"] .row.on { border-color: rgba(192,81,26,0.4); background: rgba(192,81,26,0.06); }
body[data-theme="cream"] .ind-icon {
  background: rgba(192,81,26,0.10);
  border-color: rgba(192,81,26,0.3);
}
body[data-theme="cream"] .context-strip-pill {
  background: rgba(192,81,26,0.08);
  border-color: rgba(192,81,26,0.3);
  color: var(--orange);
}
body[data-theme="cream"] .help-bubble {
  background: rgba(192,81,26,0.06);
  border-color: rgba(192,81,26,0.2);
}
body[data-theme="cream"] .help-bubble-icon {
  background: rgba(192,81,26,0.16);
}
body[data-theme="cream"] .btn-primary {
  box-shadow: 0 6px 20px -8px rgba(192,81,26,0.55), inset 0 1px 0 rgba(255,255,255,0.2);
}
body[data-theme="cream"] .modal-check {
  background: rgba(90,139,78,0.15);
  border-color: rgba(90,139,78,0.4);
  color: #4A7340;
}
body[data-theme="cream"] .linear-logo {
  background: linear-gradient(135deg, #5E6AD2, #4F58B9);
}

/* ---------- Hybrid: cream main, dark chrome ---------- */
body[data-theme="hybrid"] {
  --surface-0: #F5F0E6;
  --surface-1: rgba(0,0,0,0.028);
  --surface-2: rgba(0,0,0,0.05);
  --surface-3: rgba(0,0,0,0.085);
  --line-1: rgba(0,0,0,0.08);
  --line-2: rgba(0,0,0,0.14);
  --ink-1: #2C2C2C;
  --ink-2: #5F5447;
  --ink-3: #8A8275;
  background: #F5F0E6 !important;
  color: var(--ink-1);
  background-image:
    radial-gradient(ellipse 1200px 600px at 50% -200px, rgba(232,97,45,0.12), transparent 60%) !important;
}
/* Topbar + sidebar + modal stay dark — re-scope tokens inside them */
body[data-theme="hybrid"] .topbar,
body[data-theme="hybrid"] .summary,
body[data-theme="hybrid"] .modal {
  --surface-0: #14100E;
  --surface-1: rgba(255,255,255,0.035);
  --surface-2: rgba(255,255,255,0.06);
  --surface-3: rgba(255,255,255,0.09);
  --line-1: rgba(255,255,255,0.07);
  --line-2: rgba(255,255,255,0.12);
  --ink-1: #F2E9DA;
  --ink-2: #C9BCA6;
  --ink-3: #8A7F6E;
}
body[data-theme="hybrid"] .row.on {
  border-color: rgba(232,97,45,0.45);
  background: rgba(232,97,45,0.07);
}
body[data-theme="hybrid"] .closer-strip {
  background: linear-gradient(90deg, rgba(232,97,45,0.13), rgba(232,97,45,0.03));
  border-bottom: 1px solid rgba(232,97,45,0.2);
}
body[data-theme="hybrid"] .help-bubble {
  background: rgba(232,97,45,0.06);
  border-color: rgba(232,97,45,0.2);
}
body[data-theme="hybrid"] .help-bubble-icon {
  background: rgba(232,97,45,0.16);
}
body[data-theme="hybrid"] .ind-icon {
  background: rgba(232,97,45,0.12);
  border-color: rgba(232,97,45,0.3);
}
body[data-theme="hybrid"] .context-strip-pill {
  background: rgba(232,97,45,0.08);
  border-color: rgba(232,97,45,0.3);
}

/* ====================================================================
   TWEAKS PANEL
   ==================================================================== */
.tweaks-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 100;
  width: 300px;
  max-height: calc(100vh - 40px);
  background: rgba(20,16,14,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  overflow: hidden;
  display: flex; flex-direction: column;
  color: #F2E9DA;
}
.tweaks-body {
  padding: 14px;
  display: flex; flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  flex: 1;
}
.tweaks-head {
  display: flex; align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.tweaks-title {
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--orange); flex: 1;
}
.tweaks-close {
  width: 24px; height: 24px;
  border-radius: 7px;
  background: rgba(255,255,255,0.06);
  color: #C9BCA6;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.tweaks-close:hover { background: rgba(255,255,255,0.1); color: white; }
.tweak-section {}
.tweak-label {
  font-size: 11px; font-weight: 700;
  color: #8A7F6E;
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 10px;
}
.tweak-themes {
  display: flex; flex-direction: column;
  gap: 6px;
}
.tweak-theme {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.07);
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}
.tweak-theme:hover { background: rgba(255,255,255,0.07); }
.tweak-theme.on {
  background: rgba(232,97,45,0.12);
  border-color: rgba(232,97,45,0.5);
}
.tweak-theme-swatch {
  display: flex; gap: 0;
  width: 36px; height: 36px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.1);
}
.tweak-theme-swatch span {
  flex: 1; height: 100%;
}
.tweak-theme-text { flex: 1; min-width: 0; }
.tweak-theme-name {
  font-size: 12.5px; font-weight: 600;
  color: #F2E9DA;
}
.tweak-theme-sub {
  font-size: 10.5px; color: #8A7F6E;
  margin-top: 1px;
}
.tweak-theme-radio {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  color: white;
  flex-shrink: 0;
}
.tweak-theme.on .tweak-theme-radio {
  background: var(--orange);
  border-color: var(--orange);
}
.tweak-segment {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4px; padding: 3px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
}
.tweak-segment button {
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 12px; font-weight: 500;
  background: transparent;
  color: #C9BCA6;
}
.tweak-segment button.on {
  background: var(--orange);
  color: white;
}

/* ---------- Chip style picker (tweaks) ---------- */
.tweak-chip-styles {
  display: flex; flex-direction: column;
  gap: 6px;
}
.tweak-chip-style {
  display: flex; flex-direction: column;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.07);
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
  cursor: pointer;
}
.tweak-chip-style:hover { background: rgba(255,255,255,0.07); }
.tweak-chip-style.on {
  background: rgba(232,97,45,0.12);
  border-color: rgba(232,97,45,0.5);
}
.tweak-chip-style-preview {
  display: flex; align-items: center;
  min-height: 24px;
  padding: 4px 0;
  font-size: 10.5px;
}
.tweak-chip-style-text { display: flex; align-items: baseline; gap: 8px; }
.tweak-chip-style-name {
  font-size: 12px; font-weight: 600;
  color: #F2E9DA;
}
.tweak-chip-style-sub {
  font-size: 10px; color: #8A7F6E;
}

/* Tiny chip previews shown in the tweaks panel */
.chip-preview-pill,
.chip-preview-compact,
.chip-preview-card {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px 3px 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 9.5px; color: #C9BCA6;
  white-space: nowrap;
}
.chip-preview-card {
  border-radius: 8px;
  padding: 4px 8px 4px 4px;
  width: 100%;
}
.chip-preview-inline {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; color: #C9BCA6;
  padding: 4px 0;
}
.chip-preview-inline svg { color: var(--orange); }
.chip-preview-inline b {
  color: #F2E9DA; font-weight: 600;
  border-bottom: 1px dashed rgba(232,97,45,0.5);
}
.chip-preview-cat {
  font-size: 8px; font-weight: 700;
  letter-spacing: 0.1em;
  color: #8A7F6E;
}
.chip-preview-bar {
  width: 1px; height: 8px;
  background: rgba(255,255,255,0.18);
}
.chip-preview-logo {
  width: 13px; height: 13px;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(232,97,45,0.3), rgba(232,97,45,0.1));
  border: 1px solid rgba(232,97,45,0.4);
  color: var(--orange);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 7px; font-weight: 700;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.chip-preview-card-body {
  display: flex; flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}
.chip-preview-card-cat {
  font-size: 7px; font-weight: 700;
  letter-spacing: 0.1em;
  color: #8A7F6E;
}

/* ---------- Summary custom-scenario note ---------- */
.summary-custom-note {
  display: flex; align-items: flex-start; gap: 7px;
  margin-top: 10px;
  padding: 8px 10px;
  background: rgba(232,165,61,0.07);
  border: 1px solid rgba(232,165,61,0.25);
  border-radius: 8px;
  font-size: 11px;
  color: var(--ink-3);
  line-height: 1.4;
}
.summary-custom-note > svg {
  color: #E8A53D;
  flex-shrink: 0;
  margin-top: 1px;
}
.summary-custom-note b {
  color: var(--ink-1);
  font-weight: 600;
}
body[data-theme="cream"] .summary-custom-note {
  background: rgba(176,122,24,0.06);
  border-color: rgba(176,122,24,0.25);
}
body[data-theme="cream"] .summary-custom-note > svg {
  color: #B07A18;
}

/* utility */
.flex { display: flex; }
.items-center { align-items: center; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.dim { color: var(--ink-3); }

/* ====================================================================
   INTEGRATION CHIP — appears under each scenario's description and
   inside the appointment-management bundle card.
   ==================================================================== */
.linear-integ {
  display: inline-block;
  font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: #6B9CC9;
  background: rgba(107,156,201,0.10);
  border: 1px solid rgba(107,156,201,0.35);
  padding: 1px 5px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: middle;
}
body[data-theme="cream"] .linear-integ {
  color: #2F5A82;
  background: rgba(47,90,130,0.10);
  border-color: rgba(47,90,130,0.35);
}

.integration-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 8px;
  margin-top: 8px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(0,0,0,0.18);
  font-size: 11.5px;
  color: var(--ink-2);
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
  max-width: 100%;
}
body[data-theme="cream"] .integration-chip {
  background: rgba(0,0,0,0.03);
}
.integration-chip:hover {
  border-color: rgba(232,97,45,0.4);
  background: rgba(232,97,45,0.07);
  color: var(--ink-1);
}
body[data-theme="cream"] .integration-chip:hover {
  border-color: rgba(192,81,26,0.45);
  background: rgba(192,81,26,0.06);
}
.integration-chip-cat {
  font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
.integration-chip-card-cat {
  white-space: nowrap;
}
.integration-chip-divider {
  width: 1px; height: 12px;
  background: var(--line-2);
}
.integration-chip-logo {
  width: 18px; height: 18px;
  border-radius: 5px;
  background: linear-gradient(135deg, rgba(232,97,45,0.25), rgba(232,97,45,0.08));
  border: 1px solid rgba(232,97,45,0.4);
  color: var(--orange);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700;
  font-family: var(--font-sans);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
body[data-theme="cream"] .integration-chip-logo {
  background: linear-gradient(135deg, rgba(192,81,26,0.2), rgba(192,81,26,0.08));
  border-color: rgba(192,81,26,0.35);
}
.integration-chip-name {
  font-weight: 600;
  color: var(--ink-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.integration-chip-price {
  font-weight: 600;
  font-size: 12px;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
  margin-left: 2px;
}
.integration-chip-price.zero {
  color: rgba(107,143,94,0.85);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
}
.integration-chip.empty {
  border: 1px dashed rgba(232,97,45,0.5);
  background: rgba(232,97,45,0.08);
  color: var(--orange);
  font-weight: 600;
  padding-right: 9px;
}
body[data-theme="cream"] .integration-chip.empty {
  border-color: rgba(192,81,26,0.5);
  background: rgba(192,81,26,0.08);
}
.integration-chip.empty:hover {
  background: rgba(232,97,45,0.13);
}
.integration-chip-icon {
  width: 16px; height: 16px;
  border-radius: 5px;
  background: rgba(232,97,45,0.18);
  color: var(--orange);
  display: flex; align-items: center; justify-content: center;
}

/* ----- Chip style variants ----- */

/* Compact: logo + name + price, no category label */
.integration-chip.style-compact {
  padding: 4px 9px 4px 4px;
  gap: 6px;
}
.integration-chip.style-compact .integration-chip-logo {
  width: 16px; height: 16px;
}
.integration-chip.style-compact .integration-chip-divider {
  display: none;
}

/* Inline: no border, just text */
.integration-chip.style-inline {
  border: none;
  background: transparent;
  padding: 6px 0;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--ink-3);
  gap: 5px;
}
.integration-chip.style-inline:hover {
  background: transparent;
  color: var(--ink-1);
}
.integration-chip.style-inline > svg {
  color: var(--orange);
  flex-shrink: 0;
}
.integration-chip.style-inline b {
  color: var(--ink-1);
  font-weight: 600;
  border-bottom: 1px dashed rgba(232,97,45,0.5);
}
body[data-theme="cream"] .integration-chip.style-inline b {
  border-bottom-color: rgba(192,81,26,0.5);
}
.integration-chip.style-inline:hover b {
  border-bottom-color: var(--orange);
}
.integration-chip.style-inline .integration-chip-divider {
  background: var(--line-1);
}

/* Card: stacked with category above name */
.integration-chip.style-card {
  padding: 8px 14px 8px 8px;
  border-radius: 12px;
  gap: 10px;
}
.integration-chip.style-card .integration-chip-logo {
  width: 28px; height: 28px;
  font-size: 11px;
}
.integration-chip-card-body {
  display: flex; flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  text-align: left;
}
.integration-chip-card-cat {
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3);
}
.integration-chip.style-card .integration-chip-name {
  font-size: 12.5px;
}
.integration-chip.style-card .integration-chip-divider {
  align-self: stretch;
  height: auto;
}
.integration-chip.style-card > svg {
  color: var(--ink-3);
}

/* Bundle card — dedicated integration row */
.bundle-card-integration-row {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(232,97,45,0.05);
  border: 1px solid rgba(232,97,45,0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
body[data-theme="cream"] .bundle-card-integration-row {
  background: rgba(192,81,26,0.05);
  border-color: rgba(192,81,26,0.2);
}
.bundle-card-integration-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 600;
  color: var(--ink-2);
}
.bundle-card-integration-label svg { color: var(--orange); }
.bundle-card-integration-row .integration-chip {
  margin-top: 0;
}

/* ====================================================================
   INTEGRATION PICKER MODAL
   ==================================================================== */
.integration-modal-backdrop {
  align-items: flex-start;
  padding-top: 60px;
}
.integration-modal {
  max-width: 640px; width: 100%;
  max-height: calc(100vh - 100px);
  background: linear-gradient(180deg, #1B1411 0%, #100C0A 100%);
  border: 1px solid var(--line-2);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 40px 100px -20px rgba(0,0,0,0.8);
  animation: pop 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex; flex-direction: column;
}
body[data-theme="cream"] .integration-modal {
  background: linear-gradient(180deg, #FFFFFF 0%, #FDF6ED 100%);
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 40px 100px -20px rgba(60,30,10,0.35);
}
.integration-modal-head {
  padding: 26px 30px 22px;
  border-bottom: 1px solid var(--line-1);
  background:
    radial-gradient(ellipse 380px 180px at 100% 0%, rgba(232,97,45,0.16), transparent 60%);
}
body[data-theme="cream"] .integration-modal-head {
  background:
    radial-gradient(ellipse 380px 180px at 100% 0%, rgba(192,81,26,0.14), transparent 60%);
}
.integration-modal-eyebrow {
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 8px;
}
.integration-modal-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 28px;
  color: var(--ink-1);
  margin: 0;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.integration-modal-title em {
  font-style: italic; color: var(--orange); font-weight: 600;
}
.integration-modal-context {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(232,97,45,0.10);
  border: 1px solid rgba(232,97,45,0.3);
  font-size: 11px;
  color: var(--ink-2);
}
body[data-theme="cream"] .integration-modal-context {
  background: rgba(192,81,26,0.10);
  border-color: rgba(192,81,26,0.3);
}
.integration-modal-context svg { color: var(--orange); }
.integration-modal-context b { color: var(--ink-1); font-weight: 600; }

.integration-modal-list {
  padding: 14px 18px;
  overflow-y: auto;
  flex: 1;
  display: flex; flex-direction: column;
  gap: 6px;
}

.integration-option {
  display: grid;
  grid-template-columns: 44px 1fr auto auto;
  align-items: center; gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--line-1);
  background: var(--surface-1);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}
.integration-option:hover {
  background: var(--surface-2);
  border-color: var(--line-2);
}
.integration-option.on {
  background: rgba(232,97,45,0.08);
  border-color: var(--orange);
  box-shadow: 0 4px 16px -8px rgba(232,97,45,0.4);
}
body[data-theme="cream"] .integration-option.on {
  background: rgba(192,81,26,0.07);
  border-color: var(--orange);
  box-shadow: 0 4px 16px -8px rgba(192,81,26,0.35);
}
.integration-option-logo {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(232,97,45,0.22), rgba(232,97,45,0.06));
  border: 1px solid rgba(232,97,45,0.35);
  color: var(--orange);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  font-family: var(--font-sans);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
body[data-theme="cream"] .integration-option-logo {
  background: linear-gradient(135deg, rgba(192,81,26,0.18), rgba(192,81,26,0.06));
  border-color: rgba(192,81,26,0.3);
}
.integration-option-body { min-width: 0; }
.integration-option-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}
.integration-option-name {
  font-weight: 600; font-size: 14.5px;
  color: var(--ink-1);
}
.integration-option-type {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--line-2);
  padding: 2px 6px;
  border-radius: 4px;
}
.integration-option-tag {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
}
.integration-option-tag.included {
  color: #A8C49A;
  background: rgba(107,143,94,0.18);
  border: 1px solid rgba(107,143,94,0.4);
}
body[data-theme="cream"] .integration-option-tag.included {
  color: #4A7340;
  background: rgba(90,139,78,0.15);
  border-color: rgba(90,139,78,0.4);
}
.integration-option-tag.enterprise {
  color: #E8A53D;
  background: rgba(232,165,61,0.13);
  border: 1px solid rgba(232,165,61,0.4);
}
body[data-theme="cream"] .integration-option-tag.enterprise {
  color: #B07A18;
  background: rgba(176,122,24,0.12);
  border-color: rgba(176,122,24,0.4);
}
.integration-option-desc {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.4;
}
.integration-option-price {
  font-variant-numeric: tabular-nums;
  font-weight: 700; font-size: 18px;
  color: var(--ink-1);
  text-align: right;
  white-space: nowrap;
  line-height: 1;
  letter-spacing: -0.025em;
}
.integration-option-price .zero {
  color: rgba(107,143,94,0.95);
}
.integration-option-price .suffix {
  display: block;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-3);
  margin-top: 3px;
}
.integration-option-radio {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  display: flex; align-items: center; justify-content: center;
  color: white;
  flex-shrink: 0;
}
.integration-option.on .integration-option-radio {
  background: var(--orange);
  border-color: var(--orange);
}

.integration-modal-foot {
  padding: 16px 22px;
  display: flex; align-items: center; gap: 14px;
  border-top: 1px solid var(--line-1);
  background: rgba(0,0,0,0.2);
}
body[data-theme="cream"] .integration-modal-foot {
  background: rgba(192,81,26,0.04);
}
.integration-modal-foot-meta {
  flex: 1;
  font-size: 12.5px;
  color: var(--ink-3);
}
.integration-modal-foot-meta b {
  color: var(--orange);
  font-weight: 700;
}
